Pausa uma regra: ela para de gerar contas (as já geradas ficam).
curl --request POST \
--url https://economy.synxbr.com/api/v1/recurrences/{id}/pause \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://economy.synxbr.com/api/v1/recurrences/{id}/pause', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://economy.synxbr.com/api/v1/recurrences/{id}/pause"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://economy.synxbr.com/api/v1/recurrences/{id}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "payable",
"name": "<string>",
"description": "<string>",
"status": "active",
"frequency": "weekly",
"days_of_period": [
123
],
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"termination": "date",
"max_occurrences": 123,
"amount": "<string>",
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"customer": {
"name": "<string>",
"tax_id": "<string>",
"email": "<string>",
"phone": "<string>"
},
"branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"category": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"subcategory": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"cost_center": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"document": {
"number": "<string>",
"type": "bank_slip",
"has_fiscal_note": true
},
"notes": "<string>",
"payment_method": "pix",
"splits": [
{
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"employee": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"category": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"subcategory": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"amount": "1234.56"
}
],
"next_date": "2023-12-25",
"last_generated_date": "2023-12-25",
"generated_count": 123,
"paused_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"meta": {
"request_id": "<string>",
"installments": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"generated_titles": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}Pausa uma regra: ela para de gerar contas (as já geradas ficam).
A ação da tela. Sem corpo; Idempotency-Key obrigatória (o pedido repetido devolve a mesma resposta). Regra em outra situação: 409 invalid_state.
Permissão exigida: Gerenciar recorrências (recurrence.manage).
POST
/
recurrences
/
{id}
/
pause
Pausa uma regra: ela para de gerar contas (as já geradas ficam).
curl --request POST \
--url https://economy.synxbr.com/api/v1/recurrences/{id}/pause \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://economy.synxbr.com/api/v1/recurrences/{id}/pause', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://economy.synxbr.com/api/v1/recurrences/{id}/pause"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://economy.synxbr.com/api/v1/recurrences/{id}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "payable",
"name": "<string>",
"description": "<string>",
"status": "active",
"frequency": "weekly",
"days_of_period": [
123
],
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"termination": "date",
"max_occurrences": 123,
"amount": "<string>",
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"customer": {
"name": "<string>",
"tax_id": "<string>",
"email": "<string>",
"phone": "<string>"
},
"branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"category": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"subcategory": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"cost_center": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"document": {
"number": "<string>",
"type": "bank_slip",
"has_fiscal_note": true
},
"notes": "<string>",
"payment_method": "pix",
"splits": [
{
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"employee": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"category": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"subcategory": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"amount": "1234.56"
}
],
"next_date": "2023-12-25",
"last_generated_date": "2023-12-25",
"generated_count": 123,
"paused_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"meta": {
"request_id": "<string>",
"installments": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"generated_titles": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}Autorizações
Cabeçalhos
Um identificador único deste pedido (um UUID serve), de 8 a 100 caracteres. Repetir o pedido com a mesma chave devolve a mesma resposta, sem criar outro registro (24 h); a mesma chave com outro conteúdo é recusada (422). A resposta repetida vem com o cabeçalho Idempotent-Replayed: true.
Required string length:
8 - 100