Skip to content

Commit 9c03866

Browse files
docs(partner): add update on-demand subscription endpoint
1 parent cf9f51d commit 9c03866

File tree

3 files changed

+137
-0
lines changed

3 files changed

+137
-0
lines changed

docs/partner/update-instance.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
id: update-instance
3+
title: Atualizando uma instância
4+
---
5+
6+
## Método
7+
8+
#### /subscription/update
9+
10+
`PUT` https://api.z-api.io/instances/{id}/token/{token}/integrator/on-demand/subscription/update
11+
12+
---
13+
14+
## Conceituação
15+
16+
Método utilizado para atualizar uma instância existente para o modelo com suporte a chamadas (ligações).
17+
18+
---
19+
20+
## Atributos
21+
22+
### Obrigatórios
23+
24+
| Atributos | Tipo | Descrição |
25+
| :--------- | :-----: | :------------------------------------------------------------------------ |
26+
| withCalls | boolean | Deve ser enviado como "true" para habilitar chamadas na instância |
27+
28+
:::caution Atenção
29+
30+
O atributo **withCalls** é obrigatório e aceita apenas o valor **true**.
31+
Não é possível realizar downgrade da assinatura (remover chamadas). Caso deseje voltar para o modelo sem chamadas, será necessário cancelar a assinatura atual e realizar uma nova contratação.
32+
Este recurso está disponível apenas para contas que possuem a funcionalidade de chamadas habilitada.
33+
34+
:::
35+
36+
---
37+
38+
## Request Params
39+
40+
**Método**
41+
42+
`PUT` https://api.z-api.io/instances/SUA_INSTANCIA/token/{SEU_TOKEN}/integrator/on-demand/subscription/update
43+
44+
---
45+
46+
## Request Body
47+
48+
```json
49+
{
50+
"withCalls": true
51+
}
52+
```
53+
54+
## Response
55+
56+
### 201
57+
58+
OK
59+
60+
### 405
61+
62+
Neste caso certifique que esteja enviando o corretamente a especificação do método, ou seja verifique se você enviou o POST, GET ou PUT conforme especificado no inicio deste tópico.
63+
64+
### 415
65+
66+
Caso você receba um erro 415, certifique de adicionar na headers da requisição o "Content-Type" do objeto que você está enviando, em sua grande maioria "application/json"
67+
68+
---
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
id: update-instance
3+
title: Updating an instance
4+
---
5+
6+
## Method
7+
8+
#### /subscription/update
9+
10+
`PUT` https://api.z-api.io/instances/{id}/token/{token}/integrator/on-demand/subscription/update
11+
12+
---
13+
14+
## Concept
15+
16+
Method used to update an existing instance subscription to the model with voice call support.
17+
18+
---
19+
20+
## Attributes
21+
22+
### Required
23+
24+
| Attributes | Type | Description |
25+
| :--------- | :-----: | :-------------------------------------------------------------------- |
26+
| withCalls | boolean | Must be sent as "true" to enable voice calls on the instance |
27+
28+
:::caution Warning
29+
30+
The **withCalls** attribute is required and only accepts the value **true**.
31+
It is not possible to downgrade the subscription (remove calls). If you want to return to the model without calls, you must cancel the current subscription and create a new one.
32+
This feature is only available for accounts with calls functionality enabled.
33+
34+
:::
35+
36+
---
37+
38+
## Request Params
39+
40+
**Method**
41+
42+
`PUT` https://api.z-api.io/instances/SUA_INSTANCIA/token/{SEU_TOKEN}/integrator/on-demand/subscription/update
43+
44+
---
45+
46+
## Request Body
47+
48+
```json
49+
{
50+
"withCalls": true
51+
}
52+
```
53+
54+
### Response
55+
56+
### 201
57+
58+
OK
59+
60+
### 405
61+
62+
In this case, make sure you are sending the request using the correct method, as specified at the beginning of this topic (POST, GET, or PUT).
63+
64+
### 415
65+
66+
If you receive a 415 error, make sure to include the correct Content-Type header in your request, usually application/json.
67+
68+
---

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ module.exports = {
277277
'partner/sign-instance',
278278
'partner/unsubscribe-instance',
279279
'partner/list-instances',
280+
'partner/update-instance',
280281
],
281282

282283
Integradors: ['integrators/find-my-pack'],

0 commit comments

Comments
 (0)