Skip to content
Niu DocsNiu 牛元文档
Dashboard控制台

Append a promotion eligibility cutoff

Generated from the checked-in source. Do not edit this reference by hand.

POST /api/v1/pricing/standard-prices/{price}/promotions/{promotion}/retire

Explicit platform administration required; ordinary customer/Provider membership does not grant access. Append-only explicit retirement, at most one cutoff for this promotion. Cutoff cannot extend its published end; a cutoff before its start cancels a future rule. Exact epoch-second strings and configuration version are required. Published schedules and already pinned operations/jobs stay immutable. This does not trigger a customer refund or change routing.

Operation: retireRetailPromotion.

Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.

JSON
[
{
"bearerAuth": []
}
]

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.

Shell
curl --fail-with-body -X POST "$NIU_ORIGIN/api/v1/pricing/standard-prices/{price}/promotions/{promotion}/retire" \
-H "Authorization: Bearer $NIU_BEARER_TOKEN" \
-H 'Content-Type: application/json' \
--data @request.json

Location: path. Required.

JSON
{
"type": "string",
"format": "uuid"
}

Location: path. Required.

JSON
{
"type": "string",
"format": "uuid"
}

Required.

JSON
{
"type": "object",
"additionalProperties": false,
"properties": {
"effective_until": {
"type": "string",
"pattern": "^[0-9]+$"
},
"expected_version": {
"type": "string",
"pattern": "^[0-9]+$"
},
"idempotency_key": {
"type": "string",
"format": "uuid"
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"effective_until",
"expected_version",
"idempotency_key",
"reason"
]
}

Current configuration or exact prior committed publication

Content type: application/json.

JSON
{
"type": "object",
"additionalProperties": false,
"properties": {
"data": {
"type": "object",
"additionalProperties": false,
"properties": {
"price_id": {
"type": "string",
"format": "uuid"
},
"revision": {
"type": "string",
"format": "uuid"
},
"version": {
"type": "string",
"pattern": "^[0-9]+$"
}
},
"required": [
"price_id",
"revision",
"version"
]
}
},
"required": [
"data"
]
}

Invalid exact amount, schedule, period or pagination

Authentication required

Explicit platform administration required

Stale version, conflicting key/period, unknown identity/customer or unsupported publication

Malformed JSON or unsupported schedule shape

Explicit platform administration required; ordinary customer/Provider membership does not grant access. Append-only explicit retirement, at most one cutoff for this promotion. Cutoff cannot extend its published end; a cutoff before its start cancels a future rule. Exact epoch-second strings and configuration version are required. Published schedules and already pinned operations/jobs stay immutable. This does not trigger a customer refund or change routing.

Supported scope: implemented