Skip to main content
Participating Frequently
October 2, 2021
Answered

UNSUPPORTED_MEDIA_TYPE Error when trying to use /agreements API

  • October 2, 2021
  • 1 reply
  • 3825 views

Hi All,

I am facing 415 error code, when trying to create an agreement. Can anyone asisst me on what am i doing wrong. i ma using accesstoken, api access point is pointing to shard "in1". PFB the json request i am using.

 

{
"fileInfos": [
{
"document": {
"createdDate": "2021-10-01",
"id": "",
"label": "Testing from API",
"numPages": 31,
"mimeType": "",
"name": ""
},
"label": "Testing from API 1",
"libraryDocumentId": "CBJCHBCAABAAXTzblJ-nauekJvs7OKwIc4hITZxX4IkL",
"notarize": false,
"transientDocumentId": "",
"urlFileInfo": {
"mimeType": "",
"name": "",
"url": ""
}
}
],
"name": "",
"participantSetsInfo": [
{
"memberInfos": [
{
"email": "varunchandana450@gmail.com",
"id": "",
"securityOption": {
"authenticationMethod": "NONE",
"nameInfo": {
"firstName": "Varun",
"lastName": "Ch"
},
"notaryAuthentication": "",
"password": "",
"phoneInfo": {
"countryCode": "",
"countryIsoCode": "",
"phone": ""
}
}
}
],
"order": 1,
"role": "SIGNER",
"id": "",
"label": "",
"name": "",
"privateMessage": "",
"visiblePages": [
""
]
}
],
"signatureType": "ESIGN",
"state": "IN_PROCESS",
"ccs": [
{
"email": "",
"label": "",
"visiblePages": [
""
]
}
],
"createdDate": "2021-10-01T01:46:19Z",
"deviceInfo": {
"applicationDescription": "",
"deviceDescription": "",
"deviceTime": ""
},
"documentVisibilityEnabled": false,
"emailOption": {
"sendOptions": {
"completionEmails": "ALL",
"inFlightEmails": "ALL",
"initEmails": "ALL"
}
},
"expirationTime": "2021-10-04T01:46:19Z",
"externalId": {
"id": "NB-10101"
},
"firstReminderDelay": 1,
"formFieldLayerTemplates": [
{
"document": {
"createdDate": "2021-10-01",
"id": "",
"label": "",
"numPages": 1,
"mimeType": "",
"name": ""
},
"label": "",
"libraryDocumentId": "CBJCHBCAABAAXTzblJ-nauekJvs7OKwIc4hITZxX4IkL",
"notarize": false,
"transientDocumentId": "",
"urlFileInfo": {
"mimeType": "",
"name": "",
"url": ""
}
}
],
"groupId": "",
"hasFormFieldData": false,
"hasSignerIdentityReport": false,
"id": "",
"isDocumentRetentionApplied": false,
"lastEventDate": "",
"locale": "",
"mergeFieldInfo": [
{
"defaultValue": "",
"fieldName": ""
}
],
"message": "",
"notaryInfo": {
"appointment": "",
"notaryEmail": "",
"notaryType": "",
"note": "",
"payment": ""
},
"parentId": "",
"postSignOption": {
"redirectDelay": 1,
"redirectUrl": ""
},
"reminderFrequency": "ONCE",
"securityOption": {
"openPassword": ""
},
"senderEmail": "",
"status": "",
"type": "",
"vaultingInfo": {
"enabled": false
},
"workflowId": "CBJCHBCAABAAEeb7TJbGCnJAQABh9J8alm8EcJt3NmXP"
}

This topic has been closed for replies.
Correct answer SimonESATS

Build out the minimum json, or remove from the complete json the parameters you don't need. Though most likely the issue is with having multipl options under fileInfo section. You only can use one in each section.

1 reply

Adobe Employee
October 4, 2021

start by using the minimised json, there's a lot of parameter you are no using, the fileinfo ones in particular. 

Use the minimum json example and replace transient documentid with the libraryid as that's what you seem to be using.

varun5E81Author
Participating Frequently
October 4, 2021

Hi Simon, 
Thanks for responding !
The minimised json is working fine. For Actual Development we will need the Complete Json, as we need postSignOption, ExternalId, expirationTime, Remainders, formfields etc. for our business requirements. So when i  try with complete json i am facing this issue.

(Currently i am using an individual developer account, We have a business account i am waiting for the client to provide us the credentials)

SimonESATSCorrect answer
Adobe Employee
October 5, 2021

Build out the minimum json, or remove from the complete json the parameters you don't need. Though most likely the issue is with having multipl options under fileInfo section. You only can use one in each section.