FAQs

Q: Code Samples: how can I get started using Marko endpoints in my applications that use different programming langues?

A: Here is how to make a Marko endpoint call in various languages

JavaScript

var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
    if (this.readyState === 4) {
    console.log(this.responseText);
    }
});

xhr.open("GET", "https://www.marko.aramark.net/v1/profit_centers?search=US Bank Stadium");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("apikey", "Insert API Key");
xhr.setRequestHeader("bypass-cache", "true");

xhr.send(data);

JavaScript (w/ jQuery AJAX)

var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://www.marko.aramark.net/v1/profit_centers?search=US Bank Stadium",
    "method": "GET",
    "headers": {
      "content-type": "application/json",
      "apikey": "Insert API Key",
      "bypass-cache": "true"
    }
}
                  
$.ajax(settings).done(function (response) {
    console.log(response);
});

C#

var client = new RestClient("https://www.marko.aramark.net/v1/profit_centers?search=US Bank Stadium");
var request = new RestRequest(Method.GET);
request.AddHeader("bypass-cache", "true");
request.AddHeader("apikey", "Insert API Key");
request.AddHeader("content-type", "application/json");
IRestResponse response = client.Execute(request);

Python

import requests

url = "https://www.marko.aramark.net/v1/profit_centers?search=US Bank Stadium"

headers = {
    'content-type': "application/json",
    'apikey': "Insert API Key",
    'bypass-cache': "true"
    }

response = requests.request("GET", url, headers=headers)

print(response.text)

cURL

curl -H "bypass-cache: true" -H "apikey: {Insert API Key}" -H "smoke: false" -X GET "https://marko.aramark.net/v1/profit_centers?search=US Bank Stadium"

 

Q: How do I access a Marko API?

A: In order to use a Marko API you must first create an account and register your application that will be consuming the APIs. This process will create an Application API Key that must be used with every request to the API.

Q: Can I start to use Marko APIs Immediately?

A: Once you register your application and choose the API Products you would like to use, your request will be submitted for approval. Upon approval your API Key will be generated.