Komodin iWMS - API / PUT

Llamados para enviar información de Komodin API.

Komodin iWMS cuenta con un api el cual permite realizar integraciones avanzadas al mismo. En esta sección de la documentación documentamos las peticiones que permiten obtener datos del Komodin iWMS respecto a los diferentes modulos.

Obtener el URL del API

Para obtener el url del API de su instancia de Komodin iWMS, no dude en escribirnos desde el chat de soporte localizado en la siguiente sección de su panel de administracion del Komodin iWMS:

474474

Peticiones PUT:

Las peticiones get le permiten enviar información al Komodin iWMS. A continuación documentamos los diferentes PUT que se cuentan en el API.

outbounds

El endpoint de outbounds permite crear y editar outbounds de los clientes de la Bodega administrada por Komodin iWMS. Este utiliza el filtro de los Clientes y Bodegas definidas en el Token:

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://<api_url>/api/v1/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_POSTFIELDS =>'{
    "class": "PUT",
    "action": "outbounds",
    "data":{
            "Source": "INTERNAL",
            "Customer": "3",
            "Type": "TRANSFERENCIA",
            "WareHouse": "DEVELOPMENT",
            "Entity": "48672",
            "Reff": "0001",
            "External_Reff": "0001",
            "Date": "2022-02-04",
            "Delivery_Date": "2022-02-04 14:21:00",
            "Estimate_Date": "2022-02-04 14:21:00",
            "Status": "IN-DELIVERY",
            "outbound_lines":[{
                    "Item": "SKU-000001",
                    "Units": "2.0000"
            }
            ]
    }

}',
  CURLOPT_HTTPHEADER => array(
    'x-komodin-token: 5eabfe61a27d176778e84c59ba99557e',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://<api_url>/api/v1/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_POSTFIELDS =>'{
    "class": "PUT",
    "action": "outbounds",
    "data":{
            "id": "OUT-000008",
            "Source": "INTERNAL",
            "Customer": "3",
            "Type": "TRANSFERENCIA",
            "WareHouse": "DEVELOPMENT",
            "Entity": "48672",
            "Reff": "0001",
            "External_Reff": "0001",
            "Date": "2022-02-04",
            "Delivery_Date": "2022-02-04 14:21:00",
            "Estimate_Date": "2022-02-04 14:21:00",
            "Status": "IN-DELIVERY",
            "outbound_lines":[{
                    "Item": "SKU-000001",
                    "Units": "20.0000"
            }
            ]
    }

}',
  CURLOPT_HTTPHEADER => array(
    'x-komodin-token: 5eabfe61a27d176778e84c59ba99557e',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
{
    "class": "PUT",
    "action": "outbounds",
    "response": {
        "result": "success",
        "type": "creation",
        "outbound": "OUT-000008",
        "payload": {
            "Source": "INTERNAL",
            "Customer": "3",
            "Type": "TRANSFERENCIA",
            "WareHouse": "DEVELOPMENT",
            "Entity": "48672",
            "Reff": "0001",
            "External_Reff": "0001",
            "Date": "2022-02-04",
            "Delivery_Date": "2022-02-04 14:21:00",
            "Estimate_Date": "2022-02-04 14:21:00",
            "Status": "IN-DELIVERY",
            "outbound_lines": [
                {
                    "Item": "SKU-000001",
                    "Units": "2.0000"
                }
            ]
        }
    }
}

inbounds

Este enpoint permite poder crear y actualizar inbounds a Komodin iWMS, siempre respetando las bodegas y clientes que el token tiene permitido.

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://<api_url>/api/v1/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_POSTFIELDS =>'{
    "class": "PUT",
    "action": "inbounds",
    "data":{
            "Source": "INTERNAL",
            "Customer": "3",
            "Type": "TRANSFERENCIA",
            "WareHouse": "DEVELOPMENT",
            "Entity": "48672",
            "Reff": "0001",
            "External_Reff": "0001",
            "Date": "2022-02-04",
            "Delivery_Date": "2022-02-04 14:21:00",
            "Estimate_Date": "2022-02-04 14:21:00",
            "Status": "IN-DELIVERY",
            "inbound_lines":[{
                    "Item": "SKU-000001",
                    "Units": "20.0000"
            }
            ]
    }

}',
  CURLOPT_HTTPHEADER => array(
    'x-komodin-token: 5eabfe61a27d176778e84c59ba99557e',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://<api_url>/api/v1/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_POSTFIELDS =>'{
    "class": "PUT",
    "action": "inbounds",
    "data":{
            "id": "ENT-000003",
            "Source": "INTERNAL",
            "Customer": "3",
            "Type": "TRANSFERENCIA",
            "WareHouse": "DEVELOPMENT",
            "Entity": "48672",
            "Reff": "0001",
            "External_Reff": "0001",
            "Date": "2022-02-04",
            "Delivery_Date": "2022-02-04 14:21:00",
            "Estimate_Date": "2022-02-04 14:21:00",
            "Status": "IN-DELIVERY",
            "inbound_lines":[{
                    "Item": "SKU-000001",
                    "Units": "10.0000"
            }
            ]
    }

}',
  CURLOPT_HTTPHEADER => array(
    'x-komodin-token: 5eabfe61a27d176778e84c59ba99557e',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
{
    "class": "PUT",
    "action": "inbounds",
    "response": {
        "result": "success",
        "type": "edition",
        "inbound": "ENT-000003",
        "payload": {
            "id": "ENT-000003",
            "Source": "INTERNAL",
            "Customer": "3",
            "Type": "TRANSFERENCIA",
            "WareHouse": "DEVELOPMENT",
            "Entity": "48672",
            "Reff": "0001",
            "External_Reff": "0001",
            "Date": "2022-02-04",
            "Delivery_Date": "2022-02-04 14:21:00",
            "Estimate_Date": "2022-02-04 14:21:00",
            "Status": "IN-DELIVERY",
            "inbound_lines": [
                {
                    "Item": "SKU-000001",
                    "Units": "10.0000"
                }
            ]
        }
    }
}

products

Este endpoint es utilizado para crear y editar productos en el Komodin iWMS. El mismo valida que el token tenga acceso a actualizar productos del cliente con dicho permiso.

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://<api_url>/api/v1/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_POSTFIELDS =>'{
    "class": "PUT",
    "action": "products",
    "data":{
            "Customer": "3",
            "Code": "0004",
            "Refference": "0001",
            "Name": "Producto de Prueba",
            "Tipo_Rotacion": "FIFO",
            "Lote": "NO",
            "Seriales": "YES",
            "Fragildad": "YES",
            "Tipo_ABC": "A",
            "UoM": "UD",
            "BarCodes": [
                "293232","232323","23232323"
            ],
            "Description": "Producto de Prueba",
            "Status": "ACTIVE"
    }

}',
  CURLOPT_HTTPHEADER => array(
    'x-komodin-token: 5eabfe61a27d176778e84c59ba99557e',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://<api_url>/api/v1/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_POSTFIELDS =>'{
    "class": "PUT",
    "action": "products",
    "data":{
            "id":"SKU-000003",
            "Customer": "3",
            "Code": "0004",
            "Refference": "0001",
            "Name": "Producto de Prueba",
            "Tipo_Rotacion": "FIFO",
            "Lote": "NO",
            "Seriales": "YES",
            "Fragildad": "YES",
            "Tipo_ABC": "A",
            "UoM": "UD",
            "BarCodes": [
                "293232","232323","23232323"
            ],
            "Description": "Producto de Prueba",
            "Status": "ACTIVE"
    }

}',
  CURLOPT_HTTPHEADER => array(
    'x-komodin-token: 5eabfe61a27d176778e84c59ba99557e',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
{
    "class": "PUT",
    "action": "products",
    "response": {
        "result": "success",
        "type": "edition",
        "product": "SKU-000003",
        "payload": {
            "id": "SKU-000003",
            "Customer": "3",
            "Code": "0004",
            "Refference": "0001",
            "Name": "Producto de Prueba",
            "Tipo_Rotacion": "FIFO",
            "Lote": "NO",
            "Seriales": "YES",
            "Fragildad": "YES",
            "Tipo_ABC": "A",
            "UoM": "UD",
            "BarCodes": [
                "293232",
                "232323",
                "23232323"
            ],
            "Description": "Producto de Prueba",
            "Status": "ACTIVE"
        }
    }
}

entities

Este endpoint permite crear terceros en Komodin iWMS, el mismo solo permite crear, editar terceros asociados a los clientes del Token.

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://<api_url>/api/v1/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_POSTFIELDS =>'{
    "class": "PUT",
    "action": "entities",
    "data":{
            "Customer": "3",
            "Code": "000001",
            "Name": "Proveedor 1",
            "Short_Name": "Prov1",
            "Address": "",
            "Type": "PROVIDER",
            "Status": "ACTIVE"

    }

}',
  CURLOPT_HTTPHEADER => array(
    'x-komodin-token: 5eabfe61a27d176778e84c59ba99557e',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://<api_url>/api/v1/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_POSTFIELDS =>'{
    "class": "PUT",
    "action": "entities",
    "data":{
            "id": "48672",
            "Customer": "3",
            "Code": "000001",
            "Name": "Proveedor 1",
            "Short_Name": "Prov1",
            "Address": "",
            "Type": "PROVIDER",
            "Status": "ACTIVE"

    }

}',
  CURLOPT_HTTPHEADER => array(
    'x-komodin-token: 5eabfe61a27d176778e84c59ba99557e',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
{
    "class": "PUT",
    "action": "entities",
    "response": {
        "result": "success",
        "type": "entities",
        "entity": 48673,
        "payload": {
            "Customer": "3",
            "Code": "000001",
            "Name": "Proveedor 1",
            "Short_Name": "Prov1",
            "Address": "",
            "Type": "PROVIDER",
            "Status": "ACTIVE"
        }
    }
}

What’s Next