Canjear un premio
curl --request POST \
--url https://api.tiendadepuntos.com/external/exchange/product \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"productOfferId": 4412,
"clientId": 84213
}
'import requests
url = "https://api.tiendadepuntos.com/external/exchange/product"
payload = {
"productOfferId": 4412,
"clientId": 84213
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({productOfferId: 4412, clientId: 84213})
};
fetch('https://api.tiendadepuntos.com/external/exchange/product', 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/exchange/product",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'productOfferId' => 4412,
'clientId' => 84213
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tiendadepuntos.com/external/exchange/product"
payload := strings.NewReader("{\n \"productOfferId\": 4412,\n \"clientId\": 84213\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tiendadepuntos.com/external/exchange/product")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"productOfferId\": 4412,\n \"clientId\": 84213\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiendadepuntos.com/external/exchange/product")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"productOfferId\": 4412,\n \"clientId\": 84213\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": 201,
"message": "Request was successful",
"data": {
"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": "Client not found",
"errors": [
{}
],
"data": {}
}{
"statusCode": 409,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "El producto no se encuentra disponible.",
"errors": [
{}
],
"data": {}
}{
"statusCode": 503,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "No se pudo procesar el canje en este momento. Reintentá en unos segundos.",
"errors": [
{}
],
"data": {}
}Canjes
Canjear un premio
Descuenta los puntos al cliente y genera un canje pendiente de entrega, con su código.
El canje no queda entregado: para eso, después llamá a POST /external/purchase/redeem/{code} con el code que devuelve esta llamada. La API pública no puede registrar un canje como entregado en un solo paso, porque esa operación exige un operador identificado.
Validaciones que pueden fallar con 409: puntos insuficientes, premio deshabilitado, sin stock, nivel del cliente insuficiente o tope de canjes alcanzado.
POST
/
external
/
exchange
/
product
Canjear un premio
curl --request POST \
--url https://api.tiendadepuntos.com/external/exchange/product \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"productOfferId": 4412,
"clientId": 84213
}
'import requests
url = "https://api.tiendadepuntos.com/external/exchange/product"
payload = {
"productOfferId": 4412,
"clientId": 84213
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({productOfferId: 4412, clientId: 84213})
};
fetch('https://api.tiendadepuntos.com/external/exchange/product', 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/exchange/product",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'productOfferId' => 4412,
'clientId' => 84213
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tiendadepuntos.com/external/exchange/product"
payload := strings.NewReader("{\n \"productOfferId\": 4412,\n \"clientId\": 84213\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tiendadepuntos.com/external/exchange/product")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"productOfferId\": 4412,\n \"clientId\": 84213\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiendadepuntos.com/external/exchange/product")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"productOfferId\": 4412,\n \"clientId\": 84213\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": 201,
"message": "Request was successful",
"data": {
"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": "Client not found",
"errors": [
{}
],
"data": {}
}{
"statusCode": 409,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "El producto no se encuentra disponible.",
"errors": [
{}
],
"data": {}
}{
"statusCode": 503,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "No se pudo procesar el canje en este momento. Reintentá en unos segundos.",
"errors": [
{}
],
"data": {}
}Authorizations
API key del comercio. Se genera desde el panel de Tienda de Puntos, en Configuración → Integraciones.
Headers
ID de la sucursal en la que se registra la operación. Si se omite, la operación queda asociada al comercio sin sucursal.
Example:
1972
Body
application/json

