Introduction
APIs
- Authentication
- Customers
- Accounts
- GETList accounts of customer
- POSTCreate an account
- GETGet an account
- DELDelete an account
- PATCHUpdate an account
- Account Aliases
- (Deprecated) Plan Associations
- (Deprecated) Purchases
- (Deprecated) Proposals
- Schedules
- GET
- Aliases
- Event Schemas
- Usage Meters
- AddOns
- Licenses
- Feature
- (Deprecated) Price Plans
- Price Plan V2
- Settings
- Price Experimentation
- Jobs
- Event Ingestion
- Entitlements
- Event Management
- Metrics
- Credits
- Invoices
- Payments
- Wallet
- InvoiceGroups
- Alerts
- Reports
(Deprecated) Purchases
(DEPRECATED) Get all purchases for an account
Get Purchase information for an account using account_id and price_plan_id
GET
/
accounts
/
{account_id}
/
purchases
curl --request GET \
--url https://api.togai.com/accounts/{account_id}/purchases \
--header 'Authorization: Bearer <token>'
{
"data": [
{
"id": "purchase.1zYnCiM9Bpg.lv25y",
"pricePlanId": "pp.20dINmd0lBg.05sKa",
"pricePlanName": "Entitlement Plan",
"quantity": 1,
"pricePlanVersion": 1,
"type": "ENTITLEMENT_GRANT",
"status": "SUCCESS",
"idempotencyKey": "AAAAABBBBDDDD7730",
"createdAt": "2020-01-01T00:00:00Z",
"updatedAt": "2020-01-01T00:00:00Z"
},
{
"id": "purchase.20txx14r0m8.VKxaB",
"pricePlanId": "pp.20txw0FrqjQ.byM8V",
"pricePlanName": "pp_feature_purchase",
"pricePlanVersion": 1,
"type": "ENTITLEMENT_GRANT",
"status": "SUCCESS",
"purchasePlan": {
"billingEntitlementRateCards": [
{
"featureId": "feature.20txvOAhiIS.m3X3d",
"featureConfigs": [
{
"effectiveUntil": "P20D",
"featureCreditLimit": 100,
"effectiveFrom": "PT0S"
}
],
"invoiceTiming": "IN_ADVANCE",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "PER_UNIT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 1
}
]
}
],
"displayName": "feature1"
}
],
"supportedCurrencies": [
"USD"
],
"activeCurrencies": [
"USD"
]
},
"createdAt": "2023-07-31T15:49:25.007848Z",
"rateCardQuantities": {
"feature.20txvOAhiIS.m3X3d": 1.2
},
"price": 120,
"invoiceCurrency": "USD",
"updatedAt": "2023-07-31T15:51:35.093598Z"
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
account_id corresponding to an account
Maximum length:
50
Example:
"ACC00001"
Response
200
application/json
Response for list Purchase for an account request
The response is of type object
.
curl --request GET \
--url https://api.togai.com/accounts/{account_id}/purchases \
--header 'Authorization: Bearer <token>'
{
"data": [
{
"id": "purchase.1zYnCiM9Bpg.lv25y",
"pricePlanId": "pp.20dINmd0lBg.05sKa",
"pricePlanName": "Entitlement Plan",
"quantity": 1,
"pricePlanVersion": 1,
"type": "ENTITLEMENT_GRANT",
"status": "SUCCESS",
"idempotencyKey": "AAAAABBBBDDDD7730",
"createdAt": "2020-01-01T00:00:00Z",
"updatedAt": "2020-01-01T00:00:00Z"
},
{
"id": "purchase.20txx14r0m8.VKxaB",
"pricePlanId": "pp.20txw0FrqjQ.byM8V",
"pricePlanName": "pp_feature_purchase",
"pricePlanVersion": 1,
"type": "ENTITLEMENT_GRANT",
"status": "SUCCESS",
"purchasePlan": {
"billingEntitlementRateCards": [
{
"featureId": "feature.20txvOAhiIS.m3X3d",
"featureConfigs": [
{
"effectiveUntil": "P20D",
"featureCreditLimit": 100,
"effectiveFrom": "PT0S"
}
],
"invoiceTiming": "IN_ADVANCE",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "PER_UNIT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 1
}
]
}
],
"displayName": "feature1"
}
],
"supportedCurrencies": [
"USD"
],
"activeCurrencies": [
"USD"
]
},
"createdAt": "2023-07-31T15:49:25.007848Z",
"rateCardQuantities": {
"feature.20txvOAhiIS.m3X3d": 1.2
},
"price": 120,
"invoiceCurrency": "USD",
"updatedAt": "2023-07-31T15:51:35.093598Z"
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.