younifyd
Menu

Create a new order channel

Create a new order channel.

POST/companies/{companyId}/channels

Use it in a workflow

  1. Add a step and choose the SCAYLE Admin connector.
  2. Pick the Create a new order channel action (under Channels).
  3. Fill in the fields below, then reference the result from later steps as {{createANewOrderChannel.response.data}}.

Request

Path parameters

companyIdintegerrequired

The company ID.

Request body

Enter the body as JSON in the step's Body field.

keystringrequired

Slug short key to identify the channel. Not allowed to be modified after channel is used for an order.

typestringrequired

Not allowed to be modified after channel is used for an order.

namestringrequired

Custom name of the channel.

descriptionstring

Optional description about the channel in text format.

shopCountryIdintegerrequired

The application / shop country association of the channel. References an existing company application.

defaultPaymentMethodobject

Optional default payment method. If set, the payment method does not need to be set during order creation and it falls back to this method.

idintegerrequired

ID of the default payment method.

keystring

Key of the default payment method.

activeboolean

If set to false, the channel cannot be used during external order creation.

Default true

configsobject

A object containing a custom set of configs representing tenant configurations.

emailsEnabledboolean

State of the tenant config email.all.enabled for the channel and shopCountryId combination.

Default true

invoicesEnabledboolean

State of the tenant config invoiceGenerateDocument.enabled for the channel and shopCountryId combination.

Default true

externalPriceOverrideEnabledboolean

State of the tenant config externalOrder.priceOverride.enabled for the channel and shopCountryId combination.

Default false

json
{
  "key": "online-store-de",
  "type": [
    "marketplace",
    "in_store",
    "recurring_subscription"
  ],
  "name": "Online Store (Germany)",
  "shopCountryId": 5,
  "description": "Primary sales channel for all German marketplace orders.",
  "defaultPaymentMethod": {
    "id": 22,
    "key": "credit-card"
  },
  "active": true,
  "configs": {
    "emailsEnabled": true,
    "invoicesEnabled": true,
    "externalPriceOverrideEnabled": false
  }
}

Response

Returns 201 with an object. Read it in later steps with {{createANewOrderChannel.response.data.<field>}}.

idinteger

Numeric primary key generated during creation.

keystring

Slug short key to identify the channel. Not allowed to be modified after channel is used for an order.

typestring

Not allowed to be modified after channel is used for an order.

namestring

Custom name of the channel.

descriptionstring

Optional description about the channel in text format.

shopCountryobject
idinteger

The ID of the shop country created by SCAYLE.

shopKeystring

A key that uniquely identifies the shop within the tenant's ecosystem. Must be exactly 2 chars long.

countryCodestringrequired

ISO 3166 alpha 2 country code.

defaultLanguageCodestringrequired

ISO-3166 country code and ISO-639 language code.

supportedLanguageCodesarray<string>

List of supported language codes.

urlstringrequired

Url of the shop country.

activeboolean

Defines if the shop country is active.

deletedboolean

Defines if the shop country is deleted.

priceGroupKeystring

Key of the price group the shop country is assigned to.

currencyCodestring

The currency used in the shop country.

assortmentobject4 fields
warehousesarray<object>4 fields

A list of warehouses attached to the shop country.

priceRoundingsarray<object>4 fields

List of price rounding configurations.

smartSortingKeyoneOf

System smart sorting key or custom smart sorting key from the catalog.

customerSegmentOverridesarray<object>4 fields

Customer segment sorting overrides for this shop country. Returned on shop country reads when `with=customerSegmentOverrides` is set, and on shop reads when `with=countries.customerSegmentOverrides` is set. On write, omit the property to leave existing assignments unchanged, send an empty array to remove them, or send items to replace the full set. Each `customerSegmentId` and each `priority` must be unique. At most 30 overrides are accepted.

customDataany

Arbitrary fields assigned to Shop countries

defaultPaymentMethodobject

Optional default payment method. If set, the payment method does not need to be set during order creation and it falls back to this method.

idintegerrequired

ID of the default payment method.

keystring

Key of the default payment method.

activeboolean

If set to false, the channel cannot be used during external order creation.

Default true

isUsedInOrdersboolean

Shows if the channel is already used in orders.

configsobject

A object containing a custom set of configs representing tenant configurations.

emailsEnabledboolean

State of the tenant config email.all.enabled for the channel and shopCountryId combination.

Default true

invoicesEnabledboolean

State of the tenant config invoiceGenerateDocument.enabled for the channel and shopCountryId combination.

Default true

externalPriceOverrideEnabledboolean

State of the tenant config externalOrder.priceOverride.enabled for the channel and shopCountryId combination.

Default false

createdAtstring (date-time)

The date and time when the channel was created.

updatedAtstring (date-time)

The date and time when the channel was last updated.

json
{
  "id": 101,
  "key": "online-store-de",
  "type": [
    "marketplace",
    "in_store",
    "recurring_subscription"
  ],
  "name": "Online Store (Germany)",
  "description": "Primary sales channel for all German marketplace orders.",
  "shopCountry": {
    "countryCode": "DE",
    "defaultLanguageCode": "de_DE",
    "url": "https://www.example.com",
    "id": 1,
    "shopKey": "ay",
    "supportedLanguageCodes": [
      "de_DE"
    ],
    "active": true,
    "deleted": false,
    "priceGroupKey": "myPriceGroup",
    "currencyCode": "EUR",
    "assortment": {
      "masterCategories": {
        "include": [
          [
            [
              "Fashion",
              "Men",
              "Shirts"
            ]
          ]
        ],
        "exclude": [
          [
            [
              "Fashion",
              "Men",
              "Shirts"
            ]
          ]
        ]
      },
      "products": {
        "include": [
          0
        ],
        "exclude": [
          0
        ]
      },
      "attributes": [
        {
          "name": "string",
          "include": [
            "string"
          ],
          "exclude": [
            "string"
          ]
        }
      ],
      "merchantReferenceKeys": {
        "include": [
          "string"
        ],
        "exclude": [
          "string"
        ]
      }
    },
    "warehouses": [
      {
        "referenceKey": "my-warehouse",
        "id": 1,
        "priority": 100,
        "packageGroup": {
          "id": 1
        }
      }
    ]
  },
  "defaultPaymentMethod": {
    "id": 22,
    "key": "credit-card"
  },
  "active": true,
  "isUsedInOrders": true,
  "configs": {
    "emailsEnabled": true,
    "invoicesEnabled": true,
    "externalPriceOverrideEnabled": false
  },
  "createdAt": "2021-09-23T11%3A30%3A58%2B00%3A00",
  "updatedAt": "2021-09-23T11%3A30%3A58%2B00%3A00"
}

Need more? See the SCAYLE Admin guide for connection setup and behaviour shared by every action.