Update

Update

Update

Updates an existing location on an account.

Request

Method
URL
PUT

Path Parameters

Name
Required
Type
Description
accountUniqueId

Guid
The unique ID of the account.
itemUniqueId

Guid
The unique ID of the location.

Headers

Name
Required
Type
Description
APIKey

Guid
A valid API key with a scope of AccountLists

Body

Name
Required
Type
Description
name
Text
The name of the location. If supplied, it is subject to the same validation as create (maximum 32 characters, cannot be empty). If omitted, the location's currently stored name is left unchanged.
active
Boolean
Indicates if the location is active or inactive. If omitted, the location's currently stored value is left unchanged.
{
"active": false
}

Remarks

All fields are optional on update. Omitting a field entirely leaves that field's currently stored value unchanged — it is not reset to a default. In the example above, only active is supplied, so the location's name is left exactly as it was before the update.
If a field is supplied, it is validated the same way it is on Create. For example, supplying an empty name value is different from omitting it and will fail validation, since name cannot be empty.
A location's name must remain unique within an account. If name is supplied and it matches the name of another location on the same account, the request will fail with a 409 Conflict.

Response

Headers

None

Status Code

Code
Description
200 OK
The location was updated. The updated location is returned.
400 Bad Request
The location was not updated. This occurs if name is supplied but is empty or exceeds 32 characters.
401 Unauthorized
The API key is missing, invalid, disabled, or does not have the correct scope.
403 Forbidden
The API key does not belong to this account, the account does not have the API-keys feature, or the key does not have the required scope.
404 Not Found
No location was found with that id for this account.
409 Conflict
A location with that name already exists for this account.

Body

Name
Type
Description
uniqueId
Guid
The unique ID of the location.
name
Text
The name of the location.
active
Boolean
Indicates if the location is active or inactive.