[lightMode]
Cancel
This endpoint cancels an order, indicating that the customer no longer wants the product that was initially ordered.
Payload authenticated
Response
Usage
The cancel()
method receives the id of the order to be cancelled when the developer simply calls it.
salla.order.cancel({ id: 98789 }).then((response) => {
/* add your code here */
});
// TIP: short version
salla.order.cancel(12345).then((response) => {
/* add your code here */
});
Events
This endpoint may trigger two events, the onCanceled and onNotCanceled events.
onCanceled
This event is triggered when cancelling an order process is done without having any errors coming back from the backend.
salla.event.order.onCanceled((response) => {
console.log(response)
});
onNotCanceled
This event is triggered when cancelling an order process is not completed and an error has occurred.
salla.event.order.onNotCanceled((errorMessage) => {
console.log(errorMessage)
});
[updatedIn] 10 months ago
Payload `authenticated`
Response
Usage
Events
onCanceled
onNotCanceled