---
title: Bulk add entitlements
slug: docs/demo/bulk-add-entitlements
description: Learn how to use the curl command to effectively manage entitlements on the Fictive API through a POST request. This code example provides step-by-step instructions, including headers for JSON data and important parameters like entitlement identifier, dat
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "AWa1nLbF67S0Rx7sGDI9B",
  "data": {
    "url": "https://api.fictive.com/REST/api/bulk/entitlements",
    "name": "Bulk add entitlements",
    "method": "POST",
    "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": [
        {
          "kind": "required",
          "name": "request",
          "type": "object",
          "schema": [
            {
              "kind": "optional",
              "name": "entitlementIdentifier",
              "type": "string",
              "example": "",
              "description": "The entitlement identifier."
            },
            {
              "kind": "optional",
              "name": "startDate",
              "type": "string<date-time>",
              "example": "2021-09-21T05:33:14.275973",
              "description": "The start date for the entitlement."
            },
            {
              "kind": "optional",
              "name": "endDate",
              "type": "string<date-time>",
              "example": "2021-09-21T05:33:14.275973",
              "description": "The end date for the entitlement."
            },
            {
              "kind": "optional",
              "name": "accountReferences",
              "type": "array",
              "example": [],
              "itemType": "string",
              "customType": "string[]",
              "description": "Collection of AccountReferences.",
              "itemExample": ""
            },
            {
              "kind": "optional",
              "name": "clientUserIds",
              "type": "array",
              "example": [],
              "itemType": "string",
              "customType": "string[]",
              "description": "Collection for ClientUserIds.",
              "itemExample": ""
            }
          ],
          "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v2.EntitlementsBulkCreate",
          "customType": "FictiveGlobal.Api.Rest.Dtos.v2.EntitlementsBulkCreate",
          "isExpanded": true,
          "description": "Entitlements Bulk insert dto."
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "isExpanded": true,
        "statusCode": "204",
        "description": "No Content",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint will provide the ability to add entitlements in bulk to multiple accounts in a single request",
    "examples": {
      "languages": [
        {
          "id": "fefBC1Qk-40gB1lNOPMuB",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.fictive.com/REST/api/bulk/entitlements \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "QYCwxRUJ2bsV6ILugm0tr",
          "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: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/bulk/entitlements\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "09A-qIpoQE-aC_R_hIDqC",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/bulk/entitlements\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.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": "K70Aze-66aAZG9w223_br",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/bulk/entitlements\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-version': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "fefBC1Qk-40gB1lNOPMuB"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-204",
          "language": "204",
          "code": "// No Content\n"
        }
      ],
      "selectedLanguageId": "response-0-204"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}