curl --request GET \
--url https://api.headlesscommerce.io/v1/storefront/carts/by-session/{session_id} \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"status": "active",
"session_id": "<string>",
"customer_id": "<string>",
"items": [
{
"id": "<string>",
"variant_id": "<string>",
"product_id": "<string>",
"product_name": "<string>",
"variant_name": "<string>",
"sku": "<string>",
"image_url": "<string>",
"quantity": 123,
"unit_price": {
"amount": 123,
"currency": "<string>"
},
"line_discount": {
"amount": 123,
"currency": "<string>"
},
"line_total": {
"amount": 123,
"currency": "<string>"
},
"metadata": {}
}
],
"shipping_address": {
"name": "<string>",
"company": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>",
"phone": "<string>"
},
"billing_address": {
"name": "<string>",
"company": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>",
"phone": "<string>"
},
"shipping_method_id": "<string>",
"discount_codes": [
"<string>"
],
"summary": {
"subtotal": {
"amount": 123,
"currency": "<string>"
},
"discount_total": {
"amount": 123,
"currency": "<string>"
},
"shipping_total": {
"amount": 123,
"currency": "<string>"
},
"tax_total": {
"amount": 123,
"currency": "<string>"
},
"total": {
"amount": 123,
"currency": "<string>"
},
"item_count": 123,
"total_quantity": 123
},
"applied_discounts": [
{
"discount_id": "<string>",
"code": "<string>",
"name": "<string>",
"value_type": "fixed",
"value": 123,
"saved": {
"amount": 123,
"currency": "<string>"
}
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Guest 사용자의 Cart를 session_id로 조회합니다. 페이지 새로고침이나 탭 재방문 시 기존 Cart를 복원하는 데 사용합니다. active 상태의 Cart만 반환합니다.
curl --request GET \
--url https://api.headlesscommerce.io/v1/storefront/carts/by-session/{session_id} \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"status": "active",
"session_id": "<string>",
"customer_id": "<string>",
"items": [
{
"id": "<string>",
"variant_id": "<string>",
"product_id": "<string>",
"product_name": "<string>",
"variant_name": "<string>",
"sku": "<string>",
"image_url": "<string>",
"quantity": 123,
"unit_price": {
"amount": 123,
"currency": "<string>"
},
"line_discount": {
"amount": 123,
"currency": "<string>"
},
"line_total": {
"amount": 123,
"currency": "<string>"
},
"metadata": {}
}
],
"shipping_address": {
"name": "<string>",
"company": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>",
"phone": "<string>"
},
"billing_address": {
"name": "<string>",
"company": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>",
"phone": "<string>"
},
"shipping_method_id": "<string>",
"discount_codes": [
"<string>"
],
"summary": {
"subtotal": {
"amount": 123,
"currency": "<string>"
},
"discount_total": {
"amount": 123,
"currency": "<string>"
},
"shipping_total": {
"amount": 123,
"currency": "<string>"
},
"tax_total": {
"amount": 123,
"currency": "<string>"
},
"total": {
"amount": 123,
"currency": "<string>"
},
"item_count": 123,
"total_quantity": 123
},
"applied_discounts": [
{
"discount_id": "<string>",
"code": "<string>",
"name": "<string>",
"value_type": "fixed",
"value": 123,
"saved": {
"amount": 123,
"currency": "<string>"
}
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}API Key. 예: sk_live_xxxxx 또는 pk_live_xxxxx
Success
active, completed, abandoned Guest 식별 ID
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes