Hi everyone,
I’m currently working with Acumatica and trying to expose a custom table via REST API. I created a custom API entity and endpoint, but the API Create Record doesn't work.
I'm using
Post {{url}}/entity/webOrderTaxComparison/22.200.001/webOrderTaxComparison/Save
Body:
{
"Entity": {
"WebOrderTaxComparisonID": { "value": 2 },
"WebOrderID": { "value": "WEB006" },
"AcuOrderID": { "value": "ACB006" },
"AcuTaxTotal": { "value": 95.50 },
"WebTaxTotal": { "value": 95.75 }
}
}
or
Put {{url}}/entity/webOrderTaxComparison/22.200.001/webOrderTaxComparison
Body:
{
"WebOrderTaxComparisonID": { "value": 2 },
"WebOrderID": { "value": "WEB006" },
"AcuOrderID": { "value": "ACB006" },
"AcuTaxTotal": { "value": 95.50 },
"WebTaxTotal": { "value": 95.75 }
}
response issue is:
"message": "An error has occurred.",
"exceptionMessage": "Sequence contains more than one matching element",

However, I delete "webordertaxcomParisonid": {"Value": 2},
Then do not Create Record it has the problem:
"message": "An error has occurred.",
"exceptionMessage": "An item with the same key has already been added.",

My custom graph:

And the DAC:


My custom screen VX101010


A custom REST API endpoint,

Since I created a separate custom API endpoint and manually mapped the fields, is there anything else I need to do for Acumatica to API Create Record works ?
Any tips would be greatly appreciated!