Skip to main content

Ready Order

This endpoint allows vendors to mark an accepted order as prepared and ready for pickup or dispatch.

Overview

Once an order has been accepted and prepared, call this endpoint to signal that it is ready. This updates the order status in the Presto system and can trigger notifications to the customer or delivery personnel.

Endpoint Details

Method: POST
URL: /api/developer/v1/orders/{orderId}/ready
Purpose: Indicate that an order is prepared and ready for pickup or delivery

Request Specification

Path Parameters

ParameterTypeRequiredDescription
orderIdstring / integerYesThe unique identifier of the order to mark as ready

Request Body

No request body is required for this endpoint.

Example Request

POST /api/developer/v1/orders/12345/ready
Authorization: Bearer <your-token>
Accept: application/json

Response Specification

Success Response

200 OK

A successful response indicates the order status was updated to ready.

{
"data": {
"id": "ORDER_123",
"service": "shop",
"status": {
"key": "pending",
// ...other status fields...
},
"total": 0,
"currency": "LYD",
"created_at": "2025-01-01T00:00:00+00:00"
// ...other fields...
}
}

Error Responses

401 Unauthorized - Authentication issues

{
"status": "error",
"message": "Unauthenticated."
}

404 Not Found - Order not found

{
"status": "error",
"message": "Order not found"
}

400 Bad Request - Order state error

{
"status": "error",
"message": "Order cannot be marked as ready in its current state"
}

Implementation Tips

Best Practices
  • Call this endpoint only after the order has been fully prepared
  • Ensure the order was successfully accepted before attempting to mark it as ready
  • Implement proper error handling for state conflicts

Next Steps

After marking an order as ready, the Presto system will handle the subsequent steps such as notifying the customer or dispatching a delivery driver. No further action is required from your system unless specific to your integration.