Produtos

Arquivar Produto

POST/v1/products/:id/archive
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

Guarda o produto sem excluí-lo, mantendo o histórico de cobranças vinculadas.

Arquivar produto

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

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

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

Response Examples

200200
{
  "productId": "prod_xxx",
  "archivedAt": "2024-01-20T10:00:00Z",
  "checkoutsDeactivated": 3
}
404404
{
  "code": "PRODUCT_NOT_FOUND"
}