---
title: "Retrieve detailed Sales Order information for a list of orders"
method: GET
path: "/salesOrder"
tags: ["SalesOrder"]
---

# Retrieve detailed Sales Order information for a list of orders

`GET /salesOrder`

## Request

- Base URL: `https://api.zentail.com/v1`
- URL: `https://api.zentail.com/v1/salesOrder`
- Auth: API key in header `AUTHORIZATION`

Returns very detailed information about a sales order including accounting data, tracking/package data, line items for all sales orders that match the search criteria provided. Results are sorted by the lastUpdateTs from oldest to newest.

Orders placed more than one year ago are excluded from results, unless channelOrderIds is provided.

## Query parameters

- `lastUpdatedTs` string, date-time
- `status` string[]
- `channelOrderIds` string[]
- `orderTs` string, date-time
- `pageLength` integer
- `nextToken` string
- `warehouseId` integer

## Response `200`

Success

- SODetailsResponse
  - `results` SOResponseData[]: An array of `SalesOrder` results
    - `orderNumber` string: The unique identifier for an order in Zentail
    - `status` 'PENDING_PAYMENT' | 'PENDING' | 'PARTIALLY_SHIPPED' | 'SHIPPED' | 'CANCELLED' | 'RETURNED' | 'REFUNDED' | 'RETURN_REQUESTED'
    - `cancellationReason` string: If the order is `CANCELLED` this will provide the reason for the cancellation.
    - `channel` string: The name of the sales channel where the order was placed.
    - `channelLabel` string: Label for the sales channel in Zentail. Some customers might have multiple instances of the same sales channel. This label is used to distinguish between them.
    - `channelOrderId` string: The unique identifier for the order as provided by the sales channel.
    - `channelOrderReferenceNumber` string: An optional identifier that some sales channels provide in addition to the `channelOrderId`
    - `customer_notes` string: Notes provided by the customer that placed the order
    - `marketplaceId` string: An identifier of the marketplace where the order was placed, if the sales channel provides multiple marketplaces.
    - `customerName` string: The name of the customer that placed the order
    - `customerEmail` string: The contact email of the customer that placed the order
    - `orderTs` string, date-time: The time that the order was placed. In [ISO-8601 format](/getting-started/api-basics/timestamps)
    - `lastUpdatedTs` string, date-time: The time that the order was last updated in Zentail. In [ISO-8601 format](/getting-started/api-basics/timestamps)
    - `requestedServiceLevel` string: The service level that was requested by the sales channel
    - `standardServiceLevel` 'Standard' | 'Economy' | 'Three Day' | 'Second Day' | 'Next Day' | 'Free Shipping' | 'International Standard' | 'International Economy' | 'International Priority' | 'Freight Standard' | 'Pick Up' | 'Unknown': The channel's service level after being standardized in Zentail. `Unknown` is returned if a Standard Service level can't be determined.
    - `shipBy` string, date-time: The earliest of the line items' lastestShipBy timestamps. This is a read-only field. In [ISO-8601 format](/getting-started/api-basics/timestamps).
    - `accounting` object: Information used to help with accounting
      - `payment` number: The payment amount
      - `channelTax` number: Tax as reported by the sales channel
      - `resellerCommission` number: Commission taken by the sales channel
      - `shippingCost` number: Cost of shipping
      - `itemCost` number: Cost of the items
      - `totalCost` number: Total cost of the order
      - `revenue` number: Revenue of the order.
      - `profit` number: Profit of the order
      - `margin` number: Margin of the order
      - `itemPrice` number: Total item price
      - `shippingPrice` number: Total shipping price
      - `refund` number: Total refunded if the order was partially or completely refunded
      - `totalDiscount` number: The total discount applied on the channel
    - `shippingAddress` Address
      - `name` string, required
      - `company` string
      - `addressLine1` string, required
      - `addressLine2` string
      - `city` string, required
      - `state` string
      - `postalCode` string, required
      - `phone` string
      - `email` string
      - `countryCode` string
      - `type` string: Type of address. For example, Residential or Commercial.
    - `billingAddress` Address
      - `name` string, required
      - `company` string
      - `addressLine1` string, required
      - `addressLine2` string
      - `city` string, required
      - `state` string
      - `postalCode` string, required
      - `phone` string
      - `email` string
      - `countryCode` string
      - `type` string: Type of address. For example, Residential or Commercial.
    - `packages` PackageData[]: The individual packages once the order has been fulfilled
      - `packageId` number: The unique identifier for the package in Zentail
      - `carrier` string: The name of the carrier responsible for delivering the package
      - `serviceLevel` string: The service level for the package, i.e. "2 day"
      - `cost` number: The cost for shipping the package
      - `tracking` string: The tracking number of the package
      - `shippedTs` string, date-time: Timestamp at which the package has been shipped, defaulted to when the api request is sent. In [ISO-8601 format](/getting-started/api-basics/timestamps)
      - `rma` string: The RMA identifier if the package was created due to an RMA.
      - `labelUrl` string: A URL to a shipping label for the package
      - `packageWeight` number: The numeric weight of the package, see `packageWeightUom` for the units.
      - `packageWeightUom` string: The units of measure for the `packageWeight`.
      - `packageHeight` number: The height of the package in inches
      - `packageWidth` number: The width of the package in inches
      - `packageLength` number: The length of the package in inches
      - `products` object[]
        - `sku` string: The SKU of a product included in the package
        - `lineItemId` string: The unique identifier of thie line item
        - `quantity` number: The amount of the SKU included in the package
    - `products` OrderLineItem[]: The line items that make up the order.
      - `lineItemId` string: The unique identifier for the line item in Zentail
      - `channelLineItemId` string: The unique identifier for the line item provided by the sales channel
      - `status` 'PENDING_PAYMENT' | 'PENDING' | 'PARTIALLY_SHIPPED' | 'SHIPPED' | 'CANCELLED' | 'RETURNED' | 'REFUNDED' | 'RETURN_REQUESTED'
      - `requestedTitle` string: This is the title requested by the sales channel, it may not exactly match the title in Zentail.
      - `requestedSku` string: This is the SKU requested by the sales channel, to see the SKU actually referenced by Zentail, see the SKU column.
      - `sku` string: This is the SKU used in Zentail for the product. It may not match the SKU requested by the channel if the SKU requested was an Alias or if channel-based SKU Overrides are in use.
      - `SKU` string: [deprecated] please use `sku` instead.
      - `primary_image` string
      - `mpn` string: This is the manufactured part number provided for the product in Zentail. This can be blank since we accept orders for products that are not in Zentail.
      - `standard_product_id` string: This is the UPC/EAN/ISBN/GTIN provided for the product in Zentail. This can be blank since we accept orders for products that are not in Zentail.
      - `title` string: This is the title of the Zentail product. This can be blank since we accept orders for products that are not in Zentail.
      - `quantity` integer: The amount for this line item
      - `routing_info` object[]: Information describing how this line item was routed for Warehouses to perform fulfillment.
        - `warehouseId` integer
        - `warehouseUniqueId` string: Unique identifier for the warehouse as recognized by the application. Note: This field is only provided in the response if an application is registered with Zentail as an inventory Integration or a Shipping integration or a 3PL (Third Party Logistics) software.
        - `quantity` integer: The total amount to use from this Warehouse
        - `assembledQuantity` integer: The number of already assembled kits in the Warehouse. This is `null` for single sku.
        - `kitComponents` object[]: The individual components of a kit. This is `null` for single sku.
          - `SKU` string: The component sku that is part of the kit.
          - `componentQuantity` integer: Number of component units to assembled one kit
      - `cancelQuantity` integer
      - `shippedQuantity` integer
      - `unitPrice` number
      - `cost` number
      - `totalWeight` number
      - `packageDimensions` object
        - `length` object
          - `numeric` number
          - `unit` string
        - `width` object
          - `numeric` number
          - `unit` string
        - `height` object
          - `numeric` number
          - `unit` string
      - `hazmat` object: Whether this line item ships as hazardous material, derived from the product's catalog hazmat attributes. `null` means Zentail has no usable hazmat answer for this SKU; it is not an assertion that the item is safe to ship unflagged.
        - `flagged` boolean
      - `refund` number
      - `refundReason` string
      - `giftWrapMessage` string
      - `giftWrapLevel` string
      - `earliestShipBy` string, date-time: In [ISO-8601 format](/getting-started/api-basics/timestamps)
      - `latestShipBy` string, date-time: In [ISO-8601 format](/getting-started/api-basics/timestamps)
      - `earliestDeliverBy` string, date-time: In [ISO-8601 format](/getting-started/api-basics/timestamps)
      - `latestDeliverBy` string, date-time: In [ISO-8601 format](/getting-started/api-basics/timestamps)
      - `requestedServiceLevel` string: Requested carrier and/or service level for the line item, else order as a whole.
    - `returnOrders` ReturnOrderData[]: Details of any return that was issued for this order.
      - `returnOrderId` number: The unqiue identifier for the return order in Zentail
      - `channelReturnId` string: The unqiue identifier for the return order in the sales channel
      - `requestTs` string, date-time: The time that the return order was requested. In [ISO-8601 format](/getting-started/api-basics/timestamps)
      - `cancelled` boolean: Indicates the return request has been cancelled
      - `completedTs` string, date-time: The time the seller completed the return in Zentail, or null while it is still open. In [ISO-8601 format](/getting-started/api-basics/timestamps)
      - `returnItems` ReturnOrderDataItem[]: The line items that makeup the return order
        - `returnOrderItemId` number: The unique identifier for this line item
        - `SKU` string: The SKU that is being returned
        - `quantity` number: The amount that is being returned
        - `originalQuantity` number: The original quantity that was ordered
        - `refundAmount` number: The amount of payment that is being refunded
    - `buyerCancelRequests` BuyerCancelRequestData[]: Requests the buyer made on the sales channel to cancel some or all of this order, and the merchant's answer to each.
      - `buyerCancelRequestId` number: The unique identifier for the cancel request in Zentail
      - `channelCancelId` string: The unique identifier for the cancel request in the sales channel
      - `status` 'PENDING' | 'CANCELLED' | 'CLOSED': `PENDING` while the channel waits for an answer, `CANCELLED` once the channel cancelled the units, `CLOSED` once it ended any other way
      - `requestTs` string, date-time: The time the buyer asked to cancel. In [ISO-8601 format](/getting-started/api-basics/timestamps)
      - `respondByTs` string, date-time: The time the channel needs an answer by, if it set one. In [ISO-8601 format](/getting-started/api-basics/timestamps)
      - `items` object[]: The line items and quantities the buyer asked to cancel
        - `lineItemId` string
        - `quantity` integer
      - `refuseReasons` object[]: The reasons the channel accepts for refusing this request
        - `code` string
        - `label` string
      - `decision` 'ACCEPT' | 'REFUSE': The merchant's answer in Zentail: `ACCEPT`, `REFUSE`, or null while unanswered
      - `refuseReason` string: The `code` of the refuse reason the merchant picked, when the decision is `REFUSE`
      - `decidedTs` string, date-time: The time the merchant answered. In [ISO-8601 format](/getting-started/api-basics/timestamps)
    - `fba` boolean: Indicates this is an Amazon order which was fulfilled by automatically FBA. This could be `false` while parts of the order are still routed to FBA if it's a multi-channel FBA order.
    - `channelWillFulfill` boolean: Whether the sales channel, rather than a merchant warehouse, is expected to fulfill this order.
    - `prime` boolean: Indicates this is a seller-fulfilled prime order.
    - `businessOrder` boolean: Indicates this is a business order.
  - `pagination` Pagination
    - `hasNext` boolean: Indicates if there is an additional page. This is `true` if there is another page, otherwise it is `false`.
    - `nextToken` string, uri: If `hasNext` is `true` this provides the full URL for the next page of results.

## Other responses

- `400`: Bad Request
- `403`: Permission Denied
- `404`: Not Found
- `500`: Zentail Error
- `503`: Zentail Error

---

[API](https://skmtc.dev/zentail/apis/zentail-api.md) - [All operations](https://skmtc.dev/zentail/apis/zentail-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zentail/apis/zentail-api/revisions/55e43cb43caf?raw)
