Skip to main content

Create Shipment for Customer

Overview

{
"name": "Create Shipment",
"route": "POST /customer/shipment",
"description": "Create a shipment request for a customer using an address and a parcel.",
"parameters": [],
"body": {
"schema": {
"address": {
"id": "string"
},
"parcel": {
"id": "string"
}
},
"example": {
"address": {
"id": "5"
},
"parcel": {
"id": "1"
}
}
},
"response": {
"success": {
"code": 201,
"description": "Returns the created shipment object"
},
"error": [
{
"code": 400,
"description": "Bad Request - Invalid input"
},
{
"code": 401,
"description": "Unauthorized - User is not authenticated"
},
{
"code": 403,
"description": "Forbidden - User does not have permission to create a shipment"
},
{
"code": 404,
"description": "Not Found - Address or parcel not found or doesn't belong to the customer"
}
]
},
"notes": [
"This endpoint requires authentication (InternalGuard and AuthorizationGuard)."
]
}