Skip to main content
POST
/
fetchOffers
Fetch Offers API
curl --request POST \
  --url https://stagingstores.xoxoday.com/chef/v1/oauth/api/fetchOffers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "plumProAPI.mutation.getVouchers",
  "tag": "plumProAPI",
  "variables": {
    "data": {
      "limit": 10,
      "page": 1,
      "includeProducts": "12345",
      "excludeProducts": "54623",
      "categoryTypes": "offers",
      "sort": {
        "field": "name",
        "order": "ASC"
      }
    }
  }
}
'
{
  "data": {
    "getVouchers": {
      "status": 123,
      "data": [
        {
          "productId": 123,
          "name": "<string>",
          "description": "<string>",
          "orderQuantityLimit": 123,
          "imageUrl": "<string>",
          "currencyCode": "<string>",
          "countryName": "<string>",
          "countryCode": "<string>",
          "valueType": "<string>",
          "maxValue": 123,
          "minValue": 123,
          "valueDenominations": "<string>",
          "deliveryType": "<string>",
          "usageType": "<string>",
          "fee": 123,
          "discount": 123,
          "isPhoneNumberMandatory": true,
          "isRecommended": 123,
          "is_free": 123
        }
      ]
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://help-plum.xoxoday.com/llms.txt

Use this file to discover all available pages before exploring further.

List of available filters

Filter nameFunctionality
countryUsers can filter products based on the country
productNameUsers can filter products based on the product name
categoryUsers can filter products based on the categoy

Request Parameter

ParameterTypeDescription
limitIntNumber of results to return per page (used for pagination).
pageIntPage number of results to fetch when using pagination.
includeProductsStringComma-separated list of product IDs to explicitly include in the response.
excludeProductsStringComma-separated list of product IDs to explicitly exclude from the response.
sortSortDataSorting configuration
sort.fieldStringThe field name to sort by.
sort.orderStringSorting order → “ASC” for ascending or “DESC” for descending.
filtersArray of ObjectList of filters to apply. Each filter object should contain a key and value.
filters.keyStringThe filter key
filters.valueStringThe filter value corresponding to the key

Response Schema

PathTypeDescription
dataobjectRoot object.
data.getVouchersobjectContainer for perk data.
data.getVouchers.statusnumberStatus of request.
data.getVouchers.dataarrayList of perks.
data.getVouchers.data[].productIdnumberUnique product/perk ID.
data.getVouchers.data[].namestringPerk name.
data.getVouchers.data[].descriptionstring (HTML)Description of the perk.
data.getVouchers.data[].termsAndConditionsInstructionsstring (HTML)T&C details.
data.getVouchers.data[].expiryAndValiditystring (HTML)Expiry/validity info.
data.getVouchers.data[].redemptionInstructionsstring (HTML)Redemption steps.
data.getVouchers.data[].categoriesstringCategory name.
data.getVouchers.data[].lastUpdateDatestringLast updated timestamp.
data.getVouchers.data[].imageUrlstringPerk image URL.
data.getVouchers.data[].currencyCodestringCurrency code.
data.getVouchers.data[].currencyNamestringCurrency name.
data.getVouchers.data[].countryNamestringCountry applicable.
data.getVouchers.data[].countryCodestringISO country code.
data.getVouchers.data[].countriesarrayApplicable countries.
data.getVouchers.data[].countries[].codestringISO code.
data.getVouchers.data[].countries[].namestringCountry name.
data.getVouchers.data[].valueTypestringAlways fixed_denomination for perks.
data.getVouchers.data[].maxValuenumberMax value (zero for perks).
data.getVouchers.data[].minValuenumberMin value.
data.getVouchers.data[].valueDenominationsstringValues (often 0).
data.getVouchers.data[].tatInDaysstringDelivery time.
data.getVouchers.data[].usageTypestringonline, offline, both.
data.getVouchers.data[].deliveryTypestringrealtime
data.getVouchers.data[].orderQuantityLimitnumberMax allowed quantity.
data.getVouchers.data[].isRecommendednumberRecommended flag.
data.getVouchers.data[].filterGroupCodestringoffer_category for perks.
data.getVouchers.data[].isPhoneNumberMandatorybooleanWhether phone number is required.
data.getVouchers.data[].feenumberAny fee applied.
data.getVouchers.data[].discountnumberDiscount if any.
data.getVouchers.data[].metadataobjectPerk-specific data block.
data.getVouchers.data[].metadata.categorytypestringAlways offers.
data.getVouchers.data[].metadata.typestringPerk type (code/link).
data.getVouchers.data[].metadata.codestringPromo code (if available).
data.getVouchers.data[].metadata.linkstringRedirect link.
data.getVouchers.data[].metadata.expiryDatestringExpiry date.

Implementation Notes

  1. Read the “metadata” field in the Fetch Offers API response to get the Offer information like,
    1. Code
    2. Link
    3. Expiry Date of the Code / Link
  2. We recommend you cache the response from Fetch Offers API in your database every time you sync our catalog
Learn about Error Handling, Rate limiting and Best Practice .

Authorizations

Authorization
string
header
required

Authorization: Bearer <access_token>

Body

application/json
query
enum<string>
default:plumProAPI.mutation.getVouchers
required
Available options:
plumProAPI.mutation.getVouchers
tag
enum<string>
default:plumProAPI
required
Available options:
plumProAPI
variables
object
required

Response

Perks/offers catalog returned successfully.

data
object