curl --location --request PUT 'https://api.stateset.com/v1/order/:id/apply-promotion' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30"
}'
mutation orderApplyPromotionMutation {
orderApplyPromotion(id: "${orderId}") {
order {
id,
status
}
userErrors {
field
message
}
}
}
`;
const orders = await stateset.orders.applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
});
orders = stateset.orders.applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
})
orders = Stateset::Order.applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
})
orders, err := stateset.Orders.applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
})
Order orders = stateset.Orders.applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
});
$orders = $stateset->orders->applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
});
var orders = await stateset.Orders.ApplyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
});
{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "order",
"applied": true
}
Apply Promotion
This endpoint applies a promotion to an order.
POST
/
v1
/
orders
/
:id
/
apply-promotion
curl --location --request PUT 'https://api.stateset.com/v1/order/:id/apply-promotion' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30"
}'
mutation orderApplyPromotionMutation {
orderApplyPromotion(id: "${orderId}") {
order {
id,
status
}
userErrors {
field
message
}
}
}
`;
const orders = await stateset.orders.applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
});
orders = stateset.orders.applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
})
orders = Stateset::Order.applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
})
orders, err := stateset.Orders.applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
})
Order orders = stateset.Orders.applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
});
$orders = $stateset->orders->applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
});
var orders = await stateset.Orders.ApplyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
});
{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "order",
"applied": true
}
Body
The ID provided in the data tab may be used to identify the order
Response
The ID provided in the data tab may be used to identify the order
The object type
Indicates whether the call was successful. true if successful, false if not.
curl --location --request PUT 'https://api.stateset.com/v1/order/:id/apply-promotion' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30"
}'
mutation orderApplyPromotionMutation {
orderApplyPromotion(id: "${orderId}") {
order {
id,
status
}
userErrors {
field
message
}
}
}
`;
const orders = await stateset.orders.applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
});
orders = stateset.orders.applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
})
orders = Stateset::Order.applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
})
orders, err := stateset.Orders.applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
})
Order orders = stateset.Orders.applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
});
$orders = $stateset->orders->applyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
});
var orders = await stateset.Orders.ApplyPromotion({
'0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
});
{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "order",
"applied": true
}
⌘I