Facebook Pixel

Mission Data API Documentation

Updated September 4, 2025

Disclaimer

By using the Agents of Discovery API, you agree that Agents of Discovery is not liable for any downtime, loss of data or any and all other damages that may occur as a result of using the API. Agents of Discovery Inc. makes no warranties or representations of any kind with respect to its API, including but not limited to its accuracy, completeness, timeliness or reliability. You agree to indemnify and hold Agents of Discovery Inc. harmless from any claims arising out of your use of the API.

This document assumes the reader has intermediate knowledge of web development and APIs. It outlines the usage of our Mission Data API, primarily for the purpose of displaying Missions in Google Maps.

Only published Missions will be returned by the API. Missions in preview mode will not be returned. Missions from formal education Partners will not be returned for privacy reasons.

Contents

Request

Request Type:    POST

URL:    ‘https://backend.mm.agentsofdiscovery.com/v1/graphql’

Headers:

    • ‘Content-Type’: ‘application/json’
    • Accept: ‘application/json’

Example Request (Javascript)

fetch(‘https://backend.mm.agentsofdiscovery.com/v1/graphql’, {

method: ‘POST’,

headers: {

‘Content-Type’: ‘application/json’,

Accept: ‘application/json’

},

body: JSON.stringify({ query })

})

.then(async (response) => {

if (!response.ok) {

const text = await response.text().catch(() => ”);

throw new Error(`Request failed: ${response.status} ${response.statusText} ${text}`);

}

return response.json();

})

.then(({ data }) => {

const missions = data?.missionMapPublic;

// Do something with Mission data, e.g. display it on a map

})

.catch((error) => console.error(‘Error fetching data:’, error));

Request Body

The API accepts a GraphQL query as the request body. This allows for flexible data retrieval, as you can specify exactly what data you need. No in-depth knowledge of GraphQL is required.

Your query must reference missionMapPublic. Your query may contain arguments to filter results by Organization, Mission type, and more. Your query must also contain the names of one or more Mission fields you would like returned:

const query = `query {

    missionMapPublic(<query arguments>) {

       <fields to be returned>

}`;

Full lists of possible query arguments and returned fields can be found in the sections below.

Example Query (Javascript)

The following example represents a scenario where an Organization wants to create a Google Map of their Play-on-Site Missions.

Arguments are passed in specifying the Organization ID and Mission type. Only the fields you request (id, name, etc.) will be queried and returned.

See the Response section for the response that corresponds to this query.

const query = `query {

missionMapPublic(organizationId: 1, type: “playOnSite”) {

id

name

partnerId

partnerName

latitude

longitude

city

description

safetyInfo

directions

websiteLink

displayPanorama

}`;

Query Arguments

The following arguments can be passed within your GraphQL query to filter Missions. All arguments are optional.

Field Name Type Description
country String

The country a Mission is located in.

To include only Missions in the U.S.A., use “United States”.

language ‘ar’ – Arabic
‘en’ – English
‘es’ – Spanish
‘fr’ – French
‘ko’ – Korean
‘zh’ – Chinese

The preferred language that text fields will be returned in. If the preferred language is not enabled on a Mission, its data will be returned in one of its enabled languages.

Default: “en”

organizationId Int

Unique Organization ID. Only Missions from Partners in this Organization will be returned.

Your unique Organization ID can be requested from your Agents of Discovery contact person.

partnerId Int Unique Partner ID. Only Missions from this Partner will be returned.
provinceState String The full name of a state or province a Mission is located in.
e.g. “District of Columbia”
type ‘playOnSite’ | ‘playFromAnywhere’ Mission type; whether it must be played at a specific location or can be played from anywhere.

Response

The API will respond with a JSON object like the one shown below, where each object in the missionMapPublic array represents data for a specific Mission. This response corresponds to the query in the above section.

Example Response

{

data: {

missionMapPublic: [

{

id: 1207,

name: “AoD Test Mission”,

partnerId: 342,

partnerName: “AoD Development”,

latitude: 49.88632248746221,

longitude: -119.4996056349118,

city: “Kelowna”,

description: “This is a test Mission.”,

safetyInfo: “Always be aware of your surroundings.”,

directions: null,

websiteLink: “agentsofdiscovery.com”

displayPanorama: true

},

// … other Missions

]

}

}

Returned Fields

You must specify which Mission fields you would like returned in your GraphQL query.

The API can return the following fields for each Mission:

Field Name Type Description
city * String | null The city in which the Mission is located.
country * String | null The country in which the Mission is located.
description String | null A description of the Mission.
directions String | null Directions to the Mission site or starting point.
displayPanorama Boolean Whether or not to associate a Google Street View with this Mission.
id Int Unique Mission ID.
languages String[] Which languages the Mission can be played in.
latitude Float Latitude of the Mission’s starting point.
location * String | null The name of an establishment or landmark associated with the Mission’s location. e.g. “Griffith Observatory”.
longitude Float Longitude of the Mission’s starting point.
name String | null Mission name.
organizationId Int Unique ID of the Organization the Mission Partner belongs to.
organizationName String Name of the Organization the Mission Partner belongs to.
partnerId Int Unique ID of the Mission Partner.
partnerName String Name of the Mission Partner.
provinceState * String | null The state or province in which the Mission is located.
safetyInfo String | null Things players should know in order to play the Mission safely.
type ‘playOnSite’ | ‘playFromAnywhere’ Mission type; whether it must be played at a specific location or can be played from anywhere.
Returns “playOnSite” or “playFromAnywhere”.
websiteLink String A website where players can find out more about the Mission.
welcomeMessage String | null The message players see when they first begin the Mission.

* These values are pulled from Google’s Reverse Geocoding API using the Mission’s starting latitude and longitude values.

Use Cases

It is recommended that Missions whose type is “playOnSite” be placed on a map, and that Missions whose type is “playFromAnywhere” be placed in a separate table, list or graphic. An example of this can be viewed on the Agents of Discovery website.

External Resource Links