Create a new credit grant
Create a new credit grant. A credit grant represents an allocation of prepaid credits to a customer.
Path parameters
ULID (Universally Unique Lexicographically Sortable Identifier).
Request body
Example request
{
"labels": {
"env": "test"
},
"currency": "USD",
"purchase": {
"currency": "USD"
},
"tax_config": {
"tax_code": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
},
"filters": {
"features": [
"input_tokens",
"output_tokens"
]
},
"effective_at": "2023-01-01T01:01:01.001Z",
"expires_after": "P1Y",
"key": "019ae40f-4258-7f15-9491-842f42a7d6ac"
}Response
CreditGrant created response.
Example response
{
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"labels": {
"env": "test"
},
"created_at": "2023-01-01T01:01:01.001Z",
"updated_at": "2023-01-01T01:01:01.001Z",
"deleted_at": "2023-01-01T01:01:01.001Z",
"currency": "USD",
"purchase": {
"currency": "USD"
},
"tax_config": {
"tax_code": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
},
"invoice": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"line": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
},
"filters": {
"features": [
"input_tokens",
"output_tokens"
]
},
"effective_at": "2023-01-01T01:01:01.001Z",
"key": "019ae40f-4258-7f15-9491-842f42a7d6ac",
"expires_at": "2023-01-01T01:01:01.001Z",
"voided_at": "2023-01-01T01:01:01.001Z"
}Changes
Changed in 9 of the 63 revisions of this API.182030
- ▲
removed from the
////request propertyanyOflistrequest-property-any-of-removed
- ▲
added to the
////response propertyoneOflist for the response statusresponse-property-one-of-added
- ○
added to the
////request propertyoneOflistrequest-property-one-of-added
- ○
removed from the
////response propertyanyOflist for the response statusresponse-property-any-of-removed
- ▲
- ▲
the
////request property type changed fromstringto no typerequest-property-type-changed
- ▲
the
////response's property type changed fromstringto no type for statusresponse-property-type-changed
- ●
removed from the
////request propertyallOflistrequest-property-all-of-removed
- ○
added to the
////request propertyanyOflistrequest-property-any-of-added
- ○
removed from the
////response propertyallOflist for the response statusresponse-property-all-of-removed
- ○
added to the
////response propertyanyOflist for the response statusresponse-property-any-of-added
- ▲
- ○
added the optional property
to the response with the statusresponse-optional-property-added
- ○
- ○
added the new optional request property
new-optional-request-property
- ○
added the optional property
to the response with the statusresponse-optional-property-added
- ○
- ○
added the new optional request property
new-optional-request-property
- ○
- ○
added the non-success response with the status
response-non-success-status-added
- ○
- ▲
added to the
request propertyallOflistrequest-property-all-of-added
- ▲
added to the
request propertyallOflistrequest-property-all-of-added
- ▲
added to the
request propertyallOflistrequest-property-all-of-added
- ▲
the
request property type changed fromobjectto no typerequest-property-type-changed
- ▲
the
response's property type changed fromobjectto no type for statusresponse-property-type-changed
- ▲
the
response's property type changed fromobjectto no type for statusresponse-property-type-changed
- ▲
removed the required property
/from the response with the statusresponse-required-property-removed
- ▲
removed the required property
/from the response with the statusresponse-required-property-removed
- ●
removed from the
request propertyallOflistrequest-property-all-of-removed
- ●
removed from the
request propertyallOflistrequest-property-all-of-removed
- ●
removed the request property
/request-property-removed
- ●
removed the request property
/request-property-removed
- ●
removed the request property
/request-property-removed
- ●
removed the optional property
/from the response with the statusresponse-optional-property-removed
- ●
removed the optional property
/from the response with the statusresponse-optional-property-removed
- ●
removed the optional property
/from the response with the statusresponse-optional-property-removed
- ●
removed the optional property
/from the response with the statusresponse-optional-property-removed
- ●
removed the optional property
/from the response with the statusresponse-optional-property-removed
- ○
added to the
response propertyallOflist for the response statusresponse-property-all-of-added
- ○
added to the
response propertyallOflist for the response statusresponse-property-all-of-added
- ○
added to the
//response propertyallOflist for the response statusresponse-property-all-of-added
- ○
removed from the
//response propertyallOflist for the response statusresponse-property-all-of-removed
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
added the new optional request property
new-optional-request-property
- ○
added the optional property
to the response with the statusresponse-optional-property-added
- ○
- ▲
added the new required request property
/new-required-request-property
- ▲
added to the
request propertyallOflistrequest-property-all-of-added
- ▲
added to the
request propertyallOflistrequest-property-all-of-added
- ▲
the
request property type changed from no type toobjectrequest-property-type-changed
- ▲
the
response's property type changed from no type toobjectfor statusresponse-property-type-changed
- ▲
the
response's property type changed from no type toobjectfor statusresponse-property-type-changed
- ●
removed from the
request propertyallOflistrequest-property-all-of-removed
- ●
removed from the
request propertyallOflistrequest-property-all-of-removed
- ●
removed from the
request propertyallOflistrequest-property-all-of-removed
- ●
removed the request property
request-property-removed
- ●
removed the request property
request-property-removed
- ●
removed the request property
request-property-removed
- ●
removed the optional property
from the response with the statusresponse-optional-property-removed
- ●
removed the optional property
from the response with the statusresponse-optional-property-removed
- ●
removed the optional property
from the response with the statusresponse-optional-property-removed
- ○
added the new optional request property
/new-optional-request-property
- ○
added the new optional request property
/new-optional-request-property
- ○
removed the non-success response with the status
response-non-success-status-removed
- ○
added the optional property
/to the response with the statusresponse-optional-property-added
- ○
added the optional property
/to the response with the statusresponse-optional-property-added
- ○
added the optional property
/to the response with the statusresponse-optional-property-added
- ○
added the optional property
/to the response with the statusresponse-optional-property-added
- ○
added the optional property
/to the response with the statusresponse-optional-property-added
- ○
added to the
//response propertyallOflist for the response statusresponse-property-all-of-added
- ○
removed from the
response propertyallOflist for the response statusresponse-property-all-of-removed
- ○
removed from the
response propertyallOflist for the response statusresponse-property-all-of-removed
- ○
removed from the
//response propertyallOflist for the response statusresponse-property-all-of-removed
- ○
added the required property
/to the response with the statusresponse-required-property-added
- ○
added the required property
/to the response with the statusresponse-required-property-added
This revision also has 112 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲