---
title: Get Custom Target Details
slug: metadata-api/get-custom-target-details
description: The authentication, path parameters, and responses for the GET operation to obtain details about a custom target in the Monetate Metadata API
image:  https://archbee-image-uploads.s3.amazonaws.com/ceIfEvQHzQk1IVxoRWUh7/K9eTL4jKm7UQINb6zNziJ-20250912-181225.png
docTags: 
createdAt: 2024-06-26T17:38:51.912Z
---

{
  "id": "h5Di0OF99Xb9_DsaK6gmQ",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/customtarget/{customtarget-id}",
    "servers": [
      {
        "url": "https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/customtarget/{customtarget-id}"
      }
    ],
    "name": "Get Custom Target Details",
    "description": "Returns detailed information about a single custom target.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "customtarget-id",
          "type": "integer",
          "description": "The identifier of a custom target."
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "TokenAuthentication",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>The Monetate Metadata API uses Token Authentication. Requests to the Metadata API must include a valid, active authentication token. Include an <code>Authorization</code> header with the value <code>Token [token_string]</code> with every request. See <a href=\"https://developer.monetate.com/auth-api\" target=\"_blank\">Auth API</a> for information on obtaining the <em>token_string</em>.</p>",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "A single CustomTarget definition.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "CustomTargetResponse",
            "schema": [
              {
                "name": "meta",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseMeta",
                "customType": "ResponseMeta",
                "schema": [
                  {
                    "name": "code",
                    "kind": "required",
                    "type": "integer",
                    "description": "The http response code for this response.",
                    "example": 200
                  },
                  {
                    "name": "warnings",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of warnings associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "errors",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of errors associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              },
              {
                "name": "data",
                "kind": "required",
                "type": "object",
                "description": "Representation of a Custom Target object.",
                "example": "{\"id\":132,\"title\":\"Example CustomTarget Title\",\"is_identifier\":true,\"collects_person_id\":true}",
                "modelRef": "#/components/schemas/CustomTarget",
                "customType": "CustomTarget",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer",
                    "readOnly": true,
                    "description": "Monetate internal identifier for custom targets.",
                    "example": 0
                  },
                  {
                    "name": "title",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "The title of the custom target.",
                    "example": ""
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "The description of the custom target.",
                    "example": ""
                  },
                  {
                    "name": "is_identifier",
                    "kind": "optional",
                    "type": "boolean",
                    "readOnly": true,
                    "description": "Whether the custom target collects an identifier.",
                    "example": ""
                  },
                  {
                    "name": "collects_person_id",
                    "kind": "optional",
                    "type": "boolean",
                    "readOnly": true,
                    "description": "Whether the custom target collects your retailer person id.",
                    "example": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/CustomTargetResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized. \n\nThe request did not include a token, or the token provided was invalid. Please ensure that your token is correct and that the Authorization header is properly formatted.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Response",
            "schema": [
              {
                "name": "meta",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseMeta",
                "customType": "ResponseMeta",
                "schema": [
                  {
                    "name": "code",
                    "kind": "required",
                    "type": "integer",
                    "description": "The http response code for this response.",
                    "example": 200
                  },
                  {
                    "name": "warnings",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of warnings associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "errors",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of errors associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              },
              {
                "name": "data",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseAnyData",
                "customType": "ResponseAnyData",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Response",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Forbidden.\n\nThe request included a token that has been revoked. Please contact your account administrator to generate a new token.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Response",
            "schema": [
              {
                "name": "meta",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseMeta",
                "customType": "ResponseMeta",
                "schema": [
                  {
                    "name": "code",
                    "kind": "required",
                    "type": "integer",
                    "description": "The http response code for this response.",
                    "example": 200
                  },
                  {
                    "name": "warnings",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of warnings associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "errors",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of errors associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              },
              {
                "name": "data",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseAnyData",
                "customType": "ResponseAnyData",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Response",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not found.\n\nThe resource you are trying to fetch does not exist, or has been deleted.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Response",
            "schema": [
              {
                "name": "meta",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseMeta",
                "customType": "ResponseMeta",
                "schema": [
                  {
                    "name": "code",
                    "kind": "required",
                    "type": "integer",
                    "description": "The http response code for this response.",
                    "example": 200
                  },
                  {
                    "name": "warnings",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of warnings associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "errors",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of errors associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              },
              {
                "name": "data",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseAnyData",
                "customType": "ResponseAnyData",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Response",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Unknown error.\n\nPlease try again or contact your account manager for more information.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Response",
            "schema": [
              {
                "name": "meta",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseMeta",
                "customType": "ResponseMeta",
                "schema": [
                  {
                    "name": "code",
                    "kind": "required",
                    "type": "integer",
                    "description": "The http response code for this response.",
                    "example": 200
                  },
                  {
                    "name": "warnings",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of warnings associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "errors",
                    "kind": "optional",
                    "type": "array",
                    "description": "A list of errors associated with this response.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              },
              {
                "name": "data",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ResponseAnyData",
                "customType": "ResponseAnyData",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Response",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "lkxPkjjC4UbdS1iz3Ynv9",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/customtarget/{customtarget-id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "9qkzCRloaTVdvr4rOjFHG",
          "language": "php",
          "label": "PHP",
          "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n   CURLOPT_URL => 'https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/customtarget/{customtarget-id}',\n   CURLOPT_RETURNTRANSFER => true,\n   CURLOPT_ENCODING => '',\n   CURLOPT_MAXREDIRS => 10,\n   CURLOPT_TIMEOUT => 0,\n   CURLOPT_FOLLOWLOCATION => true,\n   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n   CURLOPT_CUSTOMREQUEST => 'GET',\n   CURLOPT_HTTPHEADER => array(\n      'accept: application/json',\n      'content-type: application/json'\n   ),\n));\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\necho $response;\n"
        },
        {
          "id": "ztg8HoLkvKHOgLxZw-3O_",
          "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://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/customtarget/{customtarget-id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "7g_LNjRq2CWkvAuxcr5ib",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/customtarget/{customtarget-id}\"\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"
        },
        {
          "id": "6KS95s63rik-CYiVoJW5e",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.monetate.net/api/metadata/v1/{retailerShortname}/production/metadata/customtarget/{customtarget-id}\")\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"
        }
      ],
      "selectedLanguageId": "lkxPkjjC4UbdS1iz3Ynv9"
    },
    "results": {
      "languages": [
        {
          "id": "VW39Ih_MCrW9td7Tg7ogF",
          "language": "200",
          "code": "// A single CustomTarget definition.\n{\n  \"meta\": {\n    \"code\": 200,\n    \"warnings\": [\n      {}\n    ],\n    \"errors\": [\n      {}\n    ]\n  },\n  \"data\": {\n    \"id\": 0,\n    \"title\": \"\",\n    \"description\": \"\",\n    \"is_identifier\": false,\n    \"collects_person_id\": false\n  }\n}"
        },
        {
          "id": "RrQgZuqN-EbJHnxhtqEZl",
          "language": "401",
          "code": "// Unauthorized. \n\nThe request did not include a token, or the token provided was invalid. Please ensure that your token is correct and that the Authorization header is properly formatted.\n{\n  \"meta\": {\n    \"code\": 200,\n    \"warnings\": [\n      {}\n    ],\n    \"errors\": [\n      {}\n    ]\n  },\n  \"data\": {}\n}"
        },
        {
          "id": "Gi7HMnLZ_RmmVrLUkixG-",
          "language": "403",
          "code": "// Forbidden.\n\nThe request included a token that has been revoked. Please contact your account administrator to generate a new token.\n{\n  \"meta\": {\n    \"code\": 200,\n    \"warnings\": [\n      {}\n    ],\n    \"errors\": [\n      {}\n    ]\n  },\n  \"data\": {}\n}"
        },
        {
          "id": "NXDrayLLKWaiGw7flfMGq",
          "language": "404",
          "code": "// Not found.\n\nThe resource you are trying to fetch does not exist, or has been deleted.\n{\n  \"meta\": {\n    \"code\": 200,\n    \"warnings\": [\n      {}\n    ],\n    \"errors\": [\n      {}\n    ]\n  },\n  \"data\": {}\n}"
        },
        {
          "id": "FK073VyxI-iXmF9xs9Yze",
          "language": "500",
          "code": "// Unknown error.\n\nPlease try again or contact your account manager for more information.\n{\n  \"meta\": {\n    \"code\": 200,\n    \"warnings\": [\n      {}\n    ],\n    \"errors\": [\n      {}\n    ]\n  },\n  \"data\": {}\n}"
        }
      ],
      "selectedLanguageId": "VW39Ih_MCrW9td7Tg7ogF"
    }
  },
  "children": [
    {
      "id": "r3mdfpv4eL7Ira2GhxzkG",
      "type": "paragraph",
      "children": [
        {
          "text": "Returns detailed information about a single custom target."
        }
      ]
    }
  ]
}