Creating Orders
Once a customer has selected a pickup point and paid for their order, you must create the shipment in the NowPost system.
The API Request
Endpoint: POST /api/v1/orders
Headers:
Authorization: Bearer <YOUR_SECRET_KEY>(Note: Use Secret Key on server-side)Content-Type: application/json
Payload Reference
| Field | Type | Required | Description |
|---|---|---|---|
partner_order_id | String | Yes | Your internal order reference (e.g., "#1001") |
pudo_point_id | String | Yes | The ID of the selected pickup point |
customer | Object | Yes | Customer contact details |
items | Array | Yes | List of items in the package |
webhook_url | String | No | URL to receive status updates for this order |
Full Example
{
"partner_order_id": "ORD-2023-001",
"pudo_point_id": "pudo_12345",
"customer": {
"name": "Jane Doe",
"email": "jane@example.com",
"phone": "+2348012345678"
},
"items": [
{
"name": "Wireless Headphones",
"qty": 1,
"price": 15000,
"weight_kg": 0.5
}
],
"webhook_url": "https://your-store.com/webhooks/nowpost"
}
Success Response
{
"status": "success",
"data": {
"id": "np_ord_987654321",
"tracking_code": "NP12345678",
"status": "created",
"label_url": "https://api.nowpost.com/labels/np_ord_987654321.pdf"
}
}
Next Steps
- Save the
tracking_codein your database associated with the order. - Download and Print the shipping label (optional, if you do your own sorting).
- Hand over the package to NowPost logistics.