Sent when the documents retrieved for a shipment change: a document arrives or finishes, retrieval completes or fails, or a finished retrieval reopens. details.documents is the full, current collection that GET /documents/{resource_id} returns under data. Each file usually carries content.url, set when this delivery was sent: a Shipwell link valid for about 10 minutes, or the carrier's own link, which expires on the carrier's schedule, so download it right away. It is null when no link is available. Each document's base64_link (its self_link with ?encoding=base64) returns the files inline from the API instead, up to 50 MB per file. Replace your copy rather than reconstructing it from differences. Subscribe with "documents.updated" in event_names; it must be enabled for your company.
Delivered at least once: the same event may arrive more than once, so dedupe on id, and ignore any sequence lower than the highest you have applied.
Headers on every delivery
| Header | Value |
|---|---|
Content-Type |
application/json; charset=utf-8 |
User-Agent |
shipwell-webhooks |
X-Shipwell-Timestamp |
ISO-8601 time the request was signed |
X-Shipwell-Signature |
hex HMAC-SHA256 of "{X-Shipwell-Timestamp};{raw body}", keyed with your secret |
Answer with any 2xx within 10 seconds. Timeouts, network errors, 408, 429 and 5xx are
retried after 30s, 2m, 10m, 30m, 1h, 3h, 6h, 12h and 24h: 10 attempts over about 47 hours. A
redirect (3xx) or any other 4xx is not retried, and 410 Gone disables the webhook. Delivery
is at least once: ignore an id you have already processed.
Accepted. Any 2xx stops retries.
{- "id": "string",
- "occurred_at": "2019-08-24T14:15:22Z",
- "webhook_id": "string",
- "source": {
- "publishing_system": "genesis",
- "company_id": "string",
- "environment": "string"
}, - "custom_data": null,
- "event_name": "documents.updated",
- "sequence": 0,
- "details": {
- "resource_id": "string",
- "documents": {
- "resource_id": "string",
- "resource_type": "document_collection",
- "self_link": "string",
- "status": "PROCESSING",
- "is_terminal": true,
- "documents": [
- {
- "id": "string",
- "resource_type": "document",
- "document_type": "string",
- "name": null,
- "status": "CREATED",
- "completed_at": null,
- "self_link": "string",
- "base64_link": "string",
- "files": [
- {
- "id": "string",
- "format": "PNG",
- "filename": null,
- "size_in_bytes": 0,
- "content": null
}
]
}
], - "errors": [
- {
- "detail": "string"
}
]
}
}
}