Hi, I'm trying to use the REST API via Postman to load some historical sales orders. I have a basic example working, but when I try to specify a JSON object for the Contact_Name field (so I can link the sales record being created to a contact), I get the following error:
{
"data": [
{
"code": "INVALID_DATA",
"details": {
"api_name": "Contact_Name"
},
"message": "invalid data",
"status": "error"
}
]
}
Here's my JSON (I believe Web_SO_Number is a custom field we added):
{
"data": [
{
"Owner": {
"id": "5027237000000365009"
},
"Contact_Name": {
"id": "2165315000025476001"
},
"Purchase_Date": "2021-09-21",
"Subject": "Original Order 3",
"Web_SO_Number": "G-9209",
"Status": "Shipped",
"Product_Details": [
{
"product": {
"id": "5027237000000399428"
},
"quantity": 1
},
{
"product": {
"id": "5027237000000399429"
},
"quantity": 1
}
]
}
]
}
I'm following the example in the official Postman workspace which shows this:
{
"data": [
{
"Owner": {
"id": "{{user-id}}"
},
"Deal_Name": {
"id": "{{deal-id}}"
},
"Account_Name": {
"id": "{{account-id}}"
},
"Quote_Name": {
"id": "{{quote-id}}"
},
"Contact_Name": {
"id": "{{contact-id}}"
},
"Discount": 127.67,
"Description": "Design your own layouts that align your business processes precisely. Assign them to profiles appropriately.",
"Customer_No": "Customer_No",
"Shipping_State": "Shipping_State",
"Tax": 127.67,
"Billing_Country": "Billing_Country",
"Carrier": "USPS",
"Status": "Delivered",
"Sales_Commission": 127.67,
"Due_Date": "2018-01-25",
"Billing_Street": "Billing_Street",
"Adjustment": 127.67,
"Terms_and_Conditions": "Design your own layouts that align your business processes precisely. Assign them to profiles appropriately.",
"Billing_Code": "Billing_Code",
"Product_Details": [
{
"product": {
"id": "1000000071967"
},
"quantity": 150,
"Discount": 20,
"product_description": "product_description",
"Unit Price": 10,
"line_tax": [
{
"percentage": 10.5,
"name": "Sales Tax"
},
{
"percentage": 6.5,
"name": "Common Tax"
}
]
},
{
"product": {
"id": "100000008007"
},
"quantity": 151,
"Discount": 21,
"product_description": "product_description",
"Unit Price": 11,
"line_tax": [
{
"percentage": 11.5,
"name": "Sales Tax"
},
{
"percentage": 7.5,
"name": "Common Tax"
}
]
}
],
"Subject": "Subject",
"Excise_Duty": 127.67,
"Shipping_City": "Shipping_City",
"Shipping_Country": "Shipping_Country",
"Shipping_Code": "Shipping_Code",
"Billing_City": "Billing_City",
"Purchase_Order": "Purchase_Order",
"Billing_State": "Billing_State",
"$line_tax": [
{
"percentage": 12.5,
"name": "Sales Tax"
},
{
"percentage": 8.5,
"name": "Common Tax"
}
],
"Pending": "Pending",
"Shipping_Street": "Shipping_Street"
}
]
}
So as far as I can tell, I'm filling in the Contact_Name field correctly, but I still get an error. If I remove that field, it works. I have confirmed the contact ID I am specifying exists in the sandbox I'm working in.
Thanks for any suggestions.