Posts about the simPRO API. Help/support/how-to etc.
Forum rules
- Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
- No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
- Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
- Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
- Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
- Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
- Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
- Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
-
JohnSemmens
- Posts: 5
- Joined: Tue Feb 08, 2022 5:32 am
Post
by JohnSemmens » Tue Feb 08, 2022 6:18 am
Hi Guys,
I'm struggling to get started with creating a Customer Payment via the API.
https://developer.simprogroup.com/apido ... f4f1ba5c87
I'm using this endpoint, with POST:
this payload:
Code: Select all
{
"Payment": {
"PaymentMethod":9,
"DepositAccount": "090",
"Date": "2022-02-06"
},
"Invoices": [
{ "Invoice": 4781, "Amount": "1.02" }
]
}
The response is:
Code: Select all
The remote server returned an error: (422) Unprocessable Entity.
What is the likely error with this call ?
I presume I have a wrong or inconsistent data element.
Best regards,
John Semmens
-
robbertcha
- Posts: 416
- Joined: Thu Apr 15, 2021 10:07 pm
Post
by robbertcha » Tue Feb 08, 2022 10:10 pm
Hi,
422 errors means that the provided body request is incorrect, and it always comes with the explanations.
In your case, please make sure the ID of PaymentMethod is correct, and please change the value of Amount to 1.02 (remove the double quote)
Robbert
API Developer | simPRO Software Group
-
JohnSemmens
- Posts: 5
- Joined: Tue Feb 08, 2022 5:32 am
Post
by JohnSemmens » Wed Feb 09, 2022 12:12 am
Thanks Robbert,
That was exactly the issue.
The double-quotes on the numeric value were the problem.
Best regards,
John Semmens