Skip to main content
GET
/
purchases
/
{purchase_id}
Get a specific purchase of an account
curl --request GET \
  --url https://api.togai.com/purchases/{purchase_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "purchase.1zYnCiM9Bpg.lv25y",
  "accountId": "G234DZZKBKACATFFGVGEMERFI",
  "pricePlanId": "pp.1zYnCiM9Bpg.lv25y",
  "quantity": 1,
  "idempotencyKey": "AAAAABBBDDIIEOO42",
  "pricePlanVersion": 1,
  "purchasePlan": {
    "rateValues": [
      {
        "CurrencyRateValue": {
          "currency": "USD",
          "rate": 10
        }
      },
      {
        "CurrencyRateValue": {
          "currency": "INR",
          "rate": 150
        }
      }
    ],
    "entitlementRateCards": [
      {
        "EntitlementRateCard": {
          "featureId": "feature.1zYnCiM9Bpg.lv25y",
          "featureCredits": 100,
          "expiryDurationSeconds": 1000
        }
      }
    ]
  },
  "features": [
    {
      "id": "feature.1zYnCiM9Bpg.lv25y",
      "name": "DiscountCredits",
      "description": "Discount Credits Feature",
      "effectiveUntil": "2020-01-01T00:00:00Z",
      "grantedCredits": 100,
      "credits": 100,
      "updatedAt": "2020-01-01T00:00:00Z"
    }
  ],
  "createdAt": "2020-01-01T00:00:00Z",
  "updatedAt": "2020-01-01T00:00:00Z"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

purchase_id
string
required
Maximum string length: 50
Example:

"purchase.1zYnCiM9Bpg.lv25y"

Response

Response for getting a specific purchase detail of an account

Represents a Purchase

id
string
required
accountId
string
required
Minimum string length: 1
pricePlanId
string
required
Minimum string length: 1
pricePlanVersion
integer<int32>
required
createdAt
string<date-time>
required
status
enum<string>
required

Status of the purchase

Available options:
SUCCESS,
FAILURE,
PENDING,
IN_PROGRESS,
PROPOSAL_ACTIVE,
PROPOSAL_APPROVED,
PROPOSAL_DECLINED,
PROPOSAL_EXPIRED
type
enum<string>
required
Available options:
ENTITLEMENT_GRANT,
ASSOCIATION
quantity
integer<int32>
rateCardQuantities
object
idempotencyKey
string
purchasePlanOverride
object
associationOverride
object
updatedAt
string<date-time>
effectiveFrom
string<date>
effectiveUntil
string<date>
expiryDate
string<date-time>
price
number
invoiceId
string
invoiceCurrency
string
comment
string
purchasePlan
object

entitlements override options for purchase of a price plan for an account

features
PurchaseFeatureDetails ยท object[]