# GetReturnOrderDetail (REST)

**Description**

With this method we want to receive the return order details of a given order number.

### Changes in ShoxlRestApiSwagger\_v16&#x20;

* A new field "context" is introduced in the request body. When configured this object contains key value pairs (e.g. divisionCode).

## REST API:

**URL:** /Shoxl/v1/GetReturnOrderDetail\
**Method:** POST

**Request body:**

### &#x20;GetReturnOrderDetailRequest{

| Parameter     | Type                      | Description                                                                                              |
| ------------- | ------------------------- | -------------------------------------------------------------------------------------------------------- |
| accountNumber | <p>string<br>required</p> | The (project) account number of the customer.                                                            |
| orderNumber   | <p>string<br>required</p> | The Shoxl Shop unique order number                                                                       |
| context       | object                    | A generic object designed to hold key-value pairs for the purpose of providing customer-specific fields. |

}

#### Example:

<pre><code>{
  "accountNumber": "string",
  "orderNumber": "string",
<strong>  "context": {
</strong>    "divisionCode": "string"
  }
}
</code></pre>

**Response body:**

### &#x20;GetReturnOrderDetailResult{

<table data-header-hidden><thead><tr><th>parameter</th><th width="260.3333333333333">type</th><th></th></tr></thead><tbody><tr><td>Parameter</td><td>Type</td><td>Description</td></tr><tr><td>errorCode</td><td>string<br>nullable: true</td><td>An Error code returned by the ERP system</td></tr><tr><td>errorDescription</td><td>string<br>nullable: true</td><td>The error description related to the error code returned by the ERP system</td></tr><tr><td>order</td><td>ReturnOrderDetail</td><td>Object containing the return order detail information.</td></tr><tr><td>request</td><td>GetReturnOrderDetailRequest</td><td>The request sent by the Shoxl Shop.</td></tr></tbody></table>

}

#### &#x20;ReturnOrderDetail{

| Parameter   | Type                            | Description                        |
| ----------- | ------------------------------- | ---------------------------------- |
| orderNumber | <p>string<br>nullable: true</p> | The Shoxl Shop unique order number |
| orderLines  | \[ReturnOrderLine]              | A list of ReturnOrderLine objects. |

}

#### &#x20;ReturnOrderLine{

| Parameter      | Type                            | Description                                                                                                                   |
| -------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| productNumber  | <p>string<br>nullable: true</p> | The product number                                                                                                            |
| description    | <p>string<br>nullable: true</p> | The default description of the product                                                                                        |
| quantity       | number($double)                 | The number of items returned                                                                                                  |
| baseUnit       | <p>string<br>nullable: true</p> | The base unit of the product, eg pce or meter.                                                                                |
| orderLineState | integer($int32)                 | The status of the return order line, 0 = *ToReturn*, 1 = *PartiallyReturned*, 2 = *Returned*, 3 = *Credited*, 4 = *Cancelled* |

}

#### Example:

```
{
  "customerNumber": "string",
  "errorCode": "string",
  "errorDescription": "string",
  "order": {
    "orderNumber": "string",
    "orderLines": [
      {
        "productNumber": "string",
        "description": "string",
        "quantity": 0,
        "baseUnit": "string",
        "orderLineState": 0
      }
    ]
  },
  "request": {
    "accountNumber": "string",
    "orderNumber": "string"
  }
}
```
