# Update shipments to endpoints

> Webhooks API, PUT /easy-shipment: You can update container or BL or BK to one or multiple endpoints with their container / BL / BK numbers.

`PUT /easy-shipment` on the Webhooks API. Base URL: `https://api.sinay.ai/webhook/api/v1`.

You can update container or BL or BK to one or multiple endpoints with their container / BL / BK numbers. Note that all the container / bl / bk will be replaced by the one provided in your request. If you just wish to add shipments, use the POST endpoint.

## Request body

`application/json`, required.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `<key>` | object | No | — |
| `<key>.shipments` | array of object | Yes | Array of shipments. |
| `<key>.shipments[].number` | string | Yes | A shipment number. Can be a container number, a booking number or a Bill of Lading number. |
| `<key>.shipments[].sealine` | string | No | A SCAC code (Sealine identifier). Specifying it will ensure we retrieve information from the right shipping line. To retrieve the list of supported sealines and their corresponding code, use our GET /sealines endpoint. This parameter is strongly recommended. Using it will greatly improve our response time and avoid sealine autodetection issues. |
| `<key>.shipments[].type` | string | No | The shipment type (CT for container, BK for booking, BL for Bill of Lading) this parameter is recommended. Using it will improve our autodetection capabilities. One of: `BK`, `BL`, `CT`. |

::api-request-body
Example request body:

```json
{
  "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2": {
    "shipments": [
      {
        "number": "MSDU9813721",
        "sealine": "HLCU"
      },
      {
        "type": "BL",
        "number": "HLCUSHA2302AWXB8",
        "sealine": "HLCU"
      },
      {
        "number": "ZZZZ0000000"
      }
    ]
  }
}
```
::

## Responses

::api-response
---
status: "200"
description: ""
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `<key>` | object | No | — |
| `<key>.shipments` | array of object | Yes | Array of shipments. |
| `<key>.shipments[].number` | string | Yes | A shipment number. Can be a container number, a booking number or a Bill of Lading number. |
| `<key>.shipments[].sealine` | string | No | A SCAC code (Sealine identifier). Specifying it will ensure we retrieve information from the right shipping line. To retrieve the list of supported sealines and their corresponding code, use our GET /sealines endpoint. This parameter is strongly recommended. Using it will greatly improve our response time and avoid sealine autodetection issues. |
| `<key>.shipments[].type` | string | No | The shipment type (CT for container, BK for booking, BL for Bill of Lading) this parameter is recommended. Using it will improve our autodetection capabilities. One of: `BK`, `BL`, `CT`. |

Example response body:

```json
{
  "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2": {
    "shipments": [
      {
        "number": "MSDU9813721",
        "sealine": "HLCU"
      },
      {
        "type": "BL",
        "number": "HLCUSHA2302AWXB8",
        "sealine": "HLCU"
      },
      {
        "number": "ZZZZ0000000"
      }
    ]
  }
}
```

::

::api-response
---
status: "400"
description: Bad request
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::

::api-response
---
status: "403"
description: Forbidden
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::

::api-response
---
status: "429"
description: Too Many Requests
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::

::api-response
---
status: "500"
description: Internal Error
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::
