End a published customer media rate's eligibility
Generated from the checked-in source. Do not edit this reference by hand.
POST /api/v1/organizations/{organization}/billing/media-rates/{revision}/retire
Platform-administrator write permission required. Installation credentials and explicitly granted member administrators are supported. Appends an immutable cutoff without modifying the original card or historical job snapshots. Cutoff is inclusive for retirement and must be within the original effective interval, including its start/end boundaries. Exact replay is idempotent; changed cutoff or unknown customer/revision conflicts. Publish the replacement with an effective start matching the cutoff. No rate or procurement fallback occurs if no eligible replacement exists; remaining overlaps are rejected as ambiguous.
Operation: retireCustomerMediaRate.
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}/billing/media-rates/{revision}/retire" \ -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"}revision
Section titled “revision”Location: path. Required.
{ "type": "string", "minLength": 1, "maxLength": 256}Request body
Section titled “Request body”application/json
Section titled “application/json”Required.
{ "type": "object", "additionalProperties": false, "required": [ "effective_until" ], "properties": { "effective_until": { "type": "integer", "description": "Unix seconds" } }}Responses
Section titled “Responses”HTTP 200
Section titled “HTTP 200”Retirement saved or identical replay accepted
Content type: application/json.
{ "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "type": "object", "additionalProperties": false, "required": [ "revision", "effective_until" ], "properties": { "revision": { "type": "string" }, "effective_until": { "type": "string", "pattern": "^-?[0-9]+$" } } } }}HTTP 400
Section titled “HTTP 400”Invalid revision or cutoff outside original interval
HTTP 401
Section titled “HTTP 401”Administrator authentication required
HTTP 403
Section titled “HTTP 403”Platform-administrator write permission required
HTTP 409
Section titled “HTTP 409”Missing scoped revision or conflicting previous cutoff
HTTP 413
Section titled “HTTP 413”Body exceeds 1 KiB
HTTP 422
Section titled “HTTP 422”Malformed typed JSON body
HTTP 503
Section titled “HTTP 503”Durable storage unavailable
Behavior and supported scope
Section titled “Behavior and supported scope”Platform-administrator write permission required. Installation credentials and explicitly granted member administrators are supported. Appends an immutable cutoff without modifying the original card or historical job snapshots. Cutoff is inclusive for retirement and must be within the original effective interval, including its start/end boundaries. Exact replay is idempotent; changed cutoff or unknown customer/revision conflicts. Publish the replacement with an effective start matching the cutoff. No rate or procurement fallback occurs if no eligible replacement exists; remaining overlaps are rejected as ambiguous.
Supported scope: implemented