curl -X POST \
/coupons \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"code": "10OFF",
"name": "10% off",
"percentage": "10",
"fixedAmount": [],
"frequencyInterval": "3",
"maxRedemptionsPerCustomer": "null",
"maxRedemptions": "null",
"expiresAt": "null",
"limitedToPlans": [
"https:\/\/example.com\/"
],
"excludedFromPlans": [
"https:\/\/example.com\/"
],
"limitedToProducts": [
"https:\/\/example.com\/"
],
"excludedFromProducts": [
"https:\/\/example.com\/"
],
"isEnabled": "1"
}'import requests
url = "https://coreapi.io/coupons"
payload = {
"code": "10OFF",
"name": "10% off",
"type": "percentage",
"frequency": "limited",
"percentage": 10,
"fixedAmount": {},
"frequencyInterval": 3,
"maxRedemptionsPerCustomer": "null",
"maxRedemptions": "null",
"expiresAt": "null",
"limitedToPlans": ["https://example.com/"],
"excludedFromPlans": ["https://example.com/"],
"limitedToProducts": ["https://example.com/"],
"excludedFromProducts": ["https://example.com/"],
"isEnabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
code: '10OFF',
name: '10% off',
type: 'percentage',
frequency: 'limited',
percentage: 10,
fixedAmount: {},
frequencyInterval: 3,
maxRedemptionsPerCustomer: 'null',
maxRedemptions: 'null',
expiresAt: 'null',
limitedToPlans: ['https://example.com/'],
excludedFromPlans: ['https://example.com/'],
limitedToProducts: ['https://example.com/'],
excludedFromProducts: ['https://example.com/'],
isEnabled: true
})
};
fetch('https://coreapi.io/coupons', 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://coreapi.io/coupons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'code' => '10OFF',
'name' => '10% off',
'type' => 'percentage',
'frequency' => 'limited',
'percentage' => 10,
'fixedAmount' => [
],
'frequencyInterval' => 3,
'maxRedemptionsPerCustomer' => 'null',
'maxRedemptions' => 'null',
'expiresAt' => 'null',
'limitedToPlans' => [
'https://example.com/'
],
'excludedFromPlans' => [
'https://example.com/'
],
'limitedToProducts' => [
'https://example.com/'
],
'excludedFromProducts' => [
'https://example.com/'
],
'isEnabled' => true
]),
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;
}{
"code": "10OFF",
"name": "10% off",
"type": "percentage",
"frequency": "limited",
"id": "<string>",
"percentage": 10,
"fixedAmount": {},
"frequencyInterval": 3,
"maxRedemptionsPerCustomer": "null",
"maxRedemptions": "null",
"expiresAt": "null",
"limitedToPlans": [
{
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"family": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "basic-m2023",
"originProduct": {
"productFamilies": [
{
"name": "Team Packages",
"id": "ad8b3b9e-5b0a-4e1a-8b0a-4e1a8b0a4e1a",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"type": "product",
"measurement": {
"unit": {
"id": {},
"name": "Stück",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "users",
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"description": "The number of users.",
"aggregationType": "sum",
"fairBilling": true,
"type": "recurring"
},
"taxGroup": {
"internalDescription": "19%",
"reverseChargeType": "REVERSE_CHARGE",
"type": "standard",
"id": "00000000-0000-0000-0000-000000000000"
},
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"name": "Basic",
"description": "For small teams.",
"internalName": "Basic (Weekly)",
"number": "M-1234",
"invoiceVisibility": "always",
"costCentre": {
"name": "Cost Centre",
"type": "KOST1",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"costCentre2": {
"name": "Cost Centre",
"type": "KOST1",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isArchived": true,
"customFields": {
"field1": "value1",
"field2": "value2"
}
},
"allowCheckout": true,
"status": "draft",
"createdAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>"
}
],
"excludedFromPlans": [
{
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"family": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "basic-m2023",
"originProduct": {
"productFamilies": [
{
"name": "Team Packages",
"id": "ad8b3b9e-5b0a-4e1a-8b0a-4e1a8b0a4e1a",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"type": "product",
"measurement": {
"unit": {
"id": {},
"name": "Stück",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "users",
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"description": "The number of users.",
"aggregationType": "sum",
"fairBilling": true,
"type": "recurring"
},
"taxGroup": {
"internalDescription": "19%",
"reverseChargeType": "REVERSE_CHARGE",
"type": "standard",
"id": "00000000-0000-0000-0000-000000000000"
},
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"name": "Basic",
"description": "For small teams.",
"internalName": "Basic (Weekly)",
"number": "M-1234",
"invoiceVisibility": "always",
"costCentre": {
"name": "Cost Centre",
"type": "KOST1",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"costCentre2": {
"name": "Cost Centre",
"type": "KOST1",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isArchived": true,
"customFields": {
"field1": "value1",
"field2": "value2"
}
},
"allowCheckout": true,
"status": "draft",
"createdAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>"
}
],
"limitedToProducts": [
{
"productFamilies": [
{
"name": "Team Packages",
"id": "ad8b3b9e-5b0a-4e1a-8b0a-4e1a8b0a4e1a",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"type": "product",
"measurement": {
"unit": {
"id": {},
"name": "Stück",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "users",
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"description": "The number of users.",
"aggregationType": "sum",
"fairBilling": true,
"type": "recurring"
},
"taxGroup": {
"internalDescription": "19%",
"reverseChargeType": "REVERSE_CHARGE",
"type": "standard",
"id": "00000000-0000-0000-0000-000000000000"
},
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"name": "Basic",
"description": "For small teams.",
"internalName": "Basic (Weekly)",
"number": "M-1234",
"invoiceVisibility": "always",
"costCentre": {
"name": "Cost Centre",
"type": "KOST1",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"costCentre2": {
"name": "Cost Centre",
"type": "KOST1",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isArchived": true,
"customFields": {
"field1": "value1",
"field2": "value2"
}
}
],
"excludedFromProducts": [
{
"productFamilies": [
{
"name": "Team Packages",
"id": "ad8b3b9e-5b0a-4e1a-8b0a-4e1a8b0a4e1a",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"type": "product",
"measurement": {
"unit": {
"id": {},
"name": "Stück",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "users",
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"description": "The number of users.",
"aggregationType": "sum",
"fairBilling": true,
"type": "recurring"
},
"taxGroup": {
"internalDescription": "19%",
"reverseChargeType": "REVERSE_CHARGE",
"type": "standard",
"id": "00000000-0000-0000-0000-000000000000"
},
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"name": "Basic",
"description": "For small teams.",
"internalName": "Basic (Weekly)",
"number": "M-1234",
"invoiceVisibility": "always",
"costCentre": {
"name": "Cost Centre",
"type": "KOST1",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"costCentre2": {
"name": "Cost Centre",
"type": "KOST1",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isArchived": true,
"customFields": {
"field1": "value1",
"field2": "value2"
}
}
],
"isEnabled": true,
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00",
"reedemptions": true
}Create a coupon
You can create a coupon, which can be used by customers to get a discount on their subscription. You can create a coupon with a fixed amount or a percentage. You can also set a maximum number of uses and a maximum number of uses per customer. You can also set an end date, after which the coupon is no longer valid.
The coupon code can be used in the checkout process, in the customer front, or via the API.
Required permissions:coupon:writecurl -X POST \
/coupons \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"code": "10OFF",
"name": "10% off",
"percentage": "10",
"fixedAmount": [],
"frequencyInterval": "3",
"maxRedemptionsPerCustomer": "null",
"maxRedemptions": "null",
"expiresAt": "null",
"limitedToPlans": [
"https:\/\/example.com\/"
],
"excludedFromPlans": [
"https:\/\/example.com\/"
],
"limitedToProducts": [
"https:\/\/example.com\/"
],
"excludedFromProducts": [
"https:\/\/example.com\/"
],
"isEnabled": "1"
}'import requests
url = "https://coreapi.io/coupons"
payload = {
"code": "10OFF",
"name": "10% off",
"type": "percentage",
"frequency": "limited",
"percentage": 10,
"fixedAmount": {},
"frequencyInterval": 3,
"maxRedemptionsPerCustomer": "null",
"maxRedemptions": "null",
"expiresAt": "null",
"limitedToPlans": ["https://example.com/"],
"excludedFromPlans": ["https://example.com/"],
"limitedToProducts": ["https://example.com/"],
"excludedFromProducts": ["https://example.com/"],
"isEnabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
code: '10OFF',
name: '10% off',
type: 'percentage',
frequency: 'limited',
percentage: 10,
fixedAmount: {},
frequencyInterval: 3,
maxRedemptionsPerCustomer: 'null',
maxRedemptions: 'null',
expiresAt: 'null',
limitedToPlans: ['https://example.com/'],
excludedFromPlans: ['https://example.com/'],
limitedToProducts: ['https://example.com/'],
excludedFromProducts: ['https://example.com/'],
isEnabled: true
})
};
fetch('https://coreapi.io/coupons', 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://coreapi.io/coupons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'code' => '10OFF',
'name' => '10% off',
'type' => 'percentage',
'frequency' => 'limited',
'percentage' => 10,
'fixedAmount' => [
],
'frequencyInterval' => 3,
'maxRedemptionsPerCustomer' => 'null',
'maxRedemptions' => 'null',
'expiresAt' => 'null',
'limitedToPlans' => [
'https://example.com/'
],
'excludedFromPlans' => [
'https://example.com/'
],
'limitedToProducts' => [
'https://example.com/'
],
'excludedFromProducts' => [
'https://example.com/'
],
'isEnabled' => true
]),
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;
}{
"code": "10OFF",
"name": "10% off",
"type": "percentage",
"frequency": "limited",
"id": "<string>",
"percentage": 10,
"fixedAmount": {},
"frequencyInterval": 3,
"maxRedemptionsPerCustomer": "null",
"maxRedemptions": "null",
"expiresAt": "null",
"limitedToPlans": [
{
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"family": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "basic-m2023",
"originProduct": {
"productFamilies": [
{
"name": "Team Packages",
"id": "ad8b3b9e-5b0a-4e1a-8b0a-4e1a8b0a4e1a",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"type": "product",
"measurement": {
"unit": {
"id": {},
"name": "Stück",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "users",
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"description": "The number of users.",
"aggregationType": "sum",
"fairBilling": true,
"type": "recurring"
},
"taxGroup": {
"internalDescription": "19%",
"reverseChargeType": "REVERSE_CHARGE",
"type": "standard",
"id": "00000000-0000-0000-0000-000000000000"
},
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"name": "Basic",
"description": "For small teams.",
"internalName": "Basic (Weekly)",
"number": "M-1234",
"invoiceVisibility": "always",
"costCentre": {
"name": "Cost Centre",
"type": "KOST1",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"costCentre2": {
"name": "Cost Centre",
"type": "KOST1",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isArchived": true,
"customFields": {
"field1": "value1",
"field2": "value2"
}
},
"allowCheckout": true,
"status": "draft",
"createdAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>"
}
],
"excludedFromPlans": [
{
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"family": {
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "basic-m2023",
"originProduct": {
"productFamilies": [
{
"name": "Team Packages",
"id": "ad8b3b9e-5b0a-4e1a-8b0a-4e1a8b0a4e1a",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"type": "product",
"measurement": {
"unit": {
"id": {},
"name": "Stück",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "users",
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"description": "The number of users.",
"aggregationType": "sum",
"fairBilling": true,
"type": "recurring"
},
"taxGroup": {
"internalDescription": "19%",
"reverseChargeType": "REVERSE_CHARGE",
"type": "standard",
"id": "00000000-0000-0000-0000-000000000000"
},
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"name": "Basic",
"description": "For small teams.",
"internalName": "Basic (Weekly)",
"number": "M-1234",
"invoiceVisibility": "always",
"costCentre": {
"name": "Cost Centre",
"type": "KOST1",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"costCentre2": {
"name": "Cost Centre",
"type": "KOST1",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isArchived": true,
"customFields": {
"field1": "value1",
"field2": "value2"
}
},
"allowCheckout": true,
"status": "draft",
"createdAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>"
}
],
"limitedToProducts": [
{
"productFamilies": [
{
"name": "Team Packages",
"id": "ad8b3b9e-5b0a-4e1a-8b0a-4e1a8b0a4e1a",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"type": "product",
"measurement": {
"unit": {
"id": {},
"name": "Stück",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "users",
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"description": "The number of users.",
"aggregationType": "sum",
"fairBilling": true,
"type": "recurring"
},
"taxGroup": {
"internalDescription": "19%",
"reverseChargeType": "REVERSE_CHARGE",
"type": "standard",
"id": "00000000-0000-0000-0000-000000000000"
},
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"name": "Basic",
"description": "For small teams.",
"internalName": "Basic (Weekly)",
"number": "M-1234",
"invoiceVisibility": "always",
"costCentre": {
"name": "Cost Centre",
"type": "KOST1",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"costCentre2": {
"name": "Cost Centre",
"type": "KOST1",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isArchived": true,
"customFields": {
"field1": "value1",
"field2": "value2"
}
}
],
"excludedFromProducts": [
{
"productFamilies": [
{
"name": "Team Packages",
"id": "ad8b3b9e-5b0a-4e1a-8b0a-4e1a8b0a4e1a",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
}
],
"type": "product",
"measurement": {
"unit": {
"id": {},
"name": "Stück",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"code": "users",
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"description": "The number of users.",
"aggregationType": "sum",
"fairBilling": true,
"type": "recurring"
},
"taxGroup": {
"internalDescription": "19%",
"reverseChargeType": "REVERSE_CHARGE",
"type": "standard",
"id": "00000000-0000-0000-0000-000000000000"
},
"id": "ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b",
"name": "Basic",
"description": "For small teams.",
"internalName": "Basic (Weekly)",
"number": "M-1234",
"invoiceVisibility": "always",
"costCentre": {
"name": "Cost Centre",
"type": "KOST1",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"costCentre2": {
"name": "Cost Centre",
"type": "KOST1",
"id": "ad8f1c9c-4f0a-4e1a-8b1a-9c4d9c4d9c4d",
"code": "CC",
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isArchived": true,
"customFields": {
"field1": "value1",
"field2": "value2"
}
}
],
"isEnabled": true,
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00",
"reedemptions": true
}Autorisierungen
Body
The new Coupon resource
The frequency at which a coupon should be applied.
Possible values:
once: The coupon will be applied once for the first billing period.limited: The coupon will be applied for a limited number of billing periods.lifetime: The coupon will be applied forever.
"limited"
The date and time this coupon will expire. If null, there is no expiration date. A date-time with an offset or a zone (2026-11-01T10:00:00+01:00, 2026-11-01T09:00:00Z) is taken as given; a date-time without a zone (2026-11-01T10:00:00) is read in the organisation's time zone; a date alone (2026-11-01) is 00:00 in the organisation's time zone. Stored as an instant and returned as an ISO-8601 date-time with offset.
null
Antwort
Coupon resource created
The frequency at which a coupon should be applied.
Possible values:
once: The coupon will be applied once for the first billing period.limited: The coupon will be applied for a limited number of billing periods.lifetime: The coupon will be applied forever.
"limited"
The date and time this coupon will expire. If null, there is no expiration date. A date-time with an offset or a zone (2026-11-01T10:00:00+01:00, 2026-11-01T09:00:00Z) is taken as given; a date-time without a zone (2026-11-01T10:00:00) is read in the organisation's time zone; a date alone (2026-11-01) is 00:00 in the organisation's time zone. Stored as an instant and returned as an ISO-8601 date-time with offset.
null
War diese Seite hilfreich?