Partner API
Purchases
List partner purchases
Retrieve a paginated list of partner purchases with optional filtering
get/{partnerId}/purchases
Request
- Base URL: https://us-central1-sutra-prod.cloudfunctions.net/partnerApi/v0
- URL: https://us-central1-sutra-prod.cloudfunctions.net/partnerApi/v0/{partnerId}/purchases
- Auth: one of:
- API key in header X-API-Key
- HTTP bearer
Path parameters
partnerIdstring required
Example:partner123
Partner identifier
Query parameters
limitinteger
Example:10
Number of items to return (default 10, max 100)
start_afterstring
Example:item123
ID to start after for pagination
updated_at_minstring date-time
Example:2024-03-20T00:00:00Z
Filter by minimum updated timestamp (ISO 8601)
updated_at_maxstring date-time
Example:2024-03-21T23:59:59Z
Filter by maximum updated timestamp (ISO 8601)
idsstring
Example:id1,id2,id3
Comma-separated list of IDs to fetch
Response
Successful response
Example response
{
"items": [
{
"id": "purchase123",
"client_id": "client123",
"type": "subscription",
"offering_id": "offering123",
"status": "ACTIVE",
"start_date": "2024-03-20T12:00:00Z",
"end_date": "2024-04-20T12:00:00Z",
"updated_at": "2024-03-20T12:00:00Z",
"name": "Monthly Unlimited",
"remaining_uses": 30,
"price": 99.99
}
],
"pagination": {
"limit": 10,
"nextStartAfterId": "item123"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.