Fetch a list of purchases
Use the Purchase API to fetch purchase information from purchases made with Zettle. For example, the purchase information is consumed in integrations with accounting systems and inventory updates. The following describes how to retrieve multiple purchases for merchant.
- Authorisation setup with the correct scope, and a valid authorisation token. See Purchase concept.
Returns a list of purchases for a merchant. Purchases up to three years old are available for fetching.
You can limit the request through the following query parameters:
- Retrieve next page of purchases using
- Start/end dates using
- Maximum number of records to return using
- Most recent purchases first in response using
See Purchase API reference for more details about query parameters.
Example: Fetch all purchases for a merchant. This is done in multiple steps as described in the following.
Step 1: Send a request with the limit parameter set to 50 to define the number of purchases to retrieve.
Step 2: At the bottom of the response, find the values of
Step 3: Send another request with these settings: The
limitparameter the same as in the initial request;
lastPurchaseHashwith the value from the previous response.
Step 4: Repeat step 2 and step 3 until the response is empty.