Skip to content
Oclavex is in private preview, available to selected users. Public signup is blocked. Request access at [email protected].

Deposits credits onto the caller's OWN entitlement balance, authorized by their license-session token. Only honored for self-service entitlements (issued from a signup offer) whose offer lets consumers grant themselves credits — for tenant-provisioned customers, and wherever the vendor sells credits, deposits remain an admin/machine operation.

POST
/api/v1/provision/consumer/me/credits/grant
curl --request POST \
--url https://example.com/api/v1/provision/consumer/me/credits/grant \
--header 'Content-Type: application/json' \
--data '{ "sessionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metric": "example", "amount": 1 }'

The caller’s session, the balance-carrying metric, and the amount.

Consumer-side credit grant: deposits onto the CALLER’s own entitlement balance, authorized by their license-session token. Only honored for self-service entitlements (issued from a signup offer) whose offer lets consumers grant themselves credits, which it does not unless the vendor turns that on — the demo/top-up loop, not a general consumer credit-minting surface.

object
sessionId

The caller’s own session id (must match the license token).

string format: uuid
metric

The balance-carrying metric to deposit onto (e.g. the product’s extra-credits metric).

string
amount

Credits to add: more than zero and at most 100,000 (double GrantSessionCreditsDto.MaximumAmount), and no more than brings the balance to 1,000,000 (double GrantSessionCreditsDto.MaximumBalance). Anything else is refused with a validation error and nothing is deposited.

number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/
Examplegenerated
{
"sessionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"metric": "example",
"amount": 1
}

OK

Result of a session credit grant: the entitlement and metric affected and the amount deposited, which is the amount requested.

object
entitlementId
string format: uuid
metric
string
granted
number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/

Bad Request

object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string

Unauthorized

object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string

Forbidden

object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string

Not Found

object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string

Conflict

object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string