Skip to content

Get campaign by ID

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

Returns a campaign by its unique identifier

id
required
string

The campaign unique identifier

A successful response.

Media typeapplication/json
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
Example
{
"id": "63e2d42a27ad5f2b345ca123",
"name": "Discount on products",
"description": "Campaign to promote discount on products in the store",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z",
"start_date": "2021-01-01T00:00:00Z",
"end_date": "2021-01-31T00:00:00Z",
"line_item_count": 10,
"status": "STATUS_UNSPECIFIED"
}

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