Skip to main content
PATCH
/
storefront
/
customers
/
me
내 정보 수정
curl --request PATCH \
  --url https://api.headlesscommerce.io/v1/storefront/customers/me \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Customer-Token: <api-key>' \
  --data '
{
  "first_name": "<string>",
  "last_name": "<string>",
  "phone": "<string>",
  "status": "active",
  "tags": [
    "<string>"
  ],
  "metadata": {}
}
'
{
  "id": "<string>",
  "email": "<string>",
  "first_name": "<string>",
  "last_name": "<string>",
  "phone": "<string>",
  "external_id": "<string>",
  "status": "active",
  "total_orders": 123,
  "total_spent": {
    "amount": 123,
    "currency": "<string>"
  },
  "tags": [
    "<string>"
  ],
  "addresses": [
    {
      "name": "<string>",
      "company": "<string>",
      "line1": "<string>",
      "line2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "postal_code": "<string>",
      "country": "<string>",
      "phone": "<string>"
    }
  ],
  "metadata": {},
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API Key. 예: sk_live_xxxxx 또는 pk_live_xxxxx

X-Customer-Token
string
header
required

Storefront 고객 인증 토큰. POST /admin/customers/{id}/token 으로 발급. /storefront/customers/, /storefront/orders/ 접근 시 필요.

Body

application/json
first_name
string
last_name
string
phone
string
status
enum<string>

Admin API에서만 변경 가능

Available options:
active,
disabled
tags
string[]
metadata
object

Response

200 - application/json

Success

id
string
email
string
first_name
string
last_name
string
phone
string
external_id
string
status
enum<string>
Available options:
active,
disabled
total_orders
integer
total_spent
object
tags
string[]
addresses
object[]
metadata
object
created_at
string<date-time>