Edit/Rebook a Campaign
This use case describes the requirements for editing or rebooking a campaign on your domain using Broadsign Control API via REST.
Note: The ID#s we use in these samples are for illustration purposes. They are invalid. Be sure to use your own ID#s for your integrations. Also, in our examples, we use the api-sandbox endpoint and HTTP token.
To edit or rebook a campaign, use the following methods:
- Update/edit an existing campaign/reservation using PUT and the /reservation/v20 method.
- Rebook an existing campaign/reservation using POST and the /reservation/v20/rebook method.
- Confirm the rebooked campaign/reservation using POST and the /reservation/v20/rebook_confirm method.
To update an existing campaign/reservation on your domain, you will need its unique ID# and name.
curl -X PUT \
https://api-sandbox.broadsign.com:10889/rest/reservation/v21 \
-H 'authorization: Bearer YourAPIKeyHere' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d '{
"domain_id": 123456789,
"id": 12345,
"name": "cURL Clone Renamed via RestAPI (TM)",
"state": 1,
"container_id": 1776
}'
To rebook an existing campaign/reservation, you will need its unique ID#. Note that your rebooked campaign will have a new ID#.
There are two steps to rebooking a campaign/reservation: rebooking and confirmation.
curl -X POST \
https://api-sandbox.broadsign.com:10889/rest/reservation/v21/rebook \
-H 'authorization: Bearer YourAPIKeyHere' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d '{
"domain_id": 123456789,
"duration_msec": 45000,
"end_date": "2018-12-12",
"end_time": "22:00:59",
"start_date": "2017-10-28",
"start_time": "00:00:00",
"id": 12345
}'
Use the response from your rebooking request in the slot_transaction_id request parameter.