> For the complete documentation index, see [llms.txt](https://help.openloyalty.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.openloyalty.io/api-reference/campaign/get-campaigns-list.md).

# Get campaigns list

Management\
\
This method returns detailed information about all Campaigns created in the system.\n\n If sorting is not chosen, the rows will be returned in an unspecified order. \n To sort a result, use an `_orderBy` parameter in query.

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Campaign","description":"These endpoints will allow you to easily manage campaigns."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"page":{"name":"_page","in":"query","description":"Number of page with results, starts from 1","required":false,"schema":{"type":"integer","default":1,"minimum":1}},"itemsOnPage":{"name":"_itemsOnPage","in":"query","description":"Items on one page","required":false,"schema":{"type":"integer","default":10,"maximum":50,"minimum":1}},"orderBy":{"name":"_orderBy","in":"query","description":"Sorting order. If sorting is not chosen, the rows will be returned in an unspecified order. Sort order: * `asc` - Ascending, from A to Z * `desc` - Descending, from Z to A","required":false,"style":"deepObject","explode":true,"schema":{"type":"object","additionalProperties":{"type":"string","enum":["asc","desc"]}}}},"schemas":{"CampaignResponse":{"description":"Campaign","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["direct","referral"]},"trigger":{"type":"string","enum":["transaction","return_transaction","custom_event","internal_event","time","achievement","custom_event_unique_code"]},"campaignId":{"type":"string","format":"uuid"},"activity":{"properties":{"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"}},"type":"object"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"displayOrder":{"type":"number"},"productCatalogSystemCode":{"type":"string"},"rules":{"type":"array","items":{"properties":{"name":{"type":"string"},"description":{"type":"string"},"conditions":{"type":"array","items":{"oneOf":[{"title":"Condition","properties":{"operator":{"type":"string"},"data":{"type":"array","items":{"type":"string"}},"attribute":{"type":"string"}},"type":"object"},{"$ref":"#/components/schemas/NewCondition"}]}},"effects":{"type":"array","items":{"properties":{"effect":{"type":"string"},"pointsRule":{"type":"string"},"tierSetId":{"description":"Present only for the `assign_member_to_tier` effect.","type":"string","format":"uuid"},"tierId":{"description":"Present only for the `assign_member_to_tier` effect.","type":"string","format":"uuid"},"relatedLineTarget":{"description":"Present only for the `give_points` effect.","type":"string","minLength":3,"maxLength":32},"transform":{"description":"Present only for the `give_points` and `deduct_unit` effects.","properties":{"tierMultiplier":{"required":["tierSetId"],"properties":{"tierSetId":{"type":"string","format":"uuid"},"tiers":{"type":"array","items":{"required":["tierId","factor"],"properties":{"tierId":{"type":"string","format":"uuid"},"factor":{"type":"number","format":"float"}},"type":"object"}}},"type":"object"}},"type":"object"}},"type":"object"}},"lineTargets":{"type":"array","items":{"$ref":"#/components/schemas/LineTarget"}}},"type":"object"}},"transactionItemsFilters":{"type":"array","items":{"$ref":"#/components/schemas/TransactionItemsFilters"}},"limits":{"$ref":"#/components/schemas/Limit"},"labels":{"type":"array","items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"translations":{"$ref":"#/components/schemas/CampaignTranslationsResponse"},"limitUsages":{"properties":{"points":{"description":"These fields are not updated immediately after the status changes.","properties":{"currentValue":{"type":"number","format":"float"},"limitValue":{"type":"number","format":"float"},"remaining":{"type":"number","format":"float"},"interval":{"properties":{"type":{"type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]},"value":{"type":"integer","deprecated":true}},"type":"object"}},"type":"object"}},"type":"object"},"visibility":{"$ref":"#/components/schemas/Visibility"},"customFields":{"type":"object","nullable":true,"additionalProperties":{"type":"object","additionalProperties":true}}},"type":"object"},"NewCondition":{"title":"New condition","required":["value","condition"],"properties":{"value":{"required":["field"],"properties":{"field":{"type":"string","enum":["customer.email","customer.wallets","referrer.wallets","customer.badges","referrer.badges","transaction.items","challenge.trigger","challenge.completions","challenge.milestoneProgresses","lineTarget.count","lineTarget.qty","lineTarget.value"]},"params":{"description":"The `wallet` object applies only to the `customer.wallets` and `referrer.wallets` fields. The `walletTypeCode` field is used to precisely specify which wallet the condition should apply to. The `field` property defines which wallet field is used to retrieve the value for the condition.","type":"object","oneOf":[{"title":"wallet","required":["walletTypeCode","field"],"properties":{"walletTypeCode":{"type":"string"},"field":{"type":"string","enum":["activeUnits","spentUnits","earnedUnits","lockedUnits","blockUnits","expiredUnits"]}},"type":"object","additionalProperties":false},{"title":"badge","required":["badgeTypeId"],"properties":{"badgeTypeId":{"type":"string","format":"uuid"}},"type":"object","additionalProperties":false},{"title":"milestoneByRelationId","required":["milestoneRelationId"],"properties":{"milestoneRelationId":{"type":"string"}},"type":"object","additionalProperties":false},{"title":"milestoneById","required":["milestoneId"],"properties":{"milestoneId":{"type":"string","format":"uuid"}},"type":"object","additionalProperties":false},{"title":"lineTarget","required":["code"],"properties":{"code":{"type":"string","minLength":3,"maxLength":32}},"type":"object","additionalProperties":false}]},"filterCode":{"description":"In this field you can specify which transaction items filters you want to use in condition","type":"string"},"aggregation":{"description":"Available only for transaction.items","required":["type"],"properties":{"type":{"type":"string","enum":["sum","count"]},"field":{"type":"string"}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},"condition":{"$ref":"#/components/schemas/Condition"}},"type":"object"},"Condition":{"required":["operator","value"],"properties":{"operator":{"type":"string","enum":["eq","neq","between","not_between","starts_with","ends_with","match","not_match","gt","gte","lt","lte","is_after","is_before","in","not_in","one_of","not_one_of","in_value_group","not_in_value_group","one_of_value_group","not_one_of_value_group"]},"value":{"oneOf":[{"description":"For operators `eq`, `neq`, `starts_with`, `ends_with`, `match`, `not_match` the value can be a string. For `match` and `not_match`, the string must be a valid regular expression.","type":"string"},{"description":"For operators `eq`, `neq`, `gt`, `gte`, `lt`, `lte` , the value can be a number.","type":"number"},{"description":"For operators `eq`, `neq`, the value can be a bool.","type":"boolean"},{"title":"datetime","description":"For operators `eq`, `neq` `is_after`, `is_before`, the value can be a datetime.","type":"string","format":"datetime","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,3})?Z$"},{"title":"array","type":"array","items":{"description":"For `in`, `not_in`, `one_of`, `not_one_of` operators, the values can be in array.","oneOf":[{"type":"number"},{"type":"string"},{"title":"custom attribute","properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"}]}},{"title":"between","description":"For `between`, `not_between` operators, the value is an object with 'from' and 'to'.","required":["from","to"],"properties":{"from":{"oneOf":[{"type":"number"},{"title":"datetime","type":"string","format":"datetime"}]},"to":{"oneOf":[{"type":"number"},{"title":"datetime","type":"string","format":"datetime"}]}},"type":"object"},{"title":"group of values","required":["groupValuesIds"],"properties":{"groupValuesIds":{"description":"For `in_value_group`, `not_in_value_group` operators, the value is an object with `groupValuesIds` array.","type":"array","items":{"type":"string","format":"uuid"}}},"type":"object"},{"title":"one of group of values","description":"For `one_of_value_group`, `not_one_of_value_group` operators, the value is an object with labelKey and `groupValuesIds` array.","required":["groupValuesIds","labelKey"],"properties":{"labelKey":{"type":"string"},"groupValuesIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"type":"object"}]}},"type":"object","additionalProperties":false},"LineTarget":{"required":["code"],"properties":{"code":{"type":"string","minLength":3,"maxLength":32},"name":{"type":"string","maxLength":32},"selector":{"description":"Send lines or sets, not both. An empty selector matches every line.","properties":{"lines":{"description":"Filters are AND-ed; an empty list matches every line.","properties":{"filters":{"type":"array","items":{"required":["value","condition"],"properties":{"value":{"required":["field"],"properties":{"field":{"type":"string","enum":["sku","name","qty","grossValue","category","maker","labels","catalogSku","catalogCategory","catalogBrand","catalogAttributes"]}},"type":"object","additionalProperties":false},"condition":{"$ref":"#/components/schemas/Condition"},"dataEnteredManually":{"type":"boolean"}},"type":"object","additionalProperties":false}}},"type":"object","additionalProperties":false},"sets":{"description":"Every part must be satisfied for one set to form.","type":"array","items":{"required":["requirements","filters"],"properties":{"requirements":{"required":["qtyPerSet"],"properties":{"qtyPerSet":{"type":"number","minimum":0.001,"maximum":100000000,"exclusiveMaximum":true}},"type":"object","additionalProperties":false},"filters":{"type":"array","minItems":1,"items":{"required":["value","condition"],"properties":{"value":{"required":["field"],"properties":{"field":{"type":"string","enum":["sku","name","qty","grossValue","category","maker","labels","catalogSku","catalogCategory","catalogBrand","catalogAttributes"]}},"type":"object","additionalProperties":false},"condition":{"$ref":"#/components/schemas/Condition"},"dataEnteredManually":{"type":"boolean"}},"type":"object","additionalProperties":false}}},"type":"object","additionalProperties":false}}},"type":"object","additionalProperties":false}},"type":"object","additionalProperties":false},"TransactionItemsFilters":{"required":["code"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"filters":{"type":"array","items":{"required":["value","condition"],"properties":{"value":{"required":["field"],"properties":{"field":{"type":"string","enum":["sku","name","qty","grossValue","category","maker","labels","catalogSku","catalogCategory","catalogBrand","catalogAttributes"]}},"type":"object","additionalProperties":false},"condition":{"$ref":"#/components/schemas/Condition"},"dataEnteredManually":{"type":"boolean"}},"type":"object","additionalProperties":false}}},"type":"object","additionalProperties":false},"Limit":{"properties":{"points":{"required":["value"],"properties":{"interval":{"properties":{"type":{"type":"string"},"value":{"type":"integer","deprecated":true}},"type":"object"},"value":{"type":"number","format":"float"}},"type":"object"},"pointsPerMember":{"required":["value"],"properties":{"interval":{"properties":{"type":{"type":"string"},"value":{"type":"integer","deprecated":true}},"type":"object"},"value":{"type":"number","format":"float"}},"type":"object"},"executionsPerMember":{"required":["value"],"properties":{"interval":{"properties":{"type":{"type":"string"},"value":{"type":"integer","deprecated":true}},"type":"object"},"value":{"type":"number","format":"float"}},"type":"object"}},"type":"object"},"CampaignTranslationsResponse":{"type":"array","items":{"properties":{"name":{"type":"string"},"description":{"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"}},"type":"object"}},"Visibility":{"description":"Visibility settings for the campaign. Optional field.","properties":{"target":{"type":"string","enum":["segment","tier","none"]},"tiers":{"description":"Visibility settings for the campaign. Optional field.","type":"array","items":{"type":"string"}},"segments":{"description":"Visibility settings for the campaign. Optional field.","type":"array","items":{"type":"string"}}},"type":"object","additionalProperties":false},"SearchableTotalResponse":{"required":["all","filtered","estimated"],"properties":{"all":{"type":"integer","deprecated":true},"filtered":{"type":"integer","deprecated":true},"estimated":{"description":"Field estimated is used to show that the results are estimated. It might happen when there are more than 5000 results due to performance optimization.","type":"boolean","deprecated":true}},"type":"object","deprecated":true},"MultiReferralCampaignResponse":{"properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"trigger":{"type":"string"},"campaignId":{"type":"string","format":"uuid"},"activity":{"properties":{"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time","nullable":true}},"type":"object"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"displayOrder":{"type":"number"},"multiLevel":{"type":"number"},"rules":{"type":"array","items":{"properties":{"name":{"type":"string"},"description":{"type":"string"},"conditions":{"type":"array","items":{"properties":{"operator":{"type":"string"},"data":{"type":"array","items":{"type":"string"}},"attribute":{"type":"string"}},"type":"object"}},"effects":{"type":"array","items":{"properties":{"effect":{"type":"string"},"pointsRule":{"type":"string"}},"type":"object"}}},"type":"object"}},"limits":{"$ref":"#/components/schemas/Limit"},"labels":{"type":"array","items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"translations":{"$ref":"#/components/schemas/CampaignTranslationsResponse"},"limitUsages":{"properties":{"points":{"description":"These fields are not updated immediately after the status changes.","properties":{"currentValue":{"type":"number","format":"float"},"limitValue":{"type":"number","format":"float"},"remaining":{"type":"number","format":"float"},"interval":{"properties":{"type":{"type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]},"value":{"type":"integer","deprecated":true}},"type":"object"}},"type":"object"}},"type":"object"},"visibility":{"$ref":"#/components/schemas/Visibility"},"customFields":{"type":"object","nullable":true,"additionalProperties":{"type":"object","additionalProperties":true}}},"type":"object"},"UniqueCodeCampaignResponse":{"properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"trigger":{"type":"string"},"campaignId":{"type":"string","format":"uuid"},"activity":{"properties":{"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time","nullable":true}},"type":"object"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"displayOrder":{"type":"number"},"rules":{"type":"array","items":{"properties":{"name":{"type":"string"},"description":{"type":"string"},"conditions":{"type":"array","items":{"properties":{"operator":{"type":"string"},"data":{"type":"array","items":{"type":"string"}},"attribute":{"type":"string"}},"type":"object"}},"effects":{"type":"array","items":{"properties":{"effect":{"type":"string"},"pointsRule":{"type":"string"}},"type":"object"}}},"type":"object"}},"limits":{"$ref":"#/components/schemas/Limit"},"labels":{"type":"array","items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"translations":{"$ref":"#/components/schemas/CampaignTranslationsResponse"},"eventCodeAttribute":{"type":"string"},"codeGenerator":{"properties":{"characterSet":{"type":"string"},"length":{"type":"integer"},"prefix":{"type":"string"}},"type":"object"},"limitUsages":{"properties":{"points":{"description":"These fields are not updated immediately after the status changes.","properties":{"currentValue":{"type":"number","format":"float"},"limitValue":{"type":"number","format":"float"},"remaining":{"type":"number","format":"float"},"interval":{"properties":{"type":{"type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]},"value":{"type":"integer","deprecated":true}},"type":"object"}},"type":"object"}},"type":"object"},"visibility":{"$ref":"#/components/schemas/Visibility"},"customFields":{"type":"object","nullable":true,"additionalProperties":{"type":"object","additionalProperties":true}}},"type":"object"},"TimeTriggerCampaignResponse":{"properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"trigger":{"type":"string"},"campaignId":{"type":"string","format":"uuid"},"activity":{"properties":{"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time","nullable":true}},"type":"object"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"displayOrder":{"type":"number"},"multiLevel":{"type":"number"},"rules":{"type":"array","items":{"properties":{"name":{"type":"string"},"description":{"type":"string"},"conditions":{"type":"array","items":{"properties":{"operator":{"type":"string"},"data":{"type":"array","items":{"type":"string"}},"attribute":{"type":"string"}},"type":"object"}},"effects":{"type":"array","items":{"properties":{"effect":{"type":"string"},"pointsRule":{"type":"string"}},"type":"object"}}},"type":"object"}},"limits":{"$ref":"#/components/schemas/Limit"},"labels":{"type":"array","items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"translations":{"$ref":"#/components/schemas/CampaignTranslationsResponse"},"limitUsages":{"properties":{"points":{"description":"These fields are not updated immediately after the status changes.","properties":{"currentValue":{"type":"number","format":"float"},"limitValue":{"type":"number","format":"float"},"remaining":{"type":"number","format":"float"},"interval":{"properties":{"type":{"type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]},"value":{"type":"integer","deprecated":true}},"type":"object"}},"type":"object"}},"type":"object"},"visibility":{"$ref":"#/components/schemas/Visibility"},"audience":{"$ref":"#/components/schemas/Audience"},"triggerStrategy":{"$ref":"#/components/schemas/TriggerStrategy"},"customFields":{"type":"object","nullable":true,"additionalProperties":{"type":"object","additionalProperties":true}}},"type":"object"},"Audience":{"description":"Audience settings for the campaign. Optional field.","properties":{"target":{"type":"string","enum":["segment","tier"]},"tiers":{"type":"array","items":{"type":"string"}},"segments":{"type":"array","items":{"type":"string"}}},"type":"object","nullable":true},"TriggerStrategy":{"properties":{"type":{"type":"string","enum":["birthday","registration_anniversary","daily","weekly","monthly"]},"executionSchedule":{"description":"Required for `weekly` and `monthly` type of campaign.","properties":{"dayOfWeek":{"description":"List of days when campaign should be executed. 0 for Sunday, 6 for Saturday.","type":"array","items":{"type":"integer","enum":[0,1,2,3,4,5,6]},"nullable":true},"dayOfMonth":{"description":"List of month days when campaign should be executed. 'L' for the last day of the month.","type":"array","items":{"oneOf":[{"type":"integer","enum":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]},{"type":"string","enum":["L"]}]},"nullable":true}},"type":"object","nullable":true}},"type":"object"},"LeaderboardCampaignResponse":{"description":"Campaign","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["direct","referral"]},"trigger":{"type":"string","enum":["leaderboard"]},"campaignId":{"type":"string","format":"uuid"},"activity":{"properties":{"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"}},"type":"object"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"displayOrder":{"type":"number"},"rules":{"type":"array","items":{"properties":{"name":{"type":"string"},"description":{"type":"string"},"conditions":{"type":"array","items":{"oneOf":[{"title":"Condition","properties":{"operator":{"type":"string"},"data":{"type":"array","items":{"type":"string"}},"attribute":{"type":"string"}},"type":"object"},{"$ref":"#/components/schemas/NewCondition"}]}},"effects":{"type":"array","items":{"properties":{"effect":{"type":"string"},"pointsRule":{"type":"string"}},"type":"object"}}},"type":"object"}},"limits":{"$ref":"#/components/schemas/Limit"},"labels":{"type":"array","items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"translations":{"$ref":"#/components/schemas/CampaignTranslationsResponse"},"limitUsages":{"properties":{"points":{"description":"These fields are not updated immediately after the status changes.","properties":{"currentValue":{"type":"number","format":"float"},"limitValue":{"type":"number","format":"float"},"remaining":{"type":"number","format":"float"},"interval":{"properties":{"type":{"type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]},"value":{"type":"integer","deprecated":true}},"type":"object"}},"type":"object"}},"type":"object"},"visibility":{"$ref":"#/components/schemas/Visibility"},"leaderboard":{"$ref":"#/components/schemas/LeaderboardResponse"},"customFields":{"type":"object","nullable":true,"additionalProperties":{"type":"object","additionalProperties":true}}},"type":"object"},"LeaderboardResponse":{"properties":{"metric":{"required":["type","walletTypeCode"],"properties":{"type":{"type":"string","enum":["earned_units_cumulative"]},"walletTypeCode":{"type":"string"}},"type":"object"},"cycles":{"required":["type"],"properties":{"type":{"type":"string","enum":["end_of_the_month"]},"code":{"type":"string"},"recalculatedAt":{"type":"string","format":"datetime"}},"type":"object"},"groupingField":{"description":"Present only for grouped leaderboards. `groupsCount` reflects the number of distinct group values in the running iteration (0 when no iteration is running). `groupsLimit` is the per-environment hard cap.\n","required":["type","key","groupsCount","groupsLimit"],"properties":{"type":{"type":"string","enum":["address_field","custom_attribute"]},"key":{"type":"string"},"groupsCount":{"type":"integer","minimum":0},"groupsLimit":{"type":"integer","minimum":1}},"type":"object"}},"type":"object"},"ChallengeCampaignResponse":{"description":"Challenge Campaign","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["direct","referral"]},"trigger":{"type":"string","enum":["challenge"]},"campaignId":{"type":"string","format":"uuid"},"activity":{"properties":{"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"}},"type":"object"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"displayOrder":{"type":"number"},"rules":{"type":"array","items":{"properties":{"name":{"type":"string"},"description":{"type":"string"},"conditions":{"type":"array","items":{"oneOf":[{"title":"Condition","properties":{"operator":{"type":"string"},"data":{"type":"array","items":{"type":"string"}},"attribute":{"type":"string"}},"type":"object"},{"$ref":"#/components/schemas/NewCondition"}]}},"effects":{"type":"array","items":{"properties":{"effect":{"type":"string"},"pointsRule":{"type":"string"}},"type":"object"}}},"type":"object"}},"limits":{"$ref":"#/components/schemas/Limit"},"labels":{"type":"array","items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"translations":{"$ref":"#/components/schemas/CampaignTranslationsResponse"},"limitUsages":{"properties":{"points":{"description":"These fields are not updated immediately after the status changes.","properties":{"currentValue":{"type":"number","format":"float"},"limitValue":{"type":"number","format":"float"},"remaining":{"type":"number","format":"float"},"interval":{"properties":{"type":{"type":"string","enum":["calendarHours","calendarDays","calendarWeeks","calendarMonths","calendarYears"]},"value":{"type":"integer"}},"type":"object"}},"type":"object"}},"type":"object"},"visibility":{"$ref":"#/components/schemas/Visibility"},"milestones":{"type":"array","items":{"$ref":"#/components/schemas/Milestone"}},"challengeAvailability":{"$ref":"#/components/schemas/AchievementActivity"},"challengeLimit":{"$ref":"#/components/schemas/ChallengeLimit"},"customFields":{"type":"object","nullable":true,"additionalProperties":{"type":"object","additionalProperties":true}}},"type":"object"},"Milestone":{"properties":{"translations":{"properties":{"en":{"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object"}},"type":"object"},"milestoneId":{"type":"string"},"completeRule":{"$ref":"#/components/schemas/CompleteRule"},"aggregation":{"$ref":"#/components/schemas/Aggregation"},"uniqueReferee":{"type":"boolean"},"event":{"type":"string"},"trigger":{"type":"string"},"type":{"type":"string"},"conditions":{"type":"array","items":{"type":"object"}},"limit":{"$ref":"#/components/schemas/ChallengeLimit"}},"type":"object"},"CompleteRule":{"properties":{"periodGoal":{"oneOf":[{"type":"string"},{"type":"number"}]},"period":{"$ref":"#/components/schemas/Period"},"uniqueAttribute":{"type":"string"}},"type":"object"},"Period":{"properties":{"type":{"type":"string"},"consecutive":{"type":"integer"},"value":{"type":"integer"}},"type":"object"},"Aggregation":{"properties":{"type":{"type":"string"},"rule":{"type":"string"}},"type":"object"},"ChallengeLimit":{"properties":{"interval":{"$ref":"#/components/schemas/LimitInterval"},"value":{"type":"integer"}},"type":"object"},"LimitInterval":{"properties":{"type":{"type":"string"},"value":{"type":"integer"}},"type":"object"},"AchievementActivity":{"properties":{"data":{"oneOf":[{"type":"string"},{"properties":{"from":{"type":"string"},"to":{"type":"string"}},"type":"object"},{"type":"array","items":{"type":"string"}}]},"operator":{"type":"string"}},"type":"object"},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/campaign":{"get":{"tags":["Campaign"],"summary":"Get campaigns list","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nThis method returns detailed information about all Campaigns created in the system.\\n\\n\nIf sorting is not chosen, the rows will be returned in an unspecified order.  \\n\nTo sort a result, use an `_orderBy` parameter in query.\n","operationId":"campaignGetList","parameters":[{"$ref":"#/components/parameters/storeCode"},{"name":"type","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","enum":["direct","referral"]}},{"name":"trigger","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","enum":["transaction","return_transaction","custom_event","internal_event","time","achievement","custom_event_unique_code","challenge"]}},{"name":"event","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"campaignId","in":"query","description":"Campaign ID","required":false,"style":"deepObject","explode":true,"schema":{"type":"string","format":"uuid"}},{"name":"name","in":"query","description":"Campaign name","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"active","in":"query","description":"Active","required":false,"style":"deepObject","explode":true,"schema":{"type":"boolean"}},{"name":"available","in":"query","description":"Available","required":false,"schema":{"type":"boolean"}},{"name":"startsAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endsAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"labels","in":"query","description":"Filter with Campaign custom attributes.\n\nExample: `labels=(key;value)`\n","required":false,"style":"deepObject","explode":true,"schema":{"type":"string"}},{"name":"format","in":"query","description":"If set to html, the descriptions will be in HTML format. Omit for raw output.","required":false,"style":"deepObject","schema":{"type":"string","format":"html|raw"}},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/itemsOnPage"},{"$ref":"#/components/parameters/orderBy"}],"responses":{"200":{"description":"List of campaigns.","content":{"application/json":{"schema":{"oneOf":[{"title":"Campaign","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CampaignResponse"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object"},{"title":"MultiReferralCampaign","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MultiReferralCampaignResponse"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object"},{"title":"UniqueCodeCampaign","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UniqueCodeCampaignResponse"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object"},{"title":"TimeTriggerCampaign","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TimeTriggerCampaignResponse"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object"},{"title":"LeaderboardCampaign","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LeaderboardCampaignResponse"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object"},{"title":"ChallengeCampaign","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ChallengeCampaignResponse"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}},"type":"object"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/Unauthorized"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"}}}}}}
````


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.openloyalty.io/api-reference/campaign/get-campaigns-list.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
