Create a new load
POST/loads
Create a new load.
Request
- application/json
Body
required
setName stringrequired
loadType stringrequired
maxWeight numberrequired
loadPositions string[]required
properties object
Responses
- 201
- 400
- 401
- 403
- 409
- 500
Load created
- application/json
- Schema
- Example (from schema)
Schema
_id uuid
name string
setName string
loadType string
maxWeight number
loadPositions string[]
properties object
createdAt date-time
updatedAt date-time
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"setName": "string",
"loadType": "string",
"maxWeight": 0,
"loadPositions": [
"string"
],
"properties": {},
"createdAt": "2025-06-05T13:40:40.614Z",
"updatedAt": "2025-06-05T13:40:40.614Z"
}
Bad Request due to validation errors in the request body
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Validation failed.",
"errors": [
{
"field": "name",
"message": "name is required."
},
{
"field": "setName",
"message": "setName is required."
},
{
"field": "loadType",
"message": "loadType is required"
},
{
"field": "loadPositions",
"message": "loadPositions can not be empty"
},
{
"field": "maxWeight",
"message": "maxWeight is required"
}
]
}
{
"message": "Validation failed.",
"errors": [
{
"field": "name",
"message": "name is required."
},
{
"field": "setName",
"message": "setName is required."
},
{
"field": "loadType",
"message": "loadType is required"
},
{
"field": "loadPositions",
"message": "loadPositions can not be empty"
},
{
"field": "maxWeight",
"message": "maxWeight is required"
}
]
}
Unauthorized.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Authentication token not provided."
}
{
"message": "Authentication token not provided."
}
Forbidden.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Access to this resource is forbidden."
}
{
"message": "Access to this resource is forbidden."
}
A load with the given details already exists.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "A load with the given details already exists."
}
{
"message": "A load with the given details already exists."
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Internal Server Error. Please try again later."
}
{
"message": "Internal Server Error. Please try again later."
}
Loading...