Developer Portal
Breadcrumbs

Deletion / Cancellation / Rollback of Expedition

Rollback expedition

Rollback is an action that returns the order to the “on_hold” status. You can keep the order in this status or update it before sending it to WMS.


Request structure

Endpoint:

PUT /api/expedition/{id}/rollback

URL (prod):

https://app.mailship.eu/api/expedition/{id}/rollback

Headers:

Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Request body:

None (this request does not require a body).

Request Example (cURL):

curl --location --request PUT "https://app.mailship.eu/api/expedition/42cf3202-a3a1-4c4c-8695-a6807efeae29/rollback" \
--header "Accept: application/json" \
--header "Authorization: Bearer {{token}}"

Path parameter:

Parameter

Type

Required

Description

id

string

The unique expedition identifier. Example: 42cf3202-a3a1-4c4c-8695-a6807efeae29

 

Response

If successful, the API returns the expedition entity in JSON format.

See more details in the API Doc.



Cancel Expedition

Cancels an expedition in Mailship. The expedition status is updated to canceled but remains in the system.

 

Request structure

Endpoint:

PUT /api/expedition/{id}/cancel

URL (prod):

https://app.mailship.eu/api/expedition/{id}/cancel

Headers:

Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Request body:

None (this request does not require a body).

Request Example (cURL):

curl --location --request PUT "https://app.mailship.eu/api/expedition/42cf3202-a3a1-4c4c-8695-a6807efeae29/cancel" \
--header "Authorization: Bearer {{token}}"

Path parameter:

Parameter

Type

Required

Description

id

string

The unique expedition identifier. Example: 42cf3202-a3a1-4c4c-8695-a6807efeae29

 

Response

If successful, the API returns 204 No Content.

See more details in the API Doc.

 


Cancel multiple Expeditions

Cancels multiple expeditions in Mailship. The expeditions will receive the “canceled” status but remain in the system.

 

Request structure

Endpoint:

PUT /api/expedition/cancel

URL (prod):

https://app.mailship.eu/api/expedition/cancel

Headers:

Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Request body:

An array of expedition IDs for cancellation.

Request body Example:

curl --location --request PUT "https://app.mailship.eu/api/expedition/cancel" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {{token}}" \
--data "{
  \"expeditions\": [
    \"924504ca-68ae-4160-a99a-f21b837e02a5\",
    \"42cf3202-a3a1-4c4c-8695-a6807efeae29\"
  ]
}"

 

Response

If successful, the API returns 204 No Content.

See more details in the API Doc.



Delete Expedition

Permanently removes an expedition from Mailship.


Request structure

Endpoint:

PUT /api/expedition/{id}/delete

URL (prod):

https://app.mailship.eu/api/expedition/{id}/delete

Headers:

Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Request body:

None (this request does not require a body).

Request Example (cURL):

curl --location --request PUT "https://app.mailship.eu/api/expedition/42cf3202-a3a1-4c4c-8695-a6807efeae29/delete" \
--header "Authorization: Bearer {{token}}"

Path parameter:

Parameter

Type

Required

Description

id

string

The unique expedition identifier. Example: 42cf3202-a3a1-4c4c-8695-a6807efeae29

 

Response

If successful, the API returns 204 No Content.

See more details in the API Doc.