curl --request POST \
--url https://api.tiendadepuntos.com/external/tags/add/preview \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"clientId": 84512,
"amount": 4000,
"initialPointsToGive": 50,
"pointItems": [
{
"id": 87,
"quantity": 2
}
],
"branch_id": 1972
}
'import requests
url = "https://api.tiendadepuntos.com/external/tags/add/preview"
payload = {
"clientId": 84512,
"amount": 4000,
"initialPointsToGive": 50,
"pointItems": [
{
"id": 87,
"quantity": 2
}
],
"branch_id": 1972
}
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({
clientId: 84512,
amount: 4000,
initialPointsToGive: 50,
pointItems: [{id: 87, quantity: 2}],
branch_id: 1972
})
};
fetch('https://api.tiendadepuntos.com/external/tags/add/preview', 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/tags/add/preview",
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([
'clientId' => 84512,
'amount' => 4000,
'initialPointsToGive' => 50,
'pointItems' => [
[
'id' => 87,
'quantity' => 2
]
],
'branch_id' => 1972
]),
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/tags/add/preview"
payload := strings.NewReader("{\n \"clientId\": 84512,\n \"amount\": 4000,\n \"initialPointsToGive\": 50,\n \"pointItems\": [\n {\n \"id\": 87,\n \"quantity\": 2\n }\n ],\n \"branch_id\": 1972\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/tags/add/preview")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"clientId\": 84512,\n \"amount\": 4000,\n \"initialPointsToGive\": 50,\n \"pointItems\": [\n {\n \"id\": 87,\n \"quantity\": 2\n }\n ],\n \"branch_id\": 1972\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiendadepuntos.com/external/tags/add/preview")
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 \"clientId\": 84512,\n \"amount\": 4000,\n \"initialPointsToGive\": 50,\n \"pointItems\": [\n {\n \"id\": 87,\n \"quantity\": 2\n }\n ],\n \"branch_id\": 1972\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": 200,
"message": "Request was successful",
"data": {
"points": {
"initialPointsToGive": 40,
"levelBonusPoints": 8,
"pointRulesBonusPoints": 12,
"totalPointsToGive": 60
},
"calculatedAt": "2026-09-21T14:32:11.000Z"
}
}{
"statusCode": 400,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "La operación no otorga ningún punto: el valor enviado no alcanza para sumar ni un punto con la configuración del comercio.",
"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": 403,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "El cliente al que estás intentando sumar puntos se encuentra suspendido",
"errors": [
{}
],
"data": {}
}{
"statusCode": 404,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "Client not found",
"errors": [
{}
],
"data": {}
}Simular una suma de puntos
Devuelve cuántos puntos se acreditarían, con el desglose, sin acreditar nada. Sirve para mostrarle al cliente lo que va a sumar antes de cerrar la venta.
Mandá uno de estos tres: amount (monto de la compra), initialPointsToGive (puntos directos) o pointItems (ítems de puntos con sus cantidades, cuyos IDs salen de GET /external/point-items).
A diferencia de POST /external/tags/add, el cliente se identifica por clientId y tiene que existir: previsualizar no da de alta a nadie.
No reserva nada. El resultado es el de este momento: si cambian las bonificaciones, el nivel del cliente o el catálogo de ítems, la suma real puede dar distinto. Mandá el mismo branch_id que vas a usar después, porque hay bonificaciones por sucursal.
Cómo pasar de la simulación a la suma real: POST /external/tags/add acepta amount o pointItems, pero con otro formato: allá pointItems es un array de ids donde la cantidad se expresa repitiendo el id ([{ "id": 12, "quantity": 2 }] acá equivale a [12, 12] allá). La suma real no acepta initialPointsToGive: si simulás por ese modo, no hay una acreditación equivalente por esta API.
curl --request POST \
--url https://api.tiendadepuntos.com/external/tags/add/preview \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"clientId": 84512,
"amount": 4000,
"initialPointsToGive": 50,
"pointItems": [
{
"id": 87,
"quantity": 2
}
],
"branch_id": 1972
}
'import requests
url = "https://api.tiendadepuntos.com/external/tags/add/preview"
payload = {
"clientId": 84512,
"amount": 4000,
"initialPointsToGive": 50,
"pointItems": [
{
"id": 87,
"quantity": 2
}
],
"branch_id": 1972
}
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({
clientId: 84512,
amount: 4000,
initialPointsToGive: 50,
pointItems: [{id: 87, quantity: 2}],
branch_id: 1972
})
};
fetch('https://api.tiendadepuntos.com/external/tags/add/preview', 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/tags/add/preview",
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([
'clientId' => 84512,
'amount' => 4000,
'initialPointsToGive' => 50,
'pointItems' => [
[
'id' => 87,
'quantity' => 2
]
],
'branch_id' => 1972
]),
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/tags/add/preview"
payload := strings.NewReader("{\n \"clientId\": 84512,\n \"amount\": 4000,\n \"initialPointsToGive\": 50,\n \"pointItems\": [\n {\n \"id\": 87,\n \"quantity\": 2\n }\n ],\n \"branch_id\": 1972\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/tags/add/preview")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"clientId\": 84512,\n \"amount\": 4000,\n \"initialPointsToGive\": 50,\n \"pointItems\": [\n {\n \"id\": 87,\n \"quantity\": 2\n }\n ],\n \"branch_id\": 1972\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiendadepuntos.com/external/tags/add/preview")
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 \"clientId\": 84512,\n \"amount\": 4000,\n \"initialPointsToGive\": 50,\n \"pointItems\": [\n {\n \"id\": 87,\n \"quantity\": 2\n }\n ],\n \"branch_id\": 1972\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": 200,
"message": "Request was successful",
"data": {
"points": {
"initialPointsToGive": 40,
"levelBonusPoints": 8,
"pointRulesBonusPoints": 12,
"totalPointsToGive": 60
},
"calculatedAt": "2026-09-21T14:32:11.000Z"
}
}{
"statusCode": 400,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "La operación no otorga ningún punto: el valor enviado no alcanza para sumar ni un punto con la configuración del comercio.",
"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": 403,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "El cliente al que estás intentando sumar puntos se encuentra suspendido",
"errors": [
{}
],
"data": {}
}{
"statusCode": 404,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "Client not found",
"errors": [
{}
],
"data": {}
}Authorizations
API key del comercio. Se genera desde el panel de Tienda de Puntos, en Configuración → Integraciones.
Body
ID del cliente en Tienda de Puntos. A diferencia de POST /external/tags/add, acá es obligatorio y el cliente tiene que existir: previsualizar no da de alta a nadie.
84512
Monto de la compra en pesos. Se convierte a puntos con la regla del comercio, igual que en POST /external/tags/add. Tiene que ser mayor a cero: el preview no simula restas.
4000
Puntos base, sin convertir. Se usan tal cual llegan.
50
Ítems de puntos de la venta, con sus cantidades. Cada ítem aporta sus puntos fijos o su equivalencia en pesos, según cómo lo haya configurado el comercio.
Show child attributes
Show child attributes
Sucursal de la venta. Cambia el resultado: hay bonificaciones que aplican solo a ciertas sucursales. Mandá la misma que vas a usar después en la suma real.
1972

