Tổng đài hỗ trợ - 
1900 6750
( 7:00 - 22:00 )

Phương thức POST của Order phần 2

POST/admin/orders.json

Tạo mới một Order

order

Thêm vào với các thuộc tính được định nghĩa trước đó của Order , bạn có thể sử dụng thêm các cờ sau

  • send_webhooks - Xác định xem webhook của Order này có được bắn về hay không
  • send_receipt - Xác định email xác nhận đơn hàng có được gửi tới cho khách hàng hay không. Mặc định: false.
  • send_fulfillment_receipt - Xác định email xác nhận giao vận có được gửi tới khách hàng hay không. Mặc định: false.
  • inventory_behaviour - Xác nhận hành vi tương tác với kho hàng nào sẽ được sử dụng. Các giá trị hợp lệ:
    • bypass (mặc định): Không kiểm tra kho hàng.
    • decrement_ignoring_policy: Bỏ qua chính sách kho hàng của Product và cho phép mua Product kể cả hết hàng.
    • decrement_obeying_policy: Tuân theo chính sách kho hàng của Product.

Tạo một Order đơn giản, gửi hóa đơn Order và hóa đơn Fulfillment tới khách hàng

POST /admin/orders.json
{
  "order": {
    "email": "[email protected]",
    "send_receipt": true,
    "send_fulfillment_receipt": true,
    "line_items": [
      {
        "variant_id": 447654529,
        "quantity": 1
      }
    ]
  }
}
Xem kết quả
HTTP/1.1 201 Created
{
  "order": {
    "id": 1073459966,
    "email": "[email protected]",
    "closed_on": null,
    "created_on": "2015-12-08T11:40:58Z",
    "modified_on": "2015-12-08T11:40:58Z",
    "number": 2,
    "note": null,
    "token": "e797e139997e8645808f26f2b867a982",
    "gateway": "",
    "test": false,
    "total_price": "199.00",
    "subtotal_price": "199.00",
    "total_weight": 0,
    "total_tax": "0.00",
    "taxes_included": false,
    "currency": "USD",
    "financial_status": "paid",
    "confirmed": true,
    "total_discounts": "0.00",
    "total_line_items_price": "199.00",
    "cart_token": null,
    "buyer_accepts_marketing": false,
    "name": "#1002",
    "referring_site": null,
    "landing_site": null,
    "cancelled_on": null,
    "cancel_reason": null,
    "total_price_usd": "199.00",
    "checkout_token": null,
    "reference": null,
    "user_id": null,
    "location_id": null,
    "source_identifier": null,
    "source_url": null,
    "processed_on": "2015-12-08T11:40:58Z",
    "device_id": null,
    "browser_ip": null,
    "landing_site_ref": null,
    "order_number": 1002,
    "discount_codes": [
    ],
    "note_attributes": [
    ],
    "payment_gateway_names": [
    ],
    "processing_method": "",
    "checkout_id": null,
    "source_name": "755357713",
    "fulfillment_status": "fulfilled",
    "tax_lines": [
    ],
    "tags": "",
    "contact_email": "[email protected]",
    "line_items": [
      {
        "id": 1071823176,
        "variant_id": 447654529,
        "title": "IPod Touch 8GB",
        "quantity": 1,
        "price": "199.00",
        "grams": 200,
        "sku": "IPOD2009BLACK",
        "variant_title": "Black",
        "vendor": null,
        "fulfillment_service": "manual",
        "product_id": 921728736,
        "requires_shipping": true,
        "taxable": true,
        "gift_card": false,
        "name": "IPod Touch 8GB - Black",
        "variant_inventory_management": "bizweb",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "fulfillment_status": "fulfilled",
        "tax_lines": [
        ]
      }
    ],
    "shipping_lines": [
    ],
    "fulfillments": [
      {
        "id": 1022782893,
        "order_id": 1073459966,
        "status": "success",
        "created_on": "2015-12-08T11:40:58Z",
        "service": "manual",
        "modified_on": "2015-12-08T11:40:58Z",
        "tracking_company": null,
        "tracking_number": null,
        "tracking_numbers": [
        ],
        "tracking_url": null,
        "tracking_urls": [
        ],
        "receipt": {},
        "line_items": [
          {
            "id": 1071823176,
            "variant_id": 447654529,
            "title": "IPod Touch 8GB",
            "quantity": 1,
            "price": "199.00",
            "grams": 200,
            "sku": "IPOD2009BLACK",
            "variant_title": "Black",
            "vendor": null,
            "fulfillment_service": "manual",
            "product_id": 921728736,
            "requires_shipping": true,
            "taxable": true,
            "gift_card": false,
            "name": "IPod Touch 8GB - Black",
            "variant_inventory_management": "bizweb",
            "properties": [
            ],
            "product_exists": true,
            "fulfillable_quantity": 0,
            "total_discount": "0.00",
            "fulfillment_status": "fulfilled",
            "tax_lines": [
            ]
          }
        ]
      }
    ],
    "refunds": [
    ],
    "customer": {
      "id": 1073339462,
      "email": "[email protected]",
      "accepts_marketing": false,
      "created_on": "2015-12-08T11:40:58Z",
      "modified_on": "2015-12-08T11:40:59Z",
      "first_name": null,
      "last_name": null,
      "orders_count": 1,
      "state": "disabled",
      "total_spent": "0.00",
      "last_order_id": 1073459966,
      "note": null,
      "verified_email": true,
      "multipass_identifier": null,
      "tax_exempt": false,
      "tags": "",
      "last_order_name": "#1002"
    }
  }
}

Tạo một Order mà không gửi email xác nhận Order và email xác nhận giao hàng

POST /admin/orders.json
{
  "order": {
    "email": "[email protected]",
    "line_items": [
      {
        "variant_id": 447654529,
        "quantity": 1
      }
    ]
  }
}
Xem kết quả
HTTP/1.1 201 Created
{
  "order": {
    "id": 1073459967,
    "email": "[email protected]",
    "closed_on": null,
    "created_on": "2015-12-08T11:41:00Z",
    "modified_on": "2015-12-08T11:41:00Z",
    "number": 2,
    "note": null,
    "token": "31a4b4a16f8e4bb5ea5c006d22c4275c",
    "gateway": "",
    "test": false,
    "total_price": "199.00",
    "subtotal_price": "199.00",
    "total_weight": 0,
    "total_tax": "0.00",
    "taxes_included": false,
    "currency": "USD",
    "financial_status": "paid",
    "confirmed": true,
    "total_discounts": "0.00",
    "total_line_items_price": "199.00",
    "cart_token": null,
    "buyer_accepts_marketing": false,
    "name": "#1002",
    "referring_site": null,
    "landing_site": null,
    "cancelled_on": null,
    "cancel_reason": null,
    "total_price_usd": "199.00",
    "checkout_token": null,
    "reference": null,
    "user_id": null,
    "location_id": null,
    "source_identifier": null,
    "source_url": null,
    "processed_on": "2015-12-08T11:41:00Z",
    "device_id": null,
    "browser_ip": null,
    "landing_site_ref": null,
    "order_number": 1002,
    "discount_codes": [
    ],
    "note_attributes": [
    ],
    "payment_gateway_names": [
    ],
    "processing_method": "",
    "checkout_id": null,
    "source_name": "755357713",
    "fulfillment_status": "fulfilled",
    "tax_lines": [
    ],
    "tags": "",
    "contact_email": "[email protected]",
    "line_items": [
      {
        "id": 1071823177,
        "variant_id": 447654529,
        "title": "IPod Touch 8GB",
        "quantity": 1,
        "price": "199.00",
        "grams": 200,
        "sku": "IPOD2009BLACK",
        "variant_title": "Black",
        "vendor": null,
        "fulfillment_service": "manual",
        "product_id": 921728736,
        "requires_shipping": true,
        "taxable": true,
        "gift_card": false,
        "name": "IPod Touch 8GB - Black",
        "variant_inventory_management": "bizweb",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "fulfillment_status": "fulfilled",
        "tax_lines": [
        ]
      }
    ],
    "shipping_lines": [
    ],
    "fulfillments": [
      {
        "id": 1022782894,
        "order_id": 1073459967,
        "status": "success",
        "created_on": "2015-12-08T11:41:00Z",
        "service": "manual",
        "modified_on": "2015-12-08T11:41:00Z",
        "tracking_company": null,
        "tracking_number": null,
        "tracking_numbers": [
        ],
        "tracking_url": null,
        "tracking_urls": [
        ],
        "receipt": {},
        "line_items": [
          {
            "id": 1071823177,
            "variant_id": 447654529,
            "title": "IPod Touch 8GB",
            "quantity": 1,
            "price": "199.00",
            "grams": 200,
            "sku": "IPOD2009BLACK",
            "variant_title": "Black",
            "vendor": null,
            "fulfillment_service": "manual",
            "product_id": 921728736,
            "requires_shipping": true,
            "taxable": true,
            "gift_card": false,
            "name": "IPod Touch 8GB - Black",
            "variant_inventory_management": "bizweb",
            "properties": [
            ],
            "product_exists": true,
            "fulfillable_quantity": 0,
            "total_discount": "0.00",
            "fulfillment_status": "fulfilled",
            "tax_lines": [
            ]
          }
        ]
      }
    ],
    "refunds": [
    ],
    "customer": {
      "id": 1073339463,
      "email": "[email protected]",
      "accepts_marketing": false,
      "created_on": "2015-12-08T11:41:00Z",
      "modified_on": "2015-12-08T11:41:00Z",
      "first_name": null,
      "last_name": null,
      "orders_count": 1,
      "state": "disabled",
      "total_spent": "0.00",
      "last_order_id": 1073459967,
      "note": null,
      "verified_email": true,
      "multipass_identifier": null,
      "tax_exempt": false,
      "tags": "",
      "last_order_name": "#1002"
    }
  }
}

Tạo một Order có trạng thái thanh toán là pending với một khách hàng xác định

POST /admin/orders.json
{
  "order": {
    "line_items": [
      {
        "variant_id": 447654529,
        "quantity": 1
      }
    ],
    "customer": {
      "id": 207119551
    }
  }
}
Xem kết quả
HTTP/1.1 201 Created
{
  "order": {
    "id": 1073459968,
    "email": "[email protected]",
    "closed_on": null,
    "created_on": "2015-12-08T11:41:00Z",
    "modified_on": "2015-12-08T11:41:00Z",
    "number": 2,
    "note": null,
    "token": "980803c487a961faa7fabf045f4ee83b",
    "gateway": "",
    "test": false,
    "total_price": "199.00",
    "subtotal_price": "199.00",
    "total_weight": 0,
    "total_tax": "0.00",
    "taxes_included": false,
    "currency": "USD",
    "financial_status": "pending",
    "confirmed": true,
    "total_discounts": "0.00",
    "total_line_items_price": "199.00",
    "cart_token": null,
    "buyer_accepts_marketing": false,
    "name": "#1002",
    "referring_site": null,
    "landing_site": null,
    "cancelled_on": null,
    "cancel_reason": null,
    "total_price_usd": "199.00",
    "checkout_token": null,
    "reference": null,
    "user_id": null,
    "location_id": null,
    "source_identifier": null,
    "source_url": null,
    "processed_on": "2015-12-08T11:41:00Z",
    "device_id": null,
    "browser_ip": null,
    "landing_site_ref": null,
    "order_number": 1002,
    "discount_codes": [
    ],
    "note_attributes": [
    ],
    "payment_gateway_names": [
    ],
    "processing_method": "",
    "checkout_id": null,
    "source_name": "755357713",
    "fulfillment_status": null,
    "tax_lines": [
    ],
    "tags": "",
    "contact_email": "[email protected]",
    "line_items": [
      {
        "id": 1071823178,
        "variant_id": 447654529,
        "title": "IPod Touch 8GB",
        "quantity": 1,
        "price": "199.00",
        "grams": 200,
        "sku": "IPOD2009BLACK",
        "variant_title": "Black",
        "vendor": null,
        "fulfillment_service": "manual",
        "product_id": 921728736,
        "requires_shipping": true,
        "taxable": true,
        "gift_card": false,
        "name": "IPod Touch 8GB - Black",
        "variant_inventory_management": "bizweb",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 1,
        "total_discount": "0.00",
        "fulfillment_status": null,
        "tax_lines": [
        ]
      }
    ],
    "shipping_lines": [
    ],
    "fulfillments": [
    ],
    "refunds": [
    ],
    "customer": {
      "id": 207119551,
      "email": "[email protected]",
      "accepts_marketing": false,
      "created_on": "2015-12-08T11:40:19Z",
      "modified_on": "2015-12-08T11:41:01Z",
      "first_name": "Bob",
      "last_name": "Norman",
      "orders_count": 2,
      "state": "disabled",
      "total_spent": "41.94",
      "last_order_id": 1073459968,
      "note": null,
      "verified_email": true,
      "multipass_identifier": null,
      "tax_exempt": false,
      "tags": "",
      "last_order_name": "#1002",
      "default_address": {
        "id": 207119551,
        "first_name": null,
        "last_name": null,
        "company": null,
        "address1": "Chestnut Street 92",
        "address2": "",
        "city": "Louisville",
        "province": "Kentucky",
        "country": "United States",
        "zip": "40202",
        "phone": "555-625-1199",
        "name": "",
        "province_code": "KY",
        "country_code": "US",
        "country_name": "United States",
        "default": true
      }
    }
  }
}

Tạo một Order với Id của Product Variant.

POST /admin/orders.json
{
  "order": {
    "line_items": [
      {
        "variant_id": 447654529,
        "quantity": 1
      }
    ]
  }
}
Xem kết quả
HTTP/1.1 201 Created
{
  "order": {
    "id": 1073459969,
    "email": "",
    "closed_on": null,
    "created_on": "2015-12-08T11:41:03Z",
    "modified_on": "2015-12-08T11:41:03Z",
    "number": 2,
    "note": null,
    "token": "ddfa8b852e3afc7dd601448071938991",
    "gateway": "",
    "test": false,
    "total_price": "199.00",
    "subtotal_price": "199.00",
    "total_weight": 0,
    "total_tax": "0.00",
    "taxes_included": false,
    "currency": "USD",
    "financial_status": "paid",
    "confirmed": true,
    "total_discounts": "0.00",
    "total_line_items_price": "199.00",
    "cart_token": null,
    "buyer_accepts_marketing": false,
    "name": "#1002",
    "referring_site": null,
    "landing_site": null,
    "cancelled_on": null,
    "cancel_reason": null,
    "total_price_usd": "199.00",
    "checkout_token": null,
    "reference": null,
    "user_id": null,
    "location_id": null,
    "source_identifier": null,
    "source_url": null,
    "processed_on": "2015-12-08T11:41:03Z",
    "device_id": null,
    "browser_ip": null,
    "landing_site_ref": null,
    "order_number": 1002,
    "discount_codes": [
    ],
    "note_attributes": [
    ],
    "payment_gateway_names": [
    ],
    "processing_method": "",
    "checkout_id": null,
    "source_name": "755357713",
    "fulfillment_status": null,
    "tax_lines": [
    ],
    "tags": "",
    "contact_email": null,
    "line_items": [
      {
        "id": 1071823179,
        "variant_id": 447654529,
        "title": "IPod Touch 8GB",
        "quantity": 1,
        "price": "199.00",
        "grams": 200,
        "sku": "IPOD2009BLACK",
        "variant_title": "Black",
        "vendor": null,
        "fulfillment_service": "manual",
        "product_id": 921728736,
        "requires_shipping": true,
        "taxable": true,
        "gift_card": false,
        "name": "IPod Touch 8GB - Black",
        "variant_inventory_management": "bizweb",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 1,
        "total_discount": "0.00",
        "fulfillment_status": null,
        "tax_lines": [
        ]
      }
    ],
    "shipping_lines": [
    ],
    "fulfillments": [
    ],
    "refunds": [
    ]
  }
}

Tạo một Order có sử dụng mã giảm giá.

POST /admin/orders.json
{
  "order": {
    "line_items": [
      {
        "variant_id": 447654529,
        "quantity": 1
      }
    ],
    "discount_codes": [
      {
        "amount": 10.00,
        "code": "DISCOUNT",
        "type": "fixed_amount"
      }
    ]
  }
}
Xem kết quả
HTTP/1.1 201 Created
{
    "order": {
      "id": 1073459969,
      "email": "",
      "closed_on": null,
      "created_on": "2015-12-08T11:41:03Z",
      "modified_on": "2015-12-08T11:41:03Z",
      "number": 2,
      "note": null,
      "token": "ddfa8b852e3afc7dd601448071938991",
      "gateway": "",
      "test": false,
      "total_price": "189.00",
      "subtotal_price": "189.00",
      "total_weight": 0,
      "total_tax": "0.00",
      "taxes_included": false,
      "currency": "USD",
      "financial_status": "paid",
      "confirmed": true,
      "total_discounts": "10.00",
      "total_line_items_price": "199.00",
      "cart_token": null,
      "buyer_accepts_marketing": false,
      "name": "#1002",
      "referring_site": null,
      "landing_site": null,
      "cancelled_on": null,
      "cancel_reason": null,
      "total_price_usd": "189.00",
      "checkout_token": null,
      "reference": null,
      "user_id": null,
      "location_id": null,
      "source_identifier": null,
      "source_url": null,
      "processed_on": "2015-12-08T11:41:03Z",
      "device_id": null,
      "browser_ip": null,
      "landing_site_ref": null,
      "order_number": 1002,
      "discount_codes": [
        {
          "code": "DISCOUNT",
          "amount": 10.00,
          "type": "fixed_amount",
          "custom": true
        }
      ],
      "note_attributes": [
      ],
      "payment_gateway_names": [
      ],
      "processing_method": "",
      "checkout_id": null,
      "source_name": "755357713",
      "fulfillment_status": null,
      "tax_lines": [
      ],
      "tags": "",
      "contact_email": null,
      "line_items": [
        {
          "id": 1071823179,
          "variant_id": 447654529,
          "title": "IPod Touch 8GB",
          "quantity": 1,
          "price": "199.00",
          "grams": 200,
          "sku": "IPOD2009BLACK",
          "variant_title": "Black",
          "vendor": null,
          "fulfillment_service": "manual",
          "product_id": 921728736,
          "requires_shipping": true,
          "taxable": true,
          "gift_card": false,
          "name": "IPod Touch 8GB - Black",
          "variant_inventory_management": "bizweb",
          "properties": [
          ],
          "product_exists": true,
          "fulfillable_quantity": 1,
          "total_discount": "0.00",
          "fulfillment_status": null,
          "tax_lines": [
          ]
        }
      ],
      "shipping_lines": [
      ],
      "fulfillments": [
      ],
      "refunds": [
      ]
    }
  }

Tạo một Order được thanh toán một phần với một khách hàng mới và địa chỉ mới

POST /admin/orders.json
{
  "order": {
    "line_items": [
      {
        "variant_id": 447654529,
        "quantity": 1
      }
    ],
    "customer": {
      "phone": null,
      "email": "[email protected]"
    },
    "billing_address": {
      "first_name": "John",
      "last_name": "Smith",
      "address1": "123 Fake Street",
      "phone": "555-555-5555",
      "city": "Fakecity",
      "province": "Ontario",
      "country": "Canada",
      "zip": "K2P 1L4"
    },
    "shipping_address": {
      "first_name": "Jane",
      "last_name": "Smith",
      "address1": "123 Fake Street",
      "phone": "777-777-7777",
      "city": "Fakecity",
      "province": "Ontario",
      "country": "Canada",
      "zip": "K2P 1L4"
    },
    "email": "[email protected]",
    "transactions": [
      {
        "kind": "sale",
        "status": "success",
        "amount": 50.0
      }
    ]
  }
}
Xem kết quả
HTTP/1.1 201 Created
{
  "order": {
    "id": 1073459970,
    "email": "[email protected]",
    "closed_on": null,
    "created_on": "2015-12-08T11:41:06Z",
    "modified_on": "2015-12-08T11:41:06Z",
    "number": 2,
    "note": null,
    "token": "fb8dc3ef9b8eb284f786316e2702bd89",
    "gateway": "",
    "test": false,
    "total_price": "199.00",
    "subtotal_price": "199.00",
    "total_weight": 0,
    "total_tax": "0.00",
    "taxes_included": false,
    "currency": "USD",
    "financial_status": "partially_paid",
    "confirmed": true,
    "total_discounts": "0.00",
    "total_line_items_price": "199.00",
    "cart_token": null,
    "buyer_accepts_marketing": false,
    "name": "#1002",
    "referring_site": null,
    "landing_site": null,
    "cancelled_on": null,
    "cancel_reason": null,
    "total_price_usd": "199.00",
    "checkout_token": null,
    "reference": null,
    "user_id": null,
    "location_id": null,
    "source_identifier": null,
    "source_url": null,
    "processed_on": "2015-12-08T11:41:06Z",
    "device_id": null,
    "browser_ip": null,
    "landing_site_ref": null,
    "order_number": 1002,
    "discount_codes": [
    ],
    "note_attributes": [
    ],
    "payment_gateway_names": [
      ""
    ],
    "processing_method": "",
    "checkout_id": null,
    "source_name": "755357713",
    "fulfillment_status": null,
    "tax_lines": [
    ],
    "tags": "",
    "contact_email": "[email protected]",
    "line_items": [
      {
        "id": 1071823180,
        "variant_id": 447654529,
        "title": "IPod Touch 8GB",
        "quantity": 1,
        "price": "199.00",
        "grams": 200,
        "sku": "IPOD2009BLACK",
        "variant_title": "Black",
        "vendor": null,
        "fulfillment_service": "manual",
        "product_id": 921728736,
        "requires_shipping": true,
        "taxable": true,
        "gift_card": false,
        "name": "IPod Touch 8GB - Black",
        "variant_inventory_management": "bizweb",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 1,
        "total_discount": "0.00",
        "fulfillment_status": null,
        "tax_lines": [
        ]
      }
    ],
    "shipping_lines": [
    ],
    "billing_address": {
      "first_name": "John",
      "address1": "123 Fake Street",
      "phone": "555-555-5555",
      "city": "Fakecity",
      "zip": "K2P 1L4",
      "province": "Ontario",
      "country": "Canada",
      "last_name": "Smith",
      "address2": null,
      "company": null,
      "latitude": null,
      "longitude": null,
      "name": "John Smith",
      "country_code": "CA",
      "province_code": "ON"
    },
    "shipping_address": {
      "first_name": "Jane",
      "address1": "123 Fake Street",
      "phone": "777-777-7777",
      "city": "Fakecity",
      "zip": "K2P 1L4",
      "province": "Ontario",
      "country": "Canada",
      "last_name": "Smith",
      "address2": null,
      "company": null,
      "latitude": null,
      "longitude": null,
      "name": "Jane Smith",
      "country_code": "CA",
      "province_code": "ON"
    },
    "fulfillments": [
    ],
    "refunds": [
    ],
    "customer": {
      "id": 1073339464,
      "email": "[email protected]",
      "accepts_marketing": false,
      "created_on": "2015-12-08T11:41:06Z",
      "modified_on": "2015-12-08T11:41:06Z",
      "first_name": "John",
      "last_name": "Smith",
      "orders_count": 1,
      "state": "disabled",
      "total_spent": "0.00",
      "last_order_id": 1073459970,
      "note": null,
      "verified_email": true,
      "multipass_identifier": null,
      "tax_exempt": false,
      "tags": "",
      "last_order_name": "#1002",
      "default_address": {
        "id": 1053317304,
        "first_name": "Jane",
        "last_name": "Smith",
        "company": null,
        "address1": "123 Fake Street",
        "address2": null,
        "city": "Fakecity",
        "province": "Ontario",
        "country": "Canada",
        "zip": "K2P 1L4",
        "phone": "777-777-7777",
        "name": "Jane Smith",
        "province_code": "ON",
        "country_code": "CA",
        "country_name": "Canada",
        "default": true
      }
    }
  }
}

Tạo một Order với nhiều thông tin hơn

POST /admin/orders.json
{
  "order": {
    "line_items": [
      {
        "title": "Big Brown Bear Boots",
        "price": 74.99,
        "grams": "1300",
        "quantity": 3
      }
    ],
    "tax_lines": [
      {
        "price": 13.5,
        "rate": 0.06,
        "title": "State tax"
      }
    ],
    "transactions": [
      {
        "kind": "sale",
        "status": "success",
        "amount": 238.47
      }
    ],
    "total_tax": 13.5,
    "currency": "EUR"
  }
}
Xem kết quả
HTTP/1.1 201 Created
{
  "order": {
    "id": 1073459971,
    "email": "",
    "closed_on": null,
    "created_on": "2015-12-08T11:41:08Z",
    "modified_on": "2015-12-08T11:41:08Z",
    "number": 2,
    "note": null,
    "token": "53ffe4c6e40cb4a0b5af067de982d478",
    "gateway": "",
    "test": false,
    "total_price": "238.47",
    "subtotal_price": "224.97",
    "total_weight": 0,
    "total_tax": "13.50",
    "taxes_included": false,
    "currency": "EUR",
    "financial_status": "paid",
    "confirmed": true,
    "total_discounts": "0.00",
    "total_line_items_price": "224.97",
    "cart_token": null,
    "buyer_accepts_marketing": false,
    "name": "#1002",
    "referring_site": null,
    "landing_site": null,
    "cancelled_on": null,
    "cancel_reason": null,
    "total_price_usd": "340.54",
    "checkout_token": null,
    "reference": null,
    "user_id": null,
    "location_id": null,
    "source_identifier": null,
    "source_url": null,
    "processed_on": "2015-12-08T11:41:08Z",
    "device_id": null,
    "browser_ip": null,
    "landing_site_ref": null,
    "order_number": 1002,
    "discount_codes": [
    ],
    "note_attributes": [
    ],
    "payment_gateway_names": [
      ""
    ],
    "processing_method": "",
    "checkout_id": null,
    "source_name": "755357713",
    "fulfillment_status": null,
    "tax_lines": [
      {
        "title": "State tax",
        "price": "13.50",
        "rate": 0.06
      }
    ],
    "tags": "",
    "contact_email": null,
    "line_items": [
      {
        "id": 1071823181,
        "variant_id": null,
        "title": "Big Brown Bear Boots",
        "quantity": 3,
        "price": "74.99",
        "grams": 1300,
        "sku": null,
        "variant_title": null,
        "vendor": null,
        "fulfillment_service": "manual",
        "product_id": null,
        "requires_shipping": true,
        "taxable": true,
        "gift_card": false,
        "name": "Big Brown Bear Boots",
        "variant_inventory_management": null,
        "properties": [
        ],
        "product_exists": false,
        "fulfillable_quantity": 3,
        "total_discount": "0.00",
        "fulfillment_status": null,
        "tax_lines": [
        ]
      }
    ],
    "shipping_lines": [
    ],
    "fulfillments": [
    ],
    "refunds": [
    ]
  }
}

Bài viết trên có hữu ích cho bạn không?

Hữu ích Không hữu ích
Số lượt đánh giá hữu ích: