Skip to main content
GET
/
accounts
/
{account_id}
/
purchases
(DEPRECATED) Get all purchases for an account
curl --request GET \
  --url https://api.togai.com/accounts/{account_id}/purchases \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "<string>",
      "status": "SUCCESS",
      "createdAt": "2023-11-07T05:31:56Z",
      "type": "ENTITLEMENT_GRANT",
      "pricePlanId": "<string>",
      "pricePlanName": "<string>",
      "quantity": 123,
      "rateCardQuantities": {},
      "pricePlanVersion": 123,
      "idempotencyKey": "<string>",
      "purchasePlan": {
        "supportedCurrencies": [
          "<string>"
        ],
        "activeCurrencies": [
          "<string>"
        ],
        "pricingCycleConfig": {
          "interval": "WEEKLY",
          "gracePeriod": 3,
          "startOffset": {
            "dayOffset": "<string>",
            "monthOffset": "<string>"
          },
          "anniversaryCycle": true
        },
        "usageRateCards": [
          {
            "usageMeterId": "um.1zYnCiM9Bpg.1zYn",
            "ratePlan": {
              "pricingModel": "TIERED",
              "slabs": [
                {
                  "order": 5,
                  "startAfter": 123,
                  "priceType": "FLAT",
                  "slabConfig": {}
                }
              ]
            },
            "rateValues": [
              {
                "currency": "<string>",
                "slabRates": [
                  {
                    "order": 123,
                    "rate": 123,
                    "slabRateConfig": {}
                  }
                ],
                "rateConfig": {}
              }
            ],
            "displayName": "<string>",
            "name": "<string>",
            "tag": "<string>"
          }
        ],
        "fixedFeeRateCards": [
          {
            "id": "<string>",
            "rateValues": [
              {
                "currency": "<string>",
                "rate": 123
              }
            ],
            "enableProration": false,
            "displayName": "<string>",
            "name": "<string>",
            "tag": "<string>",
            "invoiceTiming": "IN_ADVANCE",
            "type": "ONE_TIME",
            "recurrenceConfig": {
              "interval": 3,
              "offset": 5
            }
          }
        ],
        "licenseRateCards": [
          {
            "id": "<string>",
            "enableProration": false,
            "ratePlan": {
              "pricingModel": "TIERED",
              "slabs": [
                {
                  "order": 5,
                  "startAfter": 123,
                  "priceType": "FLAT",
                  "slabConfig": {}
                }
              ]
            },
            "rateValues": [
              {
                "currency": "<string>",
                "slabRates": [
                  {
                    "order": 123,
                    "rate": 123,
                    "slabRateConfig": {}
                  }
                ],
                "rateConfig": {}
              }
            ],
            "type": "LICENSE",
            "displayName": "<string>",
            "name": "<string>",
            "tag": "<string>",
            "invoiceTiming": "IN_ADVANCE",
            "usageCycle": "WEEKLY",
            "config": {
              "maxQuantity": 100,
              "maxQuantityBreachAction": "DO_NOTHING"
            },
            "proratedRefundMode": "NONE"
          }
        ],
        "billingEntitlementRateCards": [
          {
            "featureId": "<string>",
            "featureConfigs": [
              {
                "effectiveUntil": "<string>",
                "featureCreditLimit": 1,
                "effectiveFrom": "<string>"
              }
            ],
            "invoiceTiming": "IN_ADVANCE",
            "ratePlan": {
              "pricingModel": "TIERED",
              "slabs": [
                {
                  "order": 5,
                  "startAfter": 123,
                  "priceType": "FLAT",
                  "slabConfig": {}
                }
              ]
            },
            "rateValues": [
              {
                "currency": "<string>",
                "slabRates": [
                  {
                    "order": 123,
                    "rate": 123,
                    "slabRateConfig": {}
                  }
                ],
                "rateConfig": {}
              }
            ],
            "tag": "<string>",
            "displayName": "<string>",
            "name": "<string>",
            "recurrenceConfig": {
              "interval": 3,
              "offset": 5
            }
          }
        ],
        "entitlementOverageRateCards": [
          {
            "featureId": "<string>",
            "ratePlan": {
              "pricingModel": "TIERED",
              "slabs": [
                {
                  "order": 5,
                  "startAfter": 123,
                  "priceType": "FLAT",
                  "slabConfig": {}
                }
              ]
            },
            "rateValues": [
              {
                "currency": "<string>",
                "slabRates": [
                  {
                    "order": 123,
                    "rate": 123,
                    "slabRateConfig": {}
                  }
                ],
                "rateConfig": {}
              }
            ],
            "displayName": "<string>",
            "name": "<string>",
            "tag": "<string>",
            "maxQuantity": 123,
            "billingConfig": {
              "interval": 3,
              "startOffset": 5
            }
          }
        ],
        "minimumCommitment": {
          "displayName": "<string>",
          "rateValues": [
            {
              "currency": "<string>",
              "rate": 123
            }
          ]
        },
        "creditGrantRateCards": [
          {
            "id": "<string>",
            "grantDetails": {
              "priority": 1,
              "expiryType": "PRICING_CYCLE",
              "expiryDuration": "<string>",
              "applicableEntityIds": [
                "<string>"
              ]
            },
            "rateDetails": {
              "pricingModel": "TIERED",
              "currencySlabRateDetails": [
                {
                  "currency": "<string>",
                  "creditAmount": 1,
                  "slabDetails": [
                    {
                      "startAfter": 123,
                      "priceType": "FLAT",
                      "rate": 123,
                      "slabConfig": {},
                      "slabRateConfig": {}
                    }
                  ],
                  "rateConfig": {}
                }
              ]
            },
            "displayName": "<string>",
            "name": "<string>",
            "tag": "<string>",
            "invoiceTiming": "IN_ADVANCE",
            "type": "ONE_TIME",
            "recurrenceConfig": {
              "interval": 3,
              "offset": 5
            }
          }
        ],
        "type": "BILLING",
        "deferredRevenue": true,
        "allow_ongoing_cycle_updates": "<unknown>"
      },
      "walletTopupDetails": {
        "topupAmount": 123,
        "purchaseAmount": 123
      },
      "price": 123,
      "invoiceCurrency": "<string>",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "nextToken": "<string>",
  "context": {
    "pageSize": 123,
    "sortOrder": "ASC"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

account_id
string
required

account_id corresponding to an account

Maximum string length: 50
Example:

"ACC00001"

Response

Response for list Purchase for an account request

data
object[]
nextToken
string
context
object