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

api-reference
tai-lieu-api
tai-lieu-nha-phat-trien

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

POST/admin/orders/450789469/close.json

Lưu trữ một Order

Lưu trữ một Order

POST /admin/orders/#{id}/close.json
{}
Xem kết quả
HTTP/1.1 200 OK
{
  "order": {
    "id": 450789469,
    "email": "[email protected]",
    "closed_on": "2015-12-08T11:40:57Z",
    "created_on": "2008-01-10T11:00:00Z",
    "modified_on": "2015-12-08T11:40:57Z",
    "number": 1,
    "note": null,
    "token": "b1946ac92492d2347c6235b4d2611184",
    "gateway": "authorize_net",
    "test": false,
    "total_price": "409.94",
    "subtotal_price": "398.00",
    "total_weight": 0,
    "total_tax": "11.94",
    "taxes_included": false,
    "currency": "USD",
    "financial_status": "authorized",
    "confirmed": true,
    "total_discounts": "0.00",
    "total_line_items_price": "398.00",
    "cart_token": "68778783ad298f1c80c3bafcddeea02f",
    "buyer_accepts_marketing": false,
    "name": "#1001",
    "referring_site": "http:\/\/www.otherexample.com",
    "landing_site": "http:\/\/www.example.com?source=abc",
    "cancelled_on": null,
    "cancel_reason": null,
    "total_price_usd": "409.94",
    "checkout_token": null,
    "reference": "fhwdgads",
    "user_id": null,
    "location_id": null,
    "source_identifier": "fhwdgads",
    "source_url": null,
    "processed_on": "2008-01-10T11:00:00Z",
    "device_id": null,
    "browser_ip": null,
    "landing_site_ref": "abc",
    "order_number": 1001,
    "discount_codes": [
      {
        "code": "TENOFF",
        "amount": "10.00",
        "type": "percentage"
      }
    ],
    "note_attributes": [
      {
        "name": "custom engraving",
        "value": "Happy Birthday"
      },
      {
        "name": "colour",
        "value": "green"
      }
    ],
    "payment_gateway_names": [
      "bogus"
    ],
    "processing_method": "direct",
    "checkout_id": 450789469,
    "source_name": "web",
    "fulfillment_status": null,
    "tax_lines": [
      {
        "title": "State Tax",
        "price": "11.94",
        "rate": 0.06
      }
    ],
    "tags": "",
    "contact_email": "[email protected]",
    "line_items": [
      {
        "id": 466157049,
        "variant_id": 39072856,
        "title": "IPod Nano - 8gb",
        "quantity": 1,
        "price": "199.00",
        "grams": 200,
        "sku": "IPOD2008GREEN",
        "variant_title": "green",
        "vendor": null,
        "fulfillment_service": "manual",
        "product_id": 632910392,
        "requires_shipping": true,
        "taxable": true,
        "gift_card": false,
        "name": "IPod Nano - 8gb - green",
        "variant_inventory_management": "bizweb",
        "properties": [
          {
            "name": "Custom Engraving Front",
            "value": "Happy Birthday"
          },
          {
            "name": "Custom Engraving Back",
            "value": "Merry Christmas"
          }
        ],
        "product_exists": true,
        "fulfillable_quantity": 1,
        "total_discount": "0.00",
        "fulfillment_status": null,
        "tax_lines": [
        ]
      },
      {
        "id": 518995019,
        "variant_id": 49148385,
        "title": "IPod Nano - 8gb",
        "quantity": 1,
        "price": "199.00",
        "grams": 200,
        "sku": "IPOD2008RED",
        "variant_title": "red",
        "vendor": null,
        "fulfillment_service": "manual",
        "product_id": 632910392,
        "requires_shipping": true,
        "taxable": true,
        "gift_card": false,
        "name": "IPod Nano - 8gb - red",
        "variant_inventory_management": "bizweb",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 1,
        "total_discount": "0.00",
        "fulfillment_status": null,
        "tax_lines": [
        ]
      },
      {
        "id": 703073504,
        "variant_id": 457924702,
        "title": "IPod Nano - 8gb",
        "quantity": 1,
        "price": "199.00",
        "grams": 200,
        "sku": "IPOD2008BLACK",
        "variant_title": "black",
        "vendor": null,
        "fulfillment_service": "manual",
        "product_id": 632910392,
        "requires_shipping": true,
        "taxable": true,
        "gift_card": false,
        "name": "IPod Nano - 8gb - black",
        "variant_inventory_management": "bizweb",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 1,
        "total_discount": "0.00",
        "fulfillment_status": null,
        "tax_lines": [
        ]
      }
    ],
    "shipping_lines": [
      {
        "title": "Free Shipping",
        "price": "0.00",
        "code": "Free Shipping",
        "source": "bizweb",
        "phone": null,
        "tax_lines": [
        ]
      }
    ],
    "billing_address": {
      "first_name": "Bob",
      "address1": "Chestnut Street 92",
      "phone": "555-625-1199",
      "city": "Louisville",
      "zip": "40202",
      "province": "Kentucky",
      "country": "United States",
      "last_name": "Norman",
      "address2": "",
      "company": null,
      "latitude": 45.41634,
      "longitude": -75.6868,
      "name": "Bob Norman",
      "country_code": "US",
      "province_code": "KY"
    },
    "shipping_address": {
      "first_name": "Bob",
      "address1": "Chestnut Street 92",
      "phone": "555-625-1199",
      "city": "Louisville",
      "zip": "40202",
      "province": "Kentucky",
      "country": "United States",
      "last_name": "Norman",
      "address2": "",
      "company": null,
      "latitude": 45.41634,
      "longitude": -75.6868,
      "name": "Bob Norman",
      "country_code": "US",
      "province_code": "KY"
    },
    "fulfillments": [
      {
        "id": 255858046,
        "order_id": 450789469,
        "status": "failure",
        "created_on": "2015-12-08T11:40:19Z",
        "service": "manual",
        "modified_on": "2015-12-08T11:40:19Z",
        "tracking_company": null,
        "tracking_number": "1Z2345",
        "tracking_numbers": [
          "1Z2345"
        ],
        "tracking_url": "http:\/\/wwwapps.ups.com\/etracking\/tracking.cgi?InquiryNumber1=1Z2345&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track",
        "tracking_urls": [
          "http:\/\/wwwapps.ups.com\/etracking\/tracking.cgi?InquiryNumber1=1Z2345&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track"
        ],
        "receipt": {
          "testcase": true,
          "authorization": "123456"
        },
        "line_items": [
          {
            "id": 466157049,
            "variant_id": 39072856,
            "title": "IPod Nano - 8gb",
            "quantity": 1,
            "price": "199.00",
            "grams": 200,
            "sku": "IPOD2008GREEN",
            "variant_title": "green",
            "vendor": null,
            "fulfillment_service": "manual",
            "product_id": 632910392,
            "requires_shipping": true,
            "taxable": true,
            "gift_card": false,
            "name": "IPod Nano - 8gb - green",
            "variant_inventory_management": "bizweb",
            "properties": [
              {
                "name": "Custom Engraving Front",
                "value": "Happy Birthday"
              },
              {
                "name": "Custom Engraving Back",
                "value": "Merry Christmas"
              }
            ],
            "product_exists": true,
            "fulfillable_quantity": 1,
            "total_discount": "0.00",
            "fulfillment_status": null,
            "tax_lines": [
            ]
          }
        ]
      }
    ],
    "client_details": {
      "browser_ip": "0.0.0.0",
      "accept_language": null,
      "user_agent": null,
      "session_hash": null,
      "browser_width": null,
      "browser_height": null
    },
    "refunds": [
      {
        "id": 509562969,
        "order_id": 450789469,
        "created_on": "2015-12-08T11:40:19Z",
        "note": "it broke during shipping",
        "restock": true,
        "user_id": 799407056,
        "refund_line_items": [
          {
            "id": 104689539,
            "quantity": 1,
            "line_item_id": 703073504,
            "line_item": {
              "id": 703073504,
              "variant_id": 457924702,
              "title": "IPod Nano - 8gb",
              "quantity": 1,
              "price": "199.00",
              "grams": 200,
              "sku": "IPOD2008BLACK",
              "variant_title": "black",
              "vendor": null,
              "fulfillment_service": "manual",
              "product_id": 632910392,
              "requires_shipping": true,
              "taxable": true,
              "gift_card": false,
              "name": "IPod Nano - 8gb - black",
              "variant_inventory_management": "bizweb",
              "properties": [
              ],
              "product_exists": true,
              "fulfillable_quantity": 1,
              "total_discount": "0.00",
              "fulfillment_status": null,
              "tax_lines": [
              ]
            }
          },
          {
            "id": 709875399,
            "quantity": 1,
            "line_item_id": 466157049,
            "line_item": {
              "id": 466157049,
              "variant_id": 39072856,
              "title": "IPod Nano - 8gb",
              "quantity": 1,
              "price": "199.00",
              "grams": 200,
              "sku": "IPOD2008GREEN",
              "variant_title": "green",
              "vendor": null,
              "fulfillment_service": "manual",
              "product_id": 632910392,
              "requires_shipping": true,
              "taxable": true,
              "gift_card": false,
              "name": "IPod Nano - 8gb - green",
              "variant_inventory_management": "bizweb",
              "properties": [
                {
                  "name": "Custom Engraving Front",
                  "value": "Happy Birthday"
                },
                {
                  "name": "Custom Engraving Back",
                  "value": "Merry Christmas"
                }
              ],
              "product_exists": true,
              "fulfillable_quantity": 1,
              "total_discount": "0.00",
              "fulfillment_status": null,
              "tax_lines": [
              ]
            }
          }
        ],
        "transactions": [
          {
            "id": 179259969,
            "order_id": 450789469,
            "amount": "209.00",
            "kind": "refund",
            "gateway": "bogus",
            "status": "success",
            "message": null,
            "created_on": "2005-08-05T12:59:12Z",
            "test": false,
            "authorization": "authorization-key",
            "currency": "USD",
            "location_id": null,
            "user_id": null,
            "parent_id": null,
            "device_id": null,
            "receipt": {},
            "error_code": null,
            "source_name": "web"
          }
        ],
        "order_adjustments": [
        ]
      }
    ],
    "payment_details": {
      "credit_card_bin": null,
      "avs_result_code": null,
      "cvv_result_code": null,
      "credit_card_number": "•••• •••• •••• 4242",
      "credit_card_company": "Visa"
    },
    "customer": {
      "id": 207119551,
      "email": "[email protected]",
      "accepts_marketing": false,
      "created_on": "2015-12-08T11:40:19Z",
      "modified_on": "2015-12-08T11:40:19Z",
      "first_name": "Bob",
      "last_name": "Norman",
      "orders_count": 1,
      "state": "disabled",
      "total_spent": "41.94",
      "last_order_id": 450789469,
      "note": null,
      "verified_email": true,
      "multipass_identifier": null,
      "tax_exempt": false,
      "tags": "",
      "last_order_name": "#1001",
      "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
      }
    }
  }
}
POST/admin/orders/450789469/open.json

Bỏ lưu trữ một Order

Bỏ lưu trữ một Order

POST /admin/orders/#{id}/open.json
{}
Xem kết quả
HTTP/1.1 200 OK
{
  "order": {
    "id": 450789469,
    "email": "[email protected]",
    "closed_on": null,
    "created_on": "2008-01-10T11:00:00Z",
    "modified_on": "2015-12-08T11:41:02Z",
    "number": 1,
    "note": null,
    "token": "b1946ac92492d2347c6235b4d2611184",
    "gateway": "authorize_net",
    "test": false,
    "total_price": "409.94",
    "subtotal_price": "398.00",
    "total_weight": 0,
    "total_tax": "11.94",
    "taxes_included": false,
    "currency": "USD",
    "financial_status": "authorized",
    "confirmed": true,
    "total_discounts": "0.00",
    "total_line_items_price": "398.00",
    "cart_token": "68778783ad298f1c80c3bafcddeea02f",
    "buyer_accepts_marketing": false,
    "name": "#1001",
    "referring_site": "http:\/\/www.otherexample.com",
    "landing_site": "http:\/\/www.example.com?source=abc",
    "cancelled_on": null,
    "cancel_reason": null,
    "total_price_usd": "409.94",
    "checkout_token": null,
    "reference": "fhwdgads",
    "user_id": null,
    "location_id": null,
    "source_identifier": "fhwdgads",
    "source_url": null,
    "processed_on": "2008-01-10T11:00:00Z",
    "device_id": null,
    "browser_ip": null,
    "landing_site_ref": "abc",
    "order_number": 1001,
    "discount_codes": [
      {
        "code": "TENOFF",
        "amount": "10.00",
        "type": "percentage"
      }
    ],
    "note_attributes": [
      {
        "name": "custom engraving",
        "value": "Happy Birthday"
      },
      {
        "name": "colour",
        "value": "green"
      }
    ],
    "payment_gateway_names": [
      "bogus"
    ],
    "processing_method": "direct",
    "checkout_id": 450789469,
    "source_name": "web",
    "fulfillment_status": null,
    "tax_lines": [
      {
        "title": "State Tax",
        "price": "11.94",
        "rate": 0.06
      }
    ],
    "tags": "",
    "contact_email": "[email protected]",
    "line_items": [
      {
        "id": 466157049,
        "variant_id": 39072856,
        "title": "IPod Nano - 8gb",
        "quantity": 1,
        "price": "199.00",
        "grams": 200,
        "sku": "IPOD2008GREEN",
        "variant_title": "green",
        "vendor": null,
        "fulfillment_service": "manual",
        "product_id": 632910392,
        "requires_shipping": true,
        "taxable": true,
        "gift_card": false,
        "name": "IPod Nano - 8gb - green",
        "variant_inventory_management": "bizweb",
        "properties": [
          {
            "name": "Custom Engraving Front",
            "value": "Happy Birthday"
          },
          {
            "name": "Custom Engraving Back",
            "value": "Merry Christmas"
          }
        ],
        "product_exists": true,
        "fulfillable_quantity": 1,
        "total_discount": "0.00",
        "fulfillment_status": null,
        "tax_lines": [
        ]
      },
      {
        "id": 518995019,
        "variant_id": 49148385,
        "title": "IPod Nano - 8gb",
        "quantity": 1,
        "price": "199.00",
        "grams": 200,
        "sku": "IPOD2008RED",
        "variant_title": "red",
        "vendor": null,
        "fulfillment_service": "manual",
        "product_id": 632910392,
        "requires_shipping": true,
        "taxable": true,
        "gift_card": false,
        "name": "IPod Nano - 8gb - red",
        "variant_inventory_management": "bizweb",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 1,
        "total_discount": "0.00",
        "fulfillment_status": null,
        "tax_lines": [
        ]
      },
      {
        "id": 703073504,
        "variant_id": 457924702,
        "title": "IPod Nano - 8gb",
        "quantity": 1,
        "price": "199.00",
        "grams": 200,
        "sku": "IPOD2008BLACK",
        "variant_title": "black",
        "vendor": null,
        "fulfillment_service": "manual",
        "product_id": 632910392,
        "requires_shipping": true,
        "taxable": true,
        "gift_card": false,
        "name": "IPod Nano - 8gb - black",
        "variant_inventory_management": "bizweb",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 1,
        "total_discount": "0.00",
        "fulfillment_status": null,
        "tax_lines": [
        ]
      }
    ],
    "shipping_lines": [
      {
        "title": "Free Shipping",
        "price": "0.00",
        "code": "Free Shipping",
        "source": "bizweb",
        "phone": null,
        "tax_lines": [
        ]
      }
    ],
    "billing_address": {
      "first_name": "Bob",
      "address1": "Chestnut Street 92",
      "phone": "555-625-1199",
      "city": "Louisville",
      "zip": "40202",
      "province": "Kentucky",
      "country": "United States",
      "last_name": "Norman",
      "address2": "",
      "company": null,
      "latitude": 45.41634,
      "longitude": -75.6868,
      "name": "Bob Norman",
      "country_code": "US",
      "province_code": "KY"
    },
    "shipping_address": {
      "first_name": "Bob",
      "address1": "Chestnut Street 92",
      "phone": "555-625-1199",
      "city": "Louisville",
      "zip": "40202",
      "province": "Kentucky",
      "country": "United States",
      "last_name": "Norman",
      "address2": "",
      "company": null,
      "latitude": 45.41634,
      "longitude": -75.6868,
      "name": "Bob Norman",
      "country_code": "US",
      "province_code": "KY"
    },
    "fulfillments": [
      {
        "id": 255858046,
        "order_id": 450789469,
        "status": "failure",
        "created_on": "2015-12-08T11:40:19Z",
        "service": "manual",
        "modified_on": "2015-12-08T11:40:19Z",
        "tracking_company": null,
        "tracking_number": "1Z2345",
        "tracking_numbers": [
          "1Z2345"
        ],
        "tracking_url": "http:\/\/wwwapps.ups.com\/etracking\/tracking.cgi?InquiryNumber1=1Z2345&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track",
        "tracking_urls": [
          "http:\/\/wwwapps.ups.com\/etracking\/tracking.cgi?InquiryNumber1=1Z2345&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track"
        ],
        "receipt": {
          "testcase": true,
          "authorization": "123456"
        },
        "line_items": [
          {
            "id": 466157049,
            "variant_id": 39072856,
            "title": "IPod Nano - 8gb",
            "quantity": 1,
            "price": "199.00",
            "grams": 200,
            "sku": "IPOD2008GREEN",
            "variant_title": "green",
            "vendor": null,
            "fulfillment_service": "manual",
            "product_id": 632910392,
            "requires_shipping": true,
            "taxable": true,
            "gift_card": false,
            "name": "IPod Nano - 8gb - green",
            "variant_inventory_management": "bizweb",
            "properties": [
              {
                "name": "Custom Engraving Front",
                "value": "Happy Birthday"
              },
              {
                "name": "Custom Engraving Back",
                "value": "Merry Christmas"
              }
            ],
            "product_exists": true,
            "fulfillable_quantity": 1,
            "total_discount": "0.00",
            "fulfillment_status": null,
            "tax_lines": [
            ]
          }
        ]
      }
    ],
    "client_details": {
      "browser_ip": "0.0.0.0",
      "accept_language": null,
      "user_agent": null,
      "session_hash": null,
      "browser_width": null,
      "browser_height": null
    },
    "refunds": [
      {
        "id": 509562969,
        "order_id": 450789469,
        "created_on": "2015-12-08T11:40:19Z",
        "note": "it broke during shipping",
        "restock": true,
        "user_id": 799407056,
        "refund_line_items": [
          {
            "id": 104689539,
            "quantity": 1,
            "line_item_id": 703073504,
            "line_item": {
              "id": 703073504,
              "variant_id": 457924702,
              "title": "IPod Nano - 8gb",
              "quantity": 1,
              "price": "199.00",
              "grams": 200,
              "sku": "IPOD2008BLACK",
              "variant_title": "black",
              "vendor": null,
              "fulfillment_service": "manual",
              "product_id": 632910392,
              "requires_shipping": true,
              "taxable": true,
              "gift_card": false,
              "name": "IPod Nano - 8gb - black",
              "variant_inventory_management": "bizweb",
              "properties": [
              ],
              "product_exists": true,
              "fulfillable_quantity": 1,
              "total_discount": "0.00",
              "fulfillment_status": null,
              "tax_lines": [
              ]
            }
          },
          {
            "id": 709875399,
            "quantity": 1,
            "line_item_id": 466157049,
            "line_item": {
              "id": 466157049,
              "variant_id": 39072856,
              "title": "IPod Nano - 8gb",
              "quantity": 1,
              "price": "199.00",
              "grams": 200,
              "sku": "IPOD2008GREEN",
              "variant_title": "green",
              "vendor": null,
              "fulfillment_service": "manual",
              "product_id": 632910392,
              "requires_shipping": true,
              "taxable": true,
              "gift_card": false,
              "name": "IPod Nano - 8gb - green",
              "variant_inventory_management": "bizweb",
              "properties": [
                {
                  "name": "Custom Engraving Front",
                  "value": "Happy Birthday"
                },
                {
                  "name": "Custom Engraving Back",
                  "value": "Merry Christmas"
                }
              ],
              "product_exists": true,
              "fulfillable_quantity": 1,
              "total_discount": "0.00",
              "fulfillment_status": null,
              "tax_lines": [
              ]
            }
          }
        ],
        "transactions": [
          {
            "id": 179259969,
            "order_id": 450789469,
            "amount": "209.00",
            "kind": "refund",
            "gateway": "bogus",
            "status": "success",
            "message": null,
            "created_on": "2005-08-05T12:59:12Z",
            "test": false,
            "authorization": "authorization-key",
            "currency": "USD",
            "location_id": null,
            "user_id": null,
            "parent_id": null,
            "device_id": null,
            "receipt": {},
            "error_code": null,
            "source_name": "web"
          }
        ],
        "order_adjustments": [
        ]
      }
    ],
    "payment_details": {
      "credit_card_bin": null,
      "avs_result_code": null,
      "cvv_result_code": null,
      "credit_card_number": "•••• •••• •••• 4242",
      "credit_card_company": "Visa"
    },
    "customer": {
      "id": 207119551,
      "email": "[email protected]",
      "accepts_marketing": false,
      "created_on": "2015-12-08T11:40:19Z",
      "modified_on": "2015-12-08T11:40:19Z",
      "first_name": "Bob",
      "last_name": "Norman",
      "orders_count": 1,
      "state": "disabled",
      "total_spent": "41.94",
      "last_order_id": 450789469,
      "note": null,
      "verified_email": true,
      "multipass_identifier": null,
      "tax_exempt": false,
      "tags": "",
      "last_order_name": "#1001",
      "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
      }
    }
  }
}
POST/admin/orders/450789469/cancel.json

Hủy một Order

amount

Số lượng tiền Refund.

(mặc định: false)
restock

Hoàn kho các item của Order

(mặc định: false)
reason

Lí do hủy Order (customer, inventory, fraud, other)

(mặc định: other)
email

Gửi email tới khách hàng thông báo về việc hủy Order

(mặc định: false)

Hủy một Order

POST /admin/orders/#{id}/cancel.json
{"order_cancel":{}}
Xem kết quả
HTTP/1.1 200 OK
{
  "order": {
    "id": 450789469,
    "email": "[email protected]",
    "closed_on": null,
    "created_on": "2008-01-10T11:00:00Z",
    "modified_on": "2008-01-10T11:00:00Z",
    "number": 1,
    "note": null,
    "token": "b1946ac92492d2347c6235b4d2611184",
    "gateway": "authorize_net",
    "test": false,
    "total_price": "409.94",
    "subtotal_price": "398.00",
    "total_weight": 0,
    "total_tax": "11.94",
    "taxes_included": false,
    "currency": "USD",
    "financial_status": "authorized",
    "confirmed": false,
    "total_discounts": "0.00",
    "total_line_items_price": "398.00",
    "cart_token": "68778783ad298f1c80c3bafcddeea02f",
    "buyer_accepts_marketing": false,
    "name": "#1001",
    "referring_site": "http:\/\/www.otherexample.com",
    "landing_site": "http:\/\/www.example.com?source=abc",
    "cancelled_on": null,
    "cancel_reason": null,
    "total_price_usd": "409.94",
    "checkout_token": null,
    "reference": "fhwdgads",
    "user_id": null,
    "location_id": null,
    "source_identifier": "fhwdgads",
    "source_url": null,
    "processed_on": "2008-01-10T11:00:00Z",
    "device_id": null,
    "browser_ip": null,
    "landing_site_ref": "abc",
    "order_number": 1001,
    "discount_codes": [
      {
        "code": "TENOFF",
        "amount": "10.00",
        "type": "percentage"
      }
    ],
    "note_attributes": [
      {
        "name": "custom engraving",
        "value": "Happy Birthday"
      },
      {
        "name": "colour",
        "value": "green"
      }
    ],
    "payment_gateway_names": [
      "bogus"
    ],
    "processing_method": "direct",
    "checkout_id": 450789469,
    "source_name": "web",
    "fulfillment_status": null,
    "tax_lines": [
      {
        "title": "State Tax",
        "price": "11.94",
        "rate": 0.06
      }
    ],
    "tags": "",
    "contact_email": "[email protected]",
    "line_items": [
      {
        "id": 466157049,
        "variant_id": 39072856,
        "title": "IPod Nano - 8gb",
        "quantity": 1,
        "price": "199.00",
        "grams": 200,
        "sku": "IPOD2008GREEN",
        "variant_title": "green",
        "vendor": null,
        "fulfillment_service": "manual",
        "product_id": 632910392,
        "requires_shipping": true,
        "taxable": true,
        "gift_card": false,
        "name": "IPod Nano - 8gb - green",
        "variant_inventory_management": "bizweb",
        "properties": [
          {
            "name": "Custom Engraving Front",
            "value": "Happy Birthday"
          },
          {
            "name": "Custom Engraving Back",
            "value": "Merry Christmas"
          }
        ],
        "product_exists": true,
        "fulfillable_quantity": 1,
        "total_discount": "0.00",
        "fulfillment_status": null,
        "tax_lines": [
        ]
      },
      {
        "id": 518995019,
        "variant_id": 49148385,
        "title": "IPod Nano - 8gb",
        "quantity": 1,
        "price": "199.00",
        "grams": 200,
        "sku": "IPOD2008RED",
        "variant_title": "red",
        "vendor": null,
        "fulfillment_service": "manual",
        "product_id": 632910392,
        "requires_shipping": true,
        "taxable": true,
        "gift_card": false,
        "name": "IPod Nano - 8gb - red",
        "variant_inventory_management": "bizweb",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 1,
        "total_discount": "0.00",
        "fulfillment_status": null,
        "tax_lines": [
        ]
      },
      {
        "id": 703073504,
        "variant_id": 457924702,
        "title": "IPod Nano - 8gb",
        "quantity": 1,
        "price": "199.00",
        "grams": 200,
        "sku": "IPOD2008BLACK",
        "variant_title": "black",
        "vendor": null,
        "fulfillment_service": "manual",
        "product_id": 632910392,
        "requires_shipping": true,
        "taxable": true,
        "gift_card": false,
        "name": "IPod Nano - 8gb - black",
        "variant_inventory_management": "bizweb",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 1,
        "total_discount": "0.00",
        "fulfillment_status": null,
        "tax_lines": [
        ]
      }
    ],
    "shipping_lines": [
      {
        "title": "Free Shipping",
        "price": "0.00",
        "code": "Free Shipping",
        "source": "bizweb",
        "phone": null,
        "tax_lines": [
        ]
      }
    ],
    "billing_address": {
      "first_name": "Bob",
      "address1": "Chestnut Street 92",
      "phone": "555-625-1199",
      "city": "Louisville",
      "zip": "40202",
      "province": "Kentucky",
      "country": "United States",
      "last_name": "Norman",
      "address2": "",
      "company": null,
      "latitude": 45.41634,
      "longitude": -75.6868,
      "name": "Bob Norman",
      "country_code": "US",
      "province_code": "KY"
    },
    "shipping_address": {
      "first_name": "Bob",
      "address1": "Chestnut Street 92",
      "phone": "555-625-1199",
      "city": "Louisville",
      "zip": "40202",
      "province": "Kentucky",
      "country": "United States",
      "last_name": "Norman",
      "address2": "",
      "company": null,
      "latitude": 45.41634,
      "longitude": -75.6868,
      "name": "Bob Norman",
      "country_code": "US",
      "province_code": "KY"
    },
    "fulfillments": [
      {
        "id": 255858046,
        "order_id": 450789469,
        "status": "failure",
        "created_on": "2015-12-08T11:40:19Z",
        "service": "manual",
        "modified_on": "2015-12-08T11:40:19Z",
        "tracking_company": null,
        "tracking_number": "1Z2345",
        "tracking_numbers": [
          "1Z2345"
        ],
        "tracking_url": "http:\/\/wwwapps.ups.com\/etracking\/tracking.cgi?InquiryNumber1=1Z2345&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track",
        "tracking_urls": [
          "http:\/\/wwwapps.ups.com\/etracking\/tracking.cgi?InquiryNumber1=1Z2345&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track"
        ],
        "receipt": {
          "testcase": true,
          "authorization": "123456"
        },
        "line_items": [
          {
            "id": 466157049,
            "variant_id": 39072856,
            "title": "IPod Nano - 8gb",
            "quantity": 1,
            "price": "199.00",
            "grams": 200,
            "sku": "IPOD2008GREEN",
            "variant_title": "green",
            "vendor": null,
            "fulfillment_service": "manual",
            "product_id": 632910392,
            "requires_shipping": true,
            "taxable": true,
            "gift_card": false,
            "name": "IPod Nano - 8gb - green",
            "variant_inventory_management": "bizweb",
            "properties": [
              {
                "name": "Custom Engraving Front",
                "value": "Happy Birthday"
              },
              {
                "name": "Custom Engraving Back",
                "value": "Merry Christmas"
              }
            ],
            "product_exists": true,
            "fulfillable_quantity": 1,
            "total_discount": "0.00",
            "fulfillment_status": null,
            "tax_lines": [
            ]
          }
        ]
      }
    ],
    "client_details": {
      "browser_ip": "0.0.0.0",
      "accept_language": null,
      "user_agent": null,
      "session_hash": null,
      "browser_width": null,
      "browser_height": null
    },
    "refunds": [
      {
        "id": 509562969,
        "order_id": 450789469,
        "created_on": "2015-12-08T11:40:19Z",
        "note": "it broke during shipping",
        "restock": true,
        "user_id": 799407056,
        "refund_line_items": [
          {
            "id": 104689539,
            "quantity": 1,
            "line_item_id": 703073504,
            "line_item": {
              "id": 703073504,
              "variant_id": 457924702,
              "title": "IPod Nano - 8gb",
              "quantity": 1,
              "price": "199.00",
              "grams": 200,
              "sku": "IPOD2008BLACK",
              "variant_title": "black",
              "vendor": null,
              "fulfillment_service": "manual",
              "product_id": 632910392,
              "requires_shipping": true,
              "taxable": true,
              "gift_card": false,
              "name": "IPod Nano - 8gb - black",
              "variant_inventory_management": "bizweb",
              "properties": [
              ],
              "product_exists": true,
              "fulfillable_quantity": 1,
              "total_discount": "0.00",
              "fulfillment_status": null,
              "tax_lines": [
              ]
            }
          },
          {
            "id": 709875399,
            "quantity": 1,
            "line_item_id": 466157049,
            "line_item": {
              "id": 466157049,
              "variant_id": 39072856,
              "title": "IPod Nano - 8gb",
              "quantity": 1,
              "price": "199.00",
              "grams": 200,
              "sku": "IPOD2008GREEN",
              "variant_title": "green",
              "vendor": null,
              "fulfillment_service": "manual",
              "product_id": 632910392,
              "requires_shipping": true,
              "taxable": true,
              "gift_card": false,
              "name": "IPod Nano - 8gb - green",
              "variant_inventory_management": "bizweb",
              "properties": [
                {
                  "name": "Custom Engraving Front",
                  "value": "Happy Birthday"
                },
                {
                  "name": "Custom Engraving Back",
                  "value": "Merry Christmas"
                }
              ],
              "product_exists": true,
              "fulfillable_quantity": 1,
              "total_discount": "0.00",
              "fulfillment_status": null,
              "tax_lines": [
              ]
            }
          }
        ],
        "transactions": [
          {
            "id": 179259969,
            "order_id": 450789469,
            "amount": "209.00",
            "kind": "refund",
            "gateway": "bogus",
            "status": "success",
            "message": null,
            "created_on": "2005-08-05T12:59:12Z",
            "test": false,
            "authorization": "authorization-key",
            "currency": "USD",
            "location_id": null,
            "user_id": null,
            "parent_id": null,
            "device_id": null,
            "receipt": {},
            "error_code": null,
            "source_name": "web"
          }
        ],
        "order_adjustments": [
        ]
      }
    ],
    "payment_details": {
      "credit_card_bin": null,
      "avs_result_code": null,
      "cvv_result_code": null,
      "credit_card_number": "•••• •••• •••• 4242",
      "credit_card_company": "Visa"
    },
    "customer": {
      "id": 207119551,
      "email": "[email protected]",
      "accepts_marketing": false,
      "created_on": "2015-12-08T11:40:19Z",
      "modified_on": "2015-12-08T11:40:19Z",
      "first_name": "Bob",
      "last_name": "Norman",
      "orders_count": 1,
      "state": "disabled",
      "total_spent": "41.94",
      "last_order_id": 450789469,
      "note": null,
      "verified_email": true,
      "multipass_identifier": null,
      "tax_exempt": false,
      "tags": "",
      "last_order_name": "#1001",
      "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
      }
    }
  },
  "notice": "Order has been canceled."
}

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: