GET
/
ecommerce
/
orders
/
{id}
import { Panora } from "@panora/sdk";

const panora = new Panora({
  apiKey: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await panora.ecommerce.orders.retrieve({
    xConnectionToken: "<value>",
    id: "<id>",
  });
  
  // Handle the result
  console.log(result)
}

run();
{
  "order_status": "UNSHIPPED",
  "order_number": 19823838833,
  "payment_status": "SUCCESS",
  "currency": "AUD",
  "total_price": 300,
  "total_discount": 10,
  "total_shipping": 120,
  "total_tax": 120,
  "fulfillment_status": "PENDING",
  "customer_id": "801f9ede-c698-4e66-a7fc-48d19eebaa4f",
  "items": [
    {
      "remote_id": "12345",
      "product_id": "prod_001",
      "variant_id": "var_001",
      "sku": "SKU123",
      "title": "Sample Product",
      "quantity": 2,
      "price": "19.99",
      "total": "39.98",
      "fulfillment_status": "PENDING",
      "requires_shipping": true,
      "taxable": true,
      "weight": 1.5,
      "variant_title": "Size M",
      "vendor": "Sample Vendor",
      "properties": [
        {
          "name": "Color",
          "value": "Red"
        }
      ],
      "tax_lines": [
        {
          "title": "Sales Tax",
          "price": "3.00",
          "rate": 0.075
        }
      ],
      "discount_allocations": [
        {
          "amount": "5.00",
          "discount_application_index": 0
        }
      ]
    }
  ],
  "field_mappings": {
    "fav_dish": "broccoli",
    "fav_color": "red"
  },
  "id": "801f9ede-c698-4e66-a7fc-48d19eebaa4f",
  "remote_id": "id_1",
  "remote_data": {
    "fav_dish": "broccoli",
    "fav_color": "red"
  },
  "created_at": "2024-10-01T12:00:00Z",
  "modified_at": "2024-10-01T12:00:00Z"
}

Authorizations

x-api-key
string
header
required

Headers

x-connection-token
string
required

The connection token

Path Parameters

id
string
required

id of the order you want to retrieve.

Query Parameters

remote_data
boolean

Set to true to include data from the original Ats software.

Response

200 - application/json
order_status
string | null

The status of the order

Example:

"UNSHIPPED"

order_number
string | null

The number of the order

Example:

19823838833

payment_status
string | null

The payment status of the order

Example:

"SUCCESS"

currency
string | null

The currency of the order. Authorized value must be of type CurrencyCode (ISO 4217)

Example:

"AUD"

total_price
number | null

The total price of the order

Example:

300

total_discount
number | null

The total discount on the order

Example:

10

total_shipping
number | null

The total shipping cost of the order

Example:

120

total_tax
number | null

The total tax on the order

Example:

120

fulfillment_status
string | null

The fulfillment status of the order

Example:

"PENDING"

customer_id
string | null

The UUID of the customer associated with the order

Example:

"801f9ede-c698-4e66-a7fc-48d19eebaa4f"

items
object[] | null

The items in the order

Example:
[
  {
    "remote_id": "12345",
    "product_id": "prod_001",
    "variant_id": "var_001",
    "sku": "SKU123",
    "title": "Sample Product",
    "quantity": 2,
    "price": "19.99",
    "total": "39.98",
    "fulfillment_status": "PENDING",
    "requires_shipping": true,
    "taxable": true,
    "weight": 1.5,
    "variant_title": "Size M",
    "vendor": "Sample Vendor",
    "properties": [{ "name": "Color", "value": "Red" }],
    "tax_lines": [
      {
        "title": "Sales Tax",
        "price": "3.00",
        "rate": 0.075
      }
    ],
    "discount_allocations": [
      {
        "amount": "5.00",
        "discount_application_index": 0
      }
    ]
  }
]
field_mappings
object | null

The custom field mappings of the object between the remote 3rd party & Panora

Example:
{
  "fav_dish": "broccoli",
  "fav_color": "red"
}
id
string | null

The UUID of the order

Example:

"801f9ede-c698-4e66-a7fc-48d19eebaa4f"

remote_id
string | null

The remote ID of the order in the context of the 3rd Party

Example:

"id_1"

remote_data
object | null

The remote data of the customer in the context of the 3rd Party

Example:
{
  "fav_dish": "broccoli",
  "fav_color": "red"
}
created_at
string | null

The created date of the object

Example:

"2024-10-01T12:00:00Z"

modified_at
string | null

The modified date of the object

Example:

"2024-10-01T12:00:00Z"