Record a delivery event
POST/api/delivery-events
Records a tracking event and moves the package status to event_type. Requires the delivery.tracking plan feature; a signed-in user also needs the deliveries or scan permission.
With waybill_id the event is recorded on each package of the waybill and the response carries the event of the first package. Every package is checked first: a conflict on any of them fails the request with 409 and records nothing.
An event conflicts when the package already has an event of a later stage, or any event at or after event_time.
If photos fail to upload, the event is still created: the response is 201 with _podUploadError set.
Request
Responses
- 201
- 400
- 401
- 403
- 404
- 409
- 422
- 500
The created event.
The body is not valid JSON, neither waybill_id nor package_id is given, an ID is not a UUID, event_type is missing or not accepted (e.g. draft), secondary_event_type is unknown or doesn't match event_type, event_time can't be parsed, or a photo is not an image data URL.
No valid signature or session.
The plan lacks delivery.tracking, or the signed-in user lacks the deliveries and scan permissions.
The waybill or package doesn't exist or isn't visible to you (Waybill not found, Package not found).
A later event already exists on the package (or on any package of the waybill); resend with ignore_conflicts: true to record it anyway.
The waybill has no packages to record the event on (No packages found for this waybill).
The event could not be created.