Get a coupon
curl --request GET \
--url https://api.salesive.com/api/v1/coupons/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.salesive.com/api/v1/coupons/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.salesive.com/api/v1/coupons/{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://api.salesive.com/api/v1/coupons/{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://api.salesive.com/api/v1/coupons/{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://api.salesive.com/api/v1/coupons/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/coupons/{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{
"status": 200,
"success": true,
"message": "Coupon retrieved",
"data": {
"_id": "66b1f2a9c4d5e6f7a8b9c0d1",
"code": "SUMMER20",
"user": "66a0e1b2c3d4e5f6a7b8c9d0",
"shop": "66a0d1c2b3a4958677564738",
"type": "percentage",
"discount": 20,
"usageLimit": 100,
"usageCount": 12,
"usagePerUser": 1,
"minimumOrderAmount": 5000,
"startDate": "2026-06-01T00:00:00.000Z",
"endDate": "2026-08-31T23:59:59.000Z",
"active": true,
"createdAt": "2026-05-20T10:15:00.000Z",
"updatedAt": "2026-06-25T09:00:00.000Z"
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}{
"status": 404,
"success": false,
"message": "Coupon not found",
"data": null
}Discounts
Get a coupon
Retrieve a single discount coupon by id. Requires the READ_DISCOUNTS scope.
GET
/
coupons
/
{id}
Get a coupon
curl --request GET \
--url https://api.salesive.com/api/v1/coupons/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.salesive.com/api/v1/coupons/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.salesive.com/api/v1/coupons/{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://api.salesive.com/api/v1/coupons/{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://api.salesive.com/api/v1/coupons/{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://api.salesive.com/api/v1/coupons/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/coupons/{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{
"status": 200,
"success": true,
"message": "Coupon retrieved",
"data": {
"_id": "66b1f2a9c4d5e6f7a8b9c0d1",
"code": "SUMMER20",
"user": "66a0e1b2c3d4e5f6a7b8c9d0",
"shop": "66a0d1c2b3a4958677564738",
"type": "percentage",
"discount": 20,
"usageLimit": 100,
"usageCount": 12,
"usagePerUser": 1,
"minimumOrderAmount": 5000,
"startDate": "2026-06-01T00:00:00.000Z",
"endDate": "2026-08-31T23:59:59.000Z",
"active": true,
"createdAt": "2026-05-20T10:15:00.000Z",
"updatedAt": "2026-06-25T09:00:00.000Z"
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}{
"status": 404,
"success": false,
"message": "Coupon not found",
"data": null
}Returns one coupon by id, scoped to the store bound to your app token; returns 404 if it does not exist in this store. The store is bound to your app token server-side — never send a shop id.
Authorizations
Installed-app access token (prefix app_), issued by the OAuth install flow. The store is bound to the token server-side — never send a shop id.
Path Parameters
The coupon's unique id.
Response
The requested coupon.
Standard Salesive response envelope. The operation-specific payload is carried in data.
Was this page helpful?
⌘I

