shipping.nc API

Incidents

Server

List incidents

GET
https://api.shipping.nc
/v1/dispatch/incidents

Newest first, cursor paginated. Open incidents unless status says otherwise. Allowed to carrier admins and dispatchers.

List incidents › query Parameters

limit
​integer · min: 1 · max: 100

Maximum number of items in the page.

Example: 25
Default: 25
cursor
​string

The next_cursor of the previous page, passed back as is. Omit it to get the first page.

Example: WyIyMDI2LTExLTExVDA4OjQyOjEwLjAwMFoiLCIwYjZmOWMxZS01ZDJhLTRjM2UtOWYxYS03ZTJkOGM0YjZhMTAiXQ
status
​string · enum

Open incidents (the default), resolved ones, or all.

Enum values:
open
resolved
all
Default: open
kind
​string

Comma-separated incident kinds to keep.

Example: damaged,lost
opened_from
​

Opened at or after this instant, or from the start of this Noumea day.

opened_to
​

Opened before this instant, or up to the end of this Noumea day.

shipper_account_id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-…

Keep the incidents of this shipper account.

Example: 5c1d7e2a-8b3f-4a6e-b2d9-1f0e3c4a5b67
q
​string · minLength: 1 · maxLength: 100

Held anywhere in the tracking number or the description, ignoring case.

Example: colis

List incidents › Headers

x-correlation-id
​string · maxLength: 128

Your request identifier. Generated when absent, and always echoed in the response header.

List incidents › Responses

One page of incidents.

​object[] · required
next_cursor
​string | null · required

Pass it as cursor to get the next page. null on the last page.


Open an incident

POST
https://api.shipping.nc
/v1/dispatch/incidents

Moves the shipment to incident and opens an incident on it. A driver opens one by recording the incident status with an incident report on the shipment instead. Allowed to carrier admins and dispatchers.

Open an incident › Headers

x-correlation-id
​string · maxLength: 128

Your request identifier. Generated when absent, and always echoed in the response header.

Open an incident › Request Body

shipment_id
​string · minLength: 1 · required
kind
​string · enum · required
Enum values:
damaged
lost
address_not_found
recipient_absent
refused
other
description
​string · minLength: 1 · maxLength: 1000 · required

Open an incident › Responses

The opened incident.

id
​string · required
shipment_id
​string · required
tracking_number
​string · required
shipper_account_id
​string | null · required
kind
​string · enum · required
Enum values:
damaged
lost
address_not_found
recipient_absent
refused
other
description
​string | null · required
status
​string · enum · required
Enum values:
open
resolved
opened_at
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required
tracking_event_id
​string | null · required

The incident tracking event that opened it. Its photos are the proofs of that event.

​object · required
previous_shipment_status
​string · enum · required

The shipment status before the incident.

Enum values:
created
picked_up
in_transit
out_for_delivery
delivered
available_for_pickup
collected
delivery_failed
​object | null · required
​object | null · required

Count open incidents

GET
https://api.shipping.nc
/v1/dispatch/incidents/counts

The number shown next to the incident queue. Allowed to carrier admins and dispatchers.

Count open incidents › Headers

x-correlation-id
​string · maxLength: 128

Your request identifier. Generated when absent, and always echoed in the response header.

Count open incidents › Responses

The counts.

open
​integer · min: 0 · max: 9007199254740991 · required

Get an incident

GET
https://api.shipping.nc
/v1/dispatch/incidents/{id}

The incident with its activity, newest first. Allowed to carrier admins and dispatchers.

Get an incident › path Parameters

id
​string · uuid · required

The incident id.

Get an incident › Headers

x-correlation-id
​string · maxLength: 128

Your request identifier. Generated when absent, and always echoed in the response header.

Get an incident › Responses

The incident.

id
​string · required
shipment_id
​string · required
tracking_number
​string · required
shipper_account_id
​string | null · required
kind
​string · enum · required
Enum values:
damaged
lost
address_not_found
recipient_absent
refused
other
description
​string | null · required
status
​string · enum · required
Enum values:
open
resolved
opened_at
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required
tracking_event_id
​string | null · required

The incident tracking event that opened it. Its photos are the proofs of that event.

​object · required
previous_shipment_status
​string · enum · required

The shipment status before the incident.

Enum values:
created
picked_up
in_transit
out_for_delivery
delivered
available_for_pickup
collected
delivery_failed
​object | null · required
​object | null · required
​object[] · required

Newest first.


Add a note to an incident

POST
https://api.shipping.nc
/v1/dispatch/incidents/{id}/notes

Adds a line to the activity. Allowed to carrier admins and dispatchers.

Add a note to an incident › path Parameters

id
​string · uuid · required

The incident id.

Add a note to an incident › Headers

x-correlation-id
​string · maxLength: 128

Your request identifier. Generated when absent, and always echoed in the response header.

Add a note to an incident › Request Body

note
​string · minLength: 1 · maxLength: 1000 · required

Add a note to an incident › Responses

The incident with its activity.

id
​string · required
shipment_id
​string · required
tracking_number
​string · required
shipper_account_id
​string | null · required
kind
​string · enum · required
Enum values:
damaged
lost
address_not_found
recipient_absent
refused
other
description
​string | null · required
status
​string · enum · required
Enum values:
open
resolved
opened_at
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required
tracking_event_id
​string | null · required

The incident tracking event that opened it. Its photos are the proofs of that event.

​object · required
previous_shipment_status
​string · enum · required

The shipment status before the incident.

Enum values:
created
picked_up
in_transit
out_for_delivery
delivered
available_for_pickup
collected
delivery_failed
​object | null · required
​object | null · required
​object[] · required

Newest first.


Assign an incident

PUT
https://api.shipping.nc
/v1/dispatch/incidents/{id}/assignee

Sets who handles an open incident, or clears it with null. Allowed to carrier admins and dispatchers.

Assign an incident › path Parameters

id
​string · uuid · required

The incident id.

Assign an incident › Headers

x-correlation-id
​string · maxLength: 128

Your request identifier. Generated when absent, and always echoed in the response header.

Assign an incident › Request Body

assignee_user_id
​string | null · minLength: 1 · required

The member who handles the incident, or null to unassign.

Example: c47e2b19-0d3a-4e6f-9b81-2a5d7c3e9f08

Assign an incident › Responses

The incident with its activity.

id
​string · required
shipment_id
​string · required
tracking_number
​string · required
shipper_account_id
​string | null · required
kind
​string · enum · required
Enum values:
damaged
lost
address_not_found
recipient_absent
refused
other
description
​string | null · required
status
​string · enum · required
Enum values:
open
resolved
opened_at
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required
tracking_event_id
​string | null · required

The incident tracking event that opened it. Its photos are the proofs of that event.

​object · required
previous_shipment_status
​string · enum · required

The shipment status before the incident.

Enum values:
created
picked_up
in_transit
out_for_delivery
delivered
available_for_pickup
collected
delivery_failed
​object | null · required
​object | null · required
​object[] · required

Newest first.


Resolve an incident

POST
https://api.shipping.nc
/v1/dispatch/incidents/{id}/resolution

Moves the shipment out of incident to next_status and closes the incident. With notify_shipper, the shipper account gets an email. Allowed to carrier admins and dispatchers.

Resolve an incident › path Parameters

id
​string · uuid · required

The incident id.

Resolve an incident › Headers

x-correlation-id
​string · maxLength: 128

Your request identifier. Generated when absent, and always echoed in the response header.

Resolve an incident › Request Body

next_status
​string · enum · required

The status the shipment moves to.

Enum values:
in_transit
out_for_delivery
available_for_pickup
returned_to_sender
cancelled
note
​string · maxLength: 1000
notify_shipper
​boolean

Email the shipper account about the resolution.

Default: false

Resolve an incident › Responses

The resolved incident with its activity.

id
​string · required
shipment_id
​string · required
tracking_number
​string · required
shipper_account_id
​string | null · required
kind
​string · enum · required
Enum values:
damaged
lost
address_not_found
recipient_absent
refused
other
description
​string | null · required
status
​string · enum · required
Enum values:
open
resolved
opened_at
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required
tracking_event_id
​string | null · required

The incident tracking event that opened it. Its photos are the proofs of that event.

​object · required
previous_shipment_status
​string · enum · required

The shipment status before the incident.

Enum values:
created
picked_up
in_transit
out_for_delivery
delivered
available_for_pickup
collected
delivery_failed
​object | null · required
​object | null · required
​object[] · required

Newest first.