Skip to main content

Cancellations/Returns via Seller-API

Cancel order

During this process, your shop sends the information about cancelled orders to Channel Pilot Pro.

$cancellations= array();

$cancelled= new CPCancellation("TEST_ORDER_ID_SHOP-1", "marketplace_1", "20", "2014-05-28T11:25:57", true);
$cancellations[] = $cancelled;

$cancelled= new CPCancellation("TEST_ORDER_ID_SHOP-2", "marketplace_1", "30", "2014-05-28T11:36:12", true);
$cancellations[] = $cancelled;

$api = new ChannelPilotSellerAPI_v1_0("cpMerchantId", "cpApiToken");
$result = $api->registerCancellations($cancellations);

API-Function - REGISTERCANCELLATIONS

$result = $api->registerCancellations($cancellations);

To cancel orders in Channel Pilot Pro, there is a function called "cancellations()". For this purpose, a CPCancellation-Object is created for each cancelled order.

SOAP-UI description and samples for this function can be found here.

Sample data request:

[{
"orderHeader":{
"orderId":"TEST_ORDER_ID_SHOP-1",
"source":"marketplace_1",
"status":{
"identifier":"99",
"hasError":false
}
},
"cancellationTime":"2014-05-28T11:25:57",
"isWholeOrderCancelled":true,
"cancelledItems":[]
},{
"orderHeader":{
"orderId":"TEST_ORDER_ID_SHOP-2",
"source":"marketplace_1",
"status":{
"identifier":"99",
"hasError":false
}
},
"cancellationTime":"2014-05-28T11:36:12",
"isWholeOrderCancelled":true,
"cancelledItems":[]
}]

The response contains the new "status (99)" of the order or an error message.

Sample data response:

{
"updateResults":[{
"orderHeader":{
"orderId":"TEST_ORDER_ID_SHOP-1",
"orderIdExternal":"TEST_ITEM_ID_MARKETPLACE-1",
"source":"marketplace_1",
"status":{
"identifier":"99",
"publicTitle":"Storniert",
"publicDescription":"Bestellung wurde storniert",
"hasError":false
},
"orderTime":"2014-05-27T18:22:38+02:00"
},
"header":{
"resultCode":200,
"resultMessage":""
}
},{
"orderHeader":{
"orderId":"TEST_ORDER_ID_SHOP-2",
"orderIdExternal":"TEST_ITEM_ID_MARKETPLACE-2",
"source":"marketplace_1",
"status":{
"identifier":"99",
"publicTitle":"Storniert",
"publicDescription":"Bestellung wurde storniert",
"hasError":false
},
"orderTime":"2014-05-27T21:37:02+02:00"
},
"header":{
"resultCode":200,
"resultMessage":""
}
}]
}

NOTE: If "RegisterCancellations" is triggered, a "RegisterRefund" does not have to be triggered additionally.

The "RegisterRefund" is only necessary if a repayment is to be made independently of a cancellation.

Did this answer your question?