> 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 the page with results, starts from 1.\n\n**Not for iterating over large data sets.** The cost of a request grows with the page number: the database still reads and discards every row of the previous pages, so deep pages are slow and load the whole API. Use `_page` to browse the first pages of a result. The maximum value of `_page` is limited on some endpoints, see [Limits](https://help.openloyalty.io/technical-guide/api-fundamentals/limits).\n\nTo fetch all records, or any large volume of them, use the `_scroll` parameter where the endpoint offers it, see [Scroll mechanism for pages](https://help.openloyalty.io/technical-guide/api-fundamentals/scroll-mechanism-for-pages).\n","required":false,"schema":{"type":"integer","default":1,"minimum":1}},"itemsOnPage":{"name":"_itemsOnPage","in":"query","description":"Items on one page, in both `_page` and `_scroll` pagination.\n","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"},"ruleClubbing":{"description":"`true` when the campaign's rules stack, `false` when each transaction line is paid by the first rule covering it; see `ruleClubbing` on the request. Present only on a campaign with the `transaction` trigger; absent on every other.","type":"boolean"},"rules":{"type":"array","items":{"properties":{"ruleKey":{"description":"The rule's handle. Send it back on `PUT` for every rule you keep: a rule sent without it is saved as a new rule with a new key, and a stored rule left out of the `PUT` is deleted. On a `transaction` campaign the new rule's per-SKU allowances also start from zero.","type":"string"},"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":{"description":"Absent on a `give_points` effect that declares its payout through `unitsRule`.","type":"string"},"unitsRule":{"description":"Present only for a `give_points` effect that declares its payout this way.","allOf":[{"$ref":"#/components/schemas/UnitsRule"}]},"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":"The line target whose lines `unitsRule` measures. Present only on a `give_points` effect with `unitsRule` that names a line target; absent when `unitsRule` measures the whole transaction.","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"}},"limits":{"description":"The rule's per-SKU caps; see `rules[].limits` on the request. Absent when the rule has none.","type":"array","items":{"$ref":"#/components/schemas/CampaignRuleLimitResponse"}}},"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":{"description":"`customer.daysSinceRegistration` is available only to `time` campaigns with the `daily` trigger strategy. It holds the whole calendar days between the member's registration and the run date, in the store timezone, and accepts only the `eq` operator with a whole number of days from 0 to 7305 (twenty years, the same ceiling as the segment criterion `member_registration_date`).","type":"string","enum":["customer.email","customer.daysSinceRegistration","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},"UnitsRule":{"description":"How a `give_points` effect computes the units it grants.","required":["applyTo","amount"],"properties":{"applyTo":{"description":"The measure `amount` is multiplied by, read from the line target `relatedLineTarget` names, or from the whole transaction when the effect declares no `relatedLineTarget`.\n\n* `flat` — `amount` once. Booked against a line target, it pays only when the target matched at least one line, and nothing otherwise.\n* `quantity` — `amount` × the quantity bought: of the target's lines, of the units its sets consumed, or of every line of the transaction.\n* `value` — `amount` × the gross value: of the target's lines, of the lines its sets consumed, or of the whole transaction.\n* `count` — `amount` × the number of sets formed. Accepted only when `relatedLineTarget` names a line target that selects `sets`; on a `lines` target or without `relatedLineTarget` the request is rejected with `400` on `rules.N.effects.M.unitsRule.applyTo`.\n\nThe effect's `transform` scales the result afterwards.","type":"string","enum":["flat","quantity","count","value"]},"amount":{"description":"Units granted per measure unit. Must be greater than zero and at most 10 000 000; anything else is rejected with `400` on `rules.N.effects.M.unitsRule.amount`.","type":"number","exclusiveMinimum":true,"minimum":0,"maximum":10000000}},"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},"CampaignRuleLimitResponse":{"description":"A rule's per-SKU cap, as stored. What each field means is described on the request's `rules[].limits`.","required":["metric","scope","countedPer","value"],"properties":{"metric":{"type":"string","enum":["items","units"]},"scope":{"type":"string","enum":["perMember","allMembers"]},"countedPer":{"type":"string","enum":["sku","rule"]},"value":{"description":"Always a number (`5.0`, `2.35`), whichever form the request used.","type":"number"},"interval":{"description":"Absent for a limit that counts over the campaign's lifetime.","required":["type"],"properties":{"type":{"type":"string","enum":["calendarDays","calendarWeeks","calendarMonths","calendarYears"]}},"type":"object"}},"type":"object"},"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"},"ruleClubbing":{"description":"`true` when the campaign's rules stack, `false` when each transaction line is paid by the first rule covering it; see `ruleClubbing` on the request. Present only on a campaign with the `transaction` trigger; absent on every other.","type":"boolean"},"rules":{"type":"array","items":{"properties":{"ruleKey":{"description":"The rule's handle. Send it back on `PUT` for every rule you keep: a rule sent without it is saved as a new rule with a new key, and a stored rule left out of the `PUT` is deleted. On a `transaction` campaign the new rule's per-SKU allowances also start from zero.","type":"string"},"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":{"description":"Absent on a `give_points` effect that declares its payout through `unitsRule`.","type":"string"},"relatedLineTarget":{"description":"The line target whose lines `unitsRule` measures. Present only on a `give_points` effect with `unitsRule` that names a line target; absent when `unitsRule` measures the whole transaction.","type":"string","minLength":3,"maxLength":32},"unitsRule":{"description":"Present only for a `give_points` effect that declares its payout this way.","allOf":[{"$ref":"#/components/schemas/UnitsRule"}]}},"type":"object"}},"limits":{"description":"The rule's per-SKU caps; see `rules[].limits` on the request. Absent when the rule has none.","type":"array","items":{"$ref":"#/components/schemas/CampaignRuleLimitResponse"}}},"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":{"ruleKey":{"description":"The rule's handle. Send it back on `PUT` for every rule you keep: a rule sent without it is saved as a new rule with a new key, and a stored rule left out of the `PUT` is deleted.","type":"string"},"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":{"ruleKey":{"description":"The rule's handle. Send it back on `PUT` for every rule you keep: a rule sent without it is saved as a new rule with a new key, and a stored rule left out of the `PUT` is deleted.","type":"string"},"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":{"ruleKey":{"description":"The rule's handle. Send it back on `PUT` for every rule you keep: a rule sent without it is saved as a new rule with a new key, and a stored rule left out of the `PUT` is deleted.","type":"string"},"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":{"ruleKey":{"description":"The rule's handle. Send it back on `PUT` for every rule you keep: a rule sent without it is saved as a new rule with a new key, and a stored rule left out of the `PUT` is deleted.","type":"string"},"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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
