curl --request GET \
--url https://api.tiendadepuntos.com/external/purchase/code/{code} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.tiendadepuntos.com/external/purchase/code/{code}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.tiendadepuntos.com/external/purchase/code/{code}', 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.tiendadepuntos.com/external/purchase/code/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.tiendadepuntos.com/external/purchase/code/{code}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.tiendadepuntos.com/external/purchase/code/{code}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiendadepuntos.com/external/purchase/code/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 45012,
"code": "A1B2C3",
"status": "pending",
"type": "product",
"points": 500,
"moneyAmount": null,
"product": {
"id": 771,
"name": "Café gratis"
},
"client": {
"id": 84213,
"firstName": "Juan Manuel",
"lastName": "Pérez",
"email": "juanma@mailinator.com"
},
"branch": {
"id": 1972,
"name": "Sucursal Centro"
},
"createdAt": "2026-07-28T18:05:00.000Z",
"updatedAt": "2026-07-28T18:05:00.000Z"
}{
"statusCode": 400,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "Error de validación",
"errors": [
{}
],
"data": {}
}{
"statusCode": 401,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "Api key is invalid",
"errors": [
{}
],
"data": {}
}{
"statusCode": 404,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "Canje no encontrado",
"errors": [
{}
],
"data": {}
}Consultar un canje por código
Devuelve el detalle del canje —producto y cliente— sin entregarlo. Sirve para que el operador confirme qué tiene que dar antes de llamar a POST /external/purchase/redeem/{code}.
Atención: este endpoint devuelve el canje directamente, sin el envelope { success, status, message, data }.
curl --request GET \
--url https://api.tiendadepuntos.com/external/purchase/code/{code} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.tiendadepuntos.com/external/purchase/code/{code}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.tiendadepuntos.com/external/purchase/code/{code}', 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.tiendadepuntos.com/external/purchase/code/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.tiendadepuntos.com/external/purchase/code/{code}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.tiendadepuntos.com/external/purchase/code/{code}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiendadepuntos.com/external/purchase/code/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 45012,
"code": "A1B2C3",
"status": "pending",
"type": "product",
"points": 500,
"moneyAmount": null,
"product": {
"id": 771,
"name": "Café gratis"
},
"client": {
"id": 84213,
"firstName": "Juan Manuel",
"lastName": "Pérez",
"email": "juanma@mailinator.com"
},
"branch": {
"id": 1972,
"name": "Sucursal Centro"
},
"createdAt": "2026-07-28T18:05:00.000Z",
"updatedAt": "2026-07-28T18:05:00.000Z"
}{
"statusCode": 400,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "Error de validación",
"errors": [
{}
],
"data": {}
}{
"statusCode": 401,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "Api key is invalid",
"errors": [
{}
],
"data": {}
}{
"statusCode": 404,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "Canje no encontrado",
"errors": [
{}
],
"data": {}
}Authorizations
API key del comercio. Se genera desde el panel de Tienda de Puntos, en Configuración → Integraciones.
Path Parameters
Código del canje.
"A1B2C3"
Response
Detalle del canje. Sin envelope.
ID del canje.
45012
Código que presenta el cliente para retirar el premio. Es el que se usa en POST /external/purchase/redeem/{code}.
"A1B2C3"
Estado del canje. Los canjes creados por la API nacen en pending.
pending, canceled, delivered "pending"
Si el canje fue por un premio o por dinero.
product, money Puntos debitados al cliente.
500
Monto en pesos. Solo en canjes por dinero.
null
Premio canjeado. null en canjes por dinero.
Show child attributes
Show child attributes
Cliente que canjeó.
Show child attributes
Show child attributes
Sucursal donde se registró el canje.
Show child attributes
Show child attributes
"2026-07-28T18:05:00.000Z"
"2026-07-28T18:05:00.000Z"

