Skip to content

Create campaign

POST
/line-items/campaigns
curl --request POST \
--url https://portal.staging.arago-tech.com/line-items/campaigns \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "name": "Discount on products", "description": "Campaign to promote discount on products in the store", "line_items": [ { "budget": { "amount": 1000, "currency": "EUR" }, "end_date": "2021-01-31T00:00:00Z", "name": "Discount on products", "start_date": "2021-01-01T00:00:00Z" } ] }'

Creates a campaign with line items

The request to create a campaign with associated line items

Media typeapplication/json
Create a campaign with line items

The request to create a campaign with associated line items

object
name
required

The name of the campaign. Must not contain only whitespace (NOT_BLANK). Length is checked before surrounding whitespace is trimmed on write; the response returns the stored name.

string
>= 1 characters <= 255 characters
Example
Discount on products
description
Description

The description of the campaign

string
>= 1 characters <= 1024 characters
Example
Campaign to promote discount on products in the store
line_items
required
Line Items

The list of line items to be associated with the campaign

Array<object>
LineItem

The line item to associate with the campaign

object
name
Name

The name of the line item. Optional; omitted names default to Line item N. Supplied names must not contain only whitespace (NOT_BLANK). Length is checked before surrounding whitespace is trimmed on write.

string
>= 1 characters <= 255 characters
Example
A/B Test, version with 3D creative
start_date
required
Start date

The start date and time of the line item

string format: date-time
Example
2021-01-01T00:00:00Z
end_date
required
End date

The end date and time of the line item

string format: date-time
Example
2021-01-31T00:00:00Z
tags
Tags

The tags associated with the line item. Each tag must be 3 to 255 characters and must not contain only whitespace (NOT_BLANK). Tags are not trimmed.

Array<string>
Example
[
"tag1",
"tag2"
]
budget
required
Budget

The spending cap of the line item

object
amount
required
Amount

Total budget in the given currency. It must be at least 10 USD once converted; conversion is applied server-side after submission, so the smallest accepted value depends on the selected currency.

number format: double
Example
1000
currency
required
Currency

Currency ID based on ISO 4217 numeric codes. The bond market units (XBA, XBB, XBC, XBD), the supranational units of account (XUA, XSU) and the fund codes (BOV, CHE, CHW, CLF, COU, USN, UYI) are rejected: no exchange rate is published for them, so a budget denominated in one could not be converted to USD.

string
default: CURRENCY_UNSPECIFIED
Allowed values: CURRENCY_UNSPECIFIED ALL DZD ARS AUD BSD BHD BDT AMD BBD BMD BTN BOB BWP BZD SBD BND MMK BIF KHR CAD CVE KYD LKR CLP CNY COP KMF CRC HRK CUP CZK DKK DOP SVC ETB ERN FKP FJD DJF GMD GIP GTQ GNF GYD HTG HNL HKD HUF ISK INR IDR IRR IQD ILS JMD JPY KZT JOD KES KPW KRW KWD KGS LAK LBP LSL LVL LRD LYD LTL MOP MWK MYR MVR MRO MUR MXN MNT MDL MAD OMR NAD NPR ANG AWG VUV NZD NIO NGN NOK PKR PAB PGK PYG PEN PHP QAR RUB RWF SHP STD SAR SCR SLL SGD VND SOS ZAR SSP SZL SEK CHF SYP THB TOP TTD AED TND UGX MKD EGP GBP TZS USD UYU UZS WST YER ZMK TWD SLE VES CUC ZWL BYN TMT GHS VEF SDG UYI RSD MZN AZN RON CHE CHW TRY XAF XCD XOF XPF XBA XBB XBC XBD XAU XDR XAG XPT XPD XUA ZMW SRD MGA COU AFN TJS AOA BYR BGN CDF BAM EUR MXV UAH GEL BOV PLN BRL CLF XSU USN JEP IMP GGP BTC
Example
978
Example
[
{
"budget": {
"amount": 1000,
"currency": "EUR"
},
"end_date": "2021-01-31T00:00:00Z",
"name": "Discount on products",
"start_date": "2021-01-01T00:00:00Z"
}
]

A successful response.

Media typeapplication/json
Create campaign response

The campaign creation response containing the campaign identifier

object
id
Campaign ID

The campaign unique identifier

string
name

The stored campaign name, with surrounding whitespace trimmed.

string
>= 1 characters <= 255 characters
description
Description

The description of the campaign

string
>= 1 characters <= 1024 characters
line_items
Line Items

List of line items

Array<object>
LineItem

Line item information

object
id
Line Item ID

The unique identifier of the line item in hexadecimal format

string
campaign_id
Campaign ID

The campaign unique identifier

string
name
Name

The name of the line item

string
start_date
Start Date

The UTC start date of the line item

string format: date-time
end_date
End Date

The UTC end date of the line item

string format: date-time
status
Status

The status of the line item

string
default: STATUS_UNSPECIFIED
Allowed values: STATUS_UNSPECIFIED STATUS_PAUSED STATUS_PLAYING
creative_ids
Creative IDs

The unique identifiers of the creatives of the line item

Array<string>
targeting_id
Targeting ID

The unique identifier of the targeting of the line item

string
dynamic_content_optimization_id
Dynamic Content Optimization ID

The unique identifier of the dynamic content optimization of the line item

string
pricing_policy_id
Pricing Policy ID

The unique identifier of the pricing policy of the line item

string
banker_id
Banker ID

The unique identifier of the banker of the line item

string
created_at
Created At

The UTC creation date of the line item

string format: date-time
updated_at
Updated At

The UTC last updated date of the line item

string format: date-time
tags
Tags

The tags associated with the line item

Array<string>
tracking_id
Tracking ID

The unique identifier of the tracking of the line item

string
budget
Budget

The spending cap of the line item

object
amount
Amount

Total budget in the given currency, as entered

number format: double
currency
Currency

Currency ID based on ISO 4217 numeric codes

string
default: CURRENCY_UNSPECIFIED
Allowed values: CURRENCY_UNSPECIFIED ALL DZD ARS AUD BSD BHD BDT AMD BBD BMD BTN BOB BWP BZD SBD BND MMK BIF KHR CAD CVE KYD LKR CLP CNY COP KMF CRC HRK CUP CZK DKK DOP SVC ETB ERN FKP FJD DJF GMD GIP GTQ GNF GYD HTG HNL HKD HUF ISK INR IDR IRR IQD ILS JMD JPY KZT JOD KES KPW KRW KWD KGS LAK LBP LSL LVL LRD LYD LTL MOP MWK MYR MVR MRO MUR MXN MNT MDL MAD OMR NAD NPR ANG AWG VUV NZD NIO NGN NOK PKR PAB PGK PYG PEN PHP QAR RUB RWF SHP STD SAR SCR SLL SGD VND SOS ZAR SSP SZL SEK CHF SYP THB TOP TTD AED TND UGX MKD EGP GBP TZS USD UYU UZS WST YER ZMK TWD SLE VES CUC ZWL BYN TMT GHS VEF SDG UYI RSD MZN AZN RON CHE CHW TRY XAF XCD XOF XPF XBA XBB XBC XBD XAU XDR XAG XPT XPD XUA ZMW SRD MGA COU AFN TJS AOA BYR BGN CDF BAM EUR MXV UAH GEL BOV PLN BRL CLF XSU USN JEP IMP GGP BTC
amount_in_usd
Amount in USD

The budget converted to USD at the rate in force when its amount or currency last changed, net of the platform fee

number format: double
created_at
Created At

The creation date and time of the campaign

string format: date-time
updated_at
Updated At

The last update date and time of the campaign

string format: date-time
Example
{
"id": "63e2d42a27ad5f2b345ca123",
"name": "Discount on products",
"description": "Campaign to promote discount on products in the store",
"line_items": [
{
"id": "63e2d42a27ad5f2b345ca123",
"name": "Line Item 1"
},
{
"id": "63e2d42a27ad5f2b345ca124",
"name": "Line Item 2"
}
],
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-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"
}
]
}