How can I send some customer details to the custom fields through the RAH API?
Mehrnoosh
Member Posts: 36 Reckoner
Hi guys,
I'm trying to create a customer or update one in the Reckon Account Hosted though the API. I've created some custom fields for the customer through front end for the extra info. How can I send records to these fields? How can I define these fields in the QBXML body?
I really appreciate your help.
I'm trying to create a customer or update one in the Reckon Account Hosted though the API. I've created some custom fields for the customer through front end for the extra info. How can I send records to these fields? How can I define these fields in the QBXML body?
I really appreciate your help.
0
Comments
-
Hi Mehrnoosh,
Thank you for your post.To do this you need to include a extended QBXML call to also include the additional elements required for custom fields. For a example please see below
<DataExtModRq>
<DataExtMod>
<OwnerID>0</OwnerID>
<DataExtName>CustomerNumber</DataExtName>
<ListDataExtType>Customer</ListDataExtType>
<ListObjRef>
<FullName>Test Customer.</FullName>
</ListObjRef>
<DataExtValue>1234</DataExtValue>
</DataExtMod>
</DataExtModRq>In this instance the user is updating the Customer List for the Customer Test Customer and adding the number 1234 to the custom field CustomerNumber.
I hope the above helps.
Thanks
Ifti
Reckon API Team
2 -
Thanks Ifti,
I tried it and it works for sending a value to one of the custom fields.{
I'm going to send more than one custom value to multiple custom fields belong to the customer in one payload. How can I send multiple? I tried this Qbxml:
"FileName":"Q:\Mycompanyfile.QBW",
"Operation":"<?xml version="1.0\""?><?qbxml version=\""6.1\""?><QBXML><QBXMLMsgsRq onError=\""stopOnError\"">
<DataExtAddRq>
<DataExtAdd>
<OwnerID>0</OwnerID>
<DataExtName>Member</DataExtName>
<ListDataExtType>Customer</ListDataExtType>
<ListObjRef>
<ListID>80000069-1500524784</ListID>
</ListObjRef>
<DataExtValue>22335</DataExtValue>
</DataExtAdd>
</DataExtAddRq>
</QBXMLMsgsRq>
</QBXML>"",
""UserName"":""username"",
""Password"":""password"",
""CountryVersion"":""2015.R2.AU""
}{
It returns code 400 bad request:
""FileName"":""Q:\Mycompanyfile.QBW"",
""Operation"":""<?xml version=\""1.0\""?><?qbxml version=\""6.1\""?><QBXML><QBXMLMsgsRq onError=\""stopOnError\"">
<DataExtAddRq>
<DataExtAdd>
<OwnerID>0</OwnerID>
<DataExtName>Member</DataExtName>
<ListDataExtType>Customer</ListDataExtType>
<ListObjRef>
<ListID>80000069-1500524784</ListID>
</ListObjRef>
<DataExtValue>22335</DataExtValue>
</DataExtAdd>
<DataExtAdd>
<OwnerID>0</OwnerID>
<DataExtName>Ticket</DataExtName>
<ListDataExtType>Customer</ListDataExtType>
<ListObjRef>
<ListID>80000069-1500524784</ListID>
</ListObjRef>
<DataExtValue>12345</DataExtValue>
</DataExtAdd>
</DataExtAddRq>
</QBXMLMsgsRq>
</QBXML>"",
""UserName"":""username"",
""Password"":""password"",
""CountryVersion"":""2015.R2.AU""
}
{
""Message"": ""Error connecting to Reckon Accounts. Reckon Accounts found an error when parsing the provided XML text stream.""
}
It seems to me my XML is not in right order or I missed something. Any idea?"0 -
Hi Mehrnoosh,
You don't need to include the <OwnerID>0</OwnerID> multiple times
Thanks
Simon
0 -
Hi Simon,
Thanks,
I took out the second <OwnerID>0</OwnerID> from the request body but I still receive the same error:{
"Message": "Error connecting to Reckon Accounts. Reckon Accounts found an error when parsing the provided XML text stream."
}0
This discussion has been closed.
Categories
- All Categories
- 6.8K Accounts Hosted
- 17 📢 Reckon Accounts Hosted - Announcements
- 6K Reckon Accounts (Desktop)
- 8 📢 Reckon Accounts Desktop - Announcements
- 1.5K Reckon Payroll
- 39 📢 Reckon Payroll - Announcements
- 15 Reckon Payroll Help Videos 🎥
- 30 Reckon Mate App
- 2.7K Reckon One
- 16 📢 Reckon One - Announcements
- 14 Reckon Invoices App
- 24 Reckon Insights
- 101 Reckon API
- 310 Point of Sale
- 1.9K Personal Plus and Home & Business
- 70 About Reckon Community