Introducción
URLs de ejemplo:
- /v1/product: listar productos.
- /v1/product/AAABBB: detalle de un producto con sku "AAABBB".
- /v1/product/AAABBB/images: lista de imágenes de un producto con el sku "AAABBB".
Bienvenidos a la documentación de la API de Loadingplay. Esta API te permitirá acceder y manipular la información guardada en nuestros servidores de la misma forma que lo hace cualquier producto desarrollado por Loadingplay.
Todas las llamadas a la API son antecedidas por https://apibodegas.loadingplay.com/.
Las URIs de nuestros endpoints estan compuestas de la siguiente forma:
${VERSION}/${RESOURCE}[/${IDENTIFIER}/${INTERNAL_RESOURCE}]
En donde cada sección significa:
- ${VERSION}: Versión de la API, por ahora solo tenemos "v1".
- ${RESOURCE}: Es el recurso al cual se hace referencia, siempre será un sustantivo. Por ejemplo "product".
- ${IDENTIFIER} (opcional): Hace referencia al recurso específico.
- ${INTERNAL_RESOURCE} (opcional) Accede a una propiedad de un recurso unico.
Todas las acciones dentro de la API usan los metodos estándar de http: GET, POST, PUT, DELETE.
Autenticación
Ejemplo de una llamada autorizada a la API.
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/product",
headers={
"Authorization": "Bearer ACCESS_TOKEN"
}
)
$ curl -XGET "https://apibodegas.loadingplay.com/v1/product" \
-H "Authorization: Bearer ACCESS_TOKEN"
Asegurate de reemplazar ACCESS_TOKEN por un access token real.
La API el protocolo OAUTH2, que permite generar un access token para autorizar las llamadas. Lamentablemente, aún no tenemos abierta la creación de aplicaciones al público, por lo tanto, si necesitas generar un access token debes escribirnos a contacto@loadingplay.com
Una vez obtenido el access token, se deberá incluir en la cabecera "Authorization" de todas las llamadas a la API.
Errores
La API usa los siguientes códigos de error:
Código de error | Significado |
---|---|
400 | Bad Request -- El request es incorrecto. |
401 | Unauthorized -- El access token no es correcto. |
403 | Forbidden -- El access token no tiene el scope necesario. |
404 | Not Found -- No se ha encontrado el recurso. |
405 | Method Not Allowed -- El metodo solicitado no esta permitido para este recurso. |
406 | Not Acceptable -- La API solo responde con JSON. |
410 | Gone -- Se eliminó el recurso solicitado. |
418 | I'm a teapot. |
429 | Too Many Requests -- Has hecho demasiados requests a la API, baja las revoluciones. |
500 | Internal Server Error -- Tenemos un problema interno, intenta más tarde. |
503 | Service Unavailable -- Estamos offline para hacer mantención, intenta más tarde. |
Productos
Crear producto
curl -XPOST "https://apibodegas.loadingplay.com/v1/product" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "sku=AAABBB" \
-d "name=nombre del producto" \
-d "description=descripcion del producto" \
-d "main_price=1000" \
-d "cost_price=500" \
-d "promotion_price=800" \
-d "bulk_price=700" \
-d "brand=Marca del producto" \
-d "manufacturer=Fabricante" \
-d "bullet_1=Campo libre 1" \
-d "bullet_2=Campo libre 2" \
-d "bullet_3=Campo libre 3"
import requests
response = requests.post(
"https://apibodegas.loadingplay.com/v1/product",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"sku": "AAABBB",
"name": "nombre del producto",
"description": "descripcion del producto",
"main_price": "1000",
"cost_price": "500",
"promotion_price": "800",
"bulk_price": "700",
"brand": "Marca del producto",
"manufacturer": "Fabricante",
"bullet_1": "Campo libre 1",
"bullet_2": "Campo libre 2",
"bullet_3": "Campo libre 3"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"product": {
"id": 1,
"sku": "AAABBB"
}
}
HTTP Request
POST https://apibodegas.loadingplay.com/v1/product
Parámetros
Parámetros Tipo |
Descripción |
---|---|
sku REQUERIDO string |
SKU (Stock Keeping Unit) del producto. |
name string |
Nombre del producto |
description string |
Descripción del producto, puede contener html |
main_price integer |
Precio principal del producto, se mostrará al público si no existe "promotion_price |
cost_price integer |
Precio costo del producto, se puede utilizar para calcular el margen de un producto |
promotion_price integer |
Precio de promoción, precio con descuento |
bulk_price integer |
Precio para mayoristas, precio que se muestra a mayoristas |
brand string |
Marca del producto |
manufacturer string |
Fabricante del producto |
bullet_1 string |
Campo libre 1 |
bullet_2 string |
Campo libre 2 |
bullet_3 string |
Campo libre 3 |
Editar producto
curl -XPUT "https://apibodegas.loadingplay.com/v1/product" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "sku=AAABBB" \
-d "name=nombre del producto" \
-d "description=descripcion del producto" \
-d "main_price=1000" \
-d "cost_price=500" \
-d "promotion_price=800" \
-d "bulk_price=700" \
-d "brand=Marca del producto" \
-d "manufacturer=Fabricante" \
-d "bullet_1=Campo libre 1" \
-d "bullet_2=Campo libre 2" \
-d "bullet_3=Campo libre 3"
import requests
response = requests.put(
"https://apibodegas.loadingplay.com/v1/product",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"sku": "AAABBB",
"name": "nombre del producto",
"description": "descripcion del producto",
"main_price": "1000",
"cost_price": "500",
"promotion_price": "800",
"bulk_price": "700",
"brand": "Marca del producto",
"manufacturer": "Fabricante",
"bullet_1": "Campo libre 1",
"bullet_2": "Campo libre 2",
"bullet_3": "Campo libre 3"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"product": {
"bullet_1": "Campo libre 1",
"description": "descripcion del producto",
"bullet_3": "Campo libre 3",
"bullet_2": "Campo libre 2",
"brand": "Marca del producto",
"id": 1,
"manufacturer": "Fabricante",
"sku": "AAABBB",
"name": "nombre del producto",
"for_sale": false,
"main_price": 0.0,
"position": 0,
"promotion_price": 800.0,
"cost_price": 500.0
}
}
HTTP Request
PUT https://apibodegas.loadingplay.com/v1/product
Parámetros
Parámetros Tipo |
Descripción |
---|---|
sku REQUERIDO string |
SKU (Stock Keeping Unit) del producto. |
name string |
Nombre del producto |
description string |
Descripción del producto, puede contener html |
main_price integer |
Precio principal del producto, se mostrará al público si no existe "promotion_price |
cost_price integer |
Precio costo del producto, se puede utilizar para calcular el margen de un producto |
promotion_price integer |
Precio de promoción, precio con descuento |
bulk_price integer |
Precio para mayoristas, precio que se muestra a mayoristas |
brand string |
Marca del producto |
manufacturer string |
Fabricante del producto |
bullet_1 string |
Campo libre 1 |
bullet_2 string |
Campo libre 2 |
bullet_3 string |
Campo libre 3 |
Obtener producto
curl -XGET "https://apibodegas.loadingplay.com/v1/product" \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d "site_name=test" \
-d "sku=AAABBB" \
-d "list_separator=,"
import requests
response = requests.put(
"https://apibodegas.loadingplay.com/v1/product",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"site_name": "test",
"sku": "AAABBB",
"list_separator": ","
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"product": [{
"bulk_price": 0.0,
"site_name": "me",
"bullet_3": "Campo libre 3",
"bullet_2": "Campo libre 2",
"images": [],
"bullet_1": "Campo libre 1",
"id": 1,
"sku": "AAABBB",
"weight": 0.0,
"profit_margin": null,
"main_price": 0.0,
"cost_price": 500.0,
"description": "descripcion del producto",
"tags": "",
"brand": "Marca del producto",
"in_stock": false,
"manufacturer": "Fabricante",
"name": "nombre del producto",
"enabled": false,
"for_sale": false,
"promotion_price": 800.0,
"position": 0,
"critical_stock": 1,
"upp": 1
}]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/product
Parámetros
Parámetros Tipo |
Descripción |
---|---|
sku REQUERIDO string |
SKU (Stock Keeping Unit) del producto. |
site_name REQUERIDO string |
Nombre de la cuenta |
list_separator string |
separador para obtener lista de sku, por defecto "," |
Listar productos
curl -XGET https://apibodegas.loadingplay.com/v1/product/list \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d "metadata=true" \
-d "page=1" \
-d "items=10" \
-d "column=sku" \
-d "order=ASC" \
-d "search=" \
-d "tags=" \
-d "for_sale_only=false" \
-d "metadata=true"
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/product/list",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"metadata": true,
"page": 1,
"items": 10,
"column": "sku",
"order": "ASC",
"search": "",
"tags": "",
"for_sale_only": false,
"metadata": true
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"products": [{
"bulk_price": 0.0,
"site_name": "me",
"weight": 0.0,
"bullet_2": "Campo libre 2",
"images": [],
"bullet_1": "Campo libre 1",
"id": 1,
"sku": "AAABBB",
"bullet_3": "Campo libre 3",
"profit_margin": null,
"main_price": 0.0,
"cost_price": 500.0,
"description": "descripcion del producto",
"tags": "",
"brand": "Marca del producto",
"in_stock": false,
"manufacturer": "Fabricante",
"name": "nombre del producto",
"enabled": false,
"for_sale": false,
"promotion_price": 800.0,
"position": 0,
"critical_stock": 1,
"upp": 1
}],
"metadata": {
"total_records": 292,
"records_filtered": 2
}
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/product/list
Parámetros
Parámetros Tipo |
Descripción |
---|---|
page integer |
Número de página para el listado de productos. |
items integer |
Cantidad de elementos por página. |
column integer |
Columna para ordenar los elementos, puede ser cualquiera de los campos de producto. |
order string |
Indica en que orden se mostrarán los elementos. Valores permitidos: ASC DESC |
search string |
Cuando tiene texto, realiza una busqueda en los productos. |
tags string |
Filtra productos por tags, soporta multiples tags separados por coma ",". |
for_sale_only boolean |
Muestra solo los productos que están habilitados para la venta. |
metadata boolean |
Habilita la metadata para la paginación. |
Imágenes
Crear imagen
Agrega una imagen y sus thumbnails a un producto, (https://static.loadingplay.com).
curl -XPOST https://apibodegas.loadingplay.com/v1/product/AAABBB/images \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d "url=https://cdn.loadingplay.com/static/images/fd8e76836893ccfa44c6805d63ee18e3_test.png" \
-d "thumb_1=https://cdn.loadingplay.com/static/images/1_fd8e76836893ccfa44c6805d63ee18e3_test.png" \
-d "thumb_200=https://cdn.loadingplay.com/static/images/200_fd8e76836893ccfa44c6805d63ee18e3_test.png" \
-d "thumb_500=https://cdn.loadingplay.com/static/images/500_fd8e76836893ccfa44c6805d63ee18e3_test.png"
El comando de arriba retorna un JSON:
{
"status": "success",
"images": [
{
"url": "https://cdn.loadingplay.com/static/images/fd8e76836893ccfa44c6805d63ee18e3_test.png",
"thumb_1": "https://cdn.loadingplay.com/static/images/1_fd8e76836893ccfa44c6805d63ee18e3_test.png",
"thumb_200": "https://cdn.loadingplay.com/static/images/200_fd8e76836893ccfa44c6805d63ee18e3_test.png",
"thumb_500": "https://cdn.loadingplay.com/static/images/500_fd8e76836893ccfa44c6805d63ee18e3_test.png"
}
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/product/[SKU]/images
Parámetros
Parámetros Tipo |
Descripción |
---|---|
sku REQUERIDO string |
SKU (Stock Keeping Unit) del producto. |
url REQUERIDO string |
URL de la imagen original |
thumb_1 string |
thumbnail mas pequeño |
thumb_200 string |
thumbnail de 200 pixeles |
thumb_500 string |
thumbnail de 500 pixeles |
Eliminar imagen
curl -XDELETE "https://apibodegas.loadingplay.com/v1/product/[SKU]/images" \
-H "Authorization: Bearer ACCESS_TOKEN"
El comando de arriba retorna un JSON:
{
"status": "success",
"images": []
}
Este endpoint elimina las imagenes de un producto
HTTP Request
DELETE https://apibodegas.loadingplay.com/v1/product/[SKU]/images
Parámetros
Parámetros Tipo |
Descripción |
---|---|
sku REQUERIDO string |
SKU (Stock Keeping Unit) del producto. |
Tags
Crear tag
Este método agrega un tag si es que no existe.
curl -XPOST "https://apibodegas.loadingplay.com/v1/product/AAABBB/tags" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "tag=tag1,tag2"
import requests
response = requests.post(
"https://apibodegas.loadingplay.com/v1/product/AAABBB/tags",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={"tag": "tag1,tag2"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"tags": "tag1,tag2"
}
HTTP Request
POST https://apibodegas.loadingplay.com/v1/product/[sku]/tags
Parámetros
Parámetros Tipo |
Descripción |
---|---|
sku REQUERIDO string |
SKU (Stock Keeping Unit) del producto. |
tag string |
listado de tags separados por coma "," |
Obtener tags
Este método retorna los tags de un producto.
curl -XGET "https://apibodegas.loadingplay.com/v1/product/AAABBB/tags" \
-H "Authorization: Bearer ACCESS_TOKEN"
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/product/AAABBB/tags",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"tags": "tag1,tag2"
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/product/[SKU]/tags
Parámetros
No requiere parámetros
Eliminar tags
this method will remove a list of tag from a product.
curl -XDELETE "https://apibodegas.loadingplay.com/v1/product/[SKU]/tags" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "tag=tag1,tag2"
import requests
response = requests.delete(
"https://apibodegas.loadingplay.com/v1/product/AAABBB/tags",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={"tag": "tag1,tag2"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"tags": ""
}
HTTP Request
DELETE https://apibodegas.loadingplay.com/v1/product/[SKU]/tags
Parámetros
Parámetros Tipo |
Descripción |
---|---|
sku REQUERIDO string |
SKU (Stock Keeping Unit) del producto. |
tag string |
listado de tags separados por coma "," |
Variantes
Crear variante
curl -XPOST "https://apibodegas.loadingplay.com/v1/variant" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "variant_name=size" \
-d "sku=sku-test" \
-d "separator=-"
import requests
response = requests.post(
"https://apibodegas.loadingplay.com/v1/variant",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"variant_name": "size",
"sku": "sku-test",
"separator": "-"
}
)
print(response.json())
Retorna un JSON con la info de la variante, incluyendo el id:
{
"status": "success",
"variant": {
"sku": "sku-test",
"separator": "-",
"site_name": "test",
"id": "[id]",
"name": "size"
}
}
HTTP Request
POST https://apibodegas.loadingplay.com/v1/variant
Parámetros
Parámetros Tipo |
Descripción |
---|---|
sku REQUERIDO string |
SKU (Stock Keeping Unit) del producto |
variant_name REQUERIDO string |
Nombre de la variante |
separador string |
Simbolo que separa el SKU y la variante |
Eliminar variante
curl -XDELETE "https://apibodegas.loadingplay.com/v1/variant/[variant_name]" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "sku=sku-test"
import requests
response = requests.delete(
"https://apibodegas.loadingplay.com/v1/variant/[variant_name]"
headers={"Authorization":"Bearer ACCESS_TOKEN"},
data={
"sku": "sku-test"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"variant": {
"id": "[id]",
"name": "[variant_name]",
"site_name": "test",
"sku": "sku-test"
}
}
HTTP Request
DELETE https://apibodegas.loadingplay.com/v1/variant/[variant_name]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
variant_name REQUERIDO string |
Nombre de la variante |
sku REQUERIDO string |
SKU (Stock Keeping Unit) del producto |
Listar variantes
curl -XGET "https://apibodegas.loadingplay.com/v1/variant" \
-d "site_name=test" \
-d "sku=sku-test"
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/variant",
data={
"site_name": "test",
"sku": "sku-test"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"variants": [
{
"id": "[id]",
"name": "size",
"separator": "-",
"site_name": "test",
"sku": "sku-test"
},
{
"id": "[id]",
"name": "color",
"separator": "-",
"site_name": "test",
"sku": "sku-test"
},
...
]
}
Este endpoint retorna una lista de variantes por sitio y SKU.
HTTP Request
GET https://apibodegas.loadingplay.com/v1/variant
Parámetros
Parámetros Tipo |
Descripción |
---|---|
site_name REQUERIDO string |
Nombre del sitio |
sku REQUERIDO string |
SKU (Stock Keeping Unit) del producto |
Crear un valor para una variante
curl -XPOST "https://apibodegas.loadingplay.com/v1/variant/[variant_name]/value" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "value=rojo" \
-d "sku=sku-test"
import requests
response = requests.post(
"https://apibodegas.loadingplay.com/v1/variant/[variant_name]/value",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"value": "rojo",
"sku": "sku-test"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"value": {
"id": "[id]",
"variant_name": "[variant_name]",
"value": "rojo",
"site_name": "test",
"sku": "sku-test"
}
}
HTTP Request
POST https://apibodegas.loadingplay.com/v1/variant/[variant_name]/value
Parámetros
Parámetros Tipo |
Descripción |
---|---|
variante_name REQUERIDO string |
Nombre de la variante |
sku REQUERIDO string |
SKU (Stock Keeping Unit) del producto |
value REQUERIDO string |
Valor que se va a agregar a la variante e.j: (S, M, L) |
Eliminar un valor de una variante
curl -XDELETE "https://apibodegas.loadingplay.com/v1/variant/[variant_name]/value/[value]" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "sku=sku-test"
import requests
response = requests.delete(
"https://apibodegas.loadingplay.com/v1/variant/[variant_name]/value/[value]",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"sku": "sku-test"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status" : "success",
"value": {
"id": "[id]",
"variant_name": "[variant_name]",
"value": "[value]",
"site_name": "test",
"sku": "sku-test"
}
}
HTTP Request
DELETE https://apibodegas.loadingplay.com/v1/variant/[variant_name]/value/[value]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
variant_name REQUERIDO string |
Nombre de la variante |
value REQUERIDO string |
Valor de la variante |
sku REQUERIDO string |
SKU (Stock Keeping Unit) del producto |
Listar valores
curl -XGET "https://apibodegas.loadingplay.com/v1/variant/[variant_name]/value" \
-d "site_name=test" \
-d "sku=sku-test"
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/variant/[variant_name]/value",
data={
"site_name": "test",
"sku": "sku-test"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"values": [
{
"variant_name": "[variant_name]",
"values": [
"35",
"36",
"37"
]
},
...
]
}
Este endpoint retorna una lista de valores por sitio y sku
HTTP Request
GET https://apibodegas.loadingplay.com/v1/variant/[variant_name]/value
Parámetros Tipo |
Descripción |
---|---|
variant_name REQUERIDO string |
Un listado de variantes separados por comas e.j: (Talla, Color, ...) |
site_name REQUERIDO string |
Nombre del sitio |
sku REQUERIDO string |
SKU (Stock Keeping Unit) del producto |
Listar combinaciones
curl -XGET "https://apibodegas.loadingplay.com/v1/variant/[sku]/combination" \
-d "site_name=test"
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/variant/[sku]/combination",
data={
"site_name": "test"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"combination": [
{
"sku": "test-m-azul",
"data": ""
},
{
"sku": "test-m-rojo",
"data": ""
},
...
]
}
Este endpoint retorna una lista de combinaciones por sitio y sku
HTTP Request
GET https://apibodegas.loadingplay.com/v1/variant/[sku]/combination
Query Parameters
Parámetros Tipo |
Descripción |
---|---|
sku REQUERIDO string |
SKU (Stock Keeping Unit) del producto |
site_name REQUERIDO string |
Nombre del sitio |
Bodegas
Crear bodega
curl -XPOST "https://apibodegas.loadingplay.com/v1/cellar" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "name=Mi primera bodega" \
-d "description=descripcion de la bodega" \
-d "for_sale=false" \
-d "reservation=false"
import requests
response = requests.post(
"https://apibodegas.loadingplay.com/v1/cellar",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"name": "Mi primera bodega",
"description": "descripción de la bodega",
"for_sale": False,
"reservation": False
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"cellar": {
"site_name": "current_account",
"description": "descripción de la bodega",
"for_sale": false,
"deleted": false,
"reservation": false,
"id": 1234,
"name": "Mi primera bodega"
}
}
HTTP Request
POST https://apibodegas.loadingplay.com/v1/cellar
Parámetros
Parámetros Tipo |
Descripción |
---|---|
name REQUERIDO string |
Nombre de la bodega. |
description string |
Breve descripción de la bodega |
for_sale boolean |
habilita esta bodega como bodega web |
reservation boolean |
habilita esta bodega como bodega de reserva |
Obtener bodega
curl -XGET "https://apibodegas.loadingplay.com/v1/cellar/1234" \
-H "Authorization: Bearer ACCESS_TOKEN"
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/cellar/1234",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"cellar": {
"site_name": "current_account",
"description": "descripción de la bodega",
"for_sale": false,
"deleted": false,
"reservation": false,
"id": 1234,
"name": "Mi primera bodega"
}
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/cellar/[cellar_id]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
cellar_id REQUERIDO int |
Identificador único de la bodega. |
Editar bodega
curl -XPUT "https://apibodegas.loadingplay.com/v1/cellar/1234" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "name=Mi primera bodega" \
-d "description=descripcion de la bodega" \
-d "for_sale=false" \
-d "reservation=false"
import requests
response = requests.put(
"https://apibodegas.loadingplay.com/v1/cellar/1234",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"name": "Mi primera bodega",
"description": "descripción de la bodega",
"for_sale": False,
"reservation": False
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"cellar": {
"reservation": false,
"for_sale": false,
"description": "descripción de la bodega",
"id": "1234",
"name": "Mi primera bodega"
}
}
HTTP Request
PUT https://apibodegas.loadingplay.com/v1/cellar/[cellar_id]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
cellar_id REQUERIDO int |
Identificador único de la bodega. |
name REQUERIDO string |
Nombre de la bodega. |
description string |
Breve descripción de la bodega |
for_sale boolean |
habilita esta bodega como bodega web |
reservation boolean |
habilita esta bodega como bodega de reserva |
Borrar bodega
curl -XDELETE "https://apibodegas.loadingplay.com/v1/cellar/1234" \
-H "Authorization: Bearer ACCESS_TOKEN"
import requests
response = requests.delete(
"https://apibodegas.loadingplay.com/v1/cellar/1234",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"cellar": {
"site_name": "current_account",
"description": "descripción de la bodega",
"for_sale": false,
"deleted": true,
"reservation": false,
"id": 1234,
"name": "Mi primera bodega"
}
}
HTTP Request
DELETE https://apibodegas.loadingplay.com/v1/cellar/[cellar_id]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
cellar_id REQUERIDO int |
Identificador único de la bodega. |
Listar bodegas
curl -XGET "https://apibodegas.loadingplay.com/v1/cellar" \
-H "Authorization: Bearer ACCESS_TOKEN"
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/cellar",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"cellars": [
{
"site_name": "current_account",
"description": "descripción de la bodega",
"deleted": false,
"for_sale": false,
"reservation": false,
"id": 1234,
"name": "Mi primera bodega"
}
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/cellar
Parámetros
Parámetros Tipo |
Descripción |
---|---|
no hay parametros |
Obtener inventario de un producto en una bodega
curl -XGET "https://apibodegas.loadingplay.com/v1/cellar/1234/kardex" \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d 'sku=AAABBB' \
-d 'page=1' \
-d 'items=10'
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/cellar/1234/kardex",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"sku": "AAABBB",
"page": 1,
"items": 10
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"kardex": [
{
"destination_cellar_id": null,
"balance_total": 0.0,
"balance_units": 1,
"cellar_id": 112,
"color": "",
"sales_channel_id": null,
"price": 0.0,
"order_id": 14484,
"observation": "",
"sell_price": 0.0,
"units": 1,
"operation_type": "mov_in",
"user": "Sistema - Venta",
"deleted": false,
"date": "2018-10-25T16:30:21.899507",
"product_sku": "AAABBB",
"total": 0.0,
"size_id": null,
"id": 1234,
"balance_price": 0.0
}
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/cellar/[cellar_id]/kardex
Parámetros
Parámetros Tipo |
Descripción |
---|---|
cellar_id REQUERIDO int |
Identificador único de la bodega. |
sku string |
SKU (stock keeping units) de un producto |
page integer |
Número de página para el historial del inventario. |
items integer |
Cantidad de elementos por página. |
Listar skus y stock total en una bodega
curl -XGET "https://apibodegas.loadingplay.com/v1/cellar/1234/products" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "page=1" \
-d "items=10" \
-d "search=" \
-d "column=product_sku" \
-d "order=ASC" \
-d "metadata=true"
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/cellar/1234/products",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"page": 1,
"items": 10,
"search": "",
"column": "product_sku",
"order": "ASC",
"metadata": True
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"products": [
{
"product_sku": "AAABBB",
"in_stock": false,
"balance_units": -12
},
],
"metadata": {
"total_records": 5,
"records_filtered": 5
}
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/cellar/[cellar_id]/products
Parámetros
Parámetros Tipo |
Descripción |
---|---|
cellar_id REQUERIDO int |
Identificador único de la bodega. |
page integer |
Número de página para el listado de skus de la bodega. |
items integer |
Cantidad de elementos por página. |
metadata boolean |
Habilita la metadata para la paginación. |
search string |
Cuando tiene texto, realiza una busqueda en los productos. |
column integer |
Columna para ordenar los elementos, puede ser cualquiera de los campos. |
order string |
Indica en que orden se mostrarán los elementos. Valores permitidos: ASC DESC |
Obtener inventario actual de un producto en una bodega
curl -XGET "https://apibodegas.loadingplay.com/v1/cellar/1234/product/AAABBB" \
-H "Authorization: Bearer ACCESS_TOKEN"
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/cellar/1234/product/AAABBB",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"products": [
{
"product_sku": "AAABBB",
"balance_units": -12
}
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/cellar/[cellar_id]/product/[sku]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
cellar_id REQUERIDO int |
Identificador único de la bodega. |
sku string |
SKU (stock keeping units) de un producto |
Obtener inventario de una variante en una bodega
curl -XGET "https://apibodegas.loadingplay.com/v1/cellar/1234/stock" \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d 'sku=AAABBB'
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/cellar/1234/stock",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"sku": "AAABBB"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"stock": {
"sku": "AAABBB",
"total": 4
}
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/cellar/[cellar_id]/stock
Parámetros
Parámetros Tipo |
Descripción |
---|---|
cellar_id REQUERIDO int |
Identificador único de la bodega. |
sku string |
SKU (stock keeping units) de un producto |
Agregar inventario para una variante en una bodega
curl -XPUT "https://apibodegas.loadingplay.com/v1/cellar/1234/stock" \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d 'sku=AAABBB' \
-d 'quantity=1' \
-d 'user_description=example_system' \
-d 'operation=mov_in'
import requests
response = requests.put(
"https://apibodegas.loadingplay.com/v1/cellar/1234/stock",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"sku": "AAABBB",
"quantity": "1",
"user_description": "example_system",
"operation": "mov_in"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"stock": {
"sku": "AAABBB",
"operation": "mov_in",
"total": 5,
"user_description": "example_system"
}
}
HTTP Request
PUT https://apibodegas.loadingplay.com/v1/cellar/[cellar_id]/stock
Parámetros
Parámetros Tipo |
Descripción |
---|---|
cellar_id REQUERIDO int |
Identificador único de la bodega. |
sku string |
SKU (stock keeping units) de un producto |
quantity integer |
Cantidad que se va a agregar o quitar, puede ser negativo |
user_description string |
Descripción del suario que realiza el movimiento |
operation string |
Operación a realizar, los valores admitidos son: buy: para compras sell: para ventas mov_in: para ajuste de entrada mov_out: para ajuste de salida |
Pedido
Crear pedido
curl -XPOST "https://apibodegas.loadingplay.com/v1/order" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "rut=1-1" \
-d "name=Sebastian" \
-d "last_name=Benavente" \
-d "telephone=55555555" \
-d "email=seba@mail.com" \
-d "address=calle falsa 1234" \
-d "additional_info=no es facil llegar a calle falsa" \
-d "city=Ciudad Falsa" \
-d "region=III Region Atacama" \
-d "town=Copiapo" \
-d "zip_code=7804385" \
-d "shipping=10000" \
-d "origin=web" \
-d "payment_type=Webpay" \
-d "voucher=voucher" \
-d "reference_code=1000" \
-d "cellar_id=1" \
-d "tax=0" \
-d 'products=[{"sku": "sku1", "price": 33558, "name": "producto 1", "combination": "s", "quantity": 1}]' \
-d 'extra_info={"extra_data": "extra_value"}'
import requests
response = requests.post(
"https://apibodegas.loadingplay.com/v1/order",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"rut": "1-1",
"name": "Sebastian",
"last_name": "Benavente",
"telephone": "555555555",
"email": "seba@mail.com",
"address": "calle falsa 1234",
"additional_info": "no es facil llegar a calle falsa",
"city": "Ciudad falsa",
"region": "III Region Atacama",
"town": "Copiapo",
"zip_code": "7804385",
"shipping": 10000,
"extra_info": "{\"extra_data\": \"extra_value\"}",
"origin": "web",
"payment_type": "Webpay",
"voucher": "voucher",
"reference_code": "1000",
"cellar_id": 1,
"tax": 0,
"products": "[{'sku': 'sku1', 'price': 33558, 'name': 'producto 1', 'combination': 's', 'quantity': 1}]"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"order": {
"origin":"web",
"provider_id":null,
"site_name":"baymax",
"tax":0.0,
"tracking_code":"",
"voucher":"",
"adjustment":0.0,
"id":14485,
"extra_info":"",
"items_quantity":null,
"total":33558.0,
"shipping_id":12583,
"url_document":null,
"source":"",
"state":1,
"customer_id":2150,
"type":1,
"discount_code":"",
"status":"por confirmar",
"deleted":false,
"site_id":null,
"products_quantity":null,
"date":"2018-12-04T16:04:59.111407",
"subtotal":33558.0,
"name":"",
"cellar_id":111,
"shipping":0,
"payment_type":"Webpay",
"reference_code":"",
"billing_id":12583
}
}
HTTP Request
POST https://apibodegas.loadingplay.com/v1/order
Parámetros
Parámetros Tipo |
Descripción |
---|---|
rut string |
RUT del comprador |
name string |
Nombre del comprador |
last_name string |
Apellido del comprador |
telephone string |
Teléfono del comprador |
email string |
Email del comprador |
address string |
Dirección del comprador |
additional_info string |
Información adicional del comprador |
city string |
Ciudad del comprador |
region string |
Región del comprador |
town string |
Pueblo del comprador |
zip_code string |
Código postal del comprador |
shipping int |
Costo de despacho |
extra_info string |
Información extra del pedido |
origin string |
Origen del pedido |
payment_type string |
Tipo de pago |
voucher string |
URL del comprobante de venta |
reference_code string |
Código de referencia para seguimiento de despacho |
cellar_id int |
ID de bodega |
tax int |
Impuestos aplicados |
products json |
Productos para el detalle del pedido |
Listar pedidos
curl -XGET "https://apibodegas.loadingplay.com/v1/order" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "page=1" \
-d "items=10"
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/order",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"page": 1,
"items": 10
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"orders": [
{
"origin":"web",
"provider_id":null,
"site_name":"baymax",
"tax":0.0,
"tracking_code":"",
"voucher":"",
"adjustment":0.0,
"id":14485,
"extra_info":"",
"items_quantity":null,
"total":33558.0,
"shipping_id":12583,
"url_document":null,
"source":"",
"state":1,
"customer_id":2150,
"type":1,
"discount_code":"",
"status":"por confirmar",
"deleted":false,
"site_id":null,
"products_quantity":null,
"date":"2018-12-04T16:04:59.111407",
"subtotal":33558.0,
"name":"",
"cellar_id":111,
"shipping":0,
"payment_type":"Webpay",
"reference_code":"",
"billing_id":12583
}
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/order
Parámetros
Parámetros Tipo |
Descripción |
---|---|
page integer |
Número de página para el listado de productos. |
items integer |
Cantidad de elementos por página. |
column integer |
Columna para ordenar los elementos, puede ser cualquiera de los campos de producto. |
order string |
Indica en que orden se mostrarán los elementos. Valores permitidos: ASC DESC |
search string |
Realiza una búsqueda de pedidos usando el string en el campo search y buscando por los campos reference_code y extra_info de los pedidos. |
metadata boolean |
Habilita la metadata para la paginación. |
origin string |
Filtra pedidos por el campo origen |
status string |
Filtra pedidos por el campo status |
reference_code string |
Obtiene pedidos con un codigo de referencia exacto |
dateMin ISODate |
Límite inferior para filtrar por fecha los pedidos |
dateMax ISODate |
Límite superior para filtrar por fecha los pedidos |
Obtener pedido
curl -XGET "https://apibodegas.loadingplay.com/v1/order/1234"
-H "Authorization: Bearer ACCESS_TOKEN"
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/order/1234",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"order": {
"origin": "web",
"provider_id": null,
"site_name": "baymax",
"site_id": null,
"tracking_code": "",
"voucher": "",
"adjustment": 0.0,
"id": 16249,
"extra_info": "",
"items_quantity": null,
"total": 33558.0,
"shipping_id": 14342,
"url_document": null,
"source": "",
"customer_id": 2190,
"type": 1,
"discount_code": "",
"status": "por confirmar",
"deleted": false,
"tax": 0.0,
"products_quantity": null,
"date": "2018-12-05T11:56:54.933901",
"subtotal": 33558.0,
"name": "",
"cellar_id": 111,
"shipping": 0,
"payment_type": "Webpay",
"reference_code": "",
"billing_id": 14342
}
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/order/[order_id]
Url Arguments
Parámetros Tipo |
Descripción |
---|---|
order_id integer |
Identificador único del pedido. |
Editar pedido
curl -XPUT "https://apibodegas.loadingplay.com/v1/order/1234" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "adjustment=0" \
-d "is_deleted=false" \
-d "discount_code=AAA123" \
-d "extra_info=" \
-d "origin=Web" \
-d "payment_type=Webpay" \
-d "reference_code=" \
-d "source=" \
-d "status=por confirmar" \
-d "tracking_code=AAABBB123123" \
-d "voucher=https://loadingplay.com/voucher_url" \
-d "url_document=https://loadingplay.com/voucher_url"
import requests
response = requests.put(
"https://apibodegas.loadingplay.com/v1/order/1234",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"adjustment": "0",
"is_deleted": "false",
"discount_code": "AAA123",
"extra_info": "",
"origin": "Web",
"payment_type": "Webpay",
"reference_code": "",
"source": "",
"status": "por confirmar",
"tracking_code": "AAABBB123123",
"voucher": "https://loadingplay.com/voucher_url",
"url_document": "https://loadingplay.com/voucher_url"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"order": {
"origin": "web",
"provider_id": null,
"site_name": "baymax",
"tax": 0.0,
"tracking_code": "",
"voucher": "",
"total": 33558.0,
"id": 16249,
"extra_info": "",
"items_quantity": null,
"adjustment": 0.0,
"shipping_id": 14342,
"url_document": null,
"source": "",
"customer_id": 2190,
"type": 1,
"discount_code": "",
"status": "por confirmar",
"deleted": false,
"site_id": null,
"products_quantity": null,
"date": "2018-12-05T11:56:54.933901",
"subtotal": 33558.0,
"name": "",
"cellar_id": 111,
"shipping": 0,
"payment_type": "Webpay",
"reference_code": "",
"billing_id": 14342
}
}
HTTP Request
PUT https://apibodegas.loadingplay.com/v1/order/[order_id]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
order_id integer |
Identificador único del pedido. |
extra_info string |
Información extra del pedido |
origin string |
Origen del pedido |
payment_type string |
Tipo de pago |
voucher string |
URL del comprobante de venta |
reference_code string |
Código de referencia para seguimiento de despacho |
adjustment int |
Descuento o valor de ajuste al pedido |
is_deleted boolean |
indica si el pedido esta eliminado |
discount_code int |
Código de descuento creado con el módulo de descuentos |
source origen |
Origen del pedido |
status string |
Estado del pedido, admite los siguientes valores: por confirmar confirmado cancelado por despachar despachado |
tracking_code string |
Código para seguimiento del pedido |
url_document string |
URl de la boleta del pedido |
Obtener detalle de un pedido
curl -XGET "https://apibodegas.loadingplay.com/v1/order/1234/detail" \
-H "Authorization: Bearer ACCESS_TOKEN" \
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/order/1234/detail",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"products": [
{
"sku": "sku1",
"name": "producto 1",
"combination": "s",
"order_id": 16249,
"price": 33558,
"quantity": 1,
"subtotal": 33558.0,
"id": 19282,
"size": ""
},
...
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/order/[order_id]/detail
Url Arguments
Parámetros Tipo |
Descripción |
---|---|
order_id integer |
Identificador único del pedido. |
Clientes
Crear Cliente
curl -XPOST https://apibodegas.loadingplay.com/v1/customer \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d "rut=rut" \
-d "name=nombre" \
-d "last_name=apellido" \
-d "telephone=123456789" \
-d "email=test@loadingplay.com" \
-d "customer_type=persona"
import requests
response = requests.post(
"https://apibodegas.loadingplay.com/v1/customer",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"rut": "rut",
"name": "nombre",
"last_name": "apellido",
"telephone": "123456789",
"email": "test@loadingplay.com",
"customer_type": "persona"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"customer":
{
"id": "[id]",
"rut": "rut",
"name": "nombre",
"last_name": "apellido",
"telephone": "123456789",
"email": "test@loadingplay.com",
"type": "persona",
"deleted": false,
"site_name": "test"
}
}
HTTP Request
POST https://apibodegas.loadingplay.com/v1/customer
Parámetros
Parámetros Tipo |
Descripción |
---|---|
email REQUERIDO string |
E-mail del cliente |
rut string |
RUT del cliente |
name string |
Nombre del cliente |
last_name string |
Apellido del cliente |
telephone string |
Teléfono del cliente |
customer_type string |
Tipo de cliente e.j: 'persona', 'empresa' |
Editar Cliente
curl -XPUT https://apibodegas.loadingplay.com/v1/customer/[CUSTOMER_ID] \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d "name=nombre1" \
-d "last_name=apellido1" \
-d "telephone=987654321" \
-d "email=test1@loadingplay.com" \
-d "first_view=2010-03-15T16:52:43.662397" \
-d "last_view=2011-03-15T16:52:43.662397"
import requests
response = requests.put(
"https://apibodegas.loadingplay.com/v1/customer/[CUSTOMER_ID]",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"name": "nombre1",
"last_name": "apellido1",
"telephone": "987654321",
"email": "test1@loadingplay.com",
"first_view": "2010-03-15T16:52:43.662397",
"last_view": "2011-03-15T16:52:43.662397"
}
)
El comando de arriba retorna un JSON:
{
"status": "success",
"customer":
{
"id": "[CUSTOMER_ID]",
"name": "nombre1",
"last_name": "apellido1",
"telephone": "987654321",
"email": "test1@loadingplay.com",
"deleted": false,
"first_view": "2010-03-15T16:52:43.662397",
"last_view": "2011-03-15T16:52:43.662397"
}
}
HTTP Request
PUT https://apibodegas.loadingplay.com/v1/customer/[CUSTOMER_ID]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
CUSTOMER_ID REQUERIDO integer |
Identificador único del cliente |
rut string |
RUT del cliente |
name string |
Nombre del cliente |
last_name string |
Apellido del cliente |
telephone string |
Teléfono del cliente |
email string |
E-mail del customer |
first_view string |
Fecha en que se realiza la primera compra. Formato ISO 8601 |
last_view string |
Fecha en que se realiza la ultima compra. Formato ISO 8601 |
Obtener Cliente
curl -XGET https://apibodegas.loadingplay.com/v1/customer/[CUSTOMER_ID] \
-H 'Authorization: Bearer ACCESS_TOKEN'
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/customer/[CUSTOMER_ID]",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"customer":
{
"id": "[CUSTOMER_ID]",
"rut": "rut",
"name": "nombre",
"last_name": "apellido",
"telephone": "123456789",
"email": "test@loadingplay.com",
"type": "persona",
"deleted": false,
"site_name": "test",
"registration_date": "[registration_date]",
"first_view": "[first_view]",
"last_view": "[last_view]"
}
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/customer/[CUSTOMER_ID]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
CUSTOMER_ID REQUERIDO integer |
Identificador único del cliente |
Listar Clientes
curl -XGET https://apibodegas.loadingplay.com/v1/customer \
-H 'Authorization: Bearer ACCESS_TOKEN'
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/customer",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"customers": [
{
"id": "[id]",
"rut": "rut",
"name": "nombre",
"last_name": "apellido",
"telephone": "123456789",
"email": "test@loadingplay.com",
"type": "persona",
"deleted": false,
"site_name": "test",
"registration_date": "[registration_date]",
"first_view": "[first_view]",
"last_view": "[last_view]"
},
{
"id": "[id]",
"rut": "rut2",
"name": "nombre2",
"last_name": "apellido2",
"telephone": "987654321",
"email": "test2@loadingplay.com",
"type": "persona",
"deleted": false,
"site_name": "test",
"registration_date": "[registration_date]",
"first_view": "[first_view]",
"last_view": "[last_view]"
},
...
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/customer
Eliminar Cliente
curl -XDELETE https://apibodegas.loadingplay.com/v1/customer/[CUSTOMER_ID] \
-H 'Authorization: Bearer ACCESS_TOKEN'
import requests
response = requests.delete(
"https://apibodegas.loadingplay.com/v1/customer/[CUSTOMER_ID]",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"customer":
{
"id": "[id]",
"name": "nombre1",
"last_name": "apellido1",
"telephone": "987654321",
"email": "test1@loadingplay.com",
"deleted": true,
"first_view": "[FIRST_VIEW]",
"last_view": "[LAST_VIEW]"
}
}
HTTP Request
DELETE https://apibodegas.loadingplay.com/v1/customer/[id]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
CUSTOMER_ID REQUERIDO integer |
Identificador único del cliente |
Despachos
Crear despacho
curl -XPOST https://apibodegas.loadingplay.com/v1/shipping \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d "price=1000" \
-d "weight=3" \
-d "provider=proveedor" \
-d "destination=destino" \
-d "enabled=true"
import requests
response = requests.post(
"https://apibodegas.loadingplay.com/v1/shipping",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"price": 1000,
"weight": 3,
"provider": "proveedor",
"destination": "destino",
"enabled": True
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"shipping":
{
"id": "1234",
"price": 10000,
"weight": 3.0,
"site_name": "account_name",
"provider": "proveedor",
"destination": "destino",
"enabled": true
}
}
HTTP Request
POST https://apibodegas.loadingplay.com/v1/shipping
Parámetros
Parámetros Tipo |
Descripción |
---|---|
weight float |
Peso en máximo en kilos para este precio |
provider string |
Proveedor al que corresponde este precio |
destination string |
Destino al que corresponde el precio |
price string |
Precio del despacho |
enabled boolean |
Habilitado para el público si es true |
Editar despacho
curl -XPUT https://apibodegas.loadingplay.com/v1/shipping/1234 \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d "price=1000" \
-d "weight=3" \
-d "provider=proveedor" \
-d "destination=destino" \
-d "enabled=False"
import requests
response = requests.put(
"https://apibodegas.loadingplay.com/v1/shipping/1234",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"price": 1000,
"weight": 3,
"provider": proveedor,
"destination": "destino",
"enabled": False
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"shipping":
{
"id": "1234",
"price": 1000,
"weight": 3.0,
"provider": "proveedor",
"destination": "destino",
"enabled": false
}
}
HTTP Request
PUT https://apibodegas.loadingplay.com/v1/shipping/[id]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
id REQUERIDO int |
Identificador único del precio |
price int |
Precio del despacho |
weight float |
Peso en máximo en kilos para este precio |
provider string |
Proveedor al que corresponde este precio |
destination string |
Destino al que corresponde el precio |
enabled boolean |
Habilitado para el público si es true |
Borrar despacho
curl -XDELETE https://apibodegas.loadingplay.com/v1/shipping/1234 \
-H 'Authorization: Bearer ACCESS_TOKEN'
import requests
response = requests.delete(
"https://apibodegas.loadingplay.com/v1/shipping/1234",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"shipping":
{
"id": "[id]",
"price": 100,
"weight": 6.0,
"provider": "provider_A",
"destination": "destination_A",
"enabled": false
}
}
HTTP Request
DELETE https://apibodegas.loadingplay.com/v1/shipping/[id]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
id REQUERIDO int |
Identificador único del precio |
Obtener lista de proveedores
curl -XGET https://apibodegas.loadingplay.com/v1/shipping/provider \
-d "site_name=site_name"
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/shipping/provider",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"site_name": "site_name"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"shippings": [
{"provider": "proveedor 1"},
{"provider": "proveedor 2"}
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/shipping/provider
Parámetros
Parámetros Tipo |
Descripción |
---|---|
site_name REQUERIDO int |
Nobre de la cuenta |
Obtener datos de despacho por proveedor
curl -XGET https://apibodegas.loadingplay.com/v1/shipping/provider/proveedor1 \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d "site_name=site_name"
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/shipping/provider/proveedor1",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"site_name": "site_name"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"shippings": [
{
"id": 1234,
"price": 1000,
"weight": 3.0,
"site_name": "account_name",
"provider": "proveedor1",
"destination": "destino",
"enabled": true
}
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/shipping/provider/[name]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
name int |
nombre del proveedor |
Obtener despachos por el destino
curl -XGET https://apibodegas.loadingplay.com/v1/shipping/provider/[name]/destination/[destination_name] \
-H 'Authorization: Bearer ACCESS_TOKEN'
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/shipping/provider/[name]/destination/[destination_name]",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"shippings": [
{
"id": "[id]",
"price": 10,
"weight": 3.0,
"site_name": "site_name",
"provider": "[name]",
"destination": "[destination_name]",
"enabled": true
}
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/shipping/provider/[name]/destination/[name]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
name int |
Nombre del proveedor |
destination_name string |
Nombre del destino |
Obtener precio por peso
curl -XGET https://apibodegas.loadingplay.com/v1/shipping/price \
-d "weight=2" \
-d "site_name=site_name" \
-d "provider=proveedor" \
-d "destination=destino"
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/shipping/price",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"weight": 2,
"site_name": "site_name",
"provider": "proveedor",
"destination": "destino"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"shipping": {
"price": 1000
}
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/shipping/price
Parámetros
Parámetros Tipo |
Descripción |
---|---|
weight float |
Peso en máximo en kilos para este precio |
provider string |
Proveedor al que corresponde este precio |
destination string |
Destino al que corresponde el precio |
Activar/desactivar despacho
curl -XPUT https://apibodegas.loadingplay.com/v1/shipping/enable \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d "provider=proveedor" \
-d "destination=destino" \
-d "enabled=True"
import requests
response = requests.put(
"https://apibodegas.loadingplay.com/v1/shipping/enable",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"provider": "proveedor",
"destination": "destino",
"enabled": True
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"shippings": [
{ "enabled": true }
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/shipping/enable
Paramétros
Parámetros Tipo |
Descripción |
---|---|
provider string |
Proveedor al que corresponde este precio |
destination string |
Destino al que corresponde el precio |
enabled boolean |
Indica si es visible en checkout |
Configuraciones
Crear Configuración
curl -XPOST https://apibodegas.loadingplay.com/v1/config \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d 'name=name' \
-d 'value=value'
import requests
response = requests.post(
"https://apibodegas.loadingplay.com/v1/config",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
data={
"name": "name",
"value": "value"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"config": {
"name": "name",
"value": "value",
"site_name": "[site_name]"
}
}
HTTP Request
POST https://apibodegas.loadingplay.com/v1/config
Parámetros
Parámetros Tipo |
Descripción |
---|---|
name REQUERIDO string |
Nombre de la configuración |
value REQUERIDO string |
Valor de la configuración |
Obtener Configuración
curl -XGET https://apibodegas.loadingplay.com/v1/config \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d 'name=[CONFIG_NAME]'
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/config",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={"name": "[CONFIG_NAME]"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"config": [
{
"name": "[CONFIG_NAME]",
"value": "on"
}
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/config
Parámetros
Parámetros Tipo |
Descripción |
---|---|
name REQUERIDO string |
Nombre de la configuración |
Listar Configuraciones
curl -XGET https://apibodegas.loadingplay.com/v1/config \
-H 'Authorization: Bearer ACCESS_TOKEN'
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/config",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"config": [
{
"name": "[CONFIG_NAME_1]",
"value": "[CONFIG_VALUE_2]"
},
{
"name": "[CONFIG_NAME_2]",
"value": "[CONFIG_VALUE_2]"
},
...
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/config
Datos Llave - Valor
Crear dato Llave - Valor
curl -XPOST 'https://apibodegas.loadingplay.com/v1/keyvaluedata' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d 'key=key' \
-d 'value=value'
import requests
response = requests.post(
"https://apibodegas.loadingplay.com/v1/keyvaluedata",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"key": "key",
"value": "value"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"keyvaluedata": {
"value": {
"type": "[type]",
"id": "[id]",
"value": "[{value} or 'value']"
},
"key": "[key]"
}
}
HTTP Request
POST https://apibodegas.loadingplay.com/v1/keyvaluedata
Parámetros
Parámetros Tipo |
Descripción |
---|---|
key REQUERIDO string |
Llave |
value REQUERIDO string ó json |
Valor |
Obtener dato Llave - Valor
curl -XGET "https://apibodegas.loadingplay.com/v1/keyvaluedata/[key]" \
-H 'Authorization: Bearer ACCESS_TOKEN'
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/keyvaluedata/[key]",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
El comando de arriba retorna un JSON:
{
"status": "success",
"keyvaluedata": {
"value": "[{value} or 'value']",
"key": "[key]"
}
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/keyvaluedata/[key]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
key REQUERIDO string |
Llave |
Hooks
Acciones de hook
Acción | Gatillante |
---|---|
addProduct | Cuando se crea un producto |
editProduct | Cuando se edita un producto |
removeProduct | Cuando se elimina un producto |
saveConfig | Cuando se guarda una configuración |
clientAdd | Cuando se agrega un cliente |
orderAdd | Cuando se crea una orden |
orderStatusChange | Cuando cambia el estado de una orden |
orderDetailAdd | Cuando se agrega el detalle a una orden |
generateBill | Cuando se agrega un documento a una orden |
kardexInsert | Cuando se inserta un stock en la kardex |
Crear Hook
curl -XPOST https://apibodegas.loadingplay.com/v1/hook \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d "action=addProduct" \
-d "url=www.testaddhook.cl"
import requests
response = requests.post(
"https://apibodegas.loadingplay.com/v1/hook",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"action": "addProduct",
"url": "www.testaddhook.cl"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"hooks": [
{
"id": [id],
"url": "www.testaddhook.cl",
"action": "addProduct",
"site_name": "test"
}
]
}
HTTP Request
POST https://apibodegas.loadingplay.com/v1/hook
Parámetros
Parámetros Tipo |
Descripción |
---|---|
action REQUERIDO string |
Accion en la cual se dispara el hook |
url string |
URL a donde va a ir el hook |
Editar Hook
curl -XPUT https://apibodegas.loadingplay.com/v1/hook/[HOOK_ID] \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d "action=editProduct" \
-d "url=www.testedithook.cl"
import requests
response = requests.put(
"https://apibodegas.loadingplay.com/v1/hook/[HOOK_ID]",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
data={
"action": "editProduct",
"url": "www.testedithook.cl"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"hooks": [
{
"id": HOOK_ID,
"url": "www.testedithook.cl",
"action": "editProduct"
}
]
}
HTTP Request
PUT https://apibodegas.loadingplay.com/v1/hook/[HOOK_ID]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
HOOK_ID REQUERIDO integer |
Identificador unico del hook |
action string |
Accion en la cual se dispara el hook |
url string |
URL a donde va a ir el hook |
Listar Hooks
curl -XGET https://apibodegas.loadingplay.com/v1/hook \
-H 'Authorization: Bearer ACCESS_TOKEN' \
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/hook",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"hooks": [
{
"id": 42,
"url": "https://www.test.cl",
"action": "addProduct",
"site_name": "test"
},
{
"id": "...",
"url": "...",
"action": "...",
"site_name": "..."
},
...
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/hook
Eliminar Hook
curl -XDELETE https://apibodegas.loadingplay.com/v1/hook/[HOOK_ID] \
-H 'Authorization: Bearer ACCESS_TOKEN'
import requests
response = requests.delete(
"https://apibodegas.loadingplay.com/v1/hook/[HOOK_ID]",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"hooks": [
{
"id": HOOK_ID,
"url": "www.testedithook.cl",
"action": "editProduct",
"site_name": "test"
}
]
}
HTTP Request
DELETE https://apibodegas.loadingplay.com/v1/hook/[HOOK_ID]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
HOOK_ID REQUERIDO integer |
Identificar unico del hook |
Descuentos
Crear Descuento
curl -XPOST https://apibodegas.loadingplay.com/v1/discount \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d "site_name=test" \
-d "percentage=10" \
-d "code=addTestCode" \
-d "activate=False"
import requests
response = requests.post(
"https://apibodegas.loadingplay.com/v1/discount",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"site_name": "test",
"percentage": 10,
"code": "addTestCode",
"activate": False
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status" : "success",
"discounts" : [
{
"id" : CREATED_DISCOUNT_ID,
"percentage": 10,
"code": "addTestCode",
"site_name": "test",
"activate": false
}
]
}
HTTP Request
POST https://apibodegas.loadingplay.com/v1/discount
Parámetros
Parámetros Tipo |
Descripción |
---|---|
site_name REQUERIDO string |
Nombre del sitio |
percentage integer |
Porcentaje de descuento |
code string |
Código con el cual se obtiene descuento |
activate boolean |
Valor que indica si el codigo de descuento esta activado |
Editar Descuento
curl -XPUT https://apibodegas.loadingplay.com/v1/discount/[DISCOUNT_ID] \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d "percentage=20" \
-d "code=editTestCode" \
-d "activate=True"
import requests
response = requests.put(
"https://apibodegas.loadingplay.com/v1/discount/[DISCOUNT_ID]",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"percentage": 20,
"code": "editTestCode",
"activate": True
}
)
El comando de arriba retorna un JSON:
{
"status" : "success",
"discounts" : [
{
"id" : DISCOUNT_ID,
"percentage": 20,
"code": "editTestCode",
"activate": true
}
]
}
HTTP Request
PUT https://apibodegas.loadingplay.com/v1/discount/[DISCOUNT_ID]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
DISCOUNT_ID REQUERIDO integer |
Identificador unico del descuento |
percentage integer |
Porcentaje de descuento |
code string |
Código con el cual se obtiene el descuento |
activate boolean |
Valor que indica si el código de descuento esta activado |
Obtener Descuento
curl -XGET https://apibodegas.loadingplay.com/v1/discount/[DISCOUNT_ID] \
-H 'Authorization: Bearer ACCESS_TOKEN'
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/discount/[DISCOUNT_ID]",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status" : "success",
"discounts" : [
{
"id" : 1,
"percentage": 20,
"code": "testCode",
"site_name": "test",
"activate": true
}
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/discount/[DISCOUNT_ID]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
DISCOUNT_ID REQUERIDO integer |
Identificador único del descuento |
Listar Descuentos
curl -XGET https://apibodegas.loadingplay.com/v1/discount \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d "site_name=test"
import requests
response = requests.get(
"",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"site_name": "test"
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status" : "success",
"discounts" : [
{
"id" : 1,
"percentage": 20,
"code": "testCode",
"site_name": "test",
"activate": true
},
{
"id" : "...",
"percentage": "...",
"code": "...",
"site_name": "...",
"activate": ""
},
...
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/discount
Parámetros
Parámetros Tipo |
Descripción |
---|---|
site_name REQUERIDO string |
Nombre del sitio |
Eliminar Descuento
curl -XDELETE https://apibodegas.loadingplay.com/v1/discount/[DISCOUNT_ID] \
-H 'Authorization: Bearer ACCESS_TOKEN'
import requests
response = requests.delete(
"https://apibodegas.loadingplay.com/v1/discount/[DISCOUNT_ID]",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
El comando de arriba retorna un JSON:
{
"status" : "success",
"discounts" : [
{
"id" : DISCOUNT_ID,
"percentage": 20,
"code": "editTestCode",
"site_name": "test",
"activate": true
}
]
}
HTTP Request
DELETE https://apibodegas.loadingplay.com/v1/discount/[DISCOUNT_ID]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
DISCOUNT_ID REQUERIDO integer |
Identificar del descuento |
Métodos de pago
Crear Métodos de pago
curl -XPOST https://apibodegas.loadingplay.com/v1/paymenttype \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "name=new payment type" \
-d "extra_info={\"config_data\": {\"data_name\": \"data\"}}"
import requests
import json
response = requests.post(
"https://apibodegas.loadingplay.com/v1/paymenttype",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"name": "new payment type",
"extra_info": json.dumps({
"config_data": {
"data_name": "data"
}
})
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
'status': 'success',
'paymentType': {
'extra_info': {
'config_data': {
'data_name': 'data'
}
},
'site_name': 'baymax',
'id': 10,
'name': 'new payment type'
}
}
HTTP Request
POST https://apibodegas.loadingplay.com/v1/paymenttype
Parámetros
Parámetros Tipo |
Descripción |
---|---|
name string |
Nombre del método de pago |
extra_info json |
Información extra para el método de pago |
Obtener Método de pago
curl -XGET https://apibodegas.loadingplay.com/v1/paymenttype/[PAYMENT_TYPE_ID] \
-H "Authorization: Bearer ACCESS_TOKEN"
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/paymenttype/[PAYMENT_TYPE_ID]",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
'status': 'success',
'paymentType': {
'extra_info': {
'config_data': {
'data_name': 'data'
}
},
'site_name': 'baymax',
'id': 10,
'name': 'new payment type'
}
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/paymenttype/[PAYMENT_TYPE_ID]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
PAYMENT_TYPE_ID REQUERIDO integer |
Identificador único del método de pago |
Editar Método de pago
curl -XPUT https://apibodegas.loadingplay.com/v1/paymenttype/[PAYMENT_TYPE_ID] \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "name=edit payment type" \
-d "extra_info={\"config_data\": {\"data_name\": \"other_data\", \"new_data_name\": \"data\"}}"
import requests
import json
response = requests.put(
"https://apibodegas.loadingplay.com/v1/paymenttype/[PAYMENT_TYPE_ID]",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
data={
"name": "edit payment type",
"extra_info": json.dumps({
"config_data": {
"data_name": "other_data",
"new_data_name": "data"
}
})
}
)
print(response.json())
El comando de arriba retorna un JSON:
{
'status': 'success',
'paymentType': {
'extra_info': {
'config_data': {
'data_name': 'other_data',
'new_data_name': 'data'
}
},
'site_name': 'baymax',
'id': 10,
'name': 'edit payment type'
}
}
HTTP Request
PUT https://apibodegas.loadingplay.com/v1/paymenttype/[PAYMENT_TYPE_ID]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
PAYMENT_TYPE_ID REQUERIDO integer |
Identificador único del método de pago |
name string |
Nombre del método de pago |
extra_info json |
Información extra para el método de pago |
Borrar Método de pago
curl -XDELETE https://apibodegas.loadingplay.com/v1/paymenttype/[PAYMENT_TYPE_ID] \
-H 'Authorization: Bearer ACCESS_TOKEN'
import requests
response = requests.delete(
"https://apibodegas.loadingplay.com/v1/paymenttype/[PAYMENT_TYPE_ID]",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
'status': 'success',
'paymentType': {
'extra_info': {
'config_data': {
'data_name': 'other_data',
'new_data_name': 'data'
}
},
'site_name': 'baymax',
'id': 10,
'name': 'edit payment type'
}
}
HTTP Request
DELETE https://apibodegas.loadingplay.com/v1/paymenttype/[PAYMENT_TYPE_ID]
Parámetros
Parámetros Tipo |
Descripción |
---|---|
PAYMENT_TYPE_ID REQUERIDO integer |
Identificador único del método de pago |
Obtener lista de los métodos de pago
curl -XGET https://apibodegas.loadingplay.com/v1/paymenttype \
-H 'Authorization: Bearer ACCESS_TOKEN'
import requests
response = requests.get(
"https://apibodegas.loadingplay.com/v1/paymenttype",
headers={"Authorization": "Bearer ACCESS_TOKEN"}
)
print(response.json())
El comando de arriba retorna un JSON:
{
"status": "success",
"paymentTypes": [
{
"id": 11,
"name": "new",
"extra_info": {
"shopify": {
"url": "www.test.cl",
"store": 0
}
},
"site_name": "baymax"
}
]
}
HTTP Request
GET https://apibodegas.loadingplay.com/v1/paymenttype