Obter configurações do cliente
curl --request GET \
--url https://api.malga.io/v1/subscriptions/settings \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>'const options = {method: 'GET', headers: {'X-Client-Id': '<api-key>', 'X-Api-Key': '<api-key>'}};
fetch('https://api.malga.io/v1/subscriptions/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.malga.io/v1/subscriptions/settings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"retryRules": [
{
"daysAfterLastAttempt": 1
},
{
"daysAfterLastAttempt": 3
},
{
"daysAfterLastAttempt": 5
},
{
"daysAfterLastAttempt": 7
}
],
"cancelAfterAllRetries": false,
"statementDescriptor": "MINHA EMPRESA"
}Subscriptions
Obter configurações do cliente
Devolve as configurações do Motor de Assinaturas para o seu client (régua de retentativas, statement descriptor e cancelamento após as retentativas). Na primeira consulta, o serviço cria a configuração padrão, com a régua 1, 3, 5, 7 e cancelAfterAllRetries igual a false. Por isso esta rota não devolve 404.
GET
/
v1
/
subscriptions
/
settings
Obter configurações do cliente
curl --request GET \
--url https://api.malga.io/v1/subscriptions/settings \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>'const options = {method: 'GET', headers: {'X-Client-Id': '<api-key>', 'X-Api-Key': '<api-key>'}};
fetch('https://api.malga.io/v1/subscriptions/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.malga.io/v1/subscriptions/settings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"retryRules": [
{
"daysAfterLastAttempt": 1
},
{
"daysAfterLastAttempt": 3
},
{
"daysAfterLastAttempt": 5
},
{
"daysAfterLastAttempt": 7
}
],
"cancelAfterAllRetries": false,
"statementDescriptor": "MINHA EMPRESA"
}Response
Success
Was this page helpful?