It allows you:
to create new contacts for an existing customer
to read the contacts for an existing customer
Prerequisites:
In order to use this API Method for PUT there must be accomplished the following requirements in SocrateCloud:
to have the customer created in SocrateCloud
Columns that can be used as filters:
Organization
BPartner (optional)
Name
Active
LastModified (UTC time format ISO 8601: yyyy-MM-dd HH:mm:ss Z, max date from Contact tab).Use this filter to get the newest contacts.
Mandatory Parameters when inserting customer contacts:
BPartner Value
Actions can be done:
list
create
update
delete
URL: https://api.socratecloud.com/webapi/rest/customer/contact/list/0?startRow={0}&endRow={100}&accessToken={access_token}&BPartner={bp_value}
Method: GET
Return: JSON object with next format:
{
"data": [
{
"Organization": "Demo SRL",
"Created": "2007-08-22 08:30:18",
"CreatedBy": "System",
"Updated": "2014-02-04 14:40:58",
"UpdatedBy": "SuperUser",
"CustomerContact_ID": 10290201,
"Active": true,
"Name": "some_user",
"FirstName": null,
"LastName": null,
"BirthDay": null,
"Description": null,
"Email": "som@address",
"Phone": null,
"Fax": null,
"BPartner": "vp_value",
"IsAutoSendInvoice": true,
"MailText": "Invoice Confirmation"
}
],
"totalRows": 1
}
URL: https://api.socratecloud.com/webapi/rest/customer/contact/create/{version}?accessToken={access_token}&BPartner={bp_value}
Method: POST
Return: user name for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"Active": true,
"Name": "User 1",
"FirstName": null,
"LastName": null,
"BirthDay": null,
"Description": null,
"Email": "som@address",
"Phone": null,
"Fax": null,
"IsAutoSendInvoice": true,
"MailText": "Invoice Confirmation"
}
URL: https://api.socratecloud.com/webapi/rest/customer/contact/update/{version}?accessToken={access_token}&BPartner={bp_value}&Name={customer_contact_name}
Method: POST
Return: user name for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"Active": true,
"Name": "User 1",
"FirstName": null,
"LastName": null,
"BirthDay": null,
"Description": null,
"Email": "som@address",
"Phone": null,
"Fax": null,
"IsAutoSendInvoice": true,
"MailText": "Invoice Confirmation"
}
URL: https://api.socratecloud.com/webapi/rest/customer/contact/delete/{version}?accessToken={access_token}&BPartner={bp_value}&Name={customer_contact_name}
Method: POST
Return: 'Deleted' for success or error message (start with "ERROR: ")