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

A Provider manager can pause or resume an owned offer

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

PATCH /api/v1/providers/{provider}/offers/{offer}

Pausing prevents new admissions. Already dispatched requests may complete and accrue earnings. Viewers and unrelated operators cannot mutate offers.

Operation: setProviderOfferAvailability.

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

JSON
[
{
"operatorBearer": []
}
]

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 PATCH "$NIU_ORIGIN/api/v1/providers/{provider}/offers/{offer}" \
-H "Authorization: Bearer $NIU_MEMBER_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,
"required": [
"active"
],
"properties": {
"active": {
"type": "boolean"
}
}
}

Availability saved and audited

No eligible Provider membership

Offer unavailable in Provider scope

Pausing prevents new admissions. Already dispatched requests may complete and accrue earnings. Viewers and unrelated operators cannot mutate offers.