Retrieve a discount coupon by code.
curl --request GET \
--url https://{subdomain}.outseta.com/api/v1/public/billing/discountcoupons/{code}import requests
url = "https://{subdomain}.outseta.com/api/v1/public/billing/discountcoupons/{code}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{subdomain}.outseta.com/api/v1/public/billing/discountcoupons/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.outseta.com/api/v1/public/billing/discountcoupons/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.outseta.com/api/v1/public/billing/discountcoupons/{code}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{subdomain}.outseta.com/api/v1/public/billing/discountcoupons/{code}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/public/billing/discountcoupons/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"UniqueIdentifier": "string",
"Name": "string",
"IsActive": false,
"AmountOff": 0,
"PercentOff": 0,
"RedeemBy": "string",
"Duration": 1,
"DurationInMonths": 0,
"TimesRedeemed": 0,
"MaxRedemptions": 0,
"DiscountCouponPlans": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"Plan": {},
"DiscountCoupon": {}
}
],
"ApplyToAddOns": false,
"PlanUids": "string"
}Discounts
Retrieve a discount coupon by code.
Used during registration to confirm that a coupon code can still be applied to a plan. Returns the coupon when valid, 404 when no coupon matches the code, or a validation error when the coupon cannot be applied.
GET
/
api
/
v1
/
public
/
billing
/
discountcoupons
/
{code}
Retrieve a discount coupon by code.
curl --request GET \
--url https://{subdomain}.outseta.com/api/v1/public/billing/discountcoupons/{code}import requests
url = "https://{subdomain}.outseta.com/api/v1/public/billing/discountcoupons/{code}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{subdomain}.outseta.com/api/v1/public/billing/discountcoupons/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.outseta.com/api/v1/public/billing/discountcoupons/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.outseta.com/api/v1/public/billing/discountcoupons/{code}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{subdomain}.outseta.com/api/v1/public/billing/discountcoupons/{code}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/public/billing/discountcoupons/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"UniqueIdentifier": "string",
"Name": "string",
"IsActive": false,
"AmountOff": 0,
"PercentOff": 0,
"RedeemBy": "string",
"Duration": 1,
"DurationInMonths": 0,
"TimesRedeemed": 0,
"MaxRedemptions": 0,
"DiscountCouponPlans": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"Plan": {},
"DiscountCoupon": {}
}
],
"ApplyToAddOns": false,
"PlanUids": "string"
}Path Parameters
The discount coupon's code
Query Parameters
The unique identifier of the plan to validate the coupon against
Response
Minimum string length:
1Minimum string length:
1Maximum string length:
101 - Forever, 2 - Once, 3 - Repeating
Available options:
1, 2, 3 Required range:
1 <= x <= 3Show child attributes
Show child attributes