Skip to main content
Skip table of contents

Editing of Expedition

Update Expedition

Modify details of an existing expedition. You can update fields such as address, value, and items.

Expedition updates are only available when the status is “on_hold”. First, use the endpoint PUT /api/expedition/{id}/rollback, then you can perform the update of expedition.

You can find more about changes on order in our Knowledge Base.

Request structure

Endpoint:

PUT /api/expedition/{id}

URL (prod):

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

Headers:

CODE
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Request body:

For detailed request body specifications, please refer to our API Doc.

The orderNumber field cannot be changed.

Request Example (cURL):

CODE
curl --location --request PUT "https://app.mailship.eu/api/expedition/42cf3202-a3a1-4c4c-8695-a6807efeae29" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {{token}}" \
--data "{
    \"note\": \"Handle with care. Fragile.\",
    \"items\": [
        {
            \"product\": \"dfcee9b9-97aa-497f-aaca-887f28aa68b9\",
            \"quantity\": 5
        }
    ],
    \"b2b\": true
}"

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 updated expedition entity in JSON format.

See more details in the API Doc.


Patch Expedition without rebooking

Only updates fields ref1, ref2, and ref3. These fields are used for further order specifications. Some sales channels require these values for correct integration (e.g., order number mapping).

Request structure

Endpoint:

PATCH /api/expedition/{id}

URL (prod):

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

Headers:

CODE
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Request body:

CODE
{
"ref1": "REFX123",
"ref2": "REFX123",
"ref3": "REFX123"
}

Request Example (cURL):

CODE
curl --location --request PATCH "https://app.mailship.eu/api/expedition/42cf3202-a3a1-4c4c-8695-a6807efeae29" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{token}}" \
--data "{
\"ref1\": \"REFX123\",
\"ref2\": \"REFX123\",
\"ref3\": \"REFX123\"
}"

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 updated expedition entity in JSON format.

See more details in the API Doc.


Rebook Expedition

Rebook an expedition entity. This is useful when bypassing FIFO (for higher-priority orders). This action is only available when the expedition status is one of the following:

  • on_hold

  • awaiting_reservation

  • incorrect

  • waiting_for_goods

  • to_be_confirmed

Request structure

Endpoint:

PATCH /api/expedition/{id}/rebook

URL (prod):

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

Headers:

CODE
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Request body:

None (this request does not require a body).

Request Example (cURL):

CODE
curl --location --request PATCH "https://app.mailship.eu/api/expedition/42cf3202-a3a1-4c4c-8695-a6807efeae29/rebook" \
--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.


Unbook all from Expedition

Unbook all reserved items in the expedition.

Request structure

Endpoint:

PATCH /api/expedition/{id}/unbook

URL (prod):

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

Headers:

CODE
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Request body:

None (this request does not require a body).

Request Example (cURL):

CODE
curl --location --request PATCH "https://app.mailship.eu/api/expedition/42cf3202-a3a1-4c4c-8695-a6807efeae29/unbook" \
--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.


Get Expedition Invoice

Retrieve details of a expedition invoice.

Request structure

Endpoint:

GET /api/expedition/{id}/invoice

URL (prod):

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

Headers:

CODE
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Request body:

None (this request does not require a body).

Request Example (cURL):

CODE
curl --location "https://app.mailship.eu/api/expedition/42cf3202-a3a1-4c4c-8695-a6807efeae29/invoice" \
--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 invoice.

See more details in the API Doc.


Upload Expedition Invoice

Upload Expedition Invoice.

Request structure

Endpoint:

POST /api/expedition/{id}/invoice

URL (prod):

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

Headers:

CODE
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Request body:

For detailed request body specifications, please refer to our API Doc.

Request Example (cURL):

CODE
curl --location "https://app.mailship.eu/api/expedition/42cf3202-a3a1-4c4c-8695-a6807efeae29/invoice" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--header "Authorization: Bearer {{token}}" \
--form "file=@\"crP1NUh5x/invoice.pdf\""

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.


Remove Expedition Invoice

Delete expedition invoice.

Request structure

Endpoint:

DELETE /api/expedition/{id}/invoice

URL (prod):

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

Headers:

CODE
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Request body:

None (this request does not require a body).

Request Example (cURL):

CODE
curl --location --request DELETE "https://app.mailship.eu/api/expedition/42cf3202-a3a1-4c4c-8695-a6807efeae29/invoice" \
--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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.