> For the complete documentation index, see [llms.txt](https://developer.esw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.esw.com/returns-api/returns-api-v3.0/methods/order-method.md).

# Order Method

## GET- Get Order <a href="#get-get-order" id="get-get-order"></a>

This method is used to retrieve an ingested order from the returns platform. To get an ingested order send a GET request to:

{% code expandable="true" %}

```http
GET /{identifier}/orders/{orderReference}
```

{% endcode %}

### Method Parameters <a href="#method-parameters" id="method-parameters"></a>

<details>

<summary>Request Parameters</summary>

| Field Name     | Type                                         | Required/Optional | Description                                                                                                                                                                                       |
| -------------- | -------------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| orderReference | <p>string</p><p>Max 30 characters length</p> | Required          | <ul><li>The Retailer’s unique reference for the order.</li><li>This is case-insensitive.</li></ul>                                                                                                |
| orderItems     | string                                       | Optional          | <ul><li>all: Retrieve all order items.</li><li>not-returned: Retrieve order items that are not part of an existing return (except items rejected with the reason ‘ArticleNotIncluded’).</li></ul> |

</details>

<details>

<summary>Response Parameters</summary>

| Field Name                            | Type     | Description                                                                                                                                  |
| ------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| countryIso                            | string   | The CountryISO of the recipient. ISO 3166-1 alpha-2 format.                                                                                  |
| orderDate                             | dateTime | Date the order was created in the returns platform.                                                                                          |
| noOfArticlesAvailableForReturn        | integer  | Number of items available for return.                                                                                                        |
| noOfArticlesUnavailableForReturn      | integer  | Number of items already returned.                                                                                                            |
| returnPeriodExpired                   | boolean  | Whether the return period has already expired.                                                                                               |
| orderQualifiesForCancel               | boolean  | Flag to identify an order which has been placed within the EU and has the option to be cancelled via EU cooling off regulation.              |
| returnAdminCentreCode                 | string   | Return admin centre code of the order.                                                                                                       |
| items                                 | array    |                                                                                                                                              |
| items.id                              | guid     | ID associated with the article.                                                                                                              |
| items.productCode                     | string   | The retailer's unique identification code or SKU for the order item.                                                                         |
| items.lineItemId                      | string   | ID that identifies the line item.                                                                                                            |
| items.productDescription              | string   | Title of the product.                                                                                                                        |
| items.productCustomsDescription       | string   | Description of the product, including material composition for customs.                                                                      |
| items.countryOfOriginIso              | string   | Two-letter ISO code of the manufacturing country of origin of the product .                                                                  |
| items.hsCode                          | string   | Harmonized system (HS) code of the product.                                                                                                  |
| items.weight                          | object   |                                                                                                                                              |
| weight.weightTotal                    | double   | Weight of the item.                                                                                                                          |
| weight.weightUnit                     | enum     | Weight unit used (Kg, Lb)                                                                                                                    |
| items.unitPrice                       | object   |                                                                                                                                              |
| unitPrice.amount                      | double   | Unit price of the product                                                                                                                    |
| unitPrice.currency                    | string   | Currency ISO used to determine the currency associated with the price of the item.                                                           |
| items.shippingInformation             | object   |                                                                                                                                              |
| shippingInformation.shippingReference | string   | The retailer's unique reference for the package in which the item was shipped.                                                               |
| shippingInformation.shippingStatus    | enum     | <p>The shipping status of the item.</p><p>Unshipped, Shipped, Cancelled</p>                                                                  |
| shippingInformation.statusDate        | dateTime | <p>UTC date-time for the shipping status.</p><p>Current date-time is used if not explicitly supplied.</p>                                    |
| items.productImageUrl                 | string   | Image URL of the item.                                                                                                                       |
| items.color                           | string   | Colour of the item.                                                                                                                          |
| items.size                            | string   | Size of the item.                                                                                                                            |
| items.category                        | string   | Item Category such as Furniture, Hardware, HealthBeauty, LuggageBag, etc.                                                                    |
| items.personalized                    | boolean  | Flag to identify if the item has been personlized.                                                                                           |
| items.dangerousGoods                  | boolean  | Flag to indicate whether the item is Dangerous/Hazardous.                                                                                    |
| items.prohibitedForReturns            | boolean  | <p>Flag to indicate if the item should be prohibited for return.</p><p>Defaults to ‘false’ unless it’s been overridden during ingestion.</p> |
| items.availableForReturns             | boolean  | Flag to indicate whether or not this item is allowed to be returned                                                                          |
| items.overrideProhibitedForReturns    | boolean  | Flag to indicate whether the ESP override for prohibited items is enabled.                                                                   |
| items.unlimitedPeriodForReturns       | boolean  | Flag to indicate whether the ESP override for returns period is enabled.                                                                     |
| returnOrders                          | array    | List of return orders associated with the order.                                                                                             |
| returnOrders.returnOrderNumber        | string   | Return order number.                                                                                                                         |
| returnOrders.customerReturnStatus     | enum     | <p>Status of the return.</p><p>Created, Received, Processed etc.</p>                                                                         |
| returnOrders.returnAdminCentreCode    | string   | Return admin centre code used for the return.                                                                                                |
| returnOrders.createdOn                | dateTime | Date-Time in UTC of when the return was created.                                                                                             |
| returnOrders.returnItems              | array    | List of return items associated with the return order.                                                                                       |
| returnItems.id                        | guid     | ID associated with the article.                                                                                                              |
| returnItems.returnItemReasonCode      | string   | Reason code associated with the return.                                                                                                      |
| returnItems.returnItemReasonComment   | string   | The comment the shopper has entered while returning the article.                                                                             |
| returnItems.returnItemStatus          | enum     | <p>Status of a return item.</p><p>InProgress, Accepted, Rejected</p>                                                                         |
| returnItems.rejectionReason           | string   | Rejection reason.                                                                                                                            |
| returnItems.productCode               | string   | The retailer's unique identification code or SKU for the order item.                                                                         |
| returnItems.lineItemId                | string   | Line item ID of the item.                                                                                                                    |
| returnItems.productDescription        | string   | Title of the product.                                                                                                                        |
| returnItems.productImageUrl           | string   | Image URL of the item.                                                                                                                       |
| returnItems.color                     | string   | Item color.                                                                                                                                  |
| returnItems.size                      | string   | Item size.                                                                                                                                   |
| shopperDetails.phoneNumber            | string   | The phone number of the shopper.                                                                                                             |
| shopperDetails.locale                 | string   | Shopper locale.                                                                                                                              |
| shopperDetails.firstName              | string   | Shopper’s first name.                                                                                                                        |
| shopperDetails.lastName               | string   | Shopper’s last name.                                                                                                                         |
| shopperDetails.email                  | string   | Shopper’s email address.                                                                                                                     |
| shopperDetails.address.address1       | string   | Shopper’s address 1.                                                                                                                         |
| shopperDetails.address.address2       | string   | Shopper’s address 2.                                                                                                                         |
| shopperDetails.address.city           | string   | Shopper’s address city.                                                                                                                      |
| shopperDetails.address.regionName     | string   | Shopper’s address region.                                                                                                                    |
| shopperDetails.address.countryName    | string   | Shopper’s address country.                                                                                                                   |
| shopperDetails.address.postalCode     | string   | Shopper’s address postal code.                                                                                                               |

</details>

<details>

<summary>Response</summary>

| Response Code | Description                                         |
| ------------- | --------------------------------------------------- |
| 200 (Ok)      | The ingested order has been successfully retrieved. |

</details>

{% code title="Request-Response Example" expandable="true" %}

```json
{
    "countryIso": "IE",
    "orderDate": "2022-02-09T10:01:32.9637726Z",
    "noOfArticlesAvailableForReturn": 2,
    "noOfArticlesUnavailableForReturn": 1,
    "returnPeriodExpired": false,
    "orderQualifiesForCancel": true,
    "items": [
      {
        "id": "74f82404-d541-4604-8c24-8f74400f614b",
        "productCode": "0607337",
        "lineItemId": "1",
        "productDescription": "Ultra Slim Watch",
        "productCustomsDescription": "Watch",
        "countryOfOriginIso": "CN",
        "hsCode": "6211490",
        "weight": {
          "weightTotal": 1.2,
          "weightUnit": "Kg"
        },
        "unitPrice": {
          "amount": 70.2,
          "currency": "USD"
        },
        "shippingInformation": {
          "shippingReference": "FBA_1636646500B",
          "shippingStatus": "Unshipped",
          "statusDate": "2022-01-10T11:48.708Z"
        },
        "productImageUrl": "https://cdn.brand.com/img/221",
        "color": "Black",
        "size": "Small",
        "category": "Watches",
        "personalized": true,
        "dangerousGoods": true,
        "prohibitedForReturns": true,
        "availableForReturns": true,
        "overrideProhibitedForReturns": true,
        "unlimitedPeriodForReturns": true
      }
    ],
    "returnOrders": [
      {
        "returnOrderNumber": "5000000102",
        "customerReturnStatus": "None",
        "returnAdminCentreCode": "LHRDC",
        "createdOn": "2022-04-12T16:56:14.2899713Z",
        "returnItems": [
          {
            "id": "bb51fbf1-c86c-4066-b052-ec1515b426d1",
            "returnItemReasonCode": "Duplicate Shipment",
            "returnItemStatus": "InProgress",
            "rejectionReason": "WrongProduct",
            "productCode": "0607339",
            "lineItemId": "24",
            "productDescription": "Nike Black Shoes",
            "productImageUrl": "https://static.nike.com/a/images/t_PDP_1728_v1/f_auto,b_rgb:f5f5f5/e0f96ae2-51c2-4052-a28b-4a69b3c18718/wio-8-road-running-shoes-96MgNc.png",
            "color": "Black",
            "size": "32",
            "returnItemReasonComment": "Don't like the colour"
          }
        ]
      }
    ],
    "shopperDetails": {
      "phoneNumber": "+10550304033",
      "locale": "en-IE",
      "firstName": "John",
      "lastName": "Doe",
      "email": "john_doe@domain.com",
      "address": {
        "address1": "Unit 45 Lakeside Retail Park Claremorris",
        "address2": "Unit 45 Lakeside ",
        "city": "Claremorris",
        "regionName": "County Mayo",
        "countryName": "Ireland",
        "postalCode": "BT12 3AB"
      }
    }
  }
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.esw.com/returns-api/returns-api-v3.0/methods/order-method.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
