---
title: Retrieve offer
slug: docs/demo/retrieve-offer
description: Learn how to retrieve data from a fictive website's API using cURL with this helpful code example. Discover how to include the required headers for accepting and sending JSON data efficiently.
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "kA9ymmm6buK3XM_vFTis9",
  "data": {
    "url": "https://api.fictive.com/REST/api/offers/{offerReference}",
    "name": "Retrieve offer",
    "method": "GET",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "offerReference",
          "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": "object",
            "schema": [
              {
                "kind": "optional",
                "name": "offerReference",
                "type": "string",
                "example": "",
                "description": "Offer reference."
              },
              {
                "kind": "optional",
                "name": "startDate",
                "type": "string<date-time>",
                "example": "2021-09-21T05:33:18.9010299",
                "description": "Offer Start Dates."
              },
              {
                "kind": "optional",
                "name": "expiryDate",
                "type": "string<date-time>",
                "example": "2021-09-21T05:33:18.9010299",
                "description": "Offer Expiry Date."
              },
              {
                "kind": "optional",
                "name": "name",
                "type": "string",
                "example": "",
                "description": "Offer Name."
              },
              {
                "kind": "optional",
                "name": "description",
                "type": "string",
                "example": "",
                "description": "Offer Description."
              },
              {
                "kind": "optional",
                "name": "usageType",
                "type": "string<UniqueToUserUseOnce | UniqueToUserUseMany | NotUniqueOneUse | NotUniqueUseMany | Null>",
                "example": "",
                "description": "Offer Usage Type."
              },
              {
                "kind": "optional",
                "name": "applicationData",
                "type": "object",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "name",
                    "type": "string",
                    "example": "",
                    "description": "Gets or sets the Name."
                  },
                  {
                    "kind": "optional",
                    "name": "message",
                    "type": "string",
                    "example": "",
                    "description": "Gets or sets the Message."
                  },
                  {
                    "kind": "optional",
                    "name": "message2",
                    "type": "string",
                    "example": "",
                    "description": "Gets or sets the Message2."
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.ApplicationData",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.ApplicationData",
                "description": "Offer Application Data."
              },
              {
                "kind": "optional",
                "name": "addCredits",
                "type": "object",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "amount",
                    "type": "integer<int32>",
                    "example": 0,
                    "description": "Gets or sets the Amount."
                  },
                  {
                    "kind": "optional",
                    "name": "currency",
                    "type": "string",
                    "example": "",
                    "description": "Gets or sets the Currency."
                  },
                  {
                    "kind": "optional",
                    "name": "paymentDetailsRequired",
                    "type": "boolean",
                    "example": "",
                    "description": "Gets or sets the PaymentDetailsRequired."
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.AddCredits",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.AddCredits",
                "description": "Offer details specific for add credits offer."
              },
              {
                "kind": "optional",
                "name": "lowStart",
                "type": "object",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "percentage",
                    "type": "number<double>",
                    "example": "",
                    "description": "Gets or sets the Percentage."
                  },
                  {
                    "kind": "optional",
                    "name": "numberOfPeriods",
                    "type": "integer<int32>",
                    "example": 0,
                    "description": "Gets or sets the NumberOfPeriods."
                  },
                  {
                    "kind": "optional",
                    "name": "lockInPeriods",
                    "type": "integer<int32>",
                    "example": 0,
                    "description": "Gets or sets the lockInPeriods."
                  },
                  {
                    "kind": "optional",
                    "name": "closeSubOnExpiry",
                    "type": "boolean",
                    "example": "",
                    "description": "Gets or sets the CloseSubOnExpiry."
                  },
                  {
                    "kind": "optional",
                    "name": "serviceIds",
                    "type": "array",
                    "example": [],
                    "itemType": "integer",
                    "customType": "integer[]",
                    "description": "Gets or sets the ServiceIds.",
                    "itemExample": ""
                  },
                  {
                    "kind": "optional",
                    "name": "paymentDetailsRequired",
                    "type": "boolean",
                    "example": "",
                    "description": "Gets or sets the PaymentDetailsRequired."
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.LowStart",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.LowStart",
                "description": "Offer details specific for low start offer."
              },
              {
                "kind": "optional",
                "name": "percentageDiscount",
                "type": "object",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "percentage",
                    "type": "number<double>",
                    "example": "",
                    "description": "Gets or sets the Percentage."
                  },
                  {
                    "kind": "optional",
                    "name": "paymentDetailsRequired",
                    "type": "boolean",
                    "example": "",
                    "description": "Gets or sets the PaymentDetailsRequired."
                  },
                  {
                    "kind": "optional",
                    "name": "productIds",
                    "type": "array",
                    "example": [],
                    "itemType": "integer",
                    "customType": "integer[]",
                    "description": "Gets or sets the Products Ids.",
                    "itemExample": ""
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PercentageDiscount",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PercentageDiscount",
                "description": "Offer details for percentage discount offer."
              },
              {
                "kind": "optional",
                "name": "freePeriod",
                "type": "object",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "numberOfPeriods",
                    "type": "integer<int32>",
                    "example": 0,
                    "description": "Gets or sets the NumberOfPeriods."
                  },
                  {
                    "kind": "optional",
                    "name": "serviceIds",
                    "type": "array",
                    "example": [],
                    "itemType": "integer",
                    "customType": "integer[]",
                    "description": "Gets or sets the ServiceIds.",
                    "itemExample": ""
                  },
                  {
                    "kind": "optional",
                    "name": "paymentDetailsRequired",
                    "type": "boolean",
                    "example": "",
                    "description": "Gets or sets the PaymentDetailsRequired."
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.FreePeriod",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.FreePeriod",
                "description": "Offer details for free period offer."
              },
              {
                "kind": "optional",
                "name": "groupDiscount",
                "type": "object",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "activationCodeActivated",
                    "type": "boolean",
                    "example": "",
                    "description": "Activation code activated"
                  },
                  {
                    "kind": "optional",
                    "name": "metaData",
                    "type": "object",
                    "schema": [
                      {
                        "kind": "optional",
                        "name": "qualifyingItemCount",
                        "type": "integer<int32>",
                        "example": 0,
                        "description": "Qualifying item count"
                      },
                      {
                        "kind": "optional",
                        "name": "freeItemCountOrDiscountAmount",
                        "type": "number<double>",
                        "example": "",
                        "description": "Free item count or discount amount"
                      },
                      {
                        "kind": "optional",
                        "name": "productIds",
                        "type": "array",
                        "example": [],
                        "itemType": "integer",
                        "customType": "integer[]",
                        "description": "Product ids",
                        "itemExample": ""
                      },
                      {
                        "kind": "optional",
                        "name": "configurationType",
                        "type": "string",
                        "example": "",
                        "description": "Configuration type"
                      },
                      {
                        "kind": "optional",
                        "name": "productSource",
                        "type": "string",
                        "example": "",
                        "description": "Product source"
                      },
                      {
                        "kind": "optional",
                        "name": "customParameters",
                        "type": "object",
                        "schema": [],
                        "example": {},
                        "description": "Custom parameters"
                      }
                    ],
                    "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.GroupDiscountOfferType",
                    "customType": "FictiveGlobal.Api.Rest.Dtos.v1.GroupDiscountOfferType",
                    "description": "Meta data"
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.GroupDiscount",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.GroupDiscount",
                "description": "Offer details for group discount offer."
              },
              {
                "kind": "optional",
                "name": "fixedPriceDiscount",
                "type": "object",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "discountAmounts",
                    "type": "array",
                    "schema": [
                      {
                        "kind": "optional",
                        "name": "value",
                        "type": "number<double>",
                        "example": "",
                        "description": "Discount value."
                      },
                      {
                        "kind": "optional",
                        "name": "currency",
                        "type": "string",
                        "example": "",
                        "description": "Currency for the discount value."
                      }
                    ],
                    "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.Offers.DiscountAmount",
                    "customType": "FictiveGlobal.Api.Rest.Dtos.v1.Offers.DiscountAmount[]",
                    "description": "The discount amounts associated to the fixed price discount."
                  },
                  {
                    "kind": "optional",
                    "name": "paymentDetailsRequired",
                    "type": "boolean",
                    "example": "",
                    "description": "Value that indicates if payment details are required."
                  },
                  {
                    "kind": "optional",
                    "name": "subscriptionSettings",
                    "type": "object",
                    "schema": [
                      {
                        "kind": "optional",
                        "name": "enabled",
                        "type": "boolean",
                        "example": "",
                        "description": "Value that indicates if subscriptions are enabled."
                      },
                      {
                        "kind": "optional",
                        "name": "numberOfPeriods",
                        "type": "integer<int32>",
                        "example": 0,
                        "description": "The number of periods the offer applies to."
                      },
                      {
                        "kind": "optional",
                        "name": "lockInPeriods",
                        "type": "integer<int32>",
                        "example": 0,
                        "description": "The number of lock in periods of the offer."
                      },
                      {
                        "kind": "optional",
                        "name": "closeSubOnExpiry",
                        "type": "boolean",
                        "example": "",
                        "description": "Value that indicates if the subscription should close on expiry."
                      },
                      {
                        "kind": "optional",
                        "name": "serviceIds",
                        "type": "array",
                        "example": [],
                        "itemType": "integer",
                        "customType": "integer[]",
                        "description": "The services that the offer will apply to.",
                        "itemExample": ""
                      }
                    ],
                    "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.Offers.SubscriptionSettings",
                    "customType": "FictiveGlobal.Api.Rest.Dtos.v1.Offers.SubscriptionSettings",
                    "description": "Subscription settings."
                  },
                  {
                    "kind": "optional",
                    "name": "productSettings",
                    "type": "object",
                    "schema": [
                      {
                        "kind": "optional",
                        "name": "enabled",
                        "type": "boolean",
                        "example": "",
                        "description": "Value that indicates if products are enabled."
                      },
                      {
                        "kind": "optional",
                        "name": "productIds",
                        "type": "array",
                        "example": [],
                        "itemType": "integer",
                        "customType": "integer[]",
                        "description": "The products that the offer will apply to.",
                        "itemExample": ""
                      }
                    ],
                    "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.Offers.ProductSettings",
                    "customType": "FictiveGlobal.Api.Rest.Dtos.v1.Offers.ProductSettings",
                    "description": "Product settings."
                  },
                  {
                    "kind": "optional",
                    "name": "miscellaneousChargeSettings",
                    "type": "object",
                    "schema": [
                      {
                        "kind": "optional",
                        "name": "enabled",
                        "type": "boolean",
                        "example": "",
                        "description": "/// Value that indicates if the offer was enabled for miscellaneous charge."
                      }
                    ],
                    "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.Offers.MiscellaneousChargeSettings",
                    "customType": "FictiveGlobal.Api.Rest.Dtos.v1.Offers.MiscellaneousChargeSettings",
                    "description": "Miscellaneous charge settings."
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.FixedPriceDiscount",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.FixedPriceDiscount",
                "description": "Offer details for fixed price offer."
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.Offer",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.Offer",
            "isExpanded": true,
            "description": "Offer class that contains the base informations for an offer."
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "OK",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint will provide the ability to return a specific configured offer for your instance of eSuite",
    "examples": {
      "languages": [
        {
          "id": "Zneh5us92M453w976j-nc",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.fictive.com/REST/api/offers/{offerReference} \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "B_jUEL6htwSVW4UMIMQSW",
          "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/offers/{offerReference}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "32n3Es__pWDVxiYawgJxU",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/offers/{offerReference}\")\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": "j_vaBBnJxC3haWl79ujwk",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/offers/{offerReference}\"\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": "Zneh5us92M453w976j-nc"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"offerReference\": \"\",\n  \"startDate\": \"2021-09-21T05:33:18.9010299\",\n  \"expiryDate\": \"2021-09-21T05:33:18.9010299\",\n  \"name\": \"\",\n  \"description\": \"\",\n  \"usageType\": \"\",\n  \"applicationData\": {\n    \"name\": \"\",\n    \"message\": \"\",\n    \"message2\": \"\"\n  },\n  \"addCredits\": {\n    \"amount\": \"\",\n    \"currency\": \"\",\n    \"paymentDetailsRequired\": false\n  },\n  \"lowStart\": {\n    \"percentage\": \"\",\n    \"numberOfPeriods\": \"\",\n    \"lockInPeriods\": \"\",\n    \"closeSubOnExpiry\": false,\n    \"serviceIds\": [\n      0\n    ],\n    \"paymentDetailsRequired\": false\n  },\n  \"percentageDiscount\": {\n    \"percentage\": \"\",\n    \"paymentDetailsRequired\": false,\n    \"productIds\": [\n      0\n    ]\n  },\n  \"freePeriod\": {\n    \"numberOfPeriods\": \"\",\n    \"serviceIds\": [\n      0\n    ],\n    \"paymentDetailsRequired\": false\n  },\n  \"groupDiscount\": {\n    \"activationCodeActivated\": false,\n    \"metaData\": {\n      \"qualifyingItemCount\": \"\",\n      \"freeItemCountOrDiscountAmount\": \"\",\n      \"productIds\": [\n        0\n      ],\n      \"configurationType\": \"\",\n      \"productSource\": \"\",\n      \"customParameters\": {}\n    }\n  },\n  \"fixedPriceDiscount\": {\n    \"discountAmounts\": [\n      {\n        \"value\": \"\",\n        \"currency\": \"\"\n      }\n    ],\n    \"paymentDetailsRequired\": false,\n    \"subscriptionSettings\": {\n      \"enabled\": false,\n      \"numberOfPeriods\": \"\",\n      \"lockInPeriods\": \"\",\n      \"closeSubOnExpiry\": false,\n      \"serviceIds\": [\n        0\n      ]\n    },\n    \"productSettings\": {\n      \"enabled\": false,\n      \"productIds\": [\n        0\n      ]\n    },\n    \"miscellaneousChargeSettings\": {\n      \"enabled\": false\n    }\n  }\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}