Get impressions ranges
POST
/impressions-ranges
const url = 'https://portal.staging.arago-tech.com/impressions-ranges';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"amounts":[1000,500,1500],"currency":"CURRENCY_UNSPECIFIED"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://portal.staging.arago-tech.com/impressions-ranges \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "amounts": [ 1000, 500, 1500 ], "currency": "CURRENCY_UNSPECIFIED" }'Returns the impressions ranges
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Returns impressions ranges from a slice of amounts in the given currency
Media typeapplication/json
Get impressions ranges
Returns impressions ranges from a slice of amounts in the given currency
object
amounts
required
Amounts
Slice of amounts to calculate the impressions ranges
Array<number>
Example
[ 1000, 500, 1500]currency
required
Currency codes as specified in ISO 4217
buf:lint:ignore ENUM_VALUE_PREFIX
Currency ID based on ISO 4217 numeric codes.
string
Example
978Responses
Section titled “ Responses ”A successful response.
Media typeapplication/json
object
impressions_ranges
Array<object>
Impressions RangeImpressions ranges for a budget in USD
object
min_impressions
Min Impressions
string format: uint64
max_impressions
Max Impressions
string format: uint64
Example
{ "impressions_ranges": [ { "min_impressions": 400, "max_impressions": 800 } ]}Bad request
Media typeapplication/json
object
Example
{ "error": { "code": "BAD_REQUEST", "details": [ { "code": "MAX_ITEMS", "field": "line_items", "message": "value must contain no more than 3000 item(s)", "params": { "max": "3000" } } ], "message": "Bad request" }}Unauthorized
Media typeapplication/json
object
Example
{ "error": { "code": "UNAUTHORIZED", "message": "Unauthorized" }}Internal server error
Media typeapplication/json
object
Example
{ "error": { "code": "INTERNAL_ERROR", "message": "Internal server error" }}default
Section titled “default”An unexpected error response.
Media typeapplication/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
any
Examplegenerated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}