Sales Channels
The sales channel object
Required attributes
- Name
_id- Type
- string
- Description
The ID of the sales channel
- Name
sellerId- Type
- string
- Description
The ID of the seller of the sales channel
- Name
name- Type
- string
- Description
The name of the sales channel
- Name
status- Type
- enum(ACTIVE, INACTIVE)
- Description
The status of the object, whether it is active or not
- Name
type- Type
- enum(POS, DISTRIBUTOR, INTERNAL_BOOKING, WEB, MARKETPLACE_APP, KIOSK)
- Description
The type of the sales channel
Optional attributes
- Name
createdAt- Type
- string
- Description
An ISO timestamp indicating when the sales channel was created
- Name
updatedAt- Type
- string
- Description
An ISO timestamp indicating when the sales channel was updated
- Name
groupId- Type
- string
- Description
The group of the sales channel
- Name
contractTypeIds- Type
- array<string>
- Description
The contract types that are available through this sales channel
- Name
owner- Type
- string
- Description
The app owner id, if the channel was created by a marketplace app
Example
{
"_id": "507f191e810c19729de860ea",
"sellerId": "507f191e810c19729de860ea",
"name": "Example Name",
"status": "ACTIVE",
"type": "POS",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"groupId": "507f191e810c19729de860ea",
"contractTypeIds": [
"string"
],
"owner": "string"
}Create a sales channel
Create a sales channel
Request
const response = await fetch('https://vivenu.com/api/sales-channels', {
method: 'POST',
headers: {
Authorization: 'Bearer {token}',
'Content-Type': 'application/json',
},
body: JSON.stringify( {
"name": "Example Name",
"status": "ACTIVE",
"type": "DISTRIBUTOR",
"groupId": "507f191e810c19729de860ea",
"contractTypeIds": [
"string"
],
"distributor": {
"type": "Redeam",
"integrationType": "DistributionService"
}
}),
})
const data = await response.json()Response (200)
{
"_id": "507f191e810c19729de860ea",
"sellerId": "507f191e810c19729de860ea",
"name": "Example Name",
"status": "ACTIVE",
"type": "POS",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"groupId": "507f191e810c19729de860ea",
"contractTypeIds": [
"string"
],
"owner": "string"
}Update a sales channel
Update a sales channel
Request
const response = await fetch('https://vivenu.com/api/sales-channels/507f191e810c19729de860ea', {
method: 'PUT',
headers: {
Authorization: 'Bearer {token}',
'Content-Type': 'application/json',
},
body: JSON.stringify( {
"name": "Example Name",
"status": "ACTIVE",
"type": "DISTRIBUTOR",
"groupId": "507f191e810c19729de860ea",
"contractTypeIds": [
"string"
],
"distributor": {
"type": "Redeam",
"integrationType": "DistributionService"
}
}),
})
const data = await response.json()Response (200)
{
"_id": "507f191e810c19729de860ea",
"sellerId": "507f191e810c19729de860ea",
"name": "Example Name",
"status": "ACTIVE",
"type": "POS",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"groupId": "507f191e810c19729de860ea",
"contractTypeIds": [
"string"
],
"owner": "string"
}Get a SalesChannel
Get a SalesChannel
Query parameters
Optional query parameters
- Name
sellerId- Type
- string
- Description
Request
const response = await fetch('https://vivenu.com/api/sales-channels/507f191e810c19729de860ea?sellerId=507f191e810c19729de860ea', {
method: 'GET',
headers: {
Authorization: 'Bearer {token}',
},
})
const data = await response.json()Response (200)
{
"_id": "507f191e810c19729de860ea",
"sellerId": "507f191e810c19729de860ea",
"name": "Example Name",
"status": "ACTIVE",
"type": "POS",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"groupId": "507f191e810c19729de860ea",
"contractTypeIds": [
"string"
],
"owner": "string"
}Get all sales channels
Get all sales channels
Query parameters
Optional query parameters
- Name
status- Type
- array<enum(ACTIVE, INACTIVE)>
- Description
- Name
name- Type
- string
- Description
- Name
type- Type
- array<enum(POS, DISTRIBUTOR, INTERNAL_BOOKING, WEB, MARKETPLACE_APP, KIOSK)>
- Description
- Name
permissions- Type
- array<enum(salesChannels:access)>
- Description
- Name
groupIds- Type
- array<string>
- Description
- Name
sellerId- Type
- string
- Description
- Name
top- Type
- integer
- Description
- Name
skip- Type
- integer
- Description
Request
const response = await fetch('https://vivenu.com/api/sales-channels?status=value1%2Cvalue2&name=Example+Name&type=value1%2Cvalue2&permissions=value1%2Cvalue2&groupIds=value1%2Cvalue2&sellerId=507f191e810c19729de860ea&top=1&skip=1', {
method: 'GET',
headers: {
Authorization: 'Bearer {token}',
},
})
const data = await response.json()Response (200)
{
"docs": [],
"total": 1
}The sales channel group object
Required attributes
- Name
name- Type
- string
- Description
The name of the sales channel group
- Name
status- Type
- enum(ACTIVE, INACTIVE)
- Description
The status of the sales channel group, whether it is active or not
- Name
restrictEventAccess- Type
- boolean
- Description
Wether channels in this group can only access some events or all
- Name
_id- Type
- string
- Description
The ID of the sales channel group
- Name
sellerId- Type
- string
- Description
The ID of the seller of the sales channel group
Optional attributes
- Name
salesChannelIds- Type
- array<string>
- Description
The sales channels that are in the group
- Name
createdAt- Type
- string
- Description
An ISO timestamp indicating when the sales channel group was created
- Name
updatedAt- Type
- string
- Description
An ISO timestamp indicating when the sales channel group was updated
Example
{
"name": "Example Name",
"status": "ACTIVE",
"restrictEventAccess": true,
"_id": "507f191e810c19729de860ea",
"sellerId": "507f191e810c19729de860ea",
"salesChannelIds": [
"string"
],
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}Create a sales channel group
Create a sales channel group
Payload
Required attributes
- Name
name- Type
- string
- Description
The name of the sales channel group
- Name
status- Type
- enum(ACTIVE, INACTIVE)
- Description
The status of the sales channel group, whether it is active or not
- Name
restrictEventAccess- Type
- boolean
- Description
Wether channels in this group can only access some events or all
Optional attributes
- Name
salesChannelIds- Type
- array<string>
- Description
The sales channels that are in the group
Request
const response = await fetch('https://vivenu.com/api/sales-channels/groups', {
method: 'POST',
headers: {
Authorization: 'Bearer {token}',
'Content-Type': 'application/json',
},
body: JSON.stringify( {
"name": "Example Name",
"status": "ACTIVE",
"restrictEventAccess": true,
"salesChannelIds": [
"string"
]
}),
})
const data = await response.json()Response (200)
{
"name": "Example Name",
"status": "ACTIVE",
"restrictEventAccess": true,
"_id": "507f191e810c19729de860ea",
"sellerId": "507f191e810c19729de860ea",
"salesChannelIds": [
"string"
],
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}Update a sales channel group
Update a sales channel group
Payload
Required attributes
- Name
name- Type
- string
- Description
The name of the sales channel group
- Name
status- Type
- enum(ACTIVE, INACTIVE)
- Description
The status of the sales channel group, whether it is active or not
- Name
restrictEventAccess- Type
- boolean
- Description
Wether channels in this group can only access some events or all
Optional attributes
- Name
salesChannelIds- Type
- array<string>
- Description
The sales channels that are in the group
Request
const response = await fetch('https://vivenu.com/api/sales-channels/groups/507f191e810c19729de860ea', {
method: 'PUT',
headers: {
Authorization: 'Bearer {token}',
'Content-Type': 'application/json',
},
body: JSON.stringify( {
"name": "Example Name",
"status": "ACTIVE",
"restrictEventAccess": true,
"salesChannelIds": [
"string"
]
}),
})
const data = await response.json()Response (200)
{
"name": "Example Name",
"status": "ACTIVE",
"restrictEventAccess": true,
"_id": "507f191e810c19729de860ea",
"sellerId": "507f191e810c19729de860ea",
"salesChannelIds": [
"string"
],
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}Get a SalesChannelGroup
Get a SalesChannelGroup
Request
const response = await fetch('https://vivenu.com/api/sales-channels/groups/507f191e810c19729de860ea', {
method: 'GET',
headers: {
Authorization: 'Bearer {token}',
},
})
const data = await response.json()Response (200)
{
"name": "Example Name",
"status": "ACTIVE",
"restrictEventAccess": true,
"_id": "507f191e810c19729de860ea",
"sellerId": "507f191e810c19729de860ea",
"salesChannelIds": [
"string"
],
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}Get all sales channel groups
Get all sales channel groups
Query parameters
Optional query parameters
- Name
status- Type
- array<enum(ACTIVE, INACTIVE)>
- Description
- Name
name- Type
- string
- Description
- Name
includeDefaultGroups- Type
- boolean
- Description
- Name
top- Type
- integer
- Description
- Name
skip- Type
- integer
- Description
Request
const response = await fetch('https://vivenu.com/api/sales-channels/groups?status=value1%2Cvalue2&name=Example+Name&includeDefaultGroups=true&top=1&skip=1', {
method: 'GET',
headers: {
Authorization: 'Bearer {token}',
},
})
const data = await response.json()Response (200)
{
"name": "Example Name",
"status": "ACTIVE",
"restrictEventAccess": true,
"_id": "507f191e810c19729de860ea",
"sellerId": "507f191e810c19729de860ea",
"salesChannelIds": [
"string"
],
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}