Skip to content

List campaigns

GET
/line-items/campaigns
curl --request GET \
--url https://portal.staging.arago-tech.com/line-items/campaigns \
--header 'Authorization: <Authorization>'

Returns a list of campaigns

query
string

Query

Search query to filter campaigns by name, description or other searchable fields

statuses
Array<string>
Allowed values: STATUS_UNSPECIFIED STATUS_PAUSED STATUS_PLAYING

Statuses

List of statuses to filter campaigns by

start_date_range.from
string format: date-time

From Date

Filter items with date on or after this timestamp

start_date_range.to
string format: date-time

To Date

Filter items with date strictly before this timestamp. Must be after ‘from’ when both are provided.

end_date_range.from
string format: date-time

From Date

Filter items with date on or after this timestamp

end_date_range.to
string format: date-time

To Date

Filter items with date strictly before this timestamp. Must be after ‘from’ when both are provided.

sort.field
string

Field

The field to sort by. This should be a valid field name in the context of the request.

sort.desc
boolean

Desc

The sort order. If true, the results will be sorted in descending order. If false, the results will be sorted in ascending order.

pagination.offset
integer format: int64

Offset

The offset of the first item

pagination.limit
integer format: int64

Limit

The maximum number of items to return (must be >= 10 and <= 1000)

tags
Array<string>
<= 10 items unique items

Tags

List of tags to filter campaigns by

created_at_date_range.from
string format: date-time

From Date

Filter items with date on or after this timestamp

created_at_date_range.to
string format: date-time

To Date

Filter items with date strictly before this timestamp. Must be after ‘from’ when both are provided.

A successful response.

Media typeapplication/json
object
campaigns
List campaigns

The list of campaigns

Array<object>
Messages for Campaign
object
id
Campaign ID

The campaign unique identifier

string
name
Name

The name of the campaign

string
>= 1 characters <= 255 characters
description
Description

The description of the campaign

string
>= 1 characters <= 1024 characters
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
start_date
Start date

The earliest start date of line items in the campaign

string format: date-time
end_date
End date

The latest end date of line items in the campaign

string format: date-time
line_item_count
Line item count

The total number of line items in the campaign

integer format: int64
status
Status

The aggregated status of the campaign based on line item statuses

string
default: STATUS_UNSPECIFIED
Allowed values: STATUS_UNSPECIFIED STATUS_PAUSED STATUS_PLAYING
full_text_search
Full Text Search

Flag indicating if full text search has been performed

boolean
Example
{
"campaigns": [
{
"id": "63e2d42a27ad5f2b345ca123",
"name": "Discount on products"
},
{
"id": "63e2d42a27ad5f2b345ca124",
"name": "New Year Sale"
}
]
}

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