Warehouse
Sleekshop provides a comprehensive set of APIs to manage warehouse entities, inventory, and bindings between products and warehouse items. Below, you'll find detailed information on how to use these endpoints effectively.
Create Warehouse Entity
This endpoint allows you to create new warehouse entities. If any errors occur during the creation process, they will be returned in the response.
Required attributes
- Name
class
- Type
- string
- Description
The class of the new product.
- Name
name
- Type
- string
- Description
The name of the new product.
- Name
id_manufacturer
- Type
- int
- Description
The ID of the corresponding manufacturer.
- Name
attributes
- Type
- json-array
- Description
A JSON array containing attributes to set, structured by language. For example,
{"de_DE":{"attr1":"myvalue"}}
.
- Name
metadata
- Type
- json-array
- Description
A JSON array containing metadata to set, such as
{"element_number":"123"}
.
- Name
licence_username
- Type
- string
- Description
Your licence username.
- Name
licence_password
- Type
- string
- Description
Your licence password.
- Name
licence_secret_key
- Type
- string
- Description
Your licence secret key.
Request
curl https://demo.sleekshop.net/srv/service/ \
-d licence_username='demo_NBSqhrcrhMci15Ir9UWI' \
-d licence_password='s9vmrbwT23B7bmjR4Vmz' \
-d licence_secret_key='your_secret_key' \
-d request='create_warehouse_entity' \
-d class='wh_entity' \
-d name='name_new' \
-d id_manufacturer=1 \
-d attributes='{"de_DE":{"name":"Test"}}' \
-d metadata='{"element_number":"123321"}'
Response
{
"object": "create_warehouse_entity",
"id": "162"
}
Response Explanation
- id: The ID of the newly created warehouse entity.
Update Warehouse Entity
This endpoint allows you to update existing warehouse entities. If any errors occur during the update process, they will be returned in the response.
Required attributes
- Name
id_warehouse_entity
- Type
- int
- Description
The ID of the warehouse entity you want to update.
- Name
name
- Type
- string
- Description
The new name of the product.
- Name
id_manufacturer
- Type
- int
- Description
The ID of the corresponding manufacturer.
- Name
attributes
- Type
- json-array
- Description
A JSON array containing attributes to set, structured by language. For example,
{"de_DE":{"name":"Test"}}
.
- Name
metadata
- Type
- json-array
- Description
A JSON array containing metadata to set, such as
{"element_number":"123"}
.
- Name
licence_username
- Type
- string
- Description
Your licence username.
- Name
licence_password
- Type
- string
- Description
Your licence password.
- Name
licence_secret_key
- Type
- string
- Description
Your licence secret key.
Request
curl https://demo.sleekshop.net/srv/service/ \
-d licence_username='demo_NBSqhrcrhMci15Ir9UWI' \
-d licence_password='s9vmrbwT23B7bmjR4Vmz' \
-d licence_secret_key='your_secret_key' \
-d request='update_warehouse_entity' \
-d id_warehouse_entity=123 \
-d name='name_new' \
-d id_manufacturer=1 \
-d attributes='{"de_DE":{"name":"Test"}}' \
-d metadata='{"element_number":"123321"}'
Response
{
"object": "update_warehouse_entity",
"status": "success"
}
Response Explanation
- status: The status of the operation.
Delete Warehouse Entity
This endpoint allows you to delete existing warehouse entities. If any errors occur during the deletion process, they will be returned in the response.
Required attributes
- Name
id_warehouse_entity
- Type
- int
- Description
The ID of the warehouse entity you want to delete.
- Name
licence_username
- Type
- string
- Description
Your licence username.
- Name
licence_password
- Type
- string
- Description
Your licence password.
- Name
licence_secret_key
- Type
- string
- Description
Your licence secret key.
Request
curl https://demo.sleekshop.net/srv/service/ \
-d licence_username='demo_NBSqhrcrhMci15Ir9UWI' \
-d licence_password='s9vmrbwT23B7bmjR4Vmz' \
-d licence_secret_key='your_secret_key' \
-d request='delete_warehouse_entity' \
-d id_warehouse_entity=123
Response
{
"object": "delete_warehouse_entity",
"status": "success"
}
Response Explanation
- status: The status of the operation.
Inventory Place
This endpoint allows you to place warehouse entities into storage. If any errors occur during the process, they will be returned in the response.
Required attributes
- Name
storage
- Type
- string
- Description
The storage name where you want to place the entity.
- Name
element_number
- Type
- string
- Description
The element number of the entity you want to place.
- Name
quantity
- Type
- int
- Description
The number of items you want to place.
- Name
note
- Type
- string
- Description
A note to add to your check-in.
- Name
licence_username
- Type
- string
- Description
Your licence username.
- Name
licence_password
- Type
- string
- Description
Your licence password.
- Name
licence_secret_key
- Type
- string
- Description
Your licence secret key.
Request
curl https://demo.sleekshop.net/srv/service/ \
-d licence_username='demo_NBSqhrcrhMci15Ir9UWI' \
-d licence_password='s9vmrbwT23B7bmjR4Vmz' \
-d licence_secret_key='your_secret_key' \
-d request='inventory_place' \
-d storage="storage123" \
-d element_number='123asd' \
-d quantity=1 \
-d note='my_note'
Response
{
"object": "inventory_place",
"status": "success"
}
Response Explanation
- status: The status of the operation.
Inventory Take
This endpoint allows you to take warehouse entities out of storage. If any errors occur during the process, they will be returned in the response.
Required attributes
- Name
storage
- Type
- string
- Description
The storage name from which you want to take the entity.
- Name
element_number
- Type
- string
- Description
The element number of the entity you want to take.
- Name
quantity
- Type
- int
- Description
The number of items you want to take.
- Name
note
- Type
- string
- Description
A note to add to your check-out.
- Name
licence_username
- Type
- string
- Description
Your licence username.
- Name
licence_password
- Type
- string
- Description
Your licence password.
- Name
licence_secret_key
- Type
- string
- Description
Your licence secret key.
Request
curl https://demo.sleekshop.net/srv/service/ \
-d licence_username='demo_NBSqhrcrhMci15Ir9UWI' \
-d licence_password='s9vmrbwT23B7bmjR4Vmz' \
-d licence_secret_key='your_secret_key' \
-d request='inventory_take' \
-d storage="storage123" \
-d element_number='123asd' \
-d quantity=1 \
-d note='my_note'
Response
{
"object": "inventory_take",
"status": "success"
}
Response Explanation
- status: The status of the operation.
Add Binding
This endpoint binds a product to a warehouse entity using the entity's element number. If any errors occur during the binding process, they will be returned in the response.
Required attributes
- Name
id_product
- Type
- int
- Description
The ID of the product you want to bind to a warehouse entity.
- Name
element_number
- Type
- string
- Description
The element number of the warehouse entity you want to bind.
- Name
quantity
- Type
- int
- Description
The number of items you want to bind.
- Name
licence_username
- Type
- string
- Description
Your licence username.
- Name
licence_password
- Type
- string
- Description
Your licence password.
- Name
licence_secret_key
- Type
- string
- Description
Your licence secret key.
Request
curl https://demo.sleekshop.net/srv/service/ \
-d licence_username='demo_NBSqhrcrhMci15Ir9UWI' \
-d licence_password='s9vmrbwT23B7bmjR4Vmz' \
-d licence_secret_key='your_secret_key' \
-d request='add_binding' \
-d id_product=10 \
-d element_number='123asd' \
-d quantity=1
Response
{
"object": "add_binding",
"status": "success"
}
Response Explanation
- status: The status of the operation.
Delete Binding
This endpoint deletes an existing binding between a product and a warehouse entity. If any errors occur during the deletion process, they will be returned in the response.
Required attributes
- Name
id_product
- Type
- int
- Description
The ID of the product you want to unbind from a warehouse entity.
- Name
element_number
- Type
- string
- Description
The element number of the warehouse entity you want to unbind.
- Name
licence_username
- Type
- string
- Description
Your licence username.
- Name
licence_password
- Type
- string
- Description
Your licence password.
- Name
licence_secret_key
- Type
- string
- Description
Your licence secret key.
Request
curl https://demo.sleekshop.net/srv/service/ \
-d licence_username='demo_NBSqhrcrhMci15Ir9UWI' \
-d licence_password='s9vmrbwT23B7bmjR4Vmz' \
-d licence_secret_key='your_secret_key' \
-d request='delete_binding' \
-d id_product=10 \
-d element_number='123asd'
Response
{
"object": "delete_binding",
"status": "success"
}
Response Explanation
- status: The status of the operation.