Skip to main content

GET /campaigns/:id

Retrieve campaign information.

Description

This endpoint allows you to retrieve a specific campaign by its unique identifier.

HTTP Request

GET https://api.andopen.com/campaigns/:id

Path Parameters

ParameterTypeRequiredDescription
idStringYesThe campaign identifier (UUID)

Query Parameters

ParameterTypeRequiredDescription
includeStringNoComma-separated list of relationships to include

Available Relationship Tree

The following relationship tree shows all available include paths:

campaigns
├── products
├── variants
├── variant_stock_levels
└── warehouse

Valid Include Paths

Based on the relationship tree above, these are the valid include parameter values:

PathDescriptionLevels
productsInclude campaign products1
products.variantsInclude products with their variants2
products.variants.variant_stock_levelsInclude products, variants, and stock levels3
products.variants.variant_stock_levels.warehouseInclude full inventory hierarchy4

Example Requests

curl -X GET \
'https://api.andopen.co/campaigns/b543b00b-7394-4185-972e-f060f6724298?include=products.variants.variant_stock_levels.warehouse'

Responses

The state field indicates the current status of the campaign and can have one of the following values:

ValueDescription
availableCampaign is active and available for use
archivedCampaign has been archived and is no longer active
🟢 Success Response (200 Success)
{
"data": {
"id": "ee57e819-d0d8-44f2-9513-438ae025d2b9",
"type": "campaigns",
"attributes": {
"name": "Engineers birthday automation",
"description": "Automated campaign for gifting to segment Engineers",
"state": "available",
"archived_at": null,
"created_at": "2025-07-01T15:59:48.479Z",
"updated_at": "2025-07-01T15:59:48.479Z"
},
"relationships": {
"products": {
"data": [
{
"type": "products",
"id": "1e9c46b4-e38d-4db5-83c5-94c6ff466694"
},
{
"type": "products",
"id": "1e9c46b4-e38d-4db5-83c5-94c6ff466694"
},
{
"type": "products",
"id": "1e9c46b4-e38d-4db5-83c5-94c6ff466694"
}
]
}
}
},
"included": [
{
"id": "1e9c46b4-e38d-4db5-83c5-94c6ff466694",
"type": "products",
"attributes": {
"name": "Nicely Odd Candle",
"enabled": true,
"created_at": "2021-01-15T12:11:00.822Z",
"updated_at": "2025-07-01T18:00:16.953Z"
},
"relationships": {
"variants": {
"data": [
{
"type": "variants",
"id": "e234ed04-3d65-4116-b8d2-8e06b91e3804"
},
{
"type": "variants",
"id": "6f5d7c09-de58-4cde-ba45-4b40d195bb47"
},
{
"type": "variants",
"id": "e27cf6c4-6b0d-44ec-bf8b-8cf8d2e06d76"
}
]
}
}
},
{
"id": "e234ed04-3d65-4116-b8d2-8e06b91e3804",
"type": "variants",
"attributes": {
"name": "Default Title",
"sku": "AO-HAY01-001",
"enabled": true,
"created_at": "2022-07-28T15:04:31.162Z",
"updated_at": "2023-02-02T12:57:52.685Z"
},
"relationships": {
"variant_stock_levels": {
"data": [
{
"type": "variant_stock_levels",
"id": "66d61ce7-ea1a-490a-aa69-2ebb261f595e"
}
]
}
}
},
{
"id": "6f5d7c09-de58-4cde-ba45-4b40d195bb47",
"type": "variants",
"attributes": {
"name": "Blue",
"sku": "AO-HAY01-001",
"enabled": false,
"created_at": "2021-01-15T12:11:05.788Z",
"updated_at": "2023-05-31T14:08:36.994Z"
},
"relationships": {
"variant_stock_levels": {
"data": [
{
"type": "variant_stock_levels",
"id": "d445bc34-ae57-4afd-a5a5-d5a3d5bad379"
}
]
}
}
},
{
"id": "e27cf6c4-6b0d-44ec-bf8b-8cf8d2e06d76",
"type": "variants",
"attributes": {
"name": "Yellow",
"sku": "AO-HAY02-002",
"enabled": false,
"created_at": "2021-01-15T12:11:01.538Z",
"updated_at": "2025-07-01T18:00:13.821Z"
},
"relationships": {
"variant_stock_levels": {
"data": [
{
"type": "variant_stock_levels",
"id": "5f8ff719-972f-457b-b846-18200620cd0a"
}
]
}
}
},
{
"id": "66d61ce7-ea1a-490a-aa69-2ebb261f595e",
"type": "variant_stock_levels",
"attributes": {
"available": 4,
"created_at": "2022-08-10T00:00:42.827Z",
"updated_at": "2025-02-12T11:55:52.168Z"
},
"relationships": {
"warehouse": {
"data": {
"type": "warehouses",
"id": "3f7f3b2c-1903-4ddb-ba7d-f5a3041db66c"
}
}
}
},
{
"id": "d445bc34-ae57-4afd-a5a5-d5a3d5bad379",
"type": "variant_stock_levels",
"attributes": {
"available": 4,
"created_at": "2021-09-02T14:21:56.576Z",
"updated_at": "2025-02-12T11:55:49.694Z"
},
"relationships": {
"warehouse": {
"data": {
"type": "warehouses",
"id": "3f7f3b2c-1903-4ddb-ba7d-f5a3041db66c"
}
}
}
},
{
"id": "5f8ff719-972f-457b-b846-18200620cd0a",
"type": "variant_stock_levels",
"attributes": {
"available": 50,
"created_at": "2021-09-02T14:21:56.970Z",
"updated_at": "2024-09-13T09:20:35.269Z"
},
"relationships": {
"warehouse": {
"data": {
"type": "warehouses",
"id": "3f7f3b2c-1903-4ddb-ba7d-f5a3041db66c"
}
}
}
},
{
"id": "3f7f3b2c-1903-4ddb-ba7d-f5a3041db66c",
"type": "warehouses",
"attributes": {
"name": "Dublin/Ireland",
"enabled": true,
"created_at": "2021-09-02T14:21:26.238Z",
"updated_at": "2024-05-24T09:17:46.843Z"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
🔴 Error Response (404 NotFound)
{
"errors":
[
{
"status": "404",
"detail": "Couldn't find Campaign with e276c11e-f27b-4a6d-b9e4-f53cd5cd3d32"
}
],
"jsonapi": {
"version": "1.0"
}
}

Code Examples

curl -X GET "https://api.andopen.com/campaigns/e276c11e-f27b-4a6d-b9e4-f53cd5cd3d32" \
-H 'Content-Type: application/vnd.api+json' \
-H 'AndOpen-API-Version: 2025-09' \
-H "Authorization: Bearer <api_key>