PATCH/api/v2/baas/seller-webhooks/{id}

Atualizar

Produto BaaS (parceiro). Requer Bearer JWT do parceiro. Não exige assinatura HMAC neste recurso (alinhado ao SDK SellerWebhookResource). Scope: baas.seller-webhooks.write. Guia: documentação técnica.

Parâmetros

AcceptObrigatório
header
Tipo:string
idObrigatório
path
Tipo:integer

Autenticação e headers

Requer Bearer token do parceiro (OAuth parceiro). Sem assinatura HMAC neste recurso. Scope: baas.seller-webhooks.write.

HeaderObrigatórioDescrição
AuthorizationSimBearer {{access_token}}
AcceptSimapplication/json

Path

ParâmetroDescrição
idID do webhook

Corpo

Atualize url e/ou authentication_token no corpo do PATCH. Não envie entity nem event_type (imutáveis). O token atualizado não volta na resposta.

Códigos

CódigoDescrição
200OK
201Recurso criado
400Parâmetros inválidos
401Token inválido
403Scope ausente
404Não encontrado
422Validação ou regra de negócio
500Erro interno

Notas

curl --request PATCH \
  --url 'https://api-h.nuvende.com.br/api/v2/baas/seller-webhooks/2' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {{access_token}}' \
  --data '{"url":"https://integrador.exemplo.com.br/webhooks/credenciais-v2","authentication_token":"{{webhook_auth_token}}"}'
const axios = require("axios");

const data = {
  "url": "https://integrador.exemplo.com.br/webhooks/credenciais-v2",
  "authentication_token": "{{webhook_auth_token}}"
};

axios({
  method: "patch",
  url: "https://api-h.nuvende.com.br/api/v2/baas/seller-webhooks/2",
  headers: {
    "Content-Type": "application/json",
    Accept: "application/json",
    Authorization: "Bearer {{access_token}}",
  },
  data,
})
  .then((response) => console.log(JSON.stringify(response.data)))
  .catch((error) => console.log(error.response?.data || error.message));
import json
import requests

url = "https://api-h.nuvende.com.br/api/v2/baas/seller-webhooks/2"
payload = {
        "url": "https://integrador.exemplo.com.br/webhooks/credenciais-v2",
        "authentication_token": "{{webhook_auth_token}}"
    }
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {{access_token}}",
}
response = requests.patch(url, headers=headers, data=json.dumps(payload))
print(response.text)
<?php
$curl = curl_init();
$opts = [
  CURLOPT_URL => 'https://api-h.nuvende.com.br/api/v2/baas/seller-webhooks/2',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'PATCH',
  CURLOPT_POSTFIELDS => '{"url":"https://integrador.exemplo.com.br/webhooks/credenciais-v2","authentication_token":"{{webhook_auth_token}}"}',
  CURLOPT_HTTPHEADER => [
    'Content-Type: application/json',
    'Accept: application/json',
    'Authorization: Bearer {{access_token}}',
  ],
];
curl_setopt_array($curl, $opts);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{
  "id": 2,
  "url": "https://integrador.exemplo.com.br/webhooks/credenciais-v2",
  "entity": "AccountCredentials",
  "event_type": "created",
  "status": "active",
  "seller_id": 1001,
  "created_at": "2025-01-10T08:00:00Z",
  "updated_at": "2025-01-15T14:30:00Z"
}