Update customer

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

The Update Customer endpoint applies a partial update (RFC 7396 JSON Merge Patch) to an existing business company. Send only the fields you want to change; omitted fields keep their persisted values. For more information on how versioning works and how to include it in your requests, please refer to the Versioning page.

This endpoint uses optimistic concurrency. You must send the customer's current ETag in an If-Match header. The token is returned on the ETag response header of a GET, and in the body of a create/update response. If the token does not match the current record the request fails with 412 Precondition Failed; refetch with GET to obtain a fresh value and retry.


Request Parameters

The following parameters are required in the URL path:

ParameterTypeRequiredDescription
versionStringYesThe version of the API.
idStringYesThe unique identifier of the customer.

The following header is required:

HeaderRequiredDescription
If-MatchYesThe current ETag of the customer being updated.

Request Body

All fields are optional. Provide only the fields you want to change.

FieldTypeRequiredDescription
NameStringNoThe customer name. Must be 200 characters or fewer. Cannot be blank when present.
TypeStringNoThe customer type. One of "Customer" or "Broker/3PL".
CompanyNumberStringNoA reference/registration number for the company. Must be 32 characters or fewer.
StatusStringNoThe customer status. One of "Active" or "Inactive".
BillingAddressObjectNoThe billing address of the customer.
BillingAddress.StreetStringNoThe street line of the billing address.
BillingAddress.CityStringNoThe city of the billing address.
BillingAddress.StateStringNoThe state of the billing address.
BillingAddress.ZipStringNoThe postal code of the billing address.
BillingAddress.CountryStringNoISO country code of the billing address. Defaults to "US".
EmailArray of StringNoA list of email addresses associated with the customer.
PhoneArray of StringNoA list of phone numbers associated with the customer.
FaxStringNoThe fax number of the customer.
ExternalIdStringNoAn external reference identifier. Must be 100 characters or fewer.

Example CURL Request

curl --location --request PATCH 'https://integrations.alvys.com/api/p/v1/customers/01fec4d332ed49ff96595c8d4434ea96' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--header 'If-Match: "00000000-0000-0000-0000-000000000001"' \
--data-raw '{
  "Status": "Inactive"
}'

Replace YOUR_ACCESS_TOKEN with your actual Bearer token and If-Match with the customer's current ETag.


Response Fields

A successful request returns the updated customer. The new optimistic-concurrency token is returned on the ETag response header and in the ETag body field.

FieldTypeDescription
IdStringThe unique identifier of the customer.
ETagStringThe optimistic-concurrency token after the update.
NameStringThe name of the customer.
CompanyNumberStringThe company number of the customer.
TypeStringThe type of customer ("Customer" or "Broker/3PL").
StatusStringThe raw persisted status of the customer.
BillingAddressObjectThe billing address of the customer.
BillingAddress.StreetStringThe street line of the billing address.
BillingAddress.CityStringThe city of the billing address.
BillingAddress.StateStringThe state of the billing address.
BillingAddress.ZipCodeStringThe postal code of the billing address.
EmailArrayA list of email addresses associated with the customer.
PhoneArrayA list of phone numbers associated with the customer.
FaxStringThe fax number of the customer.
DateCreatedString (Date-Time)The date and time when the customer was created.
DateModifiedString (Date-Time)The date and time of this update.
InvoicingInformationObjectThe invoicing information for the customer.
ExternalIdStringThe external identifier associated with the customer.

Example Response

200 OK

{
  "Id": "01fec4d332ed49ff96595c8d4434ea96",
  "ETag": "\"00000000-0000-0000-0000-000000000002\"",
  "Name": "Acme Logistics",
  "CompanyNumber": "ACME-001",
  "Type": "Broker/3PL",
  "Status": "Inactive",
  "BillingAddress": {
    "Street": "123 Main St",
    "City": "Dallas",
    "State": "TX",
    "ZipCode": "75201"
  },
  "Email": ["[email protected]"],
  "Phone": ["+1-214-555-0100"],
  "Fax": null,
  "DateCreated": "2025-09-08T19:38:34.529Z",
  "DateModified": "2025-09-09T11:02:10.118Z",
  "InvoicingInformation": null,
  "ExternalId": "EXT-ACME-001"
}

Status Codes

StatusMeaning
200The customer was updated.
400The request body failed validation.
401The request was not authenticated.
403The caller lacks permission to update customers.
404No customer with the given id exists.
409The update would collide with another customer's unique values.
412The supplied If-Match token did not match the current record. Refetch with GET and retry.
428The If-Match header is required but was not provided.

Rate Limits

All endpoints are subject to rate limits to protect the API from traffic spikes. For detailed information on rate limits, please refer to the Rate Limits section.

This page is interactive, allowing you to try a request by completing the fields for the parameters below. As you fill out the parameters, the CURL command on the right side of the page will be automatically updated.

Path Params
string
required
string
required
Defaults to 1.0

API version (e.g., 1.0)

Body Params
string | null
string | null
string | null
string | null
BillingAddress
object | null
Email
array of strings | null
Email
Phone
array of strings | null
Phone
string | null
string | null
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json-patch+json

Generated from available request content types

Allowed:
Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json