GetFilters API
Get all available filters that can be applied to get voucher API call of the previous section
Last updated
Was this helpful?
Get all available filters that can be applied to get voucher API call of the previous section
Last updated
Was this helpful?
Staging :
Production :
curl -X POST {OAUTH_URL}/v1/oauth/api
-H 'Authorization: Bearer eyJ0b2tlbkNvbnRlbnQiOnsiaXNzdWVkRm9yIjoiRnJlc2h3b3JrcyIsInNjb3BlIjoiIiwiaXNzdWVkQXQiOjE1NTk4MDQ1Nzg1ODIsImV4cGlyZXNBdCI6IjIwMTktMDYtMjFUMDc6MDI6NTguNTgyWiIsInRva2VuX3R5cGUiOiJVU0VSIn0sImFfdCI6ImV5SmxibU1pT2lKQk1USTRRMEpETFVoVE1qVTJJaXdpWVd4bklqb2lSVU5FU0MxRlV5SXNJbXRwWkNJNkltVnVZeUlzSW1Wd2F5STZleUpyZEhraU9pSkZReUlzSW1OeWRpSTZJbEF0TWpVMklpd2llQ0k2SWpoMmJVTkVRMUZQZW1wQlNHWndabXQ0TVhjNVluZHphM1JhZWtRek0ySXRZamx0VVhSclEyRnhNV3NpTENKNUlqb2lZMGR0V2kxdWIySjBWbUptTVdGdVNraDBUMmxoWW5VMFZHUlVhRzVVYmpCYWRuWnJabGMwYzBWb2N5SjlmUS4uU1h3TlNUSWhFUXNlN0htaXpPUmFIQS5NRzBVUy1lek1IOEFsbWFLc2ZTY3Nwa2FlYzBIcW9FcUV1YXRoNHRSTTRpeVg2dFByX1ZjTnlsdnk5YjlGLTZHR01DbjY1TjYwYnpIUUJtRVZvZGRYVWlvQS1kTkpuaE9KdThHczRfeW9pM042VGFOdWhjRENCUGtwWk1CeTlDRjJBaEh4UGotQkd0SzdEamhNbjBBQXpTM1VhTE11eUdrTmNwSGxQSUxNcFlVM'
--header 'Content-Type: application/json'
-d '{
"query": "plumProAPI.mutation.getFilters",
"tag": "plumProAPI",
"variables": {
"data":{
"filterGroupCode": "",
"includeFilters": "",
"excludeFilters": ""
}
}
}
200 : Success
returns list of vouchers filtered by the applicable filters
{
"data": {
"getFilters": {
"status": 1,
"data": [
{
"filterGroupName": "Country",
"filterGroupDescription": "",
"filterGroupCode": "country",
"filters": [
{
"filterValue": "Argentina",
"isoCode": "AR",
"filterValueCode": "argentina"
}
]
}
{
"filterGroupName": "Voucher_Category",
"filterGroupDescription": "",
"filterGroupCode"" "voucher_category",
"filters": [
{
{
"filterValue": "Automobiles & Accessories",
"isoCode": "",
"filterValueCode": "automobiles_accessories"
}
}
]
}
]
}
}
}
401 : Failure
Authorization error due to invalid or missing API key
{
code: 401,
errorId: "PIPE10013",
errorInfo: "Plum Pro APIs: Invalid authorization header",
error:"Eg: invalid authorization header!"
}
400 : Failure
Unable to get any vouchers
{
code: 400,
errorId: "PLE10003",
errorInfo: "Validation error in get filters",
error:"Eg: Bad request"
}
404 : Failure
Failed to find filters for filter Group code
{
code: 404,
errorId: "PLE10029",
errorInfo: "Failed to find filters for filterGroupCode",
error: "Eg: Not Found, No filters found for filterGroupCode"
}
500: Failure
Internal server error
{
code: 500,
error: "Eg: "Internal server error""
}
Body Parameters
Property
Type
Description
status
Integer
0 (Failure) / 1 (Successful)
filterGroupName
String
Name of the filter
filterGroupDescription
String
Description of the filter
filterGroupCode
String
Filter group code
filters
Array
Array of objects with various filters in the selected category
filterValue
String
Filter value
isoCode
String
ISO code for the filter value
filterValueCode
String
Code for the filter Value