I want to retrieve a list of orders using the Square API. The call to retrieve orders is a POST call with a String array of order_ids however I'm not sure where I can get this information. In the docs they said I can use the ListTransactions
endpoint to get this information but I'm not able to find the order_id
within the response.
The documentation to retrieve Orders
located at: https://docs.connect.squareup.com/api/connect/v2#endpoint-batchretrieveorders
see sample response of ListTransactions
: https://docs.connect.squareup.com/api/connect/v2#endpoint-listtransactions
The Orders API does not support listing of orders. To access order details, you will need to fetch the order's ID by querying transactions using the ListTransactions and RetrieveTransaction endpoints, and then fetching the order using the BatchRetrieveOrders endpoint
Reference: https://docs.connect.squareup.com/articles/orders-api-overview
The goal is to get a list of recent transactions/orders that list out exactly what was purchased. The Transactions
model doesn't contain Items
whereas the Orders
model does.