Note that the API paths has been changed to be a bit more RESTfull.

Valid appId is mandatory. You can use the appId from examples for testing (when we go to production we will provision new appId).

To receive json pass application/json in the header (by default response is xml). You can do it in curl like this:

curl -i -H "Accept: application/json" "http://d.2ya.it/dre/api/rest/search/gasstations?appId={AppID}&latitude=43.650578&longitude=-79.367723"

Paging & Number of results

For all of the following APIs, you can add parameters

page={Positive integer}

(default is 1, The starting page for the search result.)

pageSize={Positive integer}

(default is 10, The desired number of each call)

Search gas station nearby:

Search for Toronto:

http://d.2ya.it/dre/api/rest/search/gasstations?appId={AppID}&latitude=43.650578&longitude=-79.367723&page=1&pageSize=10&radius=20

 <poyntgas version="1.6">
    <getGasPricesResponse>
    <more>true</more>
    <station>
        <num>1</num>
        <id>43.650578_-79.367723_416-955-0727</id>
        <street>176 Front St E</street>
        <city>Toronto</city>
        <postal>M5A 1E6</postal>
        <country>Canada</country>
        <countryCode>CA</countryCode>
        <chain>Econo</chain>
        <priceEditable>false</priceEditable>
        <isClickThru>true</isClickThru>
        <name>Econo</name>
        <latitude>43.650578</latitude>
        <longitude>-79.367723</longitude>
        <distance>0.00</distance>
        <services>
            <service>Open 24 Hours</service>
            <service>Open 24 Hours</service>
            <service>ATM</service>
            <service>ATM</service>
            <service>Convenience</service>
            <service>Convenience</service>
            <service>Pay at the Pump</service>
            <service>Pay at the Pump</service>
            <service>Restrooms</service>
            <service>Restrooms</service>
            <service>Air</service>
            <service>Air</service>
            <service>Pay Phone</service>
            <service>Pay Phone</service>
            <service>Unleaded</service>
            <service>Diesel</service>
        </services>
        <phoneNumbers>
            <phone>416-955-0727</phone>
        </phoneNumbers>
        <direction azimuth="0.0">N</direction>
     <products>
        <product>
            <name>Regular</name>
            <grade>3</grade>
            <fuel>20</fuel>
            <priceNumeric>129.6</priceNumeric>
            <price>129.6</price>
            <fuzzyTime>7 hours ago</fuzzyTime>
            <time>07:29AM</time>
            <date>2013-09-13</date>
            </product>
        <product>
            <name>Mid-grade</name>
            <grade>4</grade>
            <fuel>20</fuel>
            <priceNumeric>140.9</priceNumeric>
            <price>140.9</price>
            <fuzzyTime>1 day ago</fuzzyTime>
            <time>09:04PM</time>
            <date>2013-09-11</date>
         </product>
         <product>
           <name>Premium</name>
	   <grade>5</grade>
           <fuel>20</fuel>
           <priceNumeric>148.9</priceNumeric>
           <price>148.9</price>
           <fuzzyTime>1 day ago</fuzzyTime>
           <time>09:04PM</time>
           <date>2013-09-11</date>
         </product>
         <product>
           <name>Diesel</name>
           <grade>1</grade>
           <fuel>21</fuel>
           <priceNumeric>126.9</priceNumeric>
           <price>126.9</price>
           <fuzzyTime>7 hours ago</fuzzyTime>
           <time>07:29AM</time>
           <date>2013-09-13</date>
           </product>
        </products>
        <partners>
           <partner>GasBuddy</partner>
         </partners>
      <icons>
      <listingIcons>
          <listingIcon>gasbuddy_listicon</listingIcon>
      </listingIcons>
      <profileIcons>
          <profileIcon>gasbuddy_profileicon</profileIcon>
       </profileIcons>
      </icons>
</station>
..

Search gas station with regular fuel (filter=price and grade=3)

http://d.2ya.it/dre/api/rest/search/gasstations?appId={AppID}&latitude=43.650578&longitude=-79.367723&page=1&pageSize=10&radius=20&filter=price&grade=3

Parameter grate= 1 (Diesel), 3 (Regular), 4 (Mid-grade), 5 (Premium)

Search single gas station by Id:

Get gas price categories:

http://d.2ya.it/dre/api/rest/search/gascategories?appId={AppID}&latitude=53.51808&longitude=-113.51201

<poynt version="1.6">
	<categories more="false" totalPages="1">
	   <category id="3">Regular</category>
	   <category id="4">Mid-grade</category>
	   <category id="5">Premium</category>
	   <category id="1">Diesel</category>
	</categories>
</poynt>