{"components":{"callbacks":{},"examples":{},"headers":{},"links":{},"parameters":{"AccountIdHeaderOptional":{"description":"The identifier of an Amazon Ads Advertiser Account.","in":"header","name":"Amazon-Ads-AccountId","schema":{"type":"string"}},"ClientIdHeader":{"description":"The identifier of a client associated with a \u0027Login with Amazon\u0027 account.","in":"header","name":"Amazon-Ads-ClientId","required":true,"schema":{"type":"string"}},"ManagerAccountIdHeaderOptional":{"description":"The identifier of an Amazon Ads Manager Account.","in":"header","name":"Amazon-Ads-Manager-AccountId","schema":{"type":"string"}}},"requestBodies":{},"responses":{},"schemas":{"BadGatewayResponseContent":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"BadRequestResponseContent":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"ContentTooLargeResponseContent":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"CreateGeoLocationCoordinates":{"description":"Coordinates for a point of interest","properties":{"latitude":{"description":"Latitude coordinate. Example 47.6157","format":"double","type":"number"},"longitude":{"description":"Longitude coordinate. Example 122.339","format":"double","type":"number"}},"required":["latitude","longitude"],"type":"object"},"CreateGeoLocationRequest":{"properties":{"geoLocations":{"items":{"$ref":"#/components/schemas/GeoLocationCreate"},"maxItems":100,"minItems":1,"type":"array"}},"required":["geoLocations"],"type":"object"},"CreateGeoLocationUnion":{"oneOf":[{"properties":{"radiusLocation":{"$ref":"#/components/schemas/CreateRadiusLocation"}},"required":["radiusLocation"],"title":"radiusLocation","type":"object"},{"properties":{"smartLocation":{"$ref":"#/components/schemas/CreateSmartLocation"}},"required":["smartLocation"],"title":"smartLocation","type":"object"}]},"CreateRadiusLocation":{"description":"Configuration for a radius-based location. A minimum radius of 0.37 miles (2000 ft, 0.6km) is required.","properties":{"coordinates":{"$ref":"#/components/schemas/CreateGeoLocationCoordinates"},"pointOfInterestAddress":{"description":"Address. Example \u00272111 7th Ave, Seattle, WA 98121, United States\u0027 or \u0027Amazon Spheres\u0027","type":"string"},"pointOfInterestRadius":{"description":"Radius of circle in kilometers or miles","format":"double","type":"number"},"units":{"$ref":"#/components/schemas/DistanceUnit"}},"required":["pointOfInterestRadius","units"],"type":"object"},"CreateSmartLocation":{"description":"A smart location targets postal codes based on a sales index.","properties":{"locationIndexId":{"description":"The ID of the index used for this smart location.","type":"string"},"maxIndexValuePercentile":{"description":"Maximum percentile value (0-100). Must be greater than minIndexValuePercentile. Null will be treated as 0.","format":"int32","maximum":100,"minimum":0,"type":"integer"},"minIndexValuePercentile":{"description":"Minimum percentile value (0-100). Must be less than maxIndexValuePercentile. Null will be treated as 0.","format":"int32","maximum":100,"minimum":0,"type":"integer"},"name":{"description":"Name for the smart location.","type":"string"}},"required":["locationIndexId","name"],"type":"object"},"DistanceUnit":{"description":"**DistanceUnit Enum:**\n| DistanceUnit | Description |\n| --- | --- |\n| `KILOMETERS` | Distance in kilometers |\n| `MILES` | Distance in miles |","enum":["KILOMETERS","MILES"],"type":"string"},"Error":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"fieldLocation":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"ErrorCode":{"description":"**ErrorCode Enum:**\n| ErrorCode | Description |\n| --- | --- |\n| `INTERNAL_ERROR` | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n| `UNAUTHORIZED` | The request lacks the necessary credentials. |\n| `FORBIDDEN` | The caller is not authorized to make the given request. |\n| `NOT_FOUND` | The requested resource does not exist. |\n| `BAD_REQUEST` | The request is not valid considering the documented schema. |\n| `FEATURE_NOT_AVAILABLE` | The requested feature is not available. |\n| `FIELD_VALUE_IS_NULL` | Update the request with the required information for this resource. |\n| `FIELD_VALUE_IS_EMPTY` | Update the request with the required information for this resource. |\n| `FIELD_VALUE_IS_OUT_OF_RANGE` | Update the value to be within the required range. |","enum":["BAD_REQUEST","FEATURE_NOT_AVAILABLE","FIELD_VALUE_IS_EMPTY","FIELD_VALUE_IS_NULL","FIELD_VALUE_IS_OUT_OF_RANGE","FORBIDDEN","INTERNAL_ERROR","NOT_FOUND","UNAUTHORIZED"],"type":"string"},"ErrorsIndex":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/Error"},"maxItems":20,"minItems":1,"type":"array"},"index":{"format":"int32","maximum":99,"minimum":0,"type":"integer"}},"required":["errors","index"],"type":"object"},"ForbiddenResponseContent":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"GatewayTimeoutResponseContent":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"GeoLocation":{"properties":{"geoLocationId":{"description":"The identifier of the geo location.","type":"string"},"location":{"$ref":"#/components/schemas/GeoLocationUnion"}},"required":["geoLocationId","location"],"type":"object"},"GeoLocationCoordinates":{"description":"Coordinates for a point of interest","properties":{"latitude":{"description":"Latitude coordinate. Example 47.6157","format":"double","type":"number"},"longitude":{"description":"Longitude coordinate. Example 122.339","format":"double","type":"number"}},"required":["latitude","longitude"],"type":"object"},"GeoLocationCreate":{"properties":{"location":{"$ref":"#/components/schemas/CreateGeoLocationUnion"}},"required":["location"],"type":"object"},"GeoLocationMultiStatusResponse":{"properties":{"error":{"items":{"$ref":"#/components/schemas/ErrorsIndex"},"maxItems":100,"minItems":0,"type":"array"},"success":{"items":{"$ref":"#/components/schemas/GeoLocationMultiStatusSuccess"},"maxItems":100,"minItems":0,"type":"array"}},"type":"object"},"GeoLocationMultiStatusSuccess":{"properties":{"geoLocation":{"$ref":"#/components/schemas/GeoLocation"},"index":{"format":"int32","maximum":99,"minimum":0,"type":"integer"}},"required":["geoLocation","index"],"type":"object"},"GeoLocationUnion":{"oneOf":[{"properties":{"radiusLocation":{"$ref":"#/components/schemas/RadiusLocation"}},"required":["radiusLocation"],"title":"radiusLocation","type":"object"},{"properties":{"smartLocation":{"$ref":"#/components/schemas/SmartLocation"}},"required":["smartLocation"],"title":"smartLocation","type":"object"}]},"InternalServerErrorResponseContent":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"NotFoundResponseContent":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"RadiusLocation":{"description":"Configuration for a radius-based location. A minimum radius of 0.37 miles (2000 ft, 0.6km) is required.","properties":{"coordinates":{"$ref":"#/components/schemas/GeoLocationCoordinates"},"pointOfInterestAddress":{"description":"Address. Example \u00272111 7th Ave, Seattle, WA 98121, United States\u0027 or \u0027Amazon Spheres\u0027","type":"string"},"pointOfInterestRadius":{"description":"Radius of circle in kilometers or miles","format":"double","type":"number"},"units":{"$ref":"#/components/schemas/DistanceUnit"}},"required":["pointOfInterestRadius","units"],"type":"object"},"ServiceUnavailableErrorResponseContent":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"SmartLocation":{"description":"A smart location targets postal codes based on a sales index.","properties":{"locationIndexId":{"description":"The ID of the index used for this smart location.","type":"string"},"maxIndexValuePercentile":{"description":"Maximum percentile value (0-100). Must be greater than minIndexValuePercentile. Null will be treated as 0.","format":"int32","maximum":100,"minimum":0,"type":"integer"},"minIndexValuePercentile":{"description":"Minimum percentile value (0-100). Must be less than maxIndexValuePercentile. Null will be treated as 0.","format":"int32","maximum":100,"minimum":0,"type":"integer"},"name":{"description":"Name for the smart location.","type":"string"}},"required":["locationIndexId","name"],"type":"object"},"TooManyRequestsResponseContent":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"UnauthorizedResponseContent":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"securitySchemes":{"OAuth2":{"flows":{"authorizationCode":{"authorizationUrl":"https://www.amazon.com/ap/oa","scopes":{"advertising::audiences":"Grants access to data provider APIs","advertising::campaign_management":"Grants write access to campaign management.","advertising::test:create_account":"Grants write access to create test accounts functionality","cpc_advertising:campaign_management":"Grants write access to campaign management. Legacy name (no difference from advertising::campaign_management)"},"tokenUrl":"https://api.amazon.com/auth/o2/token"}},"type":"oauth2"}}},"info":{"description":"Amazon Ads API v1 is a reimagined approach to our Ads API, built to provide a seamless experience across all Amazon advertising products through a common model. [Learn more about Ads API v1.](https://advertising.amazon.com/API/docs/en-us/reference/amazon-ads/overview) To learn about prerequisites and header values, see [Getting started with Amazon Ads API v1](https://advertising.amazon.com/API/docs/en-us/reference/amazon-ads/getting-started).\n\n**Download Amazon Ads API V1 OpenAPI Spec** ([All Products](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [SP](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPISPMerged_prod_3p.json) | [SP Global](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPISPGLOBALMerged_prod_3p.json) | [SB](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPISBMerged_prod_3p.json) | [DSP](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIDSPMerged_prod_3p.json) | [ST](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPISTMerged_prod_3p.json) | [SD](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPISDMerged_prod_3p.json))","title":"GeoLocations API","version":"3.0"},"openapi":"3.0.1","paths":{"/adsApi/v1/create/geoLocations":{"post":{"description":"Create geo location targeting definitions. Supports smart locations, which target users based on their percentile rank within a Smart Location Index, and radius locations, which target users within a specified distance of an address or coordinate. Note: radius locations are currently in beta.\n\n**Requires one of these permissions**:\n[\"advertiser_campaign_edit\", \"campaign_edit\", \"dsp_campaign_edit\", \n\"MasterAccount_Manager\"]","operationId":"CreateGeoLocation","parameters":[{"$ref":"#/components/parameters/AccountIdHeaderOptional"},{"$ref":"#/components/parameters/ClientIdHeader"},{"$ref":"#/components/parameters/ManagerAccountIdHeaderOptional"}],"requestBody":{"content":{"application/json":{"examples":{"GeoLocationCreateRadiusRequestExample":{"summary":"Create Radius GeoLocation Request Example (Open Beta)","value":{"geoLocations":[{"location":{"radiusLocation":{"pointOfInterestAddress":"20 W 34th St, New York, NY 10001","pointOfInterestRadius":5,"units":"KILOMETERS"}}}]}},"GeoLocationCreateSmartRequestExample":{"summary":"Create Smart GeoLocation Request Example","value":{"geoLocations":[{"location":{"smartLocation":{"locationIndexId":"518f53e3-1739-4644-8f9a-a0211a6188d0","maxIndexValuePercentile":100,"minIndexValuePercentile":75,"name":"High-value customers"}}}]}}},"schema":{"$ref":"#/components/schemas/CreateGeoLocationRequest"}}},"required":true},"responses":{"207":{"content":{"application/json":{"examples":{"GeoLocationCreateRadiusResponseExample":{"summary":"Create Radius GeoLocation Response Example (Open Beta)","value":{"error":[],"success":[{"geoLocation":{"geoLocationId":"XHvCjcKHXsKGfcKLaMKMwoh_wpHCkWzChcKHfH_CjsKFT04tYzVkNjNiZDMtZTRhMS00NGUwLWE0YzQtNzk0M2Q4Mzk0M2Qx","location":{"radiusLocation":{"coordinates":{"latitude":40.748817,"longitude":-73.985428},"pointOfInterestAddress":"20 W 34th St, New York, NY 10001","pointOfInterestRadius":5,"units":"KILOMETERS"}}},"index":0}]}},"GeoLocationCreateSmartResponseExample":{"summary":"Create Smart GeoLocation Response Example","value":{"error":[],"success":[{"geoLocation":{"geoLocationId":"XHvCjcKHXsKGfcKLaMKMwoh_wpHCkWzChcKHfH_CjsKFT04tYzVkNjNiZDMtZTRhMS00NGUwLWE0YzQtNzk0M2Q4Mzk0M2Qx","location":{"smartLocation":{"locationIndexId":"518f53e3-1739-4644-8f9a-a0211a6188d0","maxIndexValuePercentile":100,"minIndexValuePercentile":75,"name":"High-value customers"}}},"index":0}]}}},"schema":{"$ref":"#/components/schemas/GeoLocationMultiStatusResponse"}}},"description":"CreateGeoLocation 207 response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseContent"}}},"description":"BadRequest 400 response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseContent"}}},"description":"Unauthorized 401 response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResponseContent"}}},"description":"Forbidden 403 response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseContent"}}},"description":"NotFound 404 response"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentTooLargeResponseContent"}}},"description":"ContentTooLarge 413 response"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsResponseContent"}}},"description":"TooManyRequests 429 response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponseContent"}}},"description":"InternalServerError 500 response"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadGatewayResponseContent"}}},"description":"BadGateway 502 response"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableErrorResponseContent"}}},"description":"ServiceUnavailableError 503 response"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutResponseContent"}}},"description":"GatewayTimeout 504 response"}},"security":[{"OAuth2":["advertising::campaign_management"]}],"tags":["GeoLocations"]}}},"servers":[{"description":"Production server for NA","url":"https://advertising-api.amazon.com"},{"description":"Production server for EU","url":"https://advertising-api-eu.amazon.com"},{"description":"Production server for FE","url":"https://advertising-api-fe.amazon.com"}]}