# Form the URL
url = ''.join(['/rm','/rmaccounts/', CUSTID, '/vendors/', VENDORID, '/packages/', PACKAGEID, '/titles'])
# Create Connection Instance
conn = http.client.HTTPSConnection("sandbox.ebsco.io")
# Payload
payload = "{\r\n \"titleName\": \"custom-title-74\",\r\n \"pubType\": \"Book\",\r\n \"publisherName\": \"EBSCO Publishing\",\r\n \"isPeerReviewed\": false,\r\n \"edition\": 1,\r\n \"description\": \"description-test\",\r\n \"identifiersList\": [\r\n {\r\n \"id\": \"1234\",\r\n \"subtype\": 2,\r\n \"type\": 1\r\n }\r\n ],\r\n \"contributorIdList\": [\r\n {\r\n \"type\": \"editor\",\r\n \"contributor\": \"Jon Doe\"\r\n }\r\n ],\r\n \"url\": \"http://www.ebsco.com\",\r\n \"customCoverageList\": [\r\n {\r\n \"beginCoverage\": \"1989-03-01\",\r\n \"endCoverage\": \"2001-06-30\"\r\n }\r\n ],\r\n \"coverageStatement\": \"Issues on or after 6/1/1992\",\r\n \"customEmbargoPeriod\": {\r\n \"embargoUnit\": \"Days\",\r\n \"embargoValue\": \"1\"\r\n },\r\n \"userDefinedField1\": \"String1\",\r\n \"userDefinedField2\": \"String2\",\r\n \"userDefinedField3\": \"String3\",\r\n \"userDefinedField4\": \"String4\",\r\n \"userDefinedField5\": \"String5\"\r\n}"
# Create the Request Headers
headers = {
'x-api-key': APIKEY,
'content-type': "application/json"
}
# Send Request
conn.request("POST", url, payload, headers)
# Get Response
res = conn.getresponse()