Produtos

Remover Produto

DELETE/v1/products/:id
Base URL Produção:https://api.validapay.com.br
Base URL Sandbox:https://sandbox.validapay.com.br

Autenticação

bearerAuthorizationstring · header · obrigatório

Envie no header:

Authorization: Bearer {{token}}

Path Parameters

NameTypeRequiredDescription
idstringRequiredId

Remove um produto que não esteja vinculado a assinaturas ativas.

Deletar produto

const url = 'https://sandbox.validapay.com.br/v1/products/:id';

const options = {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer {{token}}'
  },
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));

Response Examples

200200
{
  "deleted": true,
  "productId": "prod_xxx"
}
400400
{
  "code": "PRODUCT_HAS_SUBSCRIPTIONS"
}
404404
{
  "code": "PRODUCT_NOT_FOUND"
}