Menu
Create a subscription order
Create a subscription order
POST
/shops/{shopKey}/countries/{countryCode}/orders/subscription-ordersUse it in a workflow
- Add a step and choose the SCAYLE Admin connector.
- Pick the Create a subscription order action (under Orders).
- Fill in the fields below, then reference the result from later steps as
{{createASubscriptionOrder.response.data}}.
Request
Path parameters
Request body
Enter the body as JSON in the step's Body field.
{
"address": {
"shipping": {
"city": "string",
"countryCode": "string",
"firstName": "string",
"gender": "f",
"houseNumber": "string",
"lastName": "string",
"street": "string",
"additional": "string",
"forwardToCollectionPoint": false,
"phone": null,
"state": "string",
"title": "string"
},
"billing": {
"city": "string",
"countryCode": "string",
"firstName": "string",
"gender": "f",
"houseNumber": "string",
"lastName": "string",
"street": "string",
"additional": "string",
"forwardToCollectionPoint": false,
"phone": null,
"state": "string",
"title": "string"
}
},
"customerId": 0,
"items": [
{
"variantId": 0,
"additionalData": {},
"categoryName": "string",
"initial": {
"merchantId": 0,
"merchantVariantId": "string",
"quantity": 0,
"size": "string",
"unitCost": 0
},
"itemGroup": {
"id": "ab123",
"isMainItem": true,
"isRequired": true
},
"promotion": {
"id": "string",
"code": "string"
}
}
],
"paymentTypes": [
{
"authorizedValue": 0,
"confirmationData": {
"subscriptionPaymentReference": "string",
"amount": 0,
"apiVersion": "string",
"authorizationId": "string",
"authorizedDate": "string",
"chargePermissionId": "string",
"checkoutId": "string",
"creditCardBrand": "string",
"descriptor": "string",
"expirationDate": "string",
"giftCardCode": "string",
"giftCardPin": "string"
},
"transactionId": "string",
"type": "string",
"primaryPaymentMerchantKey": "string"
}
],
"subscriptionId": "string",
"additionalMetaData": {},
"application": {
"checkout": "string",
"device": "mobile"
},
"legacyCustomData": {},
"ipAddress": "string",
"membershipCard": {
"number": "string",
"type": "string"
},
"userAgent": "string",
"voucher": {
"code": "string"
}
}
Response
Returns 201 with an object. Read it in later steps with {{createASubscriptionOrder.response.data.<field>}}.
{
"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.
Was this page helpful?