cURL
curl -X GET \
/coupons \
--header "Authorization: Bearer <token>"import requests
url = "https://coreapi.io/coupons"
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/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 => "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;
}{
"data": [
{
"code": "10OFF",
"name": "10% off",
"type": "percentage",
"frequency": "limited",
"id": "<string>",
"percentage": 10,
"fixedAmount": {},
"frequencyInterval": 3,
"maxRedemptions": "null",
"expiresAt": "null",
"isEnabled": true,
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00",
"reedemptions": true
}
],
"meta": {
"pagination": {
"totalItems": 123,
"itemsPerPage": 123,
"currentPage": 123,
"lastPage": 123,
"pageTotalItems": 123
}
}
}Coupon
Get all coupons
Get all coupons.
Required permissions:coupon:readGET
/
coupons
cURL
curl -X GET \
/coupons \
--header "Authorization: Bearer <token>"import requests
url = "https://coreapi.io/coupons"
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/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 => "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;
}{
"data": [
{
"code": "10OFF",
"name": "10% off",
"type": "percentage",
"frequency": "limited",
"id": "<string>",
"percentage": 10,
"fixedAmount": {},
"frequencyInterval": 3,
"maxRedemptions": "null",
"expiresAt": "null",
"isEnabled": true,
"createdAt": "2021-01-01T00:00:00+00:00",
"updatedAt": "2021-01-01T00:00:00+00:00",
"reedemptions": true
}
],
"meta": {
"pagination": {
"totalItems": 123,
"itemsPerPage": 123,
"currentPage": 123,
"lastPage": 123,
"pageTotalItems": 123
}
}
}Autorisierungen
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Abfrageparameter
The collection page number
The number of items per page
Erforderlicher Bereich:
0 <= x <= 100War diese Seite hilfreich?
⌘I