---
title: Retrieve a product
slug: docs/demo/retrieve-a-product
description: This document offers a helpful code example demonstrating the usage of the curl command to initiate a GET request to a designated URL while including custom headers for Accept and Content-Type. Enhance your understanding of utilizing curl for efficient AP
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "QfPx9W9bt8M_LQVd5wM5A",
  "data": {
    "url": "https://api.fictive.com/REST/api/products/{productReference}",
    "name": "Retrieve a product",
    "method": "GET",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "productReference",
          "type": "string",
          "description": ""
        }
      ],
      "queryParameters": [],
      "headerParameters": [
        {
          "kind": "optional",
          "name": "X-TokenId",
          "type": "string",
          "description": "The eSuite Token Id"
        },
        {
          "kind": "optional",
          "name": "X-SessionId",
          "type": "string",
          "description": "The eSuite Session Id"
        },
        {
          "kind": "required",
          "name": "X-Version",
          "type": "string",
          "description": "The eSuite Version"
        },
        {
          "kind": "optional",
          "name": "Origin",
          "type": "string",
          "description": "The eSuite Origin"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": []
    },
    "responses": [
      {
        "schema": [
          {
            "kind": "optional",
            "type": {
              "type": "string",
              "example": ""
            },
            "schema": [
              {
                "kind": "optional",
                "name": "productReference",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "name",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "description",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "type",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "status",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "productListReferences",
                "type": "array",
                "example": [],
                "itemType": "string",
                "customType": "string[]",
                "itemExample": ""
              },
              {
                "kind": "optional",
                "name": "createdDate",
                "type": "string<date-time>",
                "example": "2021-09-21T05:33:23.2761237"
              },
              {
                "kind": "optional",
                "name": "lastUpdatedDate",
                "type": "string<date-time>",
                "example": "2021-09-21T05:33:23.2761237"
              },
              {
                "kind": "optional",
                "name": "productParameters",
                "type": "object",
                "schema": [],
                "example": {}
              },
              {
                "kind": "optional",
                "name": "pricing",
                "type": "array",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "role",
                    "type": "string",
                    "example": "",
                    "description": "Gets or sets the Role name"
                  },
                  {
                    "kind": "optional",
                    "name": "amount",
                    "type": "number<double>",
                    "example": "",
                    "description": "Gets or sets the Amount"
                  },
                  {
                    "kind": "optional",
                    "name": "isGross",
                    "type": "boolean",
                    "example": "",
                    "description": "Specify whether is gross amount"
                  },
                  {
                    "kind": "optional",
                    "name": "priceReference",
                    "type": "string",
                    "example": "",
                    "description": "Unique price reference"
                  },
                  {
                    "kind": "optional",
                    "name": "taxCategory",
                    "type": "string",
                    "example": "",
                    "description": "Tax category name"
                  },
                  {
                    "kind": "optional",
                    "name": "paymentMethod",
                    "type": "string",
                    "example": "",
                    "description": "Payment method name"
                  },
                  {
                    "kind": "optional",
                    "name": "currency",
                    "type": "string",
                    "example": "",
                    "description": "Three letter currency ISO code"
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PricePointResponse",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PricePointResponse[]",
                "description": "Response DTO V1 for the Product Price Point."
              },
              {
                "kind": "optional",
                "name": "images",
                "type": "array",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "imageReference",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "displayName",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "fileLocation",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "defaultImage",
                    "type": "boolean",
                    "example": ""
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.ImageResponse",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.ImageResponse[]",
                "description": "Response dto for Images."
              },
              {
                "kind": "optional",
                "name": "credits",
                "type": "array",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "creditsReference",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "currency",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "amount",
                    "type": "number<double>",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "expiryDate",
                    "type": "string<date-time>",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "expiryDays",
                    "type": "integer<int32>",
                    "example": 0
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.CreditResponse",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.CreditResponse[]",
                "description": "Response dto for Credits."
              },
              {
                "kind": "optional",
                "name": "contractPricing",
                "type": "array",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "contractReference",
                    "type": "string",
                    "example": "",
                    "description": "The contract reference"
                  },
                  {
                    "kind": "optional",
                    "name": "pricing",
                    "type": "array",
                    "schema": [
                      {
                        "kind": "optional",
                        "name": "productContractPriceReference",
                        "type": "string",
                        "example": "",
                        "description": "The identifier of the price"
                      },
                      {
                        "kind": "optional",
                        "name": "taxCategory",
                        "type": "object",
                        "schema": [
                          {
                            "kind": "optional",
                            "name": "taxCategoryReference",
                            "type": "string",
                            "example": "",
                            "description": "Tax category reference"
                          },
                          {
                            "kind": "optional",
                            "name": "taxCategoryName",
                            "type": "string",
                            "example": "",
                            "description": "Tax category name"
                          },
                          {
                            "kind": "optional",
                            "name": "displayName",
                            "type": "string",
                            "example": "",
                            "description": "Tax category name to display"
                          }
                        ],
                        "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.TaxCategory",
                        "customType": "FictiveGlobal.Api.Rest.Dtos.v1.TaxCategory",
                        "description": "Tax category information"
                      },
                      {
                        "kind": "optional",
                        "name": "amount",
                        "type": "object",
                        "schema": [
                          {
                            "kind": "optional",
                            "name": "grossAmount",
                            "type": "number<double>",
                            "example": "",
                            "description": "Gross Amount"
                          },
                          {
                            "kind": "optional",
                            "name": "netAmount",
                            "type": "number<double>",
                            "example": "",
                            "description": "Net Amount"
                          },
                          {
                            "kind": "optional",
                            "name": "taxAmount",
                            "type": "number<double>",
                            "example": "",
                            "description": "Tax Amount"
                          },
                          {
                            "kind": "optional",
                            "name": "currency",
                            "type": "string",
                            "example": "",
                            "description": "Currency"
                          },
                          {
                            "kind": "optional",
                            "name": "priceReference",
                            "type": "string",
                            "example": "",
                            "description": "Product Price Reference"
                          }
                        ],
                        "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v3.CartLineItems.PricePoint",
                        "customType": "FictiveGlobal.Api.Rest.Dtos.v3.CartLineItems.PricePoint",
                        "description": "Pricing information"
                      },
                      {
                        "kind": "optional",
                        "name": "active",
                        "type": "boolean",
                        "example": ""
                      }
                    ],
                    "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.ProductServicePricing",
                    "customType": "FictiveGlobal.Api.Rest.Dtos.v1.ProductServicePricing[]",
                    "description": "Pricing information"
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.ProductService",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.ProductService[]",
                "description": "ProductService is a link between a product and a contract(service)"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.ProductResponse",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.ProductResponse",
            "isExpanded": true,
            "description": "Response dto for Products."
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "{\n  \"productReference\": \"0010BBLEC8GZAZA853\",\n  \"name\": \"Product A\",\n  \"description\": \"Product A Description\",\n  \"type\": \"Physical\",\n  \"status\": \"Active\",\n  \"productListReferences\": [\n    \"001PLYVMOL3WIA13S1\"\n  ],\n  \"createdDate\": \"2021-09-21T05:33:24.5105213\",\n  \"lastUpdatedDate\": \"2021-09-21T05:33:24.5105213\",\n  \"productParameters\": {\n    \"ParameterName1\": \"ParameterValue1\",\n    \"ParameterName2\": \"ParameterValue2\",\n    \"ParameterName3\": \"ParameterValue3\"\n  },\n  \"pricing\": [\n    {\n      \"role\": \"Default\",\n      \"amount\": 22,\n      \"isGross\": true,\n      \"priceReference\": \"0010FN2NS2K63HEHC0\",\n      \"taxCategory\": \"Standard\",\n      \"paymentMethod\": \"ServiceCredits\",\n      \"currency\": \"GBP\"\n    }\n  ],\n  \"images\": [\n    {\n      \"imageReference\": \"001IMALAKTOTN3DGB2\",\n      \"displayName\": \"Image1\",\n      \"fileLocation\": \"https://www.ImageLocation.co.uk/ImageFolder/Image1.jpg\",\n      \"defaultImage\": true\n    }\n  ],\n  \"credits\": [\n    {\n      \"creditsReference\": \"001PCHCHYYG8VN4632\",\n      \"currency\": \"GBP\",\n      \"amount\": 10,\n      \"expiryDate\": \"2021-10-21T05:33:24.5105213\"\n    }\n  ]\n}"
      },
      {
        "isExpanded": true,
        "statusCode": "401",
        "description": "Not Authorized",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "Product cannot be found",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "Calling this endpoint will retrieve a single instance of a configured product within eSuite.",
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.fictive.com/REST/api/products/{productReference} \\\n     --header 'accept: application/json' \\\n     --header 'x-version: 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(\"x-version\", \"string\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/products/{productReference}\", 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://api.fictive.com/REST/api/products/{productReference}\")\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[\"x-version\"] = \"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://api.fictive.com/REST/api/products/{productReference}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-version': '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": "{\n  \"productReference\": \"0010BBLEC8GZAZA853\",\n  \"name\": \"Product A\",\n  \"description\": \"Product A Description\",\n  \"type\": \"Physical\",\n  \"status\": \"Active\",\n  \"productListReferences\": [\n    \"001PLYVMOL3WIA13S1\"\n  ],\n  \"createdDate\": \"2021-09-21T05:33:24.5105213\",\n  \"lastUpdatedDate\": \"2021-09-21T05:33:24.5105213\",\n  \"productParameters\": {\n    \"ParameterName1\": \"ParameterValue1\",\n    \"ParameterName2\": \"ParameterValue2\",\n    \"ParameterName3\": \"ParameterValue3\"\n  },\n  \"pricing\": [\n    {\n      \"role\": \"Default\",\n      \"amount\": 22,\n      \"isGross\": true,\n      \"priceReference\": \"0010FN2NS2K63HEHC0\",\n      \"taxCategory\": \"Standard\",\n      \"paymentMethod\": \"ServiceCredits\",\n      \"currency\": \"GBP\"\n    }\n  ],\n  \"images\": [\n    {\n      \"imageReference\": \"001IMALAKTOTN3DGB2\",\n      \"displayName\": \"Image1\",\n      \"fileLocation\": \"https://www.ImageLocation.co.uk/ImageFolder/Image1.jpg\",\n      \"defaultImage\": true\n    }\n  ],\n  \"credits\": [\n    {\n      \"creditsReference\": \"001PCHCHYYG8VN4632\",\n      \"currency\": \"GBP\",\n      \"amount\": 10,\n      \"expiryDate\": \"2021-10-21T05:33:24.5105213\"\n    }\n  ]\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Not Authorized\n"
        },
        {
          "id": "response-2-404",
          "language": "404",
          "code": "// Product cannot be found\n"
        },
        {
          "id": "response-3-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}