Skip to Content
kosemdocs
ReferenceAPICredit grants

Get credit grant

Gets one of an organization's credit grants.

GET
/v1/organizations/{organization}/creditGrants/{creditGrant}

Gets one of an organization's credit grants.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

organization*string

The organization's ID.

Match^org_[0-7][0-9a-hjkmnp-tv-z]{25}$
creditGrant*string

The credit grant's ID.

Match^cg_[0-7][0-9a-hjkmnp-tv-z]{25}$

Response Body

OK

application/json
  1. response
amount*

What is left of it; zero once it expires.

createTime*string

When it was granted.

Formatdate-time
expireTime*string

When what is left of it expires.

Formatdate-time
name*string

Resource name, organizations/{organization_id}/creditGrants/{credit_grant_id}.

reason*string

Why it was granted, such as a promotion.

remaining*

What is left of it; zero once it expires.

Example Request
curl -X GET 'https://api.kosem.ai/v1/organizations/string/creditGrants/string'
Example Response
{
  "amount": {
    "currencyCode": "string",
    "nanos": -999999999,
    "units": 0
  },
  "createTime": "2019-08-24T14:15:22Z",
  "expireTime": "2019-08-24T14:15:22Z",
  "name": "string",
  "reason": "string",
  "remaining": {
    "currencyCode": "string",
    "nanos": -999999999,
    "units": 0
  }
}