Validate a voucher
1 min
GET
https://api.fictive.com/REST/api/vouchers/{voucherCode}/validate
Path Parameters
- voucherCodestringrequired
Query Parameters
- paymentDatesToCalculateinteger
- paymentDatesStartDatestring
- clientUserIdstring
Header Parameters
- X-TokenIdstringDescription
- X-SessionIdstringDescription
- X-VersionstringrequiredDescription
- OriginstringDescription
Responses
200
- FictiveGlobal.Api.Rest.Dtos.v1.VoucherDescription
- purchaseInfoFictiveGlobal.Api.Rest.Dtos.v1.VoucherPurchaseInfoDescription
- purchasePricenumber<double>Description
- discountPricenumber<double>Description
- renewalPricenumber<double>Description
- nextPaymentsDatesstring[]ExampleDescription
- voucherInfoFictiveGlobal.Api.Rest.Dtos.v1.VoucherInfoDescription
- startDatestring<date-time>ExampleDescription
- expiryDatestring<date-time>ExampleDescription
- offerInfoFictiveGlobal.Api.Rest.Dtos.v1.VoucherOfferInfoDescription
- namestringDescription
- descriptionstringDescription
- usageTypeinteger<int32>Description
- applicationDataFictiveGlobal.Api.Rest.Dtos.v1.ApplicationDataDescription
- namestringDescription
- messagestringDescription
- message2stringDescription
- addCreditsFictiveGlobal.Api.Rest.Dtos.v1.AddCreditsDescription
- amountinteger<int32>Description
- currencystringDescription
- paymentDetailsRequiredbooleanDescription
- lowStartFictiveGlobal.Api.Rest.Dtos.v1.LowStartDescription
- percentagenumber<double>Description
- numberOfPeriodsinteger<int32>Description
- lockInPeriodsinteger<int32>Description
- closeSubOnExpirybooleanDescription
- serviceIdsinteger[]ExampleDescription
- paymentDetailsRequiredbooleanDescription
- percentageDiscountFictiveGlobal.Api.Rest.Dtos.v1.PercentageDiscountDescription
- percentagenumber<double>Description
- paymentDetailsRequiredbooleanDescription
- productIdsinteger[]ExampleDescription
- freePeriodFictiveGlobal.Api.Rest.Dtos.v1.FreePeriodDescription
- numberOfPeriodsinteger<int32>Description
- serviceIdsinteger[]ExampleDescription
- paymentDetailsRequiredbooleanDescription
- groupDiscountFictiveGlobal.Api.Rest.Dtos.v1.GroupDiscountDescription
- activationCodeActivatedbooleanDescription
- metaDataFictiveGlobal.Api.Rest.Dtos.v1.GroupDiscountOfferTypeDescription
- qualifyingItemCountinteger<int32>Description
- freeItemCountOrDiscountAmountnumber<double>Description
- productIdsinteger[]ExampleDescription
- configurationTypestringDescription
- productSourcestringDescription
- customParametersobjectExampleDescription
- fixedPriceDiscountFictiveGlobal.Api.Rest.Dtos.v1.FixedPriceDiscountDescription
- discountAmountsFictiveGlobal.Api.Rest.Dtos.v1.Offers.DiscountAmount[]Description
- valuenumber<double>Description
- currencystringDescription
- paymentDetailsRequiredbooleanDescription
- subscriptionSettingsFictiveGlobal.Api.Rest.Dtos.v1.Offers.SubscriptionSettingsDescription
- enabledbooleanDescription
- numberOfPeriodsinteger<int32>Description
- lockInPeriodsinteger<int32>Description
- closeSubOnExpirybooleanDescription
- serviceIdsinteger[]ExampleDescription
- productSettingsFictiveGlobal.Api.Rest.Dtos.v1.Offers.ProductSettingsDescription
- enabledbooleanDescription
- productIdsinteger[]ExampleDescription
- miscellaneousChargeSettingsFictiveGlobal.Api.Rest.Dtos.v1.Offers.MiscellaneousChargeSettingsDescription
- enabledbooleanDescription
401
403
404
500
curl
curl --request GET \
--url https://api.fictive.com/REST/api/vouchers/{voucherCode}/validate \
--header 'accept: application/json' \
--header 'x-version: string'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-version", "string");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.fictive.com/REST/api/vouchers/{voucherCode}/validate", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.fictive.com/REST/api/vouchers/{voucherCode}/validate")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-version"] = "string"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.fictive.com/REST/api/vouchers/{voucherCode}/validate"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-version': 'string'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// OK
{
"purchaseInfo": {
"purchasePrice": "",
"discountPrice": "",
"renewalPrice": "",
"nextPaymentsDates": [
"2021-09-21T05:33:26.5730532"
]
},
"voucherInfo": {
"startDate": "2021-09-21T05:33:26.6043032",
"expiryDate": "2021-09-21T05:33:26.6043032",
"offerInfo": {
"name": "",
"description": "",
"usageType": "",
"applicationData": {
"name": "",
"message": "",
"message2": ""
},
"addCredits": {
"amount": "",
"currency": "",
"paymentDetailsRequired": false
},
"lowStart": {
"percentage": "",
"numberOfPeriods": "",
"lockInPeriods": "",
"closeSubOnExpiry": false,
"serviceIds": [
0
],
"paymentDetailsRequired": false
},
"percentageDiscount": {
"percentage": "",
"paymentDetailsRequired": false,
"productIds": [
0
]
},
"freePeriod": {
"numberOfPeriods": "",
"serviceIds": [
0
],
"paymentDetailsRequired": false
},
"groupDiscount": {
"activationCodeActivated": false,
"metaData": {
"qualifyingItemCount": "",
"freeItemCountOrDiscountAmount": "",
"productIds": [
0
],
"configurationType": "",
"productSource": "",
"customParameters": {}
}
},
"fixedPriceDiscount": {
"discountAmounts": [
{
"value": "",
"currency": ""
}
],
"paymentDetailsRequired": false,
"subscriptionSettings": {
"enabled": false,
"numberOfPeriods": "",
"lockInPeriods": "",
"closeSubOnExpiry": false,
"serviceIds": [
0
]
},
"productSettings": {
"enabled": false,
"productIds": [
0
]
},
"miscellaneousChargeSettings": {
"enabled": false
}
}
}
}
}401
// Not Authorized
403
// Offer is not for this affiate/account.
404
// Not Found
500
// Internal Server Error
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.