---
title: /v2/markets
slug: campaign-reporting-apis/v2markets
docTags: 
createdAt: 2026-03-25T10:57:30.256Z
---

{
  "id": "-OK5sKjlhNL7ig7DABbmR",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://<pcm-domain>/v2/markets",
    "servers": [
      {
        "url": "https://<pcm-domain>/v2/markets",
        "description": "Generated server url"
      }
    ],
    "name": "",
    "description": "<p>Retrieves all markets with their respective market id, country, countryCode and currency.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "",
            "customType": "MarketResponse[]",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "",
                "example": 0,
                "format": "int32"
              },
              {
                "name": "country",
                "kind": "optional",
                "type": "string",
                "description": "",
                "example": ""
              },
              {
                "name": "countryCode",
                "kind": "optional",
                "type": "string",
                "description": "",
                "example": ""
              },
              {
                "name": "currency",
                "kind": "optional",
                "type": "string",
                "description": "",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/MarketResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "WTH-8xE_5OdQD2j-CNSLC",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://<pcm-domain>/v2/markets \\\n     --header 'accept: application/json'"
        },
        {
          "id": "MGEK4KMyhTgTpZn26oeD2",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://<pcm-domain>/v2/markets\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "YU3xTt8hlot4fC1rMTt3s",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://<pcm-domain>/v2/markets\")\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\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "-FymsXVdL-lGxY6zedtYp",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://<pcm-domain>/v2/markets\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "WTH-8xE_5OdQD2j-CNSLC"
    },
    "results": {
      "languages": [
        {
          "id": "Aj7fy-Y99vXwoxhNTrp8f",
          "language": "200",
          "code": "// OK\n[\n  {\n    \"id\": \"\",\n    \"country\": \"\",\n    \"countryCode\": \"\",\n    \"currency\": \"\"\n  }\n]"
        },
        {
          "id": "jE9DriaRQ0sVOY4xUhfS6",
          "language": "401",
          "code": "// Unauthorized\n"
        },
        {
          "id": "KJge_tyBsHf4WFsl8goHm",
          "language": "403",
          "code": "// Forbidden\n"
        }
      ],
      "selectedLanguageId": "Aj7fy-Y99vXwoxhNTrp8f"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}