Hello Team,
Could you help me with the following question?
I try to create a payment.
But receive the following error:
Response: {"message":"The request is invalid.","modelState":{"entity":["The Entity field is required."]}}
An error has occurred.","exceptionMessage":"Inserting 'CA Transaction' record raised at least one error. Please review the errors.\nFinPeriodID: 'Post Period' cannot be empty.","exceptionType"
Could you provide a correct example of the request?
Payment creation. 'Post Period' cannot be empty.","exceptionType"
Hi Andrew,
Can you please share the REST API json, which you are using for payment creation?
Naveen,
Currently, I cannot share. I should ask my dev team to provide an example.
It is not fast. I received only an example of the error.
Maybe you could provide an example of how correctly send a request to create a payment?
Thank you!
Andrew,
Below is the simple REST API JSON to create a payment for an order and it is working as expected. I’m NOT sure about the above issue, which you are getting.
Please cross verify and do changes if required.
Method: PUT
https: //InstanceURl/entity/EndpointName/EndpointVersion/CreatePayments/createPayment
Request:
{
"entity": {},
"parameters": {
"OrderNbr": {
"value": "OrderNbr"
},
"OrderType": {
"value": "OrderType"
},
"PaymentMethod": {
"value": "PaymentMethod"
},
"BranchID": {
"value": "BranchID"
},
"PaymentRefNbr": {
"value": "PaymentRefNbr"
},
"PaymentTotal": {
"value": "100"
}
}
}
Hope this helps!!
As I understood I should add to this request the Post Period.
An the request should have the following view:
Method: PUT
https: //InstanceURl/entity/EndpointName/EndpointVersion/CreatePayments/createPayment
Request:
{
"entity": {},
"parameters": {
"OrderNbr": {
"value": "OrderNbr"
},
"OrderType": {
"value": "OrderType"
},
"PaymentMethod": {
"value": "PaymentMethod"
},
"BranchID": {
"value": "BranchID"
},
"PaymentRefNbr": {
"value": "PaymentRefNbr"
},
"PaymentTotal": {
"value": "100"
},
"PostPeriod": {
"value": "02/2021"
},
}
}
Is it correct?
Or should the PostPeriod value embed somehow differently?
Maybe like this?
{
"entity": {},
"parameters": {
"OrderNbr": {
"value": "OrderNbr"
},
"OrderType": {
"value": "OrderType"
},
"PaymentMethod": {
"value": "PaymentMethod"
},
"BranchID": {
"value": "BranchID"
},
"PaymentRefNbr": {
"value": "PaymentRefNbr"
},
"PaymentTotal": {
"value": "100"
},
"ApplicationHistory": {
"PostPeriod": {
"value": 02/2021
}
},
}
}
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.