Skip to main content
Solved

How to get all Expense Receipts using API

  • Aug 28, 2025 6:09 AM UTC
  • 8 replies
  • 185 views
  • Translate All

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?

View original

8 replies

JSpikowski
Jr Varsity II
Forum|alt.badge.img
  • Jr Varsity II
  • Aug 28, 2025 8:57 AM UTC

What the error being returned?

Translate

Dipak Nilkanth
Pro III
Forum|alt.badge.img+14

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!

Translate

JSpikowski
Jr Varsity II
Forum|alt.badge.img
  • Jr Varsity II
  • Aug 28, 2025 9:09 AM UTC

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

 

Translate

Dipak Nilkanth
Pro III
Forum|alt.badge.img+14

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

Translate

  • Author
  • Freshman I
  • Aug 28, 2025 9:20 AM UTC

I dont get any error

just a 200 ok and blank…

 

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

 

 

Translate

  • Author
  • Freshman I
  • Aug 28, 2025 9:22 AM UTC

I’ve got lots of expense data.

heres just a sample of some expense receipts

 

 

Translate

JSpikowski
Jr Varsity II
Forum|alt.badge.img
  • Jr Varsity II
  • Aug 28, 2025 9:39 AM UTC

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 →

 

Translate

Dmitrii Naumov
Community Manager
Forum|alt.badge.img+7
  • Community Manager
  • Answer
  • Aug 28, 2025 3:44 PM UTC

​@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?

Translate