---
title: Create an issuing schedule
slug: docs/demo/create-an-issuing-schedule
description: Learn how to use the cURL command to make a POST request to an API endpoint for scheduling and entitlement end criteria. This code example demonstrates the inclusion of parameters for daily, monthly, annual, custom, and irregular schedules, ensuring accur
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "sty6l0sa-uTXymd5Y18GT",
  "data": {
    "url": "https://api.fictive.com/REST/api/products/{productReference}/schedules",
    "name": "Create an issuing schedule",
    "method": "POST",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "productReference",
          "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": [
        {
          "kind": "required",
          "name": "publicationCalendarRequest",
          "type": "object",
          "schema": [
            {
              "kind": "optional",
              "name": "entitlementFormat",
              "type": "string",
              "example": ""
            },
            {
              "kind": "optional",
              "name": "friendlyName",
              "type": "string",
              "example": ""
            },
            {
              "kind": "optional",
              "name": "scheduleType",
              "type": "string",
              "example": ""
            },
            {
              "kind": "optional",
              "name": "dailySchedule",
              "type": "object",
              "schema": [
                {
                  "kind": "optional",
                  "name": "issuingTime",
                  "type": "string",
                  "example": ""
                },
                {
                  "kind": "optional",
                  "name": "monday",
                  "type": "boolean",
                  "example": ""
                },
                {
                  "kind": "optional",
                  "name": "tuesday",
                  "type": "boolean",
                  "example": ""
                },
                {
                  "kind": "optional",
                  "name": "wednesday",
                  "type": "boolean",
                  "example": ""
                },
                {
                  "kind": "optional",
                  "name": "thursday",
                  "type": "boolean",
                  "example": ""
                },
                {
                  "kind": "optional",
                  "name": "friday",
                  "type": "boolean",
                  "example": ""
                },
                {
                  "kind": "optional",
                  "name": "saturday",
                  "type": "boolean",
                  "example": ""
                },
                {
                  "kind": "optional",
                  "name": "sunday",
                  "type": "boolean",
                  "example": ""
                }
              ],
              "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.DailySchedule",
              "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.DailySchedule",
              "description": "DTO representing a publication calendar daily schedule"
            },
            {
              "kind": "optional",
              "name": "monthlySchedule",
              "type": "object",
              "schema": [
                {
                  "kind": "optional",
                  "name": "issuingDay",
                  "type": "integer<int32>",
                  "example": 0
                },
                {
                  "kind": "optional",
                  "name": "issuingTime",
                  "type": "string",
                  "example": ""
                }
              ],
              "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.MonthlySchedule",
              "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.MonthlySchedule",
              "description": "DTO representing a publication calendar monthly schedule"
            },
            {
              "kind": "optional",
              "name": "annualSchedule",
              "type": "object",
              "schema": [
                {
                  "kind": "optional",
                  "name": "issuingMonth",
                  "type": "string",
                  "example": ""
                },
                {
                  "kind": "optional",
                  "name": "issuingDay",
                  "type": "integer<int32>",
                  "example": 0
                },
                {
                  "kind": "optional",
                  "name": "issuingTime",
                  "type": "string",
                  "example": ""
                }
              ],
              "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.AnnualSchedule",
              "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.AnnualSchedule",
              "description": "DTO representing a publication calendar annual schedule"
            },
            {
              "kind": "optional",
              "name": "customSchedule",
              "type": "object",
              "schema": [
                {
                  "kind": "optional",
                  "name": "startDate",
                  "type": "string<date-time>",
                  "example": "2021-09-21T05:33:24.1511371"
                },
                {
                  "kind": "optional",
                  "name": "issuingFrequency",
                  "type": "string",
                  "example": ""
                },
                {
                  "kind": "optional",
                  "name": "issuingUnit",
                  "type": "integer<int32>",
                  "example": 0
                }
              ],
              "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.CustomSchedule",
              "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.CustomSchedule",
              "description": "DTO representing a publication calendar custom schedule"
            },
            {
              "kind": "optional",
              "name": "irregularSchedule",
              "type": "array",
              "example": [],
              "itemType": "string",
              "customType": "string[]",
              "itemExample": ""
            },
            {
              "kind": "optional",
              "name": "nonIssuingDates",
              "type": "array",
              "example": [],
              "itemType": "string",
              "customType": "string[]",
              "itemExample": ""
            },
            {
              "kind": "optional",
              "name": "issuePriorToStart",
              "type": "boolean",
              "example": ""
            },
            {
              "kind": "optional",
              "name": "entitlementEnds",
              "type": "object",
              "schema": [
                {
                  "kind": "optional",
                  "name": "endsNever",
                  "type": "boolean",
                  "example": ""
                },
                {
                  "kind": "optional",
                  "name": "endsAfterTimeUnit",
                  "type": "string",
                  "example": ""
                },
                {
                  "kind": "optional",
                  "name": "endsAfterNumberOfTimeUnits",
                  "type": "integer<int32>",
                  "example": 0
                },
                {
                  "kind": "optional",
                  "name": "endsDateTime",
                  "type": "string<date-time>",
                  "example": ""
                }
              ],
              "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.EntitlementEnd",
              "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.EntitlementEnd",
              "description": "DTO representing a Entitlement End"
            }
          ],
          "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.PublicationCalendarRequest",
          "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.PublicationCalendarRequest",
          "isExpanded": true,
          "description": "DTO representing a publication calendar request"
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "kind": "optional",
                "name": "scheduleReference",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "entitlementFormat",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "friendlyName",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "scheduleType",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "dailySchedule",
                "type": "object",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "issuingTime",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "monday",
                    "type": "boolean",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "tuesday",
                    "type": "boolean",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "wednesday",
                    "type": "boolean",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "thursday",
                    "type": "boolean",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "friday",
                    "type": "boolean",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "saturday",
                    "type": "boolean",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "sunday",
                    "type": "boolean",
                    "example": ""
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.DailySchedule",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.DailySchedule",
                "description": "DTO representing a publication calendar daily schedule"
              },
              {
                "kind": "optional",
                "name": "monthlySchedule",
                "type": "object",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "issuingDay",
                    "type": "integer<int32>",
                    "example": 0
                  },
                  {
                    "kind": "optional",
                    "name": "issuingTime",
                    "type": "string",
                    "example": ""
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.MonthlySchedule",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.MonthlySchedule",
                "description": "DTO representing a publication calendar monthly schedule"
              },
              {
                "kind": "optional",
                "name": "annualSchedule",
                "type": "object",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "issuingMonth",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "issuingDay",
                    "type": "integer<int32>",
                    "example": 0
                  },
                  {
                    "kind": "optional",
                    "name": "issuingTime",
                    "type": "string",
                    "example": ""
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.AnnualSchedule",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.AnnualSchedule",
                "description": "DTO representing a publication calendar annual schedule"
              },
              {
                "kind": "optional",
                "name": "customSchedule",
                "type": "object",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "startDate",
                    "type": "string<date-time>",
                    "example": "2021-09-21T05:33:24.1511371"
                  },
                  {
                    "kind": "optional",
                    "name": "issuingFrequency",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "issuingUnit",
                    "type": "integer<int32>",
                    "example": 0
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.CustomSchedule",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.CustomSchedule",
                "description": "DTO representing a publication calendar custom schedule"
              },
              {
                "kind": "optional",
                "name": "irregularSchedule",
                "type": "array",
                "example": [],
                "itemType": "string",
                "customType": "string[]",
                "itemExample": ""
              },
              {
                "kind": "optional",
                "name": "nonIssuingDates",
                "type": "array",
                "example": [],
                "itemType": "string",
                "customType": "string[]",
                "itemExample": ""
              },
              {
                "kind": "optional",
                "name": "issuePriorToStart",
                "type": "boolean",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "entitlementEnds",
                "type": "object",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "endsNever",
                    "type": "boolean",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "endsAfterTimeUnit",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "endsAfterNumberOfTimeUnits",
                    "type": "integer<int32>",
                    "example": 0
                  },
                  {
                    "kind": "optional",
                    "name": "endsDateTime",
                    "type": "string<date-time>",
                    "example": ""
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.EntitlementEnd",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.EntitlementEnd",
                "description": "DTO representing a Entitlement End"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.PublicationCalendarResponse",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PublicationCalendar.PublicationCalendarResponse",
            "isExpanded": true,
            "description": "DTO representing a publication calendar response"
          }
        ],
        "isExpanded": true,
        "statusCode": "201",
        "description": "Created",
        "jsonExample": "{\n  \"scheduleReference\": \"001CA72IBXWWAV51M2\",\n  \"entitlementFormat\": \"EntitlementFormat1\",\n  \"friendlyName\": \"Example name 1\",\n  \"scheduleType\": \"Daily\",\n  \"dailySchedule\": {\n    \"issuingTime\": \"05:33\",\n    \"monday\": true,\n    \"tuesday\": true,\n    \"wednesday\": true,\n    \"thursday\": true,\n    \"friday\": true,\n    \"saturday\": false,\n    \"sunday\": false\n  },\n  \"nonIssuingDates\": [\n    \"2021-09-21\",\n    \"2021-11-21\"\n  ],\n  \"issuePriorToStart\": false,\n  \"entitlementEnds\": {\n    \"endsNever\": false,\n    \"endsAfterTimeUnit\": \"days\",\n    \"endsAfterNumberOfTimeUnits\": 2\n  }\n}"
      },
      {
        "isExpanded": true,
        "statusCode": "400",
        "description": "An entitlement format must be provided\r\n            <br /> An entitlement format cannot exceed 850 characters\r\n            <br /> A friendly name is required to identify the purpose of the entitlement\r\n            <br /> A friendly name cannot exceed 256 characters\r\n            <br /> Invalid schedule frequency provided. Please provide one of the following values: none, daily, monthly, annual, irregular or custom\r\n            <br /> Issuing day cannot exceed 31\r\n            <br /> Issuing day must be 1 or more\r\n            <br /> Issuing time must be between 00:00 - 23:59 and specified as hours and minutes only\r\n            <br /> Invalid month provided. Please provide the full string value e.g. January\r\n            <br /> Invalid IssuingUnit provided. Please provide a value between 1 - 999\r\n            <br /> Invalid frequency provided. Please provide daily, weekly, monthly or annual\r\n            <br /> Invalid date format non-issuing dates\r\n            <br /> The date provided is invalid\r\n            <br /> Invalid start date provided\r\n            <br /> Invalid dates provided, please provide a date in the future",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "401",
        "description": "Not Authorized",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "Product cannot be found",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "409",
        "description": "A single product can only have 1 physical schedule configured\r\n            <br /> A schedule exists with the provided entitlement format. An entitlement format must be unique on a product\r\n            <br /> A schedule exists with the provided friendly name. A friendly name must be unique on a product",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "412",
        "description": "To configure an issuing schedule, your product must be of type physical or digital\r\n            <br /> A schedule type of daily is required to allow the passing of a daily schedule\r\n            <br /> A schedule type of monthly is required to allow the passing of a monthly schedule\r\n            <br /> A schedule type of annual is required to allow the passing of an annual schedule\r\n            <br /> A schedule type of custom is required to allow the passing of an custom schedule\r\n            <br /> A schedule type of custom is required to allow the passing of a custom dates\r\n            <br /> A schedule type of irregular is required to allow the passing of a irregular dates\r\n            <br /> Entitlement format is not supported for physical products",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint will create a new issuing schedule for a product. It is possible to create a schedule for both physical and digital products. \r\n            If creating a configuration for a digital product, you are required to provide a digital reference.",
    "examples": {
      "languages": [
        {
          "id": "EW6fmKVVIHuwm11jKbGiP",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.fictive.com/REST/api/products/{productReference}/schedules \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "W_rb2VvaC8bASn7JUswJG",
          "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/products/{productReference}/schedules\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "LojkyRfFcD-2RC-L34ITA",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/products/{productReference}/schedules\")\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": "5xHMBa-hAR-JNltMShddj",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/products/{productReference}/schedules\"\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": "EW6fmKVVIHuwm11jKbGiP"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-201",
          "language": "201",
          "code": "{\n  \"scheduleReference\": \"001CA72IBXWWAV51M2\",\n  \"entitlementFormat\": \"EntitlementFormat1\",\n  \"friendlyName\": \"Example name 1\",\n  \"scheduleType\": \"Daily\",\n  \"dailySchedule\": {\n    \"issuingTime\": \"05:33\",\n    \"monday\": true,\n    \"tuesday\": true,\n    \"wednesday\": true,\n    \"thursday\": true,\n    \"friday\": true,\n    \"saturday\": false,\n    \"sunday\": false\n  },\n  \"nonIssuingDates\": [\n    \"2021-09-21\",\n    \"2021-11-21\"\n  ],\n  \"issuePriorToStart\": false,\n  \"entitlementEnds\": {\n    \"endsNever\": false,\n    \"endsAfterTimeUnit\": \"days\",\n    \"endsAfterNumberOfTimeUnits\": 2\n  }\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// An entitlement format must be provided\r\n             An entitlement format cannot exceed 850 characters\r\n             A friendly name is required to identify the purpose of the entitlement\r\n             A friendly name cannot exceed 256 characters\r\n             Invalid schedule frequency provided. Please provide one of the following values: none, daily, monthly, annual, irregular or custom\r\n             Issuing day cannot exceed 31\r\n             Issuing day must be 1 or more\r\n             Issuing time must be between 00:00 - 23:59 and specified as hours and minutes only\r\n             Invalid month provided. Please provide the full string value e.g. January\r\n             Invalid IssuingUnit provided. Please provide a value between 1 - 999\r\n             Invalid frequency provided. Please provide daily, weekly, monthly or annual\r\n             Invalid date format non-issuing dates\r\n             The date provided is invalid\r\n             Invalid start date provided\r\n             Invalid dates provided, please provide a date in the future\n"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Not Authorized\n"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// Product cannot be found\n"
        },
        {
          "id": "response-4-409",
          "language": "409",
          "code": "// A single product can only have 1 physical schedule configured\r\n             A schedule exists with the provided entitlement format. An entitlement format must be unique on a product\r\n             A schedule exists with the provided friendly name. A friendly name must be unique on a product\n"
        },
        {
          "id": "response-5-412",
          "language": "412",
          "code": "// To configure an issuing schedule, your product must be of type physical or digital\r\n             A schedule type of daily is required to allow the passing of a daily schedule\r\n             A schedule type of monthly is required to allow the passing of a monthly schedule\r\n             A schedule type of annual is required to allow the passing of an annual schedule\r\n             A schedule type of custom is required to allow the passing of an custom schedule\r\n             A schedule type of custom is required to allow the passing of a custom dates\r\n             A schedule type of irregular is required to allow the passing of a irregular dates\r\n             Entitlement format is not supported for physical products\n"
        },
        {
          "id": "response-6-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-201"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}