api:product:campaign:stop
Table of Contents
API : Product campaign Stop
Introduction
This request stops a campaign early. It closes the enrolment window and changes nothing else: accounts already enrolled keep their discount until their own discount period ends.
The stop day still counts in full. An account created later on the day the campaign was stopped is still enrolled, the same as on the last day of the window. From the next day, no new accounts are enrolled.
Stopping a master campaign also stops every reseller's copy of it. A stopped campaign cannot be changed or started again.
Request
| URL | https://api.telecomx.dk/product/PRODUCT_ID/campaign/CAMPAIGN_ID/stop | ||
|---|---|---|---|
| Method | POST | ||
| Param | PRODUCT_ID | Id of the rateplan product holding the campaign | |
| Param | CAMPAIGN_ID | Id of the campaign | |
| Access level | RESELLER with write access to the reseller, for a reseller product. RESELLER_ADMIN with FINANCE feature or ADMIN for a master product. |
||
Query example
POST https://api.telecomx.dk/product/60bf169291eb7e58090617a3/campaign/6aba6a8be5b8b45688b9faed/stop
Response
The campaign with stoppedAt set - the same fields as Create returns.
Errors
| Error code | Message | Description |
|---|---|---|
| 422 | <property> | Invalid input for the named property - the request body, query or URL parameter failed validation |
| 403 | access_denied | Insufficient access level |
| 404 | not_found | Product not found |
| 404 | campaignId | Campaign not found on this product |
| 409 | type | Campaigns can only be created on MVNO and SIP rateplan products |
| 409 | inheritFromReseller | Campaigns cannot be created on a customer product - create it on the reseller product it inherits from |
| 409 | stoppedAt | The campaign is already stopped |
| 409 | concurrentChange | The campaign was changed by someone else while this request was being handled - reload and try again |
| 500 | internal_error | <Unspecified> |
api/product/campaign/stop.txt · Last modified: by Thomas Andersen