---
title: Retrieve a Supplier
slug: docs/demo/retrieve-a-supplier
description: Learn how to use the curl command to make a GET request to a fictive API with this code example. Discover how to include a specific supplier reference and set the desired data format using the accept and content-type headers. Boost your knowledge of API i
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "ogao1paTpHqMfXYL9gqV5",
  "data": {
    "url": "https://api.fictive.com/REST/api/suppliers/{supplierReference}",
    "name": "Retrieve a Supplier",
    "method": "GET",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "supplierReference",
          "type": "string"
        }
      ],
      "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": "object",
            "schema": [
              {
                "kind": "optional",
                "name": "supplierReference",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "name",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "status",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "contactEmail",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "contactPhone",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.SupplierResponse",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.SupplierResponse",
            "isExpanded": true
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "{\n  \"supplierReference\": \"001SU3ACFZVKUSJLT3\",\n  \"name\": \"Test Supplier\",\n  \"status\": \"Active\",\n  \"contactEmail\": \"test@test.com\",\n  \"contactPhone\": \"01234567890\"\n}"
      },
      {
        "isExpanded": true,
        "statusCode": "401",
        "description": "Not Authorized",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "Calling this endpoint will retrieve a specific Supplier on your eSuite instance",
    "examples": {
      "languages": [
        {
          "id": "CdMD8wn78j4UOYWu0aiOl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.fictive.com/REST/api/suppliers/{supplierReference} \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "5drgr3-V4s3FDEco9kOvB",
          "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/suppliers/{supplierReference}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "lFGljiQavp3tXYp78Z7EI",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/suppliers/{supplierReference}\")\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": "NXpEq7H7XmSppTWCxBtVZ",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/suppliers/{supplierReference}\"\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": "CdMD8wn78j4UOYWu0aiOl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "{\n  \"supplierReference\": \"001SU3ACFZVKUSJLT3\",\n  \"name\": \"Test Supplier\",\n  \"status\": \"Active\",\n  \"contactEmail\": \"test@test.com\",\n  \"contactPhone\": \"01234567890\"\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Not Authorized\n"
        },
        {
          "id": "response-2-404",
          "language": "404",
          "code": "// Not Found\n"
        },
        {
          "id": "response-3-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}