Credits and commitments
Path Parameters
Query Parameters
int32Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/customers/string/credits"{ "credits": [ { "amount": { "amount": { "value": "string" }, "currencyCode": "string" }, "applicableProducts": [ "string" ], "applicableTags": [ "string" ], "createTime": "2019-08-24T14:15:22Z", "effectivePeriod": { "endTime": "2019-08-24T14:15:22Z", "startTime": "2019-08-24T14:15:22Z" }, "name": "string", "priority": 0, "reason": "string", "status": "GRANT_STATUS_UNSPECIFIED", "voidTime": "2019-08-24T14:15:22Z" } ], "nextPageToken": "string"}Path Parameters
Query Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
CreditGrant represents promotional or contractual value available to spend.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/customers/string/credits?creditId=string" \ -H "Content-Type: application/json" \ -d '{ "amount": { "amount": { "value": "string" }, "currencyCode": "string" }, "effectivePeriod": { "startTime": "2019-08-24T14:15:22Z" }, "reason": "string" }'{ "amount": { "amount": { "value": "string" }, "currencyCode": "string" }, "applicableProducts": [ "string" ], "applicableTags": [ "string" ], "createTime": "2019-08-24T14:15:22Z", "effectivePeriod": { "endTime": "2019-08-24T14:15:22Z", "startTime": "2019-08-24T14:15:22Z" }, "name": "string", "priority": 0, "reason": "string", "status": "GRANT_STATUS_UNSPECIFIED", "voidTime": "2019-08-24T14:15:22Z"}Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/customers/string/credits/string"{ "amount": { "amount": { "value": "string" }, "currencyCode": "string" }, "applicableProducts": [ "string" ], "applicableTags": [ "string" ], "createTime": "2019-08-24T14:15:22Z", "effectivePeriod": { "endTime": "2019-08-24T14:15:22Z", "startTime": "2019-08-24T14:15:22Z" }, "name": "string", "priority": 0, "reason": "string", "status": "GRANT_STATUS_UNSPECIFIED", "voidTime": "2019-08-24T14:15:22Z"}Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/customers/string/credits/string:void" \ -H "Content-Type: application/json" \ -d '{ "reason": "string", "requestId": "string" }'{ "amount": { "amount": { "value": "string" }, "currencyCode": "string" }, "applicableProducts": [ "string" ], "applicableTags": [ "string" ], "createTime": "2019-08-24T14:15:22Z", "effectivePeriod": { "endTime": "2019-08-24T14:15:22Z", "startTime": "2019-08-24T14:15:22Z" }, "name": "string", "priority": 0, "reason": "string", "status": "GRANT_STATUS_UNSPECIFIED", "voidTime": "2019-08-24T14:15:22Z"}Path Parameters
Query Parameters
int32Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/customers/string/commitments"{ "commitments": [ { "applicableProducts": [ "string" ], "committedAmount": { "amount": { "value": "string" }, "currencyCode": "string" }, "contract": "string", "costBasis": { "amount": { "value": "string" }, "currencyCode": "string" }, "createTime": "2019-08-24T14:15:22Z", "effectivePeriod": { "endTime": "2019-08-24T14:15:22Z", "startTime": "2019-08-24T14:15:22Z" }, "name": "string", "status": "GRANT_STATUS_UNSPECIFIED", "voidTime": "2019-08-24T14:15:22Z" } ], "nextPageToken": "string"}Path Parameters
Query Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Commitment represents minimum spend agreed for an effective period.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/customers/string/commitments?commitmentId=string" \ -H "Content-Type: application/json" \ -d '{ "committedAmount": { "amount": { "value": "string" }, "currencyCode": "string" }, "contract": "string", "costBasis": { "amount": { "value": "string" }, "currencyCode": "string" }, "effectivePeriod": { "startTime": "2019-08-24T14:15:22Z" } }'{ "applicableProducts": [ "string" ], "committedAmount": { "amount": { "value": "string" }, "currencyCode": "string" }, "contract": "string", "costBasis": { "amount": { "value": "string" }, "currencyCode": "string" }, "createTime": "2019-08-24T14:15:22Z", "effectivePeriod": { "endTime": "2019-08-24T14:15:22Z", "startTime": "2019-08-24T14:15:22Z" }, "name": "string", "status": "GRANT_STATUS_UNSPECIFIED", "voidTime": "2019-08-24T14:15:22Z"}Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/customers/string/commitments/string"{ "applicableProducts": [ "string" ], "committedAmount": { "amount": { "value": "string" }, "currencyCode": "string" }, "contract": "string", "costBasis": { "amount": { "value": "string" }, "currencyCode": "string" }, "createTime": "2019-08-24T14:15:22Z", "effectivePeriod": { "endTime": "2019-08-24T14:15:22Z", "startTime": "2019-08-24T14:15:22Z" }, "name": "string", "status": "GRANT_STATUS_UNSPECIFIED", "voidTime": "2019-08-24T14:15:22Z"}Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/customers/string/commitments/string:void" \ -H "Content-Type: application/json" \ -d '{ "reason": "string", "requestId": "string" }'{ "applicableProducts": [ "string" ], "committedAmount": { "amount": { "value": "string" }, "currencyCode": "string" }, "contract": "string", "costBasis": { "amount": { "value": "string" }, "currencyCode": "string" }, "createTime": "2019-08-24T14:15:22Z", "effectivePeriod": { "endTime": "2019-08-24T14:15:22Z", "startTime": "2019-08-24T14:15:22Z" }, "name": "string", "status": "GRANT_STATUS_UNSPECIFIED", "voidTime": "2019-08-24T14:15:22Z"}Path Parameters
Query Parameters
date-timeResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/customers/string/balance"{ "asOfTime": "2019-08-24T14:15:22Z", "commitmentRemaining": { "amount": { "value": "string" }, "currencyCode": "string" }, "creditRemaining": { "amount": { "value": "string" }, "currencyCode": "string" }, "customer": "string"}Path Parameters
Query Parameters
int32Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/customers/string/balanceTransactions"{ "nextPageToken": "string", "transactions": [ { "amount": { "amount": { "value": "string" }, "currencyCode": "string" }, "createTime": "2019-08-24T14:15:22Z", "description": "string", "name": "string", "source": "string", "type": "BALANCE_TRANSACTION_TYPE_UNSPECIFIED" } ]}