curl --request POST \
--url https://api.syntage.com/schedulers/rules \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"scheduler": "/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997",
"options": {
"period": {
"from": "2024-01-01",
"to": "2024-12-31"
},
"types": [
"I",
"E",
"P"
],
"issued": true,
"received": true,
"complement": -1,
"pdf": true,
"xml": true
},
"cronExpression": "@daily"
}
'import requests
url = "https://api.syntage.com/schedulers/rules"
payload = {
"scheduler": "/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997",
"options": {
"period": {
"from": "2024-01-01",
"to": "2024-12-31"
},
"types": ["I", "E", "P"],
"issued": True,
"received": True,
"complement": -1,
"pdf": True,
"xml": True
},
"cronExpression": "@daily"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
scheduler: '/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997',
options: {
period: {from: '2024-01-01', to: '2024-12-31'},
types: ['I', 'E', 'P'],
issued: true,
received: true,
complement: -1,
pdf: true,
xml: true
},
cronExpression: '@daily'
})
};
fetch('https://api.syntage.com/schedulers/rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.syntage.com/schedulers/rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'scheduler' => '/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997',
'options' => [
'period' => [
'from' => '2024-01-01',
'to' => '2024-12-31'
],
'types' => [
'I',
'E',
'P'
],
'issued' => true,
'received' => true,
'complement' => -1,
'pdf' => true,
'xml' => true
],
'cronExpression' => '@daily'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.syntage.com/schedulers/rules"
payload := strings.NewReader("{\n \"scheduler\": \"/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997\",\n \"options\": {\n \"period\": {\n \"from\": \"2024-01-01\",\n \"to\": \"2024-12-31\"\n },\n \"types\": [\n \"I\",\n \"E\",\n \"P\"\n ],\n \"issued\": true,\n \"received\": true,\n \"complement\": -1,\n \"pdf\": true,\n \"xml\": true\n },\n \"cronExpression\": \"@daily\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.syntage.com/schedulers/rules")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"scheduler\": \"/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997\",\n \"options\": {\n \"period\": {\n \"from\": \"2024-01-01\",\n \"to\": \"2024-12-31\"\n },\n \"types\": [\n \"I\",\n \"E\",\n \"P\"\n ],\n \"issued\": true,\n \"received\": true,\n \"complement\": -1,\n \"pdf\": true,\n \"xml\": true\n },\n \"cronExpression\": \"@daily\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syntage.com/schedulers/rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scheduler\": \"/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997\",\n \"options\": {\n \"period\": {\n \"from\": \"2024-01-01\",\n \"to\": \"2024-12-31\"\n },\n \"types\": [\n \"I\",\n \"E\",\n \"P\"\n ],\n \"issued\": true,\n \"received\": true,\n \"complement\": -1,\n \"pdf\": true,\n \"xml\": true\n },\n \"cronExpression\": \"@daily\"\n}"
response = http.request(request)
puts response.read_body{
"@context": "/contexts/SchedulerRule",
"@id": "/schedulers/rules/91106968-1abd-4d64-85c1-4e73d96fb997",
"@type": "SchedulerRule",
"id": "e0a24894-7fbf-48ae-bfb0-efaae30a6319",
"scheduler": "Daily Invoices Scheduler",
"extractor": "invoice",
"options": {
"period": {
"from": "2024-01-01",
"to": "2024-12-31"
},
"types": [
"I",
"E",
"P"
],
"issued": true,
"received": true,
"complement": -1,
"pdf": true,
"xml": true
},
"cronExpression": "@daily",
"nextRunDate": "2020-01-01T12:15:00.000Z",
"createdAt": "2020-01-01T12:15:00.000Z",
"updatedAt": "2020-01-01T12:15:00.000Z"
}{
"message": "<string>"
}Create a scheduler rule
Create a rule that runs an extractor on a scheduler.
curl --request POST \
--url https://api.syntage.com/schedulers/rules \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"scheduler": "/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997",
"options": {
"period": {
"from": "2024-01-01",
"to": "2024-12-31"
},
"types": [
"I",
"E",
"P"
],
"issued": true,
"received": true,
"complement": -1,
"pdf": true,
"xml": true
},
"cronExpression": "@daily"
}
'import requests
url = "https://api.syntage.com/schedulers/rules"
payload = {
"scheduler": "/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997",
"options": {
"period": {
"from": "2024-01-01",
"to": "2024-12-31"
},
"types": ["I", "E", "P"],
"issued": True,
"received": True,
"complement": -1,
"pdf": True,
"xml": True
},
"cronExpression": "@daily"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
scheduler: '/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997',
options: {
period: {from: '2024-01-01', to: '2024-12-31'},
types: ['I', 'E', 'P'],
issued: true,
received: true,
complement: -1,
pdf: true,
xml: true
},
cronExpression: '@daily'
})
};
fetch('https://api.syntage.com/schedulers/rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.syntage.com/schedulers/rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'scheduler' => '/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997',
'options' => [
'period' => [
'from' => '2024-01-01',
'to' => '2024-12-31'
],
'types' => [
'I',
'E',
'P'
],
'issued' => true,
'received' => true,
'complement' => -1,
'pdf' => true,
'xml' => true
],
'cronExpression' => '@daily'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.syntage.com/schedulers/rules"
payload := strings.NewReader("{\n \"scheduler\": \"/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997\",\n \"options\": {\n \"period\": {\n \"from\": \"2024-01-01\",\n \"to\": \"2024-12-31\"\n },\n \"types\": [\n \"I\",\n \"E\",\n \"P\"\n ],\n \"issued\": true,\n \"received\": true,\n \"complement\": -1,\n \"pdf\": true,\n \"xml\": true\n },\n \"cronExpression\": \"@daily\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.syntage.com/schedulers/rules")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"scheduler\": \"/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997\",\n \"options\": {\n \"period\": {\n \"from\": \"2024-01-01\",\n \"to\": \"2024-12-31\"\n },\n \"types\": [\n \"I\",\n \"E\",\n \"P\"\n ],\n \"issued\": true,\n \"received\": true,\n \"complement\": -1,\n \"pdf\": true,\n \"xml\": true\n },\n \"cronExpression\": \"@daily\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syntage.com/schedulers/rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scheduler\": \"/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997\",\n \"options\": {\n \"period\": {\n \"from\": \"2024-01-01\",\n \"to\": \"2024-12-31\"\n },\n \"types\": [\n \"I\",\n \"E\",\n \"P\"\n ],\n \"issued\": true,\n \"received\": true,\n \"complement\": -1,\n \"pdf\": true,\n \"xml\": true\n },\n \"cronExpression\": \"@daily\"\n}"
response = http.request(request)
puts response.read_body{
"@context": "/contexts/SchedulerRule",
"@id": "/schedulers/rules/91106968-1abd-4d64-85c1-4e73d96fb997",
"@type": "SchedulerRule",
"id": "e0a24894-7fbf-48ae-bfb0-efaae30a6319",
"scheduler": "Daily Invoices Scheduler",
"extractor": "invoice",
"options": {
"period": {
"from": "2024-01-01",
"to": "2024-12-31"
},
"types": [
"I",
"E",
"P"
],
"issued": true,
"received": true,
"complement": -1,
"pdf": true,
"xml": true
},
"cronExpression": "@daily",
"nextRunDate": "2020-01-01T12:15:00.000Z",
"createdAt": "2020-01-01T12:15:00.000Z",
"updatedAt": "2020-01-01T12:15:00.000Z"
}{
"message": "<string>"
}Authorizations
Your API key is available in the Production and Sandbox dashboards.
Body
Scheduler IRI reference
"/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997"
Extractor to run, which retrieves resources from the corresponding datasource
invoice, monthly_tax_return, annual_tax_return, rif_tax_return, tax_status, tax_retention, tax_compliance, electronic_accounting, sat_certificates, rpc, buro_de_credito_report, bil, rug, background_check, infonavit Options are specific to the selected extractor. Select the schema matching the extractor; extractors not listed here do not accept options.
- Invoice extraction options
- Tax retention extraction options
- Annual tax return extraction options
- Monthly tax return extraction options
- RIF tax return extraction options
- Electronic accounting extraction options
- RPC extraction options
- Buró de Crédito report extraction options
Show child attributes
Show child attributes
Cron expression that controls when the rule runs
"@daily"
Response
Scheduler rule resource response
Scheduler Rule IRI reference
"/schedulers/rules/91106968-1abd-4d64-85c1-4e73d96fb997"
JSON-LD resource type
"e0a24894-7fbf-48ae-bfb0-efaae30a6319"
Scheduler that owns this rule
"Daily Invoices Scheduler"
Extractor to run, which retrieves resources from the corresponding datasource
invoice, monthly_tax_return, annual_tax_return, rif_tax_return, tax_status, tax_retention, tax_compliance, electronic_accounting, sat_certificates, rpc, buro_de_credito_report, bil, rug, background_check, infonavit Options are specific to the selected extractor. Select the schema matching the extractor; extractors not listed here do not accept options.
- Invoice extraction options
- Tax retention extraction options
- Annual tax return extraction options
- Monthly tax return extraction options
- RIF tax return extraction options
- Electronic accounting extraction options
- RPC extraction options
- Buró de Crédito report extraction options
Show child attributes
Show child attributes
Cron expression that controls when the rule runs
"@daily"
Date and time the resource should execute in the next iteration
"2020-01-01T12:15:00.000Z"
Date and time the resource was created
"2020-01-01T12:15:00.000Z"
Date and time the resource was last updated
"2020-01-01T12:15:00.000Z"
Was this page helpful?