{"components":{"callbacks":{},"examples":{},"headers":{},"links":{},"parameters":{},"requestBodies":{},"responses":{},"schemas":{"ActionId":{"maxLength":64,"type":"string"},"Execution":{"properties":{"actionId":{"$ref":"#/components/schemas/ActionId"},"actionType":{"type":"string"},"id":{"$ref":"#/components/schemas/ExecutionId"},"state":{"description":"Current state of this execution:\n * `PREVIEW` - Execution has not been started and may be reviewed before doing so\n * `IN_PROGRESS` - Execution is currently running\n * `COMPLETED` - Execution has finished, with all requested steps successfully completed\n * `FAILED` - Execution has finished, with one or more requested steps failing\n * `EXPECTED_FAILURE` - Execution has finished, with one or more requested steps satisfied certain conditions and\n    expected to fail\n","enum":["COMPLETED","EXPECTED_FAILURE","FAILED","IN_PROGRESS","PREVIEW"],"type":"string"},"steps":{"description":"The sequence of steps that will be performed by this execution. Steps are provided in a logical order, though they may be\nexecuted in parallel by the underlying system. If the execution is in progress or finished then each step can be inspected to\nfind its state.\n","items":{"$ref":"#/components/schemas/Step"},"maxItems":100,"type":"array","uniqueItems":true}},"required":["actionId","actionType","id","state","steps"],"type":"object"},"ExecutionId":{"maxLength":64,"type":"string"},"QuickActionsError":{"description":"Provides error details for non-2xx response","properties":{"errorMessage":{"description":"Detailed information about the error that occurred.","type":"string"},"requestId":{"description":"A unique value generated by the server to identify the request.","type":"string"}},"required":["errorMessage","requestId"],"type":"object"},"Step":{"properties":{"displayText":{"type":"string"},"errorMessage":{"type":"string"},"id":{"$ref":"#/components/schemas/StepId"},"optional":{"description":"Set to `true` if this step is optional and can be deselected when starting execution.","type":"boolean"},"state":{"description":"Current state of this step:\n * `PENDING` - Step has not been started but is ready for execution\n * `IN_PROGRESS` - Step is currently running\n * `COMPLETED` - Step has finished successfully\n * `FAILED` - Step has finished unsuccessfully; the `errorMessage` property will be set with an explanation\n * `OMITTED` - An optional step has been omitted as it was not selected when the execution was started\n * `ABANDONED` - Step has not been started and never will be as the execution has failed\n","enum":["ABANDONED","COMPLETED","FAILED","IN_PROGRESS","OMITTED","PENDING"],"type":"string"},"type":{"type":"string"}},"required":["displayText","id","state","type"],"type":"object"},"StepId":{"minimum":0,"type":"integer"},"batchCreateExecutionsError":{"description":"Error response for batchCreateExecutions which includes actionIds that failed execution creation, along with its index in the original request.","properties":{"actionId":{"$ref":"#/components/schemas/ActionId"},"description":{"type":"string"},"errorType":{"$ref":"#/components/schemas/executionErrorType"},"index":{"type":"integer"}},"type":"object"},"batchCreateExecutionsRequest":{"description":"Request body for batchCreateExecutions call.","items":{"$ref":"#/components/schemas/ActionId"},"maxItems":100,"minItems":0,"type":"array"},"batchCreateExecutionsResponse":{"description":"Returns multiple executions based on batchCreateExecutionsRequest.","properties":{"error":{"items":{"$ref":"#/components/schemas/batchCreateExecutionsError"},"maxItems":100,"minItems":0,"type":"array"},"success":{"items":{"$ref":"#/components/schemas/batchCreateExecutionsSuccess"},"maxItems":100,"minItems":0,"type":"array"}},"type":"object"},"batchCreateExecutionsSuccess":{"description":"Success response for batchCreateExecutions which includes the Execution object along with their index in the original request.","properties":{"actionId":{"$ref":"#/components/schemas/ActionId"},"execution":{"$ref":"#/components/schemas/Execution"},"index":{"type":"integer"}},"type":"object"},"batchGetExecutionsError":{"description":"Error response for get executions which includes the actionId and executionId sent, along with its index in the original request.","properties":{"actionId":{"$ref":"#/components/schemas/ActionId"},"description":{"type":"string"},"errorType":{"$ref":"#/components/schemas/executionErrorType"},"executionId":{"$ref":"#/components/schemas/ExecutionId"},"index":{"type":"integer"}},"type":"object"},"batchGetExecutionsRequest":{"description":"Request body for batchGetExecutions call.","items":{"$ref":"#/components/schemas/executionsRequest"},"maxItems":100,"minItems":0,"type":"array"},"batchGetExecutionsResponse":{"description":"Response body for batchGetExecutionsResponse call.","properties":{"error":{"description":"Error response containing error code and description based on executionsRequest body,  referenced by array index.","items":{"$ref":"#/components/schemas/batchGetExecutionsError"},"maxItems":100,"minItems":0,"type":"array"},"success":{"description":"Success response containing Execution based on executionsRequest body, referenced by array index.","items":{"$ref":"#/components/schemas/batchGetExecutionsSuccess"},"maxItems":100,"minItems":0,"type":"array"}},"type":"object"},"batchGetExecutionsSuccess":{"description":"Success response for get executions which includes the Execution object along with their index in the original request.","properties":{"actionId":{"$ref":"#/components/schemas/ActionId"},"execution":{"$ref":"#/components/schemas/Execution"},"index":{"type":"integer"}},"type":"object"},"executionErrorType":{"description":"Error type for failed execution","enum":["INCOMPATIBLE_STATE","INTERNAL_ERROR","STALE_STATE"],"type":"string"},"executionsRequest":{"description":"Object sent inside batchGetExecutionsRequest to get Executions.","properties":{"actionId":{"$ref":"#/components/schemas/ActionId"},"executionId":{"$ref":"#/components/schemas/ExecutionId"}},"required":["actionId","executionId"],"type":"object"}},"securitySchemes":{}},"info":{"description":"Improve performance and delivery of Display Advertising campaigns by actioning recommendations","title":"DSP Quick Actions","version":"3.0"},"openapi":"3.0.1","paths":{"/dsp/v1/quickactions/batchCreateExecutions":{"post":{"description":"Creates multiple executions based on actionIds sent.\n\n**Authorized resource type**:\nDSP Rodeo Entity ID, DSP Advertiser Account ID\n\n**Parameter name**:\nAmazon-Ads-AccountId\n\n**Parameter in**:\nheader\n\n**Requires one of these permissions**:\n[\"campaign_edit\"]","operationId":"batchCreateExecutionsV1","parameters":[{"description":"The identifier of the application making an API request on behalf of the customer.","explode":false,"in":"header","name":"Amazon-Advertising-API-ClientId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The DSP entity identifier that the user requested access to.","explode":false,"in":"header","name":"Amazon-Advertising-API-AdvertiserId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The marketplace identifier that the user requested access to.","explode":false,"in":"header","name":"Amazon-Advertising-API-MarketplaceId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","explode":false,"in":"header","name":"Amazon-Ads-AccountId","required":false,"schema":{"type":"string"},"style":"simple"}],"requestBody":{"content":{"application/vnd.dspbatchcreateexecutionsrequest.v1.0+json":{"schema":{"$ref":"#/components/schemas/batchCreateExecutionsRequest"}}},"description":"Request body for batchCreateExecutions call which includes sending an array of actionIds, described more detailed inside batchCreateExecutionsRequest."},"responses":{"207":{"content":{"application/vnd.dspbatchcreateexecutionsresponse.v1+json":{"schema":{"$ref":"#/components/schemas/batchCreateExecutionsResponse"}}},"description":"List of Executions created based on batchCreateExecutionsRequest body."},"400":{"content":{"application/vnd.dspquickactionserror.v1+json":{"schema":{"$ref":"#/components/schemas/QuickActionsError"}}},"description":"Bad request if batch limit violated"}},"summary":"Creates multiple executions based on batchCreateExecutionsRequest body.","tags":["DSP Quick Actions"]}},"/dsp/v1/quickactions/batchGetExecutions":{"post":{"description":"Gets multiple executions based on sets of actionId and executionId.\n\n**Authorized resource type**:\nDSP Rodeo Entity ID, DSP Advertiser Account ID\n\n**Parameter name**:\nAmazon-Ads-AccountId\n\n**Parameter in**:\nheader\n\n**Requires one of these permissions**:\n[\"campaign_edit\"]","operationId":"batchGetExecutionsV1","parameters":[{"description":"The identifier of the application making an API request on behalf of the customer.","explode":false,"in":"header","name":"Amazon-Advertising-API-ClientId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The DSP entity identifier that the user requested access to.","explode":false,"in":"header","name":"Amazon-Advertising-API-AdvertiserId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The marketplace identifier that the user requested access to.","explode":false,"in":"header","name":"Amazon-Advertising-API-MarketplaceId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","explode":false,"in":"header","name":"Amazon-Ads-AccountId","required":false,"schema":{"type":"string"},"style":"simple"}],"requestBody":{"content":{"application/vnd.dspbatchgetexecutionsrequest.v1.0+json":{"schema":{"$ref":"#/components/schemas/batchGetExecutionsRequest"}}},"description":"Request body for batchGetExecutions call which includes set of actionId and executionId, described more detailed inside batchGetExecutionsRequest."},"responses":{"207":{"content":{"application/vnd.dspbatchgetexecutionsresponse.v1+json":{"schema":{"$ref":"#/components/schemas/batchGetExecutionsResponse"}}},"description":"List of Executions retrieved based on batchGetExecutionsRequest sent."},"400":{"content":{"application/vnd.dspquickactionserror.v1+json":{"schema":{"$ref":"#/components/schemas/QuickActionsError"}}},"description":"Bad request if batch limit violated"}},"summary":"Gets multiple executions based on batchGetExecutionsRequest body.","tags":["DSP Quick Actions"]}},"/dsp/v1/quickactions/{actionId}/executions":{"post":{"description":"Creates an execution for an action, which may be created in a `PREVIEW` (unstarted) state at the discretion of the caller.\nIf the caller sets `preview` to `false` (the default) then the execution will immediately be started with all optional steps included. The caller may call `getExecution` to check the progress of the execution.\nIf the caller sets `preview` to `true` then they can inspect the Steps within the execution to review whether they are happy to proceed with it and, if so, invoke `startExecution` to do so. If the caller does not want to proceed then the execution may simply be left alone: there is no need to take further action and the execution will remain unstarted. Multiple preview executions may exist for a given action but only one non-preview; if one already exists then the caller will be redirected to that. This enables multiple potential callers to construct and review a preview even though only one may be started. Note that the content of preview executions for a given action may vary if the state of other resources (e.g. orders, line items) has changed, but the caller has a guarantee that if they execute a preview then only the steps provided in it will be executed.\n\n**Authorized resource type**:\nDSP Rodeo Entity ID, DSP Advertiser Account ID\n\n**Parameter name**:\nAmazon-Ads-AccountId\n\n**Parameter in**:\nheader\n\n**Requires one of these permissions**:\n[\"campaign_edit\"]","operationId":"createExecutionV1","parameters":[{"description":"The identifier of the application making an API request on behalf of the customer.","explode":false,"in":"header","name":"Amazon-Advertising-API-ClientId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The DSP entity identifier that the user requested access to.","explode":false,"in":"header","name":"Amazon-Advertising-API-AdvertiserId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The marketplace identifier that the user requested access to.","explode":false,"in":"header","name":"Amazon-Advertising-API-MarketplaceId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","explode":false,"in":"header","name":"Amazon-Ads-AccountId","required":false,"schema":{"type":"string"},"style":"simple"},{"description":"ID of the action. Can be found on recommendations fetched from the DSP Recommendations API.","explode":false,"in":"path","name":"actionId","required":true,"schema":{"$ref":"#/components/schemas/ActionId"},"style":"simple"},{"description":"Whether the execution should be created in a preview state. If `false`, the execution will be started immediately.","explode":true,"in":"query","name":"preview","required":false,"schema":{"type":"boolean"},"style":"form"}],"responses":{"201":{"content":{"application/vnd.dspexecution.v1+json":{"schema":{"$ref":"#/components/schemas/Execution"}}},"description":"An execution preview for this action was successfully constructed and is ready to be executed."},"303":{"description":"A non-preview execution already exists for this action and can be retrieved at the URI provided.","headers":{"location":{"description":"The URI of the existing, non-preview execution for this action","explode":false,"required":true,"schema":{"type":"string"},"style":"simple"}}},"400":{"content":{"application/vnd.dspquickactionserror.v1+json":{"schema":{"$ref":"#/components/schemas/QuickActionsError"}}},"description":"Invalid request"},"404":{"content":{"application/vnd.dspquickactionserror.v1+json":{"schema":{"$ref":"#/components/schemas/QuickActionsError"}}},"description":"Action not found"}},"summary":"Creates an execution for an action.","tags":["DSP Quick Actions"]}},"/dsp/v1/quickactions/{actionId}/executions/{executionId}":{"get":{"description":"\n\n**Authorized resource type**:\nDSP Rodeo Entity ID, DSP Advertiser Account ID\n\n**Parameter name**:\nAmazon-Ads-AccountId\n\n**Parameter in**:\nheader\n\n**Requires one of these permissions**:\n[\"campaign_edit\"]","operationId":"getExecutionV1","parameters":[{"description":"The identifier of the application making an API request on behalf of the customer.","explode":false,"in":"header","name":"Amazon-Advertising-API-ClientId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The DSP entity identifier that the user requested access to.","explode":false,"in":"header","name":"Amazon-Advertising-API-AdvertiserId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The marketplace identifier that the user requested access to.","explode":false,"in":"header","name":"Amazon-Advertising-API-MarketplaceId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","explode":false,"in":"header","name":"Amazon-Ads-AccountId","required":false,"schema":{"type":"string"},"style":"simple"},{"description":"ID of action to get","explode":false,"in":"path","name":"actionId","required":true,"schema":{"$ref":"#/components/schemas/ActionId"},"style":"simple"},{"description":"ID of execution to get. Can be retrieved by previewing an action using createExecutionPreview.","explode":false,"in":"path","name":"executionId","required":true,"schema":{"$ref":"#/components/schemas/ExecutionId"},"style":"simple"}],"responses":{"200":{"content":{"application/vnd.dspexecution.v1+json":{"schema":{"$ref":"#/components/schemas/Execution"}}},"description":"Execution found successfully"},"400":{"content":{"application/vnd.dspquickactionserror.v1+json":{"schema":{"$ref":"#/components/schemas/QuickActionsError"}}},"description":"Invalid request"},"404":{"content":{"application/vnd.dspquickactionserror.v1+json":{"schema":{"$ref":"#/components/schemas/QuickActionsError"}}},"description":"Execution not found"}},"summary":"Gets an execution.","tags":["DSP Quick Actions"]}},"/dsp/v1/quickactions/{actionId}/executions/{executionId}/start":{"put":{"description":"Starts a preview execution, moving its state from `PREVIEW` to `IN_PROGRESS`. Progress of the execution may be inspected by retrieving it using `getExecution`. If the execution is already in a non-preview state then the current execuction details are returned.\n\n**Authorized resource type**:\nDSP Rodeo Entity ID, DSP Advertiser Account ID\n\n**Parameter name**:\nAmazon-Ads-AccountId\n\n**Parameter in**:\nheader\n\n**Requires one of these permissions**:\n[\"campaign_edit\"]","operationId":"startExecutionV1","parameters":[{"description":"The identifier of the application making an API request on behalf of the customer.","explode":false,"in":"header","name":"Amazon-Advertising-API-ClientId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The DSP entity identifier that the user requested access to.","explode":false,"in":"header","name":"Amazon-Advertising-API-AdvertiserId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The marketplace identifier that the user requested access to.","explode":false,"in":"header","name":"Amazon-Advertising-API-MarketplaceId","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","explode":false,"in":"header","name":"Amazon-Ads-AccountId","required":false,"schema":{"type":"string"},"style":"simple"},{"description":"ID of action to execute","explode":false,"in":"path","name":"actionId","required":true,"schema":{"$ref":"#/components/schemas/ActionId"},"style":"simple"},{"description":"ID of execution to start. Can be obtained by calling `createExecution` with `preview` set to `true`.","explode":false,"in":"path","name":"executionId","required":true,"schema":{"$ref":"#/components/schemas/ExecutionId"},"style":"simple"},{"description":"List of optional steps that should be ommitted. If not specified then all steps will be executed.","explode":true,"in":"query","name":"omitStepIds","required":false,"schema":{"items":{"$ref":"#/components/schemas/StepId"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/vnd.dspexecution.v1+json":{"schema":{"$ref":"#/components/schemas/Execution"}}},"description":"The execution was successfully started"},"400":{"content":{"application/vnd.dspquickactionserror.v1+json":{"schema":{"$ref":"#/components/schemas/QuickActionsError"}}},"description":"Invalid request"},"404":{"content":{"application/vnd.dspquickactionserror.v1+json":{"schema":{"$ref":"#/components/schemas/QuickActionsError"}}},"description":"Execution not found"},"409":{"content":{"application/vnd.dspexecution.v1+json":{"schema":{"$ref":"#/components/schemas/Execution"}}},"description":"The execution was already in a non-preview state; the current execution details are returned"}},"summary":"Starts an execution.","tags":["DSP Quick Actions"]}}}}