Actualizar un premio
curl --request PUT \
--url https://api.tiendadepuntos.com/external/products/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Café gratis",
"shortDescription": "Café a elección",
"offers": [
{
"points": 500,
"levelId": 3,
"productOfferId": 4412
}
],
"description": "Un café de especialidad a elección.",
"termsAndConditions": "Válido de lunes a viernes.",
"image": "https://mi-cdn.com/premios/cafe.png",
"isEnabled": true,
"categoryIds": [
7
],
"maxPurchases": 1,
"expirationTermInDays": 30
}
'import requests
url = "https://api.tiendadepuntos.com/external/products/{id}"
payload = {
"name": "Café gratis",
"shortDescription": "Café a elección",
"offers": [
{
"points": 500,
"levelId": 3,
"productOfferId": 4412
}
],
"description": "Un café de especialidad a elección.",
"termsAndConditions": "Válido de lunes a viernes.",
"image": "https://mi-cdn.com/premios/cafe.png",
"isEnabled": True,
"categoryIds": [7],
"maxPurchases": 1,
"expirationTermInDays": 30
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Café gratis',
shortDescription: 'Café a elección',
offers: [{points: 500, levelId: 3, productOfferId: 4412}],
description: 'Un café de especialidad a elección.',
termsAndConditions: 'Válido de lunes a viernes.',
image: 'https://mi-cdn.com/premios/cafe.png',
isEnabled: true,
categoryIds: [7],
maxPurchases: 1,
expirationTermInDays: 30
})
};
fetch('https://api.tiendadepuntos.com/external/products/{id}', 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/products/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Café gratis',
'shortDescription' => 'Café a elección',
'offers' => [
[
'points' => 500,
'levelId' => 3,
'productOfferId' => 4412
]
],
'description' => 'Un café de especialidad a elección.',
'termsAndConditions' => 'Válido de lunes a viernes.',
'image' => 'https://mi-cdn.com/premios/cafe.png',
'isEnabled' => true,
'categoryIds' => [
7
],
'maxPurchases' => 1,
'expirationTermInDays' => 30
]),
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/products/{id}"
payload := strings.NewReader("{\n \"name\": \"Café gratis\",\n \"shortDescription\": \"Café a elección\",\n \"offers\": [\n {\n \"points\": 500,\n \"levelId\": 3,\n \"productOfferId\": 4412\n }\n ],\n \"description\": \"Un café de especialidad a elección.\",\n \"termsAndConditions\": \"Válido de lunes a viernes.\",\n \"image\": \"https://mi-cdn.com/premios/cafe.png\",\n \"isEnabled\": true,\n \"categoryIds\": [\n 7\n ],\n \"maxPurchases\": 1,\n \"expirationTermInDays\": 30\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.tiendadepuntos.com/external/products/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Café gratis\",\n \"shortDescription\": \"Café a elección\",\n \"offers\": [\n {\n \"points\": 500,\n \"levelId\": 3,\n \"productOfferId\": 4412\n }\n ],\n \"description\": \"Un café de especialidad a elección.\",\n \"termsAndConditions\": \"Válido de lunes a viernes.\",\n \"image\": \"https://mi-cdn.com/premios/cafe.png\",\n \"isEnabled\": true,\n \"categoryIds\": [\n 7\n ],\n \"maxPurchases\": 1,\n \"expirationTermInDays\": 30\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiendadepuntos.com/external/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Café gratis\",\n \"shortDescription\": \"Café a elección\",\n \"offers\": [\n {\n \"points\": 500,\n \"levelId\": 3,\n \"productOfferId\": 4412\n }\n ],\n \"description\": \"Un café de especialidad a elección.\",\n \"termsAndConditions\": \"Válido de lunes a viernes.\",\n \"image\": \"https://mi-cdn.com/premios/cafe.png\",\n \"isEnabled\": true,\n \"categoryIds\": [\n 7\n ],\n \"maxPurchases\": 1,\n \"expirationTermInDays\": 30\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": 200,
"message": "Request was successful",
"data": {
"id": 771,
"name": "Café gratis",
"description": "Un café de especialidad a elección.",
"shortDescription": "Café a elección",
"image": "https://tdp-products.s3.amazonaws.com/771.png",
"isEnabled": true,
"stock": {
"controlled": true,
"available": 12
},
"offers": [
{
"productOfferId": 4412,
"points": 500,
"levelId": 3,
"levelName": "Nivel 2"
}
],
"categories": [
{
"id": 7,
"name": "Cafetería"
}
],
"createdAt": "2026-02-14T12:30:00.000Z",
"updatedAt": "2026-06-01T09:15:00.000Z",
"maxPurchases": null
}
}{
"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": {}
}Premios
Actualizar un premio
Reemplaza los datos de un premio. No es un patch: mandá siempre el premio completo.
Las ofertas se reconcilian por nivel: la oferta que ya cubría un levelId conserva su productOfferId, y las ofertas de niveles que no vengan en offers se eliminan. Lo mismo con categoryIds: las categorías que no vengan se desasocian.
Las opciones que la API pública no expone (mensaje post canje, restricción temporal, tope mensual de canjes, cupones de integración) se conservan como estaban.
PUT
/
external
/
products
/
{id}
Actualizar un premio
curl --request PUT \
--url https://api.tiendadepuntos.com/external/products/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Café gratis",
"shortDescription": "Café a elección",
"offers": [
{
"points": 500,
"levelId": 3,
"productOfferId": 4412
}
],
"description": "Un café de especialidad a elección.",
"termsAndConditions": "Válido de lunes a viernes.",
"image": "https://mi-cdn.com/premios/cafe.png",
"isEnabled": true,
"categoryIds": [
7
],
"maxPurchases": 1,
"expirationTermInDays": 30
}
'import requests
url = "https://api.tiendadepuntos.com/external/products/{id}"
payload = {
"name": "Café gratis",
"shortDescription": "Café a elección",
"offers": [
{
"points": 500,
"levelId": 3,
"productOfferId": 4412
}
],
"description": "Un café de especialidad a elección.",
"termsAndConditions": "Válido de lunes a viernes.",
"image": "https://mi-cdn.com/premios/cafe.png",
"isEnabled": True,
"categoryIds": [7],
"maxPurchases": 1,
"expirationTermInDays": 30
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Café gratis',
shortDescription: 'Café a elección',
offers: [{points: 500, levelId: 3, productOfferId: 4412}],
description: 'Un café de especialidad a elección.',
termsAndConditions: 'Válido de lunes a viernes.',
image: 'https://mi-cdn.com/premios/cafe.png',
isEnabled: true,
categoryIds: [7],
maxPurchases: 1,
expirationTermInDays: 30
})
};
fetch('https://api.tiendadepuntos.com/external/products/{id}', 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/products/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Café gratis',
'shortDescription' => 'Café a elección',
'offers' => [
[
'points' => 500,
'levelId' => 3,
'productOfferId' => 4412
]
],
'description' => 'Un café de especialidad a elección.',
'termsAndConditions' => 'Válido de lunes a viernes.',
'image' => 'https://mi-cdn.com/premios/cafe.png',
'isEnabled' => true,
'categoryIds' => [
7
],
'maxPurchases' => 1,
'expirationTermInDays' => 30
]),
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/products/{id}"
payload := strings.NewReader("{\n \"name\": \"Café gratis\",\n \"shortDescription\": \"Café a elección\",\n \"offers\": [\n {\n \"points\": 500,\n \"levelId\": 3,\n \"productOfferId\": 4412\n }\n ],\n \"description\": \"Un café de especialidad a elección.\",\n \"termsAndConditions\": \"Válido de lunes a viernes.\",\n \"image\": \"https://mi-cdn.com/premios/cafe.png\",\n \"isEnabled\": true,\n \"categoryIds\": [\n 7\n ],\n \"maxPurchases\": 1,\n \"expirationTermInDays\": 30\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.tiendadepuntos.com/external/products/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Café gratis\",\n \"shortDescription\": \"Café a elección\",\n \"offers\": [\n {\n \"points\": 500,\n \"levelId\": 3,\n \"productOfferId\": 4412\n }\n ],\n \"description\": \"Un café de especialidad a elección.\",\n \"termsAndConditions\": \"Válido de lunes a viernes.\",\n \"image\": \"https://mi-cdn.com/premios/cafe.png\",\n \"isEnabled\": true,\n \"categoryIds\": [\n 7\n ],\n \"maxPurchases\": 1,\n \"expirationTermInDays\": 30\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiendadepuntos.com/external/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Café gratis\",\n \"shortDescription\": \"Café a elección\",\n \"offers\": [\n {\n \"points\": 500,\n \"levelId\": 3,\n \"productOfferId\": 4412\n }\n ],\n \"description\": \"Un café de especialidad a elección.\",\n \"termsAndConditions\": \"Válido de lunes a viernes.\",\n \"image\": \"https://mi-cdn.com/premios/cafe.png\",\n \"isEnabled\": true,\n \"categoryIds\": [\n 7\n ],\n \"maxPurchases\": 1,\n \"expirationTermInDays\": 30\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": 200,
"message": "Request was successful",
"data": {
"id": 771,
"name": "Café gratis",
"description": "Un café de especialidad a elección.",
"shortDescription": "Café a elección",
"image": "https://tdp-products.s3.amazonaws.com/771.png",
"isEnabled": true,
"stock": {
"controlled": true,
"available": 12
},
"offers": [
{
"productOfferId": 4412,
"points": 500,
"levelId": 3,
"levelName": "Nivel 2"
}
],
"categories": [
{
"id": 7,
"name": "Cafetería"
}
],
"createdAt": "2026-02-14T12:30:00.000Z",
"updatedAt": "2026-06-01T09:15:00.000Z",
"maxPurchases": null
}
}{
"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": {}
}Authorizations
Body
application/json

