List checkout links of a plan
curl --request GET \
--url https://coreapi.io/api/plans/{id}/checkout-links \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/api/plans/{id}/checkout-links"
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/api/plans/{id}/checkout-links', 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/api/plans/{id}/checkout-links",
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": "1280792f-4e23-793d-8e9c-3a1bf36630bd",
"slug": "pro-plan-pro",
"planTierId": "<string>",
"planTierName": "Pro",
"couponsAllowed": true,
"isEnabled": true,
"url": "https://coreapi.io/checkout-link/pro-plan-pro/cart",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"salesChannel": {
"id": "<string>",
"name": "default",
"brandName": "Pro Plan"
}
}
]{
"status": 404,
"type": "PLAN__NOT_FOUND",
"title": "An error occurred",
"detail": "Plan not found."
}{
"status": 404,
"type": "PLAN__NOT_FOUND",
"title": "An error occurred",
"detail": "Plan not found."
}{
"status": 404,
"type": "PLAN__NOT_FOUND",
"title": "An error occurred",
"detail": "Plan not found."
}Checkout-Links
List checkout links of a plan
List all checkout links that belong to a plan, newest first.
GET
/
api
/
plans
/
{id}
/
checkout-links
List checkout links of a plan
curl --request GET \
--url https://coreapi.io/api/plans/{id}/checkout-links \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/api/plans/{id}/checkout-links"
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/api/plans/{id}/checkout-links', 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/api/plans/{id}/checkout-links",
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": "1280792f-4e23-793d-8e9c-3a1bf36630bd",
"slug": "pro-plan-pro",
"planTierId": "<string>",
"planTierName": "Pro",
"couponsAllowed": true,
"isEnabled": true,
"url": "https://coreapi.io/checkout-link/pro-plan-pro/cart",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"salesChannel": {
"id": "<string>",
"name": "default",
"brandName": "Pro Plan"
}
}
]{
"status": 404,
"type": "PLAN__NOT_FOUND",
"title": "An error occurred",
"detail": "Plan not found."
}{
"status": 404,
"type": "PLAN__NOT_FOUND",
"title": "An error occurred",
"detail": "Plan not found."
}{
"status": 404,
"type": "PLAN__NOT_FOUND",
"title": "An error occurred",
"detail": "Plan not found."
}Autorisierungen
Organisation API token. Send it as Authorization: Bearer api_... The token is scoped to a single Organisation.
Pfadparameter
The plan UUID.
Beispiel:
"1280792f-4e23-793d-8e9c-3a1bf36630bd"
Antwort
The checkout links of the plan.
Beispiel:
"1280792f-4e23-793d-8e9c-3a1bf36630bd"
Beispiel:
"pro-plan-pro"
Beispiel:
"Pro"
Public checkout URL that creates a cart and redirects the buyer.
Beispiel:
"https://coreapi.io/checkout-link/pro-plan-pro/cart"
Show child attributes
Show child attributes
War diese Seite hilfreich?