curl --request GET \
--url https://api.orbita.melonn.com/sell-orders/{external_order_number} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.orbita.melonn.com/sell-orders/{external_order_number}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.orbita.melonn.com/sell-orders/{external_order_number}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.orbita.melonn.com/sell-orders/{external_order_number}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.orbita.melonn.com/sell-orders/{external_order_number}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbita.melonn.com/sell-orders/{external_order_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"fulfillment_type": {
"id": 1,
"order_type": "D2C",
"delivery_mode": "DELIVERY",
"transport_by": "MELONN",
"destination": "DOMESTIC",
"shipment_type": "SHARED"
},
"buyer": {
"email": "buyer@example.com",
"full_name": "Jane Doe",
"phone_number": "+57-3000000000"
},
"id": 1732571663793215,
"internal_order_number": "M1732571663793215",
"external_order_id": null,
"external_order_number": "TESTING-PUBLIC-API_D2C_001",
"melonn_tracking_link": "https://d31a8gq0kszthp.cloudfront.net/M1732571663793215",
"payment_on_delivery_amount": null,
"creation_date": "2024-11-25T21:54:25.000Z",
"tags": [
"TESTING-RC"
],
"sell_order_state": {
"id": 7,
"name": "Shipped - in transit"
},
"line_items": [
{
"quantity": 1,
"sku": "S0001"
}
],
"shipping_method": {
"code": "MEL-15",
"name": "Estándar (Local y Nacional)"
},
"warehouse": {
"address_line1": "Calle 55 sur # 44-76",
"address_line2": null,
"city": "Sabaneta",
"country": "Colombia",
"postal_code_id": 1,
"region": "ANTIOQUIA"
},
"sell_order_package": [
{
"id": 98765,
"internal_number": "M1732571663793215-1",
"sell_order_package_state": {
"id": 8,
"name": "In transit"
},
"sell_order_package_attempt": [
{
"id": 123456,
"sell_order_package_id": 98765,
"attempt_number": 1,
"current": true,
"ready_to_ship_promise_min": null,
"ready_to_ship_promise_max": null,
"ready_to_ship_promise_processing_date": null,
"ready_to_ship_timestamp": null,
"ship_promise_min": null,
"ship_promise_max": "2024-11-26T23:00:00.000Z",
"ship_promise_processing_date": null,
"ship_timestamp": "2024-11-26T15:12:00.000Z",
"delivery_promise_min": null,
"delivery_promise_max": "2024-11-28T23:00:00.000Z",
"delivery_promise_processing_date": null,
"delivery_timestamp": null,
"ready_to_pickup_promise_min": null,
"ready_to_pickup_promise_max": null,
"ready_to_pickup_processing_date": null,
"ready_to_pickup_timestamp": null,
"pickup_promise_min": null,
"pickup_promise_max": null,
"pickup_promise_processing_date": null,
"pickup_timestamp": null,
"promise_calculation_details": {}
}
]
}
],
"shipping_info": {
"address_l1": "CRA 12 A # 145 A - 22",
"address_l2": "",
"city": "Bogotá",
"region": "Bogotá",
"country": "Colombia",
"postal_code": "110111",
"full_name": "Jane Doe",
"phone_number": "+57-3000000000"
}
}Get sell order
Returns the detail of one of your sell orders, looked up by the external_order_number you sent when
creating it. If several of your orders share that number, only one of them is returned.
The response shape is the same for D2C and B2B orders, with these differences:
businessis present only for B2B orders.shipping_infois present only when the order is delivered (fulfillment_type.delivery_modeisDELIVERY), for both D2C and B2B. Pickup orders have noshipping_info.sell_order_vasis present only when the order has value-added services (B2B).
line_items reports the quantity to fulfill per SKU. Kits are reported as their component SKUs.
sell_order_package lists the order’s packages once it has been packed; for each package only the
current attempt is returned.
Promise information
Add fields=sell_order_promises to also get:
sell_order_promise_info: the order-level promises (nullwhen the order has none).- all the promise dates of each package’s current attempt in
sell_order_package[].sell_order_package_attempt[]. Without this parameter, onlyship_promise_max,ship_timestamp,delivery_promise_maxanddelivery_timestampare filled and the other promise dates come back asnull.
See Sell order states for states and the promise and attempt fields.
curl --request GET \
--url https://api.orbita.melonn.com/sell-orders/{external_order_number} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.orbita.melonn.com/sell-orders/{external_order_number}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.orbita.melonn.com/sell-orders/{external_order_number}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.orbita.melonn.com/sell-orders/{external_order_number}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.orbita.melonn.com/sell-orders/{external_order_number}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbita.melonn.com/sell-orders/{external_order_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"fulfillment_type": {
"id": 1,
"order_type": "D2C",
"delivery_mode": "DELIVERY",
"transport_by": "MELONN",
"destination": "DOMESTIC",
"shipment_type": "SHARED"
},
"buyer": {
"email": "buyer@example.com",
"full_name": "Jane Doe",
"phone_number": "+57-3000000000"
},
"id": 1732571663793215,
"internal_order_number": "M1732571663793215",
"external_order_id": null,
"external_order_number": "TESTING-PUBLIC-API_D2C_001",
"melonn_tracking_link": "https://d31a8gq0kszthp.cloudfront.net/M1732571663793215",
"payment_on_delivery_amount": null,
"creation_date": "2024-11-25T21:54:25.000Z",
"tags": [
"TESTING-RC"
],
"sell_order_state": {
"id": 7,
"name": "Shipped - in transit"
},
"line_items": [
{
"quantity": 1,
"sku": "S0001"
}
],
"shipping_method": {
"code": "MEL-15",
"name": "Estándar (Local y Nacional)"
},
"warehouse": {
"address_line1": "Calle 55 sur # 44-76",
"address_line2": null,
"city": "Sabaneta",
"country": "Colombia",
"postal_code_id": 1,
"region": "ANTIOQUIA"
},
"sell_order_package": [
{
"id": 98765,
"internal_number": "M1732571663793215-1",
"sell_order_package_state": {
"id": 8,
"name": "In transit"
},
"sell_order_package_attempt": [
{
"id": 123456,
"sell_order_package_id": 98765,
"attempt_number": 1,
"current": true,
"ready_to_ship_promise_min": null,
"ready_to_ship_promise_max": null,
"ready_to_ship_promise_processing_date": null,
"ready_to_ship_timestamp": null,
"ship_promise_min": null,
"ship_promise_max": "2024-11-26T23:00:00.000Z",
"ship_promise_processing_date": null,
"ship_timestamp": "2024-11-26T15:12:00.000Z",
"delivery_promise_min": null,
"delivery_promise_max": "2024-11-28T23:00:00.000Z",
"delivery_promise_processing_date": null,
"delivery_timestamp": null,
"ready_to_pickup_promise_min": null,
"ready_to_pickup_promise_max": null,
"ready_to_pickup_processing_date": null,
"ready_to_pickup_timestamp": null,
"pickup_promise_min": null,
"pickup_promise_max": null,
"pickup_promise_processing_date": null,
"pickup_timestamp": null,
"promise_calculation_details": {}
}
]
}
],
"shipping_info": {
"address_l1": "CRA 12 A # 145 A - 22",
"address_l2": "",
"city": "Bogotá",
"region": "Bogotá",
"country": "Colombia",
"postal_code": "110111",
"full_name": "Jane Doe",
"phone_number": "+57-3000000000"
}
}Authorizations
Path Parameters
The external order number you sent when creating the order.
1Query Parameters
Comma-separated list of optional blocks to include. The only supported value is sell_order_promises;
other values are ignored.
Response
The sell order.
How the order is fulfilled, derived from its shipping method. null if not set.
Show child attributes
Show child attributes
B2B orders only. The business that receives the order.
Show child attributes
Show child attributes
Buyer of the order. For B2B orders, the business's contact data.
Show child attributes
Show child attributes
Melonn's numeric id of the order.
Order number assigned by Melonn.
Your order id.
Your order number.
Melonn's tracking page for the order.
Amount to collect on delivery, if any.
When the order was created.
Tags attached to the order.
Value-added services of the order. Present only when the order has VAS.
Show child attributes
Show child attributes
Current state (see Sell order states).
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Shipping method of the order (see Reference data).
Show child attributes
Show child attributes
Address of the warehouse assigned to the order, or null if none is assigned yet.
Show child attributes
Show child attributes
Packages of the order. Present only once the order has packages.
Show child attributes
Show child attributes
Order-level promises. Present only when requested with fields=sell_order_promises; null when the
order has no promise information.
Show child attributes
Show child attributes
Delivery address. Present only when fulfillment_type.delivery_mode is DELIVERY.
Show child attributes
Show child attributes