Viewing Orders
This guide explains how e-commerce partners can view orders using the Nowpost API.
Endpoint
GET /orders
Authentication
- You must be authenticated to view orders.
- Generate your API token using the Partner API Token Generation endpoint.
- Include your API token in the
Authorizationheader as a Bearer token in every request.
Headers:
Authorization: Bearer <your_api_token_from_/partner/api-keys>
Content-Type: application/json
Query Parameters
You can filter, search, and paginate orders using the following query parameters:
page(int, optional): Page number (default: 1)pageSize(int, optional): Page size (default: 10)search(string, optional): Search termstatus(string, optional): Order status filtersortBy(string, optional): Sort fieldsortOrder(string, optional): Sort order (ascordesc)dateFrom(string, optional): Filter orders from this date (RFC3339, ISO8601, or YYYY-MM-DD)dateTo(string, optional): Filter orders up to this date (RFC3339, ISO8601, or YYYY-MM-DD)
Example Request
GET /orders?page=1&pageSize=10&search=electronics&status=delivered&dateFrom=2025-08-01&dateTo=2025-08-12&sortBy=createdAt&sortOrder=desc
Authorization: Bearer <your_api_token>
Response
200 OK
{
"data": {
"orders": [
{
"id": "order-id",
"partnerId": "<partner_id>",
"receiverEmail": "customer@example.com",
"receiverFirstName": "Jane",
"receiverLastName": "Doe",
"items": [
{
"description": "Product Name",
"weight": 2.5,
"length": 10.0,
"width": 5.0,
"height": 3.0,
"quantity": 2,
"value": 1000
}
],
"deliveryFee": 500,
"note": "Handle with care",
"status": "delivered",
"createdAt": "2025-08-12T12:00:00Z"
}
],
"pagination": {
"page": 1,
"pageSize": 10,
"total": 100,
"totalPages": 10,
"hasNext": true,
"hasPrevious": false
}
}
}
Error Responses
401 Unauthorized: Authentication failed or missing token.400 Bad Request: Invalid query parameters or user ID.500 Internal Server Error: Server error.
For more details, see the API Reference.