curl --request POST \
--url https://api.orbita.melonn.com/business \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
[
{
"country_id": 1,
"email": "purchasing@example.com",
"external_id": "BUS123",
"logo_url": "https://example.com/images/logo.png",
"name": "Example Retail",
"phone_number": "+573001234567",
"website": "https://example.com",
"business_delivery_locations": [
{
"external_id": "LOC123",
"name": "Sucursal Centro",
"address_l1": "Calle 48",
"address_l2": "Casa 20",
"phone_number": "+573001234568",
"email": "store@example.com",
"location_info": {
"city": "Santa Marta",
"state": "Magdalena",
"country": "Colombia",
"postal_code": "470003"
}
}
],
"business_vas": []
}
]
'import requests
url = "https://api.orbita.melonn.com/business"
payload = [
{
"country_id": 1,
"email": "purchasing@example.com",
"external_id": "BUS123",
"logo_url": "https://example.com/images/logo.png",
"name": "Example Retail",
"phone_number": "+573001234567",
"website": "https://example.com",
"business_delivery_locations": [
{
"external_id": "LOC123",
"name": "Sucursal Centro",
"address_l1": "Calle 48",
"address_l2": "Casa 20",
"phone_number": "+573001234568",
"email": "store@example.com",
"location_info": {
"city": "Santa Marta",
"state": "Magdalena",
"country": "Colombia",
"postal_code": "470003"
}
}
],
"business_vas": []
}
]
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([
{
country_id: 1,
email: 'purchasing@example.com',
external_id: 'BUS123',
logo_url: 'https://example.com/images/logo.png',
name: 'Example Retail',
phone_number: '+573001234567',
website: 'https://example.com',
business_delivery_locations: [
{
external_id: 'LOC123',
name: 'Sucursal Centro',
address_l1: 'Calle 48',
address_l2: 'Casa 20',
phone_number: '+573001234568',
email: 'store@example.com',
location_info: {
city: 'Santa Marta',
state: 'Magdalena',
country: 'Colombia',
postal_code: '470003'
}
}
],
business_vas: []
}
])
};
fetch('https://api.orbita.melonn.com/business', 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/business",
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([
[
'country_id' => 1,
'email' => 'purchasing@example.com',
'external_id' => 'BUS123',
'logo_url' => 'https://example.com/images/logo.png',
'name' => 'Example Retail',
'phone_number' => '+573001234567',
'website' => 'https://example.com',
'business_delivery_locations' => [
[
'external_id' => 'LOC123',
'name' => 'Sucursal Centro',
'address_l1' => 'Calle 48',
'address_l2' => 'Casa 20',
'phone_number' => '+573001234568',
'email' => 'store@example.com',
'location_info' => [
'city' => 'Santa Marta',
'state' => 'Magdalena',
'country' => 'Colombia',
'postal_code' => '470003'
]
]
],
'business_vas' => [
]
]
]),
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/business"
payload := strings.NewReader("[\n {\n \"country_id\": 1,\n \"email\": \"purchasing@example.com\",\n \"external_id\": \"BUS123\",\n \"logo_url\": \"https://example.com/images/logo.png\",\n \"name\": \"Example Retail\",\n \"phone_number\": \"+573001234567\",\n \"website\": \"https://example.com\",\n \"business_delivery_locations\": [\n {\n \"external_id\": \"LOC123\",\n \"name\": \"Sucursal Centro\",\n \"address_l1\": \"Calle 48\",\n \"address_l2\": \"Casa 20\",\n \"phone_number\": \"+573001234568\",\n \"email\": \"store@example.com\",\n \"location_info\": {\n \"city\": \"Santa Marta\",\n \"state\": \"Magdalena\",\n \"country\": \"Colombia\",\n \"postal_code\": \"470003\"\n }\n }\n ],\n \"business_vas\": []\n }\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/business")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"country_id\": 1,\n \"email\": \"purchasing@example.com\",\n \"external_id\": \"BUS123\",\n \"logo_url\": \"https://example.com/images/logo.png\",\n \"name\": \"Example Retail\",\n \"phone_number\": \"+573001234567\",\n \"website\": \"https://example.com\",\n \"business_delivery_locations\": [\n {\n \"external_id\": \"LOC123\",\n \"name\": \"Sucursal Centro\",\n \"address_l1\": \"Calle 48\",\n \"address_l2\": \"Casa 20\",\n \"phone_number\": \"+573001234568\",\n \"email\": \"store@example.com\",\n \"location_info\": {\n \"city\": \"Santa Marta\",\n \"state\": \"Magdalena\",\n \"country\": \"Colombia\",\n \"postal_code\": \"470003\"\n }\n }\n ],\n \"business_vas\": []\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbita.melonn.com/business")
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 {\n \"country_id\": 1,\n \"email\": \"purchasing@example.com\",\n \"external_id\": \"BUS123\",\n \"logo_url\": \"https://example.com/images/logo.png\",\n \"name\": \"Example Retail\",\n \"phone_number\": \"+573001234567\",\n \"website\": \"https://example.com\",\n \"business_delivery_locations\": [\n {\n \"external_id\": \"LOC123\",\n \"name\": \"Sucursal Centro\",\n \"address_l1\": \"Calle 48\",\n \"address_l2\": \"Casa 20\",\n \"phone_number\": \"+573001234568\",\n \"email\": \"store@example.com\",\n \"location_info\": {\n \"city\": \"Santa Marta\",\n \"state\": \"Magdalena\",\n \"country\": \"Colombia\",\n \"postal_code\": \"470003\"\n }\n }\n ],\n \"business_vas\": []\n }\n]"
response = http.request(request)
puts response.read_body{
"message": "Businesses created successfully"
}Create in bulk
Creates one or more businesses (B2B recipients) for your account, optionally with their delivery locations and enabled VAS. All businesses in the request are created together.
Validation
external_idof each business and of each delivery location must not exist yet in Melonn, otherwise the whole request is rejected with403.logo_urlmust be a public URL ending in.jpg,.jpegor.png; Melonn downloads it.- Every code in
business_vasmust be an existing VAS (see VAS codes). Send[]when the business has none. country_id:1Colombia,2Mexico.
Delivery location coordinates and postal code are resolved by Melonn from the address and
location_info. Text fields are stored with a maximum of 45 characters (name, email,
phone_number, external_id).
Properties not listed in the schema are ignored.
curl --request POST \
--url https://api.orbita.melonn.com/business \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
[
{
"country_id": 1,
"email": "purchasing@example.com",
"external_id": "BUS123",
"logo_url": "https://example.com/images/logo.png",
"name": "Example Retail",
"phone_number": "+573001234567",
"website": "https://example.com",
"business_delivery_locations": [
{
"external_id": "LOC123",
"name": "Sucursal Centro",
"address_l1": "Calle 48",
"address_l2": "Casa 20",
"phone_number": "+573001234568",
"email": "store@example.com",
"location_info": {
"city": "Santa Marta",
"state": "Magdalena",
"country": "Colombia",
"postal_code": "470003"
}
}
],
"business_vas": []
}
]
'import requests
url = "https://api.orbita.melonn.com/business"
payload = [
{
"country_id": 1,
"email": "purchasing@example.com",
"external_id": "BUS123",
"logo_url": "https://example.com/images/logo.png",
"name": "Example Retail",
"phone_number": "+573001234567",
"website": "https://example.com",
"business_delivery_locations": [
{
"external_id": "LOC123",
"name": "Sucursal Centro",
"address_l1": "Calle 48",
"address_l2": "Casa 20",
"phone_number": "+573001234568",
"email": "store@example.com",
"location_info": {
"city": "Santa Marta",
"state": "Magdalena",
"country": "Colombia",
"postal_code": "470003"
}
}
],
"business_vas": []
}
]
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([
{
country_id: 1,
email: 'purchasing@example.com',
external_id: 'BUS123',
logo_url: 'https://example.com/images/logo.png',
name: 'Example Retail',
phone_number: '+573001234567',
website: 'https://example.com',
business_delivery_locations: [
{
external_id: 'LOC123',
name: 'Sucursal Centro',
address_l1: 'Calle 48',
address_l2: 'Casa 20',
phone_number: '+573001234568',
email: 'store@example.com',
location_info: {
city: 'Santa Marta',
state: 'Magdalena',
country: 'Colombia',
postal_code: '470003'
}
}
],
business_vas: []
}
])
};
fetch('https://api.orbita.melonn.com/business', 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/business",
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([
[
'country_id' => 1,
'email' => 'purchasing@example.com',
'external_id' => 'BUS123',
'logo_url' => 'https://example.com/images/logo.png',
'name' => 'Example Retail',
'phone_number' => '+573001234567',
'website' => 'https://example.com',
'business_delivery_locations' => [
[
'external_id' => 'LOC123',
'name' => 'Sucursal Centro',
'address_l1' => 'Calle 48',
'address_l2' => 'Casa 20',
'phone_number' => '+573001234568',
'email' => 'store@example.com',
'location_info' => [
'city' => 'Santa Marta',
'state' => 'Magdalena',
'country' => 'Colombia',
'postal_code' => '470003'
]
]
],
'business_vas' => [
]
]
]),
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/business"
payload := strings.NewReader("[\n {\n \"country_id\": 1,\n \"email\": \"purchasing@example.com\",\n \"external_id\": \"BUS123\",\n \"logo_url\": \"https://example.com/images/logo.png\",\n \"name\": \"Example Retail\",\n \"phone_number\": \"+573001234567\",\n \"website\": \"https://example.com\",\n \"business_delivery_locations\": [\n {\n \"external_id\": \"LOC123\",\n \"name\": \"Sucursal Centro\",\n \"address_l1\": \"Calle 48\",\n \"address_l2\": \"Casa 20\",\n \"phone_number\": \"+573001234568\",\n \"email\": \"store@example.com\",\n \"location_info\": {\n \"city\": \"Santa Marta\",\n \"state\": \"Magdalena\",\n \"country\": \"Colombia\",\n \"postal_code\": \"470003\"\n }\n }\n ],\n \"business_vas\": []\n }\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/business")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"country_id\": 1,\n \"email\": \"purchasing@example.com\",\n \"external_id\": \"BUS123\",\n \"logo_url\": \"https://example.com/images/logo.png\",\n \"name\": \"Example Retail\",\n \"phone_number\": \"+573001234567\",\n \"website\": \"https://example.com\",\n \"business_delivery_locations\": [\n {\n \"external_id\": \"LOC123\",\n \"name\": \"Sucursal Centro\",\n \"address_l1\": \"Calle 48\",\n \"address_l2\": \"Casa 20\",\n \"phone_number\": \"+573001234568\",\n \"email\": \"store@example.com\",\n \"location_info\": {\n \"city\": \"Santa Marta\",\n \"state\": \"Magdalena\",\n \"country\": \"Colombia\",\n \"postal_code\": \"470003\"\n }\n }\n ],\n \"business_vas\": []\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbita.melonn.com/business")
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 {\n \"country_id\": 1,\n \"email\": \"purchasing@example.com\",\n \"external_id\": \"BUS123\",\n \"logo_url\": \"https://example.com/images/logo.png\",\n \"name\": \"Example Retail\",\n \"phone_number\": \"+573001234567\",\n \"website\": \"https://example.com\",\n \"business_delivery_locations\": [\n {\n \"external_id\": \"LOC123\",\n \"name\": \"Sucursal Centro\",\n \"address_l1\": \"Calle 48\",\n \"address_l2\": \"Casa 20\",\n \"phone_number\": \"+573001234568\",\n \"email\": \"store@example.com\",\n \"location_info\": {\n \"city\": \"Santa Marta\",\n \"state\": \"Magdalena\",\n \"country\": \"Colombia\",\n \"postal_code\": \"470003\"\n }\n }\n ],\n \"business_vas\": []\n }\n]"
response = http.request(request)
puts response.read_body{
"message": "Businesses created successfully"
}Authorizations
Body
1Your id for the business. Must not exist yet in Melonn.
Business name.
Business phone number.
Country of the business: 1 Colombia, 2 Mexico.
Public URL of the business logo, ending in .jpg, .jpeg or .png.
Business email.
Business website.
Latitude of the business.
Longitude of the business.
Delivery locations of the business. If sent, at least one.
1Show child attributes
Show child attributes
Response
The businesses were created.
Confirmation message.