For the complete documentation index, see llms.txt. This page is also available as Markdown.

GetVouchers API

GetVouchers API enables the user to get a list of vouchers with desired filters available with the Xoxoday catalog

Base URL :

The GetVouchers API can only be called up to 500 times in a 24-hour period.

curl -X POST {OAUTH_URL}/v1/oauth/api 
-H 'Authorization: Bearer eyJ0b2tlbkNvbnRlbnQiOnsiaXNzdWVkRm9yIjoiRnJlc2h3b3JrcyIsInNjb3BlIjoiIiwiaXNzdWVkQXQiOjE1NTk4MDQ1Nzg1ODIsImV4cGlyZXNBdCI6IjIwMTktMDYtMjFUMDc6MDI6NTguNTgyWiIsInRva2VuX3R5cGUiOiJVU0VSIn0sImFfdCI6ImV5SmxibU1pT2lKQk1USTRRMEpETFVoVE1qVTJJaXdpWVd4bklqb2lSVU5FU0MxRlV5SXNJbXRwWkNJNkltVnVZeUlzSW1Wd2F5STZleUpyZEhraU9pSkZReUlzSW1OeWRpSTZJbEF0TWpVMklpd2llQ0k2SWpoMmJVTkVRMUZQZW1wQlNHWndabXQ0TVhjNVluZHphM1JhZWtRek0ySXRZamx0VVhSclEyRnhNV3NpTENKNUlqb2lZMGR0V2kxdWIySjBWbUptTVdGdVNraDBUMmxoWW5VMFZHUlVhRzVVYmpCYWRuWnJabGMwYzBWb2N5SjlmUS4uU1h3TlNUSWhFUXNlN0htaXpPUmFIQS5NRzBVUy1lek1IOEFsbWFLc2ZTY3Nwa2FlYzBIcW9FcUV1YXRoNHRSTTRpeVg2dFByX1ZjTnlsdnk5YjlGLTZHR01DbjY1TjYwYnpIUUJtRVZvZGRYVWlvQS1kTkpuaE9KdThHczRfeW9pM042VGFOdWhjRENCUGtwWk1CeTlDRjJBaEh4UGotQkd0SzdEamhNbjBBQXpTM1VhTE11eUdrTmNwSGxQSUxNcFlVM' 
--header 'Content-Type: application/json'
  -d '{
	"query": "plumProAPI.mutation.getVouchers",
	"tag": "plumProAPI",
	"variables": {
		"data":{
		    "limit": 10,
        	    "page": 2,
        	    "includeProducts": "",
        	    "excludeProducts": "",
              "exchangeRate": 1,
        	    "sort": {
        		    "field":"",
        		    "order":""
        	    },
        	    "filters":[
        		{
        			"key": "productName",
        			"value": ""
        		},
        		{
        			"key": "country",
        			"value": ""
        		},
        		{
        			"key": "price",
        			"value": ""
        		},
        		{
        			"key": "minPrice",
        			"value": ""
        		},
        		{
        			"key": "maxPrice",
        			"value": ""
        		},
            {
              "key": "deliveryType",
              "value": ""
            },
        		{
        			"key": "currencyCode",
        			"value": ""
        		}
    		]
               }
	}
}

200 : Success

returns list of vouchers filtered by the applicable filters

401 : Failure

Authorization error due to invalid or missing API key

400 : Failure

Unable to get any vouchers

404 : Failure

Failed to get product details

500 : Failure

Internal server error

Parameters

Body Parameters

Property

Type

Description

limit*

Integer

Number of products desired per page

page*

Integer

Offset with respect to the limit provided(starts from 1),

includeProducts

String

Comma-separated product ids of products to be included

excludeProducts

String

Comma-separated product ids of products to be excluded

field

String

Fields to sort by, Eg: name, last update date

order

String

fields to order by. Eg: ASC, DESC

filters

Array

An array of optional filter property objects having key and value as keys mentioned below:

filter.productName

String

Product names to be included

filter.country

String

Countries to be included

filter.price

String

Price range filters to be included

filter.minPrice

String

The minimum price of the products looked for

filter.maxPrice

String

Maximum price of the products looked for

filter.currencyCode

String

Currency codes to be included

filter.deliveryType

String

Delivery type to the voucher (realtime or delayed)

"*" means the paramter is mandatory

filter.xyz=optional filter property objects

Body Parameters

Property

Type

Description

status

Integer

0 (Failure) / 1 (Successful)

productId

Integer

product Id of the product

name

String

name of the product

description

String

description of the product

orderQuantityLimit

Integer

Maximum order quantity allowed for the prpdouct

termsAndConditions

String

terms and conditions for the particular product

expiryAndValidity

String

expiry and validity of the product

redemptionInstructions

String

instructions to redeem the product

categories

String

categories to which this product belongs to

lastUpdateDate

String

last time and date when this product was updated

imageUrl

String

url of the image of the voucher if available

currencyCode

String

Currency code of the product

currencyName

String

The currency name of the product

countryName

String

The country in which this product can be redeemed

countryCode

String

Country code for the country in which this product can be redeemed

countries

Array

List of countries with country code and country name where the products can be redeemed

valueType

String

Declared values or variable values eg open_value or fixed_denomination

maxValue

Integer

Max value if given in request body

minValue

Integer

Min value if given in request body

valueDenominations

String

Comma separated denomination

tatInDays

String

Turn around time in days taken to process the order

usageType

String

Usage Type for eg: digital, offline,etc.

deliveryType

String

Realtime or Delayed

fee

Float

Any extra fees levied on this product

discount

FLoat

discount amount

exchangeRate

Integer

Exchange rate in comparison to client Base currency.

Last updated