I am trying to create a Quote via the REST API.
I have tried submitting the same data as is described in the documentation here:
I have tried both v2 and v4 of the API.
I keep getting the same error, even when I submit the same fields that are provided in the example.
Could you please provide an example of the POST data I should submit to get it to work?
Attempt 1
Here was the POST data I submitted:
{
"data": [
{
"Subject": "Test Quote 230219A",
"Quoted_Items": [
{
"Product_Name": {
"name": "ZCRM_Product",
"id": "****************"
},
"$line_tax": [
{
"percentage": 1.5,
"name": "Common Tax"
}
],
"Quantity": 100,
"Discount": 0,
"Description": "Test product details A",
"Line_Tax": [
{
"percentage": 10,
"name": "Sales Tax"
},
{
"percentage": 1,
"name": "Vat"
}
]
}
]
}
]
}
Here was the response:
Array
(
[data] => Array
(
[0] => Array
(
[code] => MANDATORY_NOT_FOUND
[details] => Array
(
[api_name] => Product_Details
)
[message] => required field not found
[status] => error
)
)
)
Attempt 2
I have also tried using the field names as they appear in Deluge code that is working for me:
{
"data": [
{
"Product_Details": [
{
"product": {
"name": "Granola\/Muesli\/Crunchola Solutions.",
"id": ""****************""
},
"product_description": "Test description",
"quantity": 1,
"net_total": 5000,
"total": 0,
"list_price": 5000
}
],
"Subject": "Test Quote 230219A",
"Quote_Stage": "Draft",
"Valid_Till": "2023-03-21",
"Contact_Name": "",
"Account_Name": "",
"Deal": "Existing Deal",
"Deal_Name": ""
}
]
}
Response:
Array
(
[data] => Array
(
[0] => Array
(
[code] => MANDATORY_NOT_FOUND
[details] => Array
(
[api_name] => Product_Details
)
[message] => required field not found
[status] => error
)
)
)
Best regards
Marcus Slabak