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

Stock movements

Access to external stock movements via NAX

AnteriorVariousSiguienteStock Reserves

Última actualización hace 2 años

¿Te fue útil?

GET calls

Filtering

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

POST calls

Create Stock Movement Body

Create a stock movement

https://server:5555/api/movimientosstock

{
    "codalm": " 1",
    "fecdoc": "01/01/2022",
    "lineas":
    [
        {
            "codart": "1",
            "motivo" : "ENTRADA STOCK PRUEBA API ",
            "unidadesstock": "5",
            "unidades": "5"
        },
        {
            "codart": "2",
            "motivo": "SALIDA STOCK PRUEBA API",
            "unidadesstock": "-10",
            "unidades": "-10"
        }
    ]
}

DELETE calls

Obtain data from the indicated movement record

get

This endpoint can be used with and without id (without id you can use filtering).

Example:

https://server:5555/api/movimientosstock/25

Parámetros de ruta
idstringRequerido

The document identifier

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Respuestas
200
Returns an Array with the selected response
application/json
get
GET /api/movimientosstock/{id} HTTP/1.1
Host: server:<port>
Authorization: text
Accept: */*
200

Returns an Array with the selected response

{
  "codart": "              1",
  "descart": "Bicicleta carrera",
  "codalm": "       1",
  "descalm": "Productos acabados (central)",
  "codalmsal": "",
  "descalmsal": "",
  "unicalstock": 0,
  "unicalc": 0,
  "entranstock": 500,
  "entran": 500,
  "salenstock": 0,
  "salen": 0,
  "prcmoneda": 612.25,
  "precio": 612.25,
  "desc1": 30,
  "desc2": 0,
  "desc3": 0,
  "desc4": 0,
  "prcmedio": 428.575,
  "costeadic": 0,
  "obtprccoste": 1,
  "numserie": "",
  "lote": "",
  "feccaduc": "1899-12-30T00:00:00.000+01:00",
  "ubicacion": "text",
  "ubicacionsal": "text",
  "fecdoc": "2017-01-01T00:00:00.000+01:00",
  "numdoc": "1//1",
  "referencia": "",
  "codmon": "EURO",
  "cambio": 1,
  "codigo": "       1",
  "nombre": "PROSPORTS",
  "orden": 0,
  "indentificador": 21439,
  "numlin": 1,
  "idlin": 207266,
  "idtot": 89505,
  "idlogp": 0,
  "idlinc": 0,
  "idtotdoc": 89505,
  "grupo": 1,
  "tipdoc": "FC",
  "ordendoc": 3
}

Delete all records of the indicated movement

delete

Example:

https://server:5555/api/movimientosstock/eliminar/25

Parámetros de ruta
idstringRequerido

The identifier of the movement to be deleted

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Respuestas
200
The movement has been successfully removed
delete
DELETE /api/movimientosstock/eliminar/{id} HTTP/1.1
Host: server:<port>
Authorization: text
Accept: */*
200

The movement has been successfully removed

Sin contenido

Removes a line from the indicated movement

delete

Example:

https://server:5555/api/movimientosstock/eliminar/50/linea/4

Parámetros de ruta
idstringRequerido

The movement identifier

idlineastringRequerido

The line to be deleted

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Respuestas
200
The movement has been successfully removed
delete
DELETE /api/movimientosstock/eliminar/{id}/linea/{idlinea} HTTP/1.1
Host: server:<port>
Authorization: text
Accept: */*
200

The movement has been successfully removed

Sin contenido

  • GET calls
  • Filtering
  • GETObtain data from the indicated movement record
  • POST calls
  • POSTCreate stock movement
  • DELETE calls
  • DELETEDelete all records of the indicated movement
  • DELETERemoves a line from the indicated movement

Create stock movement

post

This endpoint allows you to create a stock movement by adding a JSON with a specific structure to the request.

Parámetros de encabezado
AuthorizationstringRequerido

Bearer + JWT_token

Cuerpo
Respuestas
200
Inserted correctly
application/json
post
POST /api/movimientosstock HTTP/1.1
Host: server:<port>
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 128

{
  "json": {
    "codalm": "text",
    "fecdoc": "text",
    "lineas": [
      {
        "codart": "text",
        "motivo": "text",
        "unidadesstock": "text",
        "unidades": "text"
      }
    ]
  }
}
200

Inserted correctly

{
  "Codigo": 1
}