Search⌘ K
AI Features

Retrieve Orders

Explore how to retrieve single and batch orders using Square API endpoints in JavaScript. Understand the key parameters like order ID and location ID to fetch order data accurately and handle responses effectively for your business applications.

We can retrieve a single order or multiple orders using the following endpoints, respectively:

RetrieveOrder
https://connect.squareupsandbox.com/v2/orders/<order_id>
BatchRetrieveOrders
https://connect.squareupsandbox.com/v2/orders/batch-retrieve

Let's first see how to retrieve a single order using its ID.

Retrieve order

To retrieve a single order, we can use the RetrieveOrder endpoint using the order ID.

Request

...