> 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/recall-consignment/update-a-recall-consignment.md).

# Update a Recall Consignment

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

## Schedule recall consignment&#x20;

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

This endpoint allows you to update recall consignment by consignmentNumber

#### Path Parameters

| Name              | Type   | Description                                                      |
| ----------------- | ------ | ---------------------------------------------------------------- |
| consignmentNumber | string | Uniquely identifier of recall consignment. (Encoded with Base64) |

#### Headers

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

#### Request Body

| Name             | Type   | Description                        |
| ---------------- | ------ | ---------------------------------- |
| scheduledDetails | object | Details for consignment scheduling |

{% tabs %}
{% tab title="200 Recall consignment successfully update." %}

```
{
    "id": 1,
    "accountId": 12,
    "fromWarehouseId": 1,
    "toPartyId": 2,
    "consignmentNumber": "CON/45/873",
    "inventoryType":"GOOD",
    "itemsFileUrl": "https://storage.cloud.google.com/fileItems.appspot.com/items.pdf",
    "failedItemsUrl": "https://storage.cloud.google.com/failedItems.appspot.com/itemsFailed.pdf",
    "status": "COMPLETED",
    "successCount": 20,
    "failureCount": 2,
    "containersQty": 2,
    "scheduledDetails": {
        "pickingType": "ESHOPBOX",
        "scheduledTimeSlotFrom": "2019-09-01 09:23:02",
        "scheduledTimeSlotTo": "2019-09-02 02:23:02",
        "stockTransferNoteUrl": "https://storage.cloud.google.com/stockTransfer.appspot.com/transfer.pdf",
        "ewayBillUrl": "https://storage.cloud.google.com/ewayBill.appspot.com/bill.pdf",
        "invoiceUrl": "https://storage.cloud.google.com/invoice.appspot.com/invoice.pdf"
    },
    "createdAt": "2019-04-08T12:41:05.000+05:30",
    "updatedAt": "2019-04-08T12:41:05.000+05:30"
}
```

{% endtab %}
{% endtabs %}

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

```bash
curl -X PUT https://{{workspace}}.myeshopbox.com/api/v1/recall-consignmnet/:consignmentNumber \
     -H "Authorization: Bearer XXXX" \
     -H "Content-Type: application/json" \
     -d $'{
      "data": {
        "scheduledDetails": {
              "scheduledTimeSlotFrom": "2020-04-01 10:00:00",
              "scheduledTimeSlotTo": "2020-04-01 11:00:00",
              "pickingType": "client",
              "stockTransferNoteUrl": "https://cdn.filestackcontent.com/S9sdz5WjTi25EaCmJYBj",
              "ewayBillUrl": "https://cdn.filestackcontent.com/klRX7V2mTv6T2FWaV9wK"
        }
      }
    }'
```

{% endtab %}
{% endtabs %}

## Cancel recall consignment&#x20;

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

This endpoint allows you to update recall consignment by consignmentNumber

#### Path Parameters

| Name              | Type   | Description                                                      |
| ----------------- | ------ | ---------------------------------------------------------------- |
| consignmentNumber | string | Uniquely identifier of recall consignment. (Encoded with Base64) |

#### Headers

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

#### Request Body

| Name   | Type   | Description               |
| ------ | ------ | ------------------------- |
| status | string | Recall consignment status |

{% tabs %}
{% tab title="200 Recall consignment successfully update." %}

```
{
    "id": 1,
    "accountId": 12,
    "fromWarehouseId": 1,
    "toPartyId": 2,
    "consignmentNumber": "ABC1223/112",
    "inventoryType":"GOOD",
    "itemsFileUrl": "",
    "failedItemsUrl": "",
    "status": "COMPLETED",
    "successCount": 20,
    "failureCount": 0,
    "containersQty": 2,
    "scheduledDetails": {
        "pickingType": "ESHOPBOX",
        "scheduledTimeSlotFrom": "2019-09-01 09:23:02",
        "scheduledTimeSlotTo": "2019-09-02 02:23:02",
        "stockTransferNoteUrl": "https://test.com/transfer.pdf",
        "ewayBillUrl": "https://test.com/bill.pdf",
        "invoiceUrl": "https://test.com/invoice.pdf"
    },
    "createdAt": "2019-04-08T12:41:05.000+05:30",
    "updatedAt": "2019-04-08T12:41:05.000+05:30"
}
```

{% endtab %}
{% endtabs %}

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

```bash
curl -X PUT https://{{workspace}}.myeshopbox.com/api/v1/recall-consignmnet/:consignmentNumber \
     -H "Authorization: Bearer XXXX" \
     -H "Content-Type: application/json" \
     -d $'{
      "data": {
        "status": "CANCELLED"
      }
    }'
```

{% endtab %}
{% endtabs %}

## Retry Failed recall consignment&#x20;

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

This endpoint allows you to update recall consignment by consignmentNumber

#### Path Parameters

| Name              | Type   | Description                                                      |
| ----------------- | ------ | ---------------------------------------------------------------- |
| consignmentNumber | string | Uniquely identifier of recall consignment. (Encoded with Base64) |

#### Query Parameters

| Name | Type   | Description             |
| ---- | ------ | ----------------------- |
| type | string | `type` equal to `retry` |

#### Headers

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

{% tabs %}
{% tab title="200 Recall consignment successfully update." %}

```
{
    "id": 1,
    "accountId": 12,
    "fromWarehouseId": 1,
    "toPartyId": 2,
    "consignmentNumber": "ABC1223/112",
    "inventoryType":"GOOD",
    "itemsFileUrl": "",
    "failedItemsUrl": "",
    "status": "COMPLETED",
    "successCount": 20,
    "failureCount": 0,
    "containersQty": 2,
    "scheduledDetails": {
        "pickingType": "ESHOPBOX",
        "scheduledTimeSlotFrom": "2019-09-01 09:23:02",
        "scheduledTimeSlotTo": "2019-09-02 02:23:02",
        "stockTransferNoteUrl": "https://test.com/transfer.pdf",
        "ewayBillUrl": "https://test.com/bill.pdf",
        "invoiceUrl": "https://test.com/invoice.pdf"
    },
    "createdAt": "2019-04-08T12:41:05.000+05:30",
    "updatedAt": "2019-04-08T12:41:05.000+05:30"
}
```

{% endtab %}
{% endtabs %}

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

```bash
curl -X PUT https://{{workspace}}.myeshopbox.com/api/v1/recall-consignmnet/:consignmentNumber?type=retry \
     -H "Authorization: Bearer XXXX" \
```

{% endtab %}
{% endtabs %}

## Replace CSV Sheet

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

This endpoint allows you to update recall consignment by consignmentNumber

#### Path Parameters

| Name              | Type   | Description                                                      |
| ----------------- | ------ | ---------------------------------------------------------------- |
| consignmentNumber | string | Uniquely identifier of recall consignment. (Encoded with Base64) |

#### Headers

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

#### Request Body

| Name            | Type   | Description                                                 |
| --------------- | ------ | ----------------------------------------------------------- |
| itemsFileUrl    | string | Replace Items file URL                                      |
| refPartyID      | string | This is the party id where your items will be received.     |
| fromWarehouseId | string | This is the warehouse id from where your items will return. |

{% tabs %}
{% tab title="200 Recall consignment successfully update." %}

```
{
    "id": 1,
    "accountId": 12,
    "fromWarehouseId": 1,
    "toPartyId": 2,
    "consignmentNumber": "ABC1223/112",
    "inventoryType":"GOOD",
    "itemsFileUrl": "",
    "failedItemsUrl": "",
    "status": "COMPLETED",
    "successCount": 20,
    "failureCount": 0,
    "containersQty": 2,
    "scheduledDetails": {
        "pickingType": "ESHOPBOX",
        "scheduledTimeSlotFrom": "2019-09-01 09:23:02",
        "scheduledTimeSlotTo": "2019-09-02 02:23:02",
        "stockTransferNoteUrl": "https://test.com/transfer.pdf",
        "ewayBillUrl": "https://test.com/bill.pdf",
        "invoiceUrl": "https://test.com/invoice.pdf"
    },
    "createdAt": "2019-04-08T12:41:05.000+05:30",
    "updatedAt": "2019-04-08T12:41:05.000+05:30"
}
```

{% endtab %}
{% endtabs %}

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

```bash
curl -X PUT https://{{workspace}}.myeshopbox.com/api/v1/recall-consignmnet/:consignmentNumber \
     -H "Authorization: Bearer XXXX" \
     -H "Content-Type: application/json" \
     -d $'{
      "data": {
        "fromWarehouseId": "10",
        "refPartyID":"2",
        "itemsFileUrl":"https://abc.csv"
      }
    }'
```

{% endtab %}
{% endtabs %}
