{"openapi":"3.0.0","paths":{"/health":{"get":{"operationId":"HealthController_health","parameters":[],"responses":{"200":{"description":""}},"tags":["Health"]}},"/v1/me":{"get":{"summary":"Describe the authenticated credential (API key or OAuth grant): scopes and accessible accounts","tags":["me"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["api_key","oauth_token"]},"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"subject_type":{"type":"string","enum":["business","agency"]},"scopes":{"type":"array","items":{"type":"string","enum":["catalog:read","campaigns:read","connections:read","tasks:read","skills:read","workflows:read","workflows:write"]}},"account_required":{"type":"boolean"},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"nullable":true,"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["object","id","subject_type","scopes","account_required","accounts"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/accounts":{"get":{"summary":"List the accounts this API key can operate on","tags":["accounts"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["account"]},"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"nullable":true,"type":"string"},"connections":{"nullable":true,"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}}},"required":["object","id","name","connections"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/connections":{"get":{"summary":"List the authenticated account's connections","tags":["connections"],"parameters":[{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true},{"name":"search","in":"query","description":"Case-insensitive substring match over the connection name. Use it to find a record by name when you do not have its id, instead of paging through the whole list. Regex metacharacters are matched literally.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"type","in":"query","schema":{"type":"string","enum":["seller","vendor","adv-profile"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/connections/{id}":{"get":{"tags":["connections"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/countries":{"get":{"summary":"List Amazon marketplace countries","tags":["countries"],"parameters":[{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"code","in":"query","schema":{"type":"string","minLength":2,"maxLength":2}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/countries/{id}":{"get":{"tags":["countries"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/product-brands":{"get":{"summary":"List the brands present in the authenticated account's catalog","tags":["product-brands"],"parameters":[{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true},{"name":"search","in":"query","description":"Case-insensitive substring match over the brand name. Use it to find a record by name when you do not have its id, instead of paging through the whole list. Regex metacharacters are matched literally.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/product-brands/{id}":{"get":{"tags":["product-brands"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/products":{"get":{"summary":"List the authenticated account's products","tags":["products"],"parameters":[{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true},{"name":"search","in":"query","description":"Case-insensitive substring match over the product title, ASIN and SKU. Use it to find a record by name when you do not have its id, instead of paging through the whole list. Regex metacharacters are matched literally.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"connection","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"country","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"brand","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"asin","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"asin":{"type":"string"},"sku":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"ean":{"nullable":true,"type":"string"},"upc":{"nullable":true,"type":"string"},"gtin":{"nullable":true,"type":"string"},"platform":{"type":"string","enum":["amazon"]},"type":{"type":"string","enum":["seller","vendor","adv"]},"active":{"type":"boolean"},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"brand":{"nullable":true,"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","asin","sku","title","ean","upc","gtin","platform","type","active","connection","country","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/products/{id}":{"get":{"tags":["products"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"asin":{"type":"string"},"sku":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"ean":{"nullable":true,"type":"string"},"upc":{"nullable":true,"type":"string"},"gtin":{"nullable":true,"type":"string"},"platform":{"type":"string","enum":["amazon"]},"type":{"type":"string","enum":["seller","vendor","adv"]},"active":{"type":"boolean"},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"brand":{"nullable":true,"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","asin","sku","title","ean","upc","gtin","platform","type","active","connection","country","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/amazon-seller-products":{"get":{"summary":"List the authenticated account's Amazon seller products","tags":["amazon-seller-products"],"parameters":[{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true},{"name":"search","in":"query","description":"Case-insensitive substring match over the listing title, ASIN and SKU. Use it to find a record by name when you do not have its id, instead of paging through the whole list. Regex metacharacters are matched literally.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"connection","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"country","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"brand","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"asin","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"asin":{"type":"string"},"sku":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"active":{"type":"boolean"},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"brand":{"nullable":true,"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}]},"sellerCentralInfo":{},"catalogPublicInfo":{},"pricing":{},"buyboxB2C":{},"buyboxB2B":{},"fbaInventory":{},"aplusContent":{},"competitivePriceSummary":{},"suppressed":{},"fbaLocalStock":{},"amazonStatus":{"nullable":true,"type":"string"},"publicParentSKU":{"nullable":true,"type":"string"},"publicParentASIN":{"nullable":true,"type":"string"},"publicIsParentASIN":{"nullable":true,"type":"boolean"},"backendParentSKU":{"nullable":true,"type":"string"},"backendParentASIN":{"nullable":true,"type":"string"},"backendIsParentASIN":{"nullable":true,"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","asin","sku","title","active","connection","country","amazonStatus","publicParentSKU","publicParentASIN","publicIsParentASIN","backendParentSKU","backendParentASIN","backendIsParentASIN","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/amazon-seller-products/{id}":{"get":{"tags":["amazon-seller-products"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"asin":{"type":"string"},"sku":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"active":{"type":"boolean"},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"brand":{"nullable":true,"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}]},"sellerCentralInfo":{},"catalogPublicInfo":{},"pricing":{},"buyboxB2C":{},"buyboxB2B":{},"fbaInventory":{},"aplusContent":{},"competitivePriceSummary":{},"suppressed":{},"fbaLocalStock":{},"amazonStatus":{"nullable":true,"type":"string"},"publicParentSKU":{"nullable":true,"type":"string"},"publicParentASIN":{"nullable":true,"type":"string"},"publicIsParentASIN":{"nullable":true,"type":"boolean"},"backendParentSKU":{"nullable":true,"type":"string"},"backendParentASIN":{"nullable":true,"type":"string"},"backendIsParentASIN":{"nullable":true,"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","asin","sku","title","active","connection","country","amazonStatus","publicParentSKU","publicParentASIN","publicIsParentASIN","backendParentSKU","backendParentASIN","backendIsParentASIN","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/amazon-vendor-products":{"get":{"summary":"List the authenticated account's Amazon vendor products","tags":["amazon-vendor-products"],"parameters":[{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true},{"name":"search","in":"query","description":"Case-insensitive substring match over the listing title, ASIN and SKU. Use it to find a record by name when you do not have its id, instead of paging through the whole list. Regex metacharacters are matched literally.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"connection","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"country","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"brand","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"asin","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"asin":{"type":"string"},"sku":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"active":{"type":"boolean"},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"brand":{"nullable":true,"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}]},"vendorCentralInfo":{},"catalogPublicInfo":{},"aplusContent":{},"inventory":{},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","asin","sku","title","active","connection","country","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/amazon-vendor-products/{id}":{"get":{"tags":["amazon-vendor-products"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"asin":{"type":"string"},"sku":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"active":{"type":"boolean"},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"brand":{"nullable":true,"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}]},"vendorCentralInfo":{},"catalogPublicInfo":{},"aplusContent":{},"inventory":{},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","asin","sku","title","active","connection","country","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/amazon-advertising-products":{"get":{"summary":"List the authenticated account's Amazon advertising products","tags":["amazon-advertising-products"],"parameters":[{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true},{"name":"search","in":"query","description":"Case-insensitive substring match over the listing title, ASIN and SKU. Use it to find a record by name when you do not have its id, instead of paging through the whole list. Regex metacharacters are matched literally.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"connection","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"country","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"brand","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"asin","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"asin":{"type":"string"},"sku":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"active":{"type":"boolean"},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"brand":{"nullable":true,"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}]},"availability":{"nullable":true,"type":"string","enum":["IN_STOCK","IN_STOCK_SCARCE","OUT_OF_STOCK","PREORDER","LEADTIME","AVAILABLE_DATE"]},"eligibilityStatus":{"nullable":true,"type":"string","enum":["ELIGIBLE","INELIGIBLE"]},"ineligibilityCodes":{"type":"array","items":{"type":"string"}},"ineligibilityReasons":{"type":"array","items":{"type":"string"}},"basisPrice":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},"bestSellerRank":{"nullable":true,"type":"string"},"firstAvailabilityDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"categoryName":{"nullable":true,"type":"string"},"brandName":{"nullable":true,"type":"string"},"variationList":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","asin","sku","title","active","connection","country","availability","eligibilityStatus","ineligibilityCodes","ineligibilityReasons","basisPrice","bestSellerRank","firstAvailabilityDate","categoryName","brandName","variationList","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/amazon-advertising-products/{id}":{"get":{"tags":["amazon-advertising-products"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"asin":{"type":"string"},"sku":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"active":{"type":"boolean"},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"brand":{"nullable":true,"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}]},"availability":{"nullable":true,"type":"string","enum":["IN_STOCK","IN_STOCK_SCARCE","OUT_OF_STOCK","PREORDER","LEADTIME","AVAILABLE_DATE"]},"eligibilityStatus":{"nullable":true,"type":"string","enum":["ELIGIBLE","INELIGIBLE"]},"ineligibilityCodes":{"type":"array","items":{"type":"string"}},"ineligibilityReasons":{"type":"array","items":{"type":"string"}},"basisPrice":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},"bestSellerRank":{"nullable":true,"type":"string"},"firstAvailabilityDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"categoryName":{"nullable":true,"type":"string"},"brandName":{"nullable":true,"type":"string"},"variationList":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","asin","sku","title","active","connection","country","availability","eligibilityStatus","ineligibilityCodes","ineligibilityReasons","basisPrice","bestSellerRank","firstAvailabilityDate","categoryName","brandName","variationList","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/seller-product-metrics":{"get":{"description":"Aggregated from the report history over a required `start_date`/`end_date` window, grouped by ASIN + SKU + connection + country + currency (the same ASIN sells in several marketplaces with different prices and currencies). Unlike the rest of the API, this resource paginates with `limit`/`offset` (an aggregated row has no id to use as a cursor) and `has_more` tells whether another page follows. Monetary amounts are decimal strings. `sessions`, `page_views`, `buy_box_percentage`, `conversion_rate` and `rank` are `null`, never `0`, when Amazon did not report them — its traffic report only covers products with activity. `conversion_rate` is `orders / sessions` here, not `orders / clicks` as in `campaign_metrics`.","summary":"Seller Central sales and traffic per product, from the account's report history","tags":["seller-product-metrics"],"parameters":[{"name":"start_date","in":"query","description":"Both ends are included in the range. The window is capped, and the cap depends on the resource AND on `granularity` — `daily` allows a much shorter span than `total`, and `target-metrics` and `search-term-metrics` are stricter than the rest because `limit`/`offset` bound the response but not what ClickHouse scans. Going over returns a `400` naming the exact limit for your request.","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-07-01"}},{"name":"end_date","in":"query","description":"Both ends are included in the range. The window is capped, and the cap depends on the resource AND on `granularity` — `daily` allows a much shorter span than `total`, and `target-metrics` and `search-term-metrics` are stricter than the rest because `limit`/`offset` bound the response but not what ClickHouse scans. Going over returns a `400` naming the exact limit for your request.","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-07-31"}},{"name":"granularity","in":"query","schema":{"default":"total","example":"total","type":"string","enum":["total","daily"]}},{"name":"limit","in":"query","description":"Page size. For a top-N, combine `order_by` with a small `limit` instead of raising it: `limit`/`offset` bound the response, not what ClickHouse scans.","schema":{"default":100,"example":100,"type":"integer","minimum":1,"maximum":1000}},{"name":"offset","in":"query","schema":{"default":0,"example":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"order","in":"query","schema":{"default":"desc","example":"desc","type":"string","enum":["asc","desc"]}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"connection","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"country","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"product","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"asin","in":"query","schema":{"type":"string"}},{"name":"order_by","in":"query","schema":{"type":"string","enum":["sales","units","orders","sessions","page_views","rank","conversion_rate"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["seller_product_metrics"]},"product":{"nullable":true,"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"asin":{"type":"string"},"sku":{"type":"string"},"connection":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"country":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"currency":{"type":"string"},"date":{"type":"string"},"sales":{"type":"string"},"units":{"type":"number"},"orders":{"type":"number"},"sessions":{"nullable":true,"type":"number"},"page_views":{"nullable":true,"type":"number"},"buy_box_percentage":{"nullable":true,"type":"number"},"conversion_rate":{"nullable":true,"type":"number"},"rank":{"nullable":true,"type":"number"}},"required":["object","product","asin","sku","connection","country","currency","sales","units","orders","sessions","page_views","buy_box_percentage","conversion_rate","rank"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"503","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/vendor-product-metrics":{"get":{"description":"Aggregated from the report history over a required `start_date`/`end_date` window, grouped by ASIN + connection + country + currency (the same ASIN sells in several marketplaces with different prices and currencies; the SKU is not part of the key here, unlike `seller_product_metrics`). Unlike the rest of the API, this resource paginates with `limit`/`offset` (an aggregated row has no id to use as a cursor) and `has_more` tells whether another page follows. Monetary amounts are decimal strings. There is deliberately NO single `sales` field: Vendor Central has two business models and Amazon does not report them symmetrically — manufacturing (Amazon makes the product under licence) reports ordered, shipped and net received, while sourcing (you sell wholesale to Amazon) reports only shipped and net received. Read the pair that matches how you sell. Vendor has no sessions or conversion rate at all; `glance_views` is the traffic metric, and it is `null` — never `0` — when Amazon did not report it, as are `rank` and both `*_sellable_units`. The `*_sellable_units` fields are the latest inventory snapshot in the window, not a sum.","summary":"Vendor Central sales per product, split by manufacturing and sourcing, from the account's report history","tags":["vendor-product-metrics"],"parameters":[{"name":"start_date","in":"query","description":"Both ends are included in the range. The window is capped, and the cap depends on the resource AND on `granularity` — `daily` allows a much shorter span than `total`, and `target-metrics` and `search-term-metrics` are stricter than the rest because `limit`/`offset` bound the response but not what ClickHouse scans. Going over returns a `400` naming the exact limit for your request.","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-07-01"}},{"name":"end_date","in":"query","description":"Both ends are included in the range. The window is capped, and the cap depends on the resource AND on `granularity` — `daily` allows a much shorter span than `total`, and `target-metrics` and `search-term-metrics` are stricter than the rest because `limit`/`offset` bound the response but not what ClickHouse scans. Going over returns a `400` naming the exact limit for your request.","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-07-31"}},{"name":"granularity","in":"query","schema":{"default":"total","example":"total","type":"string","enum":["total","daily"]}},{"name":"limit","in":"query","description":"Page size. For a top-N, combine `order_by` with a small `limit` instead of raising it: `limit`/`offset` bound the response, not what ClickHouse scans.","schema":{"default":100,"example":100,"type":"integer","minimum":1,"maximum":1000}},{"name":"offset","in":"query","schema":{"default":0,"example":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"order","in":"query","schema":{"default":"desc","example":"desc","type":"string","enum":["asc","desc"]}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"connection","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"country","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"product","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"asin","in":"query","schema":{"type":"string"}},{"name":"order_by","in":"query","schema":{"type":"string","enum":["units","glance_views","rank","manufacturing_ordered_sales","manufacturing_ordered_units","manufacturing_shipped_sales","manufacturing_shipped_units","manufacturing_shipped_cogs","manufacturing_net_received_sales","manufacturing_net_received_units","sourcing_shipped_sales","sourcing_shipped_units","sourcing_shipped_cogs","sourcing_net_received_sales","sourcing_net_received_units"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["vendor_product_metrics"]},"product":{"nullable":true,"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"asin":{"type":"string"},"sku":{"type":"string"},"connection":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"country":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"currency":{"type":"string"},"date":{"type":"string"},"units":{"type":"number"},"manufacturing_ordered_sales":{"type":"string"},"manufacturing_ordered_units":{"type":"number"},"manufacturing_shipped_sales":{"type":"string"},"manufacturing_shipped_units":{"type":"number"},"manufacturing_shipped_cogs":{"type":"string"},"manufacturing_net_received_sales":{"type":"string"},"manufacturing_net_received_units":{"type":"number"},"sourcing_shipped_sales":{"type":"string"},"sourcing_shipped_units":{"type":"number"},"sourcing_shipped_cogs":{"type":"string"},"sourcing_net_received_sales":{"type":"string"},"sourcing_net_received_units":{"type":"number"},"glance_views":{"nullable":true,"type":"number"},"manufacturing_sellable_units":{"nullable":true,"type":"number"},"sourcing_sellable_units":{"nullable":true,"type":"number"},"rank":{"nullable":true,"type":"number"}},"required":["object","product","asin","sku","connection","country","currency","units","manufacturing_ordered_sales","manufacturing_ordered_units","manufacturing_shipped_sales","manufacturing_shipped_units","manufacturing_shipped_cogs","manufacturing_net_received_sales","manufacturing_net_received_units","sourcing_shipped_sales","sourcing_shipped_units","sourcing_shipped_cogs","sourcing_net_received_sales","sourcing_net_received_units","glance_views","manufacturing_sellable_units","sourcing_sellable_units","rank"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"503","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/campaigns":{"get":{"summary":"List the authenticated account's advertising campaigns","tags":["campaigns"],"parameters":[{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true},{"name":"search","in":"query","description":"Case-insensitive substring match over the campaign name. Use it to find a record by name when you do not have its id, instead of paging through the whole list. Regex metacharacters are matched literally.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"connection","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"country","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"state","in":"query","schema":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"campaignId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"startDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"budget":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"nullable":true,"type":"string"},"period":{"type":"string","enum":["DAILY","LIFETIME","OTHER"]}},"required":["amount","currency","period"],"additionalProperties":false},"bidStrategy":{"nullable":true,"type":"string","enum":["MANUAL","LEGACY_FOR_SALES","AUTO_FOR_SALES","NEW_TO_BRAND","RULE_BASED"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","campaignId","name","state","connection","country","startDate","endDate","deliveryStatus","deliveryReasons","budget","bidStrategy","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/campaigns/{id}":{"get":{"tags":["campaigns"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"campaignId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"startDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"budget":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"nullable":true,"type":"string"},"period":{"type":"string","enum":["DAILY","LIFETIME","OTHER"]}},"required":["amount","currency","period"],"additionalProperties":false},"bidStrategy":{"nullable":true,"type":"string","enum":["MANUAL","LEGACY_FOR_SALES","AUTO_FOR_SALES","NEW_TO_BRAND","RULE_BASED"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","campaignId","name","state","connection","country","startDate","endDate","deliveryStatus","deliveryReasons","budget","bidStrategy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/campaigns/{id}/optimization-history":{"get":{"description":"Only changes that were APPLIED, and only for real: a dry-run simulation never appears here, under any parameter. Aggregated to a net per entity — `data` carries one row per target whose bid was moved, with the bid from before the first change against the bid after the last one, so a target raised then capped back down reports `direction: unchanged` with `change_count: 2`. That is the reading a flat decision list hides, and it is usually the answer to whether the optimization is doing anything. Proposals are excluded: the optimizer computes a bid the economic ceiling can then cut, and only what reached Amazon is reported. Non-bid changes (harvested keywords, negatives, placement adjustments, blocked or quarantined targets) do not share the table because they have no previous bid — they are counted in `other_changes`. Monetary amounts are decimal strings. The window is capped at 90 days, which is the retention of the underlying records.","summary":"Changes the workflow actually applied to this campaign","tags":["campaigns"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"start_date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"end_date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"limit","in":"query","description":"Page size, up to 500. Paginate with `offset`, not with a cursor: these rows are aggregated changes, not records with an id. Narrow the window with `start_date` / `end_date` instead of walking every page.","schema":{"default":100,"type":"integer","minimum":1,"maximum":500}},{"name":"offset","in":"query","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"order","in":"query","schema":{"default":"desc","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"entity_type":{"type":"string","enum":["target"]},"adgroup":{"nullable":true,"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"first_bid":{"nullable":true,"type":"string"},"last_bid":{"type":"string"},"net_change":{"nullable":true,"type":"string"},"direction":{"nullable":true,"type":"string","enum":["raised","lowered","unchanged"]},"change_count":{"type":"number"},"first_change_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"last_change_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"last_reason":{"nullable":true,"type":"string"},"last_scenario":{"nullable":true,"type":"string"}},"required":["id","entity_type","adgroup","first_bid","last_bid","net_change","direction","change_count","first_change_at","last_change_at","last_reason","last_scenario"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"},"other_changes":{"type":"array","items":{"type":"object","properties":{"entity_type":{"type":"string","enum":["target","searchTerm","campaign"]},"entity_id":{"nullable":true,"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"change_type":{"type":"string"},"count":{"type":"number"},"last_change_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"last_reason":{"nullable":true,"type":"string"}},"required":["entity_type","entity_id","change_type","count","last_change_at","last_reason"],"additionalProperties":false}},"summary":{"type":"object","properties":{"targets_touched":{"type":"number"},"bid_changes":{"type":"number"},"raised":{"type":"number"},"lowered":{"type":"number"},"unchanged":{"type":"number"},"other_changes":{"type":"number"},"window":{"type":"object","properties":{"start_date":{"type":"string"},"end_date":{"type":"string"}},"required":["start_date","end_date"],"additionalProperties":false}},"required":["targets_touched","bid_changes","raised","lowered","unchanged","other_changes","window"],"additionalProperties":false}},"required":["object","data","has_more","other_changes","summary"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/campaign-metrics":{"get":{"description":"Aggregated from the report history over a required `start_date`/`end_date` window. Unlike the rest of the API, this resource paginates with `limit`/`offset` (an aggregated row has no id to use as a cursor) and `has_more` tells whether another page follows. Monetary amounts are decimal strings; ratios are fractions (0.1642 = 16.42%) and are `null`, never `0`, when their denominator is zero.","summary":"Advertising performance per campaign, from the account's report history","tags":["campaign-metrics"],"parameters":[{"name":"start_date","in":"query","description":"Both ends are included in the range. The window is capped, and the cap depends on the resource AND on `granularity` — `daily` allows a much shorter span than `total`, and `target-metrics` and `search-term-metrics` are stricter than the rest because `limit`/`offset` bound the response but not what ClickHouse scans. Going over returns a `400` naming the exact limit for your request.","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-07-01"}},{"name":"end_date","in":"query","description":"Both ends are included in the range. The window is capped, and the cap depends on the resource AND on `granularity` — `daily` allows a much shorter span than `total`, and `target-metrics` and `search-term-metrics` are stricter than the rest because `limit`/`offset` bound the response but not what ClickHouse scans. Going over returns a `400` naming the exact limit for your request.","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-07-31"}},{"name":"granularity","in":"query","schema":{"default":"total","example":"total","type":"string","enum":["total","daily"]}},{"name":"limit","in":"query","description":"Page size. For a top-N, combine `order_by` with a small `limit` instead of raising it: `limit`/`offset` bound the response, not what ClickHouse scans.","schema":{"default":100,"example":100,"type":"integer","minimum":1,"maximum":1000}},{"name":"offset","in":"query","schema":{"default":0,"example":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"order","in":"query","schema":{"default":"desc","example":"desc","type":"string","enum":["asc","desc"]}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"connection","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"country","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"campaign","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"ad_product","in":"query","schema":{"type":"string","enum":["SP","SB","SD"]}},{"name":"order_by","in":"query","schema":{"type":"string","enum":["cost","sales","impressions","clicks","orders","units","acos","roas","ctr","cpc","conversion_rate"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["campaign_metrics"]},"campaign":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"connection":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"country":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"ad_product":{"type":"string","enum":["SP","SB","SD"]},"currency":{"type":"string"},"date":{"type":"string"},"impressions":{"type":"number"},"clicks":{"type":"number"},"cost":{"type":"string"},"sales":{"type":"string"},"orders":{"type":"number"},"units":{"type":"number"},"ctr":{"nullable":true,"type":"number"},"cpc":{"nullable":true,"type":"string"},"acos":{"nullable":true,"type":"number"},"roas":{"nullable":true,"type":"number"},"conversion_rate":{"nullable":true,"type":"number"},"top_of_search_is":{"nullable":true,"type":"number"},"new_to_brand_sales":{"nullable":true,"type":"string"},"new_to_brand_purchases":{"nullable":true,"type":"number"},"detail_page_views":{"nullable":true,"type":"number"},"viewable_impressions":{"nullable":true,"type":"number"}},"required":["object","campaign","connection","country","ad_product","currency","impressions","clicks","cost","sales","orders","units","ctr","cpc","acos","roas","conversion_rate","top_of_search_is","new_to_brand_sales","new_to_brand_purchases","detail_page_views","viewable_impressions"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"503","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/adgroups":{"get":{"summary":"List the authenticated account's ad groups","tags":["adgroups"],"parameters":[{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true},{"name":"search","in":"query","description":"Case-insensitive substring match over the ad group name. Use it to find a record by name when you do not have its id, instead of paging through the whole list. Regex metacharacters are matched literally.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"connection","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"country","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"campaign","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"state","in":"query","schema":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"adGroupId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"campaign":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"campaignId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"startDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"budget":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"nullable":true,"type":"string"},"period":{"type":"string","enum":["DAILY","LIFETIME","OTHER"]}},"required":["amount","currency","period"],"additionalProperties":false},"bidStrategy":{"nullable":true,"type":"string","enum":["MANUAL","LEGACY_FOR_SALES","AUTO_FOR_SALES","NEW_TO_BRAND","RULE_BASED"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","campaignId","name","state","connection","country","startDate","endDate","deliveryStatus","deliveryReasons","budget","bidStrategy","createdAt","updatedAt"],"additionalProperties":false}]},"adGroupTargetType":{"nullable":true,"type":"string","enum":["product","keyword","auto"]},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","adGroupId","name","state","connection","country","campaign","adGroupTargetType","deliveryStatus","deliveryReasons","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/adgroups/{id}":{"get":{"tags":["adgroups"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"adGroupId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"campaign":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"campaignId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"startDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"budget":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"nullable":true,"type":"string"},"period":{"type":"string","enum":["DAILY","LIFETIME","OTHER"]}},"required":["amount","currency","period"],"additionalProperties":false},"bidStrategy":{"nullable":true,"type":"string","enum":["MANUAL","LEGACY_FOR_SALES","AUTO_FOR_SALES","NEW_TO_BRAND","RULE_BASED"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","campaignId","name","state","connection","country","startDate","endDate","deliveryStatus","deliveryReasons","budget","bidStrategy","createdAt","updatedAt"],"additionalProperties":false}]},"adGroupTargetType":{"nullable":true,"type":"string","enum":["product","keyword","auto"]},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","adGroupId","name","state","connection","country","campaign","adGroupTargetType","deliveryStatus","deliveryReasons","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/adgroup-metrics":{"get":{"description":"Aggregated from the report history over a required `start_date`/`end_date` window. Like the rest of the metrics resources it paginates with `limit`/`offset` (an aggregated row has no id to use as a cursor) and `has_more` tells whether another page follows. Monetary amounts are decimal strings; ratios are fractions (0.1642 = 16.42%) and are `null`, never `0`, when their denominator is zero.","summary":"Advertising performance per ad group, from the account's report history","tags":["adgroup-metrics"],"parameters":[{"name":"start_date","in":"query","description":"Both ends are included in the range. The window is capped, and the cap depends on the resource AND on `granularity` — `daily` allows a much shorter span than `total`, and `target-metrics` and `search-term-metrics` are stricter than the rest because `limit`/`offset` bound the response but not what ClickHouse scans. Going over returns a `400` naming the exact limit for your request.","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-07-01"}},{"name":"end_date","in":"query","description":"Both ends are included in the range. The window is capped, and the cap depends on the resource AND on `granularity` — `daily` allows a much shorter span than `total`, and `target-metrics` and `search-term-metrics` are stricter than the rest because `limit`/`offset` bound the response but not what ClickHouse scans. Going over returns a `400` naming the exact limit for your request.","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-07-31"}},{"name":"granularity","in":"query","schema":{"default":"total","example":"total","type":"string","enum":["total","daily"]}},{"name":"limit","in":"query","description":"Page size. For a top-N, combine `order_by` with a small `limit` instead of raising it: `limit`/`offset` bound the response, not what ClickHouse scans.","schema":{"default":100,"example":100,"type":"integer","minimum":1,"maximum":1000}},{"name":"offset","in":"query","schema":{"default":0,"example":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"order","in":"query","schema":{"default":"desc","example":"desc","type":"string","enum":["asc","desc"]}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"connection","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"country","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"campaign","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"ad_group","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"ad_product","in":"query","schema":{"type":"string","enum":["SP","SB","SD"]}},{"name":"order_by","in":"query","schema":{"type":"string","enum":["cost","sales","impressions","clicks","orders","units","acos","roas","ctr","cpc","conversion_rate"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["adgroup_metrics"]},"ad_group":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"campaign":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"ad_product":{"type":"string","enum":["SP","SB","SD"]},"connection":{"type":"string","pattern":"^[a-f0-9]{24}$"},"country":{"type":"string","pattern":"^[a-f0-9]{24}$"},"currency":{"type":"string"},"date":{"type":"string"},"impressions":{"type":"number"},"clicks":{"type":"number"},"cost":{"type":"string"},"sales":{"type":"string"},"orders":{"type":"number"},"units":{"type":"number"},"ctr":{"nullable":true,"type":"number"},"cpc":{"nullable":true,"type":"string"},"acos":{"nullable":true,"type":"number"},"roas":{"nullable":true,"type":"number"},"conversion_rate":{"nullable":true,"type":"number"},"new_to_brand_sales":{"nullable":true,"type":"string"},"new_to_brand_purchases":{"nullable":true,"type":"number"},"detail_page_views":{"nullable":true,"type":"number"},"viewable_impressions":{"nullable":true,"type":"number"}},"required":["object","ad_group","campaign","ad_product","connection","country","currency","impressions","clicks","cost","sales","orders","units","ctr","cpc","acos","roas","conversion_rate","new_to_brand_sales","new_to_brand_purchases","detail_page_views","viewable_impressions"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"503","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/targets":{"get":{"summary":"List the authenticated account's advertising targets","tags":["targets"],"parameters":[{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true},{"name":"search","in":"query","description":"Case-insensitive substring match over the target's expression (keyword, ASIN or category, chosen by `targetType`) and its `matchType`; with `targetType` set, only that type's field is searched. Use it to find a record by name when you do not have its id, instead of paging through the whole list. Regex metacharacters are matched literally.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"connection","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"country","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"campaign","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"adGroup","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"state","in":"query","schema":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]}},{"name":"targetType","in":"query","schema":{"type":"string","enum":["AUTO","KEYWORD","PRODUCT_CATEGORY","PRODUCT","PRODUCT_CATEGORY_AUDIENCE","PRODUCT_AUDIENCE","AUDIENCE","THEME"]}},{"name":"negative","in":"query","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"targetId":{"nullable":true,"type":"string"},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"campaign":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"campaignId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"startDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"budget":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"nullable":true,"type":"string"},"period":{"type":"string","enum":["DAILY","LIFETIME","OTHER"]}},"required":["amount","currency","period"],"additionalProperties":false},"bidStrategy":{"nullable":true,"type":"string","enum":["MANUAL","LEGACY_FOR_SALES","AUTO_FOR_SALES","NEW_TO_BRAND","RULE_BASED"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","campaignId","name","state","connection","country","startDate","endDate","deliveryStatus","deliveryReasons","budget","bidStrategy","createdAt","updatedAt"],"additionalProperties":false}]},"adGroup":{"nullable":true,"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"adGroupId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"campaign":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"campaignId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"startDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"budget":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"nullable":true,"type":"string"},"period":{"type":"string","enum":["DAILY","LIFETIME","OTHER"]}},"required":["amount","currency","period"],"additionalProperties":false},"bidStrategy":{"nullable":true,"type":"string","enum":["MANUAL","LEGACY_FOR_SALES","AUTO_FOR_SALES","NEW_TO_BRAND","RULE_BASED"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","campaignId","name","state","connection","country","startDate","endDate","deliveryStatus","deliveryReasons","budget","bidStrategy","createdAt","updatedAt"],"additionalProperties":false}]},"adGroupTargetType":{"nullable":true,"type":"string","enum":["product","keyword","auto"]},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","adGroupId","name","state","connection","country","campaign","adGroupTargetType","deliveryStatus","deliveryReasons","createdAt","updatedAt"],"additionalProperties":false}]},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"negative":{"type":"boolean"},"bid":{"nullable":true,"type":"number"},"targetType":{"type":"string","enum":["AUTO","KEYWORD","PRODUCT_CATEGORY","PRODUCT","PRODUCT_CATEGORY_AUDIENCE","PRODUCT_AUDIENCE","AUDIENCE","THEME"]},"targetLevel":{"nullable":true,"type":"string","enum":["CAMPAIGN","AD_GROUP"]},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","targetId","connection","country","campaign","adGroup","state","negative","bid","targetType","targetLevel","deliveryStatus","deliveryReasons","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/targets/{id}":{"get":{"tags":["targets"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"targetId":{"nullable":true,"type":"string"},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"campaign":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"campaignId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"startDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"budget":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"nullable":true,"type":"string"},"period":{"type":"string","enum":["DAILY","LIFETIME","OTHER"]}},"required":["amount","currency","period"],"additionalProperties":false},"bidStrategy":{"nullable":true,"type":"string","enum":["MANUAL","LEGACY_FOR_SALES","AUTO_FOR_SALES","NEW_TO_BRAND","RULE_BASED"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","campaignId","name","state","connection","country","startDate","endDate","deliveryStatus","deliveryReasons","budget","bidStrategy","createdAt","updatedAt"],"additionalProperties":false}]},"adGroup":{"nullable":true,"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"adGroupId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"campaign":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"campaignId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"startDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"budget":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"nullable":true,"type":"string"},"period":{"type":"string","enum":["DAILY","LIFETIME","OTHER"]}},"required":["amount","currency","period"],"additionalProperties":false},"bidStrategy":{"nullable":true,"type":"string","enum":["MANUAL","LEGACY_FOR_SALES","AUTO_FOR_SALES","NEW_TO_BRAND","RULE_BASED"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","campaignId","name","state","connection","country","startDate","endDate","deliveryStatus","deliveryReasons","budget","bidStrategy","createdAt","updatedAt"],"additionalProperties":false}]},"adGroupTargetType":{"nullable":true,"type":"string","enum":["product","keyword","auto"]},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","adGroupId","name","state","connection","country","campaign","adGroupTargetType","deliveryStatus","deliveryReasons","createdAt","updatedAt"],"additionalProperties":false}]},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"negative":{"type":"boolean"},"bid":{"nullable":true,"type":"number"},"targetType":{"type":"string","enum":["AUTO","KEYWORD","PRODUCT_CATEGORY","PRODUCT","PRODUCT_CATEGORY_AUDIENCE","PRODUCT_AUDIENCE","AUDIENCE","THEME"]},"targetLevel":{"nullable":true,"type":"string","enum":["CAMPAIGN","AD_GROUP"]},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","targetId","connection","country","campaign","adGroup","state","negative","bid","targetType","targetLevel","deliveryStatus","deliveryReasons","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/target-metrics":{"get":{"description":"Aggregated from the report history over a required `start_date`/`end_date` window, with the target type and keyword resolved from the catalog. This is one of the two heaviest resources, so its window is capped shorter: 93 days for `granularity=total` and 31 for `daily`. Paginates with `limit`/`offset` and `has_more` tells whether another page follows. Monetary amounts are decimal strings; ratios are fractions (0.1642 = 16.42%) and are `null`, never `0`, when their denominator is zero.","summary":"Advertising performance per target, from the account's report history","tags":["target-metrics"],"parameters":[{"name":"start_date","in":"query","description":"Both ends are included in the range. The window is capped, and the cap depends on the resource AND on `granularity` — `daily` allows a much shorter span than `total`, and `target-metrics` and `search-term-metrics` are stricter than the rest because `limit`/`offset` bound the response but not what ClickHouse scans. Going over returns a `400` naming the exact limit for your request.","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-07-01"}},{"name":"end_date","in":"query","description":"Both ends are included in the range. The window is capped, and the cap depends on the resource AND on `granularity` — `daily` allows a much shorter span than `total`, and `target-metrics` and `search-term-metrics` are stricter than the rest because `limit`/`offset` bound the response but not what ClickHouse scans. Going over returns a `400` naming the exact limit for your request.","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-07-31"}},{"name":"granularity","in":"query","schema":{"default":"total","example":"total","type":"string","enum":["total","daily"]}},{"name":"limit","in":"query","description":"Page size. For a top-N, combine `order_by` with a small `limit` instead of raising it: `limit`/`offset` bound the response, not what ClickHouse scans.","schema":{"default":100,"example":100,"type":"integer","minimum":1,"maximum":1000}},{"name":"offset","in":"query","schema":{"default":0,"example":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"order","in":"query","schema":{"default":"desc","example":"desc","type":"string","enum":["asc","desc"]}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"connection","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"country","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"campaign","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"ad_group","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"target","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"ad_product","in":"query","schema":{"type":"string","enum":["SP","SB","SD"]}},{"name":"order_by","in":"query","schema":{"type":"string","enum":["cost","sales","impressions","clicks","orders","units","acos","roas","ctr","cpc","conversion_rate"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["target_metrics"]},"target":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"target_type":{"nullable":true,"type":"string"},"match_type":{"nullable":true,"type":"string"},"target_expression":{"nullable":true,"type":"string"},"campaign":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"ad_group":{"nullable":true,"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"ad_product":{"type":"string","enum":["SP","SB","SD"]},"connection":{"type":"string","pattern":"^[a-f0-9]{24}$"},"country":{"type":"string","pattern":"^[a-f0-9]{24}$"},"currency":{"type":"string"},"date":{"type":"string"},"impressions":{"type":"number"},"clicks":{"type":"number"},"cost":{"type":"string"},"sales":{"type":"string"},"orders":{"type":"number"},"units":{"type":"number"},"ctr":{"nullable":true,"type":"number"},"cpc":{"nullable":true,"type":"string"},"acos":{"nullable":true,"type":"number"},"roas":{"nullable":true,"type":"number"},"conversion_rate":{"nullable":true,"type":"number"},"new_to_brand_sales":{"nullable":true,"type":"string"},"new_to_brand_purchases":{"nullable":true,"type":"number"},"detail_page_views":{"nullable":true,"type":"number"},"viewable_impressions":{"nullable":true,"type":"number"}},"required":["object","target","target_type","match_type","target_expression","campaign","ad_group","ad_product","connection","country","currency","impressions","clicks","cost","sales","orders","units","ctr","cpc","acos","roas","conversion_rate","new_to_brand_sales","new_to_brand_purchases","detail_page_views","viewable_impressions"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"503","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/product-ads":{"get":{"summary":"List the authenticated account's advertising product ads","tags":["product-ads"],"parameters":[{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true},{"name":"search","in":"query","description":"Case-insensitive substring match over the advertised ASIN and SKU. Use it to find a record by name when you do not have its id, instead of paging through the whole list. Regex metacharacters are matched literally.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"connection","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"country","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"campaign","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"adGroup","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"product","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"asin","in":"query","schema":{"type":"string"}},{"name":"state","in":"query","schema":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"adId":{"nullable":true,"type":"string"},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"campaign":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"campaignId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"startDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"budget":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"nullable":true,"type":"string"},"period":{"type":"string","enum":["DAILY","LIFETIME","OTHER"]}},"required":["amount","currency","period"],"additionalProperties":false},"bidStrategy":{"nullable":true,"type":"string","enum":["MANUAL","LEGACY_FOR_SALES","AUTO_FOR_SALES","NEW_TO_BRAND","RULE_BASED"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","campaignId","name","state","connection","country","startDate","endDate","deliveryStatus","deliveryReasons","budget","bidStrategy","createdAt","updatedAt"],"additionalProperties":false}]},"adGroup":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"adGroupId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"campaign":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"campaignId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"startDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"budget":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"nullable":true,"type":"string"},"period":{"type":"string","enum":["DAILY","LIFETIME","OTHER"]}},"required":["amount","currency","period"],"additionalProperties":false},"bidStrategy":{"nullable":true,"type":"string","enum":["MANUAL","LEGACY_FOR_SALES","AUTO_FOR_SALES","NEW_TO_BRAND","RULE_BASED"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","campaignId","name","state","connection","country","startDate","endDate","deliveryStatus","deliveryReasons","budget","bidStrategy","createdAt","updatedAt"],"additionalProperties":false}]},"adGroupTargetType":{"nullable":true,"type":"string","enum":["product","keyword","auto"]},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","adGroupId","name","state","connection","country","campaign","adGroupTargetType","deliveryStatus","deliveryReasons","createdAt","updatedAt"],"additionalProperties":false}]},"product":{"nullable":true,"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"asin":{"type":"string"},"sku":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"ean":{"nullable":true,"type":"string"},"upc":{"nullable":true,"type":"string"},"gtin":{"nullable":true,"type":"string"},"platform":{"type":"string","enum":["amazon"]},"type":{"type":"string","enum":["seller","vendor","adv"]},"active":{"type":"boolean"},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"brand":{"nullable":true,"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","asin","sku","title","ean","upc","gtin","platform","type","active","connection","country","createdAt","updatedAt"],"additionalProperties":false}]},"asin":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"adType":{"type":"string","enum":["PRODUCT_AD","IMAGE","VIDEO","PRODUCT_COLLECTION","STORE_SPOTLIGHT","BRAND_VIDEO"]},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","adId","connection","country","campaign","adGroup","product","asin","sku","state","adType","deliveryStatus","deliveryReasons","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/product-ads/{id}":{"get":{"tags":["product-ads"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"adId":{"nullable":true,"type":"string"},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"campaign":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"campaignId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"startDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"budget":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"nullable":true,"type":"string"},"period":{"type":"string","enum":["DAILY","LIFETIME","OTHER"]}},"required":["amount","currency","period"],"additionalProperties":false},"bidStrategy":{"nullable":true,"type":"string","enum":["MANUAL","LEGACY_FOR_SALES","AUTO_FOR_SALES","NEW_TO_BRAND","RULE_BASED"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","campaignId","name","state","connection","country","startDate","endDate","deliveryStatus","deliveryReasons","budget","bidStrategy","createdAt","updatedAt"],"additionalProperties":false}]},"adGroup":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"adGroupId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"campaign":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"campaignId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"startDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"budget":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"nullable":true,"type":"string"},"period":{"type":"string","enum":["DAILY","LIFETIME","OTHER"]}},"required":["amount","currency","period"],"additionalProperties":false},"bidStrategy":{"nullable":true,"type":"string","enum":["MANUAL","LEGACY_FOR_SALES","AUTO_FOR_SALES","NEW_TO_BRAND","RULE_BASED"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","campaignId","name","state","connection","country","startDate","endDate","deliveryStatus","deliveryReasons","budget","bidStrategy","createdAt","updatedAt"],"additionalProperties":false}]},"adGroupTargetType":{"nullable":true,"type":"string","enum":["product","keyword","auto"]},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","adGroupId","name","state","connection","country","campaign","adGroupTargetType","deliveryStatus","deliveryReasons","createdAt","updatedAt"],"additionalProperties":false}]},"product":{"nullable":true,"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"asin":{"type":"string"},"sku":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"ean":{"nullable":true,"type":"string"},"upc":{"nullable":true,"type":"string"},"gtin":{"nullable":true,"type":"string"},"platform":{"type":"string","enum":["amazon"]},"type":{"type":"string","enum":["seller","vendor","adv"]},"active":{"type":"boolean"},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"brand":{"nullable":true,"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","asin","sku","title","ean","upc","gtin","platform","type","active","connection","country","createdAt","updatedAt"],"additionalProperties":false}]},"asin":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"adType":{"type":"string","enum":["PRODUCT_AD","IMAGE","VIDEO","PRODUCT_COLLECTION","STORE_SPOTLIGHT","BRAND_VIDEO"]},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","adId","connection","country","campaign","adGroup","product","asin","sku","state","adType","deliveryStatus","deliveryReasons","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/product-ad-metrics":{"get":{"description":"Aggregated from the report history over a required `start_date`/`end_date` window. Only Sponsored Products and Sponsored Display have product ads; Sponsored Brands does not, so `ad_product` accepts SP and SD only. Paginates with `limit`/`offset` and `has_more` tells whether another page follows. Monetary amounts are decimal strings; ratios are fractions (0.1642 = 16.42%) and are `null`, never `0`, when their denominator is zero.","summary":"Advertising performance per product ad, from the account's report history","tags":["product-ad-metrics"],"parameters":[{"name":"start_date","in":"query","description":"Both ends are included in the range. The window is capped, and the cap depends on the resource AND on `granularity` — `daily` allows a much shorter span than `total`, and `target-metrics` and `search-term-metrics` are stricter than the rest because `limit`/`offset` bound the response but not what ClickHouse scans. Going over returns a `400` naming the exact limit for your request.","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-07-01"}},{"name":"end_date","in":"query","description":"Both ends are included in the range. The window is capped, and the cap depends on the resource AND on `granularity` — `daily` allows a much shorter span than `total`, and `target-metrics` and `search-term-metrics` are stricter than the rest because `limit`/`offset` bound the response but not what ClickHouse scans. Going over returns a `400` naming the exact limit for your request.","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-07-31"}},{"name":"granularity","in":"query","schema":{"default":"total","example":"total","type":"string","enum":["total","daily"]}},{"name":"limit","in":"query","description":"Page size. For a top-N, combine `order_by` with a small `limit` instead of raising it: `limit`/`offset` bound the response, not what ClickHouse scans.","schema":{"default":100,"example":100,"type":"integer","minimum":1,"maximum":1000}},{"name":"offset","in":"query","schema":{"default":0,"example":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"order","in":"query","schema":{"default":"desc","example":"desc","type":"string","enum":["asc","desc"]}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"connection","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"country","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"campaign","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"ad_group","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"product_ad","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"asin","in":"query","schema":{"type":"string"}},{"name":"ad_product","in":"query","schema":{"type":"string","enum":["SP","SD"]}},{"name":"order_by","in":"query","schema":{"type":"string","enum":["cost","sales","impressions","clicks","orders","units","acos","roas","ctr","cpc","conversion_rate"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["product_ad_metrics"]},"product_ad":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"product":{"nullable":true,"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"asin":{"nullable":true,"type":"string"},"campaign":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"ad_group":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"ad_product":{"type":"string","enum":["SP","SD"]},"connection":{"type":"string","pattern":"^[a-f0-9]{24}$"},"country":{"type":"string","pattern":"^[a-f0-9]{24}$"},"currency":{"type":"string"},"date":{"type":"string"},"impressions":{"type":"number"},"clicks":{"type":"number"},"cost":{"type":"string"},"sales":{"type":"string"},"orders":{"type":"number"},"units":{"type":"number"},"ctr":{"nullable":true,"type":"number"},"cpc":{"nullable":true,"type":"string"},"acos":{"nullable":true,"type":"number"},"roas":{"nullable":true,"type":"number"},"conversion_rate":{"nullable":true,"type":"number"},"new_to_brand_sales":{"nullable":true,"type":"string"},"new_to_brand_purchases":{"nullable":true,"type":"number"},"detail_page_views":{"nullable":true,"type":"number"},"viewable_impressions":{"nullable":true,"type":"number"}},"required":["object","product_ad","product","asin","campaign","ad_group","ad_product","connection","country","currency","impressions","clicks","cost","sales","orders","units","ctr","cpc","acos","roas","conversion_rate","new_to_brand_sales","new_to_brand_purchases","detail_page_views","viewable_impressions"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"503","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/search-terms":{"get":{"summary":"List the authenticated account's advertising search terms","tags":["search-terms"],"parameters":[{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true},{"name":"search","in":"query","description":"Case-insensitive substring match over the shopper search term text. Use it to find a record by name when you do not have its id, instead of paging through the whole list. Regex metacharacters are matched literally.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"connection","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"country","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"campaign","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"adGroup","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"searchTerm","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"campaign":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"campaignId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"startDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"budget":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"nullable":true,"type":"string"},"period":{"type":"string","enum":["DAILY","LIFETIME","OTHER"]}},"required":["amount","currency","period"],"additionalProperties":false},"bidStrategy":{"nullable":true,"type":"string","enum":["MANUAL","LEGACY_FOR_SALES","AUTO_FOR_SALES","NEW_TO_BRAND","RULE_BASED"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","campaignId","name","state","connection","country","startDate","endDate","deliveryStatus","deliveryReasons","budget","bidStrategy","createdAt","updatedAt"],"additionalProperties":false}]},"adGroup":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"adGroupId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"campaign":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"campaignId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"startDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"budget":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"nullable":true,"type":"string"},"period":{"type":"string","enum":["DAILY","LIFETIME","OTHER"]}},"required":["amount","currency","period"],"additionalProperties":false},"bidStrategy":{"nullable":true,"type":"string","enum":["MANUAL","LEGACY_FOR_SALES","AUTO_FOR_SALES","NEW_TO_BRAND","RULE_BASED"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","campaignId","name","state","connection","country","startDate","endDate","deliveryStatus","deliveryReasons","budget","bidStrategy","createdAt","updatedAt"],"additionalProperties":false}]},"adGroupTargetType":{"nullable":true,"type":"string","enum":["product","keyword","auto"]},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","adGroupId","name","state","connection","country","campaign","adGroupTargetType","deliveryStatus","deliveryReasons","createdAt","updatedAt"],"additionalProperties":false}]},"searchTerm":{"type":"string"},"searchTermTargetType":{"nullable":true,"type":"string","enum":["AUTO","KEYWORD","PRODUCT_CATEGORY","PRODUCT","PRODUCT_CATEGORY_AUDIENCE","PRODUCT_AUDIENCE","AUDIENCE","THEME"]},"targetSourceMatchType":{"type":"string"},"lastReportDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","connection","country","campaign","adGroup","searchTerm","searchTermTargetType","targetSourceMatchType","lastReportDate","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/search-terms/{id}":{"get":{"tags":["search-terms"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"campaign":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"campaignId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"startDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"budget":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"nullable":true,"type":"string"},"period":{"type":"string","enum":["DAILY","LIFETIME","OTHER"]}},"required":["amount","currency","period"],"additionalProperties":false},"bidStrategy":{"nullable":true,"type":"string","enum":["MANUAL","LEGACY_FOR_SALES","AUTO_FOR_SALES","NEW_TO_BRAND","RULE_BASED"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","campaignId","name","state","connection","country","startDate","endDate","deliveryStatus","deliveryReasons","budget","bidStrategy","createdAt","updatedAt"],"additionalProperties":false}]},"adGroup":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"adGroupId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"campaign":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"adProduct":{"type":"string","enum":["SPONSORED_PRODUCTS","SPONSORED_BRANDS","SPONSORED_DISPLAY"]},"campaignId":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"type":"string","enum":["ENABLED","PAUSED","ARCHIVED","OTHER"]},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"startDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"endDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"budget":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"nullable":true,"type":"string"},"period":{"type":"string","enum":["DAILY","LIFETIME","OTHER"]}},"required":["amount","currency","period"],"additionalProperties":false},"bidStrategy":{"nullable":true,"type":"string","enum":["MANUAL","LEGACY_FOR_SALES","AUTO_FOR_SALES","NEW_TO_BRAND","RULE_BASED"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","campaignId","name","state","connection","country","startDate","endDate","deliveryStatus","deliveryReasons","budget","bidStrategy","createdAt","updatedAt"],"additionalProperties":false}]},"adGroupTargetType":{"nullable":true,"type":"string","enum":["product","keyword","auto"]},"deliveryStatus":{"nullable":true,"type":"string","enum":["DELIVERING","NOT_DELIVERING","UNAVAILABLE"]},"deliveryReasons":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","adGroupId","name","state","connection","country","campaign","adGroupTargetType","deliveryStatus","deliveryReasons","createdAt","updatedAt"],"additionalProperties":false}]},"searchTerm":{"type":"string"},"searchTermTargetType":{"nullable":true,"type":"string","enum":["AUTO","KEYWORD","PRODUCT_CATEGORY","PRODUCT","PRODUCT_CATEGORY_AUDIENCE","PRODUCT_AUDIENCE","AUDIENCE","THEME"]},"targetSourceMatchType":{"type":"string"},"lastReportDate":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","adProduct","connection","country","campaign","adGroup","searchTerm","searchTermTargetType","targetSourceMatchType","lastReportDate","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/skills":{"get":{"summary":"List available marketing skills","tags":["skills"],"parameters":[{"name":"search","in":"query","description":"Case-insensitive substring match over the skill name and description. Use it to find a record by name when you do not have its id, instead of paging through the whole list. Regex metacharacters are matched literally.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"integration","in":"query","schema":{"type":"string"}},{"name":"division","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"division":{"type":"string"},"integrations":{"type":"array","items":{"type":"string"}},"blocks":{"type":"array","items":{"type":"string","enum":["advisor","assisted","autonomous"]}},"references":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","division","integrations","blocks","references"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/skills/{id}":{"get":{"summary":"Get one skill, or one of its reference documents","tags":["skills"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"reference","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"division":{"type":"string"},"integrations":{"type":"array","items":{"type":"string"}},"blocks":{"type":"array","items":{"type":"string","enum":["advisor","assisted","autonomous"]}},"references":{"type":"array","items":{"type":"string"}},"content":{"type":"string"},"reference":{"type":"string"}},"required":["id","name","description","division","integrations","blocks","references","content"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/search-term-metrics":{"get":{"description":"Aggregated from the report history over a required `start_date`/`end_date` window, with the shopper query resolved from the catalog into `query`. Answers \"which searches do I spend most on?\" — use `order_by=cost` with `limit` instead of paging. This is the heaviest resource in the API, so its window is capped shorter: 93 days for `granularity=total` and 31 for `daily`. Rows are grouped per search term AND target, because the same text can be matched by different targets. Only Sponsored Products and Sponsored Brands produce search terms, so `ad_product` accepts SP and SB only. Monetary amounts are decimal strings; ratios are fractions (0.1642 = 16.42%) and are `null`, never `0`, when their denominator is zero.","summary":"Advertising performance per shopper search term, from the account's report history","tags":["search-term-metrics"],"parameters":[{"name":"start_date","in":"query","description":"Both ends are included in the range. The window is capped, and the cap depends on the resource AND on `granularity` — `daily` allows a much shorter span than `total`, and `target-metrics` and `search-term-metrics` are stricter than the rest because `limit`/`offset` bound the response but not what ClickHouse scans. Going over returns a `400` naming the exact limit for your request.","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-07-01"}},{"name":"end_date","in":"query","description":"Both ends are included in the range. The window is capped, and the cap depends on the resource AND on `granularity` — `daily` allows a much shorter span than `total`, and `target-metrics` and `search-term-metrics` are stricter than the rest because `limit`/`offset` bound the response but not what ClickHouse scans. Going over returns a `400` naming the exact limit for your request.","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-07-31"}},{"name":"granularity","in":"query","schema":{"default":"total","example":"total","type":"string","enum":["total","daily"]}},{"name":"limit","in":"query","description":"Page size. For a top-N, combine `order_by` with a small `limit` instead of raising it: `limit`/`offset` bound the response, not what ClickHouse scans.","schema":{"default":100,"example":100,"type":"integer","minimum":1,"maximum":1000}},{"name":"offset","in":"query","schema":{"default":0,"example":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"order","in":"query","schema":{"default":"desc","example":"desc","type":"string","enum":["asc","desc"]}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"connection","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"country","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"campaign","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"ad_group","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"target","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"search_term","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"ad_product","in":"query","schema":{"type":"string","enum":["SP","SB"]}},{"name":"order_by","in":"query","schema":{"type":"string","enum":["cost","sales","impressions","clicks","orders","units","acos","roas","ctr","cpc","conversion_rate"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["search_term_metrics"]},"search_term":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"query":{"nullable":true,"type":"string"},"target":{"nullable":true,"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"campaign":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"ad_group":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"ad_product":{"type":"string","enum":["SP","SB"]},"connection":{"type":"string","pattern":"^[a-f0-9]{24}$"},"country":{"type":"string","pattern":"^[a-f0-9]{24}$"},"currency":{"type":"string"},"date":{"type":"string"},"impressions":{"type":"number"},"clicks":{"type":"number"},"cost":{"type":"string"},"sales":{"type":"string"},"orders":{"type":"number"},"units":{"type":"number"},"ctr":{"nullable":true,"type":"number"},"cpc":{"nullable":true,"type":"string"},"acos":{"nullable":true,"type":"number"},"roas":{"nullable":true,"type":"number"},"conversion_rate":{"nullable":true,"type":"number"}},"required":["object","search_term","query","target","campaign","ad_group","ad_product","connection","country","currency","impressions","clicks","cost","sales","orders","units","ctr","cpc","acos","roas","conversion_rate"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"503","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/clusters":{"get":{"summary":"List the authenticated account's keyword clusters","tags":["clusters"],"parameters":[{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true},{"name":"search","in":"query","description":"Case-insensitive substring match over the cluster name and its positive and negative keywords. Use it to find a record by name when you do not have its id, instead of paging through the whole list. Regex metacharacters are matched literally.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"},"notes":{"nullable":true,"type":"string"},"positiveKeywords":{"type":"array","items":{"type":"object","properties":{"keywordText":{"type":"string"},"language":{"type":"string"},"epiniumScore":{"nullable":true,"type":"number"},"purpose":{"type":"array","items":{"type":"string","enum":["SEO","PPC"]}}},"required":["keywordText","language","epiniumScore","purpose"],"additionalProperties":false}},"negativeKeywords":{"type":"array","items":{"type":"object","properties":{"keywordText":{"type":"string"},"language":{"type":"string"},"epiniumScore":{"nullable":true,"type":"number"},"purpose":{"type":"array","items":{"type":"string","enum":["SEO","PPC"]}}},"required":["keywordText","language","epiniumScore","purpose"],"additionalProperties":false}},"productCount":{"type":"number"},"products":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"asin":{"type":"string"},"sku":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"ean":{"nullable":true,"type":"string"},"upc":{"nullable":true,"type":"string"},"gtin":{"nullable":true,"type":"string"},"platform":{"type":"string","enum":["amazon"]},"type":{"type":"string","enum":["seller","vendor","adv"]},"active":{"type":"boolean"},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"brand":{"nullable":true,"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","asin","sku","title","ean","upc","gtin","platform","type","active","connection","country","createdAt","updatedAt"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","notes","positiveKeywords","negativeKeywords","productCount","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/clusters/{id}":{"get":{"tags":["clusters"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"},"notes":{"nullable":true,"type":"string"},"positiveKeywords":{"type":"array","items":{"type":"object","properties":{"keywordText":{"type":"string"},"language":{"type":"string"},"epiniumScore":{"nullable":true,"type":"number"},"purpose":{"type":"array","items":{"type":"string","enum":["SEO","PPC"]}}},"required":["keywordText","language","epiniumScore","purpose"],"additionalProperties":false}},"negativeKeywords":{"type":"array","items":{"type":"object","properties":{"keywordText":{"type":"string"},"language":{"type":"string"},"epiniumScore":{"nullable":true,"type":"number"},"purpose":{"type":"array","items":{"type":"string","enum":["SEO","PPC"]}}},"required":["keywordText","language","epiniumScore","purpose"],"additionalProperties":false}},"productCount":{"type":"number"},"products":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"asin":{"type":"string"},"sku":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"ean":{"nullable":true,"type":"string"},"upc":{"nullable":true,"type":"string"},"gtin":{"nullable":true,"type":"string"},"platform":{"type":"string","enum":["amazon"]},"type":{"type":"string","enum":["seller","vendor","adv"]},"active":{"type":"boolean"},"connection":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["seller","vendor","adv-profile"]},"name":{"type":"string"},"active":{"type":"boolean"},"countries":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","type","name","active","countries","createdAt"],"additionalProperties":false}]},"country":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"code":{"type":"string"},"name":{"type":"string"},"marketplaceId":{"type":"string"}},"required":["id","code","name"],"additionalProperties":false}]},"brand":{"nullable":true,"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","asin","sku","title","ean","upc","gtin","platform","type","active","connection","country","createdAt","updatedAt"],"additionalProperties":false}}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","notes","positiveKeywords","negativeKeywords","productCount","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/tasks":{"get":{"summary":"List the authenticated account's tasks","tags":["tasks"],"parameters":[{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true},{"name":"search","in":"query","description":"Case-insensitive substring match over the task title. Use it to find a record by name when you do not have its id, instead of paging through the whole list. Regex metacharacters are matched literally.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","resolved","discarded"]}},{"name":"priority","in":"query","schema":{"type":"string","enum":["high","medium","low"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["pending","resolved","discarded"]},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"origin":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["user","chat","workflow","system"]},"sourceName":{"nullable":true,"type":"string"}},"required":["type","sourceName"],"additionalProperties":false},"entityCounts":{"type":"object","additionalProperties":{"type":"number"}},"itemCount":{"type":"number"},"pendingItemCount":{"type":"number"},"expiresAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"resolution":{"nullable":true,"type":"object","properties":{"action":{"type":"string","enum":["resolved","discarded"]},"resolvedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["action","resolvedAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","title","description","status","priority","origin","entityCounts","itemCount","pendingItemCount","expiresAt","resolution","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/tasks/{id}":{"get":{"tags":["tasks"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["pending","resolved","discarded"]},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"origin":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["user","chat","workflow","system"]},"sourceName":{"nullable":true,"type":"string"}},"required":["type","sourceName"],"additionalProperties":false},"entityCounts":{"type":"object","additionalProperties":{"type":"number"}},"itemCount":{"type":"number"},"pendingItemCount":{"type":"number"},"expiresAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"resolution":{"nullable":true,"type":"object","properties":{"action":{"type":"string","enum":["resolved","discarded"]},"resolvedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["action","resolvedAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","title","description","status","priority","origin","entityCounts","itemCount","pendingItemCount","expiresAt","resolution","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/task-items":{"get":{"summary":"List the authenticated account's task items","tags":["task-items"],"parameters":[{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true},{"name":"search","in":"query","description":"Case-insensitive substring match over the item display name, display id and problem label. Use it to find a record by name when you do not have its id, instead of paging through the whole list. Regex metacharacters are matched literally.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"task","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"entityModel","in":"query","schema":{"type":"string","enum":["products","campaigns","adgroups","targets","search_terms","product_ads"]}},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","approved","rejected"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"task":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["pending","resolved","discarded"]},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"origin":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["user","chat","workflow","system"]},"sourceName":{"nullable":true,"type":"string"}},"required":["type","sourceName"],"additionalProperties":false},"entityCounts":{"type":"object","additionalProperties":{"type":"number"}},"itemCount":{"type":"number"},"pendingItemCount":{"type":"number"},"expiresAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"resolution":{"nullable":true,"type":"object","properties":{"action":{"type":"string","enum":["resolved","discarded"]},"resolvedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["action","resolvedAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","title","description","status","priority","origin","entityCounts","itemCount","pendingItemCount","expiresAt","resolution","createdAt","updatedAt"],"additionalProperties":false}]},"entityId":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"entityModel":{"type":"string","enum":["products","campaigns","adgroups","targets","search_terms","product_ads"]},"displayName":{"nullable":true,"type":"string"},"displayId":{"nullable":true,"type":"string"},"problemLabel":{"nullable":true,"type":"string"},"problemSeverity":{"nullable":true,"type":"string","enum":["error","warning","info"]},"fieldName":{"nullable":true,"type":"string"},"fieldPath":{"nullable":true,"type":"string"},"valueType":{"nullable":true,"type":"string","enum":["string","text","number","boolean","string_array","html"]},"currentValue":{},"suggestedValue":{},"appliedValue":{},"status":{"type":"string","enum":["pending","approved","rejected"]},"appliedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"resolvedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","task","entityId","entityModel","displayName","displayId","problemLabel","problemSeverity","fieldName","fieldPath","valueType","currentValue","suggestedValue","appliedValue","status","appliedAt","resolvedAt","createdAt","updatedAt"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/task-items/{id}":{"get":{"tags":["task-items"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"expand","in":"query","description":"Inline related records instead of returning just their ids. Repeat the param for several (`expand[]=connection&expand[]=country`) and nest with dot notation (`connection.country`), up to 4 levels.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"task":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["pending","resolved","discarded"]},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"origin":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["user","chat","workflow","system"]},"sourceName":{"nullable":true,"type":"string"}},"required":["type","sourceName"],"additionalProperties":false},"entityCounts":{"type":"object","additionalProperties":{"type":"number"}},"itemCount":{"type":"number"},"pendingItemCount":{"type":"number"},"expiresAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"resolution":{"nullable":true,"type":"object","properties":{"action":{"type":"string","enum":["resolved","discarded"]},"resolvedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["action","resolvedAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","title","description","status","priority","origin","entityCounts","itemCount","pendingItemCount","expiresAt","resolution","createdAt","updatedAt"],"additionalProperties":false}]},"entityId":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"entityModel":{"type":"string","enum":["products","campaigns","adgroups","targets","search_terms","product_ads"]},"displayName":{"nullable":true,"type":"string"},"displayId":{"nullable":true,"type":"string"},"problemLabel":{"nullable":true,"type":"string"},"problemSeverity":{"nullable":true,"type":"string","enum":["error","warning","info"]},"fieldName":{"nullable":true,"type":"string"},"fieldPath":{"nullable":true,"type":"string"},"valueType":{"nullable":true,"type":"string","enum":["string","text","number","boolean","string_array","html"]},"currentValue":{},"suggestedValue":{},"appliedValue":{},"status":{"type":"string","enum":["pending","approved","rejected"]},"appliedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"resolvedAt":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","task","entityId","entityModel","displayName","displayId","problemLabel","problemSeverity","fieldName","fieldPath","valueType","currentValue","suggestedValue","appliedValue","status","appliedAt","resolvedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workflows":{"get":{"description":"Filter by `description_key` to tell workflow types apart: `name` and `name_key` are NOT reliable discriminators because several templates share a display name. `template` filters by the global template a workflow was cloned from. Global templates themselves are never listed here — only the account's own workflows.","summary":"List the authenticated account's workflows","tags":["workflows"],"parameters":[{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true},{"name":"search","in":"query","description":"Case-insensitive substring match over the workflow name and description. Use it to find a record by name when you do not have its id, instead of paging through the whole list. Regex metacharacters are matched literally.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"include_total","in":"query","description":"Set to `true` to also receive `total_count`: how many records match every filter of this request, ignoring `starting_after`/`ending_before`/`offset` - the size of the whole result set, not of what is left. `has_more` is always returned regardless. It costs an extra count query, so ask for it once, on the first page, to decide whether the set is worth walking. On metrics resources with `granularity=daily` it counts entity-days, not entities. `total_count` comes back `null` when the count could not finish in time; the list is still returned, so treat it as unknown, never as zero.","schema":{"type":"string","enum":["true","false"]}},{"name":"active","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"template","in":"query","description":"24-character hexadecimal Mongo ObjectId.","schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"description_key","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"},"name_key":{"nullable":true,"type":"string"},"description":{"type":"string"},"description_key":{"nullable":true,"type":"string"},"template_id":{"nullable":true,"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"active":{"type":"boolean"},"dry_run":{"type":"boolean"},"customized_by_user":{"type":"boolean"},"schedule":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["cron","interval","once"]},"cron":{"nullable":true,"type":"string"},"interval_ms":{"nullable":true,"type":"number"},"scheduled_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"timezone":{"type":"string"},"enabled":{"type":"boolean"},"last_run_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"next_run_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["type","cron","interval_ms","scheduled_at","timezone","enabled","last_run_at","next_run_at"],"additionalProperties":false},"node_count":{"type":"number"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","name_key","description","description_key","template_id","active","dry_run","customized_by_user","schedule","node_count","created_at","updated_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"description":"The workflow is created PAUSED, so it does nothing until a human turns it on in the app — this endpoint cannot activate it, with or without a `schedule`. Sending `schedule` only says WHEN it would run once somebody enables it; it never makes it run. The graph must pass validation: on failure you get 422 with the same error list `validate` returns, and nothing is written. Requires the `workflows:write` scope.","summary":"Create a workflow, paused","tags":["workflows"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"nodes":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"label":{"nullable":true,"type":"string"},"data":{"type":"object","additionalProperties":{}},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},"parent_node":{"nullable":true,"type":"string"}},"required":["id","type"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"source":{"type":"string","minLength":1},"target":{"type":"string","minLength":1},"source_handle":{"nullable":true,"type":"string"},"target_handle":{"nullable":true,"type":"string"}},"required":["id","source","target"],"additionalProperties":false}},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["number","boolean","string","select","multiselect","string-list"]},"value":{},"description":{"nullable":true,"type":"string"},"group":{"nullable":true,"type":"string"},"options":{"nullable":true,"type":"array","items":{"type":"string"}},"hidden":{"nullable":true,"type":"boolean"}},"required":["key","type","value"]}},"schedule":{"type":"object","properties":{"type":{"type":"string","enum":["cron","interval","once"]},"cron":{"nullable":true,"type":"string"},"interval_ms":{"nullable":true,"type":"number"},"scheduled_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"timezone":{"nullable":true,"type":"string"}},"required":["type"]}},"required":["name","nodes","edges"],"additionalProperties":false}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"},"name_key":{"nullable":true,"type":"string"},"description":{"type":"string"},"description_key":{"nullable":true,"type":"string"},"template_id":{"nullable":true,"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"active":{"type":"boolean"},"dry_run":{"type":"boolean"},"customized_by_user":{"type":"boolean"},"schedule":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["cron","interval","once"]},"cron":{"nullable":true,"type":"string"},"interval_ms":{"nullable":true,"type":"number"},"scheduled_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"timezone":{"type":"string"},"enabled":{"type":"boolean"},"last_run_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"next_run_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["type","cron","interval_ms","scheduled_at","timezone","enabled","last_run_at","next_run_at"],"additionalProperties":false},"node_count":{"type":"number"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string"},"value":{},"overridden":{"type":"boolean"},"description":{"nullable":true,"type":"string"},"group":{"nullable":true,"type":"string"},"options":{"nullable":true,"type":"array","items":{"type":"string"}},"hidden":{"type":"boolean"}},"required":["key","type","value","overridden","description","group","options","hidden"],"additionalProperties":false}},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"nullable":true,"type":"string"},"data":{"type":"object","additionalProperties":{}},"parent_node":{"nullable":true,"type":"string"}},"required":["id","type","label","data","parent_node"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"target":{"type":"string"},"source_handle":{"nullable":true,"type":"string"},"target_handle":{"nullable":true,"type":"string"}},"required":["id","source","target","source_handle","target_handle"],"additionalProperties":false}}},"required":["id","name","name_key","description","description_key","template_id","active","dry_run","customized_by_user","schedule","node_count","created_at","updated_at","variables","nodes","edges"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"422","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"node_id":{"nullable":true,"type":"string"},"edge_id":{"nullable":true,"type":"string"}},"required":["code","message","hint","node_id","edge_id"],"additionalProperties":false}}},"required":["valid","errors"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workflows/{id}":{"get":{"description":"Returns the full definition: the node graph, and every configuration variable with its effective value. `overridden` on a variable tells you whether the customer set it or it still carries the template default — which is usually the question worth asking when auditing a setup.","summary":"Retrieve one workflow with its resolved configuration","tags":["workflows"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"fields","in":"query","description":"Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: `fields[campaign]=id,name`. A key that matches no entity is ignored silently and the full object comes back.","schema":{"type":"object","additionalProperties":{"type":"string"}},"style":"deepObject","explode":true}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"},"name_key":{"nullable":true,"type":"string"},"description":{"type":"string"},"description_key":{"nullable":true,"type":"string"},"template_id":{"nullable":true,"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"active":{"type":"boolean"},"dry_run":{"type":"boolean"},"customized_by_user":{"type":"boolean"},"schedule":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["cron","interval","once"]},"cron":{"nullable":true,"type":"string"},"interval_ms":{"nullable":true,"type":"number"},"scheduled_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"timezone":{"type":"string"},"enabled":{"type":"boolean"},"last_run_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"next_run_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["type","cron","interval_ms","scheduled_at","timezone","enabled","last_run_at","next_run_at"],"additionalProperties":false},"node_count":{"type":"number"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string"},"value":{},"overridden":{"type":"boolean"},"description":{"nullable":true,"type":"string"},"group":{"nullable":true,"type":"string"},"options":{"nullable":true,"type":"array","items":{"type":"string"}},"hidden":{"type":"boolean"}},"required":["key","type","value","overridden","description","group","options","hidden"],"additionalProperties":false}},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"nullable":true,"type":"string"},"data":{"type":"object","additionalProperties":{}},"parent_node":{"nullable":true,"type":"string"}},"required":["id","type","label","data","parent_node"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"target":{"type":"string"},"source_handle":{"nullable":true,"type":"string"},"target_handle":{"nullable":true,"type":"string"}},"required":["id","source","target","source_handle","target_handle"],"additionalProperties":false}}},"required":["id","name","name_key","description","description_key","template_id","active","dry_run","customized_by_user","schedule","node_count","created_at","updated_at","variables","nodes","edges"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"description":"Deletes the workflow, its execution history, the payloads of those executions and its version snapshots. There is no undo and no bin: once gone, the record of what it did is gone with it. Requires the `workflows:write` scope.","summary":"Delete a workflow and everything under it","tags":["workflows"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"204":{"description":"204","content":{"application/json":{"schema":{}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"description":"Editing the graph only works while the workflow is paused: doing it on one that is scheduled returns 409, and so does sending `schedule` for a workflow that is active at all. The one exception is `active: false` on its own, which is ALWAYS allowed — pausing can only make less happen on Amazon, and refusing it would leave a scheduled workflow impossible to edit through this API at all. Sending `active: true` turns the workflow on: from then on its schedule fires for real — because its next run moves real bids and a half-reviewed graph should not be what executes. Pause it in the app first. `nodes` and `edges` are replaced wholesale and must be sent together — a partial patch would leave edges pointing at nodes that no longer exist, so sending one without the other is a 400, as is an empty body. The graph must pass validation: on failure you get 422 and nothing is written. Requires the `workflows:write` scope.","summary":"Edit a paused workflow, or pause one","tags":["workflows"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"nodes":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"label":{"nullable":true,"type":"string"},"data":{"type":"object","additionalProperties":{}},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},"parent_node":{"nullable":true,"type":"string"}},"required":["id","type"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"source":{"type":"string","minLength":1},"target":{"type":"string","minLength":1},"source_handle":{"nullable":true,"type":"string"},"target_handle":{"nullable":true,"type":"string"}},"required":["id","source","target"],"additionalProperties":false}},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["number","boolean","string","select","multiselect","string-list"]},"value":{},"description":{"nullable":true,"type":"string"},"group":{"nullable":true,"type":"string"},"options":{"nullable":true,"type":"array","items":{"type":"string"}},"hidden":{"nullable":true,"type":"boolean"}},"required":["key","type","value"]}},"schedule":{"type":"object","properties":{"type":{"type":"string","enum":["cron","interval","once"]},"cron":{"nullable":true,"type":"string"},"interval_ms":{"nullable":true,"type":"number"},"scheduled_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"timezone":{"nullable":true,"type":"string"}},"required":["type"]},"active":{"type":"boolean"},"dry_run":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"},"name_key":{"nullable":true,"type":"string"},"description":{"type":"string"},"description_key":{"nullable":true,"type":"string"},"template_id":{"nullable":true,"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"active":{"type":"boolean"},"dry_run":{"type":"boolean"},"customized_by_user":{"type":"boolean"},"schedule":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["cron","interval","once"]},"cron":{"nullable":true,"type":"string"},"interval_ms":{"nullable":true,"type":"number"},"scheduled_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"timezone":{"type":"string"},"enabled":{"type":"boolean"},"last_run_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"next_run_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["type","cron","interval_ms","scheduled_at","timezone","enabled","last_run_at","next_run_at"],"additionalProperties":false},"node_count":{"type":"number"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string"},"value":{},"overridden":{"type":"boolean"},"description":{"nullable":true,"type":"string"},"group":{"nullable":true,"type":"string"},"options":{"nullable":true,"type":"array","items":{"type":"string"}},"hidden":{"type":"boolean"}},"required":["key","type","value","overridden","description","group","options","hidden"],"additionalProperties":false}},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"nullable":true,"type":"string"},"data":{"type":"object","additionalProperties":{}},"parent_node":{"nullable":true,"type":"string"}},"required":["id","type","label","data","parent_node"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"target":{"type":"string"},"source_handle":{"nullable":true,"type":"string"},"target_handle":{"nullable":true,"type":"string"}},"required":["id","source","target","source_handle","target_handle"],"additionalProperties":false}}},"required":["id","name","name_key","description","description_key","template_id","active","dry_run","customized_by_user","schedule","node_count","created_at","updated_at","variables","nodes","edges"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"422","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"node_id":{"nullable":true,"type":"string"},"edge_id":{"nullable":true,"type":"string"}},"required":["code","message","hint","node_id","edge_id"],"additionalProperties":false}}},"required":["valid","errors"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workflows/{id}/campaigns":{"get":{"description":"NOT simply the campaigns that link to the workflow. Membership is decided by three controls stored per campaign (force-include, force-exclude, global opt-out) combined with the workflow's own filter and its auto-selection setting. Each row carries a `gate` object saying why it is in, plus the campaign's effective AI configuration. When the set is empty, `empty_reason` names the cause: `manual-sin-enlaces` means the workflow is on manual selection with nothing linked — the state a workflow is BORN in, and the usual reason one runs nightly for weeks doing nothing. `filtro-vacio` means no campaign passes its own filter. `no-itera-campanas` means this workflow does not act on campaigns at all.","summary":"Campaigns this workflow actually processes","tags":["workflows"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"campaign_id":{"type":"string"},"name":{"type":"string"},"state":{"nullable":true,"type":"string"},"ad_product":{"nullable":true,"type":"string"},"config":{"type":"object","properties":{"objective_type":{"nullable":true,"type":"string"},"objective_value":{"nullable":true,"type":"number"},"min_bid":{"nullable":true,"type":"number"},"max_bid":{"nullable":true,"type":"number"},"placement_cap_percent":{"nullable":true,"type":"number"},"daily_budget":{"nullable":true,"type":"number"},"monthly_budget":{"nullable":true,"type":"number"},"ai_enabled":{"type":"boolean"},"optimizing_since":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["objective_type","objective_value","min_bid","max_bid","placement_cap_percent","daily_budget","monthly_budget","ai_enabled","optimizing_since"],"additionalProperties":false},"gate":{"type":"object","properties":{"linked":{"type":"boolean"},"excluded":{"type":"boolean"},"opt_out":{"type":"boolean"},"matched_own_filter":{"type":"boolean"}},"required":["linked","excluded","opt_out","matched_own_filter"],"additionalProperties":false}},"required":["id","campaign_id","name","state","ad_product","config","gate"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"},"empty_reason":{"nullable":true,"type":"string","enum":["manual-sin-enlaces","filtro-vacio","no-itera-campanas"]}},"required":["object","data","has_more","empty_reason"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workflows/{id}/performance":{"get":{"description":"Aggregated over a required `start_date`/`end_date` window, restricted to the campaigns the workflow actually processes. Each row puts the configured `objective_type`/`objective_value` next to the realized metrics, which is how you judge whether the workflow is hitting its target. `optimizing_since` is when the workflow first touched that campaign for real — results before that date are NOT its doing, so a window straddling it will mislead you. Monetary amounts are decimal strings; ratios are fractions (0.1642 = 16.42%) and are `null`, never `0`, when their denominator is zero.","summary":"Advertising performance of the campaigns this workflow optimizes","tags":["workflows"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"start_date","in":"query","description":"Both ends are included in the range. The window is capped, and the cap depends on the resource AND on `granularity` — `daily` allows a much shorter span than `total`, and `target-metrics` and `search-term-metrics` are stricter than the rest because `limit`/`offset` bound the response but not what ClickHouse scans. Going over returns a `400` naming the exact limit for your request.","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-07-01"}},{"name":"end_date","in":"query","description":"Both ends are included in the range. The window is capped, and the cap depends on the resource AND on `granularity` — `daily` allows a much shorter span than `total`, and `target-metrics` and `search-term-metrics` are stricter than the rest because `limit`/`offset` bound the response but not what ClickHouse scans. Going over returns a `400` naming the exact limit for your request.","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-07-31"}},{"name":"granularity","in":"query","schema":{"default":"total","example":"total","type":"string","enum":["total","daily"]}},{"name":"limit","in":"query","description":"Page size. For a top-N, combine `order_by` with a small `limit` instead of raising it: `limit`/`offset` bound the response, not what ClickHouse scans.","schema":{"default":100,"example":100,"type":"integer","minimum":1,"maximum":1000}},{"name":"offset","in":"query","schema":{"default":0,"example":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"order","in":"query","schema":{"default":"desc","example":"desc","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"campaign":{"type":"string"},"campaign_name":{"nullable":true,"type":"string"},"currency":{"type":"string"},"cost":{"type":"string"},"sales":{"type":"string"},"impressions":{"type":"number"},"clicks":{"type":"number"},"orders":{"type":"number"},"acos":{"nullable":true,"type":"number"},"roas":{"nullable":true,"type":"number"},"ctr":{"nullable":true,"type":"number"},"conversion_rate":{"nullable":true,"type":"number"},"objective_type":{"nullable":true,"type":"string"},"objective_value":{"nullable":true,"type":"number"},"optimizing_since":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["campaign","campaign_name","currency","cost","sales","impressions","clicks","orders","acos","roas","ctr","conversion_rate","objective_type","objective_value","optimizing_since"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"503","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workflows/{id}/executions":{"get":{"description":"What the workflow has actually done, run by run. `status` tells them apart, and `partial` is its own outcome, not a shade of the other two: the graph finished but some items inside a forEach failed and the rest carried on, so neither \"it all worked\" nor \"nothing happened\" is true. `dry_run` says whether the run wrote anything at all — filter it out before drawing conclusions from a series. The per-node detail of a run is in its payloads.","summary":"Runs of a workflow, newest first","tags":["workflows"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"dry_run","in":"query","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"workflow":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"status":{"type":"string","enum":["pending","running","completed","partial","failed","cancelled"]},"dry_run":{"type":"boolean"},"error":{"nullable":true,"type":"string"},"tokens_consumed":{"type":"number"},"node_result_count":{"type":"number"},"started_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"completed_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","workflow","status","dry_run","error","tokens_consumed","node_result_count","started_at","completed_at","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workflows/{id}/executions/{executionId}/payloads":{"get":{"description":"The output every node left behind in that run — this is where a workflow's decisions actually are, one row per node and per forEach item. Read this, not the run itself, to answer what a workflow decided and why: the run document only carries the top-level nodes, and in this product the reasoning lives inside the forEach.\n\nIt takes two calls, on purpose. The first, with the default `data=none`, is the INDEX: every step with its `label`, and nothing else. A `label` starts with the CONTAINER — the forEach the work happened in — then the item, then the node that did it: `wf-foreach-targets-item-2-p9747-wf-calc-bid`. So `label_prefix` takes the container, not the node at the end. Read the index first and copy a prefix from it rather than composing one; a prefix that matches nothing is rejected and the error lists the ones that exist. Asking for `data=full` across a whole run of a catalogue-sized workflow returns millions of characters and overflows what a host will accept, which is why it is not the default. `type` separates a node's own decision (`nodeResult`) from the engine's scaffolding.","summary":"What each node produced in a run","tags":["workflows"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"executionId","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}},{"name":"label_prefix","in":"query","schema":{"type":"string"}},{"name":"type","in":"query","schema":{"type":"string","enum":["subGraph","context","nodeResult"]}},{"name":"data","in":"query","schema":{"type":"string","enum":["none","full"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"type":{"type":"string","enum":["subGraph","context","nodeResult"]},"label":{"nullable":true,"type":"string"},"data":{"type":"object","additionalProperties":{}}},"required":["id","type","label"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workflow-node-types":{"get":{"description":"Everything the workflow engine understands: the node types and what each is for, which fields their `data` needs and which the server fills in for you, the actions a node can run, the operators a condition accepts, and what a forEach can iterate over. Read it BEFORE building a graph - without it the only way to learn the shape is to read an existing workflow and infer, and an account with no workflow of the kind you need leaves you guessing. Identical for every account, so it is not charged.","summary":"What a workflow graph can be made of","tags":["workflows"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"node_types":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"purpose":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"filled_by_server":{"type":"boolean"},"default_value":{},"required":{"type":"boolean"},"description":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array"]},"required":{"type":"boolean"},"description":{"type":"string"}},"required":["name","type","required","description"],"additionalProperties":false}}},"required":["name","filled_by_server","default_value"],"additionalProperties":false}},"source_handles":{"type":"array","items":{"type":"string"}}},"required":["type","purpose","fields","source_handles"],"additionalProperties":false}},"action_types":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"group":{"type":"string","enum":["general","campaign-optimizer"]},"config_fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array"]},"required":{"type":"boolean"},"description":{"type":"string"}},"required":["name","type","required","description"],"additionalProperties":false}}},"required":["action","group"],"additionalProperties":false}},"config_envelope":{"type":"string"},"condition_operators":{"type":"array","items":{"type":"string"}},"condition_fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array"]},"required":{"type":"boolean"},"description":{"type":"string"}},"required":["name","type","required","description"],"additionalProperties":false}},"for_each":{"type":"object","properties":{"modes":{"type":"array","items":{"type":"string"}},"collections":{"type":"array","items":{"type":"string"}}},"required":["modes","collections"],"additionalProperties":false}},"required":["node_types","action_types","config_envelope","condition_operators","condition_fields","for_each"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workflows/{id}/versions":{"get":{"description":"Every create, clone, instantiation and edit leaves a version behind, and so does a restore — restoring is never a one-way trip. Versions EXPIRE, so an old workflow can show fewer than were actually made: a short list does not mean nobody touched it. `author` says where the change came from, which is what separates an edit made by an integration from one made by hand in Epinium. The graph is not here; read one version to see it.","summary":"Saved versions of a workflow, newest first","tags":["workflows"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"limit","in":"query","description":"Page size. The default is enough to explore; raise it only when you need to walk a whole collection.","schema":{"default":20,"example":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for the next page: the `id` of the last record you received. Returns the records after it.","schema":{"type":"string"}},{"name":"ending_before","in":"query","description":"Cursor for the previous page: the `id` of the first record you received. Returns the records before it.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"workflow":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"},"description":{"type":"string"},"active":{"type":"boolean"},"node_count":{"type":"number"},"author":{"nullable":true,"type":"object","properties":{"source":{"type":"string","enum":["app","public-api","chat"]},"credential_type":{"nullable":true,"type":"string","enum":["api_key","oauth"]}},"required":["source","credential_type"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","workflow","name","description","active","node_count","author","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workflows/{id}/versions/{versionId}":{"get":{"description":"The full graph as it was when that version was saved. Read it before restoring: restoring replaces the live graph wholesale, and this is the only way to see what it would become.","summary":"One saved version, with its graph","tags":["workflows"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"versionId","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"workflow":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"},"description":{"type":"string"},"active":{"type":"boolean"},"node_count":{"type":"number"},"author":{"nullable":true,"type":"object","properties":{"source":{"type":"string","enum":["app","public-api","chat"]},"credential_type":{"nullable":true,"type":"string","enum":["api_key","oauth"]}},"required":["source","credential_type"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"nullable":true,"type":"string"},"data":{"type":"object","additionalProperties":{}},"parent_node":{"nullable":true,"type":"string"}},"required":["id","type","label","data","parent_node"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"target":{"type":"string"},"source_handle":{"nullable":true,"type":"string"},"target_handle":{"nullable":true,"type":"string"}},"required":["id","source","target","source_handle","target_handle"],"additionalProperties":false}},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string"},"value":{},"overridden":{"type":"boolean"},"description":{"nullable":true,"type":"string"},"group":{"nullable":true,"type":"string"},"options":{"nullable":true,"type":"array","items":{"type":"string"}},"hidden":{"type":"boolean"}},"required":["key","type","value","overridden","description","group","options","hidden"],"additionalProperties":false}}},"required":["id","workflow","name","description","active","node_count","author","created_at","nodes","edges","variables"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workflows/{id}/versions/{versionId}/restore":{"post":{"description":"Replaces the live graph with the one from that version. It is an edit, so the same rule applies: a workflow that can fire on its own is refused with 409 — pause it first with `active: false`, restore, and turn it back on when the result is what you wanted. The state being replaced is snapshotted first, so a restore can itself be undone. Requires the `workflows:write` scope.","summary":"Put a saved version back","tags":["workflows"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}},{"name":"versionId","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"},"name_key":{"nullable":true,"type":"string"},"description":{"type":"string"},"description_key":{"nullable":true,"type":"string"},"template_id":{"nullable":true,"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"active":{"type":"boolean"},"dry_run":{"type":"boolean"},"customized_by_user":{"type":"boolean"},"schedule":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["cron","interval","once"]},"cron":{"nullable":true,"type":"string"},"interval_ms":{"nullable":true,"type":"number"},"scheduled_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"timezone":{"type":"string"},"enabled":{"type":"boolean"},"last_run_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"next_run_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["type","cron","interval_ms","scheduled_at","timezone","enabled","last_run_at","next_run_at"],"additionalProperties":false},"node_count":{"type":"number"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string"},"value":{},"overridden":{"type":"boolean"},"description":{"nullable":true,"type":"string"},"group":{"nullable":true,"type":"string"},"options":{"nullable":true,"type":"array","items":{"type":"string"}},"hidden":{"type":"boolean"}},"required":["key","type","value","overridden","description","group","options","hidden"],"additionalProperties":false}},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"nullable":true,"type":"string"},"data":{"type":"object","additionalProperties":{}},"parent_node":{"nullable":true,"type":"string"}},"required":["id","type","label","data","parent_node"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"target":{"type":"string"},"source_handle":{"nullable":true,"type":"string"},"target_handle":{"nullable":true,"type":"string"}},"required":["id","source","target","source_handle","target_handle"],"additionalProperties":false}}},"required":["id","name","name_key","description","description_key","template_id","active","dry_run","customized_by_user","schedule","node_count","created_at","updated_at","variables","nodes","edges"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workflows/{id}/cost-estimate":{"get":{"description":"The same forecast the app shows in the workflow detail, so read it BEFORE `run` with `dry_run: false` on anything that touches a large catalogue. A row closes exactly: `estimated_items * tokens_per_item + loop_tokens = estimated_tokens`. Do NOT multiply by `billable_nodes_per_item` — it counts the nodes rather than pricing them, and a `create-task` does not cost the same as a plain action. What the number is worth depends on one flag. For the rows with `forecastable: true` it is an UPPER bound: it counts every item that matches today, and a run can process fewer. But a row with `forecastable: false` is a `forEach` whose size cannot be known until the run happens, and its cost is left OUT of the total — so if any row carries that flag the total is not an upper bound at all, it is incomplete, and the real cost can exceed it. A zero there means 'not forecast', never 'free'.","summary":"What running this workflow would cost, without running it","tags":["workflows"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"estimated_tokens":{"type":"number"},"breakdown":{"type":"array","items":{"type":"object","properties":{"node":{"type":"string"},"node_type":{"type":"string"},"label":{"type":"string"},"estimated_items":{"type":"number"},"billable_nodes_per_item":{"type":"number"},"tokens_per_item":{"type":"number"},"loop_tokens":{"type":"number"},"estimated_tokens":{"type":"number"},"forecastable":{"type":"boolean"}},"required":["node","node_type","estimated_items","billable_nodes_per_item","tokens_per_item","loop_tokens","estimated_tokens","forecastable"],"additionalProperties":false}}},"required":["estimated_tokens","breakdown"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workflows/{id}/run":{"post":{"description":"Queues an execution and returns its id — it does NOT wait for it to finish, because a run over dozens of campaigns takes far longer than any tool call. Read the outcome afterwards with the executions and payloads of this same workflow. `dry_run` is required and has no default on purpose: a real run moves bids and budgets on Amazon, and a simulation walks the whole graph writing nothing, so which one you meant should never depend on a field you forgot. A paused workflow can still be simulated — that is the point, checking it before turning it on — but running it for real needs it active. Requires the `workflows:write` scope.","summary":"Run a workflow now, for real or as a simulation","tags":["workflows"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"dry_run":{"type":"boolean"}},"required":["dry_run"],"additionalProperties":false}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"execution":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"status":{"type":"string"},"dry_run":{"type":"boolean"}},"required":["execution","status","dry_run"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"503","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workflows/validate":{"post":{"description":"Runs the same structural, connectivity and semantic rules that `create` and `update` enforce, and persists nothing. `name` is optional here, unlike in `create`: nothing is saved, so there is nothing to name. Each error carries a `hint` saying what to change. Use it to iterate on a graph before writing it: a rejected write costs you the same round-trip but leaves you guessing less if you validated first.","summary":"Check a workflow graph without saving it","tags":["workflows"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"nodes":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"label":{"nullable":true,"type":"string"},"data":{"type":"object","additionalProperties":{}},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},"parent_node":{"nullable":true,"type":"string"}},"required":["id","type"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"source":{"type":"string","minLength":1},"target":{"type":"string","minLength":1},"source_handle":{"nullable":true,"type":"string"},"target_handle":{"nullable":true,"type":"string"}},"required":["id","source","target"],"additionalProperties":false}},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"},"type":{"type":"string","enum":["number","boolean","string","select","multiselect","string-list"]},"value":{},"description":{"nullable":true,"type":"string"},"group":{"nullable":true,"type":"string"},"options":{"nullable":true,"type":"array","items":{"type":"string"}},"hidden":{"nullable":true,"type":"boolean"}},"required":["key","type","value"]}},"schedule":{"type":"object","properties":{"type":{"type":"string","enum":["cron","interval","once"]},"cron":{"nullable":true,"type":"string"},"interval_ms":{"nullable":true,"type":"number"},"scheduled_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"timezone":{"nullable":true,"type":"string"}},"required":["type"]}},"required":["nodes","edges"],"additionalProperties":false}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"node_id":{"nullable":true,"type":"string"},"edge_id":{"nullable":true,"type":"string"}},"required":["code","message","hint","node_id","edge_id"],"additionalProperties":false}}},"required":["valid","errors"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workflows/{id}/clone":{"post":{"description":"Copies the graph, the declared variables and the schedule of an existing workflow server-side, so the caller never resends them. Like `create`, the copy is PAUSED and this endpoint cannot turn it on. Use it to run the same logic with different values: `variables` takes only the keys you want to change, and every other one keeps the source value. Requires the `workflows:write` scope.","summary":"Copy an existing workflow, paused","tags":["workflows"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"variables":{"type":"object","additionalProperties":{}}},"additionalProperties":false}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"},"name_key":{"nullable":true,"type":"string"},"description":{"type":"string"},"description_key":{"nullable":true,"type":"string"},"template_id":{"nullable":true,"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"active":{"type":"boolean"},"dry_run":{"type":"boolean"},"customized_by_user":{"type":"boolean"},"schedule":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["cron","interval","once"]},"cron":{"nullable":true,"type":"string"},"interval_ms":{"nullable":true,"type":"number"},"scheduled_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"timezone":{"type":"string"},"enabled":{"type":"boolean"},"last_run_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"next_run_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["type","cron","interval_ms","scheduled_at","timezone","enabled","last_run_at","next_run_at"],"additionalProperties":false},"node_count":{"type":"number"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string"},"value":{},"overridden":{"type":"boolean"},"description":{"nullable":true,"type":"string"},"group":{"nullable":true,"type":"string"},"options":{"nullable":true,"type":"array","items":{"type":"string"}},"hidden":{"type":"boolean"}},"required":["key","type","value","overridden","description","group","options","hidden"],"additionalProperties":false}},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"nullable":true,"type":"string"},"data":{"type":"object","additionalProperties":{}},"parent_node":{"nullable":true,"type":"string"}},"required":["id","type","label","data","parent_node"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"target":{"type":"string"},"source_handle":{"nullable":true,"type":"string"},"target_handle":{"nullable":true,"type":"string"}},"required":["id","source","target","source_handle","target_handle"],"additionalProperties":false}}},"required":["id","name","name_key","description","description_key","template_id","active","dry_run","customized_by_user","schedule","node_count","created_at","updated_at","variables","nodes","edges"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workflow-templates":{"get":{"description":"The catalogue of automations Epinium publishes, filtered to the ones this account is allowed to use. These are NOT workflows of the account: they do nothing until you instantiate one, which gives the account its own paused copy. Requires the `workflows:read` scope.","summary":"List the workflow templates this account can instantiate","tags":["workflow-templates"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"},"description":{"type":"string"},"description_key":{"nullable":true,"type":"string"},"node_count":{"type":"number"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","description","description_key","node_count","updated_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"total_count":{"description":"Present only when the request had `include_total=true`: absent when it was not requested, `null` when it was requested but the count could not be computed in time, a number - the size of the whole matching set - when it succeeded.","nullable":true,"type":"number"}},"required":["object","data","has_more"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workflow-templates/{id}/instantiate":{"post":{"description":"Creates the account's own copy of a template, PAUSED, with the template's graph, variables and schedule already in place — turning it on is a human step in Epinium. Instantiating the same template twice is allowed and gives two independent copies, so check what the account already has first: `epinium_list_workflows` with `template` filters by the template a workflow came from. A template this account is not entitled to returns 403. Requires the `workflows:write` scope.","summary":"Create this account copy of a template","tags":["workflow-templates"],"parameters":[{"name":"id","in":"path","description":"24-character hexadecimal Mongo ObjectId.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"name":{"type":"string"},"name_key":{"nullable":true,"type":"string"},"description":{"type":"string"},"description_key":{"nullable":true,"type":"string"},"template_id":{"nullable":true,"type":"string","pattern":"^[a-f0-9]{24}$","description":"24-character hexadecimal Mongo ObjectId."},"active":{"type":"boolean"},"dry_run":{"type":"boolean"},"customized_by_user":{"type":"boolean"},"schedule":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["cron","interval","once"]},"cron":{"nullable":true,"type":"string"},"interval_ms":{"nullable":true,"type":"number"},"scheduled_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"timezone":{"type":"string"},"enabled":{"type":"boolean"},"last_run_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"next_run_at":{"nullable":true,"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["type","cron","interval_ms","scheduled_at","timezone","enabled","last_run_at","next_run_at"],"additionalProperties":false},"node_count":{"type":"number"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string"},"value":{},"overridden":{"type":"boolean"},"description":{"nullable":true,"type":"string"},"group":{"nullable":true,"type":"string"},"options":{"nullable":true,"type":"array","items":{"type":"string"}},"hidden":{"type":"boolean"}},"required":["key","type","value","overridden","description","group","options","hidden"],"additionalProperties":false}},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"nullable":true,"type":"string"},"data":{"type":"object","additionalProperties":{}},"parent_node":{"nullable":true,"type":"string"}},"required":["id","type","label","data","parent_node"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"target":{"type":"string"},"source_handle":{"nullable":true,"type":"string"},"target_handle":{"nullable":true,"type":"string"}},"required":["id","source","target","source_handle","target_handle"],"additionalProperties":false}}},"required":["id","name","name_key","description","description_key","template_id","active","dry_run","customized_by_user","schedule","node_count","created_at","updated_at","variables","nodes","edges"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"402","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","invalid_request_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}}},"info":{"title":"Epinium Public API","description":"","version":"1.0.0","contact":{}},"tags":[{"name":"me","description":"Describes the authenticated API key: its scopes and accessible accounts. No scope required — any valid key can call it."},{"name":"accounts","description":"Accounts this API key can operate on, selectable via the `Epinium-Account` header. Requires `connections:read`."},{"name":"connections","description":"The authenticated account's data source connections. Requires `connections:read`."},{"name":"products","description":"The authenticated account's catalog products. Requires `catalog:read`."},{"name":"amazon-seller-products","description":"The authenticated account's Amazon Seller Central product listings. Requires `catalog:read`."},{"name":"amazon-vendor-products","description":"The authenticated account's Amazon Vendor Central product listings. Requires `catalog:read`."},{"name":"amazon-advertising-products","description":"The authenticated account's Amazon advertising products. Requires `catalog:read`."},{"name":"seller-product-metrics","description":"Seller Central sales and traffic per product, aggregated from the account's report history. Requires `catalog:read`."},{"name":"vendor-product-metrics","description":"Vendor Central sales per product, split by manufacturing and sourcing, aggregated from the account's report history. Requires `catalog:read`."},{"name":"product-brands","description":"Brands present in the authenticated account's catalog. Requires `catalog:read`. Sparse fieldsets use `fields[brand]` — keyed by the entity type (`brand`, the same one `expand[]=brand` and a product's `brand` field use), not by the resource name."},{"name":"countries","description":"Amazon marketplace countries. Requires `catalog:read`."},{"name":"clusters","description":"The authenticated account's keyword clusters. Requires `catalog:read`."},{"name":"campaigns","description":"The authenticated account's advertising campaigns. Requires `campaigns:read`."},{"name":"campaign-metrics","description":"Advertising performance per campaign, aggregated from the account's report history. Requires `campaigns:read`."},{"name":"adgroups","description":"The authenticated account's ad groups. Requires `campaigns:read`."},{"name":"adgroup-metrics","description":"Performance per ad group over a date range."},{"name":"targets","description":"The authenticated account's advertising targets. Requires `campaigns:read`."},{"name":"target-metrics","description":"Performance per target, with its keyword and match type."},{"name":"product-ads","description":"The authenticated account's advertising product ads. Requires `campaigns:read`."},{"name":"product-ad-metrics","description":"Performance per advertised product, with its ASIN."},{"name":"search-terms","description":"The authenticated account's advertising search terms. Requires `campaigns:read`."},{"name":"search-term-metrics","description":"Performance per shopper query, with its text and matching target."},{"name":"tasks","description":"The authenticated account's tasks. Requires `tasks:read`."},{"name":"task-items","description":"Individual suggestions within a task. Requires `tasks:read`."},{"name":"skills","description":"Catalog of validated marketing playbooks, served from memory and shared by every account. Requires `skills:read`."},{"name":"workflows","description":"The authenticated account's automation workflows, the campaigns they process and those campaigns' performance. Requires `workflows:read`."},{"name":"workflow-templates","description":"The catalogue of automations Epinium publishes, and the route to create this account's own copy of one. Which templates an account sees depends on its feature flags. Requires `workflows:read`; instantiating also requires `workflows:write`."}],"servers":[],"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Client API key (POST /api-keys). Send as `Authorization: Bearer epk_live_...`."}}},"security":[{"bearer":[]}]}