I am using the SugarMarket API and I want to transport an HTML page to a new landing page in Sugar Market. I performed the authentication according to "Token-Based Authentication" and I used the token for Call API:
POST - developer.salesfusion.com/api/2.0/landing_pages/
AUTHORIZATION Basic Auth
Head: {
"Content-Type:application/json",
"Authorization: Token " . $token
}
in the Body i use this Prototype:
{
"description": "string",
"html": "string",
"name": "string",
"status": "string",
"type": "string",
"view_data": {
"code": {
"css": "string",
"html": "string"
},
"sections": [
{
"mobileHidden": true,
"rows": [
{
"columns": [
{
"items": [
{
"columnIndex": 0,
"formId": "string",
"innerHTML": "string",
"itemIndex": 0,
"mobileHidden": true,
"origin": "string",
"rowIndex": 0,
"sectionIndex": 0,
"styles": {
"min-height": "string",
"text-align": "string"
},
"type": "string"
}
],
"mobileHidden": true,
"size": 0,
"styles": {
"background": "string",
"border-color": "string",
"border-style": "string",
"border-width": "string",
"text-align": "string"
}
}
],
"id": "string",
"mobileHidden": true,
"styles": {
"background": "string",
"border-color": "string",
"border-style": "string",
"border-width": "string",
"min-height": "string"
}
}
],
"styles": {
"background": "string",
"border-color": "string",
"border-style": "string",
"border-width": "string",
"min-height": "string"
}
}
],
"settings": {
"description": "string",
"googleAnalyticsTagId": "string",
"pageScripts": "string",
"scripts": "string",
"styles": {
"colors": [
"string"
]
},
"title": "string",
"userScripts": "string"
}
}
}
But I still receive a 500 internal server error.
Is there a problem in the structure of the body? It would be nice if somebody could give me a hint of what is missing.