Navigating Businesses and Business Locations

Imagine that there is a restaurant that has 3 locations, and you want to know information about that restaurant.

Finding aggregated revenues and growth across all locations

Let’s imagine that you want to know the revenues of the restaurant chain in total and how those revenues are growing (in aggregate across all three locations), and you want to do this via API.

  1. First you would query the match endpoint with the identifying information you have about the restaurant. You will specify in the match endpoint that you want information about the business entity
'https://api.enigma.com/businesses/match?business_entity_type=business'
  1. You would identify the Enigma ID with the highest match confidence score. This Enigma ID will start with a B.

  2. You would query the ID endpoint with the Enigma ID from #2, and specify that you want the card_revenue and card_revenue_growth attributes in the query parameter

https://api.enigma.com/businesses/E00003580000227f?attrs=card_revenue,card_revenue_growth

Finding revenues of a specific location

Now, let’s imagine that you want to know the revenues of a specific location of that restaurant. And for this example you know the address of the location that you want to know about.

  1. First you would query the match endpoint with the identifying information you have about the restaurant location. You will specify in the match endpoint that you want information about the business location entity
'https://api.enigma.com/businesses/match?business_entity_type=business_location'
  1. You would identify the Enigma ID with the highest match confidence score. This Enigma ID will start with an E.

  2. You would query the ID endpoint with the Enigma ID from #2, and specify that you want the card_revenue and card_revenue_growth attributes in the query parameter

Finding revenue growth rate of every location

Now, let’s imagine a third scenario where you want to look at the growth rate of each location of the restaurant – but you don’t know the addresses of all of the locations.

  1. First you would query the match endpoint with the identifying information you have about the restaurant. You will specify in the match endpoint that you want information about the business entity
'https://api.enigma.com/businesses/match?business_entity_type=business'
  1. You would identify the enigma ID with the highest match confidence score. This Enigma ID will start with an B.

In the response object for that ID, there is a list of all of the location IDs associated with that business like what’s listed below

"business_location_enigma_ids": [
       "E0013165d200004146",
       "E000b32fc000002615",
       "E000f971c20000020c"
   ],
  1. You would then want to query the ID endpoint with each of the three Enigma Location ID from #3 above, and specify that you want the card_revenues and card_revenues_growth attributes in the query parameter