curl --request GET \
--url https://{your-subdomain}.neetocal.com/api/external/v1/packages/{package_id}/purchases \
--header 'X-Api-Key: <x-api-key>'const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://{your-subdomain}.neetocal.com/api/external/v1/packages/{package_id}/purchases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetocal.com/api/external/v1/packages/{package_id}/purchases"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"purchases": [
{
"id": "1b217cc5-69b5-4fb1-a13c-c22f9c14e7f9",
"name": "John Doe",
"email": "john@example.com",
"purchase_code": "PUR-123456",
"duration_remaining": 3600,
"status": "confirmed",
"notes": "Customer requested priority support",
"package_id": "aff17ff8-1bf8-4e77-a3c5-2f86104f9a20",
"duration": 7200,
"created_at": "2023-12-01T10:00:00Z",
"updated_at": "2023-12-01T10:30:00Z"
}
],
"pagination": {
"total_records": 123,
"total_pages": 123,
"current_page_number": 123,
"page_size": 123
}
}List package purchases
List purchases for a package.
curl --request GET \
--url https://{your-subdomain}.neetocal.com/api/external/v1/packages/{package_id}/purchases \
--header 'X-Api-Key: <x-api-key>'const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://{your-subdomain}.neetocal.com/api/external/v1/packages/{package_id}/purchases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetocal.com/api/external/v1/packages/{package_id}/purchases"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"purchases": [
{
"id": "1b217cc5-69b5-4fb1-a13c-c22f9c14e7f9",
"name": "John Doe",
"email": "john@example.com",
"purchase_code": "PUR-123456",
"duration_remaining": 3600,
"status": "confirmed",
"notes": "Customer requested priority support",
"package_id": "aff17ff8-1bf8-4e77-a3c5-2f86104f9a20",
"duration": 7200,
"created_at": "2023-12-01T10:00:00Z",
"updated_at": "2023-12-01T10:30:00Z"
}
],
"pagination": {
"total_records": 123,
"total_pages": 123,
"current_page_number": 123,
"page_size": 123
}
}{your-subdomain} with your workspace’s subdomain. Learn how to find your subdomain in Workspace subdomain.
Headers
Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.
Path Parameters
Id of the package to retrieve purchases for. You can get package_id by listing all packages using our List packages API. Here you will see id for each package.
Query Parameters
Page of results to retrieve, starting from 1. Defaults to 1 when omitted.
Number of results per page. Defaults to 30 when omitted.
Response
OK - Request succeeded
Array of purchases for the specified package.
Hide child attributes
Hide child attributes
Unique identifier for the purchase.
"1b217cc5-69b5-4fb1-a13c-c22f9c14e7f9"
Name of the person who made the purchase.
"John Doe"
Email address of the person who made the purchase.
"john@example.com"
Unique code associated with the purchase.
"PUR-123456"
Remaining duration in seconds for the purchased package.
3600
Current status of the purchase.
"confirmed"
Additional notes or comments about the purchase.
"Customer requested priority support"
ID of the package that was purchased.
"aff17ff8-1bf8-4e77-a3c5-2f86104f9a20"
Total duration in seconds of the purchased package.
7200
Timestamp when the purchase was created.
"2023-12-01T10:00:00Z"
Timestamp when the purchase was last updated.
"2023-12-01T10:30:00Z"
Pagination information including total records, pages, and current page details.