MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

This API is not authenticated.

User profile

Create profile account

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/auth/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"full_name\": \"architecto\",
    \"email\": \"gbailey@example.net\",
    \"phone\": \"architecto\",
    \"tin\": \"architecto\",
    \"passport\": \"architecto\",
    \"address\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/auth/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "full_name": "architecto",
    "email": "gbailey@example.net",
    "phone": "architecto",
    "tin": "architecto",
    "passport": "architecto",
    "address": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/auth/register';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'full_name' => 'architecto',
            'email' => 'gbailey@example.net',
            'phone' => 'architecto',
            'tin' => 'architecto',
            'passport' => 'architecto',
            'address' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Account created successfully",
    "data": {
        "full_name": "Thembo Charles",
        "email": "ashley7520charles@gmail.com",
        "phone": "0787444081",
        "tin": "110023452",
        "passport": "65748",
        "address": "Kampala",
        "updated_at": "2025-12-05T06:42:09.000000Z",
        "created_at": "2025-12-05T06:42:09.000000Z",
        "id": 1
    }
}
 

Request      

POST api/auth/register

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

full_name   string     

Example: architecto

email   string     

Example: gbailey@example.net

phone   string     

Example: architecto

tin   string  optional    

Example: architecto

passport   string  optional    

Example: architecto

address   string  optional    

Example: architecto

Send OTP

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/auth/send_otp" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"validation_text\": \"Email or Password\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/auth/send_otp"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "validation_text": "Email or Password"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/auth/send_otp';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'validation_text' => 'Email or Password',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
         "status": "success",
          "message": "An OTP has been sent to your phone and email",
      }
  }
 

Request      

POST api/auth/send_otp

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

validation_text   string     

Example: Email or Password

Verify OTP

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/auth/verify_otp" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"validation_text\": \"Email or phone number\",
    \"otp\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/auth/verify_otp"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "validation_text": "Email or phone number",
    "otp": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/auth/verify_otp';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'validation_text' => 'Email or phone number',
            'otp' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
         "status": "success",
          "message": "An OTP has been sent to your phone and email",
      }
  }
 

Request      

POST api/auth/verify_otp

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

validation_text   string     

Example: Email or phone number

otp   string     

Example: architecto

Set or change password

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/auth/change_password" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"password\": \"|]|{+-\",
    \"password_confirmation\": \"architecto\",
    \"user_id\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/auth/change_password"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "password": "|]|{+-",
    "password_confirmation": "architecto",
    "user_id": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/auth/change_password';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'password' => '|]|{+-',
            'password_confirmation' => 'architecto',
            'user_id' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
         "status": "success",
          "message": "Account Password has been reset",
      }
  }
 

Request      

POST api/auth/change_password

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

password   string     

Example: |]|{+-

password_confirmation   string     

Example: architecto

user_id   required  optional    

Example: architecto

Login

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/auth/login" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"password\": \"|]|{+-\",
    \"email\": \"gbailey@example.net\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/auth/login"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "password": "|]|{+-",
    "email": "gbailey@example.net"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/auth/login';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'password' => '|]|{+-',
            'email' => 'gbailey@example.net',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Successfully loged in",
    "authorization": {
        "token": "1|ipsfUoT7lmvPZaeKNtyU5GDIarzgv084cW0RLfxl80a3b2ec",
        "token_type": "Bearer"
    },
    "data": {
        "id": 1,
        "full_name": "Thembo Charles",
        "email": "ashley7520charles@gmail.com",
        "phone": "0787444081",
        "email_verified_at": null,
        "tin": "110023452",
        "passport": "65748",
        "address": "Kampala",
        "otp": "4782",
        "status": "active",
        "user_type": "user",
        "created_at": "2025-12-05T06:42:09.000000Z",
        "updated_at": "2025-12-05T07:58:28.000000Z",
        "deleted_at": null
    }
}
 

Request      

POST api/auth/login

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

password   string     

Example: |]|{+-

email   string     

Example: gbailey@example.net

Log Out User

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/auth/logout" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/auth/logout"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/auth/logout';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
         "status": "success",
          "message": "Successfully logged out",
      }
  }
 

Request      

POST api/auth/logout

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

User Profile

requires authentication

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/auth/user" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/auth/user"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/auth/user';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "User Profile",
    "data": {
        "id": 1,
        "full_name": "Thembo Charles",
        "email": "ashley7520charles@gmail.com",
        "phone": "0787444081",
        "email_verified_at": null,
        "tin": "110023452",
        "passport": "65748",
        "address": "Kampala",
        "otp": "4782",
        "status": "active",
        "user_type": "user",
        "created_at": "2025-12-05T06:42:09.000000Z",
        "updated_at": "2025-12-05T07:58:28.000000Z",
        "deleted_at": null
    }
}
 

Request      

GET api/auth/user

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Warehouse Location

Warehouse Locations

requires authentication

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/settings/locations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/settings/locations"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/settings/locations';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Warehouse Locations",
    "data": [
        {
            "id": 1,
            "created_at": "2025-12-05T09:12:00.000000Z",
            "updated_at": "2025-12-05T09:12:00.000000Z",
            "deleted_at": null,
            "code": "A-01-B-03",
            "zone": "A",
            "rack": "01",
            "bay": "B",
            "shelf": "03",
            "is_occupied": 0
        }
    ]
}
 

Request      

GET api/settings/locations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Create Warehouse Location

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/settings/locations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"architecto\",
    \"zone\": \"architecto\",
    \"rack\": \"architecto\",
    \"bay\": \"architecto\",
    \"shelf\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/settings/locations"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "architecto",
    "zone": "architecto",
    "rack": "architecto",
    "bay": "architecto",
    "shelf": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/settings/locations';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'code' => 'architecto',
            'zone' => 'architecto',
            'rack' => 'architecto',
            'bay' => 'architecto',
            'shelf' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Account created successfully",
    "data": {
        "full_name": "Thembo Charles",
        "email": "ashley7520charles@gmail.com",
        "phone": "0787444081",
        "tin": "110023452",
        "passport": "65748",
        "address": "Kampala",
        "updated_at": "2025-12-05T06:42:09.000000Z",
        "created_at": "2025-12-05T06:42:09.000000Z",
        "id": 1
    }
}
 

Request      

POST api/settings/locations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

Example: architecto

zone   string     

Example: architecto

rack   string     

Example: architecto

bay   string  optional    

Example: architecto

shelf   string  optional    

Example: architecto

Update Warehouse Location

requires authentication

Example request:
curl --request PUT \
    "https://constell.agent.co.ug/api/settings/locations/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"architecto\",
    \"zone\": \"architecto\",
    \"rack\": \"architecto\",
    \"bay\": \"architecto\",
    \"shelf\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/settings/locations/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "architecto",
    "zone": "architecto",
    "rack": "architecto",
    "bay": "architecto",
    "shelf": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/settings/locations/architecto';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'code' => 'architecto',
            'zone' => 'architecto',
            'rack' => 'architecto',
            'bay' => 'architecto',
            'shelf' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Account created successfully",
    "data": {
        "full_name": "Thembo Charles",
        "email": "ashley7520charles@gmail.com",
        "phone": "0787444081",
        "tin": "110023452",
        "passport": "65748",
        "address": "Kampala",
        "updated_at": "2025-12-05T06:42:09.000000Z",
        "created_at": "2025-12-05T06:42:09.000000Z",
        "id": 1
    }
}
 

Request      

PUT api/settings/locations/{id}

PATCH api/settings/locations/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the location. Example: architecto

Body Parameters

code   string     

Example: architecto

zone   string     

Example: architecto

rack   string     

Example: architecto

bay   string  optional    

Example: architecto

shelf   string  optional    

Example: architecto

Delete Warehouse Location

requires authentication

Example request:
curl --request DELETE \
    "https://constell.agent.co.ug/api/settings/locations/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/settings/locations/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/settings/locations/architecto';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Warehouse Location deleted successfully"
}
 

Request      

DELETE api/settings/locations/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the location. Example: architecto

warehouseLocation_id   integer     

Example: 16

Orders

Orders

requires authentication

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/orders" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/orders"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/orders';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 5,
                "created_at": "2025-12-05T12:20:11.000000Z",
                "updated_at": "2025-12-05T12:20:11.000000Z",
                "deleted_at": null,
                "tracking_number": "ORD-20251205-00002",
                "user_id": 1,
                "origin_country": "ITALY",
                "receiver_name": "Tom Mboya",
                "receiver_phone": "0789887766",
                "receiver_email": "tom.mboya@gmail.com",
                "receiver_address": "Uganda - Kampala",
                "status": "PENDING",
                "received_at": null,
                "dispatched_at": null,
                "arrived_at": null,
                "released_at": null,
                "delivered_at": null,
                "status_history": [
                    {
                        "id": 4,
                        "created_at": "2025-12-05T12:27:49.000000Z",
                        "updated_at": "2025-12-05T12:27:49.000000Z",
                        "deleted_at": null,
                        "order_id": 5,
                        "status": "CONSOLIDATED",
                        "notes": "Well received",
                        "location": "USA",
                        "user_id": 1,
                        "user": {
                            "id": 1,
                            "full_name": "Thembo Charles",
                            "email": "ashley7520charles@gmail.com",
                            "phone": "0787444081",
                            "email_verified_at": null,
                            "tin": "110023452",
                            "passport": "65748",
                            "address": "Kampala",
                            "otp": "4782",
                            "status": "active",
                            "user_type": "user",
                            "created_at": "2025-12-05T06:42:09.000000Z",
                            "updated_at": "2025-12-05T07:58:28.000000Z",
                            "deleted_at": null
                        }
                    }
                ],
                "user": {
                    "id": 1,
                    "full_name": "Thembo Charles",
                    "email": "ashley7520charles@gmail.com",
                    "phone": "0787444081",
                    "email_verified_at": null,
                    "tin": "110023452",
                    "passport": "65748",
                    "address": "Kampala",
                    "otp": "4782",
                    "status": "active",
                    "user_type": "user",
                    "created_at": "2025-12-05T06:42:09.000000Z",
                    "updated_at": "2025-12-05T07:58:28.000000Z",
                    "deleted_at": null
                }
            },
            {
                "id": 2,
                "created_at": "2025-12-05T11:29:08.000000Z",
                "updated_at": "2025-12-05T11:29:08.000000Z",
                "deleted_at": null,
                "tracking_number": "ORD-20251205-00001",
                "user_id": 1,
                "origin_country": "USA",
                "receiver_name": "Tom Mboya",
                "receiver_phone": "0789887766",
                "receiver_email": "tom.mboya@gmail.com",
                "receiver_address": "Uganda - Kampala",
                "status": "PENDING",
                "received_at": null,
                "dispatched_at": null,
                "arrived_at": null,
                "released_at": null,
                "delivered_at": null,
                "status_history": [
                    {
                        "id": 2,
                        "created_at": "2025-12-05T12:03:09.000000Z",
                        "updated_at": "2025-12-05T12:03:09.000000Z",
                        "deleted_at": null,
                        "order_id": 2,
                        "status": "CONSOLIDATED",
                        "notes": "Well received",
                        "location": "USA",
                        "user_id": 1,
                        "user": {
                            "id": 1,
                            "full_name": "Thembo Charles",
                            "email": "ashley7520charles@gmail.com",
                            "phone": "0787444081",
                            "email_verified_at": null,
                            "tin": "110023452",
                            "passport": "65748",
                            "address": "Kampala",
                            "otp": "4782",
                            "status": "active",
                            "user_type": "user",
                            "created_at": "2025-12-05T06:42:09.000000Z",
                            "updated_at": "2025-12-05T07:58:28.000000Z",
                            "deleted_at": null
                        }
                    },
                    {
                        "id": 1,
                        "created_at": "2025-12-05T12:01:16.000000Z",
                        "updated_at": "2025-12-05T12:01:16.000000Z",
                        "deleted_at": null,
                        "order_id": 2,
                        "status": "RECEIVED",
                        "notes": "Well received",
                        "location": "USA",
                        "user_id": null,
                        "user": null
                    }
                ],
                "user": {
                    "id": 1,
                    "full_name": "Thembo Charles",
                    "email": "ashley7520charles@gmail.com",
                    "phone": "0787444081",
                    "email_verified_at": null,
                    "tin": "110023452",
                    "passport": "65748",
                    "address": "Kampala",
                    "otp": "4782",
                    "status": "active",
                    "user_type": "user",
                    "created_at": "2025-12-05T06:42:09.000000Z",
                    "updated_at": "2025-12-05T07:58:28.000000Z",
                    "deleted_at": null
                }
            }
        ],
        "first_page_url": "http://127.0.0.1:8000/api/orders?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "http://127.0.0.1:8000/api/orders?page=1",
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "active": false
            },
            {
                "url": "http://127.0.0.1:8000/api/orders?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "http://127.0.0.1:8000/api/orders",
        "per_page": 20,
        "prev_page_url": null,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/orders

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Place Order

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/orders" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"origin_country\": \"architecto\",
    \"receiver_name\": \"architecto\",
    \"receiver_phone\": \"architecto\",
    \"receiver_email\": \"gbailey@example.net\",
    \"receiver_address\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/orders"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "origin_country": "architecto",
    "receiver_name": "architecto",
    "receiver_phone": "architecto",
    "receiver_email": "gbailey@example.net",
    "receiver_address": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/orders';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'origin_country' => 'architecto',
            'receiver_name' => 'architecto',
            'receiver_phone' => 'architecto',
            'receiver_email' => 'gbailey@example.net',
            'receiver_address' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Order created successfully.",
    "data": {
        "origin_country": "ITALY",
        "receiver_name": "Tom Mboya",
        "receiver_phone": "0789887766",
        "receiver_email": "tom.mboya@gmail.com",
        "receiver_address": "Uganda - Kampala",
        "tracking_number": "ORD-20251205-00002",
        "user_id": 1,
        "updated_at": "2025-12-05T12:20:11.000000Z",
        "created_at": "2025-12-05T12:20:11.000000Z",
        "id": 5,
        "status_history": [],
        "user": {
            "id": 1,
            "full_name": "Thembo Charles",
            "email": "ashley7520charles@gmail.com",
            "phone": "0787444081",
            "email_verified_at": null,
            "tin": "110023452",
            "passport": "65748",
            "address": "Kampala",
            "otp": "4782",
            "status": "active",
            "user_type": "user",
            "created_at": "2025-12-05T06:42:09.000000Z",
            "updated_at": "2025-12-05T07:58:28.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

POST api/orders

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

origin_country   string     

Example: architecto

receiver_name   string     

Example: architecto

receiver_phone   string     

Example: architecto

receiver_email   string  optional    

Example: gbailey@example.net

receiver_address   string  optional    

Example: architecto

Show Order

requires authentication

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/orders/16" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/orders/16"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/orders/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "data": {
        "id": 5,
        "created_at": "2025-12-05T12:20:11.000000Z",
        "updated_at": "2025-12-05T12:20:11.000000Z",
        "deleted_at": null,
        "tracking_number": "ORD-20251205-00002",
        "user_id": 1,
        "origin_country": "ITALY",
        "receiver_name": "Tom Mboya",
        "receiver_phone": "0789887766",
        "receiver_email": "tom.mboya@gmail.com",
        "receiver_address": "Uganda - Kampala",
        "status": "PENDING",
        "received_at": null,
        "dispatched_at": null,
        "arrived_at": null,
        "released_at": null,
        "delivered_at": null,
        "status_history": [
            {
                "id": 4,
                "created_at": "2025-12-05T12:27:49.000000Z",
                "updated_at": "2025-12-05T12:27:49.000000Z",
                "deleted_at": null,
                "order_id": 5,
                "status": "CONSOLIDATED",
                "notes": "Well received",
                "location": "USA",
                "user_id": 1,
                "user": {
                    "id": 1,
                    "full_name": "Thembo Charles",
                    "email": "ashley7520charles@gmail.com",
                    "phone": "0787444081",
                    "email_verified_at": null,
                    "tin": "110023452",
                    "passport": "65748",
                    "address": "Kampala",
                    "otp": "4782",
                    "status": "active",
                    "user_type": "user",
                    "created_at": "2025-12-05T06:42:09.000000Z",
                    "updated_at": "2025-12-05T07:58:28.000000Z",
                    "deleted_at": null
                }
            }
        ],
        "user": {
            "id": 1,
            "full_name": "Thembo Charles",
            "email": "ashley7520charles@gmail.com",
            "phone": "0787444081",
            "email_verified_at": null,
            "tin": "110023452",
            "passport": "65748",
            "address": "Kampala",
            "otp": "4782",
            "status": "active",
            "user_type": "user",
            "created_at": "2025-12-05T06:42:09.000000Z",
            "updated_at": "2025-12-05T07:58:28.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

GET api/orders/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the order. Example: 16

order_id   integer     

Example: 16

Update Order

requires authentication

Example request:
curl --request PUT \
    "https://constell.agent.co.ug/api/orders/16" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"origin_country\": \"architecto\",
    \"receiver_name\": \"architecto\",
    \"receiver_phone\": \"architecto\",
    \"receiver_email\": \"gbailey@example.net\",
    \"receiver_address\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/orders/16"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "origin_country": "architecto",
    "receiver_name": "architecto",
    "receiver_phone": "architecto",
    "receiver_email": "gbailey@example.net",
    "receiver_address": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/orders/16';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'origin_country' => 'architecto',
            'receiver_name' => 'architecto',
            'receiver_phone' => 'architecto',
            'receiver_email' => 'gbailey@example.net',
            'receiver_address' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
         "status": "success",
          "message": "Order updated successfully.",
      }
  }
 

Request      

PUT api/orders/{id}

PATCH api/orders/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the order. Example: 16

order_id   integer     

Example: 16

Body Parameters

origin_country   string     

Example: architecto

receiver_name   string     

Example: architecto

receiver_phone   string     

Example: architecto

receiver_email   string  optional    

Example: gbailey@example.net

receiver_address   string  optional    

Example: architecto

Delete Order

requires authentication

Example request:
curl --request DELETE \
    "https://constell.agent.co.ug/api/orders/16" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/orders/16"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/orders/16';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
         "status": "success",
          "message": "Order deleted successfully.",
      }
  }
 

Request      

DELETE api/orders/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the order. Example: 16

order_id   integer     

Example: 16

Update Order status

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/order_status_hisory" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order_id\": 16,
    \"status\": \"architecto\",
    \"location\": \"architecto\",
    \"notes\": \"architecto\",
    \"user_id\": 16
}"
const url = new URL(
    "https://constell.agent.co.ug/api/order_status_hisory"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order_id": 16,
    "status": "architecto",
    "location": "architecto",
    "notes": "architecto",
    "user_id": 16
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/order_status_hisory';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'order_id' => 16,
            'status' => 'architecto',
            'location' => 'architecto',
            'notes' => 'architecto',
            'user_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
         "status": "success",
          "message": "Order history created successfully.",
      }
 

Request      

POST api/order_status_hisory

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

order_id   integer     

Example: 16

status   string     

e.g PENDING,RECEIVED,CONSOLIDATED,DISPATCHED,IN_TRANSIT,ARRIVED,READY_FOR_RELEASE,RELEASED,DELIVERED Example: architecto

location   string  optional    

Example: architecto

notes   string     

Example: architecto

user_id   integer  optional    

Example: 16

Delete Order status history

requires authentication

Example request:
curl --request DELETE \
    "https://constell.agent.co.ug/api/order_status_hisory/16" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/order_status_hisory/16"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/order_status_hisory/16';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
         "status": "success",
          "message": "Order status history deleted.",
      }
  }
 

Request      

DELETE api/order_status_hisory/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the order status hisory. Example: 16

orderStatusHistory_id   integer     

Example: 16

Package

Add Package to order

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/packages" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order_id\": 16,
    \"contents\": \"architecto\",
    \"declared_value\": 4326.41688,
    \"weight\": 4326.41688,
    \"length\": 4326.41688,
    \"width\": 4326.41688,
    \"height\": 4326.41688,
    \"is_fragile\": false,
    \"is_hazardous\": false,
    \"is_damaged\": false,
    \"location_id\": \"architecto\",
    \"received_at\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/packages"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order_id": 16,
    "contents": "architecto",
    "declared_value": 4326.41688,
    "weight": 4326.41688,
    "length": 4326.41688,
    "width": 4326.41688,
    "height": 4326.41688,
    "is_fragile": false,
    "is_hazardous": false,
    "is_damaged": false,
    "location_id": "architecto",
    "received_at": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/packages';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'order_id' => 16,
            'contents' => 'architecto',
            'declared_value' => 4326.41688,
            'weight' => 4326.41688,
            'length' => 4326.41688,
            'width' => 4326.41688,
            'height' => 4326.41688,
            'is_fragile' => false,
            'is_hazardous' => false,
            'is_damaged' => false,
            'location_id' => 'architecto',
            'received_at' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Package created successfully.",
    "data": {
        "order_id": "5",
        "hwb_number": "HWB-2025128-0021",
        "contents": "Computer - Desktop",
        "declared_value": "2500000",
        "weight": "5",
        "length": "4",
        "width": "6",
        "height": "2",
        "is_fragile": true,
        "is_hazardous": false,
        "is_damaged": false,
        "location_id": "1",
        "received_at": "2025-12-03T00:00:00.000000Z",
        "updated_at": "2025-12-08T07:32:17.000000Z",
        "created_at": "2025-12-08T07:32:17.000000Z",
        "id": 2
    }
}
 

Request      

POST api/packages

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

order_id   integer     

Example: 16

contents   string     

Example: architecto

declared_value   number  optional    

Example: 4326.41688

weight   number     

Example: 4326.41688

length   number     

Example: 4326.41688

width   number     

Example: 4326.41688

height   number     

Example: 4326.41688

is_fragile   boolean  optional    

Example: false

is_hazardous   boolean  optional    

Example: false

is_damaged   boolean  optional    

Example: false

package_photos   object  optional    
location_id   required  optional    

Example: architecto

received_at   required  optional    

Example: architecto

Update order Package

requires authentication

Example request:
curl --request PUT \
    "https://constell.agent.co.ug/api/packages/architecto" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"hwb_number\": \"architecto\",
    \"contents\": \"architecto\",
    \"declared_value\": 4326.41688,
    \"weight\": 4326.41688,
    \"length\": 4326.41688,
    \"width\": 4326.41688,
    \"height\": 4326.41688,
    \"is_fragile\": false,
    \"is_hazardous\": false,
    \"is_damaged\": false,
    \"location_id\": \"architecto\",
    \"received_at\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/packages/architecto"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "hwb_number": "architecto",
    "contents": "architecto",
    "declared_value": 4326.41688,
    "weight": 4326.41688,
    "length": 4326.41688,
    "width": 4326.41688,
    "height": 4326.41688,
    "is_fragile": false,
    "is_hazardous": false,
    "is_damaged": false,
    "location_id": "architecto",
    "received_at": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/packages/architecto';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'hwb_number' => 'architecto',
            'contents' => 'architecto',
            'declared_value' => 4326.41688,
            'weight' => 4326.41688,
            'length' => 4326.41688,
            'width' => 4326.41688,
            'height' => 4326.41688,
            'is_fragile' => false,
            'is_hazardous' => false,
            'is_damaged' => false,
            'location_id' => 'architecto',
            'received_at' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Package updated successfully.",
    "data": {
        "order_id": "5",
        "hwb_number": "HWB-2025128-0021",
        "contents": "Computer - Desktop",
        "declared_value": "2500000",
        "weight": "5",
        "length": "4",
        "width": "6",
        "height": "2",
        "is_fragile": true,
        "is_hazardous": false,
        "is_damaged": false,
        "location_id": "1",
        "received_at": "2025-12-03T00:00:00.000000Z",
        "updated_at": "2025-12-08T07:32:17.000000Z",
        "created_at": "2025-12-08T07:32:17.000000Z",
        "id": 2
    }
}
 

Request      

PUT api/packages/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the package. Example: architecto

package_id   integer     

Example: 16

Body Parameters

order_id   string  optional    

The id of an existing record in the orders table.

hwb_number   string     

Example: architecto

contents   string     

Example: architecto

declared_value   number  optional    

Example: 4326.41688

weight   number     

Example: 4326.41688

length   number     

Example: 4326.41688

width   number     

Example: 4326.41688

height   number     

Example: 4326.41688

is_fragile   boolean  optional    

Example: false

is_hazardous   boolean  optional    

Example: false

is_damaged   boolean  optional    

Example: false

package_photos   object  optional    
location_id   required  optional    

Example: architecto

received_at   required  optional    

Example: architecto

Delete Package

requires authentication

Example request:
curl --request DELETE \
    "https://constell.agent.co.ug/api/packages/architecto" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/packages/architecto"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/packages/architecto';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
         "status": "success",
          "message": "Package deleted successfully.",
      }
  }
 

Request      

DELETE api/packages/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the package. Example: architecto

package_id   integer     

Example: 16

Add Package images

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/packages/architecto/package-photos" \
    --header "Bearer: Token" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "photos[]=@/tmp/phpNfLwM0" \
    --form "photos[]=@/tmp/phpAqOk7U" 
const url = new URL(
    "https://constell.agent.co.ug/api/packages/architecto/package-photos"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('photos[]', document.querySelector('input[name="photos[]"]').files[0]);
body.append('photos[]', document.querySelector('input[name="photos[]"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/packages/architecto/package-photos';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
        ],
        'multipart' => [
            [
                'name' => 'photos[]',
                'contents' => fopen('/tmp/phpNfLwM0', 'r')
            ],
            [
                'name' => 'photos[]',
                'contents' => fopen('/tmp/phpAqOk7U', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Package photos uploaded successfully",
    "data": {
        "id": 1,
        "created_at": "2025-12-08T07:19:43.000000Z",
        "updated_at": "2025-12-08T07:39:24.000000Z",
        "deleted_at": null,
        "order_id": 5,
        "hwb_number": "HWB-2025128-0002",
        "contents": "Computer - Desktop",
        "declared_value": "2500000.00",
        "weight": "5.00",
        "length": "4.00",
        "width": "6.00",
        "height": "2.00",
        "is_fragile": true,
        "is_hazardous": false,
        "is_damaged": false,
        "package_photos": [
            "package_photos/ngtZoTVR3mPb8G8otpFTeKnD78maftxCL7UXRcuD.jpg",
            "package_photos/LXHHmhE4YM0YoTn1Lva95FSyQi31i89dskkPv2il.jpg",
            "package_photos/thtdPXJtqtkpECHhbeyXIOAIMSGt564ZFIXBqdcp.jpg",
            "package_photos/Uc34hnpyAPsAT1QINJfca0msaFdudcYfaY2Qs21h.jpg"
        ],
        "location_id": 1,
        "received_at": "2025-12-03T00:00:00.000000Z"
    }
}
 

Request      

POST api/packages/{id}/package-photos

Headers

Bearer        

Example: Token

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the package. Example: architecto

packageId   integer     

Example: 16

Body Parameters

photos   file[]  optional    

Must be an image.

photos[]   file     

Example: /tmp/phpAqOk7U

Delete a Package image

requires authentication

Example request:
curl --request DELETE \
    "https://constell.agent.co.ug/api/packages/architecto/package-photos" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"photo\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/packages/architecto/package-photos"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "photo": "architecto"
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/packages/architecto/package-photos';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'photo' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Package photo deleted successfully",
    "data": {
        "id": 1,
        "created_at": "2025-12-08T07:19:43.000000Z",
        "updated_at": "2025-12-08T07:39:24.000000Z",
        "deleted_at": null,
        "order_id": 5,
        "hwb_number": "HWB-2025128-0002",
        "contents": "Computer - Desktop",
        "declared_value": "2500000.00",
        "weight": "5.00",
        "length": "4.00",
        "width": "6.00",
        "height": "2.00",
        "is_fragile": true,
        "is_hazardous": false,
        "is_damaged": false,
        "package_photos": [
            "package_photos/LXHHmhE4YM0YoTn1Lva95FSyQi31i89dskkPv2il.jpg",
            "package_photos/thtdPXJtqtkpECHhbeyXIOAIMSGt564ZFIXBqdcp.jpg",
            "package_photos/Uc34hnpyAPsAT1QINJfca0msaFdudcYfaY2Qs21h.jpg"
        ],
        "location_id": 1,
        "received_at": "2025-12-03T00:00:00.000000Z"
    }
}
 

Request      

DELETE api/packages/{id}/package-photos

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the package. Example: architecto

packageId   integer     

Example: 16

Body Parameters

photo   string     

e.g package_photos/ngtZoTVR3mPb8G8otpFTeKnD78maftxCL7UXRcuD.jpg Example: architecto

Consolidation Batch

Consolidation Batches

requires authentication

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/consolidation-batches" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/consolidation-batches"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/consolidation-batches';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


[
    {
        "id": 1,
        "created_at": "2025-12-08T08:21:32.000000Z",
        "updated_at": "2025-12-08T08:40:10.000000Z",
        "deleted_at": null,
        "mawb_number": "MAWB-20251208-001",
        "transport_mode": "AIR",
        "container_flight_number": "AB001",
        "departure_date": "2025-12-10T00:00:00.000000Z",
        "status": "FINALIZED",
        "package_count": 0,
        "total_weight": "0.00",
        "created_by": 1,
        "finalized_at": "2025-12-09T00:00:00.000000Z",
        "departed_at": "2025-12-10T00:00:00.000000Z",
        "arrived_at": "2025-12-10T00:00:00.000000Z",
        "packages": [
            {
                "id": 1,
                "created_at": "2025-12-08T07:19:43.000000Z",
                "updated_at": "2025-12-08T07:42:06.000000Z",
                "deleted_at": null,
                "order_id": 5,
                "hwb_number": "HWB-2025128-0002",
                "contents": "Computer - Desktop",
                "declared_value": "2500000.00",
                "weight": "5.00",
                "length": "4.00",
                "width": "6.00",
                "height": "2.00",
                "is_fragile": true,
                "is_hazardous": false,
                "is_damaged": false,
                "package_photos": [
                    "package_photos/LXHHmhE4YM0YoTn1Lva95FSyQi31i89dskkPv2il.jpg",
                    "package_photos/thtdPXJtqtkpECHhbeyXIOAIMSGt564ZFIXBqdcp.jpg",
                    "package_photos/Uc34hnpyAPsAT1QINJfca0msaFdudcYfaY2Qs21h.jpg"
                ],
                "location_id": 1,
                "received_at": "2025-12-03T00:00:00.000000Z",
                "pivot": {
                    "batch_id": 1,
                    "package_id": 1,
                    "created_at": "2025-12-08T08:57:19.000000Z",
                    "updated_at": "2025-12-08T08:57:19.000000Z"
                },
                "order": {
                    "id": 5,
                    "created_at": "2025-12-05T12:20:11.000000Z",
                    "updated_at": "2025-12-05T12:20:11.000000Z",
                    "deleted_at": null,
                    "tracking_number": "ORD-20251205-00002",
                    "user_id": 1,
                    "origin_country": "ITALY",
                    "receiver_name": "Tom Mboya",
                    "receiver_phone": "0789887766",
                    "receiver_email": "tom.mboya@gmail.com",
                    "receiver_address": "Uganda - Kampala",
                    "status": "PENDING",
                    "received_at": null,
                    "dispatched_at": null,
                    "arrived_at": null,
                    "released_at": null,
                    "delivered_at": null,
                    "user": {
                        "id": 1,
                        "full_name": "Thembo Charles",
                        "email": "ashley7520charles@gmail.com",
                        "phone": "0787444081",
                        "email_verified_at": null,
                        "tin": "110023452",
                        "passport": "65748",
                        "address": "Kampala",
                        "otp": "4782",
                        "status": "active",
                        "user_type": "user",
                        "created_at": "2025-12-05T06:42:09.000000Z",
                        "updated_at": "2025-12-05T07:58:28.000000Z",
                        "deleted_at": null
                    }
                }
            }
        ]
    }
]
 

Request      

GET api/consolidation-batches

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Consolidation Batch

requires authentication

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/consolidation-batches/architecto" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/consolidation-batches/architecto"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/consolidation-batches/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


[
    {
        "id": 1,
        "created_at": "2025-12-08T08:21:32.000000Z",
        "updated_at": "2025-12-08T08:40:10.000000Z",
        "deleted_at": null,
        "mawb_number": "MAWB-20251208-001",
        "transport_mode": "AIR",
        "container_flight_number": "AB001",
        "departure_date": "2025-12-10T00:00:00.000000Z",
        "status": "FINALIZED",
        "package_count": 0,
        "total_weight": "0.00",
        "created_by": 1,
        "finalized_at": "2025-12-09T00:00:00.000000Z",
        "departed_at": "2025-12-10T00:00:00.000000Z",
        "arrived_at": "2025-12-10T00:00:00.000000Z",
        "packages": [
            {
                "id": 1,
                "created_at": "2025-12-08T07:19:43.000000Z",
                "updated_at": "2025-12-08T07:42:06.000000Z",
                "deleted_at": null,
                "order_id": 5,
                "hwb_number": "HWB-2025128-0002",
                "contents": "Computer - Desktop",
                "declared_value": "2500000.00",
                "weight": "5.00",
                "length": "4.00",
                "width": "6.00",
                "height": "2.00",
                "is_fragile": true,
                "is_hazardous": false,
                "is_damaged": false,
                "package_photos": [
                    "package_photos/LXHHmhE4YM0YoTn1Lva95FSyQi31i89dskkPv2il.jpg",
                    "package_photos/thtdPXJtqtkpECHhbeyXIOAIMSGt564ZFIXBqdcp.jpg",
                    "package_photos/Uc34hnpyAPsAT1QINJfca0msaFdudcYfaY2Qs21h.jpg"
                ],
                "location_id": 1,
                "received_at": "2025-12-03T00:00:00.000000Z",
                "pivot": {
                    "batch_id": 1,
                    "package_id": 1,
                    "created_at": "2025-12-08T08:57:19.000000Z",
                    "updated_at": "2025-12-08T08:57:19.000000Z"
                },
                "order": {
                    "id": 5,
                    "created_at": "2025-12-05T12:20:11.000000Z",
                    "updated_at": "2025-12-05T12:20:11.000000Z",
                    "deleted_at": null,
                    "tracking_number": "ORD-20251205-00002",
                    "user_id": 1,
                    "origin_country": "ITALY",
                    "receiver_name": "Tom Mboya",
                    "receiver_phone": "0789887766",
                    "receiver_email": "tom.mboya@gmail.com",
                    "receiver_address": "Uganda - Kampala",
                    "status": "PENDING",
                    "received_at": null,
                    "dispatched_at": null,
                    "arrived_at": null,
                    "released_at": null,
                    "delivered_at": null,
                    "user": {
                        "id": 1,
                        "full_name": "Thembo Charles",
                        "email": "ashley7520charles@gmail.com",
                        "phone": "0787444081",
                        "email_verified_at": null,
                        "tin": "110023452",
                        "passport": "65748",
                        "address": "Kampala",
                        "otp": "4782",
                        "status": "active",
                        "user_type": "user",
                        "created_at": "2025-12-05T06:42:09.000000Z",
                        "updated_at": "2025-12-05T07:58:28.000000Z",
                        "deleted_at": null
                    }
                }
            }
        ]
    }
]
 

Request      

GET api/consolidation-batches/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the consolidation batch. Example: architecto

Create a Consolidation Batch

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/consolidation-batches" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mawb_number\": \"architecto\",
    \"transport_mode\": \"architecto\",
    \"container_flight_number\": \"architecto\",
    \"departure_date\": \"architecto\",
    \"status\": \"ARRIVED\",
    \"package_count\": 84,
    \"total_weight\": 12,
    \"finalized_at\": \"2025-12-15T07:30:57\",
    \"departed_at\": \"2025-12-15T07:30:57\",
    \"arrived_at\": \"2025-12-15T07:30:57\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/consolidation-batches"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mawb_number": "architecto",
    "transport_mode": "architecto",
    "container_flight_number": "architecto",
    "departure_date": "architecto",
    "status": "ARRIVED",
    "package_count": 84,
    "total_weight": 12,
    "finalized_at": "2025-12-15T07:30:57",
    "departed_at": "2025-12-15T07:30:57",
    "arrived_at": "2025-12-15T07:30:57"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/consolidation-batches';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mawb_number' => 'architecto',
            'transport_mode' => 'architecto',
            'container_flight_number' => 'architecto',
            'departure_date' => 'architecto',
            'status' => 'ARRIVED',
            'package_count' => 84,
            'total_weight' => 12,
            'finalized_at' => '2025-12-15T07:30:57',
            'departed_at' => '2025-12-15T07:30:57',
            'arrived_at' => '2025-12-15T07:30:57',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Consolidation batch created successfully",
    "data": {
        "mawb_number": "MAWB-20251208-002",
        "transport_mode": "AIR",
        "container_flight_number": "AB001",
        "departure_date": "2025-12-10T00:00:00.000000Z",
        "departed_at": "2025-12-10T00:00:00.000000Z",
        "created_by": 1,
        "updated_at": "2025-12-08T08:27:36.000000Z",
        "created_at": "2025-12-08T08:27:36.000000Z",
        "id": 3,
        "user": {
            "id": 1,
            "full_name": "Thembo Charles",
            "email": "ashley7520charles@gmail.com",
            "phone": "0787444081",
            "email_verified_at": null,
            "tin": "110023452",
            "passport": "65748",
            "address": "Kampala",
            "otp": "4782",
            "status": "active",
            "user_type": "user",
            "created_at": "2025-12-05T06:42:09.000000Z",
            "updated_at": "2025-12-05T07:58:28.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

POST api/consolidation-batches

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

mawb_number   string     

Example: architecto

transport_mode   string     

e.g 'AIR', 'SEA', 'ROAD', 'TRAIN' Example: architecto

container_flight_number   string     

Example: architecto

departure_date   date     

Example: architecto

status   string  optional    

Example: ARRIVED

Must be one of:
  • OPEN
  • FINALIZED
  • DEPARTED
  • ARRIVED
package_count   integer  optional    

Must be at least 0. Example: 84

total_weight   number  optional    

Must be at least 0. Example: 12

created_by   string  optional    

The id of an existing record in the users table.

finalized_at   string  optional    

Must be a valid date. Example: 2025-12-15T07:30:57

departed_at   string  optional    

Must be a valid date. Example: 2025-12-15T07:30:57

arrived_at   string  optional    

Must be a valid date. Example: 2025-12-15T07:30:57

Update a Consolidation Batch

requires authentication

Example request:
curl --request PUT \
    "https://constell.agent.co.ug/api/consolidation-batches/architecto" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mawb_number\": \"architecto\",
    \"transport_mode\": \"architecto\",
    \"container_flight_number\": \"architecto\",
    \"departure_date\": \"architecto\",
    \"status\": \"architecto\",
    \"package_count\": 84,
    \"total_weight\": 12,
    \"finalized_at\": \"architecto\",
    \"departed_at\": \"architecto\",
    \"arrived_at\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/consolidation-batches/architecto"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mawb_number": "architecto",
    "transport_mode": "architecto",
    "container_flight_number": "architecto",
    "departure_date": "architecto",
    "status": "architecto",
    "package_count": 84,
    "total_weight": 12,
    "finalized_at": "architecto",
    "departed_at": "architecto",
    "arrived_at": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/consolidation-batches/architecto';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mawb_number' => 'architecto',
            'transport_mode' => 'architecto',
            'container_flight_number' => 'architecto',
            'departure_date' => 'architecto',
            'status' => 'architecto',
            'package_count' => 84,
            'total_weight' => 12,
            'finalized_at' => 'architecto',
            'departed_at' => 'architecto',
            'arrived_at' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Consolidation batch updated successfully",
    "data": {
        "mawb_number": "MAWB-20251208-002",
        "transport_mode": "AIR",
        "container_flight_number": "AB001",
        "departure_date": "2025-12-10T00:00:00.000000Z",
        "departed_at": "2025-12-10T00:00:00.000000Z",
        "created_by": 1,
        "updated_at": "2025-12-08T08:27:36.000000Z",
        "created_at": "2025-12-08T08:27:36.000000Z",
        "id": 3,
        "user": {
            "id": 1,
            "full_name": "Thembo Charles",
            "email": "ashley7520charles@gmail.com",
            "phone": "0787444081",
            "email_verified_at": null,
            "tin": "110023452",
            "passport": "65748",
            "address": "Kampala",
            "otp": "4782",
            "status": "active",
            "user_type": "user",
            "created_at": "2025-12-05T06:42:09.000000Z",
            "updated_at": "2025-12-05T07:58:28.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

PUT api/consolidation-batches/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the consolidation batch. Example: architecto

consolidationBatche_id   integer     

Example: 16

Body Parameters

mawb_number   string     

Example: architecto

transport_mode   string     

e.g 'AIR', 'SEA', 'ROAD', 'TRAIN' Example: architecto

container_flight_number   string     

Example: architecto

departure_date   date     

Example: architecto

status   string  optional    

e.g OPEN,FINALIZED,DEPARTED,ARRIVED Example: architecto

package_count   integer  optional    

Must be at least 0. Example: 84

total_weight   number  optional    

Must be at least 0. Example: 12

created_by   string  optional    

The id of an existing record in the users table.

finalized_at   date     

Example: architecto

departed_at   date     

Example: architecto

arrived_at   date     

Example: architecto

Delete Consolidation Batch

requires authentication

Example request:
curl --request DELETE \
    "https://constell.agent.co.ug/api/consolidation-batches/architecto" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/consolidation-batches/architecto"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/consolidation-batches/architecto';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
         "status": "success",
          "message": "Consolidation batch deleted successfully.",
      }
  }
 

Request      

DELETE api/consolidation-batches/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the consolidation batch. Example: architecto

consolidationBatche_id   integer     

Example: 16

Batch Package

Add Package to Batch

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/batch-packages" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"batch_id\": 16,
    \"package_id\": 16
}"
const url = new URL(
    "https://constell.agent.co.ug/api/batch-packages"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "batch_id": 16,
    "package_id": 16
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/batch-packages';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'batch_id' => 16,
            'package_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
         "status": "success",
          "message": "Package added to batch successfully.",
      }
  }
 

Request      

POST api/batch-packages

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

batch_id   integer     

Example: 16

package_id   integer     

Example: 16

Delete Consolidation Batch

requires authentication

Example request:
curl --request DELETE \
    "https://constell.agent.co.ug/api/batch-packages" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"batch_id\": 16,
    \"package_id\": 16
}"
const url = new URL(
    "https://constell.agent.co.ug/api/batch-packages"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "batch_id": 16,
    "package_id": 16
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/batch-packages';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'batch_id' => 16,
            'package_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
         "status": "success",
          "message": "Package removed from batch.",
      }
  }
 

Request      

DELETE api/batch-packages

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

batch_id   integer     

Example: 16

package_id   integer     

Example: 16

Invoice

Make an Invoice

requires authentication

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/billing/invoices" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/billing/invoices"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/billing/invoices';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Invoices fetched successfully",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 2,
                "created_at": "2025-12-08T10:31:55.000000Z",
                "updated_at": "2025-12-08T10:42:55.000000Z",
                "deleted_at": null,
                "invoice_number": "INV-20251208-00002",
                "user_id": 1,
                "order_id": 5,
                "type": "FREIGHT",
                "status": "PAID",
                "due_date": "2005-12-09T00:00:00.000000Z",
                "order": {
                    "id": 5,
                    "created_at": "2025-12-05T12:20:11.000000Z",
                    "updated_at": "2025-12-05T12:20:11.000000Z",
                    "deleted_at": null,
                    "tracking_number": "ORD-20251205-00002",
                    "user_id": 1,
                    "origin_country": "ITALY",
                    "receiver_name": "Tom Mboya",
                    "receiver_phone": "0789887766",
                    "receiver_email": "tom.mboya@gmail.com",
                    "receiver_address": "Uganda - Kampala",
                    "status": "PENDING",
                    "received_at": null,
                    "dispatched_at": null,
                    "arrived_at": null,
                    "released_at": null,
                    "delivered_at": null,
                    "user": {
                        "id": 1,
                        "full_name": "Thembo Charles",
                        "email": "ashley7520charles@gmail.com",
                        "phone": "0787444081",
                        "email_verified_at": null,
                        "tin": "110023452",
                        "passport": "65748",
                        "address": "Kampala",
                        "otp": "4782",
                        "status": "active",
                        "user_type": "user",
                        "created_at": "2025-12-05T06:42:09.000000Z",
                        "updated_at": "2025-12-05T07:58:28.000000Z",
                        "deleted_at": null
                    }
                },
                "line_items": [],
                "payments": []
            },
            {
                "id": 1,
                "created_at": "2025-12-08T10:31:08.000000Z",
                "updated_at": "2025-12-08T10:31:08.000000Z",
                "deleted_at": null,
                "invoice_number": "ORD-20251208-00001",
                "user_id": 1,
                "order_id": 5,
                "type": "FREIGHT",
                "status": "UNPAID",
                "due_date": "2005-12-09T00:00:00.000000Z",
                "order": {
                    "id": 5,
                    "created_at": "2025-12-05T12:20:11.000000Z",
                    "updated_at": "2025-12-05T12:20:11.000000Z",
                    "deleted_at": null,
                    "tracking_number": "ORD-20251205-00002",
                    "user_id": 1,
                    "origin_country": "ITALY",
                    "receiver_name": "Tom Mboya",
                    "receiver_phone": "0789887766",
                    "receiver_email": "tom.mboya@gmail.com",
                    "receiver_address": "Uganda - Kampala",
                    "status": "PENDING",
                    "received_at": null,
                    "dispatched_at": null,
                    "arrived_at": null,
                    "released_at": null,
                    "delivered_at": null,
                    "user": {
                        "id": 1,
                        "full_name": "Thembo Charles",
                        "email": "ashley7520charles@gmail.com",
                        "phone": "0787444081",
                        "email_verified_at": null,
                        "tin": "110023452",
                        "passport": "65748",
                        "address": "Kampala",
                        "otp": "4782",
                        "status": "active",
                        "user_type": "user",
                        "created_at": "2025-12-05T06:42:09.000000Z",
                        "updated_at": "2025-12-05T07:58:28.000000Z",
                        "deleted_at": null
                    }
                },
                "line_items": [],
                "payments": []
            }
        ],
        "first_page_url": "http://127.0.0.1:8000/api/billing/invoices?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "http://127.0.0.1:8000/api/billing/invoices?page=1",
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "active": false
            },
            {
                "url": "http://127.0.0.1:8000/api/billing/invoices?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "http://127.0.0.1:8000/api/billing/invoices",
        "per_page": 20,
        "prev_page_url": null,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/billing/invoices

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Make an Invoice

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/billing/invoices" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order_id\": \"architecto\",
    \"type\": \"FREIGHT,STORAGE,CUSTOMS,OTHER\",
    \"due_date\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/billing/invoices"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order_id": "architecto",
    "type": "FREIGHT,STORAGE,CUSTOMS,OTHER",
    "due_date": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/billing/invoices';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'order_id' => 'architecto',
            'type' => 'FREIGHT,STORAGE,CUSTOMS,OTHER',
            'due_date' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Invoice created successfully",
    "data": {
        "order_id": "5",
        "type": "FREIGHT",
        "due_date": "2005-12-09T00:00:00.000000Z",
        "user_id": 1,
        "invoice_number": "INV-20251208-00002",
        "updated_at": "2025-12-08T10:31:55.000000Z",
        "created_at": "2025-12-08T10:31:55.000000Z",
        "id": 2,
        "order": {
            "id": 5,
            "created_at": "2025-12-05T12:20:11.000000Z",
            "updated_at": "2025-12-05T12:20:11.000000Z",
            "deleted_at": null,
            "tracking_number": "ORD-20251205-00002",
            "user_id": 1,
            "origin_country": "ITALY",
            "receiver_name": "Tom Mboya",
            "receiver_phone": "0789887766",
            "receiver_email": "tom.mboya@gmail.com",
            "receiver_address": "Uganda - Kampala",
            "status": "PENDING",
            "received_at": null,
            "dispatched_at": null,
            "arrived_at": null,
            "released_at": null,
            "delivered_at": null
        }
    }
}
 

Request      

POST api/billing/invoices

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

order_id   string     

Example: architecto

type   string     

Example: FREIGHT,STORAGE,CUSTOMS,OTHER

due_date   date     

Example: architecto

Single Invoice Details

requires authentication

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/billing/invoices/architecto" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"invoice_id\": 16
}"
const url = new URL(
    "https://constell.agent.co.ug/api/billing/invoices/architecto"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "invoice_id": 16
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/billing/invoices/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'invoice_id' => 16,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/billing/invoices/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the invoice. Example: architecto

Body Parameters

invoice_id   integer     

Example: 16

Update an Invoice

requires authentication

Example request:
curl --request PUT \
    "https://constell.agent.co.ug/api/billing/invoices/16" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"FREIGHT,STORAGE,CUSTOMS,OTHER\",
    \"status\": \"UNPAID,PAID,OVERDUE,CANCELLED\",
    \"due_date\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/billing/invoices/16"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "FREIGHT,STORAGE,CUSTOMS,OTHER",
    "status": "UNPAID,PAID,OVERDUE,CANCELLED",
    "due_date": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/billing/invoices/16';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'type' => 'FREIGHT,STORAGE,CUSTOMS,OTHER',
            'status' => 'UNPAID,PAID,OVERDUE,CANCELLED',
            'due_date' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Invoice Updated successfully",
    "data": {
        "order_id": "5",
        "type": "FREIGHT",
        "due_date": "2005-12-09T00:00:00.000000Z",
        "user_id": 1,
        "invoice_number": "INV-20251208-00002",
        "updated_at": "2025-12-08T10:31:55.000000Z",
        "created_at": "2025-12-08T10:31:55.000000Z",
        "id": 2,
        "order": {
            "id": 5,
            "created_at": "2025-12-05T12:20:11.000000Z",
            "updated_at": "2025-12-05T12:20:11.000000Z",
            "deleted_at": null,
            "tracking_number": "ORD-20251205-00002",
            "user_id": 1,
            "origin_country": "ITALY",
            "receiver_name": "Tom Mboya",
            "receiver_phone": "0789887766",
            "receiver_email": "tom.mboya@gmail.com",
            "receiver_address": "Uganda - Kampala",
            "status": "PENDING",
            "received_at": null,
            "dispatched_at": null,
            "arrived_at": null,
            "released_at": null,
            "delivered_at": null
        }
    }
}
 

Request      

PUT api/billing/invoices/{id}

PATCH api/billing/invoices/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the invoice. Example: 16

Body Parameters

type   string     

Example: FREIGHT,STORAGE,CUSTOMS,OTHER

status   string  optional    

Example: UNPAID,PAID,OVERDUE,CANCELLED

due_date   date     

Example: architecto

Delete Invoice

requires authentication

Example request:
curl --request DELETE \
    "https://constell.agent.co.ug/api/billing/invoices/16" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/billing/invoices/16"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/billing/invoices/16';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
         "status": "success",
          "message": "Invoice deleted successfully",
      }
  }
 

Request      

DELETE api/billing/invoices/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the invoice. Example: 16

invoice_id   integer     

Example: 16

Restore Invoice

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/billing/invoices/16/restore" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/billing/invoices/16/restore"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/billing/invoices/16/restore';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
         "status": "success",
          "message": "Invoice restored successfully",
      }
  }
 

Request      

POST api/billing/invoices/{id}/restore

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the invoice. Example: 16

invoice_id   integer     

Example: 16

Add Item to Invoice

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/billing/invoice-line-items" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"invoice_id\": \"architecto\",
    \"description\": \"Eius et animi quos velit et.\",
    \"quantity\": 16,
    \"unit_price\": 4326.41688
}"
const url = new URL(
    "https://constell.agent.co.ug/api/billing/invoice-line-items"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "invoice_id": "architecto",
    "description": "Eius et animi quos velit et.",
    "quantity": 16,
    "unit_price": 4326.41688
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/billing/invoice-line-items';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'invoice_id' => 'architecto',
            'description' => 'Eius et animi quos velit et.',
            'quantity' => 16,
            'unit_price' => 4326.41688,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Invoice line item created successfully",
    "data": {
        "invoice_id": "1",
        "description": "Cargo A",
        "quantity": "1",
        "unit_price": "30000",
        "updated_at": "2025-12-08T13:30:52.000000Z",
        "created_at": "2025-12-08T13:30:52.000000Z",
        "id": 1
    }
}
 

Request      

POST api/billing/invoice-line-items

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

invoice_id   string     

Example: architecto

description   string     

Example: Eius et animi quos velit et.

quantity   integer     

Example: 16

unit_price   number     

Example: 4326.41688

Edit Invoice Item

requires authentication

Example request:
curl --request PUT \
    "https://constell.agent.co.ug/api/billing/invoice-line-items/16" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Eius et animi quos velit et.\",
    \"quantity\": 16,
    \"unit_price\": 4326.41688,
    \"invoice_id\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/billing/invoice-line-items/16"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "description": "Eius et animi quos velit et.",
    "quantity": 16,
    "unit_price": 4326.41688,
    "invoice_id": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/billing/invoice-line-items/16';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'description' => 'Eius et animi quos velit et.',
            'quantity' => 16,
            'unit_price' => 4326.41688,
            'invoice_id' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Invoice line item updated successfully",
    "data": {
        "id": 2,
        "created_at": "2025-12-08T13:32:09.000000Z",
        "updated_at": "2025-12-08T13:32:09.000000Z",
        "deleted_at": null,
        "invoice_id": 1,
        "description": "Cargo A",
        "quantity": 1,
        "unit_price": 30000
    }
}
 

Request      

PUT api/billing/invoice-line-items/{id}

PATCH api/billing/invoice-line-items/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the invoice line item. Example: 16

Body Parameters

description   string     

Example: Eius et animi quos velit et.

quantity   integer     

Example: 16

unit_price   number     

Example: 4326.41688

invoice_id   string     

Example: architecto

Delete Invoice Item

requires authentication

Example request:
curl --request DELETE \
    "https://constell.agent.co.ug/api/billing/invoice-line-items/16" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/billing/invoice-line-items/16"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/billing/invoice-line-items/16';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Invoice line item deleted successfully"
}
 

Request      

DELETE api/billing/invoice-line-items/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the invoice line item. Example: 16

Restore Invoice Item

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/billing/invoice-line-items/16/restore" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/billing/invoice-line-items/16/restore"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/billing/invoice-line-items/16/restore';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Invoice line item deleted successfully"
}
 

Request      

POST api/billing/invoice-line-items/{id}/restore

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the invoice line item. Example: 16

invoiceLineItem_id   integer     

Example: 16

Record Invoice Payment

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/billing/payments" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"invoice_id\": \"architecto\",
    \"amount\": 4326.41688,
    \"method\": \"MOBILE_MONEY,CARD,BANK_TRANSFER,CASH\",
    \"transaction_reference\": \"architecto\",
    \"gateway_reference\": \"architecto\",
    \"status\": \"PENDING\",
    \"paid_at\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/billing/payments"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "invoice_id": "architecto",
    "amount": 4326.41688,
    "method": "MOBILE_MONEY,CARD,BANK_TRANSFER,CASH",
    "transaction_reference": "architecto",
    "gateway_reference": "architecto",
    "status": "PENDING",
    "paid_at": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/billing/payments';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'invoice_id' => 'architecto',
            'amount' => 4326.41688,
            'method' => 'MOBILE_MONEY,CARD,BANK_TRANSFER,CASH',
            'transaction_reference' => 'architecto',
            'gateway_reference' => 'architecto',
            'status' => 'PENDING',
            'paid_at' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Payment recorded successfully",
    "data": {
        "invoice_id": "1",
        "amount": "30000",
        "method": "CASH",
        "paid_at": "2025-12-08",
        "updated_at": "2025-12-08T13:47:08.000000Z",
        "created_at": "2025-12-08T13:47:08.000000Z",
        "id": 1
    }
}
 

Request      

POST api/billing/payments

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

invoice_id   string     

Example: architecto

amount   number     

Example: 4326.41688

method   string     

Example: MOBILE_MONEY,CARD,BANK_TRANSFER,CASH

transaction_reference   string  optional    

Example: architecto

gateway_reference   string  optional    

Example: architecto

status   string  optional    

Example: PENDING

Must be one of:
  • PENDING
  • COMPLETED
  • FAILED
paid_at   date     

Example: architecto

Delete Invoice Payment

requires authentication

Example request:
curl --request DELETE \
    "https://constell.agent.co.ug/api/billing/payments/architecto" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/billing/payments/architecto"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/billing/payments/architecto';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
      "message": "Payment deleted successfully",
  }
 

Request      

DELETE api/billing/payments/{payment_id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

payment_id   string  optional    

date required Example: architecto

Send Invoice Notification

requires authentication

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/billing/send_invoice/16" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/billing/send_invoice/16"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/billing/send_invoice/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
         "status": "success",
          "message": "Invoice Sent successfully",
      }
  }
 

Request      

GET api/billing/send_invoice/{invoice_id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

invoice_id   integer     

Example: 16

Delivery Order

Delivery Orders

requires authentication

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/delivery/orders" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/delivery/orders"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/delivery/orders';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
  "current_page": 1,
  "data": [
      {
          "id": 4,
          "created_at": "2025-12-09T07:41:36.000000Z",
          "updated_at": "2025-12-09T08:12:25.000000Z",
          "deleted_at": null,
          "delivery_number": "DEL-000001",
          "order_id": 5,
          "rider_id": null,
          "delivery_address": "Kasese",
          "delivery_date": "2025-12-10",
          "status": "PENDING",
          "pod_signature": null,
          "pod_photo_path": "pod_photos/2akLAes8oj4j5OIxC71O5GxwEN8fSJ1jxtotKyxk.jpg",
          "delivery_notes": null,
          "delivered_at": null,
          "order": {
              "id": 5,
              "created_at": "2025-12-05T12:20:11.000000Z",
              "updated_at": "2025-12-05T12:20:11.000000Z",
              "deleted_at": null,
              "tracking_number": "ORD-20251205-00002",
              "user_id": 1,
              "origin_country": "ITALY",
              "receiver_name": "Tom Mboya",
              "receiver_phone": "0789887766",
              "receiver_email": "tom.mboya@gmail.com",
              "receiver_address": "Uganda - Kampala",
              "status": "PENDING",
              "received_at": null,
              "dispatched_at": null,
              "arrived_at": null,
              "released_at": null,
              "delivered_at": null,
              "packages": [
                  {
                      "id": 1,
                      "created_at": "2025-12-08T07:19:43.000000Z",
                      "updated_at": "2025-12-08T07:42:06.000000Z",
                      "deleted_at": null,
                      "order_id": 5,
                      "hwb_number": "HWB-2025128-0002",
                      "contents": "Computer - Desktop",
                      "declared_value": "2500000.00",
                      "weight": "5.00",
                      "length": "4.00",
                      "width": "6.00",
                      "height": "2.00",
                      "is_fragile": true,
                      "is_hazardous": false,
                      "is_damaged": false,
                      "package_photos": [
                          "package_photos/LXHHmhE4YM0YoTn1Lva95FSyQi31i89dskkPv2il.jpg",
                          "package_photos/thtdPXJtqtkpECHhbeyXIOAIMSGt564ZFIXBqdcp.jpg",
                          "package_photos/Uc34hnpyAPsAT1QINJfca0msaFdudcYfaY2Qs21h.jpg"
                      ],
                      "location_id": 1,
                      "received_at": "2025-12-03T00:00:00.000000Z"
                  },

              ]
          }
      }
  ],
  "first_page_url": "http://127.0.0.1:8000/api/delivery/orders?page=1",
  "from": 1,
  "last_page": 1,
  "last_page_url": "http://127.0.0.1:8000/api/delivery/orders?page=1",
  "links": [
      {
          "url": null,
          "label": "&laquo; Previous",
          "active": false
      },
      {
          "url": "http://127.0.0.1:8000/api/delivery/orders?page=1",
          "label": "1",
          "active": true
      },
      {
          "url": null,
          "label": "Next &raquo;",
          "active": false
      }
  ],
  "next_page_url": null,
  "path": "http://127.0.0.1:8000/api/delivery/orders",
  "per_page": 20,
  "prev_page_url": null,
  "to": 1,
  "total": 1
}
 

Request      

GET api/delivery/orders

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Create Order Deliver

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/delivery/orders" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order_id\": 16,
    \"delivery_address\": \"architecto\",
    \"delivery_date\": \"architecto\",
    \"status\": \"ASSIGNED\",
    \"pod_signature\": \"architecto\",
    \"pod_photo_path\": \"architecto\",
    \"delivery_notes\": \"architecto\",
    \"delivered_at\": \"2025-12-15T07:30:57\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/delivery/orders"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order_id": 16,
    "delivery_address": "architecto",
    "delivery_date": "architecto",
    "status": "ASSIGNED",
    "pod_signature": "architecto",
    "pod_photo_path": "architecto",
    "delivery_notes": "architecto",
    "delivered_at": "2025-12-15T07:30:57"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/delivery/orders';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'order_id' => 16,
            'delivery_address' => 'architecto',
            'delivery_date' => 'architecto',
            'status' => 'ASSIGNED',
            'pod_signature' => 'architecto',
            'pod_photo_path' => 'architecto',
            'delivery_notes' => 'architecto',
            'delivered_at' => '2025-12-15T07:30:57',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Delivery order created successfully",
    "data": {
        "order_id": "5",
        "delivery_address": "Kasese",
        "delivery_date": "2025-12-10",
        "delivery_number": "DEL-000001",
        "updated_at": "2025-12-09T07:41:36.000000Z",
        "created_at": "2025-12-09T07:41:36.000000Z",
        "id": 4,
        "order": {
            "id": 5,
            "created_at": "2025-12-05T12:20:11.000000Z",
            "updated_at": "2025-12-05T12:20:11.000000Z",
            "deleted_at": null,
            "tracking_number": "ORD-20251205-00002",
            "user_id": 1,
            "origin_country": "ITALY",
            "receiver_name": "Tom Mboya",
            "receiver_phone": "0789887766",
            "receiver_email": "tom.mboya@gmail.com",
            "receiver_address": "Uganda - Kampala",
            "status": "PENDING",
            "received_at": null,
            "dispatched_at": null,
            "arrived_at": null,
            "released_at": null,
            "delivered_at": null,
            "packages": [
                {
                    "id": 1,
                    "created_at": "2025-12-08T07:19:43.000000Z",
                    "updated_at": "2025-12-08T07:42:06.000000Z",
                    "deleted_at": null,
                    "order_id": 5,
                    "hwb_number": "HWB-2025128-0002",
                    "contents": "Computer - Desktop",
                    "declared_value": "2500000.00",
                    "weight": "5.00",
                    "length": "4.00",
                    "width": "6.00",
                    "height": "2.00",
                    "is_fragile": true,
                    "is_hazardous": false,
                    "is_damaged": false,
                    "package_photos": [
                        "package_photos/LXHHmhE4YM0YoTn1Lva95FSyQi31i89dskkPv2il.jpg",
                        "package_photos/thtdPXJtqtkpECHhbeyXIOAIMSGt564ZFIXBqdcp.jpg",
                        "package_photos/Uc34hnpyAPsAT1QINJfca0msaFdudcYfaY2Qs21h.jpg"
                    ],
                    "location_id": 1,
                    "received_at": "2025-12-03T00:00:00.000000Z"
                },
                {
                    "id": 2,
                    "created_at": "2025-12-08T07:32:17.000000Z",
                    "updated_at": "2025-12-08T07:32:17.000000Z",
                    "deleted_at": null,
                    "order_id": 5,
                    "hwb_number": "HWB-2025128-0021",
                    "contents": "Computer - Desktop",
                    "declared_value": "2500000.00",
                    "weight": "5.00",
                    "length": "4.00",
                    "width": "6.00",
                    "height": "2.00",
                    "is_fragile": true,
                    "is_hazardous": false,
                    "is_damaged": false,
                    "package_photos": null,
                    "location_id": 1,
                    "received_at": "2025-12-03T00:00:00.000000Z"
                }
            ]
        }
    }
}
 

Request      

POST api/delivery/orders

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

order_id   integer     

Example: 16

rider_id   string  optional    

The id of an existing record in the users table.

delivery_address   string     

Example: architecto

delivery_date   date     

Example: architecto

status   string  optional    

Example: ASSIGNED

Must be one of:
  • PENDING
  • ASSIGNED
  • OUT_FOR_DELIVERY
  • DELIVERED
  • FAILED
pod_signature   string  optional    

Example: architecto

pod_photo_path   string  optional    

Example: architecto

delivery_notes   string  optional    

Example: architecto

delivered_at   string  optional    

Must be a valid date. Example: 2025-12-15T07:30:57

Single Delivery Order

requires authentication

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/delivery/orders/16" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/delivery/orders/16"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/delivery/orders/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Delivery order",
    "data": {
        "id": 4,
        "created_at": "2025-12-09T07:41:36.000000Z",
        "updated_at": "2025-12-09T08:12:25.000000Z",
        "deleted_at": null,
        "delivery_number": "DEL-000001",
        "order_id": 5,
        "rider_id": null,
        "delivery_address": "Kasese",
        "delivery_date": "2025-12-10",
        "status": "PENDING",
        "pod_signature": null,
        "pod_photo_path": "pod_photos/2akLAes8oj4j5OIxC71O5GxwEN8fSJ1jxtotKyxk.jpg",
        "delivery_notes": null,
        "delivered_at": null,
        "order": {
            "id": 5,
            "created_at": "2025-12-05T12:20:11.000000Z",
            "updated_at": "2025-12-05T12:20:11.000000Z",
            "deleted_at": null,
            "tracking_number": "ORD-20251205-00002",
            "user_id": 1,
            "origin_country": "ITALY",
            "receiver_name": "Tom Mboya",
            "receiver_phone": "0789887766",
            "receiver_email": "tom.mboya@gmail.com",
            "receiver_address": "Uganda - Kampala",
            "status": "PENDING",
            "received_at": null,
            "dispatched_at": null,
            "arrived_at": null,
            "released_at": null,
            "delivered_at": null,
            "packages": [
                {
                    "id": 1,
                    "created_at": "2025-12-08T07:19:43.000000Z",
                    "updated_at": "2025-12-08T07:42:06.000000Z",
                    "deleted_at": null,
                    "order_id": 5,
                    "hwb_number": "HWB-2025128-0002",
                    "contents": "Computer - Desktop",
                    "declared_value": "2500000.00",
                    "weight": "5.00",
                    "length": "4.00",
                    "width": "6.00",
                    "height": "2.00",
                    "is_fragile": true,
                    "is_hazardous": false,
                    "is_damaged": false,
                    "package_photos": [
                        "package_photos/LXHHmhE4YM0YoTn1Lva95FSyQi31i89dskkPv2il.jpg",
                        "package_photos/thtdPXJtqtkpECHhbeyXIOAIMSGt564ZFIXBqdcp.jpg",
                        "package_photos/Uc34hnpyAPsAT1QINJfca0msaFdudcYfaY2Qs21h.jpg"
                    ],
                    "location_id": 1,
                    "received_at": "2025-12-03T00:00:00.000000Z"
                },
                {
                    "id": 2,
                    "created_at": "2025-12-08T07:32:17.000000Z",
                    "updated_at": "2025-12-08T07:32:17.000000Z",
                    "deleted_at": null,
                    "order_id": 5,
                    "hwb_number": "HWB-2025128-0021",
                    "contents": "Computer - Desktop",
                    "declared_value": "2500000.00",
                    "weight": "5.00",
                    "length": "4.00",
                    "width": "6.00",
                    "height": "2.00",
                    "is_fragile": true,
                    "is_hazardous": false,
                    "is_damaged": false,
                    "package_photos": null,
                    "location_id": 1,
                    "received_at": "2025-12-03T00:00:00.000000Z"
                }
            ],
            "user": {
                "id": 1,
                "full_name": "Thembo Charles",
                "email": "ashley7520charles@gmail.com",
                "phone": "0787444081",
                "email_verified_at": null,
                "tin": "110023452",
                "passport": "65748",
                "address": "Kampala",
                "otp": "4782",
                "status": "active",
                "user_type": "user",
                "created_at": "2025-12-05T06:42:09.000000Z",
                "updated_at": "2025-12-05T07:58:28.000000Z",
                "deleted_at": null
            }
        }
    }
}
 

Request      

GET api/delivery/orders/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the order. Example: 16

Update Order Deliver

requires authentication

Example request:
curl --request PUT \
    "https://constell.agent.co.ug/api/delivery/orders/16" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"delivery_address\": \"architecto\",
    \"delivery_date\": \"architecto\",
    \"pod_signature\": \"architecto\",
    \"pod_photo_path\": \"architecto\",
    \"delivery_notes\": \"architecto\",
    \"delivered_at\": \"2025-12-15T07:30:57\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/delivery/orders/16"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "delivery_address": "architecto",
    "delivery_date": "architecto",
    "pod_signature": "architecto",
    "pod_photo_path": "architecto",
    "delivery_notes": "architecto",
    "delivered_at": "2025-12-15T07:30:57"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/delivery/orders/16';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'delivery_address' => 'architecto',
            'delivery_date' => 'architecto',
            'pod_signature' => 'architecto',
            'pod_photo_path' => 'architecto',
            'delivery_notes' => 'architecto',
            'delivered_at' => '2025-12-15T07:30:57',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Delivery order updated successfully",
    "data": {
        "order_id": "5",
        "delivery_address": "Kasese",
        "delivery_date": "2025-12-10",
        "delivery_number": "DEL-000001",
        "updated_at": "2025-12-09T07:41:36.000000Z",
        "created_at": "2025-12-09T07:41:36.000000Z",
        "id": 4,
        "order": {
            "id": 5,
            "created_at": "2025-12-05T12:20:11.000000Z",
            "updated_at": "2025-12-05T12:20:11.000000Z",
            "deleted_at": null,
            "tracking_number": "ORD-20251205-00002",
            "user_id": 1,
            "origin_country": "ITALY",
            "receiver_name": "Tom Mboya",
            "receiver_phone": "0789887766",
            "receiver_email": "tom.mboya@gmail.com",
            "receiver_address": "Uganda - Kampala",
            "status": "PENDING",
            "received_at": null,
            "dispatched_at": null,
            "arrived_at": null,
            "released_at": null,
            "delivered_at": null,
            "packages": [
                {
                    "id": 1,
                    "created_at": "2025-12-08T07:19:43.000000Z",
                    "updated_at": "2025-12-08T07:42:06.000000Z",
                    "deleted_at": null,
                    "order_id": 5,
                    "hwb_number": "HWB-2025128-0002",
                    "contents": "Computer - Desktop",
                    "declared_value": "2500000.00",
                    "weight": "5.00",
                    "length": "4.00",
                    "width": "6.00",
                    "height": "2.00",
                    "is_fragile": true,
                    "is_hazardous": false,
                    "is_damaged": false,
                    "package_photos": [
                        "package_photos/LXHHmhE4YM0YoTn1Lva95FSyQi31i89dskkPv2il.jpg",
                        "package_photos/thtdPXJtqtkpECHhbeyXIOAIMSGt564ZFIXBqdcp.jpg",
                        "package_photos/Uc34hnpyAPsAT1QINJfca0msaFdudcYfaY2Qs21h.jpg"
                    ],
                    "location_id": 1,
                    "received_at": "2025-12-03T00:00:00.000000Z"
                },
                {
                    "id": 2,
                    "created_at": "2025-12-08T07:32:17.000000Z",
                    "updated_at": "2025-12-08T07:32:17.000000Z",
                    "deleted_at": null,
                    "order_id": 5,
                    "hwb_number": "HWB-2025128-0021",
                    "contents": "Computer - Desktop",
                    "declared_value": "2500000.00",
                    "weight": "5.00",
                    "length": "4.00",
                    "width": "6.00",
                    "height": "2.00",
                    "is_fragile": true,
                    "is_hazardous": false,
                    "is_damaged": false,
                    "package_photos": null,
                    "location_id": 1,
                    "received_at": "2025-12-03T00:00:00.000000Z"
                }
            ]
        }
    }
}
 

Request      

PUT api/delivery/orders/{id}

PATCH api/delivery/orders/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the order. Example: 16

deliveryOrder_id   integer     

Example: 16

Body Parameters

rider_id   string  optional    

The id of an existing record in the user table.

delivery_address   string     

Example: architecto

delivery_date   date     

Example: architecto

pod_signature   string  optional    

Example: architecto

pod_photo_path   string  optional    

Example: architecto

delivery_notes   string  optional    

Example: architecto

delivered_at   string  optional    

Must be a valid date. Example: 2025-12-15T07:30:57

Delete Delivery Order

requires authentication

Example request:
curl --request DELETE \
    "https://constell.agent.co.ug/api/delivery/orders/16" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/delivery/orders/16"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/delivery/orders/16';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
         "status": "success",
          "message": "Delivery order deleted successfully",
      }
 

Request      

DELETE api/delivery/orders/{id}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the order. Example: 16

deliveryOrder_id   integer     

Example: 16

Upload a point of Delivery photo

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/delivery/orders/16/upload-pod" \
    --header "Bearer: Token" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "pod_photo=@/tmp/phpziChbd" 
const url = new URL(
    "https://constell.agent.co.ug/api/delivery/orders/16/upload-pod"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('pod_photo', document.querySelector('input[name="pod_photo"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/delivery/orders/16/upload-pod';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
        ],
        'multipart' => [
            [
                'name' => 'pod_photo',
                'contents' => fopen('/tmp/phpziChbd', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Point Of Delivery photo uploaded successfully",
    "photo_url": "pod_photos/2akLAes8oj4j5OIxC71O5GxwEN8fSJ1jxtotKyxk.jpg"
}
 

Request      

POST api/delivery/orders/{delivery_order}/upload-pod

Headers

Bearer        

Example: Token

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

delivery_order   integer     

Example: 16

delivery_order_id   integer     

Example: 16

Body Parameters

pod_photo   file     

Example: /tmp/phpziChbd

Upload Customer Delivery Signature

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/delivery/orders/16/upload-signature" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"signature\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/delivery/orders/16/upload-signature"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "signature": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/delivery/orders/16/upload-signature';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'signature' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
      "message": "Signature saved successfully",
  }
 

Request      

POST api/delivery/orders/{delivery_order}/upload-signature

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

delivery_order   integer     

Example: 16

delivery_order_id   integer     

Example: 16

Body Parameters

signature   string     

Example: architecto

Update Delivery Order status

requires authentication

Example request:
curl --request POST \
    "https://constell.agent.co.ug/api/delivery/update-orders-status/architecto" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"PENDING,ASSIGNED,OUT_FOR_DELIVERY,DELIVERED,FAILED\",
    \"rider_id\": 16,
    \"reason\": \"architecto\"
}"
const url = new URL(
    "https://constell.agent.co.ug/api/delivery/update-orders-status/architecto"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "status": "PENDING,ASSIGNED,OUT_FOR_DELIVERY,DELIVERED,FAILED",
    "rider_id": 16,
    "reason": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/delivery/update-orders-status/architecto';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'status' => 'PENDING,ASSIGNED,OUT_FOR_DELIVERY,DELIVERED,FAILED',
            'rider_id' => 16,
            'reason' => 'architecto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
      "message": "Rider assigned successfully",
  }
 

Request      

POST api/delivery/update-orders-status/{delivery_order}

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

delivery_order   string     

Example: architecto

delivery_order_id   integer     

Example: 16

Body Parameters

status   string     

Example: PENDING,ASSIGNED,OUT_FOR_DELIVERY,DELIVERED,FAILED

rider_id   integer  optional    

Example: 16

reason   string  optional    

Example: architecto

Dashboard

requires authentication

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/delivery/dashboard" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/delivery/dashboard"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/delivery/dashboard';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "total": 1,
    "pending": 1,
    "assigned": 0,
    "out": 0,
    "delivered": 0,
    "failed": 0,
    "today_deliveries": []
}
 

Request      

GET api/delivery/dashboard

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Riders

requires authentication

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/delivery/riders" \
    --header "Bearer: Token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/delivery/riders"
);

const headers = {
    "Bearer": "Token",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/delivery/riders';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Bearer' => 'Token',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Riders",
    "data": [
        {
            "id": 1,
            "full_name": "Thembo Charles",
            "phone": "0787444081",
            "email": "ashley7520charles@gmail.com"
        }
    ]
}
 

Request      

GET api/delivery/riders

Headers

Bearer        

Example: Token

Content-Type        

Example: application/json

Accept        

Example: application/json

Others

Display the specified resource.

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/settings/locations/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/settings/locations/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/settings/locations/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/settings/locations/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the location. Example: 16

Display a listing of the resource.

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/billing/invoice-line-items" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/billing/invoice-line-items"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/billing/invoice-line-items';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/billing/invoice-line-items

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Display the specified resource.

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/billing/invoice-line-items/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/billing/invoice-line-items/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/billing/invoice-line-items/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/billing/invoice-line-items/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the invoice line item. Example: 16

GET api/activity_logs

Example request:
curl --request GET \
    --get "https://constell.agent.co.ug/api/activity_logs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://constell.agent.co.ug/api/activity_logs"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://constell.agent.co.ug/api/activity_logs';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/activity_logs

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json