Update

Update

Update

Updates an existing delivery range 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 delivery range.

Headers

Name
Required
Type
Description
APIKey

Guid
A valid API key with a scope of AccountLists

Body

Name
Required
Type
Description
deliveryRange
Text
The label of the delivery range. If supplied, must not be empty and must be 32 characters or fewer. Omit to leave the current value unchanged.
active
Boolean
Indicates if the delivery range is active or inactive. Omit to leave the current value unchanged.
{
"active": false
}

Remarks

Every field in the body is optional. A field that is omitted from the request is left exactly as it is currently stored — it is not reset to a default value. Only fields that are explicitly supplied are validated and updated, using the same validation rules as create (deliveryRange must not be empty and must be 32 characters or fewer). In the example above, only active is changed; the stored deliveryRange value is left untouched.
Delivery range labels must still be unique per account when a new deliveryRange value is supplied.

Response

Headers

None

Status Code

Code
Description
200 OK
The updated delivery range was returned.
400 Bad Request
The delivery range was not updated. This occurs if deliveryRange is supplied but is empty or longer than 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 enabled, or the key does not have the required scope.
404 Not Found
No delivery range was found with that id for this account.
409 Conflict
A delivery range with that label already exists for this account.

Body

Name
Type
Description
uniqueId
Guid
The unique ID of the delivery range.
deliveryRange
Text
The label of the delivery range.
active
Boolean
Indicates if the delivery range is active or inactive.