Upsert pricing policies
const url = 'https://portal.staging.arago-tech.com/pricing-policies';const options = { method: 'PUT', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"pricing_policies":[{"id":"63e2d42a27ad5f2b345ca124","type":"PRICING_POLICY_TYPE_UNSPECIFIED","max_cpm_usd":5}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://portal.staging.arago-tech.com/pricing-policies \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "pricing_policies": [ { "id": "63e2d42a27ad5f2b345ca124", "type": "PRICING_POLICY_TYPE_UNSPECIFIED", "max_cpm_usd": 5 } ] }'Creates or updates multiple pricing policies
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Request to bulk upsert pricing policies.
Request to bulk upsert pricing policies.
object
The list of pricing policies to upsert
Pricing policy details
object
The unique identifier of the pricing policy. If not provided, a new pricing policy is created.
Example
63e2d42a27ad5f2b345ca124The conversion event the pricing policy is optimised for.
Example
PRICING_POLICY_TYPE_VIEW_THROUGH_RATEThe maximum CPM price in USD, used as the upper bound of the bid search.
Example
5Responses
Section titled “ Responses ”A successful response.
object
Pricing policy details
object
The unique identifier of the pricing policy.
The conversion event the pricing policy is optimised for.
The maximum CPM price in USD, used as the upper bound of the bid search.
The UTC created date of the pricing policy
The UTC last updated date of the pricing policy
Example
{ "pricing_policies": [ { "id": "63e2d42a27ad5f2b345ca124", "type": "PRICING_POLICY_TYPE_UNSPECIFIED", "max_cpm_usd": 5, "created_at": "2023-01-01T00:00:00Z", "updated_at": "2023-01-01T00:00:00Z" } ]}Bad request
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
object
Example
{ "error": { "code": "UNAUTHORIZED", "message": "Unauthorized" }}Internal server error
object
Example
{ "error": { "code": "INTERNAL_ERROR", "message": "Internal server error" }}default
Section titled “default”An unexpected error response.
object
object
Examplegenerated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}