Log InGet demo

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

id

The unique identifier for the channel.

team_id

The ID of the team to which the channel belongs.

name

The name of the channel.

country

The country associated with the channel.

type

The type of the channel (e.g., Shopify).

created_at

The timestamp when the channel was created.

active_sales

The number of active sales associated with the channel.

past_sales

The number of past sales associated with the channel.

{} The Channel resource
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
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.

Response
{
"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
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.

Response
{
"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
curl -X GET "https://api.omnilabs.sh/channel-options" -H "Authorization: Bearer {{BEARER_TOKEN}}"
Response
[
{
"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
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.

Response
{
"id": "cm1xq0lq20007hvvkg5rndbka"
}
post

Check Channel Configuration

Checks the configuration of a specific channel.

cURL
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.

Response
"true"
put

Update a Channel

Updates the details of a channel by its ID.

cURL
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.

Response
"ok"
delete

Delete a Channel

Deletes a channel by ID.

cURL
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.

Response
"ok"
ยฉ Omnilabs 2026. All rights reserved.