---
title: Event Campaigns
slug: event-campaigns
createdAt: 2026-10-20T09:51:11.729Z
---

{
  "id": "xZ6bQfu9jmIf1xIpscV19",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://tnapi.ticketpay.de/exports/campaigns",
    "servers": [
      {
        "url": "https://tnapi.ticketpay.de/exports/campaigns",
        "description": "The production API server"
      }
    ],
    "name": "Event Campaigns",
    "description": "<p>With this endpoint you can get a list of your campaigns, if you use marketing activities. The default output is JSON.\nFor results in a CSV file please extend the url with .csv\nIf you use time filter please note that this is used by default to the 'updated_iso' field. If you wish to use it to the 'created_iso' field please use filter_by parameter.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "kind": "required",
          "name": "Authorization",
          "type": "string",
          "description": "<p>To authentificate please use your API-KEY created here <a href=\"https://iam.ticketpay.de/api-keys\" target=\"_blank\">https://iam.ticketpay.de/api-keys</a>. Please give this API-KEY the role Export.</p>"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "from",
          "type": "string",
          "example": "2025-05-01T00:00:00.000",
          "description": "<p>A date or datetime parameter to select the data start with this date. In default this filter is used in the field updated_iso.</p>"
        },
        {
          "kind": "optional",
          "name": "to",
          "type": "string",
          "example": "2025-05-05",
          "description": "<p>A date or datetime parameter to select the data end with this date. In default this filter is used in the field updated_iso.</p>"
        },
        {
          "kind": "optional",
          "name": "filter_by",
          "type": "string",
          "example": "created_iso",
          "description": "<p>Datetime filter field. Default value is updated_iso. Possible values are created_iso and updated_iso</p>"
        },
        {
          "kind": "optional",
          "name": "time_period",
          "type": "string",
          "description": "<p>If you dont want to use from and to you can use a time period to select data with a special period. Possible values are months, days, hours, minutes, seconds</p>"
        },
        {
          "kind": "optional",
          "name": "time_range",
          "type": "integer",
          "description": "<p>A time range is needed if you use the time_period parameter to select data. For exapmle you want tho get the last two months - time_period is months and time_range is 2</p>"
        },
        {
          "kind": "optional",
          "name": "id",
          "type": "integer",
          "description": "To filter the results you can pass here the id of your campaign"
        },
        {
          "kind": "optional",
          "name": "event_id",
          "type": "string",
          "description": "To filter the results you can pass here an event id. The results will put all campaigns only used in this event."
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Response for get campaigns.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "get_campaigns",
            "schema": [
              {
                "name": "total",
                "kind": "optional",
                "type": "integer",
                "description": "",
                "example": 4
              },
              {
                "name": "page",
                "kind": "optional",
                "type": "integer",
                "description": "",
                "example": 1
              },
              {
                "name": "size",
                "kind": "optional",
                "type": "integer",
                "description": "",
                "example": 4
              },
              {
                "name": "data",
                "kind": "optional",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1470
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "fbaction"
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "My Facebook campaign"
                  },
                  {
                    "name": "event_id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 110250
                  },
                  {
                    "name": "campaign_link",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "https://shop.ticketpay.example/XXSADS?campaign=fbactioin"
                  },
                  {
                    "name": "count_clicks",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 43
                  },
                  {
                    "name": "count_sales",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 5
                  },
                  {
                    "name": "conversion_rate",
                    "kind": "optional",
                    "type": "float",
                    "description": "",
                    "example": 0.116
                  },
                  {
                    "name": "sum_sales",
                    "kind": "optional",
                    "type": "integer",
                    "description": "in euro cents",
                    "example": 35000
                  },
                  {
                    "name": "average_cart",
                    "kind": "optional",
                    "type": "integer",
                    "description": "in euro cents",
                    "example": 7000
                  },
                  {
                    "name": "created_iso",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "2025-10-01T10:00:10+02:00"
                  },
                  {
                    "name": "updated_iso",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "2022-10-08T10:23:11+02:00"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/get_campaigns",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Response for a failed authentification.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "not_authorized",
            "schema": [
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "",
                "example": "Unauthorized"
              }
            ],
            "modelRef": "#/components/schemas/not_authorized",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://tnapi.ticketpay.de/exports/campaigns \\\n     --header 'accept: application/json' \\\n     --header 'authorization: string'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"authorization\", \"string\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://tnapi.ticketpay.de/exports/campaigns\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://tnapi.ticketpay.de/exports/campaigns\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"authorization\"] = \"string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://tnapi.ticketpay.de/exports/campaigns\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'authorization': 'string'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Response for get campaigns.\n{\n  \"total\": 4,\n  \"page\": 1,\n  \"size\": 4,\n  \"data\": [\n    {\n      \"id\": 1470,\n      \"name\": \"fbaction\",\n      \"description\": \"My Facebook campaign\",\n      \"event_id\": 110250,\n      \"campaign_link\": \"https://shop.ticketpay.example/XXSADS?campaign=fbactioin\",\n      \"count_clicks\": 43,\n      \"count_sales\": 5,\n      \"conversion_rate\": 0.116,\n      \"sum_sales\": 35000,\n      \"average_cart\": 7000,\n      \"created_iso\": \"2025-10-01T10:00:10+02:00\",\n      \"updated_iso\": \"2022-10-08T10:23:11+02:00\"\n    }\n  ]\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Response for a failed authentification.\n{\n  \"message\": \"Unauthorized\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}