Skip to main content

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

Authentication

User authentication operations

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

Content type
application/json
{
  • "username": "Caden Cicaro",
  • "password": "CadenPassword"
}

Response samples

Content type
application/json
{
  • "username": "Caden Cicaro",
  • "email": "Cicaro@noreply.com",
  • "phone": "9876543210",
  • "address": "47 Resonance Ridge, Cicadaville, Echo Valley, EV 90321",
  • "roles": [
    ]
}

Register a new user

Request Body schema: application/json
username
required
string

The username for the new account.

email
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

Content type
application/json
{
  • "username": "Caden Cicaro",
  • "email": "Cicaro@noreply.com",
  • "password": "CadenPassword",
  • "address": "123 Main St, Anytown, AN 12345",
  • "roles": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "User registered successfully!"
}

Logout user

Responses

Response samples

Content type
application/json
{
  • "message": "User registered successfully!"
}

Remove user account

path Parameters
id
required
integer

Responses

Response samples

Content type
application/json
{
  • "message": "User registered successfully!"
}

User

Operations about user

Get user detail

path Parameters
id
required
integer

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "username": "Caden Cicaro",
  • "email": "Cicaro@noreply.com",
  • "phone": "9876543210",
  • "address": "47 Resonance Ridge, Cicadaville, Echo Valley, EV 90321",
  • "roles": [
    ],
  • "parcels": [
    ]
}

Parcel

Operations for parcels

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

Content type
application/json
{
  • "id": 123,
  • "sender": {
    },
  • "recipient": {
    },
  • "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"
}

Delete a parcel

path Parameters
id
required
integer <int64>

The ID of the parcel to delete.

Responses

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

Content type
application/json
{
  • "sender": {
    },
  • "recipient": {
    },
  • "width": 50,
  • "height": 30,
  • "depth": 20,
  • "mass": 4.5,
  • "readyForPickupAt": "2019-08-24T14:15:22Z",
  • "expectedLockerId": [
    ]
}

Response samples

Content type
application/json
{
  • "sender": {
    },
  • "recipient": {
    },
  • "width": 50,
  • "height": 30,
  • "depth": 20,
  • "mass": 4.5,
  • "id": 0,
  • "status": [
    ],
  • "readyForPickupAt": "2019-08-24T14:15:22Z",
  • "deliveryCode": "string",
  • "expectedLocker": [
    ]
}

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

Content type
application/json
{
  • "id": 0,
  • "readyForPickupAt": "2019-08-24T14:15:22Z",
  • "cabinetId": 0
}

Response samples

Content type
application/json
{
  • "sender": {
    },
  • "recipient": {
    },
  • "width": 50,
  • "height": 30,
  • "depth": 20,
  • "mass": 4.5,
  • "id": 0,
  • "status": [
    ],
  • "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

Content type
application/json
{
  • "id": 0,
  • "pickedUpAt": "2019-08-24T14:15:22Z",
  • "pickupCode": "string"
}

Response samples

Content type
application/json
{
  • "sender": {
    },
  • "recipient": {
    },
  • "width": 50,
  • "height": 30,
  • "depth": 20,
  • "mass": 4.5,
  • "id": 0,
  • "status": [
    ],
  • "pickedUpAt": "2019-08-24T14:15:22Z"
}

Locker

Operation for lockers

Search a locker by location

path Parameters
location
required
string

The location of the parcel.

Responses

Response samples

Content type
application/json
{
  • "location": "string",
  • "cabinets": [
    ]
}

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

Content type
application/json
{
  • "location": "string",
  • "size": 0
}

Response samples

Content type
application/json
{
  • "location": "string",
  • "cabinets": [
    ]
}