younifyd
Menu

Create an Order

Create an Order

POST/v1/orders

Use it in a workflow

  1. Add a step and choose the SCAYLE Storefront 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

Query parameters

shopIdinteger

The numeric ID of the shop to resolve the request against. Every shop in a multi-shop setup has a unique `shopId`. **Priority:** `shopId` (or the `X-Shop-Id` header) takes precedence over all other shop identification parameters. When `shopId` is present, `shopKey`, `countryCode`, and `locale` are ignored entirely. **Alternative:** If neither `shopId` nor `X-Shop-Id` is provided, you must supply all three of `shopKey`, `countryCode`, and `locale` together to identify the shop.

shopKeystring

The unique string key identifying the shop (e.g. `sa`, `de`). **Must be provided together with `countryCode` and `locale`** as a query-parameter alternative to `shopId`. All three parameters are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `shopId` or the `X-Shop-Id` header is present.

countryCodestring

The ISO 3166-1 alpha-2 country code of the shop (e.g. `DE`, `AT`). Automatically normalised to uppercase. **Must be provided together with `shopKey` and `locale`** as a query-parameter alternative to `shopId`. All three parameters are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `shopId` or the `X-Shop-Id` header is present.

localestring

The locale of the shop (e.g. `en_GB`, `de_DE`). Used to validate that the resolved shop's locale matches the requested locale. **Must be provided together with `shopKey` and `countryCode`** as a query-parameter alternative to `shopId`. All three parameters are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `shopId` or the `X-Shop-Id` header is present.

Headers

X-Shop-Idinteger

The numeric ID of the shop to resolve the request against. Every shop in a multi-shop setup has a unique shop ID. **Priority:** `X-Shop-Id` (or the `shopId` query parameter) takes precedence over all other shop identification parameters. When this header is present, `X-Shop-Key`, `X-Country-Code`, and `X-Locale` are ignored entirely. **Alternative:** If neither `X-Shop-Id` nor `shopId` is provided, you must supply all three of `X-Shop-Key`, `X-Country-Code`, and `X-Locale` together to identify the shop.

Default null

X-Shop-Keystring

The unique string key identifying the shop (e.g. `sa`, `de`). **Must be provided together with `X-Country-Code` and `X-Locale`** as a header-based alternative to `X-Shop-Id`. All three headers are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `X-Shop-Id` or the `shopId` query parameter is present.

X-Country-Codestring

The ISO 3166-1 alpha-2 country code of the shop (e.g. `DE`, `AT`). Automatically normalised to uppercase. **Must be provided together with `X-Shop-Key` and `X-Locale`** as a header-based alternative to `X-Shop-Id`. All three headers are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `X-Shop-Id` or the `shopId` query parameter is present.

X-Localestring

The locale of the shop (e.g. `en_GB`, `de_DE`). Used to validate that the resolved shop's locale matches the requested locale. **Must be provided together with `X-Shop-Key` and `X-Country-Code`** as a header-based alternative to `X-Shop-Id`. All three headers are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `X-Shop-Id` or the `shopId` query parameter is present.

Request body

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

addressobjectrequired
billingobject14 fields
shippinganyrequired
applicationobjectrequired
idintegerrequired

Unique identifier of the application making the request.

checkoutstring

Identifier for the checkout process used.

devicestring

Type of device used to place the order.

One ofmobiledesktopapptablet

itemsarray<object>required
variantIdintegerrequired

Unique identifier of the product variant.

categoryNamestring

Name of the product category.

customDataobject

Custom data attached to the order item.

initialobject5 fields
itemGroupobject3 fields
promotionobject2 fields
priceobject2 fields
channeloneOfrequired

Channel reference is required. Either `id` or `key` must be provided. If no channel can be found, the API responds with HTTP 404.

customerobject

Customer information for the individual placing the order.

idinteger

Unique numeric ID of the customer.

referenceKeystring

External reference key for the customer (alphanumeric, dashes, underscores, dots, and @ allowed).

firstNamestring

First name of the customer. Supports letters, numbers, and basic symbols.

lastNamestringrequired

Last name of the customer. Required field.

genderstring

Gender code of the customer.

One offmdn

birthDatestring (date)

Customer's birth date in `YYYY-MM-DD` format. Valid years: 1900–2099.

emailstring (email)

Customer's email address. Must be a valid email format.

phonestring

International phone number starting with '00' followed by country code and slash (e.g., 0049/12345678).

publicKeystring

Public identifier or reference for secure communication.

titlestring

Customer's title (e.g., "Mr", "Dr", "Prof").

typestring

Type of customer profile.

One ofpersonalretailorganizationfamily

groupsarray<string>

Optional list of group identifiers. Each group must be an alphanumeric slug (with dashes or underscores).

identitiesarray<object>2 fields

External identity references for the customer.

statusobject2 fields

Customer status indicators.

customDataobject

Arbitrary custom fields for the customer. Flexible structure.

createdAtstring (date-time)

Timestamp of when the customer was created (ISO 8601 format).

paymentTypesarray<object>required
authorizedValueintegerrequired

The value authorized for this payment type.

confirmationDataobject28 fields

The `confirmationData` attribute will contain the data pushed to the Checkout by the Payment Provider in use (or internally generated, should the payment not be provided by an external PSP). This object's structure depends on the PSP itself, however, it will contain the minimum dataset necessary for further processing of the Order.

primaryPaymentMerchantKeystring

Key for the primary payment merchant.

transactionIdstringrequired

Unique transaction ID for this payment.

typestringrequired

Type of payment (e.g., 'credit_card', 'paypal', 'invoice').

costobjectrequired
withTaxintegerrequired

Total order amount with tax (gross) including all applied costs.

withTaxWithoutServiceCostsinteger

Total order amount with tax (gross) excluding service costs and order-level fees.

withoutTaxinteger

Total order amount without tax (net) including all applied costs.

taxobject1 fields
itemGroupsobject
appliedFeesarray<object>4 fields

Additional order-level fees (e.g., shipping or payment). These are external costs applied to the whole order, not to individual items. These values will be persisted in the order as external applied fees.

additionalMetaDataobject

Additional metadata related to the order.

carrierobject
carrierKeystringrequired

Unique key for the shipping carrier.

deliveryDatesobject2 fields
shippingPolicyKeystringrequired

Key for the applied shipping policy.

customDataobject

Custom data attached to the order.

ipAddressstring (ipv4)

IP address of the customer at the time of order creation.

membershipCardobject
numberstringrequired

The membership card number.

typestringrequired

The type of membership card.

referenceKeystring

External reference set by the client to integrate a 3rd party system.

subscriptionIdstring

Identifier for a subscription if the order is part of one.

userAgentstring

User agent string of the client.

voucherobject
codestringrequired

The voucher code to be applied.

json
{
  "address": {
    "shipping": null,
    "billing": {
      "city": "string",
      "countryCode": "string",
      "firstName": "string",
      "gender": "m",
      "houseNumber": "string",
      "lastName": "string",
      "street": "string",
      "additional": "string",
      "forwardToCollectionPoint": false,
      "parcelShop": {
        "id": "string",
        "description": "string",
        "type": "string",
        "customerId": "string",
        "delegationId": "string"
      },
      "phone": "string",
      "state": "string"
    }
  },
  "application": {
    "id": 0,
    "checkout": "string",
    "device": "mobile"
  },
  "items": [
    {
      "variantId": 0,
      "categoryName": "string",
      "customData": {},
      "initial": {
        "merchantId": 0,
        "merchantVariantId": "string",
        "quantity": 0,
        "size": "string",
        "unitCost": 0
      },
      "itemGroup": {
        "id": "string",
        "isMainItem": false,
        "isRequired": false
      },
      "promotion": {
        "id": "string",
        "code": "string"
      },
      "price": {
        "withTax": 0,
        "tax": {
          "vat": {
            "rate": 0
          }
        }
      }
    }
  ],
  "channel": null,
  "paymentTypes": [
    {
      "authorizedValue": 0,
      "transactionId": "string",
      "type": "string",
      "confirmationData": {
        "amount": 0,
        "api_version": "string",
        "authorization_id": "string",
        "authorized_date": "string",
        "charge_permission_id": "string",
        "checkoutId": "string",
        "creditCardBrand": "string",
        "descriptor": "string",
        "expirationDate": "string",
        "giftCardCode": "string",
        "giftCardPin": "string",
        "isRegularCustomer": false
      },
      "primaryPaymentMerchantKey": "string"
    }
  ],
  "cost": {
    "withTax": 0,
    "withTaxWithoutServiceCosts": 0,
    "withoutTax": 0,
    "tax": {
      "vat": {
        "amount": 0
      }
    },
    "itemGroups": {},
    "appliedFees": [
      {
        "amount": {
          "withTax": 0,
          "withoutTax": 0
        },
        "tax": {
          "vat": {
            "amount": 0,
            "rate": 0
          }
        },
        "category": "string",
        "key": "string"
      }
    ]
  },
  "customer": {
    "lastName": "string",
    "id": 0,
    "referenceKey": "string",
    "firstName": "string",
    "gender": "f",
    "birthDate": "2025-01-01",
    "email": "name@example.com",
    "phone": "string",
    "publicKey": "string",
    "title": "string",
    "type": "personal",
    "groups": [
      "string"
    ]
  },
  "additionalMetaData": {},
  "carrier": {
    "carrierKey": "string",
    "shippingPolicyKey": "string",
    "deliveryDates": {
      "maximum": "2025-01-01",
      "minimum": "2025-01-01"
    }
  },
  "customData": {},
  "ipAddress": "string",
  "membershipCard": {
    "number": "string",
    "type": "string"
  }
}

Response

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

idinteger

This `id` can be applied as a parameter on the url to retrieve an individual order in the [Fetch Order by ID](#fetch-order-by-id) endpoint.

addressobject
billingobjectrequired18 fields
forwardobject18 fields
shippingobjectrequired18 fields
basketKeystring

Reference to the basket attached to this order.

campaignKeystring

Reference to the campaign applied to this order.

channelobject

Channel information if the order is associated with a channel.

idintegerrequired

Internal channel unique identifier.

keystringrequired

Unique channel key.

namestringrequired

Name of the channel.

typestringrequired

Type of the channel.

One ofmarketplacein_storerecurring_subscription

confirmedAtstring (date-time)
contactsarray<object>
typestring
valuestring
costobject

Order-level cost details including totals, taxes, fees, reductions, and item group breakdowns.

appliedFeesarray<object>5 fields

Order-level applied fees such as payment or delivery costs.

appliedReductionsarray<object>5 fields

Order-level applied reductions such as vouchers or promotions.

costCaptureinteger

Captured cost amount if applicable.

taxobjectrequired1 fields
withoutTaxintegerrequired

Total order amount excluding taxes (net).

withoutTaxWithMembershipDiscountinteger

Order net amount after membership discounts.

withTaxintegerrequired

Total order amount including all taxes and applied costs (gross).

withTaxWithMembershipDiscountWithoutServiceCostsintegerrequired

Order gross amount after membership discounts, excluding service costs.

hasExternalPricesbooleanrequired

Indicates if external prices were provided for this order.

itemGroupsobject

Order-level item group totals keyed by item group id.

currencyCodestring

The three character [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code that identifies the currency.

customDataobject
scoreobject | string | integer | number | array | boolean
customerobject
idintegerrequired
anonymisationobject1 fields
authenticationobject2 fields
birthDatestring
customDataobject1 fields

Additional data attached by the client to enhance the customer.

emailstring (email)
firstNamestring
genderstring

One ofmfdn

groupsarray<string>
identitiesarray<object>2 fields
ipAddressstring (ipv4)
lastNamestringrequired
phonestring
publicKeystring

Public reference set by the client to display to customers.

referenceKeystring

External reference set by the client to integrate a 3rd party system.

statusobjectrequired4 fields
titlestring
typestringrequired

One ofpersonalretailorganizationfamily

userAgentstring
createdAtstring (date-time)required
updatedAtstring (date-time)required
detailedStatusobject
billingobjectrequired2 fields
orderobjectrequired2 fields
shippingobjectrequired2 fields
invoicedAtstring (date-time)
itemsarray<object>
idinteger
availableQuantityinteger

The number of deliverable items available for immediate shipping.

basketItemKeystring
campaignKeystring

Reference to the campaign applied to this order item.

currencystring

The three character [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code.

customDataobject

Custom data attached to an item.

deliveryForecastobject2 fields

When an item cannot be shipped within the regular delivery timeframe.

isManuallyReturnedByCciboolean

Whether the return shipment got triggered manually.

itemGrouponeOf

Item group information for configurable products (null for the others).

keystringrequired
lowestPriorPriceoneOf

The lowest price in the last 30 days.

merchantobject1 fields

The merchant ID to which the item belongs.

packageIdinteger

Items are grouped by package.

priceobjectrequired9 fields

The price is provided in a currency's lowest denomination (e.g. cent for EUR).

productobjectrequired
promotionobject5 fields

Item promotion information

reservationKeystring

Reference set in the checkout when an item was reserved successfully.

statusstringrequired

One ofavailablecancelleddeliveredreturnedunavailableundeliverable

variantobjectrequired
warehouseIdinteger

The warehouse ID where the item is being picked from.

warehousePackageGroupIdinteger

The package identification inside of the warehouse.

createdAtstring (date-time)required
updatedAtstring (date-time)required
loyaltyCardobject
cardNumberstring
pointsintegerrequired
providerstringrequired
membershipDiscountobject
membershipCardIdinteger
pointsUsedinteger
reductionValueinteger
taxinteger
packagesarray<object>

The distribution of items across packages is calculated based on the supplierId.

idintegerrequired

Basket and order items are matched to a package by cross-referencing the `item[].packageId`.

carrierKeystringrequired
deliveryDateobjectrequired2 fields
deliveryStatusstringrequired

One ofopenshipment_pendingdelegation_pendingshipment_completedcancellation_completed

hasExpectedAvailabilityAtboolean
returnIdentCodestring
shipmentKeystring
trackingobject2 fields
paymentarray<object>
amountinteger
dataobject

The `data` attribute will contain the data pushed to the Checkout by the Payment Provider.

installmentarray<object>2 fields

Details about installments.

isGiftCardboolean
keystring
optionsobject2 fields
transactionKeystring
promotionsarray<object>
idstring
codestring
displayNamestring
reductioninteger
versionstring
publicKeystring

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

referenceKeystring

External reference set by the client to integrate a 3rd party system.

shippingobject
deliveredOnstring
deliveryCostsinteger
expressDeliveryCostsinteger
policystringrequired
shopobject
idintegerrequired
countrystringrequired

Three letter country code of the shop.

languagestringrequired

Two letter language code of the shop.

statusstring

One oforder_openpayment_pendingpayment_reservedinvoice_completedcancellation_pendingcancellation_completedinvoice_partially_completed

vouchersarray<object>
idintegerrequired
applicableItemsarray<object>2 fields
codestringrequired
typestringrequired

One ofabsoluterelative

valuenumberrequired
voucherIdintegerrequired
createdAtstring (date-time)
updatedAtstring (date-time)
json
{
  "id": 0,
  "basketKey": "string",
  "cost": {
    "tax": {
      "vat": {
        "amount": 0
      }
    },
    "withoutTax": 0,
    "withTax": 0,
    "withTaxWithMembershipDiscountWithoutServiceCosts": 0,
    "hasExternalPrices": false,
    "appliedFees": [
      {
        "amount": {
          "withoutTax": 0,
          "withTax": 0
        },
        "category": "payment",
        "key": "string",
        "option": "string",
        "tax": {
          "vat": {
            "amount": 0,
            "rate": 0
          }
        }
      }
    ],
    "appliedReductions": [
      {
        "amount": {
          "absoluteWithTax": 0,
          "relative": 0
        },
        "category": "voucher",
        "type": "absolute",
        "code": "string",
        "displayName": "string"
      }
    ],
    "costCapture": 0,
    "withoutTaxWithMembershipDiscount": 0,
    "itemGroups": {}
  },
  "currencyCode": "string",
  "detailedStatus": {
    "billing": {
      "code": "string",
      "name": "string"
    },
    "order": {
      "code": "string",
      "name": "string"
    },
    "shipping": {
      "code": "string",
      "name": "string"
    }
  },
  "status": "order_open",
  "createdAt": "2025-01-01T00:00:00Z",
  "updatedAt": "2025-01-01T00:00:00Z",
  "address": {
    "billing": {
      "id": 0,
      "city": "string",
      "countryCode": "string",
      "isDefault": {
        "billing": false,
        "shipping": false
      },
      "recipient": {
        "lastName": "string",
        "type": "personal",
        "firstName": "string",
        "gender": "m",
        "title": "string"
      },
      "street": "string",
      "zipCode": "string",
      "createdAt": "2025-01-01T00:00:00Z",
      "updatedAt": "2025-01-01T00:00:00Z",
      "additional": "string",
      "appId": 0,
      "collectionPoint": {
        "key": "string",
        "type": null,
        "customerKey": "string",
        "description": "string"
      }
    },
    "shipping": {
      "id": 0,
      "city": "string",
      "countryCode": "string",
      "isDefault": {
        "billing": false,
        "shipping": false
      },
      "recipient": {
        "lastName": "string",
        "type": "personal",
        "firstName": "string",
        "gender": "m",
        "title": "string"
      },
      "street": "string",
      "zipCode": "string",
      "createdAt": "2025-01-01T00:00:00Z",
      "updatedAt": "2025-01-01T00:00:00Z",
      "additional": "string",
      "appId": 0,
      "collectionPoint": {
        "key": "string",
        "type": null,
        "customerKey": "string",
        "description": "string"
      }
    },
    "forward": {
      "id": 0,
      "city": "string",
      "countryCode": "string",
      "isDefault": {
        "billing": false,
        "shipping": false
      },
      "recipient": {
        "lastName": "string",
        "type": "personal",
        "firstName": "string",
        "gender": "m",
        "title": "string"
      },
      "street": "string",
      "zipCode": "string",
      "createdAt": "2025-01-01T00:00:00Z",
      "updatedAt": "2025-01-01T00:00:00Z",
      "additional": "string",
      "appId": 0,
      "collectionPoint": {
        "key": "string",
        "type": null,
        "customerKey": "string",
        "description": "string"
      }
    }
  },
  "campaignKey": "string",
  "channel": {
    "id": 0,
    "key": "string",
    "name": "string",
    "type": "marketplace"
  },
  "confirmedAt": "2025-01-01T00:00:00Z"
}

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