Location (Update)
Updates an existing Location.
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",
"AddressID": 4567,
"Location": "Columbus Warehouse",
"LocationCompanyName": "3P Global Resources",
"Address1": "1200 Industrial Pkwy",
"Address2": "Building B",
"Address3": "Dock 4",
"City": "Columbus",
"Region": "OH",
"PostalCode": "43215",
"County": "Franklin",
"Country": "US",
"FirstName": "Dana",
"LastName": "Reyes",
"Phone": "614-555-0100",
"MobilePhone": "614-555-0199",
"Email": "dana.reyes@example.com",
"TaxID": "12-3456789",
"ShippingInstructions": "Check in at the guard shack.",
"ServiceInstructions": "Receiving hours 7am-3pm.",
"Notes": "Internal notes about this location.",
"CustomsCode": "",
"RemitAddress": false,
"UserDefined1": "",
"UserDefined2": "",
"UserDefined3": "",
"UserDefined4": ""
}
Body Parameters
| Parameter | Description | Required |
|---|---|---|
UserID |
cieTrade.NET User Email. Used for Authentication and Logging. | REQUIRED |
AddressID |
ID of the location to update. Must match an existing Location in cieTrade. Location IDs can be retrieved with the ListAccountLocations endpoint. |
REQUIRED |
Location |
Name of the location (e.g. "Columbus Warehouse"). Send a new name to rename the location. See Renaming Locations section below. | REQUIRED |
LocationCompanyName |
Company name shown on the address. | REQUIRED |
Address1 |
Address line 1. | OPTIONAL |
Address2 |
Address line 2. | OPTIONAL |
Address3 |
Address line 3. | OPTIONAL |
City |
City. | OPTIONAL |
Region |
State, province or region. See Regions and Countries section below. | OPTIONAL |
PostalCode |
Postal or ZIP code. | OPTIONAL |
County |
County. | OPTIONAL |
Country |
Country. See Regions and Countries section below. | OPTIONAL |
FirstName |
First name of the contact at this location. | OPTIONAL |
LastName |
Last name of the contact at this location. | OPTIONAL |
Phone |
Phone number. | OPTIONAL |
MobilePhone |
Mobile phone number. | OPTIONAL |
Email |
Email address. | OPTIONAL |
TaxID |
Tax / VAT ID. | OPTIONAL |
ShippingInstructions |
Shipping instructions for this location. | OPTIONAL |
ServiceInstructions |
Service instructions for this location. | OPTIONAL |
Notes |
Internal notes about the location. | OPTIONAL |
CustomsCode |
Customs code. | OPTIONAL |
RemitAddress |
Marks this location as a remit-to address. Accepts true or false. Defaults to false. |
OPTIONAL |
UserDefined1 – UserDefined4 |
User-defined fields 1 through 4. | 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 location, and RemitAddress is set to false if omitted.
To change a single field, send the location's current values for all other fields along with the new value.
Renaming Locations
To rename a location, send its AddressID with the new name in Location. The new name must not already be used by another location under the same Account.
Accounts
A location cannot be moved to a different Account. The location always stays under the Account it was created under.
Regions and Countries
Country can be sent as either the country code (e.g. "US") or the full country name (e.g. "United States"). It must match a Country in cieTrade, and the country code is always saved.
Region can be sent as either the abbreviation (e.g. "OH") or the full name (e.g. "Ohio"). It must match a Region in cieTrade, and the abbreviation is always saved.
Response Example
On Success [HTTP 200]:
{
"Msg": "Successfully Updated Location 4567 "
}
On Error [HTTP 500/HTTP 401/HTTP 400]:
{
"ErrMsg": "Error: Unable to find Address 4567 in cieTrade."
}