Enroll a workspace model in a platform selling price
Generated from the checked-in source. Do not edit this reference by hand.
POST /api/v1/organizations/{organization}/projects/{project}/billing/retail-price-enrollment
Explicit platform administration required. price_id chooses a published text identity with the same model and an existing company/currency balance account; no account, credit, funds, Provider qualification or selling permission is created. Explicit null restores legacy workspace tariff selection for future operations. expected_version zero creates the configuration; updates use immutable version history and an exact company/workspace-scoped idempotency key. Existing operation prices, charges and legacy current tariff pointers are unchanged. Missing price_id is rejected rather than silently disabling enrollment. No automatic retry.
Operation: setRetailTextEnrollment.
Authentication
Section titled “Authentication”Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.
[ { "bearerAuth": [] }]HTTP request
Section titled “HTTP request”Set NIU_ORIGIN to your installation origin (without /v1). Replace path, query and header placeholders with the required values. Query examples use curl 7.87 or newer to encode values with --url-query. Use the credential scope described above; a bearer token must have the authority required by this operation.
curl --fail-with-body -X POST "$NIU_ORIGIN/api/v1/organizations/{organization}/projects/{project}/billing/retail-price-enrollment" \ -H "Authorization: Bearer $NIU_BEARER_TOKEN" \ -H 'Content-Type: application/json' \ --data @request.jsonParameters
Section titled “Parameters”organization
Section titled “organization”Location: path. Required.
{ "type": "string", "format": "uuid"}project
Section titled “project”Location: path. Required.
{ "type": "string", "format": "uuid"}Request body
Section titled “Request body”application/json
Section titled “application/json”Required.
{ "type": "object", "required": [ "model_alias", "price_id", "expected_version", "idempotency_key", "reason" ], "properties": { "model_alias": { "type": "string", "minLength": 1, "maxLength": 200 }, "price_id": { "type": [ "string", "null" ], "format": "uuid" }, "expected_version": { "type": "string", "pattern": "^[0-9]+$" }, "idempotency_key": { "type": "string", "format": "uuid" }, "reason": { "type": "string", "minLength": 1, "maxLength": 500 } }, "additionalProperties": false}Responses
Section titled “Responses”HTTP 200
Section titled “HTTP 200”Current configuration or exact committed outcome
Content type: application/json.
{ "type": "object", "required": [ "data" ], "properties": { "data": { "type": "object", "required": [ "revision", "version", "model_alias", "price_id" ], "properties": { "revision": { "type": "string", "format": "uuid" }, "version": { "type": "string", "pattern": "^[0-9]+$" }, "model_alias": { "type": "string", "minLength": 1, "maxLength": 200 }, "price_id": { "type": [ "string", "null" ], "format": "uuid" } }, "additionalProperties": false } }, "additionalProperties": false}HTTP 400
Section titled “HTTP 400”Invalid model, reason or exact version
HTTP 401
Section titled “HTTP 401”Authentication required
HTTP 403
Section titled “HTTP 403”Explicit platform administration required
HTTP 409
Section titled “HTTP 409”Stale version, conflicting key, unknown workspace, missing balance account or incompatible price identity
HTTP 422
Section titled “HTTP 422”Malformed body or missing explicit price_id
Behavior and supported scope
Section titled “Behavior and supported scope”Explicit platform administration required. price_id chooses a published text identity with the same model and an existing company/currency balance account; no account, credit, funds, Provider qualification or selling permission is created. Explicit null restores legacy workspace tariff selection for future operations. expected_version zero creates the configuration; updates use immutable version history and an exact company/workspace-scoped idempotency key. Existing operation prices, charges and legacy current tariff pointers are unchanged. Missing price_id is rejected rather than silently disabling enrollment. No automatic retry.
Supported scope: implemented