Channel
Endpoints for managing channels in the system.# Endpoints
GET/channels# List all channels.GET/channels/{channel_id}# List a channel by ID.GET/channel-options# Get supported channels.POST/channel# Create a new channel.POST/channel/check-configuration# Check the configuration of a specific channel.DELETE/channel/{channel_id}# Delete a channel by ID.PUT/channel/{channel_id}# Update a channel by ID.
Channel
idThe unique identifier for the channel.
team_idThe ID of the team to which the channel belongs.
nameThe name of the channel.
countryThe country associated with the channel.
typeThe type of the channel (e.g., Shopify).
created_atThe timestamp when the channel was created.
active_salesThe number of active sales associated with the channel.
past_salesThe number of past sales associated with the channel.
1{
2 "id": "clysxnec500034rv0a82kaf2n",
3 "team_id": "clymtb8g90000maj34h0mwyc5",
4 "name": "Main",
5 "country": "Germany",
6 "type": "Shopify",
7 "created_at": "2024-07-19T16:46:57.364Z",
8 "active_sales": 19,
9 "past_sales": 13
10}
get
List All Channels
Retrieve all channels in the system.
curl -X GET "https://api.omnilabs.sh/channels?take=10&page=1" -H "Authorization: Bearer {{BEARER_TOKEN}}"
Parameters
takenumberoptional
The number of channels to retrieve per page.
pagenumberoptional
The next set page to retrieve the channels.
{
"data": [
{
"id": "clysxnec500034rv0a82kaf2n",
"team_id": "clymtb8g90000maj34h0mwyc5",
"name": "Main",
"country": "Germany",
"type": "Shopify",
"created_at": "2024-07-19T16:46:57.364Z",
"active_sales": 19,
"past_sales": 13
},
{
"id": "cm1xq0lq20007hvvkg5rndbka",
"team_id": "clymtb8g90000maj34h0mwyc5",
"name": "Main Store",
"country": "USA",
"type": "shopify",
"created_at": "2024-10-06T15:11:14.424Z",
"active_sales": 9,
"past_sales": 8
}
],
"total": 2,
"take": 10,
"current_page": 1,
"last_page": 1
}
get
Get Channel by ID
Retrieve details of a specific channel by its ID.
curl -X GET "https://api.omnilabs.sh/channels/{channel_id}" -H "Authorization: Bearer {{BEARER_TOKEN}}"
Parameters
channel_idstringrequired
The ID of the channel to retrieve.
{
"id": "clysxnec500034rv0a82kaf2n",
"team_id": "clymtb8g90000maj34h0mwyc5",
"name": "Main",
"country": "Germany",
"type": "Shopify",
"created_at": "2024-07-19T16:46:57.364Z",
"active_sales": 19,
"past_sales": 13
}
get
Get Supported Channels
Retrieve a list of supported channels and their countries.
curl -X GET "https://api.omnilabs.sh/channel-options" -H "Authorization: Bearer {{BEARER_TOKEN}}"
[
{
"name": "Shopify",
"countries": [
"Germany",
"France",
"Spain",
"Italy",
"Netherlands",
"Sweden",
"Denmark",
"Norway",
"Finland",
"Belgium",
"Switzerland",
"Austria",
"Ireland",
"Portugal",
"Poland",
"Other"
]
},
{
"name": "Amazon",
"countries": [
"France",
"Spain",
"Germany",
"Italy"
]
}
]
post
Create a Channel
Creates a new channel in the system.
curl -X POST "https://api.omnilabs.sh/channel" -H "Authorization: Bearer {{BEARER_TOKEN}}" -H "Content-Type: application/json" -d '{"name":"Main Store","type":"shopify","country":"USA","configuration":"Base64 encoded string"}'
Parameters
namestringrequired
The name of the channel.
typestringrequired
The type of channel.
countrystringrequired
The country associated with the channel.
configurationstringrequired
Base64 encoded configuration for the channel.
{
"id": "cm1xq0lq20007hvvkg5rndbka"
}
post
Check Channel Configuration
Checks the configuration of a specific channel.
curl -X POST "https://api.omnilabs.sh/channel/check-configuration" -H "Authorization: Bearer {{BEARER_TOKEN}}" -H "Content-Type: application/json" -d '{"type":"shopify","configuration":"Base64 encoded string"}'
Parameters
typestringrequired
The type of channel (e.g., Shopify).
configurationstringrequired
Base64 encoded configuration for the channel.
put
Update a Channel
Updates the details of a channel by its ID.
curl -X PUT "https://api.omnilabs.sh/channel/{channel_id}" -H "Authorization: Bearer {{BEARER_TOKEN}}" -H "Content-Type: application/json" -d '{"name":"Main Store","type":"shopify","country":"USA","configuration":"Base64 encoded string"}'
Parameters
channel_idstringrequired
The ID of the channel to be updated.
namestringrequired
The name of the channel.
typestringrequired
The type of channel.
countrystringrequired
The country associated with the channel.
configurationstringrequired
Base64 encoded configuration for the channel.
delete
Delete a Channel
Deletes a channel by ID.
curl -X DELETE "https://api.omnilabs.sh/channel/{channel_id}" -H "Authorization: Bearer {{BEARER_TOKEN}}"
Parameters
channel_idstringrequired
The ID of the channel to be deleted.