cURL
curl -X GET \
/subscription-item-applied-discounts/{id} \
--header "Authorization: Bearer <token>"import requests
url = "https://coreapi.io/subscription-item-applied-discounts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/subscription-item-applied-discounts/{id}', 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/subscription-item-applied-discounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"subscriptionItem": "https://example.com/",
"coupon": "https://example.com/",
"status": "active",
"discount": {
"name": "10% off",
"type": "percentage",
"frequency": "limited",
"percentage": 10,
"fixedAmount": {},
"frequencyInterval": 3
},
"appliedIntervals": 1,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"removed": true,
"completed": true,
"active": true,
"tenantId": "<string>"
}Item
Get a subscription item applied discount.
Retrieves a SubscriptionItemAppliedDiscount resource.
GET
/
subscription-item-applied-discounts
/
{id}
cURL
curl -X GET \
/subscription-item-applied-discounts/{id} \
--header "Authorization: Bearer <token>"import requests
url = "https://coreapi.io/subscription-item-applied-discounts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/subscription-item-applied-discounts/{id}', 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/subscription-item-applied-discounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"subscriptionItem": "https://example.com/",
"coupon": "https://example.com/",
"status": "active",
"discount": {
"name": "10% off",
"type": "percentage",
"frequency": "limited",
"percentage": 10,
"fixedAmount": {},
"frequencyInterval": 3
},
"appliedIntervals": 1,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"removed": true,
"completed": true,
"active": true,
"tenantId": "<string>"
}Autorisierungen
Antwort
SubscriptionItemAppliedDiscount resource
The status of this applied discount.
Possible values:
active: The discount is active and will be applied to the subscription item.completed: The discount is not active anymore, but it was applied to the subscription item.removed: The discount was removed from the subscription item.
Beispiel:
"active"
War diese Seite hilfreich?