메인 콘텐츠로 건너뛰기
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"
}

인증

Authorization
string
header
필수

API Key. Example: sk_live_xxxxx or pk_live_xxxxx

X-Customer-Token
string
header
필수

Storefront customer authentication token. Issued via POST /admin/customers/{id}/token. Required for accessing /storefront/customers/, /storefront/orders/.

본문

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

Can only be changed via Admin API

사용 가능한 옵션:
active,
disabled
tags
string[]
metadata
object

응답

200 - application/json

성공

id
string
email
string
first_name
string
last_name
string
phone
string
external_id
string
status
enum<string>
사용 가능한 옵션:
active,
disabled
total_orders
integer
total_spent
object
tags
string[]
addresses
object[]
metadata
object
created_at
string<date-time>