Skip to main content
PUT
/
products
/
{hash}
/
offers
/
{offerHash}
Atualizar Oferta
curl --request PUT \
  --url https://api.example.com/products/{hash}/offers/{offerHash} \
  --header 'Content-Type: application/json' \
  --data '
{
  "api_token": "<string>",
  "title": "<string>",
  "amount": 123,
  "cover": "<string>"
}
'
{
  "200": {},
  "400": {},
  "401": {},
  "404": {},
  "422": {},
  "500": {}
}

Visão Geral

Este endpoint permite atualizar as informações de uma oferta existente vinculada a um produto.

Endpoint

PUT https://api.klivopay.com.br/api/public/v1/products/{hash}/offers/{offerHash}

Parâmetros

hash
string
required
Hash identificador único do produto
offerHash
string
required
Hash identificador único da oferta
api_token
string
required
Seu token de autenticação da API KlivoPay
title
string
Novo título da oferta
amount
integer
Novo valor em centavos
cover
string
Nova URL da imagem de capa

Exemplo de Requisição

curl -X PUT 'https://api.klivopay.com.br/api/public/v1/products/prod123abc/offers/offer123' \
  -H 'Content-Type: application/json' \
  -d '{
    "api_token": "seu_token_aqui",
    "title": "Super Promoção",
    "amount": 14900
  }'

Resposta de Sucesso

200 OK
{
  "success": true,
  "data": {
    "hash": "offer123",
    "title": "Super Promoção",
    "amount": 14900,
    "product_hash": "prod123abc",
    "updated_at": "2025-01-20T15:30:00Z"
  }
}

Códigos de Resposta

200
OK
Oferta atualizada com sucesso
400
Bad Request
Dados inválidos na requisição
401
Unauthorized
Token de API inválido ou ausente
404
Not Found
Produto ou oferta não encontrado
422
Unprocessable Entity
Erro de validação nos dados enviados
500
Internal Server Error
Erro interno do servidor