Type | Description | Format |
---|---|---|
CustomerId required string | ID of the customer. |
Minimum length: 1
Maximum length: 100
Pattern: ^[A-Za-z0-9\-]{1,100}$
|
Website required object | A website. |
Type | Description |
---|---|
Website object | A personalized website. |
curl -X POST https://api.stack.promo/v1/website/skus/personalize \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic <credentials>'
-d '{
"customerId": "5d3659629e8c412da5eeef1b28cca0fc",
"website" : {
"currencyCode" : "AUD",
"items": [
{
"sku": "sku-736516",
"unitAmount" : 40.0
},
{
"sku": "sku-4058977",
"unitAmount" : 35.7
},
{
"sku": "sku-405899",
"unitAmount" : 20.95
}
]
}
}'
{
"website": {
"currencyCode": "AUD",
"items": [
{
"sku": "sku-736516",
"unitAmount": 40.0,
"promotion": {
"id": "b111beedc07e472c902fcb8764df3fea",
"description": "$10 off",
"memo": "Cash applied to this order.",
"promotionAmountType": "Cash",
"promotionAmount": -10.0,
"amountWithPromotion": 30.0
}
},
{
"sku": "sku-4058977",
"unitAmount": 35.7,
"promotion": {
"id": "b111beedc07e472c902fcb8764df3fea",
"description": "$10 off",
"memo": "Cash applied to this order.",
"promotionAmountType": "Cash",
"promotionAmount": -10.0,
"amountWithPromotion": 25.7
}
},
{
"sku": "sku-405899",
"unitAmount": 20.95,
"promotion": {
"id": "b111beedc07e472c902fcb8764df3fea",
"description": "$10 off",
"memo": "Cash applied to this order.",
"promotionAmountType": "Cash",
"promotionAmount": -10.0,
"amountWithPromotion": 10.95
}
}
]
}
}
Type | Description | Format |
---|---|---|
CurrencyCode required string | Three-character ISO-4217 currency code that identifies the currency. |
Minimum length: 3
Maximum length: 3
Pattern: ^[A-Z]{3}$
|
Items required object | Array of SKU items. |
Type | Description | Format |
---|---|---|
Sku required string | ID of the SKU. |
Minimum length: 1
Maximum length: 10
Pattern: ^[A-Za-z0-9_\\.\\-\\s]{1,20}$
|
UnitAmount required decimal | Unit amount of the SKU. |
Type | Description |
---|---|
CurrencyCode string | Currency code of the website. Same as incoming currency code value. |
Items object | Array of personalized SKU item. |
Type | Description |
---|---|
Sku string | ID of the SKU. Same as incoming SKU. |
DestinationCurrencyCode string | Unit amount of the SKU. Same as incoming unit amount. |
Promotion object | Promotion applied to SKU item.. |
Type | Description |
---|---|
Id string | ID of the promotion. |
Description string | Description of the promotion. |
PromotionAmountType string | Indicates whether promotion amount is cash or points. |
PromotionAmount decimal | Promotion Amount. |
AmountWithPromotion decimal | Indicates amount due after applying the promotion. |
Memo string | Notes. |