Server
Sleekshop provides server-related endpoints that allow you to check the status of the server and create new channels. Below are the details on how to use these endpoints.
Get Server Status
This endpoint returns the current status of the server. It's useful for monitoring whether the server is running and if the data is complete for debiting.
Required attributes
- Name
licence_username
- Type
- string
- Description
Your licence username.
- Name
licence_password
- Type
- string
- Description
Your licence password.
Request
curl https://demo.sleekshop.net/srv/service/ \
-d licence_username='demo_NBSqhrcrhMci15Ir9UWI' \
-d licence_password='s9vmrbwT23B7bmjR4Vmz' \
-d request='get_status'
Response
{
"object": "status",
"server_status": "running",
"data_status": "incomplete",
"products_count": 22,
"contents_count": 4
}
Response Explanation
- server_status: Indicates whether the server is running or stopped.
- data_status: Indicates whether the data for debiting is complete or not.
- products_count: The total number of products on the server.
- contents_count: The total number of contents on the server.
Create Channel
This endpoint allows you to create a new channel within Sleekshop. You can specify the name, description, and activation status of the channel, as well as the desired server output format (JSON or XML).
Required attributes
- Name
name
- Type
- string
- Description
The name of your channel.
- Name
description
- Type
- string
- Description
A description for your channel.
- Name
shop_active
- Type
- int
- Description
Indicates whether the channel is active (1 for active, 0 for inactive).
- Name
server_output
- Type
- string
- Description
The format in which you want the server output (either 'json' or 'xml').
- 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='1233321fasd7bmjR4Vmz' \
-d request='create_channel' \
-d name='channel_name' \
-d description='channel description' \
-d shop_active=1 \
-d server_output='json'
Response
{
"object": "create_channel",
"status": "success"
}