List Coupons
curl --request GET \
--url https://api.example.com/wp-json/latepoint-api/v1/couponsimport requests
url = "https://api.example.com/wp-json/latepoint-api/v1/coupons"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/wp-json/latepoint-api/v1/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://api.example.com/wp-json/latepoint-api/v1/coupons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/wp-json/latepoint-api/v1/coupons"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/wp-json/latepoint-api/v1/coupons")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/coupons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyCoupons
List Coupons
Retrieve a list of all coupons with optional filtering and pagination.
GET
/
wp-json
/
latepoint-api
/
v1
/
coupons
List Coupons
curl --request GET \
--url https://api.example.com/wp-json/latepoint-api/v1/couponsimport requests
url = "https://api.example.com/wp-json/latepoint-api/v1/coupons"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/wp-json/latepoint-api/v1/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://api.example.com/wp-json/latepoint-api/v1/coupons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/wp-json/latepoint-api/v1/coupons"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/wp-json/latepoint-api/v1/coupons")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/coupons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyQuery Parameters
integer
default:"1"
Page number for pagination
integer
default:"20"
Number of coupons per page (max 100)
string
Filter coupons by status. Available values:
active, inactivestring
Search coupons by code or name
string
Filter by discount type. Valid values:
percent, fixed_amountnumber
Filter coupons with a discount value greater than or equal to this amount
number
Filter coupons with a discount value less than or equal to this amount
string
Filter coupons whose
active_from date is on or after this date (YYYY-MM-DD)string
Filter coupons whose
active_to date is on or before this date (YYYY-MM-DD)string
default:"created_at"
Field to sort results by. Valid values:
id, code, discount_value, active_from, active_to, created_atstring
default:"DESC"
Sort direction. Valid values:
ASC, DESCExample Request
GET /wp-json/latepoint-api/v1/coupons?status=active&per_page=10
Authorization: Bearer YOUR_API_KEY
Response
{
"success": true,
"data": [
{
"id": "6",
"code": "DESCUENTO25",
"name": "Descuento 25%",
"description": "Descuento del 25% en todos los servicios",
"discount_type": "percent",
"discount_value": 25,
"readable_discount": "25%",
"status": "active",
"active_from": "0000-00-00",
"active_to": "0000-00-00",
"usage_count": 0,
"total_discount": 0,
"last_usage_date": "n/a",
"created_at": "2025-08-18 07:59:36",
"updated_at": "2025-08-18 07:59:36"
}
],
"pagination": {
"page": 1,
"per_page": 10,
"total": 4,
"total_pages": 1,
"has_next_page": false,
"has_previous_page": false
}
}
