Skip to main content
POST
/
storefront
/
customers
/
me
/
addresses
주소 추가
curl --request POST \
  --url https://api.headlesscommerce.io/v1/storefront/customers/me/addresses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Customer-Token: <api-key>' \
  --data '
{
  "name": "<string>",
  "line1": "<string>",
  "city": "<string>",
  "postal_code": "<string>",
  "country": "<string>",
  "company": "<string>",
  "line2": "<string>",
  "state": "<string>",
  "phone": "<string>",
  "type": "both",
  "is_default": false
}
'
{
  "id": "<string>",
  "name": "<string>",
  "company": "<string>",
  "line1": "<string>",
  "line2": "<string>",
  "city": "<string>",
  "state": "<string>",
  "postal_code": "<string>",
  "country": "<string>",
  "phone": "<string>",
  "type": "shipping",
  "is_default": true,
  "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
name
string
required
line1
string
required
city
string
required
postal_code
string
required
country
string
required
company
string
line2
string
state
string
phone
string
type
enum<string>
default:both
Available options:
shipping,
billing,
both
is_default
boolean
default:false

Response

201 - application/json

Created

id
string
name
string
company
string
line1
string
line2
string
city
string
state
string
postal_code
string
country
string

ISO 3166-1 alpha-2

phone
string
type
enum<string>
Available options:
shipping,
billing,
both
is_default
boolean
created_at
string<date-time>