> For the complete documentation index, see [llms.txt](https://eshop.gitbook.io/eshopbox-developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eshop.gitbook.io/eshopbox-developers/consignment/inward-consignment/update-an-inward-consignment.md).

# Update an Inward Consignment

## Cancel an inward consignment

<mark style="color:orange;">`PUT`</mark> `https://{{workspace}}.myeshopbox.com/api/v1/consignment/cancellation`

This endpoint allows you to update inward consignment

#### Query Parameters

| Name              | Type   | Description                            |
| ----------------- | ------ | -------------------------------------- |
| consignmentNumber | string | Identifier for this inward consignment |

#### Headers

| Name           | Type   | Description                                              |
| -------------- | ------ | -------------------------------------------------------- |
| Authentication | string | The Bearer token which allows to grant access to the API |

{% tabs %}
{% tab title="200 Inward consignment successfully retrieved " %}

```
{
    "id": "3649",
    "accountId": "28",
    "consignmentNumber": "CON/45/873",
    "refConsignmentNumber": "675986",
    "refConsignmentDate": "2019-03-01T00:00:00.000Z",
    "consignmentType": "INWARD",
    "fromPartyID": "1",
    "toPartyID": "23",
    "status": "CANCELLED",
    "isPicked": "0",
    "shortageQty": "0",
    "overageQty": "0",
    "wmsSync": "0",
    "createdAt": "2019-03-28T14:37:41.000Z",
    "updatedAt": "2019-04-22T11:46:41.000Z",
    "scheduledArivalFrom": "1970-01-01T00:00:00.000Z",
    "scheduledArivalTo": "1970-01-01T00:00:00.000Z",
    "tcnstatus": "0"
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X PUT https://{{workspace}}.myeshopbox.com/api/v1/consignment/cancellation \    
 -H "Authorization: Bearer XXXX"
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
You can re-schedule inward consignment using schedule inward consignment API
{% endhint %}

## Schedule inward consignment

<mark style="color:orange;">`PUT`</mark> `https://{{workspace}}.myeshopbox.com/api/v1/consignment`

This endpoint allows you to update inward consignment.<br>

#### Headers

| Name           | Type   | Description                                              |
| -------------- | ------ | -------------------------------------------------------- |
| Authentication | string | The Bearer token which allows to grant access to the API |

#### Request Body

| Name                 | Type    | Description                                      |
| -------------------- | ------- | ------------------------------------------------ |
| consignmentNumber    | string  | Identifier for this inward consignment           |
| scheduledArivalTo    | string  | Consignment arrival time                         |
| scheduledArivalFrom  | string  | Consignment Arrival time                         |
| scheduledArrivalDate | string  | Consignment arrival date at `Eshopbox` warehouse |
| departureDate        | string  | Consignment departure date                       |
| isPicked             | string  | Consignment picking type                         |
| containersQty        | integer | Consignment containers quantity                  |
| transportedBy        | string  | Consignment transported details                  |
| documents            | object  | Consignment document details                     |

{% tabs %}
{% tab title="200 Inward consignment successfully retrieved." %}

```
{
    "refConsignmentNumber": "0092001389",
    "consignmentNumber": "CON1418-191556166660601724215",
    "isPicked": "1",
    "transportedBy": {
        "courier": {
            "courierName": "test",
            "trackingNumber": "test"
        }
    },
    "containersQty": "20",
    "departureDate": "2019-05-03 12:12:12",
    "scheduledArrivalDate": "2019-05-04 12:12:12",
    "scheduledArivalFrom": "12:00:00",
    "scheduledArivalTo": "14:00:00"
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X PUT https://{{workspace}}.myeshopbox.com/api/v1/consignment \    
-H "Authorization: Bearer XXXX" \
     -H "Content-Type: application/json" \
     -d $'{
      "data": {
        "consignmentNumber":"CON/19-20/123456"
      }
    }'
```

{% endtab %}
{% endtabs %}
