This section provides detailed information about the Orders API available on our platform. The API allows you to manage orders efficiently.

API Endpoint

  • /en/api-docs/orders

Usage

The /en/api-docs/orders endpoint can be used to retrieve, create, update, or delete orders. Here are the methods available:

  • GET: Retrieve a list of orders or details of a specific order.
  • POST: Create a new order.
  • PUT: Update an existing order.
  • DELETE: Delete an order.

GET /en/api-docs/orders

Retrieves a list of orders. You can specify query parameters to filter the results.

  • params:
    • status: Filter orders by status (e.g., pending, completed).
    • customer_id: Filter orders by customer ID.

POST /en/api-docs/orders

Creates a new order. You need to provide the necessary details in the request body.

  • body:
    • customer_id: The ID of the customer.
    • items: An array of items with their quantities and prices.
    • total_price: The total price of the order.

PUT /en/api-docs/orders

Updates an existing order. You need to provide the updated details in the request body.

  • body:
    • order_id: The ID of the order to update.
    • items: An array of items with their quantities and prices.
    • total_price: The total price of the order.

DELETE /en/api-docs/orders

Deletes an order. You need to provide the order ID in the request body.

  • body:
    • order_id: The ID of the order to delete.

Example Response

{
  "success": true,
  "data": {
    "order_id": "12345",
    "customer_id": "67890",
    "items": [
      {
        "item_id": "123",
        "quantity": 1,
        "price": 10.99
      },
      {
        "item_id": "456",
        "quantity": 2,
        "price": 5.99
      }
    ],
    "total_price": 26.98,
    "status": "completed"
  }
}

For more information on managing orders, please visit our Order Management Guide.

Order Management