Request Cancelation
curl --request POST \
--url https://api.orbita.melonn.com/sell-orders/{external_order_number}/request-cancellation \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"comments": "El Buyer no pagó la orden"
}
'import requests
url = "https://api.orbita.melonn.com/sell-orders/{external_order_number}/request-cancellation"
payload = { "comments": "El Buyer no pagó la orden" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({comments: 'El Buyer no pagó la orden'})
};
fetch('https://api.orbita.melonn.com/sell-orders/{external_order_number}/request-cancellation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.orbita.melonn.com/sell-orders/{external_order_number}/request-cancellation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'comments' => 'El Buyer no pagó la orden'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.orbita.melonn.com/sell-orders/{external_order_number}/request-cancellation"
payload := strings.NewReader("{\n \"comments\": \"El Buyer no pagó la orden\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.orbita.melonn.com/sell-orders/{external_order_number}/request-cancellation")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"comments\": \"El Buyer no pagó la orden\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbita.melonn.com/sell-orders/{external_order_number}/request-cancellation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"comments\": \"El Buyer no pagó la orden\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Cancellation requested successfully"
}Sell orders
Request Cancelation
Requests the cancellation of a sell order. The request is recorded as made by the seller.
What happens depends on the order’s state:
- Not yet in preparation (e.g.
1,2,11,12,13,21,26,29,30,31): the order is canceled right away (state15) and its reserved items are released back to available stock. - Already in preparation or in transit (picking, packing, packed, shipped, partially delivered and similar): the cancellation is registered and Melonn completes it through its operational flow (for example unpacking or recovering the packages from the courier). The order state is updated as that flow progresses.
- Closed orders (canceled, delivered, …) and orders currently being processed by Melonn cannot be canceled.
Always send comments with the reason for the cancellation: the request is rejected with
400 when it is missing or empty.
POST
/
sell-orders
/
{external_order_number}
/
request-cancellation
Request Cancelation
curl --request POST \
--url https://api.orbita.melonn.com/sell-orders/{external_order_number}/request-cancellation \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"comments": "El Buyer no pagó la orden"
}
'import requests
url = "https://api.orbita.melonn.com/sell-orders/{external_order_number}/request-cancellation"
payload = { "comments": "El Buyer no pagó la orden" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({comments: 'El Buyer no pagó la orden'})
};
fetch('https://api.orbita.melonn.com/sell-orders/{external_order_number}/request-cancellation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.orbita.melonn.com/sell-orders/{external_order_number}/request-cancellation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'comments' => 'El Buyer no pagó la orden'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.orbita.melonn.com/sell-orders/{external_order_number}/request-cancellation"
payload := strings.NewReader("{\n \"comments\": \"El Buyer no pagó la orden\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.orbita.melonn.com/sell-orders/{external_order_number}/request-cancellation")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"comments\": \"El Buyer no pagó la orden\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbita.melonn.com/sell-orders/{external_order_number}/request-cancellation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"comments\": \"El Buyer no pagó la orden\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Cancellation requested successfully"
}Authorizations
Path Parameters
The order number you assigned to the sell order when you created it.
Minimum string length:
1Body
application/json
Reason for the cancellation. Required in practice; an empty value is rejected.
Response
The cancellation was requested.
Confirmation message.