Skip to main content

How to Use the Cancel Expedition Endpoint

Guide on cancelling expeditions in Mailship in ON-HOLD status using the Cancel endpoint.

Updated over a year ago

The Cancel Expedition endpoint is a valuable feature that allows you to cancel an expedition that is currently in the ON-HOLD status. This guide will walk you through the process of using this endpoint.


API URL

The API URL for this endpoint is http://app.mailship.eu/api/expedition/{id}/cancel. The {id} in the URL should be replaced with the ID of the expedition you want to cancel.


Request Method

This endpoint uses the PUT HTTP method.


Request Payload

This endpoint does not require a request payload. The ID of the expedition to be cancelled is specified in the URL.

How to Use

To use this endpoint, you need to make a PUT request to the API URL, replacing {id} with the ID of the expedition you want to cancel. Here's an example of how to do this using curl:

curl -X PUT "http://app.mailship.eu/api/expedition/123456/cancel"

In this example, 123456 is the ID of the expedition to be cancelled.


Please note that an expedition can only be cancelled if it is in the ON-HOLD status. If the expedition is in any other status, the cancellation request will not be successful.


Response

The response from the endpoint will be a JSON object containing the details of the cancelled expedition. If the cancellation was successful, the expedition's status will be set to CANCELLED.


Conclusion

The Cancel Expedition endpoint is a useful tool that allows you to cancel an expedition that is in the ON-HOLD status. This can be particularly beneficial in situations where an expedition is no longer needed or if there has been a mistake in the expedition details. By understanding how to use this endpoint, you can effectively manage your expeditions and ensure they are processed correctly.


​

Did this answer your question?