WEB SERVICES OF THE STOCK ADMINISTRATION’S SYSTEM
The services are available at http://bi.oca.com.ar:8100/ws/interfaz_ocastock.asmx
As a general consideration, you must access to each of these methods through SOAP using HTTP POST and you must have coordinated beforehand the details of your implementation with OCA’s IT department.
The minimum of interfaces needed for an automatic stock administration requires implementing only five methods: interfazProveedores, interfazProductos, interfazModelos, interfazDestinos and interfazPedidos. Depending on the service’s needs, the products’ features and the information requested by the client, it will require the rest of the methods or not.
See below the details of each method and the order suggested for their implementation.
(All the methods require three parameters, idServicio, User and Password, which are the fixed data that will be provided by OCA. These are useful to identify, in a clear and safe way, the service and application that the WS is trying to use.)
These are the available methods to make orders, check entries, check the stock, products, etc:
interfazProveedores
Parameters:
Input:It is an XML that contains the suppliers’ data that have to be registered and/or be modified. The first element of this XML is “suppliers” and it can contain “register” and/or “modify” elements, depending on whether you want to register a new supplier or modify the data of an existent one.
These elements can also have the following attributes:
Attribute | Type | Length | Comment |
---|---|---|---|
idServicio | Int | It is the Service’s ID | |
codProveedor | String | 20 | Identifies the supplier |
proveedor | String | 200 | Supplier’s business name |
Sample of the input parameter:
Response of the interfazProveedores:
As long as the method ends in less than 30 seconds, it will respond with an XML with the result.
The first element is “input”, which contains the “errors” and “processed” elements.
“errors”: For every error it contains a “supplier” element with the codProveedor (codSupplier) attribute and an element of “error” inside with the description of the error generated.
“processed”: For every supplier successfully processed it contains a “supplier” element with the “idProveedor” (idSupplier) and “codProveedor” attributes and the generated action “register” or “modify”as value.
Sample of response:
interfazProductos
Parameters:
Input:It is an XML with the data of the products that have to be registered, cancelled and/or modified. The first element of this XML is “products” and it can contain the “register”, “cancel” and/or “modify” elements, depending on whether you want to register a new product, cancel a product or modify the data of an existent one.
The elements can also have these attributes:
Attribute | Type | Length | Comment |
---|---|---|---|
idServicio | Int | It is the Service’s ID | |
codProducto | String | 50 | It identifies the product |
producto | String | 200 | The product’s description |
Peso | Decimal | The weight in kilograms. It’s optional. | |
trazabilidad | String | 255 | Use only when the products must be identified individually, for instance, by “series”. This allows to have a traceability for each product. It’s optional. |
esCombo | Booleano | Use only when the product is a combo, then use “interfazCombos” instead of “interfazModelos” | |
fechaBaja | DateTime | Product’s cancellation date. YYYY.MM.DD format. |
Sample of the input parameter:
Response of the interfazProductos:
As long as the method ends in less than 30 seconds, it will respond with an XML with the result.
The first element is “input”, which contains “errors” and “processed” elements.
“errors”: For every error it contains a “product” element with the codProduct attribute and an element of “error” inside with the description of the error generated.
“processed”: For every supplier successfully processed it contains a “product” element with the “idProduct” and “codProduct” attributes and the generated action “register” or “modify” as value.
Sample of response:
interfazModelos
Parameters:
Input:It is an XML with the data of the models that have to be registered, cancelled and/or modified.
The first element of this XML is "models” and it can contain the “register”, “cancel” and/or “modify” elements, depending on whether you want to register a new model, cancel a model or modify the data of an existent one.
These elements can also have the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
idServicio | Int | It is the Service’s ID | |
codProducto | String | 50 | Identifies the product to which the model belongs |
codProveedor | String | 200 | Identifies the supplier to which the model belongs |
codModelo | String | 50 | IIdentifies the model |
modelo | String | 255 | The model’s description |
fechaBaja | DateTime | The model’s cancellation date. YYYY.MM.DD format. |
Sample of the input parameter:
Response of the interfazModelos:
As long as the method ends in less than 30 seconds, it will respond with an XML with the result.
The first element is “input”, which contains “errors” and “processed” elements.
“errors”: For every error it contains a “model” element with the codModelo attribute and an element of “error” inside with the description of the error generated.
“processed”: For every model successfully processed it contains a “model” element with the “idModelo” and “codModelo” attributes and the generated action “register” or “modify” as value.
Sample of response:
interfazDestinos
Parameters:
Input:It is an XML with the data of the destinations that have to be registered and/or modified.
The first element of this XML is "destinations” and it can contain the “register” and/or “modify” elements, depending on whether you want to register a new destination or modify the data of an existent one.
These elements can also have the following attributes:
Attribute | Tyoe | Length | Comment |
---|---|---|---|
idServicio | Int | It is the Service’s ID | |
codDestino | String | 20 | Identifies the destination |
destino | String | 255 | The addressee’s name |
idProvincia | Int | Identifies the province (see the provinces’ master document) | |
domicilio | String | 255 | The address, in general it’s street name + number + floor + apartment |
localidad | String | The destination’s town | |
cp | Int | Zip-Code (see the Zip-Code’s master document) | |
String | 300 | The addressee’s e-mail. It’s optional. | |
celular | String | 50 | The addressee’s cellphone. It’s optional. |
sigla | String | 3 | Acronym. Use only for deliveries at branch offices. It’s obtained from the E-Pack’s WS. |
Sample of the input parameter:
Response of the interfazDestinos:
As long as the method ends in less than 30 seconds, it will respond with an XML with the result.
The first element is “input”, which contains “errors” and “processed” elements.
“errors”: For every error it contains a “destination” element with the codDestino attribute and an element of “error” inside with the description of the error generated.
“processed”: For every destination successfully processed it contains a “destination” element with the “idDestino” and “codDestino” attributes and the generated action “register” or “modify” as value.
Sample of response:
interfazPedidos
Parameters:
Input: It is an XML with the data of the orders that have to be registered.
The first element of this XML is "orders” and it must contain one or more elements of “register”.
This
element can also have the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
idServicio | Int | It is the Service’s ID. | |
idOperativa | Int | Identifies the order’s operation. These are fixed values provided by OCA. | |
codPedido | String | 20 | Identifies the order. |
codDestino | String | 20 | Identifies the addressee, previously informed at “interfazDestinos” |
At the same time, the “register” element must contain the “detallepedido” element, which should contain one or more elements of “product” and this should have the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
codProducto | String | 50 | It’s the product’s code, previously informed at “interfazProductos” |
cantidad | Int | The quantity of the requested product |
Sample of the input parameter:
Response of the interfazPedidos:
As long as the method ends in less than 30 seconds, it will respond with an XML with the result.
The first element is “input”, which contains “errors” and “processed” elements.
““errors”: For every error it contains an “order” element with the codPedido attribute and an element of “error” inside with the description of the error generated.
“processed”: For every order successfully processed it contains an “order” element with the “idPedido”, “codPedido” and “idDestino” attributes and “register” as value.
Sample of response:
interfazProductosPrecios
Parameters:
Input: It is an XML with the data of the prices that have to be registered.
The first element of this XML is " productosPrecios” and it may contain elements of “register”.
This element can also have the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
idServicio | Int | It’s the Service’s ID | |
codProducto | String | 50 | It’s the product’s code, previously informed at “interfazProductos” |
precio | Decimal | The product’s insured value. | |
vigencia | Fecha | The model’s cancellation date. YYYY.MM.DD format |
Sample of the entry’s parameter:
Response of the interfazProductosPrecios:
As long as the method ends in less than 30 seconds, it will respond with an XML with the result.
The first element is “input”, which contains “errors” and “processed” elements.
“errors”: For every error it contains a “productosPrecios” element with the “codProducto” attribute and an element of “error” inside with the description of the error generated.
“processed”: For every product’s price successfully processed it contains a “productosPrecios” element with the “codProducto” an “validity” attributes and “register” as value.
Sample of response:
interfazOrdenesCompra
Parameters:
Input:It is an XML with the data of the purchase orders that have to be registered.
The first element of this XML is " ordenesCompra” and it may contain one or more elements of “register”.
This element can also have the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
idServicio | Int | It’s the Service’s ID | |
oc | String | 20 | Identifies the purchase order |
At the same time, the “register” element must contain one or more elements of “model”, which should have the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
codModelo | String | 50 | It’s the model’s code, previously informed at “interfazModelos” |
cantidad | Int | Quantity of the model that will be allowed to be admitted at the plant. |
Sample of the input parameter:
Response of the interfazOrdenesCompra:
As long as the method ends in less than 30 seconds, it will respond with an XML with the result.
The first element is “input”, which contains “errors” and “processed” elements.
“errors”: For every error it contains a “ordenesCompra” element with the “oc” attribute and an element of “error” inside with the description of the error generated.
“processed”: For every model successfully processed it contains a “ordenesCompra” element with the “oc” attribute and the generated action “register” or “modify” as value.
Sample of response:
interfazCombos
Parameters:
Input:It is an XML with the data of the combos that have to be registered. A combo will never be modified nor cancelled.
The first element of this XML is "combos” and it may contain one or more elements of “combo”. This element can also have the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
idServicio | Int | It’s the Service’s ID | |
codProducto | String | 50 | It’s the product’s code, previously informed at “interfazProductos” |
At the same time, the “combo” element must contain one or more elements of “composition”, which should have the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
codProducto | String | 50 | It’s the product’s code, previously informed at “interfazProductos” |
cantidad | Int | Quantity of the product in the combo product. |
Sample of the input parameter:
Response of the interfazCombos:
As long as the method ends in less than 30 seconds, it will respond with an XML with the result.
The first element is “input”, which contains “errors” and “processed” elements.
“errors”: For every error it contains a “combo” element with the “codProductoCombo” attribute and an element of “error” inside with the description of the error generated.
“processed”: For every combo’s price successfully processed it contains a “combo” element with the “codProductoCombo” attributes and “register” as value.
Sample of response:
interfazControlIngresos
Parameters:
Input: It is an XML with the data of the entries that have to be registered. An entry control will never be modified nor cancelled.
The first element of this XML is "controlIngresos” and it may contain one or more elements of “register”.
This element can also have the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
idServicio | Int | It’s the Service’s ID | |
oc | String | 20 | Identifies the purchase order, previously informed at “interfazOrdenesCompra |
At the same time, the “register” element must contain one or more elements of “model”, which should have the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
codModelo | String | 50 | It’s the model’s code, previously informed at “interfazModelos” |
Only in the case of the products with traceability by series the models contain “series” elements.
Sample of the input parameter:
Response of the interfazControlIngresos:
As long as the method ends in less than 30 seconds, it will respond with an XML with the result.
The first element is “input”, which contains “errors” and “processed” elements.
errors”: For every error it contains a “controlIngresos” element with the “oc” attribute and an element of “error” inside with the description of the error generated.
“processed”: For every model successfully processed it contains a “controlIngresos” element with the “oc” attribute and the generated action “register” or “modify” as value.
Sample of response:
Stock
The method returns the available stock, it is recommended to use it once a day, after the assemblage closing period established with the operation.
The XML starts with the “stock” element with “product” elements. This element can have the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
idProducto | Int | OCA’s internal identifier of the product | |
codProducto | String | 50 | Identifies the product |
producto | String | 255 | The product’s description |
deposito | String | 50 | Name of the deposit in which it is located |
At the same time, the “product” element must contain one or more elements of “model”, which should have the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
idModelo | Int | OCA’s internal identifier of the model | |
idProveedor | Int | OCA’s internal identifier of the supplier | |
codModelo | String | 50 | It’s the model’s code, previously informed at “interfazModelos” |
codProveedor | String | 20 | It’s the supplier’s code, previously informed at “interfazProveedores” |
stock | Int | The available stock at the moment |
Sample of the method’s response:
Ingresos
Parameters:
FechaDesdeInclusive (DateFromInclusive) and FechaHastaNoInclusive (DateToNon-Inclusive): These are the dates between which you deserve to see the entries to OCA.
The method returns the available stock, it is recommended to use once a day, after the assemblage closing period established with the operation.
The XML starts with the “entries” element with “product” elements. This element has the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
idProducto | Int | OCA’s internal identifier of the product | |
codProducto | String | 50 | Identifies the product |
producto | String | 255 | The product’s description |
Each “product” element contains one or more “supplier” elements. This element has the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
idProovedor | Int | OCA’s internal identifier of the supplier | |
codProveedor | String | 20 | It’s the supplier’s code, previously informed at “interfazProveedores” |
proveedor | String | 200 | The supplier |
At the same time, the “supplier” element contains one or more elements of “model”, which should have the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
idModelo | Int | OCA’s internal identifier of the model | |
codModelo | String | 50 | It’s the model’s code, previously informed at “interfazModelos” |
modelo | String | 200 | The model’s description |
fechaIngreso | DataTime | Date of the entry to OCA, YYYY.MM.DD format. | |
cantidadIngresada | Int | The quantity that entered to OCA. |
Sample of the method’s response:
Pedidos
Parámetros:
FechaDesdeInclusive (DateFromInclusive) and FechaHastaNoInclusive (DateToNon-Inclusive):These are the dates between which you deserve to see the orders, it is recommended to use it during one week maximum.
idEstadoPedido:It filters the orders according to the present status. It can contain one of the following values:
idEstadoPedido | Status |
---|---|
0 | It shows all the orders, no matter the present status |
1 | Assembled |
2 | Open |
3 | Required |
4 | Confirmed |
5 | At Packaging |
6 | Re-entered to stock |
7 | Pre- Assembled |
The XML starts with the “orders” element with “order” elements. This element has the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
idPedido | Int | OCA’s internal identifier of the order | |
codPedido | String | 20 | Identifies the order, previously informed at “interfazModelos” |
fecha | String | The date the order was made, YYYY.MM.DD format. | |
estadoPedido | String | 255 | The order’s current status. If it’s “At Packaging”, you can get more detailed information about its status at the E-Pak system using the CUIP |
cuip | Int | It’s a 19 digits number which identifies the shipment at the E-Pak system. | |
nroRemito | Int | It’s the receipt number | |
codDestino | Int | Identifies the destination, previously informed at “interfazDestinos” | |
destino | String | 255 | The addressee’s name. |
Each “order” element contains one or more “product” elements. This element has the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
idProducto | Int | OCA’s internal identifier of the product | |
codProducto | String | 50 | Identifies the producto |
producto | String | 255 | The product’s description |
cantidad | Int | Order’s required quantity |
Each “product” element contains one or more “model” elements. This element has the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
idModelo | Int | OCA’s internal identifier of the model | |
codModelo | String | 50 | It’s the model’s code, previously informed at “interfazModelos” |
modelo | String | 200 | The model’s description |
cantidad | Int | Order’s required quantity |
Only in the case of the products with traceability by series the models contain “series” elements.
Sample of the method’s response:
ObtenerRemitosAnulados
Parameters:
FechaDesdeInclusive (DateFromInclusive) and FechaHastaNoInclusive (DateToNon-Inclusive): These are the dates between which you deserve to see the orders that have been cancelled. It is recommended to use it during one week maximum.
The XML starts with the “remitosAnulados” element with “ped” elements. This element has the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
idPedido | Int | OCA’s internal identifier of the order | |
codPedido | String | 20 | Identifies the order, previously informed at “interfazPedidos” |
operativa | Int | Identifies the order’s operation. These are fixed values provided by OCA. | |
nroRemito | Int | This is the remittance number | |
fecha | String | The date the order was cancelled, AAAA-MM-DDTHH:mm:ss.S. |
Sample of the method’s response:
interfazControlIngresoSalida
Parameters:
oc:It’s the purchase order whose admission to OCA is required to be checked.
The XML starts with the “controlIngresosVuelta” element with a “register” element for every entry created. This element has the following attributes:
Atributte | Tipo | Length | Comment |
---|---|---|---|
idServicio | Int | It’s the Service’s ID. | |
oc | String | 20 | Identifies the purchase order, previously informed at “interfazOrdenesCompra” |
nroRemitoIngreo | String | 50 | It’s the receipt with which the entry to OCA is generated. |
Each “register” element contains one or more “model” elements. This element has the following attributes:
Atributte | Type | Length | Comment |
---|---|---|---|
codModelo | String | 50 | It’s the model’s code, previously informed at “interfazModelos”. |
cantidadIngresada | Int | The quantity that has entered. |
Only in the case of the products with traceability by series the models contain “series” elements.
Sample of the method’s response:
Credentials
To get the credentials and access to the webservices, you should get in contact with our IT area. You can make the request to the following e-mail address: integraciones@oca.com.ar