Document

Access to data from all a3ERP documents (purchases, sales and stocks).

Parameters

You can consult all types of documents in the link below.

Parameters

GET calls

Filtering

In the following link you can consult how to filter this call.

Retrieve all document data

get

It returns all the data of the indicated document (see parameters to see the available documents).

Example:

https://server:5555/api/documento/PV

Parámetros de ruta
tipostringRequerido

The type of document

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Respuestas
200

Returns an Array Objects with all the data of the document

Sin contenido

get
/documento/{tipo}
200

Returns an Array Objects with all the data of the document

Sin contenido

PDF printing

get

You can request the printing of a PDF document by means of this call, the model is not obligatory but if you do not indicate it, it will take the client's or supplier's model by default.

Example:

https://server:5555/api/documento/PV/impresion/50

Parámetros de ruta
tipostringRequerido

The type of document

idstringRequerido

The document identifier

modelostringRequerido

The model of the document

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Respuestas
200

Return an Array Object with the base64 document

application/json
get
/documento/{tipo}/impresion/{id}/modelo/{modelo}
200

Return an Array Object with the base64 document

Cancellation of document

get

A document can be completely overridden or one of its lines can be overridden.

Example:

https://server:5555/api/documento/PV/anular/50/linea/13

Parámetros de ruta
tipostringRequerido

The type of document

idstringRequerido

The identifier of the document to be cancelled

numlinstringRequerido

The line of the document to be cancelled

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Respuestas
200

The document has been successfully reversed

Sin contenido

get
/documento/{tipo}/anular/{id}/linea/{numlin}
200

The document has been successfully reversed

Sin contenido

Document headers

get

Adding to the /{id} path allows you to choose a specific document header and not the list of all document headers.

Example:

https://server:5555/api/cabeceradocumento/PV/50

Parámetros de ruta
tipostringRequerido

The type of document

idstringRequerido

The identifier of the document to be cancelled

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Respuestas
200

Returns the header of a particular document.

Sin contenido

get
/cabeceradocumento/{tipo}/{id}
200

Returns the header of a particular document.

Sin contenido

POST calls

Send document by email in PDF

post

You can send a document to an email with the data provided in a JSON, the model is not obligatory but if you do not indicate it, it will take by default the client's or the supplier's model.

Parámetros de ruta
tipostringRequerido

The type of document

idstringRequerido

The document identifier

modelostringRequerido

The model of the document

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Cuerpo
Respuestas
200

Mail sent successfully

Sin contenido

post
/documento/{tipo}/email/{id}/modelo/{modelo}
200

Mail sent successfully

Sin contenido

Body of PDF document sending by email

Send a sales invoice by email

https://servidor:5555/api/documento/FV/email/5767

Serving documents

post

It can be served to order, delivery note or invoice and also lines to order or delivery note.

Parámetros de ruta
tipostringRequerido

The type of document

servirstringRequerido

servirapedido, serviraalbaran, servirafactura, servirlineasapedido, servirlineasaalbaran

idstringRequerido

The document to be served, if they are lines, do not enter it

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Cuerpo
Respuestas
200

Document served

Sin contenido

post
/documento/{tipo}/{servir}/{id}
200

Document served

Sin contenido

Document Serving Body

Serve a delivery note

https://servidor:5555/api/documento/AV/servirafactura/55

Linking files to a document

post

We can link a file passed to us in a JSON to a buy or sell document. The file will be saved in the link folder specified in the config.ini with the name and extension we pass in the name field, which will determine the file type.

Parámetros de ruta
tipostringRequerido

The type of document

idstringRequerido

The identifier of the document you want to link a file to

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Cuerpo
Respuestas
200

Correctly linked {Type of document}

Sin contenido

post
/documento/{tipo}/vincular/{id}
200

Correctly linked {Type of document}

Sin contenido

Registration of a new document

post

We can create a new document by adding a JSON with all the parameters of the selected document type.

Parámetros de ruta
tipostringRequerido

The type of document

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Cuerpo
Respuestas
200

The {document type} has been created

application/json
post
/documento/{tipo}
200

The {document type} has been created

New document registration body

Registration of a transfer

https://servidor:5555/api/documento/TR

PUT calls

Modify a document

put

We can modify a document by adding a JSON with the corresponding parameters, there are no parameters required.

Parámetros de ruta
tipostringRequerido

The type of document

idstringRequerido

The identifier of the document you want to modify

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Cuerpo
Respuestas
200

The {document} has been updated

application/json
put
/documento/{tipo}/{id}
200

The {document} has been updated

Body of Modify a document

Modify an order

https://servidor:5555/api/documento/PV/65

DELETE calls

Deleting a document

delete
Parámetros de ruta
tipostringRequerido

The type of document

idstringRequerido

The identifier of the document you want to modify

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Respuestas
200

Successful document deletion

Sin contenido

delete
/documento/{tipo}/{id}
200

Successful document deletion

Sin contenido

Última actualización

¿Te fue útil?