Skip to main content
Answer

How to get all Expense Receipts using API

  • August 28, 2025
  • 8 replies
  • 99 views

Im trying to get all expense receipt 

 

using  GET https://{BASE URL}/entity/Default/22.200.001/ExpenseReceipt

 

but nothing is returned on postman. Can any help ? what am I missing here?

If i replace ExpenseReceipt with Vendor, I get a list of all vendors.

 

Best answer by Dmitrii Naumov

@gng it’s possible that the user you use to connect does not have the access rights to see those expense receipts. 

Do you use the same user to view them in UI and via API?

8 replies

JSpikowski
Jr Varsity II
Forum|alt.badge.img
  • Jr Varsity II
  • August 28, 2025

What the error being returned?


DipakNilkanth
Pro III
Forum|alt.badge.img+13

Hi ​@gng,

What error are you seeing after sending the API call?

Please confirm that you have Expense Receipt data available in your Acumatica instance.

I tested the same URL and was able to successfully return all the Expense Receipts. Please check below.
 

Hope, this helps!


JSpikowski
Jr Varsity II
Forum|alt.badge.img
  • Jr Varsity II
  • August 28, 2025

Works fine from here. It returned a bunch of data.

 


DipakNilkanth
Pro III
Forum|alt.badge.img+13

Hi ​@JSpikowski, It’s Typo mistake. it should be “ExpenseReceipt” instead of “ExpenseReciept”.


  • Author
  • Freshman I
  • August 28, 2025

I dont get any error

just a 200 ok and blank…

 

when i replace ExpenseReceipt with Vendor I get a list of vendors…

 

 


  • Author
  • Freshman I
  • August 28, 2025

I’ve got lots of expense data.

heres just a sample of some expense receipts

 

 


JSpikowski
Jr Varsity II
Forum|alt.badge.img
  • Jr Varsity II
  • August 28, 2025

Here is my test script.

' Acumatica REST - ExpenseReceipt

IMPORT curl.sbi
IMPORT webext.sbi

base_url = "http://laptop/acumaticadb/entity/auth/"
auth_str = web::base64_encode("admin:password")

jstr = """
{
"name": "admin",
"password": "WordPass52!",
"company": "Demo"
}
"""

' Login
ch = curl::init()
curl::option(ch, "URL", base_url & "Login")
curl::option(ch, "HEADER")
curl::option(ch, "HTTPHEADER", "Content-Type: application/json")
curl::option(ch, "HTTPHEADER", "Authorization: Basic " & auth_str)
curl::option(ch, "POSTFIELDS", jstr)
response_headers = curl::perform(ch)
crumbs = web::MakeCookies(response_headers)
curl::finish(ch)

' ExpenseReceipt
ch = curl::init()

curl::option(ch, "URL", "http://localhost/acumaticadb/entity/Default/24.200.001/ExpenseReceipt")
curl::option(ch, "HTTPHEADER", "Content-Type: application/x-www-form-urlencoded")
curl::option(ch, "HTTPHEADER", "Cookie: " & crumbs)
curl::option(ch, "HTTPHEADER", "Authorization: Basic " & auth_str)
json = curl::perform(ch)
curl::finish(ch)

' Logout
ch = curl::init()
curl::option(ch, "URL", base_url & "Logout")
curl::option(ch, "POST")
curl::option(ch, "HTTPHEADER", "Cookie: " & crumbs)
curl::option(ch, "HTTPHEADER", "Authorization: Basic " & auth_str)
curl::option(ch, "HTTPHEADER", "Content-Length: 0")
curl::perform(ch)
curl::finish(ch)

PRINT json,"\n"
END

Output

C:\Acumatica>sbc ExpenseReceipt.sb
[{"id":"aafc96bb-04ca-ef11-b391-00155dc1a371","rowNumber":1,"note":{"value":""},"Branch":{"value":"SERVEAST"},"ClaimAmount":{"value":439.3000},"ClaimedBy":{"value":"EP000000C1"},"Date":{"value":"2025-01-13T00:00:00-08:00"},"ExpenseItemID":{"value":"CARRENT"},"LastModifiedDateTime":{"value":"2023-12-31T16:00:00-08:00"},"ReceiptID":{"value":"000451"},"Status":{"value":"Released"},"TaxTotal":{"value":0.0000},"custom":{},"_links":{"self":"/acumaticadb/entity/Default/24.200.001/ExpenseReceipt/aafc96bb-04ca-ef11-b391-00155dc1a371","files:put":"/acumaticadb/entity/Default/24.200.001/files/PX.Objects.EP.ExpenseClaimDetailEntry/ClaimDetails/aafc96bb-04ca-ef11-b391-00155dc1a371/{filename}"}},{"id":"a8fc96bb-04ca-ef11-b391-00155dc1a371","rowNumber":2,"note":{"value":""},"Branch":{"value":"SERVEAST"},"ClaimAmount":{"value":798.9500},"ClaimedBy":{"value":"EP000000C1"},"Date":{"value":"2025-01-13T00:00:00-08:00"},"ExpenseItemID":{"value":"ACCOMODATE"},"LastModifiedDateTime":{"value":"2023-12-31T16:00:00-08:00"},"ReceiptID":{"value":"000450"},"Status":{"value":"Released"},"TaxTotal":{"value":0.0000},"custom":{},"_links":{"self":"/acumaticadb/entity/Default/24.200.001/ExpenseReceipt/a8fc96bb-04ca-ef11-b391-00155dc1a371","files:put":"/acumaticadb/entity/Default/24.200.001/files/PX.Objects.EP.ExpenseClaimDetailEntry/ClaimDetails/a8fc96bb-04ca-ef11-b391-00155dc1a371/{filename}"}}, <!-- TRUNCATED →

 


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • Answer
  • August 28, 2025

@gng it’s possible that the user you use to connect does not have the access rights to see those expense receipts. 

Do you use the same user to view them in UI and via API?