docs
  1. Resources
  2. Orders
  3. Create An Order

Create an order

v1.204.1
OpenAPI 3.0.3

This is the specification of the SCAYLE Admin API.

For more information about how to interact with the Admin API, you can read the respective developer guide. The developer guide includes code samples for our PHP SDK, for our Java SDK and for JavaScript and curl.

Authentication is done via X-Access-Token HTTP Header as described here.

Base url should be prefixed with /api/admin/v1.

If a client side timeout is deemed necessary, it is recommended to set it at a minimum of 380 seconds.

Server:https://{tenant-space}.admin.api.scayle.cloud/v1
Client Libraries

Orders

​

Create an order

​

This endpoint can be used to create an order. See more details in the Developer Guide.

Path Parameters

  • The shop key.

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

Body

required
application/json

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/shops/{shopKey}/countries/{countryCode}/orders
const order = {
  "id": 790,
  "address": {
    "billing": {
     "city": "Hamburg",
      "additional": "c/o AboutYou",
      "countryCode": "DEU",
      "houseNumber": "12",
      "isDefault": {
        "billing": false,
        "shipping": false
      },
      "recipient": {
        "firstName": "Anna",
        "gender": "m",
        "lastName": "Fohlmeister",
        "type": "personal"
      },
      "referenceKey": "InGidcPDmL8fGkv02a3sSAgAr7ySMBfa66iw4MriYgUNI3Boq369rBOZW3stlKLWSqIjB2dXCGNbCxoM5Xww4cI8cULUoGBFJHH0",
      "street": "Wolfgangsweg",
      "zipCode": "20459",
      "createdAt": "2018-11-29T05:20:13+00:00",
      "updatedAt": "2018-11-29T05:20:13+00:00"
    },
    "shipping": {
      "city": "Hamburg",
      "collectionPoint": {
        "customerKey": "bced-234-234",
        "description": "Pedro's Kiosk",
        "key": "12345-a",
        "type": "hermes_parcelshop"
      },
      "countryCode": "DEU",
      "houseNumber": "10",
      "isDefault": {
        "billing": false,
        "shipping": true
      },
      "recipient": {
        "firstName": "Anna",
        "gender": "m",
        "lastName": "Fohlmeister",
        "type": "personal"
      },
      "referenceKey": "InGidcPDmL8fGkv02a3sSAgAr7ySMBfa66iw4MriYgUNI3Boq369rBOZW3stlKLWSqIjB2dXCGNbCxoM5Xww4cI8cULUoGBFJHH0",
      "street": "Domstrasse",
      "zipCode": "20459",
      "createdAt": "2018-11-29T05:20:13+00:00",
      "updatedAt": "2018-11-29T05:20:13+00:00"
    }
  },
  "confirmedAt": "2018-01-20T11:30:15+00:00",
  "cost": {
    "appliedFees": [
      {
        "amount": {
          "withoutTax": 168,
          "withTax": 200
        },
        "category": "delivery",
        "option": "deliveryCosts",
        "tax": {
          "vat": {
            "amount": 32,
            "rate": 0.19
          }
        }
      },
      {
        "amount": {
          "withTax": 190,
          "withoutTax": 153
        },
        "category": "delivery",
        "key": "home_delivery_service_fee",
        "option": "homeDeliveryServiceFee",
        "tax": {
          "vat": {
            "amount": 37,
            "rate": 0.24
          }
        }
      }
    ],
    "appliedReductions": [
      {
        "amount": {
          "absoluteWithTax": 100,
          "relative": 0.5
        },
        "category": "voucher",
        "type": "absolute"
      }
    ],
    "withoutTax": 1168,
    "withTax": 1390
  },
  "currencyCode": "EUR",
  "legacyCustomData": {
    "score": {
      "generatedOn": "2018-05-20T19:45:15+00:00",
      "result": "green"
    }
  },
  "customer": {
    "referenceKey": "InGidcPDmL8fGkv02a3sSAgAr7ySMBfa66iw4MriYgUNI3Boq369rBOZW3stlKLWSqIjB2dXCGNbCxoM5Xww4cI8cULUoGBFJHH0"
  },
  "invoicedAt": "2018-01-22T11:30:15+00:00",
  "items": [
    {
      "availableQuantity": 20,
      "legacyCustomData": {
        "key": "value"
      },
      "deliveryForecast": {
        "subsequentDelivery": {
          "key": "christmas"
        }
      },
      "key": "ac834d23e689u678",
      "packageId": 1,
      "price": {
        "appliedReductions": [
          {
            "amount": {
              "absoluteWithTax": 100,
              "relative": 0.5
            },
            "category": "sale",
            "type": "relative",
            "isEffective": true
          }
        ],
        "reference": {
          "size": "100",
          "unit": "ml",
          "withTax": 595
        },
        "tax": {
          "vat": {
            "amount": 190,
            "rate": 0.19
          }
        },
        "withoutTax": 1000,
        "withTax": 1190
      },
      "product": {
        "id": 4564545,
        "images": [
          {
            "hash": "9f6c628a98106dcce2bc5a4ac1de9c14"
          }
        ],
        "name": "Chelsea Boots",
      },
      "reservationKey": "6nq69bzzkd5xufxliwg8",
      "status": "available",
      "variant": {
        "id": 1234567,
        "referenceKey": "563843898",
        "stock": {
          "supplierId": 1
        },
      },
      "warehouseId": 12345,
      "createdAt": "2018-01-20T09:30:15+00:00",
      "updatedAt": "2018-01-20T09:30:15+00:00"
    }
  ],
  "packages": [
    {
      "id": 1,
      "carrierKey": "dhl",
      "deliveryDate": {
        "maximum": "2018-02-05",
        "minimum": "2018-02-02"
      },
      "deliveryStatus": "open",
      "shipmentKey": "shpmnt-61-1"
    }
  ],
  "payment": [
    {
      "amount": 1190,
      "data": {
        "CCBrand": "VISA",
        "CCExpiry": "202005",
        "IPCity": "charlottenburg",
        "IPLatitude": "52.5151",
        "IPLongitude": "13.3053",
        "IPState": "berlin",
        "IPZone": "276",
        "IPZoneA2": "de"
      },
      "key": "accounting",
      "transactionKey": "creditcard-abcde"
    }
  ],
  "publicKey": "666",
  "referenceKey": "InGidcPDmL8fGkv02a3sSAgAr7ySMBfa66iw4MriYgUNI3Boq369rBOZW3stlKLWSqIjB2dXCGNbCxoM5Xww4cI8cULUoGBFJUU2",
  "shipping": {
    "policy": "least_packages"
  },
  "status": "invoice_completed",
  "voucher": {
    "applicableItems": [
      {
        "isApplied": true,
        "key": "a87ff679a2f3e71d9181a67b7542122c"
      },
      {
        "isApplied": false,
        "key": "eccbc87e4b5ce2fe28308fd9f2a7baf3"
      }
    ],
    "code": "fashion2020",
    "type": "absolute",
    "value": 1000
  },
  "createdAt": "2018-01-20T09:30:15+00:00",
  "updatedAt": "2018-01-20T09:30:15+00:00"
}

const response  = await client.apis.Orders.createOrder({
    shopKey: 'ms',
    countryCode: 'DE',
}, {
  requestBody: order,
});
const createdOrder = response.body;

{
  "address": {
    "billing": {
      "city": "Hamburg",
      "countryCode": "DEU",
      "id": 7353,
      "isDefault": {
        "billing": false,
        "shipping": false
      },
      "recipient": {
        "firstName": "Anna!",
        "gender": "m",
        "lastName": "Fohlmeister",
        "type": "personal"
      },
      "street": "test",
      "zipCode": "1200"
    },
    "forward": {
      "collectionPoint": {
        "type": "post_office"
      },
      "countryCode": "DEU"
    },
    "shipping": {
      "city": "Hamburg",
      "collectionPoint": {
        "customerKey": "bced-234-234",
        "description": "Pedros Kiosk",
        "key": "12345-a",
        "type": "hermes_parcelshop"
      },
      "countryCode": "DEU",
      "houseNumber": "10",
      "id": 7354,
      "isDefault": {
        "billing": false,
        "shipping": false
      },
      "recipient": {
        "firstName": "Anna!",
        "gender": "m",
        "lastName": "Fohlmeister",
        "type": "personal"
      },
      "referenceKey": "InGidcPDmL8fGkv02a3sSAgAr7ySMBfa66iw4MriYgUNI3Boq369rBOZW3stlKLWSqIjB2dXCGNbCxoM5Xww4cI8cULUoGBFJHH0",
      "street": "Domstrasse",
      "zipCode": "20459"
    }
  },
  "basketKey": "imported-basket",
  "confirmedAt": "2018-01-20T11:30:15+00:00",
  "contacts": [
    {
      "type": "carrier"
    }
  ],
  "cost": {
    "appliedFees": [
      {
        "amount": {
          "withTax": 200,
          "withoutTax": 168
        },
        "category": "delivery",
        "key": "least_packages",
        "option": "deliveryCosts",
        "tax": {
          "vat": {
            "amount": 32,
            "rate": 0.19
          }
        }
      },
      {
        "amount": {
          "withTax": 190,
          "withoutTax": 153
        },
        "category": "delivery",
        "key": "home_delivery_service_fee",
        "option": "homeDeliveryServiceFee",
        "tax": {
          "vat": {
            "amount": 37,
            "rate": 0.24
          }
        }
      }
    ],
    "costCapture": 1390,
    "tax": {
      "vat": {
        "amount": 222
      }
    },
    "withTax": 1390,
    "withTaxWithMembershipDiscountWithoutServiceCosts": 1190,
    "withoutTax": 1168,
    "withoutTaxWithMembershipDiscount": 1168
  },
  "createdAt": "2018-01-20T09:30:15+00:00",
  "currencyCode": "EUR",
  "legacyCustomData": {
    "key": "value",
    "origin": "data-importer"
  },
  "customer": {
    "createdAt": "2021-11-29T16:39:02+00:00",
    "email": "[email protected]",
    "firstName": "Sylvia",
    "gender": "m",
    "groups": [
      "new",
      "initial-data"
    ],
    "id": 1,
    "lastName": "McCullough",
    "publicKey": "customer-a5666d13bcadd56342da3644681e96c0",
    "referenceKey": "InGidcPDmL8fGkv02a3sSAgAr7ySMBfa66iw4MriYgUNI3Boq369rBOZW3stlKLWSqIjB2dXCGNbCxoM5Xww4cI8cULUoGBFJHH0",
    "status": {
      "isActive": true,
      "isGuestCustomer": false
    },
    "title": "Dr.",
    "type": "personal",
    "updatedAt": "2021-12-03T10:58:37+00:00"
  },
  "detailedStatus": {
    "billing": {
      "code": "billing_payment_pending",
      "name": "Zahlung reserviert"
    },
    "order": {
      "code": "order_delegated",
      "name": "Delegated"
    },
    "shipping": {
      "code": "shipping_delivered",
      "name": "Ware versendet"
    }
  },
  "id": 901,
  "items": [
    {
      "createdAt": "2018-01-20T09:30:15+00:00",
      "currency": "EUR",
      "legacyCustomData": {
        "key": "value"
      },
      "id": 10976510,
      "key": "e3f0643cd35403f954828e745797260b",
      "merchant": {
        "referenceKey": "m1"
      },
      "packageId": 45,
      "price": {
        "overrideWithTax": 0,
        "overrideWithoutTax": 0,
        "tax": {
          "vat": {
            "amount": 190,
            "rate": 0.19
          }
        },
        "undiscountedWithOutTax": 1000,
        "undiscountedWithTax": 1190,
        "withTax": 1190,
        "withoutTax": 1000
      },
      "product": {
        "id": 4564545
      },
      "status": "delivered",
      "variant": {
        "id": 1234567,
        "referenceKey": "563843898",
        "stock": {
          "supplierId": 1
        }
      },
      "delegatedAt": "2018-01-20T09:40:15+00:00",
      "shippedAt": "2018-01-21T09:30:15+00:00"
    }
  ],
  "packages": [
    {
      "deliveryDate": {
        "maximum": "2018-02-05",
        "minimum": "2018-02-05"
      },
      "deliveryStatus": "shipment_completed",
      "id": 45,
      "shipmentKey": "shpmnt-61-1",
      "tracking": {
        "id": "shpmnt-61-1"
      },
      "shippedAt": "2018-01-21T09:30:15+00:00"
    }
  ],
  "payment": [
    {
      "amount": 1190,
      "data": {
        "CCBrand": "VISA",
        "CCExpiry": "202005",
        "IPCity": "charlottenburg",
        "IPLatitude": "52.5151",
        "IPLongitude": "13.3053",
        "IPState": "berlin",
        "IPZone": "276",
        "IPZoneA2": "de"
      },
      "key": "accounting",
      "transactionKey": "creditcard-abcde"
    }
  ],
  "publicKey": "666",
  "referenceKey": "InGidcPDmL8fGkv02a3sSAgAr7ySMBfa66iw4MriYgUNI3Boq369rBOZW3stlKLWSqIjB2dXCGNbCxoM5Xww4cI8cULUoGBFJU2",
  "shipping": {
    "carrierGroup": "dhl",
    "deliveryCosts": 200,
    "expressDeliveryCosts": 0,
    "policy": "least_packages"
  },
  "status": "payment_reserved",
  "updatedAt": "2018-01-20T09:30:15+00:00",
  "vouchers": [
    {
      "applicableItems": [
        {
          "isApplied": false,
          "key": "e3f0643cd35403f954828e745797260b"
        }
      ],
      "code": "fashion2020",
      "id": 346,
      "type": "relative",
      "value": 1000,
      "voucherId": 0
    }
  ],
  "shopCountry": {
    "id": 5502,
    "shopKey": "msde",
    "countryCode": "DE",
    "defaultLanguageCode": "en_GB",
    "supportedLanguageCodes": [],
    "priceGroupKey": null,
    "url": "www.example.com",
    "active": true,
    "currencyCode": null,
    "deleted": false
  },
  "channel": {
    "id": 123,
    "key": "channel-key",
    "name": "Channel name",
    "type": "marketplace"
  }
}

Models

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​

Last updated: December 02, 2026