younifyd
Menu

Create an order

Create an order

POST/shops/{shopKey}/countries/{countryCode}/orders

Use it in a workflow

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

Request

Path parameters

shopKeystringrequired

The shop key.

countryCodestringrequired

The shop country code; use shop country ID instead of country code when a country is ambiguous within a shop.

Response

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

idinteger

The ID of the order created

addressobject
billinganyrequired
forwardobject15 fields
shippinganyrequired
basketKeystring

A key that uniquely identifies customer's cart

campaignKeystring

Reference to the campaign applied to this order

confirmedAtstring (date-time)

Timestamp when the order was confirmed

contactsarray<object>

Collection of contacts

typestringrequired
valuestring
costobject
appliedFeesarray<object>7 fields
appliedReductionsarray<object>6 fields

If the order has an external price, this field will not be included in the response payload.

taxobject1 fields
withTaxinteger

The price is calculated including taxes and all applicable reductions such as discounts for sale and campaigns (should a campaign key be provdided on the request).

withoutTaxinteger

This price excludes taxes, but also includes all applicable reductions. If the order has an external price, this field becomes optional.

withTaxWithMembershipDiscountWithoutServiceCostsinteger

The price is calculated including taxes and all applicable reductions such as discounts for sale and campaigns (should a campaign key be provdided on the request), and membership discount.

withoutTaxWithMembershipDiscountinteger

This price excludes taxes, but also includes all applicable reductions and membership discount. If the order has an external price, this field will not be included in the response payload.

costCaptureinteger

The exact cost captured: order total value - giftcard value - total membership discount

itemGroupsany
hasExternalPricesboolean

Indicates whether the order contains external prices.

Default false

currencyCodestring

ISO 4217 currency code

customerobject
idinteger

The ID of the customer

referenceKeystring

External reference set by the client to integrate a third party system. It can be set to NULL otherwise

firstNamestring

First name of the customer

lastNamestring

Last name of the customer

genderstring

Gender of the customer mentioned as per defined ENUM as "m" , "f", "d", "n"

One offmdn

birthDatestring

Date of birth of the customer in YYYY-MM-DD format. It can be set to NULL otherwise

emailstring

email address of the customer

phoneoneOf
publicKeystring

Public reference set by the client to display to customers in account areas and transactional emails.

titlestring

User defined title. It can be set to NULL otherwise

typestring

The type of the customer. Possible values: personal, retail, organization, family.

groupsarray<string>

Group to which the customer belongs to

identitiesarray<object>2 fields

A list of Identity Providers (IDP)

statusobject2 fields
companyobject2 fields
addressesarray<object>15 fields

Customers address (es)

legacyCustomDataany

Custom data added to the customers (legacy feature)

hasPasswordboolean

Defines if the customer has a password set.

createdAtstring (date-time)

Timestamp when the customer is created

updatedAtstring (date-time)

Timestamp when the customer is updated

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

invoicedAtstring (date-time)

Timestamp when the invoice is sent

createdAtstring (date-time)

Timestamp when the order is created

updatedAtstring (date-time)

Timestamp when the order is updated

itemsarray<object>

Collection of items ordered

idinteger
availableQuantityinteger
basketItemKeystring
currencystring

The three character [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code that identifies the currency. The currency is defined on the configuration of the shop, and can be modified in the cloud panel.

deliveryForecastobject2 fields
legacyCustomDataany

Custom data added to the order item (legacy feature)

packageIdintegerrequired
priceobjectrequired10 fields
lowestPriorPriceobject2 fields

The lowest price in the last 30 days.

productobjectrequired3 fields
promotionobject5 fields
promotionsarray<object>5 fields

Order item promotions

keystring
reservationKeystring
statusstringrequired

Possible values: available, unavailable, deliverable, undeliverable, cancelled, returned.

variantobjectrequired3 fields
warehouseIdinteger
itemGroupobject3 fields
campaignKeystring

Reference to the campaign applied to this order

merchantobject2 fields
merchantAdditionalDataobject

Bundle product information

createdAtstring (date-time)

Timestamp when the order item is created

updatedAtstring (date-time)

Timestamp when the order item is updated

delegatedAtstring (date-time)

Timestamp when the order item was successfully delegated, in Iso8601 format.

shippedAtstring (date-time)

Timestamp when the order item was shipped, in Iso8601 format.

cancelledAtstring (date-time)

Timestamp when the order item was canceled, in Iso8601 format.

returnedAtstring (date-time)

Timestamp when the order item was returned by the customer and recorded in the system, in Iso8601 format.

legacyCustomDataobject

Custom data added to the order (legacy feature)

membershipDiscountobject
membershipCardIdinteger
pointsUsedinteger
reductionValueinteger
taxinteger
packagesarray<object>

Details for the package(s) part of the order

idintegerrequired
shipmentKeystring
carrierKeystring
deliveryDateobject3 fields
deliveryStatusstring
shippedAtstring (date-time)

Timestamp when the order item was shipped, in Iso8601 format.

trackingobject2 fields
returnIdentCodestring
paymentarray<object>

Payment details

amountinteger
dataobject
keystring
transactionKeystring
installmentarray<object>2 fields

Details about installments, included as a listing of the values involved in the Installments transaction.

optionsobject2 fields
isGiftCardboolean
promotionarray<object>

Order promotions

idstring
codestring
displayNamestring
reductionstring
versionstring
publicKeystring

Public reference set by the client to display to customers in account areas and transactional emails.

referenceKeystring

External order reference set by the client to integrate a third party system.

shippingobject
policystring
carrierGroupstring

Carrier group selected for this order, e.g. `dhl`. Send this value back as `carrier.carrierGroup` when creating a follow-up order. This is a carrier group, not a carrier code. `packages[].carrierKey` is the carrier shipping a package and must not be replayed here. Absent when the order has no carrier group recorded.

deliveredOnstring
deliveryCostsinteger

If the order has an external price, this field will not be included in the response payload.

expressDeliveryCostsinteger

If the order has an external price, this field will not be included in the response payload.

statusstring

Status of the order, e.g. invoice_completed

One oforder_openpayment_pendingpayment_reservedinvoice_completedcancellation_pendingcancellation_completedinvoice_partially_completed

detailedStatusobject
orderanyrequired
shippinganyrequired
billinganyrequired
vouchersarray<object>

Applicable voucher and its details

idinteger
voucherIdinteger
applicableItemsarray<object>2 fields
codestringrequired
typestring

One ofabsoluterelative

valueintegerrequired
voucherobject
idinteger
voucherIdinteger
applicableItemsarray<object>2 fields
codestringrequired
typestring

One ofabsoluterelative

valueintegerrequired
loyaltyCardobject
cardNumberstring

The loyalty card number

pointsintegerrequired

The number of points received for the purchase

providerstringrequired

The provider of the loyalty card

channelobject
idinteger

Internal channel unique id

keystring

Channel unique key

namestring

Channel name

typestring

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

json
{
  "cost": {
    "appliedFees": [
      {
        "amount": {
          "withoutTax": 0,
          "withTax": 0
        },
        "category": "string",
        "key": "string",
        "option": "string",
        "tax": {
          "vat": {
            "amount": {},
            "rate": {}
          }
        },
        "invoiceTriggered": false,
        "refundTriggered": false
      }
    ],
    "appliedReductions": [
      {
        "id": "string",
        "amount": {
          "absoluteWithTax": 0,
          "relative": 0
        },
        "category": "string",
        "type": "string",
        "code": "string",
        "displayName": "string"
      }
    ],
    "tax": {
      "vat": {
        "amount": {},
        "rate": {}
      }
    },
    "withTax": 0,
    "withoutTax": 0,
    "withTaxWithMembershipDiscountWithoutServiceCosts": 0,
    "withoutTaxWithMembershipDiscount": 0,
    "costCapture": 0,
    "itemGroups": null,
    "hasExternalPrices": false
  },
  "currencyCode": "string",
  "id": 0,
  "address": {
    "billing": null,
    "shipping": null,
    "forward": {
      "id": 0,
      "referenceKey": "my-key",
      "street": "Domstraße",
      "houseNumber": "string",
      "additional": "string",
      "zipCode": "string",
      "city": "string",
      "countryCode": "string",
      "collectionPoint": {
        "customerKey": "string",
        "description": "string",
        "key": "string",
        "type": "string"
      },
      "isDefault": {
        "billing": false,
        "shipping": false
      },
      "recipient": {
        "firstName": "string",
        "lastName": "string",
        "gender": "f",
        "title": "string",
        "type": "personal"
      },
      "phone": null
    }
  },
  "basketKey": "string",
  "campaignKey": "string",
  "confirmedAt": "2021-09-23T11%3A30%3A58%2B00%3A00",
  "contacts": [
    {
      "type": "string",
      "value": "string"
    }
  ],
  "customer": {
    "id": 0,
    "referenceKey": "string",
    "firstName": "string",
    "lastName": "string",
    "gender": "f",
    "birthDate": "string",
    "email": "string",
    "phone": null,
    "publicKey": "string",
    "title": "string",
    "type": "string",
    "groups": [
      "string"
    ]
  },
  "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
        }
      }
    ]
  },
  "invoicedAt": "2021-09-23T11%3A30%3A58%2B00%3A00",
  "createdAt": "2021-09-23T11%3A30%3A58%2B00%3A00"
}

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