---
title: List Target Object Fields
slug: list-target-object-fields
docTags: 
createdAt: 2026-08-25T19:28:59.170Z
---

{
  "id": "l7P1JUOfJuH16L4gnznNd",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.nue.io/v1/stripe/metadata-mapping/targetObject/{objectName}/fields",
    "servers": [
      {
        "url": "https://api.nue.io/v1/stripe/metadata-mapping/targetObject/{objectName}/fields",
        "description": "Nue API Production URL"
      },
      {
        "url": "https://api.sandbox.nue.io/v1/stripe/metadata-mapping/targetObject/{objectName}/fields",
        "description": "Nue Sandbox API Server"
      }
    ],
    "name": "List Target Object Fields",
    "description": "Retrieve all available fields for a specific Stripe target object. These fields can be used as targets in metadata mappings to receive data from Nue.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "objectName",
          "type": "string",
          "example": "Customer",
          "description": "The name of the Stripe target object",
          "enum": [
            "Customer",
            "Invoice"
          ]
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successfully retrieved target object fields",
        "jsonExample": "",
        "isExpanded": true,
        "subExamples": [
          {
            "label": "GENERATED",
            "code": "// Successfully retrieved target object fields\n[\n  {\n    \"apiName\": \"\",\n    \"description\": \"\",\n    \"type\": \"\",\n    \"required\": false\n  }\n]"
          },
          {
            "label": "Customer Fields",
            "code": "[\n  {\n    \"apiName\": \"name\",\n    \"description\": \"Customer's full name\",\n    \"type\": \"string\",\n    \"required\": false\n  },\n  {\n    \"apiName\": \"email\",\n    \"description\": \"Customer's email address\",\n    \"type\": \"string\",\n    \"required\": false\n  },\n  {\n    \"apiName\": \"address.postal_code\",\n    \"description\": \"Postal code for customer's address\",\n    \"type\": \"string\",\n    \"required\": false\n  }\n]"
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "",
            "customType": "StripeFieldMetadata[]",
            "schema": [
              {
                "name": "apiName",
                "kind": "optional",
                "type": "string",
                "description": "The API name of the Stripe field"
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "description": "Description of the field"
              },
              {
                "name": "type",
                "kind": "optional",
                "type": "string",
                "description": "Data type of the field"
              },
              {
                "name": "required",
                "kind": "optional",
                "type": "boolean",
                "description": "Whether the field is required"
              }
            ],
            "modelRef": "#/components/schemas/StripeFieldMetadata",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "<p>Bad Request - Invalid object name</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "error",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": [
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "Error code",
                    "example": "VALIDATION_ERROR"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable error message</p>",
                    "example": "Invalid mapping configuration"
                  },
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "Additional error details",
                    "example": "[\"Target field 'oid' is read-only\"]",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "<p>Unauthorized - Invalid or missing API key</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "error",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": [
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "Error code",
                    "example": "VALIDATION_ERROR"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable error message</p>",
                    "example": "Invalid mapping configuration"
                  },
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "Additional error details",
                    "example": "[\"Target field 'oid' is read-only\"]",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "TR7dX3bJRS-O15OdwIODQ",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.nue.io/v1/stripe/metadata-mapping/targetObject/{objectName}/fields \\\n     --header 'accept: application/json'"
        },
        {
          "id": "giywErrSOdZD7Wbva-wgq",
          "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.nue.io/v1/stripe/metadata-mapping/targetObject/{objectName}/fields\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "8kAp9jt1jMW9mmQ4T2LCH",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/v1/stripe/metadata-mapping/targetObject/{objectName}/fields\")\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": "g4ce86OaZOzEIGPWQ519E",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/v1/stripe/metadata-mapping/targetObject/{objectName}/fields\"\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": "TR7dX3bJRS-O15OdwIODQ"
    },
    "results": {
      "languages": [
        {
          "id": "HJINgq1gyF2q_aQHdz4Pl",
          "language": "200",
          "code": "// Successfully retrieved target object fields\n[\n  {\n    \"apiName\": \"\",\n    \"description\": \"\",\n    \"type\": \"\",\n    \"required\": false\n  }\n]",
          "subExamples": [
            {
              "label": "GENERATED",
              "code": "// Successfully retrieved target object fields\n[\n  {\n    \"apiName\": \"\",\n    \"description\": \"\",\n    \"type\": \"\",\n    \"required\": false\n  }\n]"
            },
            {
              "label": "Customer Fields",
              "code": "[\n  {\n    \"apiName\": \"name\",\n    \"description\": \"Customer's full name\",\n    \"type\": \"string\",\n    \"required\": false\n  },\n  {\n    \"apiName\": \"email\",\n    \"description\": \"Customer's email address\",\n    \"type\": \"string\",\n    \"required\": false\n  },\n  {\n    \"apiName\": \"address.postal_code\",\n    \"description\": \"Postal code for customer's address\",\n    \"type\": \"string\",\n    \"required\": false\n  }\n]"
            }
          ]
        },
        {
          "id": "-UAhKvSuT7GhhWVWcpO9_",
          "language": "400",
          "code": "// Bad Request - Invalid object name\n{\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Invalid mapping configuration\",\n    \"details\": [\n      \"\"\n    ]\n  }\n}"
        },
        {
          "id": "HTHos9DhkI__ig740YkOq",
          "language": "401",
          "code": "// Unauthorized - Invalid or missing API key\n{\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Invalid mapping configuration\",\n    \"details\": [\n      \"\"\n    ]\n  }\n}"
        }
      ],
      "selectedLanguageId": "HJINgq1gyF2q_aQHdz4Pl"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}