---
title: Retrieve all product lists.
slug: docs/demo/retrieve-all-product-lists
description: Learn how to retrieve a list of products from a fictive API through a simple and effective GET request. This code example, written in the versatile curl programming language, demonstrates how to include essential JSON data headers for seamless integration
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "vb9SO2Adi9o_mvWWWpUDb",
  "data": {
    "url": "https://api.fictive.com/REST/api/product-lists",
    "name": "Retrieve all product lists.",
    "method": "GET",
    "request": {
      "pathParameters": [],
      "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": "array",
            "schema": [
              {
                "kind": "optional",
                "name": "productListReference",
                "type": "string",
                "example": "",
                "description": "Product list reference."
              },
              {
                "kind": "optional",
                "name": "name",
                "type": "string",
                "example": "",
                "description": "product list name."
              },
              {
                "kind": "optional",
                "name": "associatedProducts",
                "type": "array",
                "example": [],
                "itemType": "string",
                "customType": "string[]",
                "description": "Associated products with the product list.",
                "itemExample": ""
              },
              {
                "kind": "optional",
                "name": "createdDate",
                "type": "string<date-time>",
                "example": "2021-09-21T05:33:22.9636152",
                "description": "Created date."
              },
              {
                "kind": "optional",
                "name": "lastUpdatedDate",
                "type": "string<date-time>",
                "example": "2021-09-21T05:33:22.9636152",
                "description": "Last updated date."
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.ProductListResponse",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.ProductListResponse[]",
            "isExpanded": true,
            "description": "Product list response wrapper."
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "OK.",
        "jsonExample": "[\n  {\n    \"productListReference\": \"001PLTRFD456544FD\",\n    \"name\": \"A list\",\n    \"associatedProducts\": [\n      \"0010BBLEC8GZAZA853\",\n      \"0010BZURPNZ3LJEM22\"\n    ],\n    \"createdDate\": \"2021-09-21T05:33:23.0729921\",\n    \"lastUpdatedDate\": \"2021-09-21T05:33:23.0729921\"\n  },\n  {\n    \"productListReference\": \"002GTYPBL123734CS\",\n    \"name\": \"A list\",\n    \"associatedProducts\": [\n      \"0010BBLEC8GZAZA853\",\n      \"0010BZURPNZ3LJEM22\"\n    ],\n    \"createdDate\": \"2021-09-21T05:33:23.0729921\",\n    \"lastUpdatedDate\": \"2021-09-21T05:33:23.0729921\"\n  },\n  {\n    \"productListReference\": \"003MBTLPI904681QP\",\n    \"name\": \"A list\",\n    \"associatedProducts\": [\n      \"0010BBLEC8GZAZA853\",\n      \"0010BZURPNZ3LJEM22\"\n    ],\n    \"createdDate\": \"2021-09-21T05:33:23.0729921\",\n    \"lastUpdatedDate\": \"2021-09-21T05:33:23.0729921\"\n  }\n]"
      },
      {
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "schema": [
              {
                "kind": "optional",
                "name": "productListReference",
                "type": "string",
                "example": "",
                "description": "Product list reference."
              },
              {
                "kind": "optional",
                "name": "name",
                "type": "string",
                "example": "",
                "description": "product list name."
              },
              {
                "kind": "optional",
                "name": "associatedProducts",
                "type": "array",
                "example": [],
                "itemType": "string",
                "customType": "string[]",
                "description": "Associated products with the product list.",
                "itemExample": ""
              },
              {
                "kind": "optional",
                "name": "createdDate",
                "type": "string<date-time>",
                "example": "2021-09-21T05:33:22.9636152",
                "description": "Created date."
              },
              {
                "kind": "optional",
                "name": "lastUpdatedDate",
                "type": "string<date-time>",
                "example": "2021-09-21T05:33:22.9636152",
                "description": "Last updated date."
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.ProductListResponse",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.ProductListResponse[]",
            "isExpanded": true,
            "description": "Product list response wrapper."
          }
        ],
        "isExpanded": true,
        "statusCode": "204",
        "description": "No Content.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "400",
        "description": "Request is invalid.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "401",
        "description": "Not Authorized.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "500",
        "description": "Internal Server Error.",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint will allow you to retrieve all product lists from the eSuite platform.",
    "examples": {
      "languages": [
        {
          "id": "elmNdF1AHILYNYeSyth3E",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.fictive.com/REST/api/product-lists \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "BztAQOj28yLahcITKBNcm",
          "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/product-lists\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "1KncPR0_zUPex3PQUXcvW",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/product-lists\")\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": "ErpSjbsUxo9kukARAEShE",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/product-lists\"\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": "elmNdF1AHILYNYeSyth3E"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "[\n  {\n    \"productListReference\": \"001PLTRFD456544FD\",\n    \"name\": \"A list\",\n    \"associatedProducts\": [\n      \"0010BBLEC8GZAZA853\",\n      \"0010BZURPNZ3LJEM22\"\n    ],\n    \"createdDate\": \"2021-09-21T05:33:23.0729921\",\n    \"lastUpdatedDate\": \"2021-09-21T05:33:23.0729921\"\n  },\n  {\n    \"productListReference\": \"002GTYPBL123734CS\",\n    \"name\": \"A list\",\n    \"associatedProducts\": [\n      \"0010BBLEC8GZAZA853\",\n      \"0010BZURPNZ3LJEM22\"\n    ],\n    \"createdDate\": \"2021-09-21T05:33:23.0729921\",\n    \"lastUpdatedDate\": \"2021-09-21T05:33:23.0729921\"\n  },\n  {\n    \"productListReference\": \"003MBTLPI904681QP\",\n    \"name\": \"A list\",\n    \"associatedProducts\": [\n      \"0010BBLEC8GZAZA853\",\n      \"0010BZURPNZ3LJEM22\"\n    ],\n    \"createdDate\": \"2021-09-21T05:33:23.0729921\",\n    \"lastUpdatedDate\": \"2021-09-21T05:33:23.0729921\"\n  }\n]"
        },
        {
          "id": "response-1-204",
          "language": "204",
          "code": "// No Content.\n[\n  {\n    \"productListReference\": \"\",\n    \"name\": \"\",\n    \"associatedProducts\": [\n      \"\"\n    ],\n    \"createdDate\": \"2021-09-21T05:33:22.9636152\",\n    \"lastUpdatedDate\": \"2021-09-21T05:33:22.9636152\"\n  }\n]"
        },
        {
          "id": "response-2-400",
          "language": "400",
          "code": "// Request is invalid.\n"
        },
        {
          "id": "response-3-401",
          "language": "401",
          "code": "// Not Authorized.\n"
        },
        {
          "id": "response-4-500",
          "language": "500",
          "code": "// Internal Server Error.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}