Parcel Delivery System API (Amanises) (v0.0.0)
Download OpenAPI specification:Download
API for managing parcel deliveries via automated locker systems.
API domain: https://bytetype-cea685bb8e38.herokuapp.com
Login a user
Request Body schema: application/json
| username required | string The username of the account. |
| password required | string The password of the account. |
Responses
Request samples
- Payload
{- "username": "Caden Cicaro",
- "password": "CadenPassword"
}Response samples
- 200
{- "username": "Caden Cicaro",
- "email": "Cicaro@noreply.com",
- "phone": "9876543210",
- "address": "47 Resonance Ridge, Cicadaville, Echo Valley, EV 90321",
- "roles": [
- "ROLE_USER",
- "ROLE_DRIVER"
]
}Register a new user
Request Body schema: application/json
| username required | string The username for the new account. |
string The email address of the new account. | |
| password required | string The secret password for the new account. |
| address required | string The Physical address of the account. |
| roles | Array of strings (RoleType) Items Enum: "ROLE_GUEST" "ROLE_USER" "ROLE_DRIVER" |
Responses
Request samples
- Payload
{- "username": "Caden Cicaro",
- "email": "Cicaro@noreply.com",
- "password": "CadenPassword",
- "address": "123 Main St, Anytown, AN 12345",
- "roles": [
- [
- "ROLE_USER",
- "ROLE_DRIVER"
]
]
}Response samples
- 200
- 400
{- "message": "User registered successfully!"
}Response samples
- 200
- 400
{- "id": 1,
- "username": "Caden Cicaro",
- "email": "Cicaro@noreply.com",
- "phone": "9876543210",
- "address": "47 Resonance Ridge, Cicadaville, Echo Valley, EV 90321",
- "roles": [
- [
- "ROLE_USER",
- "ROLE_DRIVER"
]
], - "parcels": [
- {
- "sender": {
- "id": 1,
- "username": "Caden Cicaro",
- "email": "Cicaro@noreply.com",
- "phone": "9876543210",
- "address": "47 Resonance Ridge, Cicadaville, Echo Valley, EV 90321"
}, - "recipient": {
- "id": 2,
- "username": "Lara Skylarke",
- "email": "Skylarke@noreply.com",
- "phone": "1234567890",
- "address": "152 Harmony Heights, Larkspur Lane, Melodia, ME 41759"
}, - "width": 50,
- "height": 30,
- "depth": 20,
- "mass": 4.5
}
]
}Get a parcel by ID
Retrieve detailed information about a parcel using its unique identifier.
path Parameters
| id required | integer <int64> The unique ID of the parcel. |
Responses
Response samples
- 200
{- "id": 123,
- "sender": {
- "id": 101,
- "username": "john_doe",
- "email": "john@example.com",
- "phone": "1234567890",
- "address": "123 Main St"
}, - "recipient": {
- "id": 102,
- "username": "jane_doe",
- "email": "jane@example.com",
- "phone": "0987654321",
- "address": "456 Elm St"
}, - "width": 30,
- "height": 20,
- "depth": 15,
- "mass": 2.5,
- "readyForPickupAt": "2023-11-01T09:00:00Z",
- "pickedUpAt": "2023-11-01T11:00:00Z",
- "status": "shipped",
- "pickupCode": "PK123456"
}Create and delivery a new parcel
Request Body schema: application/json
object (UserPayload) UserPayload includes user details as they appear in a parcel response. | |
object (UserPayload) UserPayload includes user details as they appear in a parcel response. | |
| width | number <double> The width of the parcel. |
| height | number <double> The height of the parcel. |
| depth | number <double> The depth of the parcel. |
| mass | number <double> The mass of the parcel. |
| readyForPickupAt | string <date-time> Expected time for the parcel to be ready for pickup. |
| expectedLockerId | Array of integers <int64> [ items <int64 > ] List of expected locker identifiers for the parcel. |
Responses
Request samples
- Payload
{- "sender": {
- "id": 1,
- "username": "Caden Cicaro",
- "email": "Cicaro@noreply.com",
- "phone": "9876543210",
- "address": "47 Resonance Ridge, Cicadaville, Echo Valley, EV 90321"
}, - "recipient": {
- "id": 2,
- "username": "Lara Skylarke",
- "email": "Skylarke@noreply.com",
- "phone": "1234567890",
- "address": "152 Harmony Heights, Larkspur Lane, Melodia, ME 41759"
}, - "width": 50,
- "height": 30,
- "depth": 20,
- "mass": 4.5,
- "readyForPickupAt": "2019-08-24T14:15:22Z",
- "expectedLockerId": [
- 0
]
}Response samples
- 200
{- "sender": {
- "id": 1,
- "username": "Caden Cicaro",
- "email": "Cicaro@noreply.com",
- "phone": "9876543210",
- "address": "47 Resonance Ridge, Cicadaville, Echo Valley, EV 90321"
}, - "recipient": {
- "id": 2,
- "username": "Lara Skylarke",
- "email": "Skylarke@noreply.com",
- "phone": "1234567890",
- "address": "152 Harmony Heights, Larkspur Lane, Melodia, ME 41759"
}, - "width": 50,
- "height": 30,
- "depth": 20,
- "mass": 4.5,
- "id": 0,
- "status": [
- "DELIVERED"
], - "readyForPickupAt": "2019-08-24T14:15:22Z",
- "deliveryCode": "string",
- "expectedLocker": [
- {
- "id": 1,
- "location": "Central Station, Metropolis, MT",
- "cabinets": [
- {
- "id": 1,
- "isLocked": true
}, - {
- "id": 2,
- "isLocked": false
}
]
}
]
}Arrive a parcel
Request Body schema: application/json
| id | integer <int64> The unique identifier of the parcel. |
| readyForPickupAt | string <date-time> The time when the parcel is ready for pickup. |
| cabinetId | integer <int64> The identifier of the cabinet where the parcel is stored. |
Responses
Request samples
- Payload
{- "id": 0,
- "readyForPickupAt": "2019-08-24T14:15:22Z",
- "cabinetId": 0
}Response samples
- 200
{- "sender": {
- "id": 1,
- "username": "Caden Cicaro",
- "email": "Cicaro@noreply.com",
- "phone": "9876543210",
- "address": "47 Resonance Ridge, Cicadaville, Echo Valley, EV 90321"
}, - "recipient": {
- "id": 2,
- "username": "Lara Skylarke",
- "email": "Skylarke@noreply.com",
- "phone": "1234567890",
- "address": "152 Harmony Heights, Larkspur Lane, Melodia, ME 41759"
}, - "width": 50,
- "height": 30,
- "depth": 20,
- "mass": 4.5,
- "id": 0,
- "status": [
- "DELIVERED"
], - "pickupCode": "string"
}Pick up a parcel
Request Body schema: application/json
| id | integer <int64> The unique identifier of the parcel. |
| pickedUpAt | string <date-time> The exact time when the parcel was picked up. |
| pickupCode | string The code required to pick up the parcel. |
Responses
Request samples
- Payload
{- "id": 0,
- "pickedUpAt": "2019-08-24T14:15:22Z",
- "pickupCode": "string"
}Response samples
- 200
{- "sender": {
- "id": 1,
- "username": "Caden Cicaro",
- "email": "Cicaro@noreply.com",
- "phone": "9876543210",
- "address": "47 Resonance Ridge, Cicadaville, Echo Valley, EV 90321"
}, - "recipient": {
- "id": 2,
- "username": "Lara Skylarke",
- "email": "Skylarke@noreply.com",
- "phone": "1234567890",
- "address": "152 Harmony Heights, Larkspur Lane, Melodia, ME 41759"
}, - "width": 50,
- "height": 30,
- "depth": 20,
- "mass": 4.5,
- "id": 0,
- "status": [
- "DELIVERED"
], - "pickedUpAt": "2019-08-24T14:15:22Z"
}Create a locker with cabinets
Request Body schema: application/json
| location | string The location of the locker. |
| size | integer <int32> The size of the locker. |
Responses
Request samples
- Payload
{- "location": "string",
- "size": 0
}Response samples
- 200
{- "location": "string",
- "cabinets": [
- {
- "id": 1,
- "isLocked": false
}
]
}