Skip to content
Oclavex is in private preview, open to existing MonetizeIt users. New users who would like to evaluate Oclavex before the public launch can request access at info@revenusion.com.

Set key issuance policy

POST
/api/v1/provision/admin/entitlements/{entitlementId}/policies/key-issuance
curl --request POST \
--url https://example.com/api/v1/provision/admin/entitlements/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/policies/key-issuance \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "enabled": true, "template": "example", "alphabet": "CrockfordBase32", "customAlphabet": "example", "caseStyle": "Upper", "checksum": "None", "sequenceScope": "Entitlement", "sequenceStart": 1, "collisionRetryLimit": 1, "normalizeStripSeparators": true, "normalizeCaseInsensitive": true, "normalizeMapConfusables": true, "sequenceCurrent": 1 }'

Sets the shape of the activation codes issued for the entitlement.

  • oidc
    provision.entitlement.update
entitlementId
required
string format: uuid

Target entitlement.

X-Correlation-Id
string

An id of your own for the call. The answer returns it in the same header, and the server log carries it; when you send none, the server makes one.

Template, alphabet, checksum and sequence settings.

Media typeapplication/json

Vendor-defined shape of the activation codes issued for an entitlement: the template the code is rendered from, the alphabet and casing, an optional check character, the sequence counter the {SEQ} token draws from, and how a submitted code is normalized before lookup. Carried on KeyIssuancePolicy and configured through POST {entitlementId}/policies/key-issuance.

object
enabled

When false the platform default random code is issued and Template is ignored.

boolean
template

Template the code is rendered from, e.g. ACME-{DATE:yyMM}-{SEQ:6}-{RAND:4}{CHK}.

string
alphabet

Character set {RAND} draws from.

Allowed values: CrockfordBase32 UppercaseAlphanumeric Numeric Hexadecimal Custom
customAlphabet

Characters {RAND} draws from when Alphabet is KeyAlphabet.Custom.

null | string
caseStyle

Casing applied to the rendered code.

Allowed values: Upper Lower AsIs
checksum

Check-character algorithm used by the {CHK} token.

Allowed values: None LuhnMod10 Iso7064Mod37_2 Damm
sequenceScope

Counter the {SEQ} token draws from.

Allowed values: Entitlement Product Provider
sequenceStart

First value the counter issues.

integer format: int64
collisionRetryLimit

How many times generation re-rolls the random segment after a uniqueness collision before the item fails. Templates whose only variable part is {SEQ} have nothing to re-roll, so they depend on the counter only ever moving forward.

integer format: int32
normalizeStripSeparators

Ignore separators (spaces and dashes) in a submitted code before lookup.

boolean
normalizeCaseInsensitive

Match a submitted code without regard to case.

boolean
normalizeMapConfusables

Fold characters the alphabet excludes onto the ones it keeps before lookup, so a user who types O for 0 or I for 1 still resolves. Only defined for alphabets that omit the confusable pair.

boolean
sequenceCurrent

Value the counter will issue next. Populated when one entitlement is read by id (a list page leaves it null); ignored on writes. A snapshot taken while other requests may be reserving blocks, so treat it as advisory rather than a count.

null | integer format: int64

The stored policy.

Media typeapplication/json

Vendor-defined shape of the activation codes issued for an entitlement: the template the code is rendered from, the alphabet and casing, an optional check character, the sequence counter the {SEQ} token draws from, and how a submitted code is normalized before lookup. Carried on KeyIssuancePolicy and configured through POST {entitlementId}/policies/key-issuance.

object
enabled

When false the platform default random code is issued and Template is ignored.

boolean
template

Template the code is rendered from, e.g. ACME-{DATE:yyMM}-{SEQ:6}-{RAND:4}{CHK}.

string
alphabet

Character set {RAND} draws from.

Allowed values: CrockfordBase32 UppercaseAlphanumeric Numeric Hexadecimal Custom
customAlphabet

Characters {RAND} draws from when Alphabet is KeyAlphabet.Custom.

null | string
caseStyle

Casing applied to the rendered code.

Allowed values: Upper Lower AsIs
checksum

Check-character algorithm used by the {CHK} token.

Allowed values: None LuhnMod10 Iso7064Mod37_2 Damm
sequenceScope

Counter the {SEQ} token draws from.

Allowed values: Entitlement Product Provider
sequenceStart

First value the counter issues.

integer format: int64
collisionRetryLimit

How many times generation re-rolls the random segment after a uniqueness collision before the item fails. Templates whose only variable part is {SEQ} have nothing to re-roll, so they depend on the counter only ever moving forward.

integer format: int32
normalizeStripSeparators

Ignore separators (spaces and dashes) in a submitted code before lookup.

boolean
normalizeCaseInsensitive

Match a submitted code without regard to case.

boolean
normalizeMapConfusables

Fold characters the alphabet excludes onto the ones it keeps before lookup, so a user who types O for 0 or I for 1 still resolves. Only defined for alphabets that omit the confusable pair.

boolean
sequenceCurrent

Value the counter will issue next. Populated when one entitlement is read by id (a list page leaves it null); ignored on writes. A snapshot taken while other requests may be reserving blocks, so treat it as advisory rather than a count.

null | integer format: int64
Example
{
"alphabet": "CrockfordBase32",
"caseStyle": "Upper",
"checksum": "None",
"sequenceScope": "Entitlement"
}
X-Correlation-Id
string

The correlation id of the call: the one you sent, or the one the server made.

The template is not valid.

Media typeapplication/problem+json

The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.

object
type

A reference to the code’s entry on the error-codes page.

string
title

A short summary of the problem.

string
status
required

The HTTP status of the answer.

integer format: int32
detail

What went wrong in this call, in a sentence.

string
instance

The path of the call.

string
code
required

The stable numeric error code. The error-codes page lists them.

integer format: int32
codeName
required

The stable name of the error code, for example resource.not_found.

string
traceId
required

The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.

string
requires

The scope or condition the caller is missing, on a refusal that names one.

null | string
scope

The limiter that shed the call, on a 429.

null | string
errors

On a validation failure, the messages for each field, keyed by the field’s name.

null | object
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"code": 1,
"codeName": "example",
"traceId": "example",
"requires": "example",
"scope": "example",
"errors": "example"
}
X-Correlation-Id
string

The correlation id of the call: the one you sent, or the one the server made.

The request carries no valid access token (auth.required).

Media typeapplication/problem+json

The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.

object
type

A reference to the code’s entry on the error-codes page.

string
title

A short summary of the problem.

string
status
required

The HTTP status of the answer.

integer format: int32
detail

What went wrong in this call, in a sentence.

string
instance

The path of the call.

string
code
required

The stable numeric error code. The error-codes page lists them.

integer format: int32
codeName
required

The stable name of the error code, for example resource.not_found.

string
traceId
required

The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.

string
requires

The scope or condition the caller is missing, on a refusal that names one.

null | string
scope

The limiter that shed the call, on a 429.

null | string
errors

On a validation failure, the messages for each field, keyed by the field’s name.

null | object
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"code": 1,
"codeName": "example",
"traceId": "example",
"requires": "example",
"scope": "example",
"errors": "example"
}
X-Correlation-Id
string

The correlation id of the call: the one you sent, or the one the server made.

WWW-Authenticate
string

How to authenticate: the bearer challenge.

The caller may not make this call. The code and requires members say why: a missing scope, or a plan that does not include it.

Media typeapplication/problem+json

The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.

object
type

A reference to the code’s entry on the error-codes page.

string
title

A short summary of the problem.

string
status
required

The HTTP status of the answer.

integer format: int32
detail

What went wrong in this call, in a sentence.

string
instance

The path of the call.

string
code
required

The stable numeric error code. The error-codes page lists them.

integer format: int32
codeName
required

The stable name of the error code, for example resource.not_found.

string
traceId
required

The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.

string
requires

The scope or condition the caller is missing, on a refusal that names one.

null | string
scope

The limiter that shed the call, on a 429.

null | string
errors

On a validation failure, the messages for each field, keyed by the field’s name.

null | object
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"code": 1,
"codeName": "example",
"traceId": "example",
"requires": "example",
"scope": "example",
"errors": "example"
}
X-Correlation-Id
string

The correlation id of the call: the one you sent, or the one the server made.

No such entitlement.

Media typeapplication/problem+json

The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.

object
type

A reference to the code’s entry on the error-codes page.

string
title

A short summary of the problem.

string
status
required

The HTTP status of the answer.

integer format: int32
detail

What went wrong in this call, in a sentence.

string
instance

The path of the call.

string
code
required

The stable numeric error code. The error-codes page lists them.

integer format: int32
codeName
required

The stable name of the error code, for example resource.not_found.

string
traceId
required

The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.

string
requires

The scope or condition the caller is missing, on a refusal that names one.

null | string
scope

The limiter that shed the call, on a 429.

null | string
errors

On a validation failure, the messages for each field, keyed by the field’s name.

null | object
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"code": 1,
"codeName": "example",
"traceId": "example",
"requires": "example",
"scope": "example",
"errors": "example"
}
X-Correlation-Id
string

The correlation id of the call: the one you sent, or the one the server made.

The body is not sent as application/json (request.unsupported).

Media typeapplication/problem+json

The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.

object
type

A reference to the code’s entry on the error-codes page.

string
title

A short summary of the problem.

string
status
required

The HTTP status of the answer.

integer format: int32
detail

What went wrong in this call, in a sentence.

string
instance

The path of the call.

string
code
required

The stable numeric error code. The error-codes page lists them.

integer format: int32
codeName
required

The stable name of the error code, for example resource.not_found.

string
traceId
required

The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.

string
requires

The scope or condition the caller is missing, on a refusal that names one.

null | string
scope

The limiter that shed the call, on a 429.

null | string
errors

On a validation failure, the messages for each field, keyed by the field’s name.

null | object
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"code": 1,
"codeName": "example",
"traceId": "example",
"requires": "example",
"scope": "example",
"errors": "example"
}
X-Correlation-Id
string

The correlation id of the call: the one you sent, or the one the server made.

Too many requests. Wait the seconds in Retry-After, then send the call again (service.too-many-requests).

Media typeapplication/problem+json

The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.

object
type

A reference to the code’s entry on the error-codes page.

string
title

A short summary of the problem.

string
status
required

The HTTP status of the answer.

integer format: int32
detail

What went wrong in this call, in a sentence.

string
instance

The path of the call.

string
code
required

The stable numeric error code. The error-codes page lists them.

integer format: int32
codeName
required

The stable name of the error code, for example resource.not_found.

string
traceId
required

The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.

string
requires

The scope or condition the caller is missing, on a refusal that names one.

null | string
scope

The limiter that shed the call, on a 429.

null | string
errors

On a validation failure, the messages for each field, keyed by the field’s name.

null | object
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"code": 1,
"codeName": "example",
"traceId": "example",
"requires": "example",
"scope": "example",
"errors": "example"
}
X-Correlation-Id
string

The correlation id of the call: the one you sent, or the one the server made.

Retry-After
integer

The seconds to wait before the call is sent again.

X-RateLimit-Limit
integer

The calls the limiter allows in its window, when it knows.

X-RateLimit-Remaining
integer

The calls left in the window, when the limiter knows.

X-RateLimit-Reset
integer

The seconds until the window resets, when the limiter knows.

X-RateLimit-Scope
string

Names the limiter that shed the call.