Skip to main content
Question

Login Syntax for OData


Forum|alt.badge.img
  • Semi-Pro II
  • 247 replies

Hello community,

I have been trying to use a GET method to login to my Acumatica instance using Postman, but it displays 404 error or sometimes 401 unauthorized error.

i have created a user account and have given the account as Admin & Access to OData roles. I have been using the following syntax in the postman:

https://siteURL/AcumaticaERP/OData

Is this the correct syntax that I have been using? If yes then why I am facing the issue?

 

Thanks in advance.

15 replies

Forum|alt.badge.img
  • Author
  • Semi-Pro II
  • 247 replies
  • January 11, 2024
jinin wrote:

Hi @Harry ,

To configure basic authorization in Postman and test it, do the following:

1.In Postman, create a new collection and, on the Authorization tab, configure its authorization settings as follows:

a. In the Type box, select the Basic Auth type.

b. In the Username and Password boxes, type the username and password that you are using to access the Acumatica ERP instance for the training course.

c. Click Save.

2. In the collection, add a GET request to the following URL to retrieve the list of generic inquiries exposed through OData.

http://localhost/MyStoreInstance/OData/$metadata

3.Send the request

Is ODATA only used to retrieve the data from Generic Inquiries?


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 701 replies
  • January 11, 2024

Hi @Harry 

To configure basic authorization in Postman and test it, do the following:

1.In Postman, create a new collection and, on the Authorization tab, configure its authorization settings as follows:
a. In the Type box, select the Basic Auth type.
b. In the Username and Password boxes, type the username and password that you are using to access the Acumatica ERP instance for the training course.
c. Click Save.

2. In the collection, add a GET request to the following URL to retrieve the list of generic inquiries exposed through OData.

Url : siteURL/AcumaticaERP/OData/$metadata


3. Send the request.
 


Forum|alt.badge.img
  • Author
  • Semi-Pro II
  • 247 replies
  • January 11, 2024

Hey @jinin , is the OData only used to work on Generic Inquiries of Acumatica?


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 701 replies
  • January 11, 2024

Hi @Harry ,

  • By using OData Version 3.0, you can expose the results of generic inquiries to external systems.
  • By using OData Version 4.0, you can request data from Acumatica ERP by directly accessing data access classes (DACs) without configuring any generic inquiry.

Forum|alt.badge.img
  • Author
  • Semi-Pro II
  • 247 replies
  • January 11, 2024
jinin wrote:

Hi @Harry ,

  • By using OData Version 3.0, you can expose the results of generic inquiries to external systems.
  • By using OData Version 4.0, you can request data from Acumatica ERP by directly accessing data access classes (DACs) without configuring any generic inquiry.

So can we apply CRUD operations using ODATA?


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 701 replies
  • January 11, 2024
Harry wrote:
jinin wrote:

Hi @Harry ,

  • By using OData Version 3.0, you can expose the results of generic inquiries to external systems.
  • By using OData Version 4.0, you can request data from Acumatica ERP by directly accessing data access classes (DACs) without configuring any generic inquiry.

So can we apply CRUD operations using ODATA?

OData is primarily used for data retrieval purposes


Forum|alt.badge.img
  • Author
  • Semi-Pro II
  • 247 replies
  • January 11, 2024
jinin wrote:

Hi @Harry 

To configure basic authorization in Postman and test it, do the following:

1.In Postman, create a new collection and, on the Authorization tab, configure its authorization settings as follows:
a. In the Type box, select the Basic Auth type.
b. In the Username and Password boxes, type the username and password that you are using to access the Acumatica ERP instance for the training course.
c. Click Save.

2. In the collection, add a GET request to the following URL to retrieve the list of generic inquiries exposed through OData.

Url : siteURL/AcumaticaERP/OData/$metadata


3. Send the request.
 

What is the purpose of $metadata?
So if i have a dac of APInvoice then my syntax would be siteURL/AcumaticaERP/OData/APInvoice ?


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 701 replies
  • January 11, 2024
Harry wrote:
jinin wrote:

Hi @Harry 

To configure basic authorization in Postman and test it, do the following:

1.In Postman, create a new collection and, on the Authorization tab, configure its authorization settings as follows:
a. In the Type box, select the Basic Auth type.
b. In the Username and Password boxes, type the username and password that you are using to access the Acumatica ERP instance for the training course.
c. Click Save.

2. In the collection, add a GET request to the following URL to retrieve the list of generic inquiries exposed through OData.

Url : siteURL/AcumaticaERP/OData/$metadata


3. Send the request.
 

What is the purpose of $metadata?
So if i have a dac of APInvoice then my syntax would be siteURL/AcumaticaERP/OData/APInvoice ?

You should use like below,

siteURL/AcumaticaERP/ODatav4/PX_Objects_AP_APInvoice


Forum|alt.badge.img
  • Author
  • Semi-Pro II
  • 247 replies
  • January 12, 2024
jinin wrote:
Harry wrote:
jinin wrote:

Hi @Harry 

To configure basic authorization in Postman and test it, do the following:

1.In Postman, create a new collection and, on the Authorization tab, configure its authorization settings as follows:
a. In the Type box, select the Basic Auth type.
b. In the Username and Password boxes, type the username and password that you are using to access the Acumatica ERP instance for the training course.
c. Click Save.

2. In the collection, add a GET request to the following URL to retrieve the list of generic inquiries exposed through OData.

Url : siteURL/AcumaticaERP/OData/$metadata


3. Send the request.
 

What is the purpose of $metadata?
So if i have a dac of APInvoice then my syntax would be siteURL/AcumaticaERP/OData/APInvoice ?

You should use like below,

siteURL/AcumaticaERP/ODatav4/PX_Objects_AP_APInvoice

Hey @jinin , i followed the above steps: but still it says 401 Unauthorized access.


Forum|alt.badge.img
  • Author
  • Semi-Pro II
  • 247 replies
  • January 12, 2024

When I tried with Metada it works fine but when i enter this table name: it says 401


Forum|alt.badge.img
  • Author
  • Semi-Pro II
  • 247 replies
  • January 12, 2024

Hello @jinin , Have now resolved. I had to give out Parameters


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 701 replies
  • January 12, 2024

HI @Harry ,

I hope you given username and password for the instance and tried to get the DAC information.

 

 


Forum|alt.badge.img+1
  • Freshman II
  • 38 replies
  • January 14, 2025

Does anyone know specifically what the 2025 R2 syntax will be?

<Acumatica ERP instance URL>/t/<TenantName>/api/odata/gi 

Does TenantName need to be inbetween < > ?

Does the GI at the end mean “GI” or do we have to add the GI number?

/t/   is it really just /t/ or does the “t” stand for something else?

 


Forum|alt.badge.img+1
  • Freshman II
  • 38 replies
  • January 15, 2025

Getting closer to understanding it.  

https://help.acumatica.com/Wiki/(W(1))/Show.aspx?pageid=7e92b45b-3610-4498-9898-24110bfccae3

 

The URL for the generic inquiry–based OData interface is <Acumatica ERP instance URL>/t/<TenantName>/api/odata/gi.

For example, a technical specialist would specify the http://sweetlife.com/erp/t/U100/api/odata/gi/$metadata URL if the following are true:

  • The URL of the Acumatica ERP instance is http://sweetlife.com/erp .
  • The instance contains the U100 tenant.
  • The technical specialist wants to obtain the list of fields and parameters in exposed generic inquiries in this tenant.

Forum|alt.badge.img+1
  • Freshman II
  • 38 replies
  • March 14, 2025

For SASS users in excel starting 2024R2:

If simply pulling GI data into excel, you can start with the syntax below.  Use basic authentication and enter your Acumatica username and password.  Excel then pulls up all exposed GI’s for you to choose from.

http://sweetlife.com/erp/t/U100/api/odata/gi/

You can also specify the GI you want like this and skip the list:

http://sweetlife.com/erp/t/U100/api/odata/gi/ExampleGIName

You can also input a filter on a specific GI.  I’m still testing to see if the filter is done server side or within Power Query. 

http://sweetlife.com/erp/t/U100/api/odata/gi/ExampleGIName?$filter=SalesPersonId eq 'CLACO'

In past versions I had to put %20 if there was a space in the tenant name or the GI name.  Example:  ABC XYZ had to be written ABC%20XYZ.  It will take spaces now.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings