Import activation code batch
const url = 'https://example.com/api/v1/provision/admin/entitlements/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/activation-codes/batch/import?dryRun=false';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"codes":["example"],"workflowDefaults":{"requiredAuthenticationLevel":"Default","fingerprint":"example","maxDeviceActivations":1,"useEntitlementMaxActivations":true,"activationCode":"example","email":"example","sendUserNotification":true,"organizationGroupId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","requiredUserId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","expiresAt":"2026-04-15T12:00:00Z"},"batchLabel":"example","enforceKeyPolicy":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://example.com/api/v1/provision/admin/entitlements/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/activation-codes/batch/import?dryRun=false' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "codes": [ "example" ], "workflowDefaults": { "requiredAuthenticationLevel": "Default", "fingerprint": "example", "maxDeviceActivations": 1, "useEntitlementMaxActivations": true, "activationCode": "example", "email": "example", "sendUserNotification": true, "organizationGroupId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "requiredUserId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "expiresAt": "2026-04-15T12:00:00Z" }, "batchLabel": "example", "enforceKeyPolicy": true }'Imported codes are matched exactly at redemption: the look-alike-character tolerance offered for platform-generated codes is never applied to a code the vendor supplied, because folding an alphabet the platform does not control could merge two codes the vendor considers distinct.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Target entitlement.
Query Parameters
Section titled “Query Parameters”Report the outcome without persisting anything.
Header Parameters
Section titled “Header Parameters”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.
A key of your own that makes a retry safe: a call repeated with the same key and the same body answers the first call’s result instead of running again. Send one key per call, and reuse it only to retry that call.
Request Bodyrequired
Section titled “Request Bodyrequired”The codes to register and the limits copied onto each one.
Admin request to pre-register externally generated activation codes on an entitlement.
Send with dryRun = true first to preview the outcome without persisting anything.
object
The vendor-supplied codes to register.
Limits and restrictions copied onto every workflow created by the import.
object
Authentication level a user must meet before a license activation is permitted. Used on activation policies and activation workflows.
Whether the “Activation code ready” mail is sent to Email when the workflow is
created. False sends nothing. When null the route’s default applies: the single-workflow
route sends the mail (true), the batch import and generate routes do not (false).
Vendor’s own label for the batch.
Reject codes that do not match the entitlement’s key-issuance policy. Off by default so a vendor can carry over codes minted before the policy existed.
Responses
Section titled “Responses”Per-item outcome and tallies.
Outcome of an import call. With dryRun = true the same counts and errors are reported but
no rows are persisted.
object
Identifier the created workflows are tagged with. Guid Guid.Empty on a dry run.
Label echoed from the request.
True when nothing was persisted.
Codes submitted.
Codes registered (or that would be registered on a dry run).
Codes not registered because they failed validation; see Errors.
Codes rejected because the normalized form already exists or repeats within the request.
One entry per rejected code.
Why one item of a batch was rejected.
object
Zero-based position of the item in the submitted list.
The offending code, when reporting it is meaningful.
Human-readable explanation, e.g. a duplicate or a policy mismatch.
Examplegenerated
{ "batchId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "batchLabel": "example", "dryRun": true, "totalSubmitted": 1, "created": 1, "skipped": 1, "duplicates": 1, "errors": [ { "index": 1, "code": "example", "reason": "example" } ]}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
The request could not be applied.
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
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”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).
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
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
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.
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
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
No such entitlement.
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
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
A call with the same Idempotency-Key is still running. Send the call again once it has finished.
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
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”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).
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
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
The Idempotency-Key was used before with a different request body (operation.idempotency-key-reused).
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
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”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).
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
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
The seconds to wait before the call is sent again.
The calls the limiter allows in its window, when it knows.
The calls left in the window, when the limiter knows.
The seconds until the window resets, when the limiter knows.
Names the limiter that shed the call.