Skip to main content
Solved

Ability to auto apply a debit adjustment to a bill via REST API

  • December 11, 2024
  • 1 reply
  • 55 views

Hello

 

I m not seeing a default action in the web service endpoints for bills to allow an apply action on a debit adjustment type bill. Can I accomplish this action via the rest api? Applying this debit adjustment to another bill.

 

 

Best answer by Dmitrii Naumov

@QuicklyTest 

here is an example

PUT {{sitename}}/entity/Default/23.200.001/Check?$expand=Details
{
"id": "c6574f8e-73b9-ef11-8c73-ac198e472cfe",
"ReferenceNbr": {
"value": "005573"
},
"Type": {
"value": "Debit Adj."
},
"Details": [
{

"AmountPaid": {
"value": 123.0000
},

"DocType": {
"value": "Bill"
},
"ReferenceNbr": {
"value": "005572"
}
}
]
}

You’ll need to release the document after that as well

POST {{sitename}}/entity/Default/23.200.001/Check/ReleaseCheck
{
"entity": {
"id": "c6574f8e-73b9-ef11-8c73-ac198e472cfe",
"ReferenceNbr": {
"value": "005573"
},
"Type": {
"value": "Debit Adj."
}
}
}

You can also combine the two API calls into one:
 

POST {{sitename}}/entity/Default/23.200.001/Check/ReleaseCheck
{
"entity": {
"id": "c6574f8e-73b9-ef11-8c73-ac198e472cfe",
"ReferenceNbr": {
"value": "005573"
},
"Type": {
"value": "Debit Adj."
},
"Details": [
{
"AmountPaid": {
"value": 123.0000
},
"DocType": {
"value": "Bill"
},
"ReferenceNbr": {
"value": "005572"
}
}
]
}
}

 

1 reply

Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • Answer
  • December 13, 2024

@QuicklyTest 

here is an example

PUT {{sitename}}/entity/Default/23.200.001/Check?$expand=Details
{
"id": "c6574f8e-73b9-ef11-8c73-ac198e472cfe",
"ReferenceNbr": {
"value": "005573"
},
"Type": {
"value": "Debit Adj."
},
"Details": [
{

"AmountPaid": {
"value": 123.0000
},

"DocType": {
"value": "Bill"
},
"ReferenceNbr": {
"value": "005572"
}
}
]
}

You’ll need to release the document after that as well

POST {{sitename}}/entity/Default/23.200.001/Check/ReleaseCheck
{
"entity": {
"id": "c6574f8e-73b9-ef11-8c73-ac198e472cfe",
"ReferenceNbr": {
"value": "005573"
},
"Type": {
"value": "Debit Adj."
}
}
}

You can also combine the two API calls into one:
 

POST {{sitename}}/entity/Default/23.200.001/Check/ReleaseCheck
{
"entity": {
"id": "c6574f8e-73b9-ef11-8c73-ac198e472cfe",
"ReferenceNbr": {
"value": "005573"
},
"Type": {
"value": "Debit Adj."
},
"Details": [
{
"AmountPaid": {
"value": 123.0000
},
"DocType": {
"value": "Bill"
},
"ReferenceNbr": {
"value": "005572"
}
}
]
}
}