POST
/
accounts
/
{account_id}
/
purchase_proposals
curl --request POST \
--url https://api.togai.com/accounts/{account_id}/purchase_proposals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"pricePlanId": "pp.20dINmd0lBg.05sKa",
"type": "ENTITLEMENT_GRANT",
"paymentMode": "PREPAID",
"quantity": 1,
"purchasePlanOverrides": {
"rateValues": [
{
"CurrencyRateValue": {
"currency": "USD",
"rate": 10
}
},
{
"CurrencyRateValue": {
"currency": "INR",
"rate": 150
}
}
],
"entitlementRateCards": [
{
"EntitlementRateCard": {
"featureId": "feature.1zYnCiM9Bpg.lv25y",
"featureCredits": 100,
"expiryDurationSeconds": 1000
}
}
]
}
}'
{
  "id": "purchase.20rvWRxQcQK.0ZwPG",
  "accountId": "account2394",
  "pricePlanId": "pp.20rqb4MK9ia.TD0eG",
  "createdAt": {},
  "status": "PROPOSAL_ACTIVE",
  "pricePlanOverride": {
    "pricingCycleConfig": {
      "interval": "MONTHLY",
      "startOffset": {
        "dayOffset": 2,
        "monthOffset": "NIL"
      },
      "gracePeriod": 3,
      "anniversaryCycle": false
    }
  },
  "updatedAt": {},
  "effectiveFrom": {},
  "effectiveUntil": {},
  "comment": "Proposal Approved"
}

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 length: 50
Example:

"ACC00001"

Body

application/json

Payload to initiate a proposal

Create a purchase for an account

Response

200
application/json

Response to create proposal request

Represents a Purchase