CIATI Kalenis LIMS API

Autenticación

La API de Kalenis para CIATI utiliza Auth Tokens para autenticar los pedidos. Debe utilizar el método auth para obtener un token válido.
Por favor resguarde el token obtenido en forma segura y no lo comparta en lugares públicamente accesibles como GitHub, código en el cliene, etc.
La autenticación a la API se realiza mediante bearer auth, use -H «Authorization: Bearer <token>».
Todas las peticiones se deben hacer sobre HTTPS.

Resumen

Resource

Operation

Description

  1. Autenticación

POST /api/v1/auth

Autentica el usuario y retorna token.

  1. Análisis

GET /api/v1/analysis

Retorna listado de análisis.

  1. Muestras

GET /api/v1/samples

Retorna listado de muestras.

  1. Muestra

GET /api/v1/sample/(int:sample_id)

Retorna detalle de análisis de muestra.

  1. Productos

GET /api/v1/products

Retorna listado de productos.

  1. Facturas

GET /api/v1/invoices

Retorna listado de facturas.

  1. Factura

GET /api/v1/invoice/(int:invoice_id)

Retorna detalle de factura.

Detalle de API

GET /api/v1/analysis

Retorna listado de análisis.

Example request:

GET /api/v1/analysis/ HTTP/1.1
Host: api.ciati.com.ar
Authorization: Bearer <token>

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
    {
        "code": "0003", 
        "description": "ACIDEZ TITULABLE a pH 8.1"
    }, 
    {
        "code": "0004", 
        "description": "TURBIDEZ"
    }
]
Request Headers
Status Codes
POST /api/v1/auth

Autentica el usuario y retorna token.

Example request:

POST /api/v1/auth HTTP/1.1
Host: api.ciati.com.ar
Accept: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

{
    "token": "1538fca18df8964ceb0ba3ee2cf6e10a807b5a33b6c63ee949ba8e67a59600dc"
}
JSON Parameters
  • email (string) – Correo electrónico registrado del usuario

  • password (string) – Contraseña registrada del usuario

Status Codes
GET /api/v1/invoice/(int: invoice_id)

Retorna detalle de factura.

Example request:

GET /api/v1/invoice/(int:invoice_id) HTTP/1.1
Host: api.ciati.com.ar
Authorization: Bearer <token>

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
    {
        "amount": 11776.86, 
        "currency": "ARS", 
        "date": "Tue, 22 Jan 2019 00:00:00 GMT", 
        "description": "2018/140374 - LGMS4 - PLAGUICIDAS POR GC Y LC-MS-MS INTERMEDIO PARA ACEITES ESENCIALES", 
        "entry": "2018/005877", 
        "invoice_number": "0003-00000001", 
        "invoice_reference": "", 
        "invoice_type": "Customer", 
        "matrix": "POMELO", 
        "producer": "PRODUCTOR  S.A.", 
        "product_code": 4702, 
        "product_description": "PLAGUICIDAS POR GC Y LC-MS-MS INTERMEDIO PARA ACEITES ESENCIALES", 
        "product_type": "FASE OLEOSA", 
        "quantity": 1.0, 
        "results_reports": "2018/021611", 
        "sample_label": "B - 183003", 
        "sample_number": "2018/035946", 
        "unit_price": 11776.8600
    }, 
    {
        "amount": 5002.56, 
        "currency": "ARS", 
        "date": "Tue, 22 Jan 2019 00:00:00 GMT", 
        "description": "2018/140373 - PAO - PERFIL DE COMPONENTES AROMATICOS DE CITRICOS POR GC-FID", 
        "entry": "2018/005877", 
        "invoice_number": "0003-00000001", 
        "invoice_reference": "", 
        "invoice_type": "Customer", 
        "matrix": "POMELO", 
        "producer": "PRODUCTOR S.A.", 
        "product_code": 4595, 
        "product_description": "PERFIL DE COMPONENTES AROMATICOS DE CITRICOS POR GC-FID", 
        "product_type": "FASE OLEOSA", 
        "quantity": 1.0, 
        "results_reports": "2018/021611", 
        "sample_label": "B - 183003", 
        "sample_number": "2018/035946", 
        "unit_price": 5002.5600
    }
]
Parameters
  • invoice_id (int) – Id de la factura

Request Headers
Status Codes
GET /api/v1/invoices

Retorna listado de facturas.

Example request:

GET /api/v1/invoices/ HTTP/1.1
Host: api.ciati.com.ar
Authorization: Bearer <token>

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
    {
        "currency": "USD", 
        "date": "2019-02-14", 
        "id": 21423, 
        "number": "0003-00000002", 
        "total_amount": 727.20
    }, 
    {
        "currency": "ARS", 
        "date": "2019-01-22", 
        "id": 20834, 
        "number": "0003-00000001", 
        "total_amount": 83897.10
    }
]
Query Parameters
  • start_date – Fecha desde de la factura

Request Headers
Status Codes
GET /api/v1/products

Retorna listado de productos.

Example request:

GET /api/v1/products/ HTTP/1.1
Host: api.ciati.com.ar
Authorization: Bearer <token>

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
    {
        "code": "2767", 
        "description": "% DE TRANSMITANCIA"
    }, 
    {
        "code": "2807", 
        "description": "% ESTABILIDAD DE ENTURBIAMIENTO"
    }
]
Request Headers
Status Codes
GET /api/v1/sample/(int: sample_id)

Retorna detalle de análisis de muestra.

Example request:

GET /api/v1/sample/(int:sample_id) HTTP/1.1
Host: api.ciati.com.ar
Authorization: Bearer <token>

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
    {
        "analysis_code": "0002",
        "analysis_description": "o,p DDE ",
        "converted_result": "",
        "expressed": "Muestra Recibida",
        "final_concentration": "",
        "final_unit": "",
        "label": "B - 192003",
        "laboratory": "Laboratorio de Residuos",
        "producer": "CAMPOS S.A.",
        "report": "",
        "result": "",
        "results_estimated_date": "25/06/2019",
        "state": "Sin Iniciar",
        "state_date": "",
        "unit": "mg/kg"
    },
    {
        "analysis_code": "0001",
        "analysis_description": "o-FENILFENOL ",
        "converted_result": "",
        "expressed": "Muestra Recibida",
        "final_concentration": "",
        "final_unit": "",
        "label": "B - 192003",
        "laboratory": "Laboratorio de Residuos",
        "producer": "CAMPOS S.A.",
        "report": "2019/001348",
        "result": "",
        "results_estimated_date": "",
        "state": "Informado",
        "state_date": "11/02/2019",
        "unit": "mg/kg"
    }
]
Parameters
  • sample_id (int) – Id de la muestra

Request Headers
Status Codes
GET /api/v1/samples

Retorna listado de muestras.

Example request:

GET /api/v1/samples/ HTTP/1.1
Host: api.ciati.com.ar
Authorization: Bearer <token>

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
    {
        "date": "2019-06-21",
        "id": 114814,
        "label": "12068 - PREBATCH 1",
        "matrix": "POMELO",
        "number": "2019/019804",
        "producer": "CAMPOS S.A.",
        "product_type": "ACEITE ESENCIAL",
        "reports": []
    },
    {
        "date": "2019-06-21",
        "id": 114813,
        "label": "B - 192003",
        "matrix": "LIMON",
        "number": "2019/019803",
        "producer": "CAMPOS S.A.",
        "product_type": "ACEITE ESENCIAL",
        "reports": []
    }
]
Query Parameters
  • start_date – Fecha desde de la muestra

Request Headers
Status Codes
_images/ciati.png _images/kalenis.png