{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"DSP API Examples","description":"Explore Vistar's APIs and developer tools to automate, integrate and scale your DOOH workflows."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"dsp-api-examples","__idx":0},"children":["DSP API Examples"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"introduction","__idx":1},"children":["Introduction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this topic to explore practical API (application programming interface) requests for the DSP (Demand Side Platform). Here you’ll find examples for common actions like activating or deactivating a single campaign, and batch activating multiple campaigns."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"what-youll-learn","__idx":2},"children":["What You’ll Learn"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In this topic, you'll learn how to:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#Update"},"children":["Update an insertion order"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#Batch"},"children":["Batch update insertion orders"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#Activate"},"children":["Activate a campaign"]},","]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#Batch2"},"children":["Batch activate campaigns"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#Deactiva"},"children":["Deactivate a campaign"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#Update2"},"children":["Update a campaign"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#Batch3"},"children":["Batch update campaigns"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"id":"Update"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"update-an-insertion-order","__idx":3},"children":["Update an Insertion Order"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this endpoint to update insertion order properties such as the flight window, budget, or contract number."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"update-a-flight-window","__idx":4},"children":["Update a Flight Window"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sample-request","__idx":5},"children":["Sample Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"PATCH https://platform-api.vistarmedia.com/api/dsp/v1/insertion_orders/juIGaOygS0CBBqtmXHamqA\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sample-json-request-body","__idx":6},"children":["Sample JSON Request Body"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"start_time\": \"2026-02-01T00:00:00Z\",\n  \"end_time\": \"2026-02-27-01T23:59:59Z\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"update-impression-budget","__idx":7},"children":["Update Impression Budget"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sample-request-1","__idx":8},"children":["Sample Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"PATCH https://platform-api.vistarmedia.com/api/dsp/v1/insertion_orders/juIGaOygS0CBBqtmXHamqA\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sample-json-request-body-1","__idx":9},"children":["Sample JSON Request Body"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"budget_impressions\": 10000\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"id":"Batch"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"batch-update-insertion-orders","__idx":10},"children":["Batch Update Insertion Orders"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this endpoint to update multiple insertion orders at once."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can batch up to 100 insertion orders in a single request."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-request-2","__idx":11},"children":["Sample Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"PATCH https://platform-api.vistarmedia.com/api/dsp/v1/insertion_orders\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sample JSON Request Body"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"insertion_orders\": [\n    {\n      \"id\": \"juIGaOygS0CBBqtmXHamqA\",\n      \"start_time\": \"2026-02-01T00:00:00Z\",\n      \"end_time\": \"2026-02-27-01T23:59:59Z\"\n    },\n    {\n      \"id\": \"Ug0yu240S8GS4cozKXeogw\",\n      \"budget_impressions\": 10000\n    },\n    {\n      \"id\": \"39ZHG9FPSSyaimG167tuxQ\",\n      \"budget_money\": {\n        \"currency_code\": \"USD\",\n        \"units\": \"20000\",\n        \"nanos\": 0\n      }\n    }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"id":"Activate"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"activate-a-campaign","__idx":12},"children":["Activate a Campaign"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this endpoint to activate a campaign so it can begin serving. After activation, the campaign becomes eligible for delivery based on its configured targeting and schedule."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-request-3","__idx":13},"children":["Sample Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"PATCH https://platform-api.vistarmedia.com/api/dsp/v1/campaigns/ezdRT_lPSaS71cDBAA\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-json-request-body-2","__idx":14},"children":["Sample JSON Request Body"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"active\": true\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"id":"Batch2"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"batch-activate-campaigns","__idx":15},"children":["Batch Activate Campaigns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this endpoint to activate multiple campaigns at once. After activation, each campaign becomes eligible to deliver impressions based on its configured settings."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can batch up to 100 Campaigns in a single request."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-request-4","__idx":16},"children":["Sample Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"PATCH https://platform-api.vistarmedia.com/api/dsp/v1/campaigns\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-json-request-body-3","__idx":17},"children":["Sample JSON Request Body"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"campaigns\": [\n    {\n      \"id\": \"H3hDnL2IQrGeW48Q_c21cA\",\n      \"active\": true\n    },\n    {\n      \"id\": \"i4p0R2tTSqO7t0hnB7MCmQ\",\n      \"active\": true\n    },\n    {\n      \"id\": \"tDu6KwF3TkOqC1cPM5jVBg\",\n      \"active\": true\n    }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"id":"Deactiva"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"deactivate-a-campaign","__idx":18},"children":["Deactivate a Campaign"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this endpoint to disable a campaign so it can no longer serve. Deactivated campaigns retain their configuration but won't deliver impressions until reactivated."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-request-5","__idx":19},"children":["Sample request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"PATCH https://platform-api.vistarmedia.com/api/dsp/v1/campaigns/ezdRT_lPSaS71cDBAA\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-json-request-body-4","__idx":20},"children":["Sample JSON Request Body"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"active\": false\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"id":"Update2"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"update-a-campaign","__idx":21},"children":["Update a Campaign"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this endpoint to update campaign properties such as the flight window, budget, CPM (cost per mile), and pacing."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"update-a-flight-window-1","__idx":22},"children":["Update a Flight Window"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sample-request-6","__idx":23},"children":["Sample request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"PATCH https://platform-api.vistarmedia.com/api/dsp/v1/campaigns/Jl7cBB3mQv-H3lvSZNtZgg\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sample-json-request-body-5","__idx":24},"children":["Sample JSON Request Body"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"start_time\": \"2026-02-01T00:00:00Z\",\n  \"end_time\": \"2026-02-27-01T23:59:59Z\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"update-impression-budget-1","__idx":25},"children":["Update Impression Budget"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sample-request-7","__idx":26},"children":["Sample Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"PATCH https://platform-api.vistarmedia.com/api/dsp/v1/campaigns/Jl7cBB3mQv-H3lvSZNtZgg\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sample-json-request-body-6","__idx":27},"children":["Sample JSON Request Body"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"budget_impressions\": 100000\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"update-cpm","__idx":28},"children":["Update CPM"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following shows how to update the CPM to $4.50 USD."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sample-request-8","__idx":29},"children":["Sample Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"PATCH https://platform-api.vistarmedia.com/api/dsp/v1/campaigns/Jl7cBB3mQv-H3lvSZNtZgg\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sample-json-request-body-7","__idx":30},"children":["Sample JSON Request Body"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"cpm\": {\n    \"currency_code\": \"USD\",\n    \"units\": \"4\",\n    \"nanos\": 500000000\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"id":"Batch3"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"batch-update-campaigns","__idx":31},"children":["Batch Update Campaigns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this endpoint to update multiple campaigns at once."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can batch up to 100 campaigns in a single request."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-request-9","__idx":32},"children":["Sample Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"PATCH https://platform-api.vistarmedia.com/api/dsp/v1/campaigns\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-json-request-body-8","__idx":33},"children":["Sample JSON Request Body"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"campaigns\": [\n    {\n      \"id\": \"Jl7cBB3mQv-H3lvSZNtZgg\",\n      \"start_time\": \"2026-02-01T00:00:00Z\",\n      \"end_time\": \"2026-02-27-01T23:59:59Z\"\n    },\n    {\n      \"id\": \"KrkeGfXQS-6xI5JVd5xgkw\",\n      \"cpm\": {\n        \"currency_code\": \"USD\",\n        \"units\": \"4\",\n        \"nanos\": 500000000\n      }\n    },\n    {\n      \"id\": \"nxrhjahwR4WldijV17K8bQ\",\n      \"cpm\": {\n        \"currency_code\": \"USD\",\n        \"units\": \"10\",\n        \"nanos\": 0\n      }\n    }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"more-resources","__idx":34},"children":["More Resources"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To learn more about this topic, see:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/setup-and-authentication"},"children":["Setup and Authentication"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/dsp/get-started"},"children":["Get Started with the DSP API"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/dsp"},"children":["DSP API Specification"]}]}]}]},"headings":[{"value":"DSP API Examples","id":"dsp-api-examples","depth":1},{"value":"Introduction","id":"introduction","depth":2},{"value":"What You’ll Learn","id":"what-youll-learn","depth":2},{"value":"Update an Insertion Order","id":"update-an-insertion-order","depth":2},{"value":"Update a Flight Window","id":"update-a-flight-window","depth":3},{"value":"Sample Request","id":"sample-request","depth":4},{"value":"Sample JSON Request Body","id":"sample-json-request-body","depth":4},{"value":"Update Impression Budget","id":"update-impression-budget","depth":3},{"value":"Sample Request","id":"sample-request-1","depth":4},{"value":"Sample JSON Request Body","id":"sample-json-request-body-1","depth":4},{"value":"Batch Update Insertion Orders","id":"batch-update-insertion-orders","depth":2},{"value":"Sample Request","id":"sample-request-2","depth":3},{"value":"Activate a Campaign","id":"activate-a-campaign","depth":2},{"value":"Sample Request","id":"sample-request-3","depth":3},{"value":"Sample JSON Request Body","id":"sample-json-request-body-2","depth":3},{"value":"Batch Activate Campaigns","id":"batch-activate-campaigns","depth":2},{"value":"Sample Request","id":"sample-request-4","depth":3},{"value":"Sample JSON Request Body","id":"sample-json-request-body-3","depth":3},{"value":"Deactivate a Campaign","id":"deactivate-a-campaign","depth":2},{"value":"Sample request","id":"sample-request-5","depth":3},{"value":"Sample JSON Request Body","id":"sample-json-request-body-4","depth":3},{"value":"Update a Campaign","id":"update-a-campaign","depth":2},{"value":"Update a Flight Window","id":"update-a-flight-window-1","depth":3},{"value":"Sample request","id":"sample-request-6","depth":4},{"value":"Sample JSON Request Body","id":"sample-json-request-body-5","depth":4},{"value":"Update Impression Budget","id":"update-impression-budget-1","depth":3},{"value":"Sample Request","id":"sample-request-7","depth":4},{"value":"Sample JSON Request Body","id":"sample-json-request-body-6","depth":4},{"value":"Update CPM","id":"update-cpm","depth":3},{"value":"Sample Request","id":"sample-request-8","depth":4},{"value":"Sample JSON Request Body","id":"sample-json-request-body-7","depth":4},{"value":"Batch Update Campaigns","id":"batch-update-campaigns","depth":2},{"value":"Sample Request","id":"sample-request-9","depth":3},{"value":"Sample JSON Request Body","id":"sample-json-request-body-8","depth":3},{"value":"More Resources","id":"more-resources","depth":2}],"frontmatter":{"title":"DSP API Examples","slug":"/apis/dsp/examples","seo":{"title":"DSP API Examples"}},"lastModified":"2026-09-24T21:03:31.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/apis/dsp/examples","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}