curl --request POST \
--url https://api.headlesscommerce.io/v1/admin/orders/{id}/complete \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"number": 123,
"status": "draft",
"payment_status": "unpaid",
"fulfillment_status": "unfulfilled",
"customer_id": "<string>",
"email": "<string>",
"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>"
},
"lines": [
{
"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>"
},
"tax_amount": {
"amount": 123,
"currency": "<string>"
},
"fulfilled_quantity": 123,
"refunded_quantity": 123
}
],
"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>"
},
"refunded_total": {
"amount": 123,
"currency": "<string>"
},
"applied_discounts": [
{
"discount_id": "<string>",
"code": "<string>",
"name": "<string>",
"value_type": "fixed",
"value": 123,
"saved": {
"amount": 123,
"currency": "<string>"
}
}
],
"shipping_method_name": "<string>",
"note": "<string>",
"payments": [
{
"id": "<string>",
"order_id": "<string>",
"provider": "<string>",
"provider_id": "<string>",
"amount": {
"amount": 123,
"currency": "<string>"
},
"status": "pending",
"created_at": "2023-11-07T05:31:56Z"
}
],
"fulfillments": [
{
"id": "<string>",
"order_id": "<string>",
"status": "pending",
"tracking_number": "<string>",
"tracking_url": "<string>",
"carrier": "<string>",
"lines": [
{
"order_line_id": "<string>",
"quantity": 123
}
],
"created_at": "2023-11-07T05:31:56Z",
"shipped_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z"
}
],
"refunds": [
{
"id": "<string>",
"order_id": "<string>",
"amount": {
"amount": 123,
"currency": "<string>"
},
"reason": "<string>",
"restock": true,
"status": "pending",
"lines": [
{
"order_line_id": "<string>",
"quantity": 123
}
],
"created_at": "2023-11-07T05:31:56Z"
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"cancelled_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}주문 상태를 completed로 전환합니다. processing 상태의 주문만 전환 가능합니다.
curl --request POST \
--url https://api.headlesscommerce.io/v1/admin/orders/{id}/complete \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"number": 123,
"status": "draft",
"payment_status": "unpaid",
"fulfillment_status": "unfulfilled",
"customer_id": "<string>",
"email": "<string>",
"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>"
},
"lines": [
{
"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>"
},
"tax_amount": {
"amount": 123,
"currency": "<string>"
},
"fulfilled_quantity": 123,
"refunded_quantity": 123
}
],
"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>"
},
"refunded_total": {
"amount": 123,
"currency": "<string>"
},
"applied_discounts": [
{
"discount_id": "<string>",
"code": "<string>",
"name": "<string>",
"value_type": "fixed",
"value": 123,
"saved": {
"amount": 123,
"currency": "<string>"
}
}
],
"shipping_method_name": "<string>",
"note": "<string>",
"payments": [
{
"id": "<string>",
"order_id": "<string>",
"provider": "<string>",
"provider_id": "<string>",
"amount": {
"amount": 123,
"currency": "<string>"
},
"status": "pending",
"created_at": "2023-11-07T05:31:56Z"
}
],
"fulfillments": [
{
"id": "<string>",
"order_id": "<string>",
"status": "pending",
"tracking_number": "<string>",
"tracking_url": "<string>",
"carrier": "<string>",
"lines": [
{
"order_line_id": "<string>",
"quantity": 123
}
],
"created_at": "2023-11-07T05:31:56Z",
"shipped_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z"
}
],
"refunds": [
{
"id": "<string>",
"order_id": "<string>",
"amount": {
"amount": 123,
"currency": "<string>"
},
"reason": "<string>",
"restock": true,
"status": "pending",
"lines": [
{
"order_line_id": "<string>",
"quantity": 123
}
],
"created_at": "2023-11-07T05:31:56Z"
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"cancelled_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}API Key. 예: sk_live_xxxxx 또는 pk_live_xxxxx
리소스 ID
Success
draft, pending, confirmed, processing, completed, cancelled unpaid, partially_paid, paid, partially_refunded, refunded unfulfilled, partially_fulfilled, fulfilled, returned Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes