Make an API Call

Now you have a token, you are ready to make a call to one of the services. For the purpose of this guide we will assume you have been given access to the Deals service. If this is not the case, you can use any service that you have been given access to.

To access the base deal service, you will make a GET http call to the UAT endpoint with a call like the following:

curl -X GET \
  https://api.uat.us-cas.ipreo.com/book-building/deals/v1/deals \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip' \
  -H 'Authorization: Bearer <access_token>' \
  -H 'Cache-Control: no-cache' \

You however must replace <access_token> with the value that was returned from the token call (see Get a Token), in our example this header would look like:

-H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtaCofFDjY1RTg1M0NDRkZBOEY4MKSWUND6jAxNDU0Nzc1ODMzRjE0MDU2N0YiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJaZWhUelAtby1CYXZfR0FVVkhkWU1fRkFWbjgifQ.eyJuYmYiOjaksuhenjAzMDUsImV4cCI6MTU2NDY2MTUwNSwiaXNzIjoiaHR0cHM6Ly9jYXMtaWRlbnRpdHkuZGVtby5pcHJlby5jb20iLCJhdWQiOlsiaHR0cHM6Ly9jYXMtaWRlbnRpdHkuZGVtby5pcHJlby5jb20vcmVzb3VyY2VzIiwiZGVhbHMtcmVhZCIsInBlcm1pc3Npb25zLXJlYWQiLCJzb2NrZXRzLXJlYWQiXSwiY2xpZW50X2lkIjoiYXBpLWZyYW5rbGluLXRlbXBsZXRvbi5jbGllbnQiLCJmaXJtX2lkIjoiMzk1NDY1Iiwic2NvcGUiOlsiZGVhbHMtcmVhZCIsInBlcm1pc3Npb25zLXJlYWQiLCJzb2NrZXRzLXJlYWQiXX0.lynLsCN_nXK_5tEcSWWrQnsarCMz9ftH2J_S-3eHKIRAu5ldPBUd6L1mRby9s3kCafDoLNKZVjO_pW8ENk3g17JwHWssZE3NTu9JBD2aUddZye11ow4mxU9xxUaZHG7sBetcix1XjKegJqbpgWfvcOmQ6gJMPSSzt5FBVQ8RIXH4kuB4Tvv4WwSIOv-NNxIsFM58ih9NAGfgnXdd3CaWYW_jWwZM6QDRc4yfZDufukztGw5MNi0-jsYFoSy3CBeglMpvKqxme-o1HfWYGg2ihR6-WmOvZmee4HISnemXTz9NHfOJTlgj5d8qj8t4534tkfxZGAzPH57S1UqGaZpjw

When you make this GET call you should receive a response payload that looks something like the following. It’s not very exciting as there will be no data setup at this stage…

{
    "items": [],
    "page": 1,
    "pageSize": 0,
    "total": 0
}

It doesn’t really matter what the response is (and will vary depending on the data you have setup, and the service you call), but if you get a 200 http response code then you have successfully made a CAS API call!