List purchased items
The listPurchasedItems
operation returns the list of all purchased catalog items accessible to the current user, including pending purchases, and completed purchases.
This is a complete history of the purchases made using the contracts accessible to the current user.
The operation also supports pagination, to facilitate scrolling through the purchase history, and the list is returned in most recently modified order (recently purchased items near the top).
Query parameters
Paginated results
When a cursor
property appears in the response, it indicates that more results are available.
To access the next page of results, send a follow-up request that includes the cursor
query parameter, setting it equal to the cursor
value from the previous response.
On success, the next page of results is returned, potentially including a new cursor
to continue walking the list.
You can customize the number of returned catalog items by providing a limit
query parameter, which specifies the maximum number of items to return in the response.
By default, up to 100 purchased items are returned in each response.
Enter the following curl
command, remembering to replace the ${VARNAME}
variables with the appropriate values:
curl -v -G "${API_BASE_URL}/api/catalog/v1/purchases" \
--header "Accept: application/json, application/problem+json" \
--header "Authorization: Bearer ${API_ACCESS_TOKEN}"
--data-urlencode "cursor=XXXXXXXXXX" \
--data-urlencode "limit=20"
Example
Request
Enter the following curl
command, remembering to replace the ${VARNAME}
variables with the appropriate values:
curl -v -G "${API_BASE_URL}/api/catalog/v1/purchases" \
--header "Accept: application/json, application/problem+json" \
--header "Authorization: Bearer ${API_ACCESS_TOKEN}"
Response
On success, returns a 200
status code and a JSON object containing purchase status.
{
"cursor": "_97_hwMBARFPcmRlcnNRdWVyeVBhcmFtcwH_iAABDQECSUQBDAABCkN1c3RvbWVySUQBDAABCk1vZGlmaWVkQXQB_4YAAQlDcmVhdGVkQnkBDAABCkppcmFUaWNrZXQBDAABC09yZGVyU3RhdHVzAQwAAQlPcmRlclR5cGUBDAABEE1pc3Npb25Db250cm9sSUQBBAABDUFjcXVpc2l0aW9uSUQBBAABCFByaW9yaXR5AQQAAQtNaW5Qcmlvcml0eQEEAAELTWF4UHJpb3JpdHkBBAABBUxpbWl0AQQAAAAQ_4UFAQEEVGltZQH_hgAAAD7_iAEkMDk3ODViNzUtNDM3Ny00NTdmLWI4NDEtMDcwMTgzOTUwNjMwAg8BAAAADt2vH8ckERfg__8K_gfQAA",
"data": [
{
"contractName": "ICEYE",
"createdAt": "2024-04-23T11:40:57.484585Z",
"customerName": "ICEYE",
"id": "766cc4d6-7754-448e-9c6c-0ef3d209d65e",
"status": "active",
"reference": "purchase reference 123-456"
},
{
"contractName": "ICEYE",
"createdAt": "2024-04-25T09:33:17.057937Z",
"customerName": "ICEYE",
"id": "7a69ea62-0f70-4482-9f5b-6ce68b61d381",
"status": "active",
"reference": "purchase reference 321-654"
},
...
]
}