Get a Spot by ID

This guide explains how to retrieve a specific spot using the Aara API by its unique identifier (id). We'll start with an example using curl and follow it up with JavaScript examples utilizing the native fetch API.

Curl example

curl -X GET "https://api.aara.app/v1/spots/{id}" \
-H "AARA_API_KEY: YOUR_API_KEY" \
-H "UNIQUE_USER_ID: UNIQUE_USER_ID"

JavaScript example

const getSpotById = async (spotId) => {
  const response = await fetch(`https://api.aara.app/v1/spots/${spotId}`, {
    method: "GET",
    headers: {
      AARA_API_KEY: "YOUR_API_KEY",
      UNIQUE_USER_ID: "UNIQUE_USER_ID",
    },
  });

  const data = await response.json();
  console.log(data);
};

getSpotById("your-spot-id");

Instructions:

  • Replace YOUR_API_KEY and UNIQUE_USER_ID with your actual credentials.
  • Replace your-spot-id with the unique ID of the spot you want to retrieve.
  • The API call will return a JSON object containing the details of the specified spot.

Get Spot by ID Parameters

When retrieving a spot by ID, the only required parameter is the spot's unique identifier (id). Below is a breakdown of the required parameter:

Parameter NameData TypeUsagePossible ValuesOptional
idstringRequired. The unique identifier of the spot to retrieve.Any valid spot ID string.No

Response

The response from the API will be a JSON object containing the details of the spot, including information such as the spot's name, description, location, media, and more.


Example Response

{
  id: "abcdefghijklmn1234567890",
  name: "The Crying Tiger",
  shortDescription: "A local’s favourite, the Crying Tiger offers delicious Thai food in a warm and lovely bistro setting.",
  description: "We absolutely recommend the red curry and ideally, have it spicy, and the good old pad thai is fantastic too. The bar and the terrasse are lovely to enjoy both in summer and winter. Highly recommended!",
  phone: "+33 1 40 47 07 54",
  fullAddress: "72 Rue du Cherche-Midi, 75006 Paris, France",
  lat: 48.8483422,
  lng: 2.3239264,
  isActive: true,
  isBookmarked: false,
  category: {
    id: "abcdefghijklmn1234567890",
    name: "Food"
  },
  medias: [
    {
      id: "abcdefghijklmn1234567890",
      url: "https://example.com/image1.jpg"
    },
    {
      id: "abcdefghijklmn1234567890",
      url: "https://example.com/image2.jpg"
    }
  ],
  openingHours: {
    monday: {
      open: "10:00",
      close: "22:00"
    },
    tuesday: {
      open: "10:00",
      close: "22:00"
    },
    wednesday: {
      open: "10:00",
      close: "22:00"
    },
    thursday: {
      open: "10:00",
      close: "22:00"
    },
    friday: {
      open: "10:00",
      close: "23:00"
    },
    saturday: {
      open: "10:00",
      close: "23:00"
    },
    sunday: {
      open: "10:00",
      close: "22:00"
    }
  }
}

This response shows the detailed information of a spot, including its name, description, location, category, media, and opening hours.