# Api

## General

SQL Server A3ERP instance data access

{% openapi src="<https://1929880893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJU48yTkmxSjQK9O4WEZd%2Fuploads%2Fush185SrGI4ejjwbZDbJ%2FapiEng.yaml?alt=media&token=9a3bc2ae-b9ff-42d0-89e7-a2bd1d4c70be>" path="/api" method="get" %}
[apiEng.yaml](https://1929880893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJU48yTkmxSjQK9O4WEZd%2Fuploads%2Fush185SrGI4ejjwbZDbJ%2FapiEng.yaml?alt=media\&token=9a3bc2ae-b9ff-42d0-89e7-a2bd1d4c70be)
{% endopenapi %}

## Fields

Display of returned fields in views

{% openapi src="<https://1929880893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJU48yTkmxSjQK9O4WEZd%2Fuploads%2Fush185SrGI4ejjwbZDbJ%2FapiEng.yaml?alt=media&token=9a3bc2ae-b9ff-42d0-89e7-a2bd1d4c70be>" path="/api/campos/{vista}" method="get" %}
[apiEng.yaml](https://1929880893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJU48yTkmxSjQK9O4WEZd%2Fuploads%2Fush185SrGI4ejjwbZDbJ%2FapiEng.yaml?alt=media\&token=9a3bc2ae-b9ff-42d0-89e7-a2bd1d4c70be)
{% endopenapi %}

## Security

Fixed API KEY obtained by validation on customer, supplier, carrier, representative, person or API\_login masters.

## Logs

The API has a log file in the folder indicated in the configuration in which the incidents and results of the API calls are recorded.

## Pagination

In all queries the query option is given to obtain only the number of records in the query and to be able to paginate the results. For this we must use the parameters of the query header.

{% openapi src="<https://1929880893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJU48yTkmxSjQK9O4WEZd%2Fuploads%2Fush185SrGI4ejjwbZDbJ%2FapiEng.yaml?alt=media&token=9a3bc2ae-b9ff-42d0-89e7-a2bd1d4c70be>" path="/api/{endpoint}" method="get" %}
[apiEng.yaml](https://1929880893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJU48yTkmxSjQK9O4WEZd%2Fuploads%2Fush185SrGI4ejjwbZDbJ%2FapiEng.yaml?alt=media\&token=9a3bc2ae-b9ff-42d0-89e7-a2bd1d4c70be)
{% endopenapi %}

{% openapi src="<https://1929880893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJU48yTkmxSjQK9O4WEZd%2Fuploads%2Fush185SrGI4ejjwbZDbJ%2FapiEng.yaml?alt=media&token=9a3bc2ae-b9ff-42d0-89e7-a2bd1d4c70be>" path="/api/{endpoints}" method="get" %}
[apiEng.yaml](https://1929880893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJU48yTkmxSjQK9O4WEZd%2Fuploads%2Fush185SrGI4ejjwbZDbJ%2FapiEng.yaml?alt=media\&token=9a3bc2ae-b9ff-42d0-89e7-a2bd1d4c70be)
{% endopenapi %}

{% hint style="info" %}
The **pagination** and record count can be used in all **API** queries but only the count is the one that cannot be used in order, the **pagination** needs the order to work.
{% endhint %}

## Sorting and Filtering <a href="#ordenacion-y-filtrado" id="ordenacion-y-filtrado"></a>

In many queries you can sort by a parameter or filter by parameters, both can be used at the same time.

{% openapi src="<https://1929880893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJU48yTkmxSjQK9O4WEZd%2Fuploads%2Fush185SrGI4ejjwbZDbJ%2FapiEng.yaml?alt=media&token=9a3bc2ae-b9ff-42d0-89e7-a2bd1d4c70be>" path="/api/order/{order}" method="get" %}
[apiEng.yaml](https://1929880893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJU48yTkmxSjQK9O4WEZd%2Fuploads%2Fush185SrGI4ejjwbZDbJ%2FapiEng.yaml?alt=media\&token=9a3bc2ae-b9ff-42d0-89e7-a2bd1d4c70be)
{% endopenapi %}

{% openapi src="<https://1929880893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJU48yTkmxSjQK9O4WEZd%2Fuploads%2Fush185SrGI4ejjwbZDbJ%2FapiEng.yaml?alt=media&token=9a3bc2ae-b9ff-42d0-89e7-a2bd1d4c70be>" path="/api/filtro/{filtro}" method="get" %}
[apiEng.yaml](https://1929880893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJU48yTkmxSjQK9O4WEZd%2Fuploads%2Fush185SrGI4ejjwbZDbJ%2FapiEng.yaml?alt=media\&token=9a3bc2ae-b9ff-42d0-89e7-a2bd1d4c70be)
{% endopenapi %}

{% openapi src="<https://1929880893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJU48yTkmxSjQK9O4WEZd%2Fuploads%2Fush185SrGI4ejjwbZDbJ%2FapiEng.yaml?alt=media&token=9a3bc2ae-b9ff-42d0-89e7-a2bd1d4c70be>" path="/filtro/{filtro}/order/{order}" method="get" %}
[apiEng.yaml](https://1929880893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJU48yTkmxSjQK9O4WEZd%2Fuploads%2Fush185SrGI4ejjwbZDbJ%2FapiEng.yaml?alt=media\&token=9a3bc2ae-b9ff-42d0-89e7-a2bd1d4c70be)
{% endopenapi %}
