This request creates a campaign on an MVNO or SIP rateplan - a master product or a reseller product. Customer products never hold campaigns; create the campaign on the reseller product the customer product inherits from. See Product campaigns for how campaigns work.
wholesale may only be sent by RESELLER_ADMIN or ADMIN. Without it, the campaign uses the product's own wholesale.| URL | https://api.telecomx.dk/product/PRODUCT_ID/campaign | ||
|---|---|---|---|
| Method | POST | ||
| Param | PRODUCT_ID | Id of the rateplan product | |
| Access level | RESELLER with write access to the reseller, for a reseller product. RESELLER_ADMIN with FINANCE feature or ADMIN for a master product. |
||
| Body | |||
| name | String | Name of the campaign, 1-64 characters. Shown on the reseller's invoice lines. | |
| startDate | Date | First day of the enrolment window, as Copenhagen midnight in ISO format. | |
| endDate | Date | Last day of the enrolment window, as Copenhagen midnight in ISO format. | |
| months | Number | Whole months the discount lasts, 1-12. | |
| wholesale | Number | [optional] What the reseller pays per month during the campaign, 0-999999. RESELLER_ADMIN and ADMIN only. Default: the product's wholesale. | |
| price | Number | What the customer pays per month during the campaign, 0-999999. | |
| message | String | [optional] Free text for the UI, up to 1024 characters. Never shown on an invoice. | |
| resellers | Array of Id | [optional] The resellers a master campaign applies to. Required with at least one reseller on a master product, not allowed on a reseller product. | |
POST https://api.telecomx.dk/product/60bf169291eb7e58090617a3/campaign { "name": "EfterÄrstilbud", "startDate": "2026-09-30T22:00:00.000Z", "endDate": "2026-10-30T23:00:00.000Z", "months": 3, "wholesale": 8, "price": 30, "resellers": ["58fdbb7d1e3389290630f1b2"] }
The created campaign.
| JSON object | ||
|---|---|---|
| _id | Id | Id of the campaign. |
| name | String | Name of the campaign. |
| createdAt | Date | When the campaign was created. |
| startDate | Date | First day of the enrolment window. |
| endDate | Date | Last day of the enrolment window. |
| months | Number | Whole months the discount lasts. |
| wholesale | Number | What the reseller pays per month during the campaign. |
| price | Number | What the customer pays per month during the campaign. |
| message | String | Free text for the UI, null if not used. |
| resellers | Array of Id | Resellers a master campaign applies to, null on a reseller campaign. |
| stoppedAt | Date | Always null on a new campaign. |
Several validation errors at once are returned together as 422 multiple, with each error listed inside.
| 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 |
| 403 | wholesale | Only a reseller admin may set the campaign's reseller price |
| 404 | not_found | Product not found |
| 404 | resellers | The following resellers were not found: <ids> |
| 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 | resellers | Resellers can only be selected on a master campaign |
| 409 | overlap | The enrolment window overlaps another campaign on this product - two campaigns open at the same time on one product cannot both apply |
| 409 | concurrentChange | The campaign was changed by someone else while this request was being handled - reload and try again |
| 422 | startDate | The start date cannot be in the past |
| 422 | endDate | The end date cannot be before the start date |
| 422 | resellers | A master campaign must name at least one reseller - with none selected it would apply to nobody |
| 500 | internal_error | <Unspecified> |