{"info": {"description":"These APIs are part of the Amazon DSP Campaign Management API closed beta and only accessible to closed beta participants at this time. Because these APIs are in closed beta, they don’t follow our normal versioning standards and are subject to change. If you are interested in joining the closed beta, please [submit a support ticket](https://amzn-clicks.atlassian.net/servicedesk/customer/portal/2/group/2/create/5) and we’ll follow up with additional information. <br><br> Target users by time of day. By default, the ad group will run on all times of day.","title":"Ad Group Targeting - Dayparts","version":"3.0"},"paths": {"/dsp/adGroups/{adGroupId}/targetingTypes/daypart/targets/delete":{"post":{"requestBody":{"content":{"application/vnd.dspAdGroupDaypartTargets.v1+json":{"schema":{"$ref":"#/components/schemas/DspDeleteAdGroupDaypartTargetsRequestContentV1"}}},"required":true},"description":"Removes one or more daypart targets from an ad group.\n\n**Requires one of these permissions**:\n[]","operationId":"DspDeleteAdGroupTargetingDayparts","responses":{"400":{"description":"Bad Request or request body is not matching with input model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspBadRequestExceptionV1ResponseContent"}}}},"401":{"description":"Unauthenticated request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspUnauthorizedExceptionV1ResponseContent"}}}},"500":{"description":"Internal Server Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspInternalServerExceptionV1ResponseContent"}}}},"204":{"description":"Success with no body content."},"403":{"description":"Forbidden - Request failed because user is not authorized to access a resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspForbiddenExceptionV1ResponseContent"}}}},"404":{"description":"Not Found - Requested resource does not exist or is not visible for the authenticated user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspNotFoundExceptionV1ResponseContent"}}}},"415":{"description":"Unsupported Media Type - Version not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspUnsupportedMediaTypeExceptionV1ResponseContent"}}}},"429":{"description":"Too Many Requests - Request was rate-limited. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspTooManyRequestsExceptionV1ResponseContent"}}}},"409":{"description":"DspConflictExceptionV1 409 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspConflictExceptionV1ResponseContent"}}}}},"parameters":[{"schema":{"description":"The ad group identifier.","type":"string"},"in":"path","name":"adGroupId","description":"The ad group identifier.","required":true},{"schema":{"description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","type":"string"},"in":"header","name":"Amazon-Ads-AccountId","description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","required":true},{"schema":{"description":"The identifier of a client associated with a \"Login with Amazon\" account.","type":"string"},"in":"header","name":"Amazon-Advertising-API-ClientId","description":"The identifier of a client associated with a \"Login with Amazon\" account.","required":true},{"schema":{"description":"The identifier of a profile associated with the advertiser account. Use GET method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header.","type":"string"},"in":"header","name":"Amazon-Advertising-API-Scope","description":"The identifier of a profile associated with the advertiser account. Use GET method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header.","required":true}],"tags":["Ad Group Targeting - Dayparts"]}},"/dsp/adGroups/{adGroupId}/targetingTypes/daypart/targets":{"post":{"requestBody":{"content":{"application/vnd.dspAdGroupDaypartTargets.v1+json":{"schema":{"$ref":"#/components/schemas/DspCreateAdGroupDaypartTargetsRequestContentV1"}}},"required":true},"description":"Creates one or more daypart targets to be targeted. You can specify time zone in the timeZoneType field in the /dsp/adGroups resource.\n\n**Requires one of these permissions**:\n[]","operationId":"DspCreateAdGroupTargetingDayparts","responses":{"400":{"description":"Bad Request or request body is not matching with input model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspBadRequestExceptionV1ResponseContent"}}}},"401":{"description":"Unauthenticated request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspUnauthorizedExceptionV1ResponseContent"}}}},"500":{"description":"Internal Server Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspInternalServerExceptionV1ResponseContent"}}}},"204":{"description":"Success with no body content."},"403":{"description":"Forbidden - Request failed because user is not authorized to access a resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspForbiddenExceptionV1ResponseContent"}}}},"404":{"description":"Not Found - Requested resource does not exist or is not visible for the authenticated user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspNotFoundExceptionV1ResponseContent"}}}},"415":{"description":"Unsupported Media Type - Version not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspUnsupportedMediaTypeExceptionV1ResponseContent"}}}},"429":{"description":"Too Many Requests - Request was rate-limited. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspTooManyRequestsExceptionV1ResponseContent"}}}},"409":{"description":"DspConflictExceptionV1 409 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspConflictExceptionV1ResponseContent"}}}}},"parameters":[{"schema":{"description":"The ad group identifier.","type":"string"},"in":"path","name":"adGroupId","description":"The ad group identifier.","required":true},{"schema":{"description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","type":"string"},"in":"header","name":"Amazon-Ads-AccountId","description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","required":true},{"schema":{"description":"The identifier of a client associated with a \"Login with Amazon\" account.","type":"string"},"in":"header","name":"Amazon-Advertising-API-ClientId","description":"The identifier of a client associated with a \"Login with Amazon\" account.","required":true},{"schema":{"description":"The identifier of a profile associated with the advertiser account. Use GET method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header.","type":"string"},"in":"header","name":"Amazon-Advertising-API-Scope","description":"The identifier of a profile associated with the advertiser account. Use GET method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header.","required":true}],"tags":["Ad Group Targeting - Dayparts"]},"get":{"description":"Gets a list of daypart targets associated to an ad group.\n\n**Requires one of these permissions**:\n[]","operationId":"DspGetAdGroupTargetingDayparts","responses":{"200":{"description":"Successful operation.","content":{"application/vnd.dspAdGroupDaypartTargets.v1+json":{"schema":{"$ref":"#/components/schemas/DspGetAdGroupDaypartTargetsResponseContent"}}}},"400":{"description":"Bad Request or request body is not matching with input model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspBadRequestExceptionV1ResponseContent"}}}},"401":{"description":"Unauthenticated request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspUnauthorizedExceptionV1ResponseContent"}}}},"500":{"description":"Internal Server Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspInternalServerExceptionV1ResponseContent"}}}},"403":{"description":"Forbidden - Request failed because user is not authorized to access a resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspForbiddenExceptionV1ResponseContent"}}}},"404":{"description":"Not Found - Requested resource does not exist or is not visible for the authenticated user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspNotFoundExceptionV1ResponseContent"}}}},"415":{"description":"Unsupported Media Type - Version not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspUnsupportedMediaTypeExceptionV1ResponseContent"}}}},"429":{"description":"Too Many Requests - Request was rate-limited. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspTooManyRequestsExceptionV1ResponseContent"}}}},"409":{"description":"DspConflictExceptionV1 409 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspConflictExceptionV1ResponseContent"}}}}},"parameters":[{"schema":{"description":"The ad group identifier.","type":"string"},"in":"path","name":"adGroupId","description":"The ad group identifier.","required":true},{"schema":{"description":"Operations that return paginated results include a pagination token in this field. To retrieve the next page of results, call the same operation and specify this token in the request. If the nextToken field is empty, there are no further results.","type":"string"},"in":"query","name":"nextToken","description":"Operations that return paginated results include a pagination token in this field. To retrieve the next page of results, call the same operation and specify this token in the request. If the nextToken field is empty, there are no further results."},{"schema":{"description":"Sets the maximum number of objects in the returned array. Use in conjunction with the nextToken parameter to control pagination. For example, supplying maxResults=20 with a previously returned token will fetch up to the next 20 items. In some cases, fewer items may be returned.<br/>Default: 1000","type":"integer"},"in":"query","name":"maxResults","description":"Sets the maximum number of objects in the returned array. Use in conjunction with the nextToken parameter to control pagination. For example, supplying maxResults=20 with a previously returned token will fetch up to the next 20 items. In some cases, fewer items may be returned.<br/>Default: 1000"},{"schema":{"description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","type":"string"},"in":"header","name":"Amazon-Ads-AccountId","description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","required":true},{"schema":{"description":"The identifier of a client associated with a \"Login with Amazon\" account.","type":"string"},"in":"header","name":"Amazon-Advertising-API-ClientId","description":"The identifier of a client associated with a \"Login with Amazon\" account.","required":true},{"schema":{"description":"The identifier of a profile associated with the advertiser account. Use GET method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header.","type":"string"},"in":"header","name":"Amazon-Advertising-API-Scope","description":"The identifier of a profile associated with the advertiser account. Use GET method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header.","required":true}],"tags":["Ad Group Targeting - Dayparts"]}}},"components": {"headers":{},"examples":{},"schemas":{"DayOfWeek":{"description":"The day of the week.","type":"string","enum":["SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY"]},"DspSubErrorV1":{"type":"object","properties":{"fieldName":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"}},"required":["errorType","message"]},"DspUnsupportedMediaTypeExceptionV1ResponseContent":{"type":"object","properties":{"requestId":{"type":"string"},"message":{"type":"string"},"errors":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DspSubErrorV1"}}}},"DspConflictExceptionV1ResponseContent":{"type":"object","properties":{"requestId":{"type":"string"},"message":{"type":"string"},"errors":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DspSubErrorV1"}}}},"DspGetAdGroupDaypartTargetsResponseContent":{"type":"object","properties":{"nextToken":{"description":"Operations that return paginated results include a pagination token in this field. To retrieve the next page of results, call the same operation and specify this token in the request. If the nextToken field is empty, there are no further results. ","type":"string"},"daypartTargets":{"minItems":0,"maxItems":168,"description":"A list of targets.","type":"array","items":{"$ref":"#/components/schemas/DspAdGroupDaypartTargetsV1"}}},"required":["daypartTargets"]},"DspAdGroupDaypartTargetsV1":{"type":"object","properties":{"hourSlot":{"description":"Specify the hour slot in which the ad is to be served. For example, specifying 8 will serve the ad between 8:00 and 9:00.","maximum":23,"type":"integer","minimum":0},"dayOfWeek":{"$ref":"#/components/schemas/DayOfWeek"}},"required":["dayOfWeek","hourSlot"]},"DspBadRequestExceptionV1ResponseContent":{"type":"object","properties":{"requestId":{"type":"string"},"message":{"type":"string"},"errors":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DspSubErrorV1"}}}},"DspInternalServerExceptionV1ResponseContent":{"type":"object","properties":{"requestId":{"type":"string"},"message":{"type":"string"},"errors":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DspSubErrorV1"}}}},"DspTooManyRequestsExceptionV1ResponseContent":{"type":"object","properties":{"requestId":{"type":"string"},"message":{"type":"string"},"errors":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DspSubErrorV1"}}}},"DspDeleteAdGroupDaypartTargetsRequestContentV1":{"type":"object","properties":{"daypartTargets":{"minItems":1,"maxItems":168,"description":"A list of targets.","type":"array","items":{"$ref":"#/components/schemas/DspAdGroupDaypartTargetsV1"}}},"required":["daypartTargets"]},"DspForbiddenExceptionV1ResponseContent":{"type":"object","properties":{"requestId":{"type":"string"},"message":{"type":"string"},"errors":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DspSubErrorV1"}}}},"DspUnauthorizedExceptionV1ResponseContent":{"type":"object","properties":{"requestId":{"type":"string"},"message":{"type":"string"},"errors":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DspSubErrorV1"}}}},"DspCreateAdGroupDaypartTargetsRequestContentV1":{"type":"object","properties":{"daypartTargets":{"minItems":1,"maxItems":168,"description":"A list of targets.","type":"array","items":{"$ref":"#/components/schemas/DspAdGroupDaypartTargetsV1"}}},"required":["daypartTargets"]},"DspNotFoundExceptionV1ResponseContent":{"type":"object","properties":{"requestId":{"type":"string"},"message":{"type":"string"},"errors":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DspSubErrorV1"}}}}},"requestBodies":{},"responses":{},"callbacks":{},"links":{},"securitySchemes":{},"parameters":{}},"openapi": "3.0.1"}