PUT /ad/{id}/status/{status}¶
PUT /ad/{id}/status/{status} v5: | PUT /ad/{id}/status/{status} without version
Warning
PUT /ad/{id}/status/{status} without version is now officially deprecated and scheduled for removal on May, 1st 2023. Please move to use PUT /ad/{id}/status/{status} v5:.
PUT /ad/{id}/status/{status} v5:¶
Scope |
|
Accept |
|
PUT /ad/{id}/status/{status} v5: introduces an accept header. See Ad Status for details on statuses.
Example¶
PUT /ad/42/status/PAUSED
Accept: application/sellside.ad-v5+json, application/json
200 OK
PUT /ad/{id}/status/{status} without version¶
Scope |
|
Accept |
|
This URL updates the status of the ad with the given id
. If the ad does
not exist or does not belong to the user the server returns 404 Not Found.
If the id
is invalid, i.e. not a positive integer the server returns 400
Bad Request.
To set the new status append it to the base url. The status can be one of the user controlled status values as defined in Ad Status.
Changing the status to ACTIVE also changes the number of active
ads in this category for this user. If the current number of active ads
for this user in this category exceeds maxNumberOfActiveAds
as defined
in the category then an error is returned. Setting a different status
than ACTIVE is always allowed.
If an ad has is in status PAUSED and also has no daily budget or total budget remaining, this call will succeed. The resulting status of the ad will be either BUDGET_REACHED or DAILY_BUDGET_REACHED, depending on which budget has run out. In this case the ad will go live as soon as budget is added.
Parameters¶
Name |
Type |
Default |
Description |
---|---|---|---|
_validate |
boolean |
false |
Validate the request without executing it. |
Errors¶
Field |
Code |
Error message |
Description |
---|---|---|---|
id |
2001 |
invalid argument |
not a valid number |
status |
2001 |
invalid argument |
must be either ACTIVE, PAUSED or DELETED |
status |
2017 |
ad status change not allowed |
changing the status of the ad to the provided status is not allowed |
Example¶
PUT /ad/42/status/PAUSED