A3ERP API
English
English
  • Quick Start
    • Initial configuration
    • Installation
  • Versions
  • Documentation
    • API Reference
      • Api
      • Validation
      • Email
      • Master
        • Parameters
      • Document
        • Parameters
      • Various
      • Stock movements
      • Stock Reserves
      • Expeditions
      • Links
      • Stock
      • Portfolio
      • Prices
      • Stored Procedures
      • View
      • Listing
      • FastReport
      • Download Files
      • List Linked Folders
Con tecnología de GitBook
En esta página

¿Te fue útil?

  1. Documentation
  2. API Reference

Api

API Overview

AnteriorAPI ReferenceSiguienteValidation

Última actualización hace 2 años

¿Te fue útil?

General

SQL Server A3ERP instance data access

Fields

Display of returned fields in views

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.

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.

Sorting and Filtering

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

Displays the data query endpoints available in the API.

get

Allows to know if the API is up and running

Respuestas
200
a3ERP API REST ready!
text/plain
get
GET /api HTTP/1.1
Host: server:<port>
Accept: */*
200

a3ERP API REST ready!

Hola, A3ApiRestestátrabajando

Display returned fields in views

get

Returns the fields displayed by the view in the query.

Example:

https://server:5555/api/campos/Api_Vinculos

Parámetros de ruta
viewstringRequerido

View with the fields to be returned

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Respuestas
200
Returns the fields of the selected view
application/json
get
GET /api/campos/{vista} HTTP/1.1
Host: server:<port>
Authorization: text
Accept: */*
200

Returns the fields of the selected view

{
  "campos": [
    {
      "nombrecampo": "idfacv",
      "tipo": "Currency",
      "longitud": 7,
      "descripcion": "identifier factura venta",
      "permitenulos": "[F,T]",
      "cuadrado": "[F,T]",
      "libreria": "A3ERP"
    }
  ]
}

Record counts

get

To get the number of records in a query we must create the Count parameter in the header and assign it the value T. (Record count cannot be used with the order parameter of queries).

Example:

https://server:5555/api/maestro/almacenes

Parámetros de ruta
endpointstringRequerido

An api endpoint

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

contarstringRequerido

T

Respuestas
200
Returns an Array Objects with parameter records
application/json
get
GET /api/{endpoint} HTTP/1.1
Host: server:<port>
Authorization: text
contar: text
Accept: */*
200

Returns an Array Objects with parameter records

[
  {
    "registros": 44273
  }
]

Pagination

get

To paginate a query we have to indicate in the header parameters (sorting is needed for pagination to work)

Example:

https://server:5555/api/maestro/almacenes/order/desc

Parámetros de ruta
endpointsstringRequerido

An api endpoint

Parámetros de encabezado
PageSizeintegerRequerido

Number of records per page

PageintegerRequerido

Page number to display

AuthorizationstringRequerido

Bearer + JWT_token

Respuestas
200
Returns the paged call
get
GET /api/{endpoints} HTTP/1.1
Host: server:<port>
PageSize: 1
Page: 1
Authorization: text
Accept: */*
200

Returns the paged call

Sin contenido

Sorting

get

The sort order can be changed using SQL syntax.

Example:

https://server:5555/api/maestro/almacenes/order/desc

Parámetros de ruta
orderstringRequerido

Parameter to be sorted

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Respuestas
200
Returns the endpoint sorted by that parameter
get
GET /api/order/{order} HTTP/1.1
Host: server:<port>
Authorization: text
Accept: */*
200

Returns the endpoint sorted by that parameter

Sin contenido

Filtering

get

The filter has the same where SQL syntax so you can add several different filters in the same request.

Example:

https://server:5555/api/maestro/almacenes/filtro/encargado="7260 GYD"

Parámetros de ruta
filtrostringRequerido

SQL syntax filtering

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Respuestas
200
Returns the endpoint filtered by that parameter
get
GET /api/filtro/{filtro} HTTP/1.1
Host: server:<port>
Authorization: text
Accept: */*
200

Returns the endpoint filtered by that parameter

Sin contenido

Filtering and Sorting

get

It can be used together by putting the filter first.

Ejemplo:

https://server:5555/api/maestro/almacenes/filtro/encargado="7260 GYD"/order/desc

Parámetros de ruta
filtrostringRequerido

SQL syntax filtering

orderstringRequerido

Parameter to sort SQL

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Respuestas
200
Returns the filtered and sorted endpoint
get
GET /filtro/{filtro}/order/{order} HTTP/1.1
Host: server:<port>
Authorization: text
Accept: */*
200

Returns the filtered and sorted endpoint

Sin contenido

  • General
  • GETDisplays the data query endpoints available in the API.
  • Fields
  • GETDisplay returned fields in views
  • Security
  • Logs
  • Pagination
  • GETRecord counts
  • GETPagination
  • Sorting and Filtering
  • GETSorting
  • GETFiltering
  • GETFiltering and Sorting