Contact (Update)
Updates an existing Contact.
Authentication
Every request needs both of the following:
- An authorized UserID, passed in to the request body — this is the user's cieTrade.net email.
- A Bearer Token in the Authorization header of your tool or code call. The token is found under Settings → Integration → Api Token.
The user must have Can Access cieTrade API checked under Settings → Users & Roles, and must have an email address on their user record — the create and update endpoints record that user against every change they make.
Request Example
{
"UserID": "example@email.net",
"CT_ID": 12345,
"FirstName": "Bob",
"LastName": "Stone",
"CompanyName": "3P GLOBAL RESOURCES LLC",
"Location": "Main Office",
"MobilePhone": "555-201-4410",
"WorkPhone": "555-201-4400",
"JobTitle": "Logistics Manager",
"Email": "bob.stone@example.com",
"Notes": "Prefers to be contacted by email.",
"Roles": ["Billing", "Shipping"]
}
Body Parameters
| Parameter | Description | Required |
|---|---|---|
UserID |
cieTrade.NET User Email. Used for Authentication and Logging. | REQUIRED |
CT_ID |
ID of the contact to update. Must match an existing Contact in cieTrade. CT_ID can be looked up through the ListContacts GET endpoint or it can be found in cieTrade in the URL when editing or viewing a specific contact. For example cietrade.net/Contact?CT_ID= 17571 | REQUIRED |
FirstName |
Contact's first name. | REQUIRED |
LastName |
Contact's last name. | OPTIONAL |
CompanyName |
Company the contact belongs to. Must match a Counterparty in cieTrade. If omitted, the contact is unlinked from its current company. See Portal Users section below. | OPTIONAL |
Location |
Location of the contact. Must match a Location that exists under the Counterparty given in CompanyName. Ignored if CompanyName is not supplied. |
OPTIONAL |
MobilePhone |
Mobile phone number. | OPTIONAL |
WorkPhone |
Work phone number. | OPTIONAL |
JobTitle |
Contact's job title. | OPTIONAL |
Email |
Contact's email address. | OPTIONAL |
Notes |
Notes about the contact. Up to 200 characters. | OPTIONAL |
Roles |
List of roles to assign to the contact (e.g. ["Billing", "Shipping"]). Replaces the contact's existing roles. See Roles section below. | OPTIONAL |
Updating Fields
Every field is replaced with the value sent in the request. Any optional field that is omitted or sent empty is cleared on the contact.
To change a single field, send the contact's current values for all other fields along with the new value.
Roles
Roles is sent as a list of role names. Each role must match a Contact Role in cieTrade. If any role in the list is not valid, the request is rejected and the contact is not updated.
The contact's existing roles are replaced with the roles sent in the request. Sending an empty list, or omitting Roles, removes all of the contact's roles.
Portal Users
For contacts who are cieTrade portal users, CompanyName and Email cannot be changed through the API. Any values sent for these fields are ignored, and the contact keeps its existing company and email.
Location can be changed only within the portal user's existing company.
Response Example
On Success [HTTP 200]:
{
"Msg": "Successfully Updated Contact Bob Stone"
}
On Error [HTTP 500/HTTP 401/HTTP 400]:
{
"ErrMsg": "Error: Unable to find Contact 12345 in cieTrade."
}