End a Provider purchase schedule's eligibility
Generated from the checked-in source. Do not edit this reference by hand.
POST /api/v1/providers/{provider}/media-rates/{revision}/retire
Installation write permission only. Appends an immutable eligibility cutoff within the original interval; the cutoff is exclusive for original-card selection. Publish the replacement with a matching effective start before the cutoff. Exact replay is idempotent; changed cutoff or missing Provider/revision conflicts. Historical purchase snapshots, earnings and payments are unchanged. Incomplete or overlapping schedules fail closed. Retirement is not cancellation or a refund.
Operation: retireSupplierMediaRate.
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.
[ { "operatorBearer": [] }]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/providers/{provider}/media-rates/{revision}/retire" \ -H "Authorization: Bearer $NIU_MEMBER_TOKEN" \ -H 'Content-Type: application/json' \ --data @request.jsonParameters
Section titled “Parameters”provider
Section titled “provider”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", "format": "int64", "description": "Unix seconds" } }}Responses
Section titled “Responses”HTTP 200
Section titled “HTTP 200”Cutoff saved or exact replay accepted
Content type: application/json.
{ "type": "object", "required": [ "data" ], "additionalProperties": false, "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 cutoff or revision
HTTP 401
Section titled “HTTP 401”Installation authentication required
HTTP 403
Section titled “HTTP 403”Installation write permission required
HTTP 409
Section titled “HTTP 409”Missing scoped revision or conflicting saved cutoff
HTTP 413
Section titled “HTTP 413”Body exceeds 1 KiB
HTTP 422
Section titled “HTTP 422”Malformed typed JSON
HTTP 503
Section titled “HTTP 503”Durable storage unavailable
Behavior and supported scope
Section titled “Behavior and supported scope”Installation write permission only. Appends an immutable eligibility cutoff within the original interval; the cutoff is exclusive for original-card selection. Publish the replacement with a matching effective start before the cutoff. Exact replay is idempotent; changed cutoff or missing Provider/revision conflicts. Historical purchase snapshots, earnings and payments are unchanged. Incomplete or overlapping schedules fail closed. Retirement is not cancellation or a refund.