Get app businesses
curl --request GET \
--url https://sam.aragon.morabaa.com/api/apps/current/businesses \
--header 'X-App-Id: <x-app-id>' \
--header 'X-App-Secret: <x-app-secret>'import requests
url = "https://sam.aragon.morabaa.com/api/apps/current/businesses"
headers = {
"X-App-Id": "<x-app-id>",
"X-App-Secret": "<x-app-secret>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-App-Id': '<x-app-id>', 'X-App-Secret': '<x-app-secret>'}
};
fetch('https://sam.aragon.morabaa.com/api/apps/current/businesses', 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://sam.aragon.morabaa.com/api/apps/current/businesses",
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-App-Id: <x-app-id>",
"X-App-Secret: <x-app-secret>"
],
]);
$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://sam.aragon.morabaa.com/api/apps/current/businesses"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-App-Id", "<x-app-id>")
req.Header.Add("X-App-Secret", "<x-app-secret>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sam.aragon.morabaa.com/api/apps/current/businesses")
.header("X-App-Id", "<x-app-id>")
.header("X-App-Secret", "<x-app-secret>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sam.aragon.morabaa.com/api/apps/current/businesses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-App-Id"] = '<x-app-id>'
request["X-App-Secret"] = '<x-app-secret>'
response = http.request(request)
puts response.read_body[
{
"id": "9c7f3b9d-0809-4f5e-b8f2-b6e46a4eb3af",
"title": "Morabaa Pharmacy"
}
]MyMorabaa endpoints
Get app businesses
Retrieve the businesses assigned to the authenticated app.
GET
/
apps
/
current
/
businesses
Get app businesses
curl --request GET \
--url https://sam.aragon.morabaa.com/api/apps/current/businesses \
--header 'X-App-Id: <x-app-id>' \
--header 'X-App-Secret: <x-app-secret>'import requests
url = "https://sam.aragon.morabaa.com/api/apps/current/businesses"
headers = {
"X-App-Id": "<x-app-id>",
"X-App-Secret": "<x-app-secret>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-App-Id': '<x-app-id>', 'X-App-Secret': '<x-app-secret>'}
};
fetch('https://sam.aragon.morabaa.com/api/apps/current/businesses', 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://sam.aragon.morabaa.com/api/apps/current/businesses",
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-App-Id: <x-app-id>",
"X-App-Secret: <x-app-secret>"
],
]);
$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://sam.aragon.morabaa.com/api/apps/current/businesses"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-App-Id", "<x-app-id>")
req.Header.Add("X-App-Secret", "<x-app-secret>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sam.aragon.morabaa.com/api/apps/current/businesses")
.header("X-App-Id", "<x-app-id>")
.header("X-App-Secret", "<x-app-secret>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sam.aragon.morabaa.com/api/apps/current/businesses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-App-Id"] = '<x-app-id>'
request["X-App-Secret"] = '<x-app-secret>'
response = http.request(request)
puts response.read_body[
{
"id": "9c7f3b9d-0809-4f5e-b8f2-b6e46a4eb3af",
"title": "Morabaa Pharmacy"
}
]Endpoint
GET /apps/current/businesses
Production URL:
https://sam.aragon.morabaa.com/api/apps/current/businesses
Authentication
This endpoint requires app authentication headers:X-App-Id: <APP_ID>X-App-Secret: <APP_SECRET>
Required headers
string
required
App ID credential.
string
required
App secret credential.
Need credentials? Contact info@morabaa.com.
401 Unauthorized.
Do not send Content-Type: application/json for this GET request. The request has no body or query parameters.
Request example
curl "https://sam.aragon.morabaa.com/api/apps/current/businesses" \
-H "X-App-Id: <APP_ID>" \
-H "X-App-Secret: <APP_SECRET>"
Response
A successful response returns200 OK with the businesses assigned to the authenticated app. Results may be cached for up to five minutes.
guid
Business ID.
string
Business title.
[
{
"id": "9c7f3b9d-0809-4f5e-b8f2-b6e46a4eb3af",
"title": "Morabaa Pharmacy"
}
]
[]
502 Bad Gateway:
{
"message": "Failed to get businesses from Morabaa ."
}
