Skip to main content
GET
/
agencies
/
{id}
Detailed agency record
curl --request GET \
  --url https://api.safarapi.com/api/partner/v1/agencies/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.safarapi.com/api/partner/v1/agencies/{id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.safarapi.com/api/partner/v1/agencies/{id}', 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.safarapi.com/api/partner/v1/agencies/{id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$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.safarapi.com/api/partner/v1/agencies/{id}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	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.safarapi.com/api/partner/v1/agencies/{id}")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.safarapi.com/api/partner/v1/agencies/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{ "id": "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f", "slug": "sahara-demo-trekking", "name": "Sahara Demo Trekking", "type": "AGENCY", "description": "Family-run desert specialists based in Marrakech since 2008.", "long_description": "Sahara Demo Trekking is a Marrakech-based operator focused on small-group\ndesert circuits, with a permanent camp in Erg Chebbi and certified local guides.\n", "logo_url": "https://placehold.co/256x256?text=LOGO", "cover_image_url": "https://placehold.co/1600x900?text=COVER", "location": "Marrakech, Morocco", "city": "Marrakech", "country": "Maroc", "founded_year": 2008, "team_size": 14, "languages": [ "fr", "en", "ar" ], "specialties": [ "Desert", "Trekking", "Cultural" ], "certifications": [ "ONMT licensed" ], "badges": [ { "label": "Agence vérifiée", "icon": "CheckCircle" } ], "contact_email": "contact@sahara-demo.example", "contact_phone": "+212522000000", "website": "https://sahara-demo.example", "social_links": { "instagram": "https://instagram.com/sahara-demo" }, "rating": { "value": 4.7, "review_count": 184 }, "total_adventures": 12 }

Authorizations

Authorization
string
header
default:sk_test_DEMO0000_replace_with_your_sandbox_key
required

API key authentication. Issued by the Safariat admin or via the partner portal. The secret is shown only once at generation.

Production sk_live_* keys must additionally sign every write request (POST/PUT/DELETE) with the X-Timestamp and X-Signature headers. Sandbox sk_test_* keys are exempt from request signing: X-Signature and X-Timestamp are not required for writes in the sandbox (so the developer-portal "Try it" playground works end to end). The Idempotency-Key header remains required on writes in both environments.

Path Parameters

id
string<uuid>
required

Agency identifier.

Response

Agency found

Public profile of a Safariat partner — either an AGENCY (legal entity) or a GUIDE (independent guide). Internal compliance fields (VAT, ICE, CIN, license numbers, postal address, commercial terms) are intentionally omitted from this representation.

id
string<uuid>
required
slug
string
required

Stable URL-friendly identifier.

Example:

"sahara-demo-trekking"

name
string
required
Example:

"Sahara Demo Trekking"

type
enum<string>
required

AGENCY = legal entity, GUIDE = independent licensed guide.

Available options:
AGENCY,
GUIDE
rating
object
required
total_adventures
integer
required

Number of active adventures currently published by this partner.

Required range: x >= 0
description
string | null

Short public bio (~ one paragraph).

long_description
string | null

Full public bio (markdown-free plain text).

logo_url
string<uri> | null
cover_image_url
string<uri> | null
location
string | null

Human-readable location label (e.g. "Marrakech, Morocco").

city
string | null
country
string | null

Defaults to "Maroc" when unset.

founded_year
integer | null
Required range: x >= 1900
team_size
integer | null
Required range: x >= 0
languages
string[]

ISO-639-1 language codes the partner team speaks (e.g. fr, en, ar, es).

specialties
string[]
certifications
string[]
badges
object[]
contact_email
string<email> | null
contact_phone
string | null
website
string<uri> | null

Only present when at least one network is set. Null/missing fields = no link.