php api client library for 27coupons api
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

27coupons: php-sdk is one of the largest aggregators of coupons and offers in India. We offer access to our data allowing developers to build upon and extend their applications in new and creative ways. Our API framework is built upon REST architecture.

Authentication 27coupons supports api key authentication and key has to be sent in query string. Visit to generate your api key.

Response Format json is the default response format.

  • Every call is logged and status_id is returned to help in error tracking and debugging.
  • status_code is 200 for a successful request, 401 for authentication failure, 403 when rate limited, 404 to indicate not-found responses, and 400 for all other invalid requests or responses.
  • status_txt will be a value that describes the nature of any error encountered.

Rate Limiting Our standard rate limit is 100 calls. You can write to our support team and let us know your business case for accessing our API and we will increase it.

Api Base URL

Api Explorer

SDKs php

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 2.0
  • Build package: io.swagger.codegen.languages.PhpClientCodegen


PHP 5.5 and later

Installation & Usage


To install the bindings via Composer, add the following to composer.json:

    "require": {
        "27coupons/php-sdk": "1.*"

Then run composer install

or run composer require 27coupons/php-sdk

Getting Started

Please follow the installation procedure and then run the following:

require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
$config = coupons27\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = coupons27\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');

$apiInstance = new coupons27\Api\DataApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
$id = 56; // int | id of coupon

try {
    $result = $apiInstance->getCoupon($id);
} catch (Exception $e) {
    echo 'Exception when calling DataApi->getCoupon: ', $e->getMessage(), PHP_EOL;


Documentation for API Endpoints

All URIs are relative to

Class Method HTTP request Description
DataApi getCoupon GET /data/get-coupon/
DataApi searchBanks GET /data/search-banks/
DataApi searchCards GET /data/search-cards/
DataApi searchCategories GET /data/search-categories/
DataApi searchCoupons GET /data/search-coupons/
DataApi searchStores GET /data/search-stores/
DataApi searchWallets GET /data/search-wallets/
DataApi trendingCoupons GET /data/trending-coupons/

Documentation For Models

Documentation For Authorization


  • Type: API key
  • API key parameter name: api_key
  • Location: URL query string