Create an issuing schedule
1 min
code examples curl request post \\ \ url https //api fictive com/rest/api/products/{productreference}/schedules \\ \ header 'accept application/json' \\ \ header 'x version string'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); myheaders append("x version", "string"); var requestoptions = { method 'post', headers myheaders, redirect 'follow' }; fetch("https //api fictive com/rest/api/products/{productreference}/schedules", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //api fictive com/rest/api/products/{productreference}/schedules") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request\["x version"] = "string" response = https request(request) puts response read body import requests import json url = "https //api fictive com/rest/api/products/{productreference}/schedules" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json', 'x version' 'string' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses { "schedulereference" "001ca72ibxwwav51m2", "entitlementformat" "entitlementformat1", "friendlyname" "example name 1", "scheduletype" "daily", "dailyschedule" { "issuingtime" "05 33", "monday" true, "tuesday" true, "wednesday" true, "thursday" true, "friday" true, "saturday" false, "sunday" false }, "nonissuingdates" \[ "2021 09 21", "2021 11 21" ], "issuepriortostart" false, "entitlementends" { "endsnever" false, "endsaftertimeunit" "days", "endsafternumberoftimeunits" 2 } }// an entitlement format must be provided an entitlement format cannot exceed 850 characters a friendly name is required to identify the purpose of the entitlement a friendly name cannot exceed 256 characters invalid schedule frequency provided please provide one of the following values none, daily, monthly, annual, irregular or custom issuing day cannot exceed 31 issuing day must be 1 or more issuing time must be between 00 00 23 59 and specified as hours and minutes only invalid month provided please provide the full string value e g january invalid issuingunit provided please provide a value between 1 999 invalid frequency provided please provide daily, weekly, monthly or annual invalid date format non issuing dates the date provided is invalid invalid start date provided invalid dates provided, please provide a date in the future // not authorized // product cannot be found // a single product can only have 1 physical schedule configured a schedule exists with the provided entitlement format an entitlement format must be unique on a product a schedule exists with the provided friendly name a friendly name must be unique on a product // to configure an issuing schedule, your product must be of type physical or digital a schedule type of daily is required to allow the passing of a daily schedule a schedule type of monthly is required to allow the passing of a monthly schedule a schedule type of annual is required to allow the passing of an annual schedule a schedule type of custom is required to allow the passing of an custom schedule a schedule type of custom is required to allow the passing of a custom dates a schedule type of irregular is required to allow the passing of a irregular dates entitlement format is not supported for physical products // internal server error
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.