Update a discount coupon.
curl --request PUT \
--url https://{subdomain}.outseta.com/api/v1/billing/discountcoupons/{discountCouponUid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"Uid": "string",
"_objectType": "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"
}
'import requests
url = "https://{subdomain}.outseta.com/api/v1/billing/discountcoupons/{discountCouponUid}"
payload = {
"Uid": "string",
"_objectType": "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"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
Uid: 'string',
_objectType: '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'
})
};
fetch('https://{subdomain}.outseta.com/api/v1/billing/discountcoupons/{discountCouponUid}', 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/billing/discountcoupons/{discountCouponUid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'Uid' => 'string',
'_objectType' => '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'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.outseta.com/api/v1/billing/discountcoupons/{discountCouponUid}"
payload := strings.NewReader("{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"UniqueIdentifier\": \"string\",\n \"Name\": \"string\",\n \"IsActive\": false,\n \"AmountOff\": 0,\n \"PercentOff\": 0,\n \"RedeemBy\": \"string\",\n \"Duration\": 1,\n \"DurationInMonths\": 0,\n \"TimesRedeemed\": 0,\n \"MaxRedemptions\": 0,\n \"DiscountCouponPlans\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"Plan\": {},\n \"DiscountCoupon\": {}\n }\n ],\n \"ApplyToAddOns\": false,\n \"PlanUids\": \"string\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{subdomain}.outseta.com/api/v1/billing/discountcoupons/{discountCouponUid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"UniqueIdentifier\": \"string\",\n \"Name\": \"string\",\n \"IsActive\": false,\n \"AmountOff\": 0,\n \"PercentOff\": 0,\n \"RedeemBy\": \"string\",\n \"Duration\": 1,\n \"DurationInMonths\": 0,\n \"TimesRedeemed\": 0,\n \"MaxRedemptions\": 0,\n \"DiscountCouponPlans\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"Plan\": {},\n \"DiscountCoupon\": {}\n }\n ],\n \"ApplyToAddOns\": false,\n \"PlanUids\": \"string\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/billing/discountcoupons/{discountCouponUid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"UniqueIdentifier\": \"string\",\n \"Name\": \"string\",\n \"IsActive\": false,\n \"AmountOff\": 0,\n \"PercentOff\": 0,\n \"RedeemBy\": \"string\",\n \"Duration\": 1,\n \"DurationInMonths\": 0,\n \"TimesRedeemed\": 0,\n \"MaxRedemptions\": 0,\n \"DiscountCouponPlans\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"Plan\": {},\n \"DiscountCoupon\": {}\n }\n ],\n \"ApplyToAddOns\": false,\n \"PlanUids\": \"string\"\n}"
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
Update a discount coupon.
PUT
/
api
/
v1
/
billing
/
discountcoupons
/
{discountCouponUid}
Update a discount coupon.
curl --request PUT \
--url https://{subdomain}.outseta.com/api/v1/billing/discountcoupons/{discountCouponUid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"Uid": "string",
"_objectType": "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"
}
'import requests
url = "https://{subdomain}.outseta.com/api/v1/billing/discountcoupons/{discountCouponUid}"
payload = {
"Uid": "string",
"_objectType": "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"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
Uid: 'string',
_objectType: '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'
})
};
fetch('https://{subdomain}.outseta.com/api/v1/billing/discountcoupons/{discountCouponUid}', 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/billing/discountcoupons/{discountCouponUid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'Uid' => 'string',
'_objectType' => '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'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.outseta.com/api/v1/billing/discountcoupons/{discountCouponUid}"
payload := strings.NewReader("{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"UniqueIdentifier\": \"string\",\n \"Name\": \"string\",\n \"IsActive\": false,\n \"AmountOff\": 0,\n \"PercentOff\": 0,\n \"RedeemBy\": \"string\",\n \"Duration\": 1,\n \"DurationInMonths\": 0,\n \"TimesRedeemed\": 0,\n \"MaxRedemptions\": 0,\n \"DiscountCouponPlans\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"Plan\": {},\n \"DiscountCoupon\": {}\n }\n ],\n \"ApplyToAddOns\": false,\n \"PlanUids\": \"string\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{subdomain}.outseta.com/api/v1/billing/discountcoupons/{discountCouponUid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"UniqueIdentifier\": \"string\",\n \"Name\": \"string\",\n \"IsActive\": false,\n \"AmountOff\": 0,\n \"PercentOff\": 0,\n \"RedeemBy\": \"string\",\n \"Duration\": 1,\n \"DurationInMonths\": 0,\n \"TimesRedeemed\": 0,\n \"MaxRedemptions\": 0,\n \"DiscountCouponPlans\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"Plan\": {},\n \"DiscountCoupon\": {}\n }\n ],\n \"ApplyToAddOns\": false,\n \"PlanUids\": \"string\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/billing/discountcoupons/{discountCouponUid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"UniqueIdentifier\": \"string\",\n \"Name\": \"string\",\n \"IsActive\": false,\n \"AmountOff\": 0,\n \"PercentOff\": 0,\n \"RedeemBy\": \"string\",\n \"Duration\": 1,\n \"DurationInMonths\": 0,\n \"TimesRedeemed\": 0,\n \"MaxRedemptions\": 0,\n \"DiscountCouponPlans\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"Plan\": {},\n \"DiscountCoupon\": {}\n }\n ],\n \"ApplyToAddOns\": false,\n \"PlanUids\": \"string\"\n}"
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"
}Authorizations
BearerApiKey
Enter your access token (OAuth / JWT).
Path Parameters
The discount coupon's unique identifier
Body
application/json
The discount coupon's updated values
Maximum string length:
101 - Forever, 2 - Once, 3 - Repeating
Available options:
1, 2, 3 Required range:
1 <= x <= 3Show child attributes
Show child attributes
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
⌘I