Get campaign by ID
GET
/line-items/campaigns/{id}
const url = 'https://portal.staging.arago-tech.com/line-items/campaigns/example';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://portal.staging.arago-tech.com/line-items/campaigns/example \ --header 'Authorization: <Authorization>'Returns a campaign by its unique identifier
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”id
required
string
The campaign unique identifier
Responses
Section titled “ Responses ”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
description
Description
The description of the campaign
string
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
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" }}default
Section titled “default”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" } ]}