getOffer - www-getstorify-com/getstorify-offers-php-sdk GitHub Wiki
(Since v1.x)
getOffer - This method will fetch all the offers of ACTIVE stores of a user.
Parameters:
- storeid
- offerid
- offertitle
- offerstatus
- store_city
- store_citylocation
- page
- pagelimit
Fetch offers
Just call the getOffer()
method.
Note! You will get first few offers (LIVE, EXPIRED) from your account on getStorify.
Example
$offersResult = $GetStorifyOffersObj->getOffer();
Fetch offers of a specific store
Pass the storeid
to fetch the offers of a specific store.
Example
Fetch offers of a store having id gsStore1
.
$offersResult = $GetStorifyOffersObj->getOffer(
$storeid = "gsStore1"
);
Fetch specific offer
Pass the offerid
to fetch specific offer.
Example
Fetch offer having id gsOffer1
.
$offersResult = $GetStorifyOffersObj->getOffer(
$storeid = null,
$offerid = "gsOffer1"
);
Fetch offer by title
Pass the offertitle
to fetch offers by title.
Example
Fetch offers having title Sale
.
$offersResult = $GetStorifyOffersObj->getOffer(
$storeid = null,
$offerid = null,
$offertitle = "Sale"
);
Fetch offers by status
Pass the offerstatus
to fetch offers by status.
Following values can be used to fetch offers by status.
- LIVE
- EXPIRED
Example
Fetch LIVE offers.
$offersResult = $GetStorifyOffersObj->getOffer(
$storeid = null,
$offerid = null,
$offertitle = null,
$offerstatus = "LIVE"
);
Fetch offers by store city
Pass store_city
to fetch offers by store city.
Example
Fetch offers of stores that are in city Bangalore
.
$offersResult = $GetStorifyOffersObj->getOffer(
$storeid = null,
$offerid = null,
$offertitle = null,
$offerstatus = null,
$store_city = "Bangalore"
);
Fetch offers by city location of stores
Pass store_citylocation
to fetch offers by city location of stores.
Example
Fetch offers running in stores that have city location as Indiranagar
.
$offersResult = $GetStorifyOffersObj->getOffer(
$storeid = null,
$offerid = null,
$offertitle = null,
$offerstatus = null,
$store_city = null,
$store_citylocation = "Indiranagar"
);
Fetch offers page wise
By default, each page
will hold max 10 records. So, page 1 will return first 10 offers. Page 2 will return the next 10 and so on.
Example
Fetching page 1.
$offersResult = $GetStorifyOffersObj->getOffer(
$storeid = null,
$offerid = null,
$offertitle = null,
$offerstatus = null,
$store_city = null,
$store_citylocation = null,
$page = 1
);
Fetch offers with page limit
Pre page can have max 10 records. Pass the pagelimit
to control the total records fetched per page.
Example
Fetching 5 records per page.
$offersResult = $GetStorifyOffersObj->getOffer(
$storeid = null,
$offerid = null,
$offertitle = null,
$offerstatus = null,
$store_city = null,
$store_citylocation = null,
$page = 1,
$pagelimit = 5
);