Skip to main content
PUT
/
customers
/
{id}
Update Customer
curl --request PUT \
  --url https://api.loopreturns.com/api/v1/customers/{id} \
  --header 'Content-Type: application/json' \
  --header 'X-Authorization: <api-key>' \
  --data '
{
  "external_id": "<string>",
  "channel": "<string>",
  "first_name": "<string>",
  "last_name": "<string>",
  "email": "[email protected]",
  "phone": "<string>",
  "tags": [
    "<string>"
  ]
}
'
{
  "id": 123,
  "external_id": "<string>",
  "channel": "<string>",
  "first_name": "<string>",
  "last_name": "<string>",
  "email": "[email protected]",
  "phone": "<string>",
  "tags": [
    "<string>"
  ]
}

Authorizations

X-Authorization
string
header
required

API Scope: "Customers (write)"

Path Parameters

id
integer
required

The unique identifier for the customer, created by Loop.

Example:

67329889100573

Body

application/json
external_id
string | null

The provided external_id must be unique. If a non-unique external_id is provided, the API will respond with an error.

Maximum string length: 64
Example:

"71263csss-12uhsdfh-2138dja"

channel
string | null

If a channel with this name is not already associated with the shop, it will be used to create a new channel.

Maximum string length: 64
Example:

"shopify"

first_name
string | null

The customer's given name.

Maximum string length: 50
Example:

"Edgar"

last_name
string | null

The customer's surname.

Maximum string length: 50
Example:

"Martinez"

email
string<email> | null

The customer's email address.

Maximum string length: 255
phone
string | null

The customer's phone number.

Maximum string length: 30
Example:

"678-999-8212"

tags
string[] | null

An array of tags used to classify and group customers.

Example:
["FirstPurchase", "ReturnCustomer"]

Response

Success

id
integer<int64>

The unique identifier for the customer, created by Loop.

Example:

9007199254740991

external_id
string | null

The identifier used by an external source to identify the customer.

Example:

"71263csss-12uhsdfh-2138dja"

channel
string | null

The name of the channel associated with the customer.

Maximum string length: 64
Example:

"shopify"

first_name
string | null

The customer's given name.

Example:

"Edgar"

last_name
string | null

The customer's surname.

Example:

"Martinez"

email
string<email> | null

The customer's email address.

phone
string | null

The customer's phone number.

Example:

"678-999-8212"

tags
(string | null)[]

An array of tags associated with the customer.

Example:
["FirstPurchase", "ReturnCustomer"]