- Store API
- Admin API
- Auth
- Batch Jobs
- Currencies
- Customers
- Customer Groups
- Discounts
- Draft Orders
- Gift Cards
- Inventory Items
- Invites
- Notes
- Notifications
- Orders
- Create a Reservation
- Cancel Claim's Fulfillment
- Ship a Claim's Fulfillment
- Cancel Swap's Fulfilmment
- Get Order Reservations
- Add a Shipping Method
- Create a Refund
- Get an Order
- Update an Order
- Create a Fulfillment
- Cancel a Swap
- List Orders
- Create a Swap
- Complete an Order
- Create a Swap Fulfillment
- Cancel a Claim
- Process a Swap Payment
- Ship a Fulfillment
- Capture an Order's Payments
- Archive Order
- Update a Claim
- Request a Return
- Create a Claim Fulfillment
- Ship a Swap's Fulfillment
- Cancel a Fulfilmment
- Create a Claim
- Cancel an Order
- Order Edits
- Payments
- Payment Collections
- Product Collections
- Product Tags
- Product Types
- Product Variants
- Price Lists
- Products
- Product Categories
- Publishable Api Keys
- Reservations
- Regions
- Return Reasons
- Returns
- Sales Channels
- Shipping Options
- Shipping Profiles
- Stock Locations
- Store
- Swaps
- Uploads
- Tax Rates
- Users
- 【Demo】Products
Update a Customer
POST
/admin/customers/{id}
Admin API/CustomersCustomers
Request
Path Params
id
string
required
Query Params
expand
string
optional
fields
string
optional
Body Params application/json
email
string <email>
optional
first_name
string
optional
last_name
string
optional
phone
string
optional
password
string <password>
optional
metadata
object
optional
groups
array [object {1}]
optional
id
string
required
Example
{
"email": "user@example.com",
"first_name": "string",
"last_name": "string",
"phone": "string",
"password": "pa$$word",
"metadata": {},
"groups": [
{
"id": "string"
}
]
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/admin/customers/' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢200OK
application/json
Body
customer
object (Customer)
required
id
string
required
Example:
cus_01G2SG30J8C85S4A5CHM2S1NS2
email
string <email>
required
first_name
string | null
required
Example:
Arno
last_name
string | null
required
Example:
Willms
billing_address_id
string | null
required
Example:
addr_01G8ZH853YPY9B94857DY91YGW
phone
string | null
required
Example:
16128234334802
has_account
boolean
required
Default:
false
created_at
string <date-time>
required
updated_at
string <date-time>
required
deleted_at
string <date-time> | null
required
orders
array [object]
optional
metadata
object | null
required
Example:
{"car":"white"}
groups
array[object (Customer Group) {8}]
optional
billing_address
object (Address)
optional
shipping_addresses
array[object (Address) {18}]
optional
Example
{
"customer": {
"id": "cus_01G2SG30J8C85S4A5CHM2S1NS2",
"email": "user@example.com",
"first_name": "Arno",
"last_name": "Willms",
"billing_address_id": "addr_01G8ZH853YPY9B94857DY91YGW",
"phone": 16128234334802,
"has_account": false,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z",
"orders": [
{}
],
"metadata": {
"car": "white"
},
"groups": [
{
"id": "cgrp_01G8ZH853Y6TFXWPG5EYE81X63",
"name": "VIP",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z",
"customers": [
{}
],
"price_lists": [
{}
],
"metadata": {
"car": "white"
}
}
],
"billing_address": {
"id": "addr_01G8ZC9VS1XVE149MGH2J7QSSH",
"customer_id": "cus_01G2SG30J8C85S4A5CHM2S1NS2",
"customer": {},
"company": "Acme",
"first_name": "Arno",
"last_name": "Willms",
"address_1": "14433 Kemmer Court",
"address_2": "Suite 369",
"city": "South Geoffreyview",
"province": "Kentucky",
"postal_code": 72093,
"phone": 16128234334802,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z",
"country_code": "st",
"metadata": {
"car": "white"
},
"country": {
"id": 109,
"name": "ITALY",
"display_name": "Italy",
"region_id": "reg_01G1G5V26T9H8Y0M4JNE3YGA4G",
"region": {},
"iso_2": "it",
"iso_3": "ita",
"num_code": 380
}
},
"shipping_addresses": [
{
"id": "addr_01G8ZC9VS1XVE149MGH2J7QSSH",
"customer_id": "cus_01G2SG30J8C85S4A5CHM2S1NS2",
"customer": {},
"company": "Acme",
"first_name": "Arno",
"last_name": "Willms",
"address_1": "14433 Kemmer Court",
"address_2": "Suite 369",
"city": "South Geoffreyview",
"province": "Kentucky",
"postal_code": 72093,
"phone": 16128234334802,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z",
"country_code": "st",
"metadata": {
"car": "white"
},
"country": {
"id": 109,
"name": "ITALY",
"display_name": "Italy",
"region_id": "reg_01G1G5V26T9H8Y0M4JNE3YGA4G",
"region": {},
"iso_2": "it",
"iso_3": "ita",
"num_code": 380
}
}
]
}
}
🟠400Client Error or Multiple Errors
🟠401User is not authorized. Must log in first
🟠404Not Found Error
🟠409Invalid State Error
🟠422Invalid Request Error
🔴500Server Error
Modified at 2024-05-23 07:10:14