Introduction
The OnePort BPAAS (Booking Platform as a Service) Middleware API is a RESTful integration layer that gives partner platforms programmatic access to OnePort 365's freight and logistics services.
OnePort 365 is a digital freight forwarding platform that connects shippers, exporters, and importers to carriers, freight agents, and logistics providers across Africa and global trade lanes. The BPAAS Middleware API is the bridge that lets your platform — whether a marketplace, ERP system, trade finance tool, or customs portal — embed OnePort's freight capabilities directly into your own product without building the logistics infrastructure from scratch.
Through this API, your platform can:
- Onboard users with a secure, OTP-verified registration and login flow.
- Search live freight rates across multiple carriers and lanes in real time.
- Create and confirm bookings for ocean freight shipments with full container specification.
- Manage shipments end-to-end, from creation to document uploads.
- Access reference data such as commodity types and HS codes to validate and enrich payloads.
Who This API Is For
This documentation is intended for developers integrating OnePort 365's freight services into a third-party platform. You should be comfortable working with REST APIs, JSON payloads, and HTTP Bearer Token authentication.
Base URL
All API endpoints are relative to the base URL for your target environment. Prefix every endpoint path in this documentation with the appropriate base URL.
| Environment | Base URL |
|---|---|
| Test / Staging | https://test-bpass-api.oneport365.com/api |
| Production | https://bpass-api.oneport365.com/api |
Authentication
The API uses Bearer Token authentication. Every
request — except Register and Login — must include a valid token in
the Authorization header.
Authorization: Bearer <your_token>
Tokens are obtained by completing the registration and login flow. Follow these steps before making any other API calls:
- Register — Create an account with your email, password, name, and phone. An OTP is sent to your email.
- Verify OTP — Confirm your email using the OTP. Your account is inactive until this step is completed.
- Login — Authenticate with your credentials. The response contains your bearer token.
-
Store and use the token — Include it in the
Authorizationheader on every subsequent request.
If your token expires, call Login again for a fresh one. For forgotten passwords, use the Forgot Password → Reset Password flow.
Request & Response Format
All request bodies must be sent as JSON (Content-Type: application/json), except for document uploads which use
multipart/form-data. All responses are returned as
JSON. A successful request returns a 2xx status code.
Errors return a corresponding 4xx or
5xx status with a message body.
Resource Groups
The API is organized into five groups, each covering a distinct domain of the freight workflow:
| Group | What it covers |
|---|---|
| Auth | Account registration, OTP verification, login, and password recovery |
| Bookings | Create, list, view, and confirm freight bookings |
| Shipments | Create and manage shipment records, and upload supporting documents |
| DaaS | Reference data — commodity types, HS codes, categories, and descriptions |
| Live Rates | Fetch real-time freight rates, validate pricing, and lock in a selected rate |
Typical Integration Flow
Most integrations follow this end-to-end sequence. Each step depends on data returned by the previous one.
1. Register
↓
2. Verify OTP (activates the account)
↓
3. Login → receive bearer token
↓
4. Get Live Rates (pass search_id to next steps)
↓
5. Confirm Live Rates (validate pricing in your chosen currency)
↓
6. Select Rate (locks the rate for a booking)
↓
7. Create Booking (origin, destination, container spec, cargo-ready date)
↓
8. Confirm Booking (links shipment_id and finalizes container details)
↓
9. Create Shipment (lane, multi-container, goods details)
↓
10. Upload Documents (bill of lading, NXP, packing list, etc.)
Use the DaaS — Commodity Types endpoint at any point in the flow to look up valid HS codes, commodity categories, or descriptions to populate booking and shipment payloads correctly.
Key Concepts
search_id
A search_id ties together the three Live Rates calls —
Get, Confirm, and Select. It represents a single rate-search session
and must be passed as a path variable in all three endpoints.
booking_id vs shipment_id
A booking is a freight reservation — the intent to
ship. A shipment is the operational record that
tracks the cargo from origin to destination. They are linked: when
you confirm a booking, you provide a shipment_id to tie
them together.
Port Codes
Origin and destination ports are identified using
UN/LOCODE — the United Nations Code for Trade and
Transport Locations. For example, NGAPP is Apapa
(Lagos, Nigeria) and DEHAM is Hamburg, Germany.
Container Sizes & Types
Container sizes follow the standard format: 20FT,
40FT, 40HC. Container types include
dry (standard), reefer (refrigerated), and
others depending on carrier availability.
Auth
Registration, OTP verification, login and password recovery. Login returns the bearer token used across the rest of the API.
Register
Create a new account. Triggers a one-time code sent to the email for verification.
Body
| Field | Type | |
|---|---|---|
| string | required | |
| password | string | required |
| first_name | string | required |
| last_name | string | required |
| phone | string | required |
curl --location 'https://test-bpass-api.oneport365.com/api/auth/register' \
--header 'Content-Type: application/json' \
--data '{
"email": "[email protected]",
"password": "password123",
"first_name": "John",
"last_name": "Doe",
"phone": "+2348000000000"
}'
{
"email": "[email protected]",
"password": "password123",
"first_name": "John",
"last_name": "Doe",
"phone": "+2348000000000"
}
Login
Authenticate with email and password to obtain the bearer token.
Body
| Field | Type | |
|---|---|---|
| string | required | |
| password | string | required |
{
"email": "[email protected]",
"password": "P@ssword1"
}
Forgot Password
Begin password recovery. Sends a one-time code to the account email.
{ "email": "[email protected]" }
Verify registration OTP
Confirm a newly registered account with the OTP sent to the email.
{
"email": "[email protected]",
"otp": "123456"
}
Reset Password
Set a new password using the OTP from Forgot Password.
{
"email": "[email protected]",
"otp": "123456",
"new_password": "newpassword123"
}
Bookings
List, view, create and confirm freight bookings for the authenticated account.
My Bookings
List bookings for the authenticated account, paginated.
Query parameters
| Param | Type | Default |
|---|---|---|
| page | integer | 0 |
| count | integer | 15 |
curl --location 'https://test-bpass-api.oneport365.com/api/bookings/my-bookings?page=0&count=15' \
--header 'Authorization: Bearer $TOKEN'
Booking Details
Retrieve the full record for a single booking.
Path variables
| Variable | Type | |
|---|---|---|
| booking_id | string | required |
Booking Summary
Retrieve a condensed summary of a single booking.
Path variables
| Variable | Type | |
|---|---|---|
| booking_id | string | required |
Create Booking
Create a booking for a lane with container and cargo-readiness details.
Body
| Field | Type | |
|---|---|---|
| shipment_type | string | required |
| origin_port_code | string | required |
| shipment_transport_type | string | required |
| destination_port_code | string | required |
| container_size | string | required |
| container_type | string | required |
| cargo_ready_date | string (ISO 8601) | required |
{
"shipment_type": "export",
"origin_port_code": "NGAPP",
"shipment_transport_type": "ocean_freight",
"destination_port_code": "VNSGN",
"container_size": "20FT",
"container_type": "dry",
"cargo_ready_date": "2023-10-27T04:48:38.196Z"
}
Confirm Booking
Confirm a booking against a shipment and its container details.
Body
| Field | Type | |
|---|---|---|
| shipment_id | string | required |
| container_count | integer | required |
| container_size | string | required |
| container_type | string | required |
| container_weight | string | required |
| cargo_ready_date | string (ISO 8601) | required |
{
"shipment_id": "63b53f593e411699769e59b4",
"container_count": 1,
"container_size": "20FT",
"container_type": "dry",
"container_weight": "18000",
"cargo_ready_date": "2023-10-27T04:48:38.196Z"
}
Shipments
List and view shipments, create them, and upload supporting documents.
My Shipments
List shipments for the authenticated account, paginated.
Query parameters
| Param | Type | Default |
|---|---|---|
| page | integer | 0 |
| count | integer | 10 |
curl --location 'https://test-bpass-api.oneport365.com/api/shipments/my-shipments?page=0&count=10' \
--header 'Authorization: Bearer $TOKEN'
Shipment Details
Retrieve the full record for a single shipment.
Path variables
| Variable | Type | |
|---|---|---|
| shipment_id | string | required |
Create Shipment
Create a new shipment with lane, pickup date, containers and goods details.
Body
| Field | Type | |
|---|---|---|
| shipment_type | string | required |
| shipment_transport_type | string | required |
| origin_port_code | string | required |
| destination_port_code | string | required |
| cargo_pickup_date | string (ISO 8601) | required |
| containers | array | required |
| goods_value | string | required |
| goods_value_currency | string | required |
| goods_type | string | required |
| is_product_hazardous | boolean | required |
| with_haulage | boolean | required |
Each item in containers carries:
container_count, container_size,
container_weight, container_type.
curl --location 'https://test-bpass-api.oneport365.com/api/shipments/create' \
--header 'Authorization: Bearer $TOKEN' \
--header 'Content-Type: application/json' \
--data @shipment.json
{
"shipment_type": "export",
"shipment_transport_type": "ocean_freight",
"origin_port_code": "NGAPP",
"destination_port_code": "DEHAM",
"cargo_pickup_date": "2023-01-26T11:43:28.165Z",
"containers": [
{
"container_count": 1,
"container_size": "20FT",
"container_weight": 30,
"container_type": "Dry"
}
],
"goods_value": "1000",
"goods_value_currency": "NGN",
"goods_type": "Sesame Seeds",
"is_product_hazardous": false,
"with_haulage": false
}
Upload Document
Attach a document to a shipment. Sent as
multipart/form-data.
Path variables
| Variable | Type | |
|---|---|---|
| shipment_id | string | required |
Form-data fields
| Field | Type | Example |
|---|---|---|
| shipment_file | file | @/path/to/file |
| document_name | string | nxp_document |
| document_type | string | main |
curl --location 'https://test-bpass-api.oneport365.com/api/shipments/upload-document/:shipment_id' \
--header 'Authorization: Bearer $TOKEN' \
--form 'shipment_file=@"/path/to/file"' \
--form 'document_name="nxp_document"' \
--form 'document_type="main"'
DaaS
Reference data used when building bookings and shipments.
Commodity Types
Look up commodity reference data, filtered by HS code, type, category and description.
Query parameters
| Param | Type | Example |
|---|---|---|
| hs_code | string | 104201 |
| commodity_type | string | Agro Commodities |
| commodity_category | string | Rice |
| commodity_description | string | oilcake |
curl --location 'https://test-bpass-api.oneport365.com/api/daas/commodity-types?hs_code=104201&commodity_type=Agro%20Commodities&commodity_category=Rice&commodity_description=oilcake' \
--header 'Authorization: Bearer $TOKEN'
Live Rates
Retrieve live rate results for a search, confirm them, and select one to carry into a booking.
Get Live Rates
Retrieve live rate results for a prior rate search.
Path variables
| Variable | Type | |
|---|---|---|
| search_id | string | required |
Query parameters
| Param | Type | Example |
|---|---|---|
| type | string | lowest_prices |
| is_agent | boolean | true |
curl --location 'https://test-bpass-api.oneport365.com/api/live-rates/get/:search_id?type=lowest_prices&is_agent=true' \
--header 'Authorization: Bearer $TOKEN'
Confirm Live Rates
Confirm a rate result for a search before selecting it.
Path variables
| Variable | Type | |
|---|---|---|
| search_id | string | required |
Body
| Field | Type | |
|---|---|---|
| instant_result_id | string | required |
| rates_currency | string | required |
{
"instant_result_id": "63b53f593e411699769e59b4",
"rates_currency": "NGN"
}
Select Rate
Select a specific rate result to carry into a booking.
Path variables
| Variable | Type | |
|---|---|---|
| search_id | string | required |
Body
| Field | Type | |
|---|---|---|
| rate_result_id | string | required |
| currency | string | required |
{
"rate_result_id": "65bcfad4552ad0567483d199",
"currency": "NGN"
}