# Order

The Order API lets storefront JavaScript read and act on orders. Every endpoint that takes an order id needs a signed-in customer and works only on that customer's own orders. `POST /{locale}/api/order_verify` is the exception: it trades an order number and the email address on the order for the address of the order page, and an anonymous visitor can call it.

Every request other than `GET` must send an `X-CSRF-Token` header. See [Authentication](/docs/theme/references/ajax-api/customer#authentication) for how to read the token from the cookie.

All Ajax API requests should use [locale-aware URLs](/docs/theme/references/ajax-api/#locale-aware-urls) to give visitors a consistent experience.

## List a customer's orders

```text
GET /{locale}/api/orders.json
```

List the orders of the signed-in customer.

### Example request

**Example request**

```javascript
fetch(window.SHOPLAZZA.routes.root + '/api/orders.json?page=1&per_page=10')
  .then((response) => response.json())
  .then((data) => {
    // do something...
  });
```

### Request parameters

- `page` number

  The page of orders to return.
- `per_page` number

  The number of orders per page.

### Response

**Schema | Example**

- `order_list` object

  - `count` string

    Total number of orders.
  - `orders` object[]

    List of orders.

    *   Array \[

    - `id` string

      ID of the order.
    - `number` string

      Order number.
    - `payment_method` string

      Payment method used for the order, for example `credit_card`.
    - `financial_status` string

      Payment status of the order, for example `waiting`, `paid`.
    - `fulfillment_status` string

      Fulfillment status, for example `waiting`, `shipped`, `finished`.
    - `status` string

      Status of the order, for example `opened`, `placed`, `finished`.
    - `currency_code` string

      Currency code of the order, for example `USD`.
    - `fail_code` string
    - `shipping_address` object

      Shipping address of the order.

      - `address` string

        Street address of the recipient.
      - `address1` string

        Primary street address.
      - `area` string

        Area or district of the address.
      - `city` string

        City of the address.
      - `company` string

        Company name of the address.
      - `country` string

        Country name of the address.
      - `country_code` string

        ISO country code of the address.
      - `email` string

        Email address associated with the address.
      - `extra_info` object

        - `` object
      - `first_name` string

        First name of the customer or recipient.
      - `id` string

        ID of the address.
      - `last_name` string

        Last name of the customer or recipient.
      - `origin_id` string
      - `phone` string

        Phone number associated with the address.
      - `phone_area_code` string

        Area code of the phone number.
      - `province` string

        Province or state of the address.
      - `province_code` string

        Province or state code.
      - `zip` string

        Postal or ZIP code.
    - `post_sale_status` string

      After-sales status of the order.
    - `create_at` string

      Time when the order was created.
    - `customer_email` string

      Email address of the order's customer.
    - `customer_phone` string

      Phone number of the order's customer.
    - `customer_name` string

      Full name of the order's customer.
    - `customer_id` string

      ID of the order's customer.
    - `total` string

      Total price the customer pays, including tax, shipping and discounts.
    - `fulfillment_count` number

      Number of shipments created for the order.
    - `create_time` string

      Time when the order was created; same as `create_at`.
    - `allowed_actions` object

      Which actions the customer can perform on this order.

      - `delete_order` boolean

        Whether the order can be deleted.
      - `cancel_order` boolean

        Whether the order can be cancelled.
      - `repay_order` boolean

        Whether the order can be paid again.
      - `pay_order` boolean

        Whether the order can be paid.
      - `add_to_cart` boolean

        Whether the items of the order can be added to the cart again.
      - `download_invoice` boolean

        Whether an invoice can be downloaded for the order.
      - `finish_fulfillment` boolean

        Whether the customer can confirm receipt of the order.
    - `gift_card_total` string

      Total gift card amount applied to the order.
    - `paid_total` string

      Total amount already paid for the order.
    - `payment_due` string

      Amount of the order that is still unpaid.
    - `payment_progress` number

      Payment progress of the order; `3` means the order is fully paid.
    - `real_paid_total` string

      Amount actually paid for the order.
    - `line_items` object[]

      List of line items.

      *   Array \[

      - `compare_at_price` string

        Compare-at price of the item.
      - `fulfillment_status` string

        Fulfillment status, for example `waiting`, `shipped`, `finished`.
      - `id` string

        ID of the line item.
      - `image` object

        Image of the line item's variant.

        - `alt` string

          Alt text of the image.
        - `height` number

          Height of the image, in pixels.
        - `path` string

          Path of the image file on the image server.
        - `src` string

          URL of the image.
        - `width` number

          Width of the image, in pixels.
      - `note` string

        Note attached to the line item.
      - `options` object[]

        Option values of the line item's variant.

        *   Array \[

        - `name` string

          Name of the product option, for example `Color`.
        - `value` string

          Value selected for this product option.
        *   \]
      - `price` string

        Price of a single unit of the line item.
      - `product_handle` string

        Handle of the product.
      - `product_id` string

        ID of the product.
      - `product_title` string

        Title of the product.
      - `product_url` string

        Relative URL of the product page.
      - `properties` string

        Custom properties captured on the line item.
      - `quantity` number

        Quantity of the item.
      - `requires_shipping` boolean

        Whether shipping is required.
      - `sku` string

        SKU of the variant, used for inventory tracking.
      - `taxable` boolean

        Whether tax is charged.
      - `total` string

        Total price of the line item.
      - `variant_id` string

        ID of the variant.
      - `variant_title` string

        Title of the variant, for example `Blue, Size M`.
      - `vendor` string

        Vendor of the product.
      - `weight` string

        Weight of the variant.
      - `weight_unit` string

        Unit of the weight, for example `kg`.
      - `barcode` string

        Barcode of the variant.
      - `custom` boolean

        Whether the line item is a custom item.
      - `trunk_price` string

        Trunk price of the line item.
      - `main_currency_prices` object

        Order amounts converted into the store's main currency.

        - `compare_at_price` string

          Compare-at price of the item.
        - `price` string

          Unit price converted into the store's main currency.
        - `total` string

          Total converted into the store's main currency.
        - `trunk_price` string

          Trunk price of the line item.
        - `actual_rate` string

          Exchange rate used for the conversion.
      *   \]
    - `order_url` string

      Relative URL of the order page.
    - `checkout_url` string

      Relative URL of the checkout page for the order.
    - `fulfillments` undefined[]

      List of shipments for the order.
    - `main_currency_prices` object

      Order amounts converted into the store's main currency.

      - `total` string

        Total converted into the store's main currency.
      - `actual_rate` string

        Exchange rate used for the conversion.
      - `actual_rate_show` string
    - `order_type` number

      Order type; `0` is a regular order, `1` is a gift card order.
    *   \]

```json
{
  "order_list": {
    "count": "2",
    "orders": [
      {
        "id": "2446407211602194455359",
        "number": "KSR43063",
        "payment_method": "bogus_gateway",
        "financial_status": "paid",
        "fulfillment_status": "waiting",
        "status": "placed",
        "currency_code": "USD",
        "fail_code": "",
        "shipping_address": {
          "address": "123 Main St",
          "address1": "123 Main St",
          "area": "",
          "city": "Los Angeles",
          "company": "",
          "country": "United States",
          "country_code": "US",
          "email": "jane@example.com",
          "extra_info": {},
          "first_name": "Jane",
          "id": "f1871eb3-5baa-47ba-bfce-783601c6e925",
          "last_name": "Doe",
          "origin_id": "6ca9fa54-8bfc-461f-9364-0fd104858990",
          "phone": "+1 555-0100",
          "phone_area_code": "",
          "province": "California",
          "province_code": "US-CA",
          "zip": "90001"
        },
        "post_sale_status": "none",
        "create_at": "2026-09-03T02:23:14Z",
        "customer_email": "jane@example.com",
        "customer_phone": "+1 555-0100",
        "customer_name": "Jane Probe",
        "customer_id": "e1773fff-2b71-42c5-bf63-fc93e6e5b3c5",
        "total": "2.00",
        "fulfillment_count": 0,
        "create_time": "2026-09-03T02:23:14Z",
        "allowed_actions": {
          "delete_order": false,
          "cancel_order": false,
          "repay_order": false,
          "pay_order": false,
          "add_to_cart": false,
          "download_invoice": false,
          "finish_fulfillment": false
        },
        "gift_card_total": "0.00",
        "paid_total": "2.00",
        "payment_due": "0.00",
        "payment_progress": 3,
        "real_paid_total": "2.00",
        "line_items": [
          {
            "compare_at_price": "1.00",
            "fulfillment_status": "waiting",
            "id": "b56596b5-3e36-418b-9098-c7099da3beb2",
            "image": {
              "alt": "",
              "height": 1500,
              "path": "free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
              "src": "//img.staticdj.com/free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
              "width": 3000
            },
            "note": "",
            "options": [
              {
                "name": "Size",
                "value": "01"
              }
            ],
            "price": "1.00",
            "product_handle": "sample-product",
            "product_id": "14a309ec-b966-4cf9-a9bb-33baa821fdbc",
            "product_title": "sample-product",
            "product_url": "/products/sample-product",
            "properties": "{}",
            "quantity": 1,
            "requires_shipping": true,
            "sku": "",
            "taxable": false,
            "total": "1.00",
            "variant_id": "fff360dd-6457-466a-98b3-16878bacef5b",
            "variant_title": "01",
            "vendor": "",
            "weight": "0.00",
            "weight_unit": "kg",
            "barcode": "",
            "custom": false,
            "trunk_price": "1.00",
            "main_currency_prices": {
              "compare_at_price": "1",
              "price": "1",
              "total": "1",
              "trunk_price": "1",
              "actual_rate": "1"
            }
          }
        ],
        "order_url": "/order/2446407211602194455359",
        "checkout_url": "/checkout/2446407211602194455359?key=082bf85a7f94752154bfd18f96d828",
        "fulfillments": [],
        "main_currency_prices": {
          "total": "2",
          "actual_rate": "1",
          "actual_rate_show": ""
        },
        "order_type": 0
      },
      {
        "id": "2446407211542406852662",
        "number": "ZYL16546",
        "payment_method": "bogus_gateway",
        "financial_status": "paid",
        "fulfillment_status": "waiting",
        "status": "placed",
        "currency_code": "USD",
        "fail_code": "",
        "shipping_address": {
          "address": "123 Main St",
          "address1": "123 Main St",
          "area": "",
          "city": "Los Angeles",
          "company": "",
          "country": "United States",
          "country_code": "US",
          "email": "jane@example.com",
          "extra_info": {},
          "first_name": "Jane",
          "id": "d3e95a5d-5e50-406b-8077-61a5fd292add",
          "last_name": "Doe",
          "origin_id": "b1ebe1da-4113-4630-80cb-7dc30cf2a5b3",
          "phone": "+1 555-0100",
          "phone_area_code": "",
          "province": "California",
          "province_code": "US-CA",
          "zip": "90001"
        },
        "post_sale_status": "none",
        "create_at": "2026-09-02T09:46:46Z",
        "customer_email": "jane@example.com",
        "customer_phone": "+1 555-0100",
        "customer_name": "Jane Probe",
        "customer_id": "e1773fff-2b71-42c5-bf63-fc93e6e5b3c5",
        "total": "31.00",
        "fulfillment_count": 0,
        "create_time": "2026-09-02T09:46:46Z",
        "allowed_actions": {
          "delete_order": false,
          "cancel_order": false,
          "repay_order": false,
          "pay_order": false,
          "add_to_cart": false,
          "download_invoice": false,
          "finish_fulfillment": false
        },
        "gift_card_total": "0.00",
        "paid_total": "31.00",
        "payment_due": "0.00",
        "payment_progress": 3,
        "real_paid_total": "31.00",
        "line_items": [
          {
            "compare_at_price": "1.00",
            "fulfillment_status": "waiting",
            "id": "9c775cb0-b818-4d95-86bc-dda220fd7519",
            "image": {
              "alt": "",
              "height": 1500,
              "path": "free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
              "src": "//img.staticdj.com/free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
              "width": 3000
            },
            "note": "",
            "options": [
              {
                "name": "Size",
                "value": "01"
              }
            ],
            "price": "1.00",
            "product_handle": "sample-product",
            "product_id": "14a309ec-b966-4cf9-a9bb-33baa821fdbc",
            "product_title": "sample-product",
            "product_url": "/products/sample-product",
            "properties": "{}",
            "quantity": 1,
            "requires_shipping": true,
            "sku": "",
            "taxable": false,
            "total": "1.00",
            "variant_id": "fff360dd-6457-466a-98b3-16878bacef5b",
            "variant_title": "01",
            "vendor": "",
            "weight": "0.00",
            "weight_unit": "kg",
            "barcode": "",
            "custom": false,
            "trunk_price": "1.00",
            "main_currency_prices": {
              "compare_at_price": "1",
              "price": "1",
              "total": "1",
              "trunk_price": "1",
              "actual_rate": "1"
            }
          },
          {
            "compare_at_price": "20.00",
            "fulfillment_status": "waiting",
            "id": "b534c4d6-1532-432f-8a24-b90ded1d88fd",
            "image": {
              "alt": "",
              "height": 1254,
              "path": "50fa9b8c054f4d11b0d765de5f35dd4e.png",
              "src": "//img.staticdj.com/50fa9b8c054f4d11b0d765de5f35dd4e.png",
              "width": 1254
            },
            "note": "",
            "options": [
              {
                "name": "Color",
                "value": "Black"
              },
              {
                "name": "Size",
                "value": "S"
              }
            ],
            "price": "10.00",
            "product_handle": "Sample product",
            "product_id": "b3b656ae-504f-4f01-a054-879a610925e3",
            "product_title": "Sample product",
            "product_url": "/products/Sample product",
            "properties": "{}",
            "quantity": 2,
            "requires_shipping": true,
            "sku": "1111-BLACK-S-A001001",
            "taxable": false,
            "total": "20.00",
            "variant_id": "0699bc80-19ae-41bb-87c4-dbcbe5ed90a0",
            "variant_title": "Black-S",
            "vendor": "",
            "weight": "0.00",
            "weight_unit": "kg",
            "barcode": "",
            "custom": false,
            "trunk_price": "10.00",
            "main_currency_prices": {
              "compare_at_price": "20",
              "price": "10",
              "total": "20",
              "trunk_price": "10",
              "actual_rate": "1"
            }
          }
        ],
        "order_url": "/order/2446407211542406852662",
        "checkout_url": "/checkout/2446407211542406852662?key=5dc2a127c14c578bc05bd30ba0e096",
        "fulfillments": [],
        "main_currency_prices": {
          "total": "31",
          "actual_rate": "1",
          "actual_rate_show": ""
        },
        "order_type": 0
      }
    ]
  }
}
```

## Get an order

```text
GET /{locale}/api/orders/{order_id}.json
```

Get one order of the signed-in customer, with its addresses, line items and prices.

### Example request

**Example request**

```javascript
fetch(window.SHOPLAZZA.routes.root + '/api/orders/2446407211602194455359.json')
  .then((response) => response.json())
  .then((data) => {
    // do something...
  });
```

### Request parameters

- `order_id` string

  The id of the order.

### Response

**Schema | Example**

- `order` object

  - `billing_address` object

    Billing address of the order.

    - `address` string

      Street address of the recipient.
    - `address1` string

      Primary street address.
    - `area` string

      Area or district of the address.
    - `city` string

      City of the address.
    - `country` string

      Country name of the address.
    - `country_code` string

      ISO country code of the address.
    - `email` string

      Email address associated with the address.
    - `first_name` string

      First name of the customer or recipient.
    - `id` string

      ID of the address.
    - `last_name` string

      Last name of the customer or recipient.
    - `origin_id` string
    - `province` string

      Province or state of the address.
    - `province_code` string

      Province or state code.
    - `zip` string

      Postal or ZIP code.
    - `phone` string

      Phone number associated with the address.
    - `phone_area_code` string

      Area code of the phone number.
  - `customer` object

    The customer details.

    - `customer_id` string

      ID of the order's customer.
    - `email` string

      Email address of the customer.
    - `first_name` string

      First name of the customer or recipient.
    - `last_name` string

      Last name of the customer or recipient.
    - `name` string

      Full name of the customer.
    - `order_count` number

      Number of orders placed by the customer.
    - `phone` string

      Phone number of the customer.
    - `user_id` string
  - `line_items` object[]

    List of line items.

    *   Array \[

    - `compare_at_price` string

      Compare-at price of the item.
    - `fulfillment_status` string

      Fulfillment status, for example `waiting`, `shipped`, `finished`.
    - `id` string

      ID of the line item.
    - `image` object

      Image of the line item's variant.

      - `alt` string

        Alt text of the image.
      - `height` number

        Height of the image, in pixels.
      - `path` string

        Path of the image file on the image server.
      - `src` string

        URL of the image.
      - `width` number

        Width of the image, in pixels.
    - `note` string

      Note attached to the line item.
    - `options` object[]

      Option values of the line item's variant.

      *   Array \[

      - `name` string

        Name of the product option, for example `Color`.
      - `value` string

        Value selected for this product option.
      *   \]
    - `price` string

      Price of a single unit of the line item.
    - `product_handle` string

      Handle of the product.
    - `product_id` string

      ID of the product.
    - `product_title` string

      Title of the product.
    - `product_url` string

      Relative URL of the product page.
    - `properties` string

      Custom properties captured on the line item.
    - `quantity` number

      Quantity of the item.
    - `requires_shipping` boolean

      Whether shipping is required.
    - `sku` string

      SKU of the variant, used for inventory tracking.
    - `taxable` boolean

      Whether tax is charged.
    - `total` string

      Total price of the line item.
    - `variant_id` string

      ID of the variant.
    - `variant_title` string

      Title of the variant, for example `Blue, Size M`.
    - `vendor` string

      Vendor of the product.
    - `weight` string

      Weight of the variant.
    - `weight_unit` string

      Unit of the weight, for example `kg`.
    - `barcode` string

      Barcode of the variant.
    - `custom` boolean

      Whether the line item is a custom item.
    - `trunk_price` string

      Trunk price of the line item.
    - `shipping_status` string

      Shipping status of the line item.
    - `main_currency_prices` object

      Order amounts converted into the store's main currency.

      - `compare_at_price` string

        Compare-at price of the item.
      - `price` string

        Unit price converted into the store's main currency.
      - `total` string

        Total converted into the store's main currency.
      - `trunk_price` string

        Trunk price of the line item.
      - `actual_rate` string

        Exchange rate used for the conversion.
    - `discount_total` string

      Total discount applied.
    - `tax_total` string

      Total tax applied to the order.
    - `discount_details` undefined[]
    - `final_price` string

      Price of a single unit of this line item, after line-level discounts.
    - `final_total` string

      Final total of the order.
    - `is_free_gift` boolean

      Whether the item is a free gift.
    - `duty_price` string

      Customs duty of the line item.
    *   \]
  - `order_info` object

    Summary information of the order.

    - `code_discount_total` string

      Total discount from the discount code applied to the order.
    - `config` string

      Configuration of the order.
    - `create_time` string

      Time when the order was created; same as `create_at`.
    - `currency_code` string

      Currency code of the order, for example `USD`.
    - `customer_note` string

      Note the customer left during checkout.
    - `discount_applications` string

      Discounts applied to this object.
    - `discount_code` string

      Discount code applied to the order.
    - `discount_total` string

      Total discount applied.
    - `fail_code` string
    - `financial_status` string

      Payment status of the order, for example `waiting`, `paid`.
    - `fulfillment_status` string

      Fulfillment status, for example `waiting`, `shipped`, `finished`.
    - `id` string

      ID of the order.
    - `line_item_discount_total` string

      Total discount applied to the line items of the order.
    - `note` string

      Note the merchant added to the order.
    - `order_no` string

      Order number.
    - `post_sale_status` string

      After-sales status of the order.
    - `refer_info` object

      Information about how the customer reached the store.

      - `address_check` boolean
      - `client_id` string
      - `country` string
      - `customer_session` string
      - `domain` string
      - `fbc` string
      - `fbp` string
      - `inventory_deduction` string
      - `ip` string

        The visitor's IP address.
      - `seg` string
      - `session_id` string
      - `source` string
      - `user_agent` string
    - `shipping_address_editable` boolean

      Whether the shipping address can still be edited.
    - `shipping_total` string

      Total shipping fee of the order.
    - `status` string

      Status of the order, for example `opened`, `placed`, `finished`.
    - `sub_total` string

      Sum of the line item prices before order-level discounts.
    - `tax_total` string

      Total tax applied to the order.
    - `total` string

      Total price the customer pays, including tax, shipping and discounts.
    - `updated_at` string

      Last update time, in ISO-8601 format.
    - `total_tip_received` string

      Total tip received for the order.
    - `cancelable` boolean

      Whether the order can still be cancelled.
    - `create_at` string

      Time when the order was created.
    - `gift_card_total` string

      Total gift card amount applied to the order.
    - `paid_total` string

      Total amount already paid for the order.
    - `payment_due` string

      Amount of the order that is still unpaid.
    - `payment_progress` number

      Payment progress of the order; `3` means the order is fully paid.
    - `real_paid_total` string

      Amount actually paid for the order.
    - `checkout_url` string

      Relative URL of the checkout page for the order.
    - `order_url` string

      Relative URL of the order page.
    - `main_currency_prices` object

      Order amounts converted into the store's main currency.

      - `sub_total` string

        Sum of the line item prices before order-level discounts.
      - `shipping_total` string

        Total shipping fee of the order.
      - `tax_total` string

        Total tax applied to the order.
      - `discount_total` string

        Total discount applied.
      - `total` string

        Total converted into the store's main currency.
      - `total_tip_received` string

        Total tip received for the order.
      - `actual_rate` string

        Exchange rate used for the conversion.
      - `actual_rate_show` string
    - `final_total` string

      Final total of the order.
    - `order_type` number

      Order type; `0` is a regular order, `1` is a gift card order.
    - `shipping_tax_type` number
    - `shipping_tax_total` string

      Total shipping tax of the order.
    - `product_tax_included` boolean

      Whether product prices include tax.
    - `additional_total` string

      Total additional charges of the order.
    - `additional_prices` object

      Breakdown of the additional charges.

      - `` object
    - `tax_lines` undefined[]

      Tax breakdown of the order.
    - `duty_total` string

      Total customs duty and tax of the order.
  - `payment_line` object

    Payment details of the order.

    - `name` string

      Display name of the payment method.
    - `channel` string

      Payment channel that processed the payment.
    - `method` string

      Payment gateway used for the payment.
    - `credit_card_number` string

      Last digits of the card used to pay.
    - `transaction_id` string

      Transaction number of the payment.
    - `paid_total` string

      Amount paid through this payment method.
    - `extra_info` string
    - `real_paid_total` string

      Amount actually paid through this payment method.
  - `shipping_address` object

    Shipping address of the order.

    - `address` string

      Street address of the recipient.
    - `address1` string

      Primary street address.
    - `area` string

      Area or district of the address.
    - `city` string

      City of the address.
    - `company` string

      Company name of the address.
    - `country` string

      Country name of the address.
    - `country_code` string

      ISO country code of the address.
    - `email` string

      Email address associated with the address.
    - `extra_info` object

      - `` object
    - `first_name` string

      First name of the customer or recipient.
    - `id` string

      ID of the address.
    - `last_name` string

      Last name of the customer or recipient.
    - `origin_id` string
    - `phone` string

      Phone number associated with the address.
    - `phone_area_code` string

      Area code of the phone number.
    - `province` string

      Province or state of the address.
    - `province_code` string

      Province or state code.
    - `zip` string

      Postal or ZIP code.
  - `shipping_line` string

    Shipping plan selected for the order.
  - `allowed_actions` object

    Which actions the customer can perform on this order.

    - `delete_order` boolean

      Whether the order can be deleted.
    - `cancel_order` boolean

      Whether the order can be cancelled.
    - `repay_order` boolean

      Whether the order can be paid again.
    - `pay_order` boolean

      Whether the order can be paid.
    - `add_to_cart` boolean

      Whether the items of the order can be added to the cart again.
    - `download_invoice` boolean

      Whether an invoice can be downloaded for the order.
    - `finish_fulfillment` boolean

      Whether the customer can confirm receipt of the order.
  - `payment_lines` object[]

    List of the order payment records.

    *   Array \[

    - `name` string

      Display name of the payment method.
    - `channel` string

      Payment channel that processed the payment.
    - `method` string

      Payment gateway used for the payment.
    - `credit_card_number` string

      Last digits of the card used to pay.
    - `transaction_id` string

      Transaction number of the payment.
    - `paid_total` string

      Amount paid through this payment method.
    - `extra_info` string
    - `real_paid_total` string

      Amount actually paid through this payment method.
    *   \]
  - `location_line` object

    Address of the merchant's warehouse.

    - `location_id` string

      ID of the warehouse.
    - `location_name` string

      Name of the warehouse.
    - `first_name` string

      First name of the customer or recipient.
    - `last_name` string

      Last name of the customer or recipient.
    - `phone` string

      Phone number associated with the address.
    - `email` string

      Email address associated with the address.
    - `country` string

      Country name of the address.
    - `country_code` string

      ISO country code of the address.
    - `province` string

      Province or state of the address.
    - `province_code` string

      Province or state code.
    - `area` string

      Area or district of the address.
    - `city` string

      City of the address.
    - `address` string

      Street address of the recipient.
    - `address1` string

      Primary street address.
    - `company` string

      Company name of the address.
    - `latitude` string

      Latitude of the address.
    - `longitude` string

      Longitude of the address.
    - `zip` string

      Postal or ZIP code.
    - `phone_area_code` string

      Area code of the phone number.
    - `extra_info` string
  - `shipping_line_info` object

    Details of the shipping plan selected for the order.

    - `name` string

      Name of the shipping plan.
    - `desc` string

      Description of the shipping plan.
    - `delivery_method` number

      Delivery method type; `1` is express delivery, `2` is local delivery.
    - `extra_info` string

```json
{
  "order": {
    "billing_address": {
      "address": "123 Main St",
      "address1": "123 Main St",
      "area": "",
      "city": "Los Angeles",
      "country": "United States",
      "country_code": "US",
      "email": "jane@example.com",
      "first_name": "Jane",
      "id": "408593e0-c316-415b-b125-714af68b1bed",
      "last_name": "Doe",
      "origin_id": "",
      "province": "California",
      "province_code": "US-CA",
      "zip": "90001",
      "phone": "+1 555-0100",
      "phone_area_code": ""
    },
    "customer": {
      "customer_id": "e1773fff-2b71-42c5-bf63-fc93e6e5b3c5",
      "email": "jane@example.com",
      "first_name": "Jane",
      "last_name": "Doe",
      "name": "Jane Doe",
      "order_count": 2,
      "phone": "+1 555-0100",
      "user_id": "9fe44049-abab-4fed-ab3d-1bf4ffee8ef5"
    },
    "line_items": [
      {
        "compare_at_price": "1.00",
        "fulfillment_status": "finished",
        "id": "b56596b5-3e36-418b-9098-c7099da3beb2",
        "image": {
          "alt": "",
          "height": 1500,
          "path": "free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
          "src": "//img.staticdj.com/free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
          "width": 3000
        },
        "note": "",
        "options": [
          {
            "name": "Size",
            "value": "01"
          }
        ],
        "price": "1.00",
        "product_handle": "sample-product",
        "product_id": "14a309ec-b966-4cf9-a9bb-33baa821fdbc",
        "product_title": "sample-product",
        "product_url": "/products/sample-product",
        "properties": "{}",
        "quantity": 1,
        "requires_shipping": true,
        "sku": "",
        "taxable": false,
        "total": "1.00",
        "variant_id": "fff360dd-6457-466a-98b3-16878bacef5b",
        "variant_title": "01",
        "vendor": "",
        "weight": "0.00",
        "weight_unit": "kg",
        "barcode": "",
        "custom": false,
        "trunk_price": "1.00",
        "shipping_status": "finished",
        "main_currency_prices": {
          "compare_at_price": "1",
          "price": "1",
          "total": "1",
          "trunk_price": "1",
          "actual_rate": "1"
        },
        "discount_total": "0.00",
        "tax_total": "0.00",
        "discount_details": [],
        "final_price": "1.00",
        "final_total": "1.00",
        "is_free_gift": false,
        "duty_price": "0.00"
      }
    ],
    "order_info": {
      "code_discount_total": "0.00",
      "config": "{\"page_type\":\"three_step\",\"requires_shipping\":true,\"checkout_business_type\":0,\"product_tax_included\":false,\"checkout_template_type\":0,\"market_setting\":{\"primary_market_lang\":\"en-US\",\"market_lang\":\"en-US\",\"market_id\":\"653506617437848647\",\"market_currency\":\"USD\",\"market_currency_symbol\":{\"code\":\"USD\",\"val\":\"$\",\"left\":\"$\",\"right\":\"\"},\"market_base_currency\":\"USD\",\"market_base_currency_symbol\":{\"code\":\"USD\",\"val\":\"$\",\"left\":\"$\",\"right\":\"\"},\"primary_market_id\":\"653506617437848647\",\"primary_market_currency\":\"USD\",\"primary_market_currency_symbol\":{\"code\":\"USD\",\"val\":\"$\",\"left\":\"$\",\"right\":\"\"},\"market_price_setting\":{\"local_currency_enabled\":false,\"custom_rate_enabled\":false,\"custom_rate\":0,\"rate\":1,\"back_rate\":1,\"actual_rate\":1,\"base_to_local\":0,\"local_to_base\":0,\"adjust\":0,\"price_round_enabled\":true},\"market_country\":\"US\"}}",
      "create_time": "2026-09-03T02:23:14Z",
      "currency_code": "USD",
      "customer_note": "",
      "discount_applications": "[]",
      "discount_code": "",
      "discount_total": "0.00",
      "fail_code": "",
      "financial_status": "paid",
      "fulfillment_status": "finished",
      "id": "2446407211602194455359",
      "line_item_discount_total": "0.00",
      "note": "",
      "order_no": "KSR43063",
      "post_sale_status": "",
      "refer_info": {
        "address_check": true,
        "client_id": "1788247080462259",
        "country": "US",
        "customer_session": "879f8b8f-c3a0-483c-baf6-f5a55a7ff5b4",
        "domain": "your-store.myshoplaza.com",
        "fbc": "",
        "fbp": "",
        "inventory_deduction": "order_created",
        "ip": "203.0.113.10",
        "seg": "A",
        "session_id": "1788401986587184",
        "source": "cart",
        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36"
      },
      "shipping_address_editable": false,
      "shipping_total": "1.00",
      "status": "finished",
      "sub_total": "1.00",
      "tax_total": "0.00",
      "total": "2.00",
      "updated_at": "2026-09-03T02:37:41Z",
      "total_tip_received": "0.00",
      "cancelable": false,
      "create_at": "2026-09-03T02:23:14Z",
      "gift_card_total": "0.00",
      "paid_total": "2.00",
      "payment_due": "0.00",
      "payment_progress": 3,
      "real_paid_total": "2.00",
      "checkout_url": "/checkout/2446407211602194455359?key=082bf85a7f94752154bfd18f96d828",
      "order_url": "/order/2446407211602194455359",
      "main_currency_prices": {
        "sub_total": "1",
        "shipping_total": "1",
        "tax_total": "0",
        "discount_total": "0",
        "total": "2",
        "total_tip_received": "0",
        "actual_rate": "1",
        "actual_rate_show": ""
      },
      "final_total": "1.00",
      "order_type": 0,
      "shipping_tax_type": 0,
      "shipping_tax_total": "0.00",
      "product_tax_included": false,
      "additional_total": "0.00",
      "additional_prices": {},
      "tax_lines": [],
      "duty_total": "0.00"
    },
    "payment_line": {
      "name": "bogus",
      "channel": "bogus",
      "method": "bogus_gateway",
      "credit_card_number": "0000",
      "transaction_id": "test_2446407211602194455359",
      "paid_total": "2.00",
      "extra_info": "{\"order_trans_id\":\"48c7db2c5b904252aae2019ce738a818\",\"pay_unique_id\":\"2446407211602194455359\"}",
      "real_paid_total": "2.00"
    },
    "shipping_address": {
      "address": "123 Main St",
      "address1": "123 Main St",
      "area": "",
      "city": "Los Angeles",
      "company": "",
      "country": "United States",
      "country_code": "US",
      "email": "jane@example.com",
      "extra_info": {},
      "first_name": "Jane",
      "id": "f1871eb3-5baa-47ba-bfce-783601c6e925",
      "last_name": "Doe",
      "origin_id": "6ca9fa54-8bfc-461f-9364-0fd104858990",
      "phone": "+1 555-0100",
      "phone_area_code": "",
      "province": "California",
      "province_code": "US-CA",
      "zip": "90001"
    },
    "shipping_line": "{\"id\":\"d43bfac3-5f80-433d-b9ce-49a3d645cd5c\",\"name\":\"Standard shipping\",\"desc\":\"\",\"support_cod\":0,\"shipping_price\":\"1.00\",\"delivery_method\":1,\"location_id\":\"0\"}",
    "allowed_actions": {
      "delete_order": true,
      "cancel_order": false,
      "repay_order": false,
      "pay_order": false,
      "add_to_cart": false,
      "download_invoice": false,
      "finish_fulfillment": false
    },
    "payment_lines": [
      {
        "name": "bogus",
        "channel": "bogus",
        "method": "bogus_gateway",
        "credit_card_number": "0000",
        "transaction_id": "test_2446407211602194455359",
        "paid_total": "2.00",
        "extra_info": "{\"order_trans_id\":\"48c7db2c5b904252aae2019ce738a818\",\"pay_unique_id\":\"2446407211602194455359\"}",
        "real_paid_total": "2.00"
      }
    ],
    "location_line": {
      "location_id": "653509177250953159",
      "location_name": "Default",
      "first_name": "Jane",
      "last_name": "Doe",
      "phone": "+1 555-0100",
      "email": "jane@example.com",
      "country": "",
      "country_code": "",
      "province": "",
      "province_code": "",
      "area": "",
      "city": "",
      "address": "123 Main St",
      "address1": "123 Main St",
      "company": "",
      "latitude": "0.000000",
      "longitude": "0.000000",
      "zip": "",
      "phone_area_code": "",
      "extra_info": ""
    },
    "shipping_line_info": {
      "name": "Standard shipping",
      "desc": "",
      "delivery_method": 1,
      "extra_info": "{\"id\":\"d43bfac3-5f80-433d-b9ce-49a3d645cd5c\",\"name\":\"Standard shipping\",\"desc\":\"\",\"support_cod\":0,\"shipping_price\":\"1.00\",\"delivery_method\":1,\"location_id\":\"0\"}"
    }
  }
}
```

## Cancel an order

```text
PATCH /{locale}/api/orders/{order_id}/cancel.json
```

Cancel one order of the signed-in customer.

### Example request

**Example request**

```javascript
fetch(window.SHOPLAZZA.routes.root + '/api/orders/2446407211602194455359/cancel.json', {
  method: 'PATCH',
  headers: {
    'X-CSRF-Token': getCsrfToken()
  }
})
  .then((response) => response.json())
  .then((data) => {
    // do something...
  });
```

### Request parameters

- `order_id` string

  The id of the order.

### Response

**Schema | Example**

- `` object

```json
{}
```

## Confirm receipt of an order

```text
PATCH /{locale}/api/orders/{order_id}/confirm_receipt.json
```

Confirm that the signed-in customer received the order.

### Example request

**Example request**

```javascript
fetch(window.SHOPLAZZA.routes.root + '/api/orders/2446407211602194455359/confirm_receipt.json', {
  method: 'PATCH',
  headers: {
    'X-CSRF-Token': getCsrfToken()
  }
})
  .then((response) => response.json())
  .then((data) => {
    // do something...
  });
```

### Request parameters

- `order_id` string

  The id of the order.

### Response

**Schema | Example**

- `` object

```json
{}
```

## List the shipments of an order

```text
GET /{locale}/api/orders/{order_id}/fulfillments.json
```

List the shipments of one order of the signed-in customer, with their tracking numbers, carriers and line items.

### Example request

**Example request**

```javascript
fetch(window.SHOPLAZZA.routes.root + '/api/orders/2446407211602194455359/fulfillments.json')
  .then((response) => response.json())
  .then((data) => {
    // do something...
  });
```

### Request parameters

- `order_id` string

  The id of the order.

### Response

**Schema | Example**

- `count` string

  Number of fulfillments returned.
- `fulfillments` object[]

  List of shipments for the order.

  *   Array \[

  - `id` string

    ID of the fulfillment.
  - `retrieve_method` string
  - `tracking_number` string

    Tracking number of the shipment.
  - `tracking_company` string

    Carrier handling the shipment.
  - `tracking_company_code` string

    Code of the carrier.
  - `status` string

    Status of the fulfillment, for example `shipped`, `finished`.
  - `line_items` object[]

    Line items included in this fulfillment.

    *   Array \[

    - `id` string

      ID of the line item.
    - `product_title` string

      Title of the product.
    - `product_id` string

      ID of the product.
    - `product_handle` string

      Handle of the product.
    - `variant_id` string

      ID of the variant.
    - `variant_title` string

      Title of the variant, for example `Blue, Size M`.
    - `quantity` number

      Quantity of the item.
    - `fulfillment_status` string

      Fulfillment status, for example `waiting`, `shipped`, `finished`.
    - `note` string

      Note attached to the line item.
    - `image` object

      Image of the line item's variant.

      - `alt` string

        Alt text of the image.
      - `height` number

        Height of the image, in pixels.
      - `path` string

        Path of the image file on the image server.
      - `src` string

        URL of the image.
      - `width` number

        Width of the image, in pixels.
    - `compare_at_price` string

      Compare-at price of the item.
    - `price` string

      Price of a single unit of the line item.
    - `total` string

      Total price of the line item.
    - `sku` string

      SKU of the variant, used for inventory tracking.
    - `weight` string

      Weight of the variant.
    - `weight_unit` string

      Unit of the weight, for example `kg`.
    - `taxable` boolean

      Whether tax is charged.
    - `requires_shipping` boolean

      Whether shipping is required.
    - `options` object[]

      Option values of the line item's variant.

      *   Array \[

      - `name` string

        Name of the product option, for example `Color`.
      - `value` string

        Value selected for this product option.
      *   \]
    - `vendor` string

      Vendor of the product.
    - `product_url` string

      Relative URL of the product page.
    - `properties` string

      Custom properties captured on the line item.
    - `ship_quantity` number

      Quantity shipped in this fulfillment.
    *   \]
  - `tracking_company_code_v1` string
  - `tracking_url` string

    Tracking URL of the shipment.
  *   \]

```json
{
  "count": "1",
  "fulfillments": [
    {
      "id": "8dc782af-4ee6-4a0a-804a-e96227673b32",
      "retrieve_method": "manual",
      "tracking_number": "AJAXPROBE0001",
      "tracking_company": "DHL",
      "tracking_company_code": "",
      "status": "shipped",
      "line_items": [
        {
          "id": "b56596b5-3e36-418b-9098-c7099da3beb2",
          "product_title": "sample-product",
          "product_id": "14a309ec-b966-4cf9-a9bb-33baa821fdbc",
          "product_handle": "sample-product",
          "variant_id": "fff360dd-6457-466a-98b3-16878bacef5b",
          "variant_title": "01",
          "quantity": 1,
          "fulfillment_status": "shipped",
          "note": "",
          "image": {
            "alt": "",
            "height": 1500,
            "path": "free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
            "src": "//img.staticdj.com/free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
            "width": 3000
          },
          "compare_at_price": "1.00",
          "price": "1.00",
          "total": "1.00",
          "sku": "",
          "weight": "0.00",
          "weight_unit": "kg",
          "taxable": false,
          "requires_shipping": true,
          "options": [
            {
              "name": "Size",
              "value": "01"
            }
          ],
          "vendor": "",
          "product_url": "/products/sample-product",
          "properties": "{}",
          "ship_quantity": 1
        }
      ],
      "tracking_company_code_v1": "",
      "tracking_url": ""
    }
  ]
}
```

## Confirm receipt of a shipment

```text
PATCH /{locale}/api/orders/{order_id}/fulfillments/{fulfillment_id}/finish.json
```

Confirm that the signed-in customer received one shipment of an order.

### Example request

**Example request**

```javascript
fetch(
  window.SHOPLAZZA.routes.root +
    '/api/orders/2446407211602194455359/fulfillments/8dc782af-4ee6-4a0a-804a-e96227673b32/finish.json',
  {
    method: 'PATCH',
    headers: {
      'X-CSRF-Token': getCsrfToken()
    }
  }
)
  .then((response) => response.json())
  .then((data) => {
    // do something...
  });
```

### Request parameters

- `order_id` string

  The id of the order.
- `fulfillment_id` string

  The id of the shipment.

### Response

**Schema | Example**

- `fulfillment` string

```json
{
  "fulfillment": null
}
```

## Request order deletion

```text
DELETE /{locale}/api/orders/{order_id}.json
```

### Example request

**Example request**

```javascript
fetch(window.SHOPLAZZA.routes.root + '/api/orders/2446407211602194455359.json', {
  method: 'DELETE',
  headers: {
    'X-CSRF-Token': getCsrfToken()
  }
})
  .then((response) => response.json())
  .then((data) => {
    // do something...
  });
```

### Request parameters

- `order_id` string

  The id of the order.

### Response

**Schema | Example**

- `` object

```json
{}
```

## Get access to an order page without signing in

```text
POST /{locale}/api/order_verify
```

Exchange an order number and the email address on the order for the address of the order page. An anonymous visitor can call this, so it backs the order lookup form on a storefront. The body is `application/x-www-form-urlencoded`.

### Example request

**Example request**

```javascript
const body = new URLSearchParams({
  order_number: 'KSR43063',
  email: 'jane@example.com'
});

fetch(window.SHOPLAZZA.routes.root + '/api/order_verify', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'X-CSRF-Token': getCsrfToken()
  },
  body: body
})
  .then((response) => response.json())
  .then((data) => {
    // do something...
  });
```

### Request parameters

- `order_number` string

  The order number, such as `KSR43063`.
- `email` string

  The email address on the order.

### Response

**Schema | Example**

- `action` string

  Result of the request, for example `Success` or `Unauthorized`.
- `value` string

  Relative URL the customer is redirected to.

```json
{
  "action": "Success",
  "value": "/order/2446407211602194455359"
}
```

## Track a package by tracking number

```text
GET /{locale}/api/tracking/package
```

Get the carrier tracking status of a shipment by tracking number.

### Example request

**Example request**

```javascript
fetch(window.SHOPLAZZA.routes.root + '/api/tracking/package?tracking_number=AJAXPROBE0001')
  .then((response) => response.json())
  .then((data) => {
    // do something...
  });
```

### Request parameters

- `tracking_number` string

  The tracking number of the parcel.

### Response

**Schema | Example**

- `meta` object

  Metadata of the query result.

  - `code` number

    HTTP-style status code of the query result.
  - `type` string

    Result type of the query, for example `Success`.
  - `message` string

    Result message of the query.
- `data` object

  The response payload.

  - `items` object[]

    List of tracked packages.

    *   Array \[

    - `tracking_number` string

      Tracking number of the shipment.
    - `carrier_code` string

      Code of the carrier handling the package.
    - `lastEvent` string
    - `lastUpdateTime` string
    - `substatus` string
    - `origin_info` object

      - `carrier_code` string

        Code of the carrier handling the package.
      - `ItemReceived` string
      - `trackinfo` string
    *   \]

```json
{
  "meta": {
    "code": 200,
    "type": "Success",
    "message": "Success"
  },
  "data": {
    "items": [
      {
        "tracking_number": "AJAXPROBE0001",
        "carrier_code": "100296",
        "lastEvent": "",
        "lastUpdateTime": "",
        "substatus": "Pending",
        "origin_info": {
          "carrier_code": "100296",
          "ItemReceived": "2026-09-03 10:37:40",
          "trackinfo": null
        }
      }
    ]
  }
}
```
