Cargotime

История доставки вебхуков

Скачать OpenAPI
GET
/v2/webhook-notifications

Возвращает историю доставок вебхуков на ваши callback_url.

По умолчанию в ответ попадают только неуспешные доставки. Чтобы выбрать другой статус, передайте status=pending или status=delivered. Параметр webhook_id ограничивает результаты одним вебхуком.

Результаты разбиты на страницы. В data ответа — объект с полями data, meta и links.

Авторизация

api_key
api_key<token>

Передаётся в: query

Параметры запроса

status?string

Статус доставки. По умолчанию — failed.

По умолчанию"failed"

Значение из

  • "pending"
  • "delivered"
  • "failed"
webhook_id?string

Идентификатор вебхука, по которому нужно отфильтровать доставки

Форматuuid
page?number

Номер страницы

Диапазон1 <= value <= 100000000
По умолчанию1
limit?number

Количество доставок на странице

Диапазон1 <= value <= 100
По умолчанию50

Тело ответа

application/json

curl -X GET "https://example.com/v2/webhook-notifications?status=failed&webhook_id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&page=1&limit=50"
{  "success": true,  "data": {    "data": [      {        "id": "cccccccc-dddd-eeee-ffff-aaaaaaaaaaaa",        "webhook_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",        "event_type": "tracking.delivered",        "payload": {          "id": "cccccccc-dddd-eeee-ffff-aaaaaaaaaaaa",          "type": "tracking.delivered",          "api_version": "2026-07-09",          "created_at": "2026-07-08T13:11:22.758Z",          "resource": {            "tracked_item_id": "eeeeeeee-ffff-aaaa-bbbb-cccccccccccc",            "track_number": {              "type": "container",              "value": "MSBU6501445"            },            "company": "Mediterranean Shipping Company",            "company_scac": "MSCU"          },          "data": {            "shipment_status": "DELIVERED",            "route": {              "origin": "Ho Chi Minh City, VN",              "pol": "Wilmington, US",              "pod": "Long Beach, US",              "destination": "Dallas, US"            },            "final_location": "DALLAS, US",            "current_position": null,            "event": {              "location": "DALLAS, US",              "status": "Delivered",              "status_code": "CDC",              "date": "2026-07-07T00:00:00",              "actual": true,              "vessel": null,              "voyage": null            }          },          "changes": []        },        "status": "delivered",        "attempt_count": 1,        "next_attempt_at": null,        "delivered_at": "2026-07-08T13:16:38.565Z",        "created_at": "2026-07-08T13:16:38.371Z",        "webhook": {          "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",          "callback_url": "https://example.com/webhooks/cargotime",          "is_active": true,          "event_types": [            "tracking.eta_update",            "tracking.history_update",            "tracking.info_found",            "tracking.info_not_found",            "tracking.auto_archiving",            "tracking.delivered"          ],          "created_at": "2026-07-08T09:39:36.311Z",          "updated_at": "2026-07-08T13:10:43.554Z"        },        "attempts": [          {            "id": "dddddddd-eeee-ffff-aaaa-bbbbbbbbbbbb",            "notification_id": "cccccccc-dddd-eeee-ffff-aaaaaaaaaaaa",            "attempt_number": 1,            "http_status": 200,            "error_message": null,            "attempted_at": "2026-07-08T13:16:38.396Z"          }        ]      }    ],    "meta": {      "itemsPerPage": 50,      "totalItems": 1,      "currentPage": 1,      "totalPages": 1,      "sortBy": [        [          "created_at",          "DESC"        ],        [          "id",          "DESC"        ]      ],      "searchBy": [],      "search": "",      "select": []    },    "links": {      "first": "/v2/webhook-notifications?page=1&limit=50&status=failed",      "previous": null,      "current": "/v2/webhook-notifications?page=1&limit=50&status=failed",      "next": null,      "last": "/v2/webhook-notifications?page=1&limit=50&status=failed"    }  },  "status": "OK",  "status_description": "Запрос выполнен успешно"}