NAV Navbar
PHP HTTP Shell JavaScript

REST API v3.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

REST API version 3.0 is currently in Beta and is NOT stable. Please use version 2.0^ for production ready applications.

Base URLs:

Email: Reward Gateway Engineering Team Web: Reward Gateway Engineering Team License: Apache 2.0

Authentication

Scope Scope Description
user.read Read your profile information
user.write Update user's profile info
user.instrument.read View user's saved instruments
user.instrument.write Manage user's saved instruments
user.payment.read View user's stored payment card information
user.order.read View user’s completed order information
user.savings_account View user's savings account statistics, cashback balance
user.retailers Manage user's retailer preferences
programme.read View programme information
programme.modules View programme's enabled modules
programme.statistics View programme's dashboard data, milestones, timeline of events
checkout.basket.read View active basket information
checkout.basket.write Update basket by adding or removing items
checkout.payment Make payment on behalf of user
retailers.read View a list of retailers, products and offers supported through SmartSpending™
device.manage Manage registering/unregistering devices for notifications to be sent out
scim.readOnly Read member information on your programme. This will NOT allow the client to write any data.
scim.readWrite Read member information on your programme as well as be able to make changes to Eligibility Listen
user.app.review App review service
notification.read Read members notifications
notification.write Manage notifcations
notification.preferences.read Read members notification preferences
notification.preferences.write Manager members notification preferences
srw.feed.read List the Social Recognition Wall feed
srw.feed.write Add feed items the Social Recognition Wall feed
srw.feed.filter.read Filters on Social Recognition Wall
srw.feed.reaction.read List the Social Recognition Wall feed item reactions
srw.feed.reaction.write React on the Social Recognition Wall feed item
srw.feed.comment.read List the Social Recognition Wall feed item comments
srw.feed.comment.write Comment on the Social Recognition Wall feed item
srw.feed.comment.reply.read List the Social Recognition Wall feed item comment replies
srw.feed.comment.reply.write Reply on the Social Recognition Wall feed item comment
srw.feed.reaction.toolbar.read List the Social Recognition Wall toolbar reactions
srw.ecard.read List the Social Recognition Wall ecard categories within ecards
srw.user.activity.read List user SRW activity
srw.user.stats.read List user SRW statistics
user.hierarchy.read List user hierarchy
user.details.read List user details
user.search Search members
surveys.read Read surveys data
surveys.write Manage surveys data
programme.create Create a programme
programme.write Write to a programme
programme.admin Manage all programmes
trs.read Read TRS Statements for the user
recognition.external.read Get external recognition form structure.
recognition.external.write Store external recognition details.
rr.rules.admin Read and write R&R rules

SmartSpending™

Endpoints to manage SmartSpending™ related functionality. i.e. View offers, make purchases and manage * a member's shopping basket.

Get all items in the shopping basket

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/basket', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/basket HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X GET https://api.rewardgateway.net/basket \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/basket',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /basket

This endpoint will return all items the current member has in their shopping basket.

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
basketId query string false Basket identifier
compartmentId query integer false Compartment Id

Example responses

200 Response

{
  "basketId": "string",
  "currency": "string",
  "total": {
    "formattedValue": "£12.34",
    "value": 12.34
  },
  "subtotal": {
    "formattedValue": "£12.34",
    "value": 12.34
  },
  "saving": {
    "formattedValue": "£12.34",
    "value": 12.34
  },
  "items": [
    {
      "id": "string",
      "type": "string",
      "productId": 0,
      "productType": "string",
      "name": "string",
      "image": "string",
      "currency": "string",
      "price": {
        "formattedValue": "£12.34",
        "value": 12.34
      },
      "cost": {
        "formattedValue": "£12.34",
        "value": 12.34
      },
      "tax": {
        "formattedValue": "£12.34",
        "value": 12.34
      },
      "saving": {
        "formattedValue": "£12.34",
        "value": 12.34
      },
      "quantity": 0,
      "termsAndConditions": "string",
      "adjustments": [
        null
      ],
      "variantInfo": [
        "string"
      ],
      "useQuantity": true
    }
  ],
  "messages": [
    null
  ],
  "rrUsed": {
    "formattedValue": "£12.34",
    "value": 12.34
  },
  "originalCurrencySubtotal": {
    "formattedValue": "£12.34",
    "value": 12.34
  }
}

Responses

Status Meaning Description Schema
200 OK Successful operation basket
403 Forbidden Access to the resource has been denied errorModel
404 Not Found Basket was not found errorModel

Response Headers

Status Header Type Format Description
200 ETag string ETag version of the response

Add an item to the shopping basket

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'multipart/form-data',
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/basket/{basketId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/basket/{basketId} HTTP/1.1
Host: api.rewardgateway.net
Content-Type: multipart/form-data
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X POST https://api.rewardgateway.net/basket/{basketId} \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'

const inputBody = '{
  "productId": 0,
  "amount": 0,
  "cardId": 0
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/basket/{basketId}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /basket/{basketId}

This endpoint allows you to add an item to the current member's shopping basket.

Body parameter

productId: 0
amount: 0
cardId: 0

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
basketId path string true Basket identifier
compartmentId query integer false Compartment Id
body body object false none
» productId body integer true Product Identifier
» amount body integer true Product Amount
» cardId body integer false Reloadable Card Identifier (only for topups)

Example responses

200 Response

{
  "code": null,
  "message": null,
  "details": [
    null
  ]
}

Responses

Status Meaning Description Schema
200 OK Basket updated successfully standardModel
400 Bad Request Invalid request errorModel
403 Forbidden Access to the resource has been denied errorModel
404 Not Found Product was not found errorModel

Clear the shopping basket

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.rewardgateway.net/basket/{basketId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE https://api.rewardgateway.net/basket/{basketId} HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X DELETE https://api.rewardgateway.net/basket/{basketId} \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/basket/{basketId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /basket/{basketId}

This endpoint will clear all items currently available in the current member's shopping * basket.

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
basketId path string true Basket identifier
compartmentId query integer false Compartment Id

Example responses

200 Response

{
  "code": null,
  "message": null,
  "details": [
    null
  ]
}

Responses

Status Meaning Description Schema
200 OK Basket emptied successfully standardModel
403 Forbidden Access to the resource has been denied errorModel
404 Not Found Basket was not found errorModel

Remove a single item the shopping basket

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.rewardgateway.net/basket/{basketId}/{itemId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE https://api.rewardgateway.net/basket/{basketId}/{itemId} HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X DELETE https://api.rewardgateway.net/basket/{basketId}/{itemId} \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/basket/{basketId}/{itemId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /basket/{basketId}/{itemId}

This endpoint removes a single product from the current member's shopping basket

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
basketId path string true Basket identifier
itemId path string true Basket item identifier
compartmentId query integer false Compartment Id

Example responses

200 Response

{
  "code": null,
  "message": null,
  "details": [
    null
  ]
}

Responses

Status Meaning Description Schema
200 OK Basket updated successfully standardModel
400 Bad Request Invalid request errorModel
403 Forbidden Access to the resource has been denied errorModel
404 Not Found Basket was not found errorModel

Purchase items currently in the shopping basket

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'multipart/form-data',
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/checkout', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/checkout HTTP/1.1
Host: api.rewardgateway.net
Content-Type: multipart/form-data
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X POST https://api.rewardgateway.net/checkout \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'

const inputBody = '{
  "basketId": "string",
  "applyCashback": true,
  "telephoneNumber": "string",
  "mobilePhoneNumber": "string",
  "cardCVV": "string",
  "cardId": 0,
  "cardBin": "string",
  "cardLast": "string",
  "cardPaymentMethod": "string",
  "cardExpiryMonth": "string",
  "cardExpiryYear": "string",
  "firstName": "string",
  "lastName": "string",
  "addressLine1": "string",
  "addressLine2": "string",
  "addressLine3": "string",
  "addressLine4": "string",
  "postalCode": "string",
  "cardTokenize": true,
  "cardTokenAlias": "string",
  "otp": "string",
  "cko-card-token": "string"
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/checkout',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /checkout

This endpoint will purchase all items currently available in the shopping basket

Body parameter

basketId: string
applyCashback: true
telephoneNumber: string
mobilePhoneNumber: string
cardCVV: string
cardId: 0
cardBin: string
cardLast: string
cardPaymentMethod: string
cardExpiryMonth: string
cardExpiryYear: string
firstName: string
lastName: string
addressLine1: string
addressLine2: string
addressLine3: string
addressLine4: string
postalCode: string
cardTokenize: true
cardTokenAlias: string
otp: string
cko-card-token: string

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
body body object false none
» basketId body string true Basket identifier
» applyCashback body boolean true Use cashback balance
» telephoneNumber body string true Telephone Number
» mobilePhoneNumber body string false Mobile number where the SMS voucher will be send.
» cardCVV body string false Payment card CVV (not required if fully paying with cashback)
» cardId body integer true Payment card identifier
» cardBin body string false Payment card bin
» cardLast body string false Payment card last 4 digits
» cardPaymentMethod body string false Payment card method
» cardExpiryMonth body string false Payment card expiry month
» cardExpiryYear body string false Payment card expiry year
» firstName body string false Payment owner's first name
» lastName body string false Payment owner's last name
» addressLine1 body string false Payment owner's address line 1
» addressLine2 body string false Payment owner's address line 2
» addressLine3 body string false Payment owner's address line 3
» addressLine4 body string false Payment owner's address line 4
» postalCode body string false Payment owner's postal code
» cardTokenize body boolean false Save token for payment card
» cardTokenAlias body string false Alias for payment card token
» otp body string false OneTimePasscode associated with the member's external user profile data.
» cko-card-token body string false Temp card token is required when the card is not validated

Detailed descriptions

» otp: OneTimePasscode associated with the member's external user profile data. * eg. Amazon/Avios user profile data

Example responses

200 Response

{
  "code": null,
  "message": null,
  "details": [
    null
  ]
}

Responses

Status Meaning Description Schema
200 OK Payment success standardModel
400 Bad Request Invalid request errorModel
403 Forbidden Access to the resource has been denied errorModel
404 Not Found Payment card is not found errorModel
500 Internal Server Error Internal error standardModel

Verify 3D Secure on a payment card

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'multipart/form-data',
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/checkout/verify3ds', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/checkout/verify3ds HTTP/1.1
Host: api.rewardgateway.net
Content-Type: multipart/form-data
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X POST https://api.rewardgateway.net/checkout/verify3ds \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'

const inputBody = '{
  "basketId": "string",
  "cko-payment-token": "string",
  "md": "string"
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/checkout/verify3ds',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /checkout/verify3ds

Verify 3D Secure on a payment card

Body parameter

basketId: string
cko-payment-token: string
md: string

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
compartmentId query string false Compartment identifier used for quick buy
body body object true none
» basketId body string true Basket identifier
» cko-payment-token body string true CKO payment token
» md body string true Merchant data

Example responses

200 Response

{
  "code": null,
  "message": null,
  "details": [
    null
  ]
}

Responses

Status Meaning Description Schema
200 OK Payment successful standardModel
400 Bad Request Invalid request errorModel
403 Forbidden Access to the resource has been denied errorModel
404 Not Found Payment not found errorModel
500 Internal Server Error Internal error standardModel

Get a list of vouchers

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/smartspending/voucher', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/smartspending/voucher HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X GET https://api.rewardgateway.net/smartspending/voucher \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/smartspending/voucher',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /smartspending/voucher

This endpoint returns a list of vouchers matching

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
retailer query integer false Filter results by retailer
fromDate query string false Filter results by date from
toDate query string false Filter results by date to
archived query boolean false Filter results by archival status
sort query string false Value must be one of 'retailer', 'date'
direction query string false Value must be one of 'asc', 'desc'
page query integer false Offset the number of results returned
limit query integer false Constraint the number of results returned

Example responses

200 Response

[
  {
    "transactionId": 0,
    "entityId": 0,
    "date": "string",
    "logo": "string",
    "name": "string",
    "type": "Paper",
    "denomination": 0,
    "redeemed": true,
    "archived": true,
    "refundable": true,
    "currency": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK Successful operation Inline
400 Bad Request Invalid request errorModel
403 Forbidden Access to the resource has been denied errorModel

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [minimalVoucher] false none none
» transactionId integer true none Voucher transaction identifier
» entityId integer true none Voucher entity identifier
» date string true none Voucher purchase date (from Order)
» logo string true none Voucher logo (from product/retailer)
» name string true none Voucher name (from product)
» type string true none Voucher product type
» denomination number(float) true none Voucher denomination
» redeemed boolean true none Voucher redemption status
» archived boolean true none Voucher archival status
» refundable boolean false none Is the voucher refundable
» currency string¦null false none Currency

Enumerated Values

Property Value
type Paper
type Electronic
type Card
type Topup
type SMS
type EGiftCard

Get a voucher balance

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/smartspending/voucher/balance/{transactionId}/{entityId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/smartspending/voucher/balance/{transactionId}/{entityId} HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X GET https://api.rewardgateway.net/smartspending/voucher/balance/{transactionId}/{entityId} \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/smartspending/voucher/balance/{transactionId}/{entityId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /smartspending/voucher/balance/{transactionId}/{entityId}

This endpoint will return the balance for a specific voucher

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
transactionId path integer true Voucher transaction identifier
entityId path integer true Voucher entity identifier

Example responses

200 Response

{
  "type": "string",
  "payload": [
    null
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful operation voucherBalance
403 Forbidden Access to the resource has been denied errorModel
404 Not Found Voucher is not found errorModel

Archive a voucher by id

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/smartspending/voucher/archive/{transactionId}/{entityId}/{archive}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/smartspending/voucher/archive/{transactionId}/{entityId}/{archive} HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X POST https://api.rewardgateway.net/smartspending/voucher/archive/{transactionId}/{entityId}/{archive} \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/smartspending/voucher/archive/{transactionId}/{entityId}/{archive}',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /smartspending/voucher/archive/{transactionId}/{entityId}/{archive}

This endpoint will archive a voucher based on а voucher id

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
transactionId path integer true Voucher transaction identifier
entityId path integer true Voucher entity identifier
archive path boolean true Archival status to apply

Example responses

403 Response

{
  "code": null,
  "message": null
}

Responses

Status Meaning Description Schema
204 No Content Voucher archival status successfully changed None
403 Forbidden Access to the resource has been denied errorModel
404 Not Found Voucher is not found errorModel
500 Internal Server Error Could not generate template errorModel

Reward Gateway for Small Business

All internal endpoints related to Reward Gateway for Small Businesses

kycCreateCheck

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/kyc/check', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/kyc/check HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X POST https://api.rewardgateway.net/kyc/check \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

const inputBody = '{
  "applicantId": "4d0c7e51-c6ec-4f09-ad7b-f77b6841f204"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/kyc/check',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /kyc/check

Create new check with the KYC Provider

Body parameter

{
  "applicantId": "4d0c7e51-c6ec-4f09-ad7b-f77b6841f204"
}

Parameters

Name In Type Required Description
body body Check false none

Example responses

200 Response

{
  "applicantId": "4d0c7e51-c6ec-4f09-ad7b-f77b6841f204",
  "checkId": "4d0c7e51-c6ec-4f09-ad7b-f77b6841f204"
}

Responses

Status Meaning Description Schema
200 OK Check entity Check

deleteOnboardingAddons

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.rewardgateway.net/onboarding/{uuid}/addons/{addonId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE https://api.rewardgateway.net/onboarding/{uuid}/addons/{addonId} HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X DELETE https://api.rewardgateway.net/onboarding/{uuid}/addons/{addonId} \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/onboarding/{uuid}/addons/{addonId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /onboarding/{uuid}/addons/{addonId}

delete selected addon to onboarding

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
uuid path string true Onboarding member identifier
addonId path string true Addon configuration identifier

Example responses

200 Response

[
  {
    "addonId": "2fe3ca84-3620-469c-9e4a-9ab7c9fa8357",
    "name": "Discounts",
    "description": "additional information",
    "price": 2,
    "required": true,
    "status": 1,
    "planId": "rgsb",
    "localeId": 1,
    "canRemove": true
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Onboarding Addons Details Inline
400 Bad Request Data validation errors standardModel

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [AddonEntity] false none [Subscription's Addon entity fields and helper methods]
» addonId string false none addon id
» name string false none addon name
» description string¦null false none addon description
» price number(float) false none addon unit price
» required boolean false none addon is required
» status integer false none addon status
» planId string¦null false none id of the plan
» localeId integer¦null false none locale id
» canRemove boolean¦null false none addon can be removed

getOnboardingAddons

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/onboarding/{uuid}/addons', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/onboarding/{uuid}/addons HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X GET https://api.rewardgateway.net/onboarding/{uuid}/addons \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/onboarding/{uuid}/addons',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /onboarding/{uuid}/addons

get onboarding addons detail by prospect

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
uuid path string true Onboarding member identifier

Example responses

200 Response

[
  {
    "addonId": "2fe3ca84-3620-469c-9e4a-9ab7c9fa8357",
    "name": "Discounts",
    "description": "additional information",
    "price": 2,
    "required": true,
    "status": 1,
    "planId": "rgsb",
    "localeId": 1,
    "canRemove": true
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Onboarding Addons Details Inline
400 Bad Request Data validation errors standardModel

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [AddonEntity] false none [Subscription's Addon entity fields and helper methods]
» addonId string false none addon id
» name string false none addon name
» description string¦null false none addon description
» price number(float) false none addon unit price
» required boolean false none addon is required
» status integer false none addon status
» planId string¦null false none id of the plan
» localeId integer¦null false none locale id
» canRemove boolean¦null false none addon can be removed

setOnboardingAddons

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/onboarding/{uuid}/addons', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/onboarding/{uuid}/addons HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X PUT https://api.rewardgateway.net/onboarding/{uuid}/addons \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'

const inputBody = '[
  {
    "addonId": "2fe3ca84-3620-469c-9e4a-9ab7c9fa8357",
    "name": "Discounts",
    "description": "additional information",
    "price": 2,
    "required": true,
    "status": 1,
    "planId": "rgsb",
    "localeId": 1,
    "canRemove": true
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/onboarding/{uuid}/addons',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /onboarding/{uuid}/addons

add/update selected addon to onboarding

Body parameter

[
  {
    "addonId": "2fe3ca84-3620-469c-9e4a-9ab7c9fa8357",
    "name": "Discounts",
    "description": "additional information",
    "price": 2,
    "required": true,
    "status": 1,
    "planId": "rgsb",
    "localeId": 1,
    "canRemove": true
  }
]

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
uuid path string true Onboarding member identifier
body body AddonEntity false none

Example responses

200 Response

[
  {
    "addonId": "2fe3ca84-3620-469c-9e4a-9ab7c9fa8357",
    "name": "Discounts",
    "description": "additional information",
    "price": 2,
    "required": true,
    "status": 1,
    "planId": "rgsb",
    "localeId": 1,
    "canRemove": true
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Onboarding Addons Details Inline
400 Bad Request Data validation errors standardModel

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [AddonEntity] false none [Subscription's Addon entity fields and helper methods]
» addonId string false none addon id
» name string false none addon name
» description string¦null false none addon description
» price number(float) false none addon unit price
» required boolean false none addon is required
» status integer false none addon status
» planId string¦null false none id of the plan
» localeId integer¦null false none locale id
» canRemove boolean¦null false none addon can be removed

Collect client's onboarding feedback value

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/onboarding/{uuid}/feedback', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/onboarding/{uuid}/feedback HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X PUT https://api.rewardgateway.net/onboarding/{uuid}/feedback \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'

const inputBody = '{
  "feedbackValue": 5,
  "message": "feedback message"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/onboarding/{uuid}/feedback',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /onboarding/{uuid}/feedback

This endpoint collect client onboarding feedback value

Body parameter

{
  "feedbackValue": 5,
  "message": "feedback message"
}

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
uuid path string true Onboarding member identifier
body body OnboardingFeedback false none

Example responses

200 Response

{
  "onboardingUuid": "327c1682-c7b7-11ec-9d64-0242ac120002",
  "feedbackValue": 5,
  "message": "feedback message"
}

Responses

Status Meaning Description Schema
200 OK Successful operation OnboardingFeedback
400 Bad Request Data validation errors standardModel

getReferralByHash

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/referrals/{referralCode}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/referrals/{referralCode} HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/referrals/{referralCode} \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/referrals/{referralCode}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /referrals/{referralCode}

Fetch referral code details if exists

Parameters

Name In Type Required Description
referralCode path string true none

Example responses

200 Response

{
  "hash": "1be2e9b9c638ed07528a",
  "companyNumberLabel": "Company Registration Number",
  "companyNumberRule": "\\/.*\\/",
  "couponType": "FIRSTMONTHFREE",
  "durationType": "one_time",
  "promotionText": "Exclusive to RG employees",
  "discountPercentage": 50,
  "skipAllowed": true,
  "plans": [
    "plan_id"
  ],
  "customBilling": false,
  "customBillingText": "custom text",
  "headingText": "custom text",
  "subHeadingText": "custom text",
  "ribbonText": "custom text",
  "teamNameLabel": "custom text",
  "emailLabel": "custom text",
  "displayStamp": 1,
  "stampTemplate": "custom_template",
  "period": 1
}

Responses

Status Meaning Description Schema
200 OK Generic referral entity PublicReferral
404 Not Found Referral code not found None

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/schemes/{schemeUuid}/magic-link', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/schemes/{schemeUuid}/magic-link HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/schemes/{schemeUuid}/magic-link \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/magic-link',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /schemes/{schemeUuid}/magic-link

Handle get current magic link configuration

Name In Type Required Description
schemeUuid path string true none

Example responses

200 Response

{
  "hash": "1be2e9b9c638ed07528a",
  "hashUrl": "https://site277.rewardgateway.dev/1be2e9b9c638ed07528a",
  "schemeUuid": "4d0c7e51-c6ec-4f09-ad7b-f77b6841f204",
  "isActive": true,
  "isAutoApprove": true,
  "dateAdded": "2020-10-01",
  "domains": [
    {
      "domain": "domain.com"
    }
  ]
}
Status Meaning Description Schema
200 OK Magic Link entity MagicLink
401 Unauthorized Unauthorized Access Exception None
404 Not Found Magic Link Not Found None

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/schemes/{schemeUuid}/magic-link', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/schemes/{schemeUuid}/magic-link HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X PUT https://api.rewardgateway.net/schemes/{schemeUuid}/magic-link \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

const inputBody = '{
  "schemeUuid": "4d0c7e51-c6ec-4f09-ad7b-f77b6841f204",
  "isActive": true,
  "isAutoApprove": true,
  "domains": [
    {
      "domain": "domain.com"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/magic-link',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /schemes/{schemeUuid}/magic-link

Update client magic link configuration

Body parameter

{
  "schemeUuid": "4d0c7e51-c6ec-4f09-ad7b-f77b6841f204",
  "isActive": true,
  "isAutoApprove": true,
  "domains": [
    {
      "domain": "domain.com"
    }
  ]
}
Name In Type Required Description
schemeUuid path string true none
body body MagicLink false none

Example responses

200 Response

{
  "hash": "1be2e9b9c638ed07528a",
  "hashUrl": "https://site277.rewardgateway.dev/1be2e9b9c638ed07528a",
  "schemeUuid": "4d0c7e51-c6ec-4f09-ad7b-f77b6841f204",
  "isActive": true,
  "isAutoApprove": true,
  "dateAdded": "2020-10-01",
  "domains": [
    {
      "domain": "domain.com"
    }
  ]
}
Status Meaning Description Schema
200 OK Magic Link Updated MagicLink
401 Unauthorized Unauthorized Access Exception None

addChurnOfferCoupon

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/schemes/{schemeUuid}/churn-offer', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/schemes/{schemeUuid}/churn-offer HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X POST https://api.rewardgateway.net/schemes/{schemeUuid}/churn-offer \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/churn-offer',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /schemes/{schemeUuid}/churn-offer

add RGSB churn offer coupon

Parameters

Name In Type Required Description
schemeUuid path string true none

Example responses

200 Response

[
  {
    "schemeUuid": "20925ed6-de4d-4860-9952-94fb774582ed",
    "email": "john.doe@rewardgateway.com",
    "firstName": "John",
    "lastName": "Doe",
    "type": "Charity",
    "status": "Active",
    "startDate": "2021-01-01 00:00:00",
    "freeTrialEndDate": "2021-01-14 00:00:00",
    "renewalDate": "2021-01-14 00:00:00",
    "billingDate": "2021-01-14 00:00:00",
    "cancelReasonId": 2,
    "otherReason": "",
    "churnOffer": false,
    "maxSeatCount": 150,
    "currentSeatCount": 1,
    "pricePerSeat": 3.5,
    "plan": "rgsb",
    "totalInvited": 3,
    "totalRegistered": 5,
    "totalRemoved": 1,
    "hasScheduledChange": true,
    "allowedPlanSwitchOptions": [
      {
        "allowedPlanSwitchOptions": "rgsb"
      }
    ],
    "billingAddress": [
      {
        "companyName": "Reward Gateway Ltd",
        "addressLineOne": "265 Tottenham Court Road",
        "addressLineTwo": "4th Floor",
        "county": "Greater London",
        "city": "London",
        "postalCode": "SM4 4AG",
        "country": "GB"
      }
    ],
    "total": 0,
    "amountDue": 0
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Subscription entity Inline
400 Bad Request Validaton errors None
404 Not Found Not found None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Subscription] false none [Class RGSB clients' Subscription data]
» schemeUuid string false read-only Unique scheme identifier
» email string false none Billing email address
» firstName string false none First Name
» lastName string false none Last Name
» type string false none Subscription type
» status string false none Subscription Status
» startDate string false read-only Subscription Start Date
» freeTrialEndDate string¦null false read-only Subscription End Date
» renewalDate string¦null false read-only Subscription next Renewal Date
» billingDate string¦null false read-only Subscription next Billing Date
» cancelReasonId integer¦null false none Selected cancel subscription reason id
» otherReason string¦null false none Other reason description
» churnOffer boolean false read-only Client got already churn offer
» maxSeatCount integer false read-only Allowed members limit
» currentSeatCount integer false none Current licence count
» pricePerSeat number(float)¦null false read-only price per seat
» plan string¦null false none ChargeBee plan id
» totalInvited integer false read-only total invited members
» totalRegistered integer false read-only total registered members
» totalRemoved integer false read-only total removed members
» hasScheduledChange boolean false read-only has scheduled subscriptions change
» allowedPlanSwitchOptions [object] false read-only allowed plan switch options
»» allowedPlanSwitchOptions string false none allowedPlanSwitchOptions
» billingAddress [BillingAddress] false none [Class RGSB clients' Billing Address data]
»» companyName string false none Billing Company Name
»» addressLineOne string false none Billing Address Line One
»» addressLineTwo string¦null false none Billing Address Line Two
»» county string¦null false none Billing County
»» city string¦null false none Billing City
»» postalCode string false none Billing Postal Code
»» country string¦null false read-only Billing Country
» total number(float)¦null false read-only Estimate total amount per seat
» amountDue number(float)¦null false read-only Estimate amount due per seat

Enumerated Values

Property Value
type Charity
type Regular
type RG Test
status Active
status NotRenewing
status Cancelled
status FreeTrial

getSubscriptionAddons

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/addons', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/addons HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X GET https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/addons \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/addons',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /schemes/{schemeUuid}/subscription/addons

get subscription addons detail by prospect

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
schemeUuid path string true scheme identifier

Example responses

200 Response

[
  {
    "addonId": "2fe3ca84-3620-469c-9e4a-9ab7c9fa8357",
    "name": "Discounts",
    "description": "additional information",
    "price": 2,
    "required": true,
    "status": 1,
    "planId": "rgsb",
    "localeId": 1,
    "canRemove": true
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Subscription Addons Details Inline
400 Bad Request Data validation errors standardModel
401 Unauthorized Unauthorized Access Exception None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [AddonEntity] false none [Subscription's Addon entity fields and helper methods]
» addonId string false none addon id
» name string false none addon name
» description string¦null false none addon description
» price number(float) false none addon unit price
» required boolean false none addon is required
» status integer false none addon status
» planId string¦null false none id of the plan
» localeId integer¦null false none locale id
» canRemove boolean¦null false none addon can be removed

setSubscriptionAddons

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/addons', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/addons HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X PUT https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/addons \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'

const inputBody = '[
  {
    "addonId": "2fe3ca84-3620-469c-9e4a-9ab7c9fa8357",
    "name": "Discounts",
    "description": "additional information",
    "price": 2,
    "required": true,
    "status": 1,
    "planId": "rgsb",
    "localeId": 1,
    "canRemove": true
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/addons',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /schemes/{schemeUuid}/subscription/addons

add/update selected addons to subscription

Body parameter

[
  {
    "addonId": "2fe3ca84-3620-469c-9e4a-9ab7c9fa8357",
    "name": "Discounts",
    "description": "additional information",
    "price": 2,
    "required": true,
    "status": 1,
    "planId": "rgsb",
    "localeId": 1,
    "canRemove": true
  }
]

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
schemeUuid path string true scheme identifier
body body AddonEntity false none

Example responses

200 Response

[
  {
    "addonId": "2fe3ca84-3620-469c-9e4a-9ab7c9fa8357",
    "name": "Discounts",
    "description": "additional information",
    "price": 2,
    "required": true,
    "status": 1,
    "planId": "rgsb",
    "localeId": 1,
    "canRemove": true
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Subscription Addons Details Inline
400 Bad Request Data validation errors standardModel
401 Unauthorized Unauthorized Access Exception None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [AddonEntity] false none [Subscription's Addon entity fields and helper methods]
» addonId string false none addon id
» name string false none addon name
» description string¦null false none addon description
» price number(float) false none addon unit price
» required boolean false none addon is required
» status integer false none addon status
» planId string¦null false none id of the plan
» localeId integer¦null false none locale id
» canRemove boolean¦null false none addon can be removed

fetchSubscriptionScheduledChanges

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/changes', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/changes HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/changes \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/changes',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /schemes/{schemeUuid}/subscription/changes

Handle get RGSB client's subscription scheduled changes

Parameters

Name In Type Required Description
schemeUuid path string true none

Example responses

200 Response

{
  "schemeUuid": "20925ed6-de4d-4860-9952-94fb774582ed",
  "status": "Active",
  "renewalDate": "2021-01-14 00:00:00",
  "currentSeatCount": 1,
  "plan": "rgsb",
  "hasScheduledChange": true,
  "addons": [
    {
      "addonId": "2fe3ca84-3620-469c-9e4a-9ab7c9fa8357",
      "name": "Discounts",
      "description": "additional information",
      "price": 2,
      "required": true,
      "status": 1,
      "planId": "rgsb",
      "localeId": 1,
      "canRemove": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK RGSB Subscription scheduled changes entity SubscriptionChanges
400 Bad Request Bad Request Exception - No changes are scheduled for this subscription None
401 Unauthorized Unauthorized Access Exception None

deleteSubscriptionScheduledChanges

Code samples

<?php

require 'vendor/autoload.php';

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/changes', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/changes HTTP/1.1
Host: api.rewardgateway.net

# You can also use wget
curl -X DELETE https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/changes


fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/changes',
{
  method: 'DELETE'

})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /schemes/{schemeUuid}/subscription/changes

Handle delete RGSB client's subscription scheduled changes

Parameters

Name In Type Required Description
schemeUuid path string true none

Responses

Status Meaning Description Schema
200 OK RGSB Subscription scheduled changes deleted None
400 Bad Request Bad Request Exception - No changes are scheduled for this subscription None
401 Unauthorized Unauthorized Access Exception None

fetchSubscriptionRenewalEstimate

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/renewalEstimate', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/renewalEstimate HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/renewalEstimate \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/renewalEstimate',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /schemes/{schemeUuid}/subscription/renewalEstimate

An estimate of the amount that will be charged when the subscription is billed next

Parameters

Name In Type Required Description
schemeUuid path string true Unique identifier to identify a scheme
planId query string false identifier to load different subscription plan
planQuantity query integer false subscription seats count
addons query string false uri encoded list of selected subscription identifiers of the addons

Example responses

200 Response

{
  "schemeUuid": "20925ed6-de4d-4860-9952-94fb774582ed",
  "total": 845,
  "amountDue": 845,
  "discountAmount": 845,
  "description": "RG for Small Business",
  "quantity": 1
}

Responses

Status Meaning Description Schema
200 OK RGSB Subscription scheduled changes entity Estimate
401 Unauthorized Unauthorized Access Exception None
404 Not Found Not Found Exception None

fetchSchemeSubscription

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/schemes/{schemeUuid}/subscription', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/schemes/{schemeUuid}/subscription HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/schemes/{schemeUuid}/subscription \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/subscription',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /schemes/{schemeUuid}/subscription

Handle get RGSB client's subscription data

Parameters

Name In Type Required Description
schemeUuid path string true none

Example responses

200 Response

{
  "schemeUuid": "20925ed6-de4d-4860-9952-94fb774582ed",
  "email": "john.doe@rewardgateway.com",
  "firstName": "John",
  "lastName": "Doe",
  "type": "Charity",
  "status": "Active",
  "startDate": "2021-01-01 00:00:00",
  "freeTrialEndDate": "2021-01-14 00:00:00",
  "renewalDate": "2021-01-14 00:00:00",
  "billingDate": "2021-01-14 00:00:00",
  "cancelReasonId": 2,
  "otherReason": "",
  "churnOffer": false,
  "maxSeatCount": 150,
  "currentSeatCount": 1,
  "pricePerSeat": 3.5,
  "plan": "rgsb",
  "totalInvited": 3,
  "totalRegistered": 5,
  "totalRemoved": 1,
  "hasScheduledChange": true,
  "allowedPlanSwitchOptions": [
    {
      "allowedPlanSwitchOptions": "rgsb"
    }
  ],
  "billingAddress": [
    {
      "companyName": "Reward Gateway Ltd",
      "addressLineOne": "265 Tottenham Court Road",
      "addressLineTwo": "4th Floor",
      "county": "Greater London",
      "city": "London",
      "postalCode": "SM4 4AG",
      "country": "GB"
    }
  ],
  "total": 0,
  "amountDue": 0
}

Responses

Status Meaning Description Schema
200 OK RGSB Subscription entity Subscription
401 Unauthorized Unauthorized Access Exception None

updateSchemeSubscription

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/schemes/{schemeUuid}/subscription', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/schemes/{schemeUuid}/subscription HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X PUT https://api.rewardgateway.net/schemes/{schemeUuid}/subscription \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

const inputBody = '{
  "email": "john.doe@rewardgateway.com",
  "firstName": "John",
  "lastName": "Doe",
  "type": "Charity",
  "status": "Active",
  "cancelReasonId": 2,
  "otherReason": "",
  "currentSeatCount": 1,
  "plan": "rgsb",
  "billingAddress": [
    {
      "companyName": "Reward Gateway Ltd",
      "addressLineOne": "265 Tottenham Court Road",
      "addressLineTwo": "4th Floor",
      "county": "Greater London",
      "city": "London",
      "postalCode": "SM4 4AG"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/subscription',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /schemes/{schemeUuid}/subscription

Update RGSB client's subscription data

Body parameter

{
  "email": "john.doe@rewardgateway.com",
  "firstName": "John",
  "lastName": "Doe",
  "type": "Charity",
  "status": "Active",
  "cancelReasonId": 2,
  "otherReason": "",
  "currentSeatCount": 1,
  "plan": "rgsb",
  "billingAddress": [
    {
      "companyName": "Reward Gateway Ltd",
      "addressLineOne": "265 Tottenham Court Road",
      "addressLineTwo": "4th Floor",
      "county": "Greater London",
      "city": "London",
      "postalCode": "SM4 4AG"
    }
  ]
}

Parameters

Name In Type Required Description
schemeUuid path string true none
body body Subscription false none

Example responses

200 Response

{
  "schemeUuid": "20925ed6-de4d-4860-9952-94fb774582ed",
  "email": "john.doe@rewardgateway.com",
  "firstName": "John",
  "lastName": "Doe",
  "type": "Charity",
  "status": "Active",
  "startDate": "2021-01-01 00:00:00",
  "freeTrialEndDate": "2021-01-14 00:00:00",
  "renewalDate": "2021-01-14 00:00:00",
  "billingDate": "2021-01-14 00:00:00",
  "cancelReasonId": 2,
  "otherReason": "",
  "churnOffer": false,
  "maxSeatCount": 150,
  "currentSeatCount": 1,
  "pricePerSeat": 3.5,
  "plan": "rgsb",
  "totalInvited": 3,
  "totalRegistered": 5,
  "totalRemoved": 1,
  "hasScheduledChange": true,
  "allowedPlanSwitchOptions": [
    {
      "allowedPlanSwitchOptions": "rgsb"
    }
  ],
  "billingAddress": [
    {
      "companyName": "Reward Gateway Ltd",
      "addressLineOne": "265 Tottenham Court Road",
      "addressLineTwo": "4th Floor",
      "county": "Greater London",
      "city": "London",
      "postalCode": "SM4 4AG",
      "country": "GB"
    }
  ],
  "total": 0,
  "amountDue": 0
}

Responses

Status Meaning Description Schema
200 OK Subscription is Updated Subscription
400 Bad Request Validaton errors None
401 Unauthorized Unauthorized Access Exception None

getRGSBAddons

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/rgsb/plans/{planId}/addons/{localeId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/rgsb/plans/{planId}/addons/{localeId} HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/rgsb/plans/{planId}/addons/{localeId} \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/rgsb/plans/{planId}/addons/{localeId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /rgsb/plans/{planId}/addons/{localeId}

get RGSB subscription addons detail by plan

Parameters

Name In Type Required Description
planId path string true none
localeId path integer true none

Example responses

200 Response

[
  {
    "addonId": "2fe3ca84-3620-469c-9e4a-9ab7c9fa8357",
    "name": "Discounts",
    "description": "additional information",
    "price": 2,
    "required": true,
    "status": 1,
    "planId": "rgsb",
    "localeId": 1,
    "canRemove": true
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Subscription Addons Details Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [AddonEntity] false none [Subscription's Addon entity fields and helper methods]
» addonId string false none addon id
» name string false none addon name
» description string¦null false none addon description
» price number(float) false none addon unit price
» required boolean false none addon is required
» status integer false none addon status
» planId string¦null false none id of the plan
» localeId integer¦null false none locale id
» canRemove boolean¦null false none addon can be removed

getRGSBAddonsByFilter

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/rgsb/plans/addons', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/rgsb/plans/addons HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/rgsb/plans/addons \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/rgsb/plans/addons',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /rgsb/plans/addons

get all RGSB subscription addons detail filter by plan Id and/or locale Id

Parameters

Name In Type Required Description
planId query string false none
localeId query integer false none
schemeUuid query string false none

Example responses

200 Response

[
  {
    "addonId": "2fe3ca84-3620-469c-9e4a-9ab7c9fa8357",
    "name": "Discounts",
    "description": "additional information",
    "price": 2,
    "required": true,
    "status": 1,
    "planId": "rgsb",
    "localeId": 1,
    "canRemove": true
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Subscription Addons Details Filtered by Plan Id and/or Locale Id Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [AddonEntity] false none [Subscription's Addon entity fields and helper methods]
» addonId string false none addon id
» name string false none addon name
» description string¦null false none addon description
» price number(float) false none addon unit price
» required boolean false none addon is required
» status integer false none addon status
» planId string¦null false none id of the plan
» localeId integer¦null false none locale id
» canRemove boolean¦null false none addon can be removed

getCancelReasons

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/schemes/{schemeUuid}/cancel-reasons', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/schemes/{schemeUuid}/cancel-reasons HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/schemes/{schemeUuid}/cancel-reasons \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/cancel-reasons',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /schemes/{schemeUuid}/cancel-reasons

get RGSB cancel subscription reasons

Parameters

Name In Type Required Description
schemeUuid path string true none

Example responses

200 Response

[
  {
    "id": 123,
    "description": "The timing is not quite right, but we’ll consider it again in future",
    "hasOffer": true,
    "detailsRequired": true
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Cancel Reason List Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [CancelReason] false none [Class RGSB cancel subscription reason data entity]
» id integer false none Unique reason identifier
» description string false none Cancel reason description
» hasOffer boolean false none Has additional offer
» detailsRequired boolean false none Has additional details

fetchSchemeSubscriptionCoupon

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/coupon', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/coupon HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/coupon \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/subscription/coupon',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /schemes/{schemeUuid}/subscription/coupon

Handle get RGSB client's subscription data

Parameters

Name In Type Required Description
schemeUuid path string true none

Example responses

200 Response

{
  "schemeUuid": "20925ed6-de4d-4860-9952-94fb774582ed",
  "isActive": true,
  "id": "discount",
  "name": "discount",
  "status": "active",
  "redemptions": 2,
  "discountType": "percentage",
  "discountPercentage": 30,
  "discountAmount": 100,
  "durationTime": "one_time",
  "durationMonth": 2
}

Responses

Status Meaning Description Schema
200 OK RGSB Subscription entity Coupon
401 Unauthorized Unauthorized Access Exception None

getRGSBPlan

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/rgsb/plans', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/rgsb/plans HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/rgsb/plans \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/rgsb/plans',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /rgsb/plans

get RGSB subscription plans detail

Parameters

Name In Type Required Description
locale query integer false none
planId query string false none

Example responses

200 Response

[
  {
    "planId": "plan-id",
    "name": "plan name",
    "description": "plan description",
    "type": "monthly",
    "localeId": 1,
    "price": 6,
    "currency": "EUR",
    "isActive": false,
    "isDefault": false
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Subscription Plan Details Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [RGSBPlan] false none [Class RGSB Subscription Plan Details]
» planId string false none subscription plan id
» name string false none Plan name
» description string false none Plan description
» type string false none Subscription Plan Type
» localeId integer false none Plan locale id
» price number(float) false none Plan price
» currency string false none Plan currency
» isActive boolean false read-only Plan is active
» isDefault boolean false read-only Plan is default

Enumerated Values

Property Value
type monthly
type annual

fetchSubscriptionPaymentMethods

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/schemes/{schemeUuid}/payment-methods', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/schemes/{schemeUuid}/payment-methods HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/schemes/{schemeUuid}/payment-methods \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/payment-methods',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /schemes/{schemeUuid}/payment-methods

Handle get RGSB client's Payment Methods data

Parameters

Name In Type Required Description
schemeUuid path string true none

Example responses

200 Response

[
  {
    "id": "pm_16BjjhSqufOMZb9A",
    "status": "valid",
    "type": "card",
    "maskedNumber": "************4242",
    "expiryDate": "12/2021",
    "isPrimary": true
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Payment Methods entity Inline
401 Unauthorized Unauthorized Access Exception None
404 Not Found Not found None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [PaymentMethod] false none [Class RGSB clients' Payment Methods data]
» id string false read-only Unique payment method identifier
» status string false read-only Payment method status
» type any false read-only Payment method type
» maskedNumber string false read-only Payment method card masked number
» expiryDate string false read-only Payment method card End Date
» isPrimary boolean false read-only Payment method is primary

Enumerated Values

Property Value
type card
type direct_debit

updateCurrentSeatCount

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/schemes/{schemeUuid}/billing/seats', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/schemes/{schemeUuid}/billing/seats HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X PUT https://api.rewardgateway.net/schemes/{schemeUuid}/billing/seats \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

const inputBody = '{
  "currentSeatCount": 120
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/billing/seats',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /schemes/{schemeUuid}/billing/seats

Update RGSB client's current seat count

Body parameter

{
  "currentSeatCount": 120
}

Parameters

Name In Type Required Description
schemeUuid path string true none
body body object true none
» currentSeatCount body integer false new current seat count value

Example responses

200 Response

{
  "schemeUuid": "20925ed6-de4d-4860-9952-94fb774582ed",
  "email": "john.doe@rewardgateway.com",
  "firstName": "John",
  "lastName": "Doe",
  "type": "Charity",
  "status": "Active",
  "startDate": "2021-01-01 00:00:00",
  "freeTrialEndDate": "2021-01-14 00:00:00",
  "renewalDate": "2021-01-14 00:00:00",
  "billingDate": "2021-01-14 00:00:00",
  "cancelReasonId": 2,
  "otherReason": "",
  "churnOffer": false,
  "maxSeatCount": 150,
  "currentSeatCount": 1,
  "pricePerSeat": 3.5,
  "plan": "rgsb",
  "totalInvited": 3,
  "totalRegistered": 5,
  "totalRemoved": 1,
  "hasScheduledChange": true,
  "allowedPlanSwitchOptions": [
    {
      "allowedPlanSwitchOptions": "rgsb"
    }
  ],
  "billingAddress": [
    {
      "companyName": "Reward Gateway Ltd",
      "addressLineOne": "265 Tottenham Court Road",
      "addressLineTwo": "4th Floor",
      "county": "Greater London",
      "city": "London",
      "postalCode": "SM4 4AG",
      "country": "GB"
    }
  ],
  "total": 0,
  "amountDue": 0
}

Responses

Status Meaning Description Schema
200 OK Subscription is Updated Subscription
400 Bad Request Validaton errors None
401 Unauthorized Unauthorized Access Exception None
404 Not Found Not Found None

fetchAllAccessRequests

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/schemes/{schemeUuid}/access-requests', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/schemes/{schemeUuid}/access-requests HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/schemes/{schemeUuid}/access-requests \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/access-requests',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /schemes/{schemeUuid}/access-requests

Handle members assess requests via MagicLink

Parameters

Name In Type Required Description
schemeUuid path string true none

Example responses

200 Response

[
  {
    "schemeUuid": "20925ed6-de4d-4860-9952-94fb774582ed",
    "memberUuid": "20925ed6-de4d-4860-9952-94fb774582ed",
    "state": 20
  }
]

Responses

Status Meaning Description Schema
200 OK Members access requests updated Inline
401 Unauthorized Unauthorized Access Exception None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [RGSBAccessRequests] false none [Class RGSBAccessRequests handle members assess requests via MagicLink entity]
» schemeUuid string false read-only Unique scheme identifier
» memberUuid string false none Unique member identifier
» state integer false none member state

updateAccessRequest

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/schemes/{schemeUuid}/access-requests', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/schemes/{schemeUuid}/access-requests HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X PUT https://api.rewardgateway.net/schemes/{schemeUuid}/access-requests \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

const inputBody = '{
  "memberUuid": "20925ed6-de4d-4860-9952-94fb774582ed",
  "state": 20
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/access-requests',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /schemes/{schemeUuid}/access-requests

AccessRequest Update handle members assess requests via MagicLink

Body parameter

{
  "memberUuid": "20925ed6-de4d-4860-9952-94fb774582ed",
  "state": 20
}

Parameters

Name In Type Required Description
schemeUuid path string true none
body body RGSBAccessRequests false none

Example responses

200 Response

{
  "schemeUuid": "20925ed6-de4d-4860-9952-94fb774582ed",
  "memberUuid": "20925ed6-de4d-4860-9952-94fb774582ed",
  "state": 20
}

Responses

Status Meaning Description Schema
200 OK Members access requests updated RGSBAccessRequests
401 Unauthorized Unauthorized Access Exception None
404 Not Found Not Found Exception None

getCommsCategories

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/comms/categories', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/comms/categories HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/comms/categories \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/comms/categories',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /comms/categories

Get all RGSB Comms Documents Categories

Example responses

200 Response

[
  {
    "id": 5,
    "name": "Launch communications",
    "position": 6,
    "active": true,
    "dateCreated": "2021-01-01"
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Comms Documents Category Inline
401 Unauthorized Unauthorized Access Exception None
404 Not Found Category not found None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [CommsCategory] false none [Class Comms Category API data entity]
» id integer¦null false read-only Unique category identifier
» name string¦null false none Category name
» position integer¦null false none Position of the category
» active boolean¦null false none Category is active
» dateCreated string¦null false read-only Category creation date

addCommsCategory

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/comms/categories', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/comms/categories HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X POST https://api.rewardgateway.net/comms/categories \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

const inputBody = '{
  "name": "Launch communications",
  "position": 6,
  "active": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/comms/categories',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /comms/categories

Add new RGSB Comms Documents Category

Body parameter

{
  "name": "Launch communications",
  "position": 6,
  "active": true
}

Parameters

Name In Type Required Description
body body CommsCategory false none

Example responses

201 Response

{
  "id": 5,
  "name": "Launch communications",
  "position": 6,
  "active": true,
  "dateCreated": "2021-01-01"
}

Responses

Status Meaning Description Schema
201 Created RGSB Comms Documents Category CommsCategory
400 Bad Request Category exists None
401 Unauthorized Unauthorized Access Exception None

updateCommsCategories

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.rewardgateway.net/comms/categories', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PATCH https://api.rewardgateway.net/comms/categories HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X PATCH https://api.rewardgateway.net/comms/categories \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

const inputBody = '[
  {
    "name": "Launch communications",
    "position": 6,
    "active": true
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/comms/categories',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /comms/categories

Update RGSB Comms Documents Categories

Body parameter

[
  {
    "name": "Launch communications",
    "position": 6,
    "active": true
  }
]

Parameters

Name In Type Required Description
body body CommsCategory false none

Example responses

200 Response

[
  {
    "id": 5,
    "name": "Launch communications",
    "position": 6,
    "active": true,
    "dateCreated": "2021-01-01"
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Comms Documents Category Inline
401 Unauthorized Unauthorized Access Exception None
404 Not Found Category not found None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [CommsCategory] false none [Class Comms Category API data entity]
» id integer¦null false read-only Unique category identifier
» name string¦null false none Category name
» position integer¦null false none Position of the category
» active boolean¦null false none Category is active
» dateCreated string¦null false read-only Category creation date

getCommsCategory

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/comms/categories/{categoryId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/comms/categories/{categoryId} HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/comms/categories/{categoryId} \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/comms/categories/{categoryId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /comms/categories/{categoryId}

Get one RGSB Comms Documents Category

Parameters

Name In Type Required Description
categoryId path integer true none

Example responses

200 Response

{
  "id": 5,
  "name": "Launch communications",
  "position": 6,
  "active": true,
  "dateCreated": "2021-01-01"
}

Responses

Status Meaning Description Schema
200 OK RGSB Comms Documents Category CommsCategory
404 Not Found Category not found None

updateCommsCategory

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/comms/categories/{categoryId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/comms/categories/{categoryId} HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X PUT https://api.rewardgateway.net/comms/categories/{categoryId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

const inputBody = '{
  "name": "Launch communications",
  "position": 6,
  "active": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/comms/categories/{categoryId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /comms/categories/{categoryId}

Update RGSB Comms Documents Category

Body parameter

{
  "name": "Launch communications",
  "position": 6,
  "active": true
}

Parameters

Name In Type Required Description
categoryId path integer true none
body body CommsCategory false none

Example responses

200 Response

{
  "id": 5,
  "name": "Launch communications",
  "position": 6,
  "active": true,
  "dateCreated": "2021-01-01"
}

Responses

Status Meaning Description Schema
200 OK RGSB Comms Documents Category CommsCategory
401 Unauthorized Unauthorized Access Exception None
404 Not Found Category not found None

deleteCommsCategory

Code samples

<?php

require 'vendor/autoload.php';

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.rewardgateway.net/comms/categories/{categoryId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE https://api.rewardgateway.net/comms/categories/{categoryId} HTTP/1.1
Host: api.rewardgateway.net

# You can also use wget
curl -X DELETE https://api.rewardgateway.net/comms/categories/{categoryId}


fetch('https://api.rewardgateway.net/comms/categories/{categoryId}',
{
  method: 'DELETE'

})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /comms/categories/{categoryId}

Delete RGSB Comms Documents Category

Parameters

Name In Type Required Description
categoryId path integer true none

Responses

Status Meaning Description Schema
200 OK RGSB Comms Documents Category is deleted None
401 Unauthorized Unauthorized Access Exception None
404 Not Found Category not found None

getCommsDocuments

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/comms/documents', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/comms/documents?categoryId=123 HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/comms/documents?categoryId=123 \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/comms/documents?categoryId=123',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /comms/documents

Get all RGSB Comms Documents

Parameters

Name In Type Required Description
categoryId query integer true Category Id

Example responses

200 Response

[
  {
    "id": 5,
    "title": "Engagement Guide",
    "type": "pdf",
    "thumbnailFileName": "image.png",
    "thumbnailFileUrl": "image.png",
    "categoryId": 1,
    "position": 6,
    "localeId": 3,
    "active": true,
    "dateCreated": "2021-01-01",
    "orientation": "portrait"
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Comms Documents Inline
401 Unauthorized Unauthorized Access Exception None
404 Not Found Document not found None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [CommsDocument] false none [Class Comms Document API data entity]
» id integer¦null false read-only Unique document identifier
» title string¦null false none Document title
» type string¦null false none Document type
» thumbnailFileName string¦null false none Document thumbnail file name
» thumbnailFileUrl string¦null false read-only Document thumbnail file URL
» categoryId integer¦null false none Document category id
» position integer¦null false none Position of the document in the category
» localeId integer¦null false none Locale id of the document
» active boolean¦null false none Document is active
» dateCreated string¦null false read-only Document creation date
» orientation string¦null false none Document pages orientation

addCommsDocument

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/comms/documents', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/comms/documents HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X POST https://api.rewardgateway.net/comms/documents \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

const inputBody = '{
  "title": "Engagement Guide",
  "type": "pdf",
  "thumbnailFileName": "image.png",
  "categoryId": 1,
  "position": 6,
  "localeId": 3,
  "active": true,
  "orientation": "portrait"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/comms/documents',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /comms/documents

Add new RGSB Comms Document

Body parameter

{
  "title": "Engagement Guide",
  "type": "pdf",
  "thumbnailFileName": "image.png",
  "categoryId": 1,
  "position": 6,
  "localeId": 3,
  "active": true,
  "orientation": "portrait"
}

Parameters

Name In Type Required Description
body body CommsDocument false none

Example responses

201 Response

{
  "id": 5,
  "title": "Engagement Guide",
  "type": "pdf",
  "thumbnailFileName": "image.png",
  "thumbnailFileUrl": "image.png",
  "categoryId": 1,
  "position": 6,
  "localeId": 3,
  "active": true,
  "dateCreated": "2021-01-01",
  "orientation": "portrait"
}

Responses

Status Meaning Description Schema
201 Created RGSB Comms Document CommsDocument
400 Bad Request Document exists None
401 Unauthorized Unauthorized Access Exception None

updateCommsDocuments

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.rewardgateway.net/comms/documents', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PATCH https://api.rewardgateway.net/comms/documents HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X PATCH https://api.rewardgateway.net/comms/documents \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

const inputBody = '[
  {
    "title": "Engagement Guide",
    "type": "pdf",
    "thumbnailFileName": "image.png",
    "categoryId": 1,
    "position": 6,
    "localeId": 3,
    "active": true,
    "orientation": "portrait"
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/comms/documents',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /comms/documents

Update RGSB Comms Documents

Body parameter

[
  {
    "title": "Engagement Guide",
    "type": "pdf",
    "thumbnailFileName": "image.png",
    "categoryId": 1,
    "position": 6,
    "localeId": 3,
    "active": true,
    "orientation": "portrait"
  }
]

Parameters

Name In Type Required Description
body body CommsDocument false none

Example responses

200 Response

[
  {
    "id": 5,
    "title": "Engagement Guide",
    "type": "pdf",
    "thumbnailFileName": "image.png",
    "thumbnailFileUrl": "image.png",
    "categoryId": 1,
    "position": 6,
    "localeId": 3,
    "active": true,
    "dateCreated": "2021-01-01",
    "orientation": "portrait"
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Comms Document Inline
401 Unauthorized Unauthorized Access Exception None
404 Not Found Document not found None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [CommsDocument] false none [Class Comms Document API data entity]
» id integer¦null false read-only Unique document identifier
» title string¦null false none Document title
» type string¦null false none Document type
» thumbnailFileName string¦null false none Document thumbnail file name
» thumbnailFileUrl string¦null false read-only Document thumbnail file URL
» categoryId integer¦null false none Document category id
» position integer¦null false none Position of the document in the category
» localeId integer¦null false none Locale id of the document
» active boolean¦null false none Document is active
» dateCreated string¦null false read-only Document creation date
» orientation string¦null false none Document pages orientation

getCommsDocument

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/comms/documents/{documentId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/comms/documents/{documentId} HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/comms/documents/{documentId} \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/comms/documents/{documentId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /comms/documents/{documentId}

Get one RGSB Comms Document

Parameters

Name In Type Required Description
documentId path integer true none

Example responses

200 Response

{
  "id": 5,
  "title": "Engagement Guide",
  "type": "pdf",
  "thumbnailFileName": "image.png",
  "thumbnailFileUrl": "image.png",
  "categoryId": 1,
  "position": 6,
  "localeId": 3,
  "active": true,
  "dateCreated": "2021-01-01",
  "orientation": "portrait",
  "pages": [
    {
      "id": "20925ed6-de4d-4860-9952-94fb774582ed",
      "documentId": 1,
      "imageFileName": "image.png",
      "position": 6,
      "dateCreated": "2021-01-01",
      "logo": {
        "show": true,
        "vertical": "top",
        "horizontal": "right"
      },
      "url": {
        "show": true,
        "description": "Check out our website",
        "vertical": "top",
        "horizontal": "right"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK RGSB Comms Document CommsDocumentAndPages
404 Not Found Document not found None

updateCommsDocument

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/comms/documents/{documentId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/comms/documents/{documentId} HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X PUT https://api.rewardgateway.net/comms/documents/{documentId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

const inputBody = '{
  "title": "Engagement Guide",
  "type": "pdf",
  "thumbnailFileName": "image.png",
  "categoryId": 1,
  "position": 6,
  "localeId": 3,
  "active": true,
  "orientation": "portrait"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/comms/documents/{documentId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /comms/documents/{documentId}

Update RGSB Comms Document

Body parameter

{
  "title": "Engagement Guide",
  "type": "pdf",
  "thumbnailFileName": "image.png",
  "categoryId": 1,
  "position": 6,
  "localeId": 3,
  "active": true,
  "orientation": "portrait"
}

Parameters

Name In Type Required Description
documentId path integer true none
body body CommsDocument false none

Example responses

200 Response

{
  "id": 5,
  "title": "Engagement Guide",
  "type": "pdf",
  "thumbnailFileName": "image.png",
  "thumbnailFileUrl": "image.png",
  "categoryId": 1,
  "position": 6,
  "localeId": 3,
  "active": true,
  "dateCreated": "2021-01-01",
  "orientation": "portrait"
}

Responses

Status Meaning Description Schema
200 OK RGSB Comms Document CommsDocument
401 Unauthorized Unauthorized Access Exception None
404 Not Found Document not found None

deleteCommsDocument

Code samples

<?php

require 'vendor/autoload.php';

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.rewardgateway.net/comms/documents/{documentId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE https://api.rewardgateway.net/comms/documents/{documentId} HTTP/1.1
Host: api.rewardgateway.net

# You can also use wget
curl -X DELETE https://api.rewardgateway.net/comms/documents/{documentId}


fetch('https://api.rewardgateway.net/comms/documents/{documentId}',
{
  method: 'DELETE'

})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /comms/documents/{documentId}

Delete RGSB Comms Document

Parameters

Name In Type Required Description
documentId path integer true none

Responses

Status Meaning Description Schema
200 OK RGSB Comms Document is deleted None
401 Unauthorized Unauthorized Access Exception None
404 Not Found Document not found None

uploadCommsDocument

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'multipart/form-data',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/comms/documents/{documentId}/image', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/comms/documents/{documentId}/image HTTP/1.1
Host: api.rewardgateway.net
Content-Type: multipart/form-data
Accept: application/json

# You can also use wget
curl -X POST https://api.rewardgateway.net/comms/documents/{documentId}/image \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/json'

const inputBody = '{
  "file": "string"
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/comms/documents/{documentId}/image',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /comms/documents/{documentId}/image

Upload RGSB Comms Document thumb image

Body parameter

file: string

Parameters

Name In Type Required Description
documentId path integer true none
body body object false none
» file body string(file) true new document thumb image to add or replace existing

Example responses

200 Response

{
  "id": 5,
  "title": "Engagement Guide",
  "type": "pdf",
  "thumbnailFileName": "image.png",
  "thumbnailFileUrl": "image.png",
  "categoryId": 1,
  "position": 6,
  "localeId": 3,
  "active": true,
  "dateCreated": "2021-01-01",
  "orientation": "portrait"
}

Responses

Status Meaning Description Schema
200 OK RGSB Comms Document CommsDocument
401 Unauthorized Unauthorized Access Exception None
404 Not Found Document not found None

addCommsDocumentPage

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/comms/documents/{documentId}/pages', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/comms/documents/{documentId}/pages HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X POST https://api.rewardgateway.net/comms/documents/{documentId}/pages \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

const inputBody = '{
  "documentId": 1,
  "imageFileName": "image.png",
  "position": 6,
  "logo": {
    "show": true,
    "vertical": "top",
    "horizontal": "right"
  },
  "url": {
    "show": true,
    "description": "Check out our website",
    "vertical": "top",
    "horizontal": "right"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/comms/documents/{documentId}/pages',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /comms/documents/{documentId}/pages

Add new RGSB Comms Document Page

Body parameter

{
  "documentId": 1,
  "imageFileName": "image.png",
  "position": 6,
  "logo": {
    "show": true,
    "vertical": "top",
    "horizontal": "right"
  },
  "url": {
    "show": true,
    "description": "Check out our website",
    "vertical": "top",
    "horizontal": "right"
  }
}

Parameters

Name In Type Required Description
documentId path integer true none
body body CommsDocumentPage false none

Example responses

201 Response

{
  "id": "20925ed6-de4d-4860-9952-94fb774582ed",
  "documentId": 1,
  "imageFileName": "image.png",
  "position": 6,
  "dateCreated": "2021-01-01",
  "logo": {
    "show": true,
    "vertical": "top",
    "horizontal": "right"
  },
  "url": {
    "show": true,
    "description": "Check out our website",
    "vertical": "top",
    "horizontal": "right"
  }
}

Responses

Status Meaning Description Schema
201 Created RGSB Comms Document Page CommsDocumentPage
401 Unauthorized Unauthorized Access Exception None

updateCommsDocumentPages

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.rewardgateway.net/comms/documents/{documentId}/pages', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PATCH https://api.rewardgateway.net/comms/documents/{documentId}/pages HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X PATCH https://api.rewardgateway.net/comms/documents/{documentId}/pages \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

const inputBody = '[
  {
    "documentId": 1,
    "imageFileName": "image.png",
    "position": 6,
    "logo": {
      "show": true,
      "vertical": "top",
      "horizontal": "right"
    },
    "url": {
      "show": true,
      "description": "Check out our website",
      "vertical": "top",
      "horizontal": "right"
    }
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/comms/documents/{documentId}/pages',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /comms/documents/{documentId}/pages

Update RGSB Comms Document Page

Body parameter

[
  {
    "documentId": 1,
    "imageFileName": "image.png",
    "position": 6,
    "logo": {
      "show": true,
      "vertical": "top",
      "horizontal": "right"
    },
    "url": {
      "show": true,
      "description": "Check out our website",
      "vertical": "top",
      "horizontal": "right"
    }
  }
]

Parameters

Name In Type Required Description
documentId path integer true none
body body CommsDocumentPage false none

Example responses

200 Response

[
  {
    "id": "20925ed6-de4d-4860-9952-94fb774582ed",
    "documentId": 1,
    "imageFileName": "image.png",
    "position": 6,
    "dateCreated": "2021-01-01",
    "logo": {
      "show": true,
      "vertical": "top",
      "horizontal": "right"
    },
    "url": {
      "show": true,
      "description": "Check out our website",
      "vertical": "top",
      "horizontal": "right"
    }
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Comms Document Page Inline
401 Unauthorized Unauthorized Access Exception None
404 Not Found Document Page not found None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [CommsDocumentPage] false none [Class Comms Document Page API data entity]
» id string¦null false read-only Unique document page identifier
» documentId integer false none Document id
» imageFileName string¦null false none Document image file name
» position integer¦null false none Position of the document in the category
» dateCreated string¦null false read-only Document creation date
» logo PageLogo false none Class Comms Document Page Logo API data entity
»» show boolean false none Logo is visible
»» vertical string false none Logo vertical position
»» horizontal string false none Logo horizontal position
» url PageUrl false none Class Comms Document Page URL API data entity
»» show boolean false none Url is visible
»» description string false none Url description
»» vertical string false none Url vertical position
»» horizontal string false none Url horizontal position

Enumerated Values

Property Value
vertical top
vertical middle
vertical bottom
horizontal left
horizontal center
horizontal right
vertical top
vertical middle
vertical bottom
horizontal left
horizontal center
horizontal right

updateCommsDocumentPage

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/comms/documents/{documentId}/pages/{pageId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/comms/documents/{documentId}/pages/{pageId} HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X PUT https://api.rewardgateway.net/comms/documents/{documentId}/pages/{pageId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

const inputBody = '{
  "documentId": 1,
  "imageFileName": "image.png",
  "position": 6,
  "logo": {
    "show": true,
    "vertical": "top",
    "horizontal": "right"
  },
  "url": {
    "show": true,
    "description": "Check out our website",
    "vertical": "top",
    "horizontal": "right"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/comms/documents/{documentId}/pages/{pageId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /comms/documents/{documentId}/pages/{pageId}

Update RGSB Comms Document Page

Body parameter

{
  "documentId": 1,
  "imageFileName": "image.png",
  "position": 6,
  "logo": {
    "show": true,
    "vertical": "top",
    "horizontal": "right"
  },
  "url": {
    "show": true,
    "description": "Check out our website",
    "vertical": "top",
    "horizontal": "right"
  }
}

Parameters

Name In Type Required Description
documentId path integer true none
pageId path string true none
body body CommsDocumentPage false none

Example responses

200 Response

{
  "id": "20925ed6-de4d-4860-9952-94fb774582ed",
  "documentId": 1,
  "imageFileName": "image.png",
  "position": 6,
  "dateCreated": "2021-01-01",
  "logo": {
    "show": true,
    "vertical": "top",
    "horizontal": "right"
  },
  "url": {
    "show": true,
    "description": "Check out our website",
    "vertical": "top",
    "horizontal": "right"
  }
}

Responses

Status Meaning Description Schema
200 OK RGSB Comms Document Page CommsDocumentPage
401 Unauthorized Unauthorized Access Exception None
404 Not Found Document Page not found None

deleteCommsDocumentPage

Code samples

<?php

require 'vendor/autoload.php';

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.rewardgateway.net/comms/documents/{documentId}/pages/{pageId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE https://api.rewardgateway.net/comms/documents/{documentId}/pages/{pageId} HTTP/1.1
Host: api.rewardgateway.net

# You can also use wget
curl -X DELETE https://api.rewardgateway.net/comms/documents/{documentId}/pages/{pageId}


fetch('https://api.rewardgateway.net/comms/documents/{documentId}/pages/{pageId}',
{
  method: 'DELETE'

})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /comms/documents/{documentId}/pages/{pageId}

Delete RGSB Comms Document Page

Parameters

Name In Type Required Description
documentId path integer true none
pageId path string true none

Responses

Status Meaning Description Schema
200 OK RGSB Comms Document Page is deleted None
401 Unauthorized Unauthorized Access Exception None
404 Not Found Document Page not found None

uploadCommsDocumentPage

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'multipart/form-data',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/comms/documents/{documentId}/pages/{pageId}/image', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/comms/documents/{documentId}/pages/{pageId}/image HTTP/1.1
Host: api.rewardgateway.net
Content-Type: multipart/form-data
Accept: application/json

# You can also use wget
curl -X POST https://api.rewardgateway.net/comms/documents/{documentId}/pages/{pageId}/image \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/json'

const inputBody = '{
  "file": "string"
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/comms/documents/{documentId}/pages/{pageId}/image',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /comms/documents/{documentId}/pages/{pageId}/image

Upload RGSB Comms Document Page image

Body parameter

file: string

Parameters

Name In Type Required Description
documentId path integer true none
pageId path string true none
body body object false none
» file body string(file) true new page image to add or replace existing

Example responses

200 Response

{
  "id": "20925ed6-de4d-4860-9952-94fb774582ed",
  "documentId": 1,
  "imageFileName": "image.png",
  "position": 6,
  "dateCreated": "2021-01-01",
  "logo": {
    "show": true,
    "vertical": "top",
    "horizontal": "right"
  },
  "url": {
    "show": true,
    "description": "Check out our website",
    "vertical": "top",
    "horizontal": "right"
  }
}

Responses

Status Meaning Description Schema
200 OK RGSB Comms Document Page CommsDocumentPage
401 Unauthorized Unauthorized Access Exception None
404 Not Found Document Page not found None

fetchSchemeEngagementMeterData

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/schemes/{schemeUuid}/engagement-meter', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/schemes/{schemeUuid}/engagement-meter HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/schemes/{schemeUuid}/engagement-meter \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/engagement-meter',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /schemes/{schemeUuid}/engagement-meter

Handle get RGSB client Engagement Meter

Parameters

Name In Type Required Description
schemeUuid path string true none

Example responses

200 Response

{
  "schemeUuid": "4d0c7e51-c6ec-4f09-ad7b-f77b6841f204",
  "status": "Pending",
  "startDate": "2020-10-01 00:00:00",
  "skipDate": "2020-10-01 00:00:00",
  "isSkipped": true,
  "complete": "25%",
  "steps": [
    {
      "name": "Customisation",
      "description": "Invite your workforce",
      "link": "customisation",
      "isFinished": false,
      "seen": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK RGSB Engagement Meter entity EngagementMeter
401 Unauthorized Unauthorized Access Exception None
403 Forbidden Access token is valid but not allowed to complete this operation None

updateSchemeEngagementMeterData

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/schemes/{schemeUuid}/engagement-meter', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/schemes/{schemeUuid}/engagement-meter HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X PUT https://api.rewardgateway.net/schemes/{schemeUuid}/engagement-meter \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

const inputBody = '{
  "isSkipped": true,
  "steps": [
    {
      "isFinished": false,
      "seen": true
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/engagement-meter',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /schemes/{schemeUuid}/engagement-meter

Handle updating RGSB client Engagement Meter

Body parameter

{
  "isSkipped": true,
  "steps": [
    {
      "isFinished": false,
      "seen": true
    }
  ]
}

Parameters

Name In Type Required Description
schemeUuid path string true none
body body EngagementMeter false none

Example responses

200 Response

{
  "schemeUuid": "4d0c7e51-c6ec-4f09-ad7b-f77b6841f204",
  "status": "Pending",
  "startDate": "2020-10-01 00:00:00",
  "skipDate": "2020-10-01 00:00:00",
  "isSkipped": true,
  "complete": "25%",
  "steps": [
    {
      "name": "Customisation",
      "description": "Invite your workforce",
      "link": "customisation",
      "isFinished": false,
      "seen": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK RGSB Engagement Meter entity EngagementMeter
401 Unauthorized Unauthorized Access Exception None
403 Forbidden Access token is valid but not allowed to complete this operation None

fetchSchemeEngagementRetailers

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/schemes/{schemeUuid}/engagement-retailers', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/schemes/{schemeUuid}/engagement-retailers HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/schemes/{schemeUuid}/engagement-retailers \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/engagement-retailers',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /schemes/{schemeUuid}/engagement-retailers

Handle get RGSB client Engagement promoted Retailers

Parameters

Name In Type Required Description
schemeUuid path string true none

Example responses

200 Response

[
  {
    "name": "Retailer Name",
    "logo": "logo.png",
    "link": "/Merchant?m=1234",
    "category": "Cashback",
    "saving": "Save 25%"
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Engagement Retailers Inline
401 Unauthorized Unauthorized Access Exception None
403 Forbidden Access token is valid but not allowed to complete this operation None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [EngagementRetailer] false none [Class Engagement promoted Retailer API data entity]
» name string false read-only Retailer Name
» logo string false read-only Retailer Logo path
» link string false read-only Retailer URL Link
» category string false read-only Retailer Category
» saving string false read-only Retailer Saving

createPaymentMethodWidget

Code samples

<?php

require 'vendor/autoload.php';

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/payment/portal/payment-method', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/payment/portal/payment-method HTTP/1.1
Host: api.rewardgateway.net

# You can also use wget
curl -X POST https://api.rewardgateway.net/payment/portal/payment-method


fetch('https://api.rewardgateway.net/payment/portal/payment-method',
{
  method: 'POST'

})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /payment/portal/payment-method

Create payment method widget on payment provider

Responses

Status Meaning Description Schema
200 OK Widget created None
400 Bad Request scheme or onboarding data is invalid None
401 Unauthorized Unauthorized Access Exception None

createPortalSession

Code samples

<?php

require 'vendor/autoload.php';

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/payment/portal/sesssion', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/payment/portal/sesssion HTTP/1.1
Host: api.rewardgateway.net

# You can also use wget
curl -X POST https://api.rewardgateway.net/payment/portal/sesssion


fetch('https://api.rewardgateway.net/payment/portal/sesssion',
{
  method: 'POST'

})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /payment/portal/sesssion

Create portal session on payment provider

Responses

Status Meaning Description Schema
200 OK Portal session created None
401 Unauthorized Unauthorized Access Exception None

createSubscriptionWidget

Code samples

<?php

require 'vendor/autoload.php';

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/payment/checkout/subscription', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/payment/checkout/subscription HTTP/1.1
Host: api.rewardgateway.net

# You can also use wget
curl -X POST https://api.rewardgateway.net/payment/checkout/subscription


fetch('https://api.rewardgateway.net/payment/checkout/subscription',
{
  method: 'POST'

})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /payment/checkout/subscription

Create subscription widget on payment provider based on onboarding data

Responses

Status Meaning Description Schema
200 OK Widget created None
400 Bad Request onboarding data is missing or invalid None
401 Unauthorized Unauthorized Access Exception None

fetchSchemeReferralData

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/schemes/{schemeUuid}/referral', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/schemes/{schemeUuid}/referral HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/schemes/{schemeUuid}/referral \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/schemes/{schemeUuid}/referral',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /schemes/{schemeUuid}/referral

Handle get RGSB client's referral data

Parameters

Name In Type Required Description
schemeUuid path string true none

Example responses

200 Response

{
  "schemeUuid": "4d0c7e51-c6ec-4f09-ad7b-f77b6841f204",
  "hash": "1be2e9b9c638ed07528a",
  "dateAdded": "2020-10-01",
  "referralURL": "https://www.rewardgateway.com/?referral=w65gt6tg"
}

Responses

Status Meaning Description Schema
200 OK RGSB Referral entity Referral
401 Unauthorized Unauthorized Access Exception None
403 Forbidden Access token is valid but not allowed to complete this operation None

getWellbeingLimitationByMember

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/wellbeing/{memberUuid}/limitation', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/wellbeing/{memberUuid}/limitation HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X GET https://api.rewardgateway.net/wellbeing/{memberUuid}/limitation \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/wellbeing/{memberUuid}/limitation',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /wellbeing/{memberUuid}/limitation

Fetch member wellbeing limitations

Parameters

Name In Type Required Description
memberUuid path string true none

Example responses

200 Response

[
  {
    "id": "12",
    "schemeUuid": "4d0c7e51-c6ec-4f09-ad7b-f77b6841f204",
    "memberUuid": "8b62c7ca-a8ca-4805-b9d0-09c36383e0d0",
    "type": "Articles",
    "seen": 5,
    "max": 10
  }
]

Responses

Status Meaning Description Schema
200 OK RGSB Wellbeing Limitations Inline
403 Forbidden Access token is valid but not allowed to complete this operation None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Limits] false none [Class Wellbeing Limits API data entity]
» id string false read-only Limitation id
» schemeUuid string false none Unique string to identify scheme
» memberUuid string false none Unique string to identify member
» type string false none Wellbeing media type
» seen integer false none Number of seen elements
» max integer false none Maximum wellbeing elements that member can see

Enumerated Values

Property Value
type Articles
type Recipes
type Videos

Returns list of documents for the programme

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/scheme/{schemeId}/comms', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/scheme/{schemeId}/comms HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X GET https://api.rewardgateway.net/scheme/{schemeId}/comms \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/scheme/{schemeId}/comms',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /scheme/{schemeId}/comms

This endpoint will return you a list of documents related to your programme. i.e. Posters, Flyers etc

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
schemeId path string true scheme id or UUID
category query array[string] false filter documents list by category

Example responses

200 Response

[
  {
    "title": "Discounts Poster",
    "downloadPath": "https://site1.rewardgateway.dev/admin/comms/document/DiscountsPoster",
    "thumbnailPath": "https://static.rewardgateway.dev/BrandAssets/responsive/img/SelfService/admin/comms/discounts-poster.jpg",
    "type": "PDF",
    "buttonText": "Download",
    "category": "Launch"
  }
]

Responses

Status Meaning Description Schema
200 OK Successful operation Inline
403 Forbidden Access to the resource has been denied standardModel
404 Not Found Scheme is not found standardModel

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [commsDocument] false none [Class CommsDocument]
» title string false none Document Title
» downloadPath string false none URL to PDF download path
» thumbnailPath string false none URL to thumbnail image
» type string false none Document Type
» buttonText string false none Text to appear as button label
» category string false none Document category

New KYC applicant record

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/kyc', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/kyc HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X POST https://api.rewardgateway.net/kyc \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'

const inputBody = '{
  "internalReferenceId": "1234-5678-9123",
  "type": "onboarding",
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@rewardgateway.com",
  "referer": "https://some.domain.com/page"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/kyc',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /kyc

This endpoint create an applicant that can start KYC proccessing

Body parameter

{
  "internalReferenceId": "1234-5678-9123",
  "type": "onboarding",
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@rewardgateway.com",
  "referer": "https://some.domain.com/page"
}

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
body body KYCEntity false none

Example responses

200 Response

{
  "applicantId": "string",
  "internalReferenceId": "1234-5678-9123",
  "type": "onboarding",
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@rewardgateway.com",
  "referer": "https://some.domain.com/page",
  "token": "foo-bar",
  "status": "In progress"
}

Responses

Status Meaning Description Schema
200 OK New KYC applicant entity KYCEntity
400 Bad Request Data validation errors standardModel

Check KYC applicant status

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/kyc/{applicantId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/kyc/{applicantId} HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X GET https://api.rewardgateway.net/kyc/{applicantId} \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/kyc/{applicantId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /kyc/{applicantId}

This endpoint return KYC applicant status

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
applicantId path string true KYC applicant member identifier

Example responses

200 Response

{
  "applicantId": "string",
  "internalReferenceId": "1234-5678-9123",
  "type": "onboarding",
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@rewardgateway.com",
  "referer": "https://some.domain.com/page",
  "token": "foo-bar",
  "status": "In progress"
}

Responses

Status Meaning Description Schema
200 OK Check KYC applicant status entity KYCEntity
400 Bad Request Data validation errors standardModel

New Client onboarding record

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/onboarding/{uuid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/onboarding/{uuid} HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X PUT https://api.rewardgateway.net/onboarding/{uuid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'

const inputBody = '{
  "firstName": "John",
  "lastName": "Doe",
  "phoneNumber": "0437819232",
  "email": "john.doe@rewardgateway.com",
  "token": "foo-bar",
  "companyName": "My Company",
  "companyLegalName": "My Company Ltd.",
  "numberOfEmployees": 50,
  "companyRegistrationNumber": "string",
  "streetAddress": "265 Tottenham Court Rd",
  "streetAddressLineTwo": "265 Tottenham Court Rd",
  "city": "London",
  "county": "Greater London",
  "postalCode": "W1T 7RQ",
  "schemeAlias": "companyname.rewardgateway.com",
  "termsAndConditions": "2020-07-14 12:45:00",
  "localeId": 1,
  "referralCode": "string",
  "freeTrial": true,
  "skipAllowed": true,
  "password": "string",
  "trackingCampaign": "string",
  "trackingSource": "string",
  "currentSeatCount": 0,
  "plan": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/onboarding/{uuid}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /onboarding/{uuid}

This endpoint update information for a new RGSB account

Body parameter

{
  "firstName": "John",
  "lastName": "Doe",
  "phoneNumber": "0437819232",
  "email": "john.doe@rewardgateway.com",
  "token": "foo-bar",
  "companyName": "My Company",
  "companyLegalName": "My Company Ltd.",
  "numberOfEmployees": 50,
  "companyRegistrationNumber": "string",
  "streetAddress": "265 Tottenham Court Rd",
  "streetAddressLineTwo": "265 Tottenham Court Rd",
  "city": "London",
  "county": "Greater London",
  "postalCode": "W1T 7RQ",
  "schemeAlias": "companyname.rewardgateway.com",
  "termsAndConditions": "2020-07-14 12:45:00",
  "localeId": 1,
  "referralCode": "string",
  "freeTrial": true,
  "skipAllowed": true,
  "password": "string",
  "trackingCampaign": "string",
  "trackingSource": "string",
  "currentSeatCount": 0,
  "plan": "string"
}

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
uuid path string true Onboarding member identifier
body body Onboarding false none

Example responses

200 Response

{
  "uuid": "string",
  "firstName": "John",
  "lastName": "Doe",
  "phoneNumber": "0437819232",
  "email": "john.doe@rewardgateway.com",
  "token": "foo-bar",
  "companyName": "My Company",
  "companyLegalName": "My Company Ltd.",
  "numberOfEmployees": 50,
  "companyRegistrationNumber": "string",
  "streetAddress": "265 Tottenham Court Rd",
  "streetAddressLineTwo": "265 Tottenham Court Rd",
  "city": "London",
  "county": "Greater London",
  "postalCode": "W1T 7RQ",
  "schemeAlias": "companyname.rewardgateway.com",
  "schemeId": 272,
  "schemeStatus": "Live",
  "termsAndConditions": "2020-07-14 12:45:00",
  "status": "New Prospect",
  "localeId": 1,
  "verificationSentTimes": 1,
  "kycStatus": "string",
  "kycResult": "string",
  "referralCode": "string",
  "couponId": "string",
  "created": "string",
  "freeTrial": true,
  "skipAllowed": true,
  "password": "string",
  "trackingCampaign": "string",
  "trackingSource": "string",
  "pricePerSeat": 0,
  "currentSeatCount": 0,
  "plan": "string",
  "firstBillingDate": "string",
  "total": 0,
  "amountDue": 0
}

Responses

Status Meaning Description Schema
200 OK Successful operation Onboarding
400 Bad Request Data validation errors standardModel

Get client onboarding record

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/onboarding/{uuid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/onboarding/{uuid} HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X GET https://api.rewardgateway.net/onboarding/{uuid} \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/onboarding/{uuid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /onboarding/{uuid}

This endpoint get information for RGSB account

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
uuid path string true Onboarding member identifier

Example responses

200 Response

{
  "uuid": "string",
  "firstName": "John",
  "lastName": "Doe",
  "phoneNumber": "0437819232",
  "email": "john.doe@rewardgateway.com",
  "token": "foo-bar",
  "companyName": "My Company",
  "companyLegalName": "My Company Ltd.",
  "numberOfEmployees": 50,
  "companyRegistrationNumber": "string",
  "streetAddress": "265 Tottenham Court Rd",
  "streetAddressLineTwo": "265 Tottenham Court Rd",
  "city": "London",
  "county": "Greater London",
  "postalCode": "W1T 7RQ",
  "schemeAlias": "companyname.rewardgateway.com",
  "schemeId": 272,
  "schemeStatus": "Live",
  "termsAndConditions": "2020-07-14 12:45:00",
  "status": "New Prospect",
  "localeId": 1,
  "verificationSentTimes": 1,
  "kycStatus": "string",
  "kycResult": "string",
  "referralCode": "string",
  "couponId": "string",
  "created": "string",
  "freeTrial": true,
  "skipAllowed": true,
  "password": "string",
  "trackingCampaign": "string",
  "trackingSource": "string",
  "pricePerSeat": 0,
  "currentSeatCount": 0,
  "plan": "string",
  "firstBillingDate": "string",
  "total": 0,
  "amountDue": 0
}

Responses

Status Meaning Description Schema
200 OK Successful operation Onboarding
400 Bad Request Data validation errors standardModel

Client Skip the onboarding flow

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/onboarding/{uuid}/skip', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/onboarding/{uuid}/skip HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X PUT https://api.rewardgateway.net/onboarding/{uuid}/skip \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/onboarding/{uuid}/skip',
{
  method: 'PUT',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /onboarding/{uuid}/skip

This endpoint create a new RGSB free trial account

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
uuid path string true Onboarding member identifier

Example responses

200 Response

{
  "uuid": "string",
  "firstName": "John",
  "lastName": "Doe",
  "phoneNumber": "0437819232",
  "email": "john.doe@rewardgateway.com",
  "token": "foo-bar",
  "companyName": "My Company",
  "companyLegalName": "My Company Ltd.",
  "numberOfEmployees": 50,
  "companyRegistrationNumber": "string",
  "streetAddress": "265 Tottenham Court Rd",
  "streetAddressLineTwo": "265 Tottenham Court Rd",
  "city": "London",
  "county": "Greater London",
  "postalCode": "W1T 7RQ",
  "schemeAlias": "companyname.rewardgateway.com",
  "schemeId": 272,
  "schemeStatus": "Live",
  "termsAndConditions": "2020-07-14 12:45:00",
  "status": "New Prospect",
  "localeId": 1,
  "verificationSentTimes": 1,
  "kycStatus": "string",
  "kycResult": "string",
  "referralCode": "string",
  "couponId": "string",
  "created": "string",
  "freeTrial": true,
  "skipAllowed": true,
  "password": "string",
  "trackingCampaign": "string",
  "trackingSource": "string",
  "pricePerSeat": 0,
  "currentSeatCount": 0,
  "plan": "string",
  "firstBillingDate": "string",
  "total": 0,
  "amountDue": 0
}

Responses

Status Meaning Description Schema
200 OK Successful operation Onboarding
400 Bad Request Data validation errors standardModel

Reactivate client's closed scheme

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/onboarding/{uuid}/reactivate', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/onboarding/{uuid}/reactivate HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X PUT https://api.rewardgateway.net/onboarding/{uuid}/reactivate \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/onboarding/{uuid}/reactivate',
{
  method: 'PUT',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /onboarding/{uuid}/reactivate

This endpoint reactivate a RGSB account

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
uuid path string true Onboarding member identifier

Example responses

200 Response

{
  "uuid": "string",
  "firstName": "John",
  "lastName": "Doe",
  "phoneNumber": "0437819232",
  "email": "john.doe@rewardgateway.com",
  "token": "foo-bar",
  "companyName": "My Company",
  "companyLegalName": "My Company Ltd.",
  "numberOfEmployees": 50,
  "companyRegistrationNumber": "string",
  "streetAddress": "265 Tottenham Court Rd",
  "streetAddressLineTwo": "265 Tottenham Court Rd",
  "city": "London",
  "county": "Greater London",
  "postalCode": "W1T 7RQ",
  "schemeAlias": "companyname.rewardgateway.com",
  "schemeId": 272,
  "schemeStatus": "Live",
  "termsAndConditions": "2020-07-14 12:45:00",
  "status": "New Prospect",
  "localeId": 1,
  "verificationSentTimes": 1,
  "kycStatus": "string",
  "kycResult": "string",
  "referralCode": "string",
  "couponId": "string",
  "created": "string",
  "freeTrial": true,
  "skipAllowed": true,
  "password": "string",
  "trackingCampaign": "string",
  "trackingSource": "string",
  "pricePerSeat": 0,
  "currentSeatCount": 0,
  "plan": "string",
  "firstBillingDate": "string",
  "total": 0,
  "amountDue": 0
}

Responses

Status Meaning Description Schema
200 OK Successful operation Onboarding
400 Bad Request Data validation errors standardModel

Send a request to account admins to unlock features

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/onboarding/{onboardingUuid}/unlock-request', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/onboarding/{onboardingUuid}/unlock-request HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json

# You can also use wget
curl -X POST https://api.rewardgateway.net/onboarding/{onboardingUuid}/unlock-request \
  -H 'Content-Type: application/json'

const inputBody = '{
  "product": "string"
}';
const headers = {
  'Content-Type':'application/json'
};

fetch('https://api.rewardgateway.net/onboarding/{onboardingUuid}/unlock-request',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /onboarding/{onboardingUuid}/unlock-request

This endpoint emails current RGSB scheme admins with an unlock request

Body parameter

{
  "product": "string"
}

Parameters

Name In Type Required Description
onboardingUuid path string true Onboarding member identifier
body body object false none
» product body string false Limited product that member requesting for unlock

Responses

Status Meaning Description Schema
200 OK Successful operation None

clearRRItems

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.rewardgateway.net/recognition/redemption/basket', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE https://api.rewardgateway.net/recognition/redemption/basket HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X DELETE https://api.rewardgateway.net/recognition/redemption/basket \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/recognition/redemption/basket',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /recognition/redemption/basket

Clear the RR vouchers basket

Example responses

401 Response

{
  "code": null,
  "message": null
}

Responses

Status Meaning Description Schema
200 OK Successful operation None
401 Unauthorized Unauthorized Access Exception errorModel
404 Not Found Basket was not found. errorModel

removeRRItem

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.rewardgateway.net/recognition/redemption/basket/{productId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE https://api.rewardgateway.net/recognition/redemption/basket/{productId} HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json

# You can also use wget
curl -X DELETE https://api.rewardgateway.net/recognition/redemption/basket/{productId} \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('https://api.rewardgateway.net/recognition/redemption/basket/{productId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /recognition/redemption/basket/{productId}

Remove product from RR basket

Parameters

Name In Type Required Description
productId path integer true none

Example responses

401 Response

{
  "code": null,
  "message": null
}

Responses

Status Meaning Description Schema
200 OK Successful operation None
401 Unauthorized Unauthorized Access Exception errorModel
403 Forbidden Basket cannot be paid for. errorModel
404 Not Found Basket or Product was not found. errorModel

Replaces programme logo image

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'multipart/form-data',
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/scheme/{schemeId}/logo', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/scheme/{schemeId}/logo HTTP/1.1
Host: api.rewardgateway.net
Content-Type: multipart/form-data
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X POST https://api.rewardgateway.net/scheme/{schemeId}/logo \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'

const inputBody = '{
  "file": "string"
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/scheme/{schemeId}/logo',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /scheme/{schemeId}/logo

Replaces scheme logo image using binary file in request body. Content-Type header must be correct mime-type or multipart/form-data

Body parameter

file: string

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
schemeId path string true scheme id
body body object false none
» file body string(file) true new logo image to replace existing logo

Example responses

200 Response

{
  "imageUrl": "string"
}

Responses

Status Meaning Description Schema
200 OK Successful operation Inline
400 Bad Request Validation Errors standardModel
403 Forbidden Access to the resource has been denied standardModel
404 Not Found Scheme is not found standardModel

Response Schema

Status Code 200

Name Type Required Restrictions Description
» imageUrl string false none none

Updates scheme colour settings

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/scheme/{schemeId}/colour', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/scheme/{schemeId}/colour HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X PUT https://api.rewardgateway.net/scheme/{schemeId}/colour \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/scheme/{schemeId}/colour',
{
  method: 'PUT',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /scheme/{schemeId}/colour

This endpoint allows you to update programme colors associated with your programme. These are * the themese colors used with the site.

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
schemeId path string true scheme id

Example responses

200 Response

{
  "navigationBackground": "003865",
  "buttonBackground": "003865"
}

Responses

Status Meaning Description Schema
200 OK Successful operation schemeColour
400 Bad Request Validation Errors standardModel
403 Forbidden Access to the resource has been denied standardModel
404 Not Found Scheme is not found standardModel

Creates a programme

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/scheme', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/scheme HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X POST https://api.rewardgateway.net/scheme \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'

const inputBody = '{
  "name": "Reward Hub",
  "companyName": "My Company",
  "companyLegalName": "My Company Ltd.",
  "accountId": "0061j000007EKwDAAW",
  "subAccountId": "0061j000007EKwDAAW",
  "parentAccountId": "0061j000007EKwDAAW",
  "opportunityId": "0061j000007EKwDAAW",
  "emailDomain": "string",
  "schemeType": "rarebreed",
  "localeId": 1,
  "postalCode": "W1T 7RQ",
  "addressLine1": "265 Tottenham Court Rd",
  "addressLine2": "string",
  "addressLine3": "London",
  "addressLine4": "string",
  "companyRegistrationNumber": "string",
  "accountManagerEmail": "account.manager@rewardgateway.com",
  "implementationManagerEmail": "implementation.manager@rewardgateway.com",
  "status": 0,
  "type": 0,
  "user": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@rewardgateway.com",
    "id": "43a0cbfb-f17b-4b8e-9d22-a93b077e8c4d",
    "phoneNumber": "0437819232",
    "verificationCode": 123456
  },
  "billingCountry": 1
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/scheme',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /scheme

This endpoint will allow you to create a brand new programme for use.

Body parameter

{
  "name": "Reward Hub",
  "companyName": "My Company",
  "companyLegalName": "My Company Ltd.",
  "accountId": "0061j000007EKwDAAW",
  "subAccountId": "0061j000007EKwDAAW",
  "parentAccountId": "0061j000007EKwDAAW",
  "opportunityId": "0061j000007EKwDAAW",
  "emailDomain": "string",
  "schemeType": "rarebreed",
  "localeId": 1,
  "postalCode": "W1T 7RQ",
  "addressLine1": "265 Tottenham Court Rd",
  "addressLine2": "string",
  "addressLine3": "London",
  "addressLine4": "string",
  "companyRegistrationNumber": "string",
  "accountManagerEmail": "account.manager@rewardgateway.com",
  "implementationManagerEmail": "implementation.manager@rewardgateway.com",
  "status": 0,
  "type": 0,
  "user": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@rewardgateway.com",
    "id": "43a0cbfb-f17b-4b8e-9d22-a93b077e8c4d",
    "phoneNumber": "0437819232",
    "verificationCode": 123456
  },
  "billingCountry": 1
}

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
body body self_service_scheme false none

Example responses

200 Response

{
  "id": "string",
  "uuid": "string",
  "name": "Reward Hub",
  "companyName": "My Company",
  "companyLegalName": "My Company Ltd.",
  "accountId": "0061j000007EKwDAAW",
  "subAccountId": "0061j000007EKwDAAW",
  "parentAccountId": "0061j000007EKwDAAW",
  "opportunityId": "0061j000007EKwDAAW",
  "emailDomain": "string",
  "schemeType": "rarebreed",
  "localeId": 1,
  "postalCode": "W1T 7RQ",
  "addressLine1": "265 Tottenham Court Rd",
  "addressLine2": "string",
  "addressLine3": "London",
  "addressLine4": "string",
  "companyRegistrationNumber": "string",
  "accountManagerEmail": "account.manager@rewardgateway.com",
  "implementationManagerEmail": "implementation.manager@rewardgateway.com",
  "status": 0,
  "type": 0,
  "user": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@rewardgateway.com",
    "id": "43a0cbfb-f17b-4b8e-9d22-a93b077e8c4d",
    "phoneNumber": "0437819232",
    "verificationCode": 123456
  },
  "billingCountry": 1
}

Responses

Status Meaning Description Schema
200 OK Successful operation self_service_scheme
403 Forbidden Access to the resource has been denied standardModel

Updates programme details

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/scheme/{schemeId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/scheme/{schemeId} HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X PUT https://api.rewardgateway.net/scheme/{schemeId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'

const inputBody = '{
  "name": "Reward Hub",
  "companyName": "My Company",
  "companyLegalName": "My Company Ltd.",
  "accountId": "0061j000007EKwDAAW",
  "subAccountId": "0061j000007EKwDAAW",
  "parentAccountId": "0061j000007EKwDAAW",
  "opportunityId": "0061j000007EKwDAAW",
  "emailDomain": "string",
  "schemeType": "rarebreed",
  "localeId": 1,
  "postalCode": "W1T 7RQ",
  "addressLine1": "265 Tottenham Court Rd",
  "addressLine2": "string",
  "addressLine3": "London",
  "addressLine4": "string",
  "companyRegistrationNumber": "string",
  "accountManagerEmail": "account.manager@rewardgateway.com",
  "implementationManagerEmail": "implementation.manager@rewardgateway.com",
  "status": 0,
  "type": 0,
  "user": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@rewardgateway.com",
    "id": "43a0cbfb-f17b-4b8e-9d22-a93b077e8c4d",
    "phoneNumber": "0437819232",
    "verificationCode": 123456
  },
  "billingCountry": 1
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/scheme/{schemeId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /scheme/{schemeId}

This endpoint allows you to update all details related to a programme.

Body parameter

{
  "name": "Reward Hub",
  "companyName": "My Company",
  "companyLegalName": "My Company Ltd.",
  "accountId": "0061j000007EKwDAAW",
  "subAccountId": "0061j000007EKwDAAW",
  "parentAccountId": "0061j000007EKwDAAW",
  "opportunityId": "0061j000007EKwDAAW",
  "emailDomain": "string",
  "schemeType": "rarebreed",
  "localeId": 1,
  "postalCode": "W1T 7RQ",
  "addressLine1": "265 Tottenham Court Rd",
  "addressLine2": "string",
  "addressLine3": "London",
  "addressLine4": "string",
  "companyRegistrationNumber": "string",
  "accountManagerEmail": "account.manager@rewardgateway.com",
  "implementationManagerEmail": "implementation.manager@rewardgateway.com",
  "status": 0,
  "type": 0,
  "user": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@rewardgateway.com",
    "id": "43a0cbfb-f17b-4b8e-9d22-a93b077e8c4d",
    "phoneNumber": "0437819232",
    "verificationCode": 123456
  },
  "billingCountry": 1
}

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
schemeId path string true scheme id or UUID
body body self_service_scheme false none

Example responses

200 Response

{
  "id": "string",
  "uuid": "string",
  "name": "Reward Hub",
  "companyName": "My Company",
  "companyLegalName": "My Company Ltd.",
  "accountId": "0061j000007EKwDAAW",
  "subAccountId": "0061j000007EKwDAAW",
  "parentAccountId": "0061j000007EKwDAAW",
  "opportunityId": "0061j000007EKwDAAW",
  "emailDomain": "string",
  "schemeType": "rarebreed",
  "localeId": 1,
  "postalCode": "W1T 7RQ",
  "addressLine1": "265 Tottenham Court Rd",
  "addressLine2": "string",
  "addressLine3": "London",
  "addressLine4": "string",
  "companyRegistrationNumber": "string",
  "accountManagerEmail": "account.manager@rewardgateway.com",
  "implementationManagerEmail": "implementation.manager@rewardgateway.com",
  "status": 0,
  "type": 0,
  "user": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@rewardgateway.com",
    "id": "43a0cbfb-f17b-4b8e-9d22-a93b077e8c4d",
    "phoneNumber": "0437819232",
    "verificationCode": 123456
  },
  "billingCountry": 1
}

Responses

Status Meaning Description Schema
200 OK Successful operation self_service_scheme
403 Forbidden Access to the resource has been denied standardModel
404 Not Found Scheme is not found standardModel

Re-send members invitations

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/scheme/{schemeId}/invitations', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/scheme/{schemeId}/invitations HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X PUT https://api.rewardgateway.net/scheme/{schemeId}/invitations \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'

const inputBody = '[
  {
    "memberId": "327c1682-c7b7-11ec-9d64-0242ac120002",
    "resend": true
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/scheme/{schemeId}/invitations',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /scheme/{schemeId}/invitations

This endpoint allows you to re-sends invitation emails to all currently invited members of the * RG for Small Business scheme.

Body parameter

[
  {
    "memberId": "327c1682-c7b7-11ec-9d64-0242ac120002",
    "resend": true
  }
]

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
schemeId path string true scheme id or UUID
body body self_service_invitations true none

Example responses

400 Response

{
  "code": null,
  "message": null,
  "details": [
    null
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful operation None
400 Bad Request Validation Errors standardModel
403 Forbidden Access to the resource has been denied standardModel
404 Not Found Scheme is not found standardModel

Retrieve the locales for a scheme

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/scheme/{schemeId}/locales', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/scheme/{schemeId}/locales HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X GET https://api.rewardgateway.net/scheme/{schemeId}/locales \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/scheme/{schemeId}/locales',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /scheme/{schemeId}/locales

Endpoint returns all the locales that are supported for a given scheme

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
schemeId path integer true scheme id

Example responses

200 Response

[
  {
    "id": 1,
    "name": "GB",
    "lang": "en_GB",
    "currency": "GBP",
    "symbol": "£",
    "states": [
      {
        "code": "string",
        "name": "string"
      }
    ],
    "contactFields": {
      "firstName": "First Name",
      "lastName": "Surname",
      "emailAddress": "Email Address",
      "mobilePhoneNumber": "Mobile Phone Number",
      "addressLine1": "Address Line 1",
      "addressLine2": "Address Line 2",
      "addressLine3": "Address Line 3",
      "addressLine4": "Address Line 4",
      "postCode": "Postcode"
    },
    "mappings": {
      "locale": "Locale CDN url",
      "fallback": "Fallback locale CDN url"
    }
  }
]

Responses

Status Meaning Description Schema
200 OK Successful operation Inline
403 Forbidden Access to the resource has been denied standardModel
404 Not Found Scheme is not found standardModel

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [GenericLocale] false none none
» id integer(int32) true none Locale identifier
» name string true none Locale name
» lang string true none Locale language
» currency string true none Locale currency
» symbol string true none Locale currency symbol
» states [GenericState] true none Locale state list
»» code string true none none
»» name string true none none
» contactFields object true none none
»» firstName any false none List of translated contact fields
»» lastName any false none none
»» emailAddress any false none none
»» mobilePhoneNumber any false none none
»» addressLine1 any false none none
»» addressLine2 any false none none
»» addressLine3 any false none none
»» addressLine4 any false none none
»» postCode any false none none
» mappings object false none none
»» locale string false none Mappings to download jsons for React apps
»» fallback string false none none

Retrieve discrimantory fields.

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/scheme/{schemeUuid}/discriminatory-fields', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/scheme/{schemeUuid}/discriminatory-fields HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X GET https://api.rewardgateway.net/scheme/{schemeUuid}/discriminatory-fields \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/scheme/{schemeUuid}/discriminatory-fields',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /scheme/{schemeUuid}/discriminatory-fields

Endpoint returns all the discriminatory fields that are supported for the user's programme.

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
schemeUuid path string true scheme uuid

Example responses

200 Response

[
  {
    "id": "string",
    "rawId": 0,
    "field": "string",
    "values": [
      {
        "id": 1,
        "name": "Foo"
      }
    ]
  }
]

Responses

Status Meaning Description Schema
200 OK Successful operation Inline
403 Forbidden Access to the resource has been denied standardModel
404 Not Found Scheme is not found standardModel

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [GenericProfileField] false none [Discrimantory field for a programme.]
» id string true none id of the current field.
» rawId integer true none raw id of the current field.
» field string true none current field name.
» values [object] false none Possible field values.
»» id integer true none Id of the possible answer
»» name string true none Discriminatory field answer

Returns the programme domain

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/scheme/{schemeId}/alias', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/scheme/{schemeId}/alias HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X GET https://api.rewardgateway.net/scheme/{schemeId}/alias \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/scheme/{schemeId}/alias',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /scheme/{schemeId}/alias

This endpoint will return the domains attached to the programme identifier that is passed.

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
schemeId path integer true none

Example responses

200 Response

{
  "id": "string",
  "hostname": "string"
}

Responses

Status Meaning Description Schema
200 OK Successful operation self_service_alias
403 Forbidden Access to the resource has been denied standardModel
404 Not Found Scheme or alias is not found standardModel

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/scheme/{schemeId}/alias', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/scheme/{schemeId}/alias HTTP/1.1
Host: api.rewardgateway.net
Content-Type: application/json
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X PUT https://api.rewardgateway.net/scheme/{schemeId}/alias \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'

const inputBody = '{
  "hostname": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/scheme/{schemeId}/alias',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /scheme/{schemeId}/alias

This endpoint will allow you to replace the current domain attached to a programme.

Body parameter

{
  "hostname": "string"
}
Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
schemeId path integer true scheme id
body body self_service_alias false none

Example responses

200 Response

{
  "id": "string",
  "hostname": "string"
}
Status Meaning Description Schema
200 OK Successful operation self_service_alias
403 Forbidden Access to the resource has been denied standardModel
404 Not Found Scheme is not found standardModel

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/scheme/alias', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/scheme/alias?hostname=Scheme%20hostname HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X GET https://api.rewardgateway.net/scheme/alias?hostname=Scheme%20hostname \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/scheme/alias?hostname=Scheme%20hostname',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /scheme/alias

This endpoint will return the preferred domain related if found.

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
hostname query string true Scheme hostname

Example responses

200 Response

{
  "id": "string",
  "hostname": "string"
}

Responses

Status Meaning Description Schema
200 OK Successful operation self_service_alias
403 Forbidden Access to the resource has been denied standardModel
404 Not Found Scheme alias not found standardModel

Change user password

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.rewardgateway.net/user/{userId}/password', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT https://api.rewardgateway.net/user/{userId}/password HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz

# You can also use wget
curl -X PUT https://api.rewardgateway.net/user/{userId}/password \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz'
};

fetch('https://api.rewardgateway.net/user/{userId}/password',
{
  method: 'PUT',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /user/{userId}/password

This endpoint will allow you to change a user's password. Currently only available for RGSB clients.

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
userId path string true none

Example responses

200 Response

{
  "id": "00000000-0000-0000-0000-000000000000",
  "firstName": "John",
  "lastName": "Smith",
  "email": "john.smith@acme.com",
  "emailVisible": true,
  "summary": "Ipsum dolor sit amet",
  "timezone": "UK, Western Europe (GMT +1:00)",
  "gender": "X",
  "addressLine1": "123 Some Road",
  "addressLine2": "Floor 4",
  "addressLine3": "London",
  "addressLine4": "London",
  "postalCode": "AA00 0AA",
  "country": "United Kingdom",
  "mobileNumber": "07700900077",
  "mobileNumberVisible": true,
  "telephoneNumber": "02700900077",
  "avatar": "https://www.acme.com/path/to/image.jpg",
  "dateOfBirth": "2019-08-24T14:15:22Z",
  "dateOfBirthVisible": true,
  "registrationDate": "2019-08-24T14:15:22Z",
  "registrationInfo": "Lorem ipsum dolor sit amet",
  "pushNotifications": true,
  "registrationQuestionsAnswers": "string"
}

Responses

Status Meaning Description Schema
200 OK Successful operation MyUser
401 Unauthorized Access token expired standardModel
403 Forbidden Access to the resource has been denied standardModel

SmartSpending

Smart Spending product related endpoints

Get a list of offers

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/offer', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/offer?retailer=123 HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X GET https://api.rewardgateway.net/offer?retailer=123 \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/offer?retailer=123',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /offer

This endpoint returns a list of offers available based on the filter criteria

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
retailer query integer true Value must be a valid retailer identifier
type query string false Value must be comma-separated combination of 'sms', 'evoucher', 'egiftcard', cashback', 'instant', 'instore', 'online', 'topup', 'easysaver'

Example responses

200 Response

[
  {
    "id": 9999,
    "typeId": 9999,
    "type": "Cashback",
    "description": "Description for this offer",
    "keyInformation": "Key information for this offer",
    "howItWorks": "Details on how this offer works",
    "termsAndConditions": "Terms & conditions of this offer",
    "expiryDate": "2019-08-24T14:15:22Z",
    "specialOffer": true,
    "redeemableOnDesktop": true,
    "redeemableOnMobile": true,
    "discount": {
      "saving": "Earn 3%",
      "description": "on all offers",
      "useableInStore": true,
      "useableOnline": true,
      "startsOn": "2019-08-24T14:15:22Z",
      "endsOn": "2019-08-24T14:15:22Z"
    },
    "normally": {
      "saving": "Earn 3%",
      "description": "on all offers",
      "useableInStore": true,
      "useableOnline": true,
      "startsOn": "2019-08-24T14:15:22Z",
      "endsOn": "2019-08-24T14:15:22Z"
    }
  }
]

Responses

Status Meaning Description Schema
200 OK Successful operation Inline
400 Bad Request Invalid request errorModel
403 Forbidden Access to the resource has been denied errorModel
404 Not Found Retailer is not found errorModel

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [offer] false none [Class Offer]
» id integer(int32) true none Offer identifier
» typeId integer(int32) true none Type id of the offer
» type string true none Type of the offer
» description string true none Offer's description
» keyInformation string true none Offer's key information
» howItWorks string true none How the offer works
» termsAndConditions string true none Offer's terms and conditions
» expiryDate string(date-time) true none Offer's expiry date
» specialOffer boolean true none Is this a special offer?
» redeemableOnDesktop boolean true none Offer can be redeemed on the desktop
» redeemableOnMobile boolean true none Offer can be redeemed on mobile
» discount discount true none Class Discount
»» saving string true none Discount savings
»» description string true none Discount description
»» useableInStore boolean true none Discount can be used in-store
»» useableOnline boolean true none Discount can be used online
»» startsOn string(date-time) true none Discount is valid from
»» endsOn string(date-time) true none Discount is valid until
» normally discount false none Class Discount

Get tracking token for cashback

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'multipart/form-data',
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/offer/starttracking', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/offer/starttracking HTTP/1.1
Host: api.rewardgateway.net
Content-Type: multipart/form-data
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X POST https://api.rewardgateway.net/offer/starttracking \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'

const inputBody = '{
  "offerId": 0
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/offer/starttracking',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /offer/starttracking

This endpoint generates and returns a new token for cashback tracking

Body parameter

offerId: 0

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
body body object true none
» offerId body integer false Offer identifier

Example responses

200 Response

{
  "trackingId": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
200 OK Successful operation Inline
403 Forbidden Access to the resource has been denied errorModel
404 Not Found Offer is not found errorModel

Response Schema

Status Code 200

Name Type Required Restrictions Description
» trackingId string true none none
» message string true none none

Get all retailer categories

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/retailer/categories', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/retailer/categories HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X GET https://api.rewardgateway.net/retailer/categories \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/retailer/categories',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /retailer/categories

This endpoint returns a list of all retailer categories

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning

Example responses

403 Response

{
  "code": null,
  "message": null
}

Responses

Status Meaning Description Schema
200 OK Successful operation None
403 Forbidden Access to the resource has been denied errorModel
404 Not Found Retailer is not found errorModel

Set retailer as favourite or remove it from favourites

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'multipart/form-data',
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.rewardgateway.net/retailer/favourites/toggleFavourite', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST https://api.rewardgateway.net/retailer/favourites/toggleFavourite HTTP/1.1
Host: api.rewardgateway.net
Content-Type: multipart/form-data
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X POST https://api.rewardgateway.net/retailer/favourites/toggleFavourite \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'

const inputBody = '{
  "retailerId": 0,
  "isFavourite": 0
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/retailer/favourites/toggleFavourite',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /retailer/favourites/toggleFavourite

This endpoint will add or remove a retailer as favourite from the current member's account

Body parameter

retailerId: 0
isFavourite: 0

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
body body object false none
» retailerId body integer true Valid retailerId
» isFavourite body integer true 1 to add and 0 to remove the retailer from favourites

Example responses

200 Response

{
  "status": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
200 OK Successful operation Inline
403 Forbidden Access to the resource has been denied errorModel
404 Not Found Retailer is not found errorModel

Response Schema

Status Code 200

Name Type Required Restrictions Description
» status string true none none
» message string true none none

Get all retailers' promotions

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/retailer/promotions', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/retailer/promotions HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X GET https://api.rewardgateway.net/retailer/promotions \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/retailer/promotions',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /retailer/promotions

This endpoint returns any deals and top offers from retailers

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
offer_type query string false Value must be comma-separated combination of 'evoucher', 'egiftcard', cashback', 'instant', 'instore', 'online'

Example responses

200 Response

[
  {
    "name": "string",
    "items": [
      {
        "id": 1234,
        "name": "Acme",
        "logo": "https://www.acme.com/path/to/image.jpg",
        "description": "Retailer description for Acme",
        "isFavourite": true,
        "isFeatured": true,
        "category": {
          "_links": {
            "self": {
              "href": null
            },
            "hierarchy": {
              "href": "/category/{categoryId}/hierarchy"
            }
          },
          "id": 123,
          "name": "Reloadable cards",
          "retailerCount": 45,
          "isFavourite": true
        }
      }
    ]
  }
]

Responses

Status Meaning Description Schema
200 OK Successful operation Inline
403 Forbidden Access to the resource has been denied errorModel
404 Not Found Retailer is not found errorModel

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [retailerPromotion] false none [Class RetailerPromotion]
» name string true none none
» items [retailer] true none [Class Retailer]
»» id integer(int32) true none Retailer identifier
»» name string true none Retailer's name
»» logo string true none Retailer's logo (URL)
»» description string true none Retailer's description
»» isFavourite boolean true none Is retailer favourited
»» isFeatured boolean true none Is retailer featured
»» category cat false none Class Category
»»» _links object false none none
»»»» self object false none none
»»»»» href any false none none
»»»» hierarchy object false none none
»»»»» href string false none Endpoint to retrieve category hierarchy
»»» id integer(int32) true none Category identifier
»»» name string true none Category name
»»» retailerCount integer(int32) true none Category retailer count
»»» isFavourite boolean(boolean) true none Category favourite

Get all domain hashes.

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/retailer/domain/hashes', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/retailer/domain/hashes HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X GET https://api.rewardgateway.net/retailer/domain/hashes \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/retailer/domain/hashes',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /retailer/domain/hashes

This endpoint returns a list of all SHA1 domain hashes that can be matched by calls.

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning

Example responses

200 Response

[
  null
]

Responses

Status Meaning Description Schema
200 OK Successful operation Inline
403 Forbidden Access to the resource has been denied errorModel

Response Schema

Total number of retailers

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/retailer/count', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/retailer/count HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X GET https://api.rewardgateway.net/retailer/count \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/retailer/count',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /retailer/count

Return the total number of available retailers for a scheme

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning

Example responses

200 Response

[
  {
    "id": 1234,
    "name": "Acme",
    "logo": "https://www.acme.com/path/to/image.jpg",
    "description": "Retailer description for Acme",
    "isFavourite": true,
    "isFeatured": true,
    "category": {
      "_links": {
        "self": {
          "href": null
        },
        "hierarchy": {
          "href": "/category/{categoryId}/hierarchy"
        }
      },
      "id": 123,
      "name": "Reloadable cards",
      "retailerCount": 45,
      "isFavourite": true
    }
  }
]

Responses

Status Meaning Description Schema
200 OK Successful operation Inline
403 Forbidden Access to the resource has been denied errorModel

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [retailer] false none [Class Retailer]
» id integer(int32) true none Retailer identifier
» name string true none Retailer's name
» logo string true none Retailer's logo (URL)
» description string true none Retailer's description
» isFavourite boolean true none Is retailer favourited
» isFeatured boolean true none Is retailer featured
» category cat false none Class Category
»» _links object false none none
»»» self object false none none
»»»» href any false none none
»»» hierarchy object false none none
»»»» href string false none Endpoint to retrieve category hierarchy
»» id integer(int32) true none Category identifier
»» name string true none Category name
»» retailerCount integer(int32) true none Category retailer count
»» isFavourite boolean(boolean) true none Category favourite

Get a retailer by a domain hash

Code samples

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'xxxxx.yyyyy.zzzzz',
    'Accept' => 'application/vnd.rewardgateway+json;version=3.0',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.rewardgateway.net/retailer/domain/{hash}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET https://api.rewardgateway.net/retailer/domain/{hash} HTTP/1.1
Host: api.rewardgateway.net
Accept: application/json
Authorization: xxxxx.yyyyy.zzzzz
Accept: application/vnd.rewardgateway+json;version=3.0

# You can also use wget
curl -X GET https://api.rewardgateway.net/retailer/domain/{hash} \
  -H 'Accept: application/json' \
  -H 'Authorization: xxxxx.yyyyy.zzzzz' \
  -H 'Accept: application/vnd.rewardgateway+json;version=3.0'


const headers = {
  'Accept':'application/json',
  'Authorization':'xxxxx.yyyyy.zzzzz',
  'Accept':'application/vnd.rewardgateway+json;version=3.0'
};

fetch('https://api.rewardgateway.net/retailer/domain/{hash}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /retailer/domain/{hash}

This endpoint returns information about a particular retailer based on their domain.

Parameters

Name In Type Required Description
Authorization header string true Authorization Header with Bearer Token
Accept header string true Accept Header with Vendor Versioning
hash path string true SHA-1 of retailer domain

Example responses

200 Response

[
  {
    "retailer": {
      "id": 1234,
      "name": "Acme",
      "logo": "https://www.acme.com/path/to/image.jpg",
      "description": "Retailer description for Acme",
      "isFavourite": true,
      "isFeatured": true,
      "category": {
        "_links": {
          "self": {
            "href": null
          },
          "hierarchy": {
            "href": "/category/{categoryId}/hierarchy"
          }
        },
        "id": 123,
        "name": "Reloadable cards",
        "retailerCount": 45,
        "isFavourite": true
      }
    },
    "bestOffer": {
      "id": 9999,
      "typeId": 9999,
      "type": "Cashback",
      "description": "Description for this offer",
      "keyInformation": "Key information for this offer",
      "howItWorks": "Details on how this offer works",
      "termsAndConditions": "Terms & conditions of this offer",
      "expiryDate": "2019-08-24T14:15:22Z",
      "specialOffer": true,
      "redeemableOnDesktop": true,
      "redeemableOnMobile": true,
      "discount": {
        "saving": "Earn 3%",
        "description": "on all offers",
        "useableInStore": true,
        "useableOnline": true,
        "startsOn": "2019-08-24T14:15:22Z",
        "endsOn": "2019-08-24T14:15:22Z"
      },
      "normally": {
        "saving": "Earn 3%",
        "description": "on all offers",
        "useableInStore": true,
        "useableOnline": true,
        "startsOn": "2019-08-24T14:15:22Z"