Difference between revisions of "Getting Locations"

From Enterprise Help
Jump to: navigation, search
Line 6: Line 6:
  
  
==== Example: ====
+
==== Sample Request:<br/> ====
  
 
   GET [https://enterprise.qa.fishbowl.com/api/odata/v1/SITE_ID/Stores https://services.fishbowl.com/api/odata/v1/SITE_ID/Stores] HTTP/1.1
 
   GET [https://enterprise.qa.fishbowl.com/api/odata/v1/SITE_ID/Stores https://services.fishbowl.com/api/odata/v1/SITE_ID/Stores] HTTP/1.1
  Accept: application/json
+
Accept: application/json
  Authorization: Bearer u7kBYz1UhHkoRSc7V4gruBs-4sEpIkFV-F4LGiFMwfGwJNnT_JzNft
+
Authorization: Bearer u7kBYz1UhHkoRSc7V4gruBs-4sEpIkFV-F4LGiFMwfGwJNnT_JzNft
  g6_Zm0yWi8P m60iPlmCCHUSwCX5Uru-OJq2jzhbT-E6nAc1OwzghTCmeoo0K69ubDBMFX5hyKlc
+
g6_Zm0yWi8P m60iPlmCCHUSwCX5Uru-OJq2jzhbT-E6nAc1OwzghTCmeoo0K69ubDBMFX5hyKlc
  AjA9H3Vs-ZNjNYKarpSO5rA5ubG5-Va5Aigm9mp-Pre-EaGAY_HBdxZi-LBMSQ_mSjyIDPBpLFYP
+
AjA9H3Vs-ZNjNYKarpSO5rA5ubG5-Va5Aigm9mp-Pre-EaGAY_HBdxZi-LBMSQ_mSjyIDPBpLFYP
  BNzK3cu0xGobGsFLxPtDG3urs_4abXZtvxN8wm9rpsgr
+
BNzK3cu0xGobGsFLxPtDG3urs_4abXZtvxN8wm9rpsgr
  
  
  
==== Example Response: ====
+
==== Sample Response:<br/> ====
  
 
   {
 
   {
    "odata.metadata":"[http://enterprise.qa.fishbowl.com/API/odata/v1/2147483947/ http://services.fishbowl.com/API/odata/v1/2147483947/]
+
    "odata.metadata":"[http://enterprise.qa.fishbowl.com/API/odata/v1/2147483947/ http://services.fishbowl.com/API/odata/v1/2147483947/]
                      $metadata#Stores",
+
                      $metadata#Stores",
    "value":[
+
    "value":[
        {
+
      {
          "StoreID":37101,
+
          "StoreID":37101,
          "BrandID":501,
+
          "BrandID":501,
          "StoreCode":"001",
+
          "StoreCode":"001",
          "StoreName":"CA - MISSION HILLS (11010 SEPULVEDA BLVD)",
+
          "StoreName":"CA - MISSION HILLS (11010 SEPULVEDA BLVD)",
          "PrimaryContactTitle":null,
+
          "PrimaryContactTitle":null,
          "PrimaryContactFirstName":null,
+
          "PrimaryContactFirstName":null,
          "PrimaryContactLastName":null,
+
          "PrimaryContactLastName":null,
          "PrimaryContactPhone":null,
+
          "PrimaryContactPhone":null,
          "PrimaryContactEmail":null,
+
          "PrimaryContactEmail":null,
          "SecondaryContactTitle":null,
+
          "SecondaryContactTitle":null,
          "SecondaryContactFirstName":null,
+
          "SecondaryContactFirstName":null,
          "SecondaryContactLastName":null,
+
          "SecondaryContactLastName":null,
          "SecondaryContactPhone":null,
+
          "SecondaryContactPhone":null,
          "SecondaryContactEmail":null,
+
          "SecondaryContactEmail":null,
          "DisplayStoreName":"CA - MISSION HILLS (11010 SEPULVEDA BLVD)",
+
          "DisplayStoreName":"CA - MISSION HILLS (11010 SEPULVEDA BLVD)",
          "DisplayAddress1":"11010 SEPULVEDA BLVD",
+
          "DisplayAddress1":"11010 SEPULVEDA BLVD",
          "DisplayAddress2":null,
+
          "DisplayAddress2":null,
          "MailingAddress1":"11010 SEPULVEDA BLVD",
+
          "MailingAddress1":"11010 SEPULVEDA BLVD",
          "MailingAddress2":null,
+
          "MailingAddress2":null,
          "MailingCity":"MISSION HILLS",
+
          "MailingCity":"MISSION HILLS",
          "MailingState":"CA",
+
          "MailingState":"CA",
          "MailingZip":"91345",
+
          "MailingZip":"91345",
          "MailingCountry":"USA",
+
          "MailingCountry":"USA",
          "StorePhone":null,
+
          "StorePhone":null,
          "StoreEmail":null,
+
          "StoreEmail":null,
          "StoreFax":null,
+
          "StoreFax":null,
          "ShowOnJoin":true,
+
          "ShowOnJoin":true,
          "ParticipatesInMailings":true,
+
          "ParticipatesInMailings":true,
          "JoinPageURL":null,
+
          "JoinPageURL":null,
          "JoinPageLocationText":"CA - MISSION HILLS (11010 SEPULVEDA BLVD)",
+
          "JoinPageLocationText":"CA - MISSION HILLS (11010 SEPULVEDA BLVD)",
          "StatusCode":"OP",
+
          "StatusCode":"OP",
          "Latitude":null,
+
          "Latitude":null,
          "Longitude":null,
+
          "Longitude":null,
          "CreatedUtc":"2008-10-25T02:40:29.307Z"
+
          "CreatedUtc":"2008-10-25T02:40:29.307Z"
        },
+
      },
        {
+
      {
          "StoreID":37100,
+
          "StoreID":37100,
          "BrandID":501,
+
          "BrandID":501,
          "StoreCode":"002",
+
          "StoreCode":"002",
          "StoreName":"CO - THORNTON (501 E 84TH ST)",
+
          "StoreName":"CO - THORNTON (501 E 84TH ST)",
          "PrimaryContactTitle":null,
+
          "PrimaryContactTitle":null,
          "PrimaryContactFirstName":null,
+
          "PrimaryContactFirstName":null,
          "PrimaryContactLastName":null,
+
          "PrimaryContactLastName":null,
          "PrimaryContactPhone":null,
+
          "PrimaryContactPhone":null,
          "PrimaryContactEmail":null,
+
          "PrimaryContactEmail":null,
          "SecondaryContactTitle":null,
+
          "SecondaryContactTitle":null,
          "SecondaryContactFirstName":null,
+
          "SecondaryContactFirstName":null,
          "SecondaryContactLastName":null,
+
          "SecondaryContactLastName":null,
          "SecondaryContactPhone":null,
+
          "SecondaryContactPhone":null,
          "SecondaryContactEmail":null,
+
          "SecondaryContactEmail":null,
          "DisplayStoreName":"CO - THORNTON (501 E 84TH ST)",
+
          "DisplayStoreName":"CO - THORNTON (501 E 84TH ST)",
          "DisplayAddress1":"501 E 84TH ST",
+
          "DisplayAddress1":"501 E 84TH ST",
          "DisplayAddress2":null,
+
          "DisplayAddress2":null,
          "MailingAddress1":"501 E 84TH ST",
+
          "MailingAddress1":"501 E 84TH ST",
          "MailingAddress2":null,
+
          "MailingAddress2":null,
          "MailingCity":"THORNTON",
+
          "MailingCity":"THORNTON",
          "MailingState":"CO",
+
          "MailingState":"CO",
          "MailingZip":"80229",
+
          "MailingZip":"80229",
          "MailingCountry":"USA",
+
          "MailingCountry":"USA",
          "StorePhone":null,
+
          "StorePhone":null,
          "StoreEmail":null,
+
          "StoreEmail":null,
          "StoreFax":null,
+
          "StoreFax":null,
          "ShowOnJoin":true,
+
          "ShowOnJoin":true,
          "ParticipatesInMailings":true,
+
          "ParticipatesInMailings":true,
          "JoinPageURL":null,
+
          "JoinPageURL":null,
          "JoinPageLocationText":"CO - THORNTON (501 E 84TH ST)",
+
          "JoinPageLocationText":"CO - THORNTON (501 E 84TH ST)",
          "StatusCode":"OP",
+
          "StatusCode":"OP",
          "Latitude":null,
+
          "Latitude":null,
          "Longitude":null,
+
          "Longitude":null,
          "CreatedUtc":"2008-10-25T02:40:29.29Z"         
+
          "CreatedUtc":"2008-10-25T02:40:29.29Z"         
        }
+
      }
    ]
+
    ]
  }
+
}

Revision as of 07:51, 14 May 2015

Some users may manage a business with multiple locations. If this is the case, it is strongly recommended that members are added with a StoreCode value. StoreCode can be used to target recipients when sending mailings with location-specific content. For sites that only have a single location, that location usually will have 001 as the StoreCode.


To get all locations associated with a specific Site, send a GET request to the Stores endpoint.


Sample Request:

  GET https://services.fishbowl.com/api/odata/v1/SITE_ID/Stores HTTP/1.1
Accept: application/json
Authorization: Bearer u7kBYz1UhHkoRSc7V4gruBs-4sEpIkFV-F4LGiFMwfGwJNnT_JzNft
g6_Zm0yWi8P m60iPlmCCHUSwCX5Uru-OJq2jzhbT-E6nAc1OwzghTCmeoo0K69ubDBMFX5hyKlc
AjA9H3Vs-ZNjNYKarpSO5rA5ubG5-Va5Aigm9mp-Pre-EaGAY_HBdxZi-LBMSQ_mSjyIDPBpLFYP
BNzK3cu0xGobGsFLxPtDG3urs_4abXZtvxN8wm9rpsgr


Sample Response:

  {
   "odata.metadata":"http://services.fishbowl.com/API/odata/v1/2147483947/
                     $metadata#Stores",
   "value":[
      {
         "StoreID":37101,
         "BrandID":501,
         "StoreCode":"001",
         "StoreName":"CA - MISSION HILLS (11010 SEPULVEDA BLVD)",
         "PrimaryContactTitle":null,
         "PrimaryContactFirstName":null,
         "PrimaryContactLastName":null,
         "PrimaryContactPhone":null,
         "PrimaryContactEmail":null,
         "SecondaryContactTitle":null,
         "SecondaryContactFirstName":null,
         "SecondaryContactLastName":null,
         "SecondaryContactPhone":null,
         "SecondaryContactEmail":null,
         "DisplayStoreName":"CA - MISSION HILLS (11010 SEPULVEDA BLVD)",
         "DisplayAddress1":"11010 SEPULVEDA BLVD",
         "DisplayAddress2":null,
         "MailingAddress1":"11010 SEPULVEDA BLVD",
         "MailingAddress2":null,
         "MailingCity":"MISSION HILLS",
         "MailingState":"CA",
         "MailingZip":"91345",
         "MailingCountry":"USA",
         "StorePhone":null,
         "StoreEmail":null,
         "StoreFax":null,
         "ShowOnJoin":true,
         "ParticipatesInMailings":true,
         "JoinPageURL":null,
         "JoinPageLocationText":"CA - MISSION HILLS (11010 SEPULVEDA BLVD)",
         "StatusCode":"OP",
         "Latitude":null,
         "Longitude":null,
         "CreatedUtc":"2008-10-25T02:40:29.307Z"
      },
      {
         "StoreID":37100,
         "BrandID":501,
         "StoreCode":"002",
         "StoreName":"CO - THORNTON (501 E 84TH ST)",
         "PrimaryContactTitle":null,
         "PrimaryContactFirstName":null,
         "PrimaryContactLastName":null,
         "PrimaryContactPhone":null,
         "PrimaryContactEmail":null,
         "SecondaryContactTitle":null,
         "SecondaryContactFirstName":null,
         "SecondaryContactLastName":null,
         "SecondaryContactPhone":null,
         "SecondaryContactEmail":null,
         "DisplayStoreName":"CO - THORNTON (501 E 84TH ST)",
         "DisplayAddress1":"501 E 84TH ST",
         "DisplayAddress2":null,
         "MailingAddress1":"501 E 84TH ST",
         "MailingAddress2":null,
         "MailingCity":"THORNTON",
         "MailingState":"CO",
         "MailingZip":"80229",
         "MailingCountry":"USA",
         "StorePhone":null,
         "StoreEmail":null,
         "StoreFax":null,
         "ShowOnJoin":true,
         "ParticipatesInMailings":true,
         "JoinPageURL":null,
         "JoinPageLocationText":"CO - THORNTON (501 E 84TH ST)",
         "StatusCode":"OP",
         "Latitude":null,
         "Longitude":null,
         "CreatedUtc":"2008-10-25T02:40:29.29Z"         
      }
   ]
}