Get order items

The method allows you to get information about the items in the shopping cart sent to you in messages

Endpoint: GET https://gate.whapi.cloud/business/orders/{OrderID}

This API endpoint is designed to retrieve detailed information about the items in a shopping cart that have been sent to your channel in messages. It's a valuable tool for managing customer orders directly through WhatsApp.

Making a Request

To use this endpoint, append the order ID to the endpoint URL, and include the necessary tokens as query parameters.

It's important to note that the token should be used as a query parameter, not in the request header.

Hereโ€™s an example request using cURL:

curl --request GET \
     --url 'https://gate.whapi.cloud/business/orders/your-order-id?order_token=order-token&token=your-channel-token' \
     --header 'accept: application/json'

Key Details

  • Order ID: This is the unique identifier for the order whose items you want to retrieve. You can get it in the order list, in the message list (special message type - order), as well as on a webhook about an incoming order.

  • Order Token: A specific token related to the order, ensuring secure access to order details. Comes with the order details.

  • Channel Token: Your channel's authentication token, used to validate access rights to the API.

Incoming message with order

{
  "messages": [
    {
      "id": "7GZVXunkHjZaIOgEgWPPrw-gDMTwl0rVw",
      "from_me": false,
      "type": "order",
      "chat_id": "919984351847@s.whatsapp.net",
      "timestamp": 1713264543,
      "source": "mobile",
      "order": {
        ,
        "seller": "61371989950",
        "title": "Jonathan",
         
        "item_count": 3,
        "currency": "AUD",
        "total_price": 359,
        "status": "new",
        "preview": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQAB......"
      },
      "from": "919984351847",
      "from_name": "Gerald"
    }
  ],
  "event": {
    "type": "messages",
    "event": "post"
  },
  "channel_id": "MANTIS-M72HC"
}

Use this endpoint to streamline your order management process, ensuring that you have instant access to all necessary order details, helping you provide efficient customer service.

Last updated