This documentation describes the API endpoints available for customers using our POD service.
Note: Every request must include your API key in the HTTP header X-API-Key
.
All endpoints are available under:
https://pod.rrbindery.com
Endpoint: GET /orders/
This endpoint returns a list of orders associated with your account. For non-admin customers, only orders created by your account are returned.
Headers:
X-API-Key: YOUR_API_KEY
Multi-line Example:
curl -X GET https://pod.rrbindery.com/orders/ \ -H "X-API-Key: YOUR_API_KEY"
One-line Example:
curl -X GET https://pod.rrbindery.com/orders/ -H "X-API-Key: YOUR_API_KEY"
Response: A JSON array of order objects. Each order includes details such as:
id
– Order unique identifierrr_job_number
– The job number assigned to the orderstatus
– Order status (e.g., "RECEIVED")received_at_date
– Date the order was receivedship_date
– Calculated shipping date (7 business days from received date)line_items
– Array of line items and associated file informationEndpoint: GET /orders/<order_id>
Retrieve the full details for a specific order. You can only access orders that belong to your account.
Headers:
X-API-Key: YOUR_API_KEY
Multi-line Example:
curl -X GET https://pod.rrbindery.com/orders/ORDER_ID \ -H "X-API-Key: YOUR_API_KEY"
One-line Example:
curl -X GET https://pod.rrbindery.com/orders/ORDER_ID -H "X-API-Key: YOUR_API_KEY"
Response: A JSON object with complete order details (including line items and file information).
Endpoint: POST /orders/
This endpoint is used to submit a new order. Your API key automatically associates the order with your account.
Required JSON Field:
external_id
– A unique identifier for the order from your systemOptional/Additional Fields: You may include line item details and other order information. The server automatically sets or calculates the following fields:
customer_id
and company_name
(derived from your API credentials)received_at_date
– Set to the current UTC dateship_date
– Calculated as 7 business days from the received datestatus
– Defaults to RECEIVED
if not providedHeaders:
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Multi-line Example:
curl -X POST https://pod.rrbindery.com/orders/ \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "external_id": "your_order_external_id", "line_items": [ { "id": "item1", "external_id": "item_external_id", "quantity": 2, "title": "Sample Book Title", "isbn": "1234567890123", "end_user_price": "15.99", "mono_pages": 10, "color_pages": 5, "pages": 150, "pod_package_id": "pod_package_code_if_applicable" } ] }'
One-line Example:
curl -X POST https://pod.rrbindery.com/orders/ -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" -d '{"external_id": "your_order_external_id", "line_items": [{"id": "item1", "external_id": "item_external_id", "quantity": 2, "title": "Sample Book Title", "isbn": "1234567890123", "end_user_price": "15.99", "mono_pages": 10, "color_pages": 5, "pages": 150, "pod_package_id": "pod_package_code_if_applicable"}]}'
Response: On success, the API returns a JSON object similar to:
{ "status": "Order Created", "order_id": "generated_order_id", "rr_job_number": 12345, "ship_date": "YYYY-MM-DD" }
If an order with the same external_id
already exists for your account, a 409 Conflict
error is returned with the existing order details.
Endpoint: POST /orders/<order_id>/line_items/<line_item_id>/files/<file_index>/mark_downloaded
This endpoint allows you to mark a file (associated with a line item) as downloaded. You can only update files for orders that belong to your account.
Parameters:
order_id
– The unique ID of the orderline_item_id
– The unique ID of the line itemfile_index
– The zero-based index of the file in the line item’s file arrayHeaders:
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Optional JSON Body: You may include a downloaded_at
field to specify a custom timestamp. If omitted, the current UTC timestamp is used.
Multi-line Example:
curl -X POST https://pod.rrbindery.com/orders/ORDER_ID/line_items/LINE_ITEM_ID/files/0/mark_downloaded \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "downloaded_at": "2025-02-05T12:34:56Z" }'
One-line Example:
curl -X POST https://pod.rrbindery.com/orders/ORDER_ID/line_items/LINE_ITEM_ID/files/0/mark_downloaded -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" -d '{ "downloaded_at": "2025-02-05T12:34:56Z" }'
Response: A successful response will look like:
{ "status": "ok", "downloaded_at": "2025-02-05T12:34:56Z" }
In the event of errors, the API will return standard HTTP status codes along with a JSON error message. Common responses include:
401 Unauthorized
– Missing or invalid API key400 Bad Request
– Invalid input or missing required fields409 Conflict
– Duplicate order detected500 Internal Server Error
– An unexpected error occurredexternal_id
to prevent duplication.