Validar el código ingresado por el cliente
curl --request POST \
--url https://api.tiendadepuntos.com/external/validation-code/{qrId}/validate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"code": "4821"
}'import requests
url = "https://api.tiendadepuntos.com/external/validation-code/{qrId}/validate"
payload = { "code": "4821" }
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({code: '4821'})
};
fetch('https://api.tiendadepuntos.com/external/validation-code/{qrId}/validate', 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/validation-code/{qrId}/validate",
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([
'code' => '4821'
]),
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/validation-code/{qrId}/validate"
payload := strings.NewReader("{\n \"code\": \"4821\"\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/validation-code/{qrId}/validate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"4821\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiendadepuntos.com/external/validation-code/{qrId}/validate")
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 \"code\": \"4821\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": 201,
"message": "Request was successful",
"data": {
"valid": true
}
}{
"statusCode": 400,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "Error de validación",
"errors": [
{}
],
"data": {}
}{
"statusCode": 404,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "Api Key is required",
"errors": [
{}
],
"data": {}
}{
"success": false,
"status": 429,
"message": "Rate limit excedido. Intente más tarde."
}Códigos de validación
Validar el código ingresado por el cliente
Verifica el código de 4 dígitos que el cliente dice tener en pantalla. Acepta el código de la ventana actual y, durante los primeros 5 segundos de una ventana nueva, también el de la anterior, para no penalizar a quien tipea justo en el cambio.
Si el código no coincide devuelve 400.
POST
/
external
/
validation-code
/
{qrId}
/
validate
Validar el código ingresado por el cliente
curl --request POST \
--url https://api.tiendadepuntos.com/external/validation-code/{qrId}/validate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"code": "4821"
}'import requests
url = "https://api.tiendadepuntos.com/external/validation-code/{qrId}/validate"
payload = { "code": "4821" }
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({code: '4821'})
};
fetch('https://api.tiendadepuntos.com/external/validation-code/{qrId}/validate', 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/validation-code/{qrId}/validate",
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([
'code' => '4821'
]),
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/validation-code/{qrId}/validate"
payload := strings.NewReader("{\n \"code\": \"4821\"\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/validation-code/{qrId}/validate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"4821\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiendadepuntos.com/external/validation-code/{qrId}/validate")
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 \"code\": \"4821\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": 201,
"message": "Request was successful",
"data": {
"valid": true
}
}{
"statusCode": 400,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "Error de validación",
"errors": [
{}
],
"data": {}
}{
"statusCode": 404,
"timestamp": "2026-07-31T14:05:12.431Z",
"path": "/external/tags/add",
"method": "POST",
"message": "Api Key is required",
"errors": [
{}
],
"data": {}
}{
"success": false,
"status": 429,
"message": "Rate limit excedido. Intente más tarde."
}Authorizations
API key del comercio. Se genera desde el panel de Tienda de Puntos, en Configuración → Integraciones.
Path Parameters
ID del QR
Body
application/json
Código de 4 dígitos ingresado por el cliente
Example:
"4821"
⌘I

