Skip to main content

Sales Channels

Models

Sales Channel

type SalesChannel {
id: ID!
name: String!
paymentGateways: [SalesChannelPaymentGateway!]
priceListId: String
stockLocations: [SalesChannelStockLocation!]
type: SalesChannelTypeEnum!
}

Fields

idID!required
nameString!required

The sales channel name field.

The sales channel payment gateway field.

priceListIdString

The sales channel priceList field.

The sales channel stock locations field.

Sales Channel Payment Gateway

type SalesChannelPaymentGateway {
id: String!
order: Float!
}

Fields

idString!required
orderFloat!required

The field where the Sales Channel Stock Position order is kept.

Sales Channel Stock Location

type SalesChannelStockLocation {
id: String!
order: Float!
}

Fields

idString!required
orderFloat!required

The field where the Sales Channel Stock Position order is kept.

Queries

List Sales Channels

listSalesChannel(
id: StringFilterInput
): [SalesChannel!]!

Arguments

Return Type

SalesChannelSalesChannel

Get Sales Channel

Using this api, you can view your sales channel.

getSalesChannel: SalesChannel

Return Type

SalesChannelSalesChannel

Mutations

Save Sales Channel

Using this api you can update the sales channel name, priceList Id and stockLocations properties.

saveSalesChannel(
input: SalesChannelInput!
): SalesChannel

Arguments

inputSalesChannelInput!required

Return Type

SalesChannelSalesChannel

Examples

Retrieves a list of sales channels

curl --location --request POST 'https://api.myikas.com/api/v1/admin/graphql' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your_access_token>' \
--data-raw '{"query":"{ listSalesChannel { createdAt deleted id name priceListId stockLocations { order } paymentGateways { order } type updatedAt }}"}'

Response

{
"data": {
"listSalesChannel": [
{
"createdAt": 1631194974624,
"deleted": false,
"id": "c78b2fa7-2e8a-442a-9818-b1b033bad47f",
"name": "taylan-app",
"priceListId": null,
"stockLocations": [
{
"order": 1
}
],
"paymentGateways": [
{
"order": 0
}
],
"type": "STOREFRONT",
"updatedAt": 1631195159983
}
]
}
}

Retrieves a sales channel detail

curl --location --request POST 'https://api.myikas.com/api/v1/admin/graphql' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your_access_token>' \
--data-raw '{"query":"{ getSalesChannel { createdAt deleted id name priceListId type updatedAt }}"}'

Response

{}

Creates a new sales channel

curl --location --request POST 'https://api.myikas.com/api/v1/admin/graphql' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your_access_token>' \
--data-raw '{"query":"mutation { saveSalesChannel( input: { name: \"AAA\" priceListId: \"priceListId\" stockLocations: { id: \"stockLocationId\", order: 4 } } ) { createdAt deleted id name priceListId stockLocations { order } paymentGateways { order } type updatedAt }}"}'

Response

{}