Skip to content

Upsert pricing policies

PUT
/pricing-policies
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

Request to bulk upsert pricing policies.

Media typeapplication/json
UpsertPricingPoliciesRequest

Request to bulk upsert pricing policies.

object
pricing_policies
required
Pricing policies

The list of pricing policies to upsert

Array<object>
>= 1 items <= 1000 items
Pricing policy

Pricing policy details

object
id
ID

The unique identifier of the pricing policy. If not provided, a new pricing policy is created.

string
Example
63e2d42a27ad5f2b345ca124
type
required
Type

The conversion event the pricing policy is optimised for.

string
default: PRICING_POLICY_TYPE_UNSPECIFIED
Allowed values: PRICING_POLICY_TYPE_UNSPECIFIED PRICING_POLICY_TYPE_VIEW_THROUGH_RATE PRICING_POLICY_TYPE_CLICK_THROUGH_RATE
Example
PRICING_POLICY_TYPE_VIEW_THROUGH_RATE
max_cpm_usd
required
Max CPM USD

The maximum CPM price in USD, used as the upper bound of the bid search.

number format: double
Example
5

A successful response.

Media typeapplication/json
object
pricing_policies
Array<object>
Pricing policy

Pricing policy details

object
id
ID

The unique identifier of the pricing policy.

string
type
Type

The conversion event the pricing policy is optimised for.

string
default: PRICING_POLICY_TYPE_UNSPECIFIED
Allowed values: PRICING_POLICY_TYPE_UNSPECIFIED PRICING_POLICY_TYPE_VIEW_THROUGH_RATE PRICING_POLICY_TYPE_CLICK_THROUGH_RATE
max_cpm_usd
Max CPM USD

The maximum CPM price in USD, used as the upper bound of the bid search.

number format: double
created_at
Created at

The UTC created date of the pricing policy

string format: date-time
updated_at
Updated at

The UTC last updated date of the pricing policy

string format: date-time
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

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"
}
}

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"
}
]
}