Show a Coupon
curl --request GET \
--url https://public-api.stora.co/2025-09/coupons/{coupon_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://public-api.stora.co/2025-09/coupons/{coupon_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public-api.stora.co/2025-09/coupons/{coupon_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://public-api.stora.co/2025-09/coupons/{coupon_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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.stora.co/2025-09/coupons/{coupon_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.stora.co/2025-09/coupons/{coupon_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.stora.co/2025-09/coupons/{coupon_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"coupon": {
"id": "cpn_bdc9397d53d9bfc3",
"amount": {
"amount": 500,
"currency": "GBP",
"formatted": "£5.00"
},
"auto_apply_to": {
"products": false,
"protections": false,
"subscriptions": true,
"unit_types": false
},
"billing_period": null,
"code": "5OFF",
"created_at": "2025-02-22T14:41:00Z",
"duration": "forever",
"max_redemptions": null,
"months": null,
"name": "£5.00 off",
"public": false,
"title": null,
"type": "amount",
"updated_at": "2025-02-22T14:41:00Z"
},
"meta": {
"request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
"curies": [
{
"name": "bo",
"href": "https://app.stora.test{rel}",
"templated": true,
"title": "Backoffice"
},
{
"name": "sf",
"href": "https://acme.stora.test{rel}",
"templated": true,
"title": "Storefront"
}
]
}
}{
"error": {
"code": "invalid_url_param",
"details": [
{
"message": "value `invalid` at `/coupon_id` does not match pattern: ^cpn_",
"pointer": "/coupon_id"
}
],
"links": [
{
"kind": "api_reference",
"name": "Show a Coupon",
"url": "https://docs.stora.test/2025-09/api-reference/coupons/show-a-coupon"
},
{
"kind": "open_api",
"name": "OpenAPI specification",
"url": "https://docs.stora.test/2025-09/openapi.json"
},
{
"kind": "documentation",
"name": "Errors",
"url": "https://docs.stora.test/2025-09/guides/errors#invalid_url_param"
}
],
"message": "The request URL param is invalid.",
"request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
"type": "invalid_request_error"
}
}Coupons
Show a Coupon
Retrieve a coupon with its discount (percent or amount), duration, code and the line items it applies to automatically (auto_apply_to). A deleted coupon or a coupon past its redemption deadline returns 404. To use the coupon, set coupon.id in Create an Order or Update an Order. The coupon must still be redeemable on the order’s start date.
Required authorization scope: public.coupon:read
GET
/
2025-09
/
coupons
/
{coupon_id}
Show a Coupon
curl --request GET \
--url https://public-api.stora.co/2025-09/coupons/{coupon_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://public-api.stora.co/2025-09/coupons/{coupon_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public-api.stora.co/2025-09/coupons/{coupon_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://public-api.stora.co/2025-09/coupons/{coupon_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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.stora.co/2025-09/coupons/{coupon_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.stora.co/2025-09/coupons/{coupon_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.stora.co/2025-09/coupons/{coupon_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"coupon": {
"id": "cpn_bdc9397d53d9bfc3",
"amount": {
"amount": 500,
"currency": "GBP",
"formatted": "£5.00"
},
"auto_apply_to": {
"products": false,
"protections": false,
"subscriptions": true,
"unit_types": false
},
"billing_period": null,
"code": "5OFF",
"created_at": "2025-02-22T14:41:00Z",
"duration": "forever",
"max_redemptions": null,
"months": null,
"name": "£5.00 off",
"public": false,
"title": null,
"type": "amount",
"updated_at": "2025-02-22T14:41:00Z"
},
"meta": {
"request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
"curies": [
{
"name": "bo",
"href": "https://app.stora.test{rel}",
"templated": true,
"title": "Backoffice"
},
{
"name": "sf",
"href": "https://acme.stora.test{rel}",
"templated": true,
"title": "Storefront"
}
]
}
}{
"error": {
"code": "invalid_url_param",
"details": [
{
"message": "value `invalid` at `/coupon_id` does not match pattern: ^cpn_",
"pointer": "/coupon_id"
}
],
"links": [
{
"kind": "api_reference",
"name": "Show a Coupon",
"url": "https://docs.stora.test/2025-09/api-reference/coupons/show-a-coupon"
},
{
"kind": "open_api",
"name": "OpenAPI specification",
"url": "https://docs.stora.test/2025-09/openapi.json"
},
{
"kind": "documentation",
"name": "Errors",
"url": "https://docs.stora.test/2025-09/guides/errors#invalid_url_param"
}
],
"message": "The request URL param is invalid.",
"request_id": "01563646-58c1-4607-8fe0-cae3e92c4477",
"type": "invalid_request_error"
}
}Query Parameters
Returns only the listed fields, such as id,status,site.name. Identifiers and constant fields such as object are always returned. A field inside an expandable association also needs it in expand, unless the collapsed association returns it, such as site.id. For more, see the documentation page.
Was this page helpful?