curl --request POST \
--url https://api.syntage.com/schedulers \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"type": "recurring",
"name": "Daily Invoices Scheduler",
"isEnabled": true,
"tags": [
"/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997"
]
}
'import requests
url = "https://api.syntage.com/schedulers"
payload = {
"type": "recurring",
"name": "Daily Invoices Scheduler",
"isEnabled": True,
"tags": ["/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997"]
}
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({
type: 'recurring',
name: 'Daily Invoices Scheduler',
isEnabled: true,
tags: ['/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997']
})
};
fetch('https://api.syntage.com/schedulers', 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",
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([
'type' => 'recurring',
'name' => 'Daily Invoices Scheduler',
'isEnabled' => true,
'tags' => [
'/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997'
]
]),
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"
payload := strings.NewReader("{\n \"type\": \"recurring\",\n \"name\": \"Daily Invoices Scheduler\",\n \"isEnabled\": true,\n \"tags\": [\n \"/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997\"\n ]\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")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"recurring\",\n \"name\": \"Daily Invoices Scheduler\",\n \"isEnabled\": true,\n \"tags\": [\n \"/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syntage.com/schedulers")
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 \"type\": \"recurring\",\n \"name\": \"Daily Invoices Scheduler\",\n \"isEnabled\": true,\n \"tags\": [\n \"/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"@context": "/contexts/Scheduler",
"@id": "/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997",
"@type": "Scheduler",
"id": "e0a24894-7fbf-48ae-bfb0-efaae30a6319",
"name": "Daily Invoices Scheduler",
"type": "recurring",
"isEnabled": true,
"rules": {
"@context": "/contexts/SchedulerRule",
"@id": "/schedulers/rules",
"@type": "hydra:Collection",
"hydra:member": [
{
"@id": "/schedulers/rules/91106968-1abd-4d64-85c1-4e73d96fb997",
"@type": "SchedulerRule",
"id": "e0a24894-7fbf-48ae-bfb0-efaae30a6319",
"scheduler": "Daily Invoices Scheduler",
"options": {
"types": [
"I",
"E",
"P"
],
"period": {
"from": "2020-01-01T00:00:00.000Z",
"to": "2020-03-31T23:59:59.000Z"
}
},
"cronExpression": "@daily",
"nextRunDate": "2020-01-01T12:15:00.000Z",
"createdAt": "2020-01-01T12:15:00.000Z",
"updatedAt": "2020-01-01T12:15:00.000Z"
}
],
"hydra:totalItems": 1,
"hydra:view": {
"@id": "/schedulers/rules?page=1",
"@type": "hydra:PartialCollectionView",
"hydra:first": "/schedulers/rules?page=1",
"hydra:next": "/schedulers/rules?page=2",
"hydra:last": "/schedulers/rules?page=3"
},
"hydra:search": {
"@type": "<string>",
"hydra:template": "<string>",
"hydra:variableRepresentation": "<string>",
"hydra:mapping": [
{
"@type": "<string>",
"variable": "<string>",
"property": "<string>",
"required": true
}
]
}
},
"tags": [
{
"@id": "/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997",
"@type": "EntityTag",
"id": "e0a24894-7fbf-48ae-bfb0-efaae30a6319",
"name": "Priority Entity",
"color": "#22c558",
"createdAt": "2020-01-01T12:15:00.000Z",
"updatedAt": "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
Create a scheduler that can run one or more extraction rules.
curl --request POST \
--url https://api.syntage.com/schedulers \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"type": "recurring",
"name": "Daily Invoices Scheduler",
"isEnabled": true,
"tags": [
"/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997"
]
}
'import requests
url = "https://api.syntage.com/schedulers"
payload = {
"type": "recurring",
"name": "Daily Invoices Scheduler",
"isEnabled": True,
"tags": ["/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997"]
}
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({
type: 'recurring',
name: 'Daily Invoices Scheduler',
isEnabled: true,
tags: ['/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997']
})
};
fetch('https://api.syntage.com/schedulers', 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",
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([
'type' => 'recurring',
'name' => 'Daily Invoices Scheduler',
'isEnabled' => true,
'tags' => [
'/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997'
]
]),
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"
payload := strings.NewReader("{\n \"type\": \"recurring\",\n \"name\": \"Daily Invoices Scheduler\",\n \"isEnabled\": true,\n \"tags\": [\n \"/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997\"\n ]\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")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"recurring\",\n \"name\": \"Daily Invoices Scheduler\",\n \"isEnabled\": true,\n \"tags\": [\n \"/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syntage.com/schedulers")
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 \"type\": \"recurring\",\n \"name\": \"Daily Invoices Scheduler\",\n \"isEnabled\": true,\n \"tags\": [\n \"/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"@context": "/contexts/Scheduler",
"@id": "/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997",
"@type": "Scheduler",
"id": "e0a24894-7fbf-48ae-bfb0-efaae30a6319",
"name": "Daily Invoices Scheduler",
"type": "recurring",
"isEnabled": true,
"rules": {
"@context": "/contexts/SchedulerRule",
"@id": "/schedulers/rules",
"@type": "hydra:Collection",
"hydra:member": [
{
"@id": "/schedulers/rules/91106968-1abd-4d64-85c1-4e73d96fb997",
"@type": "SchedulerRule",
"id": "e0a24894-7fbf-48ae-bfb0-efaae30a6319",
"scheduler": "Daily Invoices Scheduler",
"options": {
"types": [
"I",
"E",
"P"
],
"period": {
"from": "2020-01-01T00:00:00.000Z",
"to": "2020-03-31T23:59:59.000Z"
}
},
"cronExpression": "@daily",
"nextRunDate": "2020-01-01T12:15:00.000Z",
"createdAt": "2020-01-01T12:15:00.000Z",
"updatedAt": "2020-01-01T12:15:00.000Z"
}
],
"hydra:totalItems": 1,
"hydra:view": {
"@id": "/schedulers/rules?page=1",
"@type": "hydra:PartialCollectionView",
"hydra:first": "/schedulers/rules?page=1",
"hydra:next": "/schedulers/rules?page=2",
"hydra:last": "/schedulers/rules?page=3"
},
"hydra:search": {
"@type": "<string>",
"hydra:template": "<string>",
"hydra:variableRepresentation": "<string>",
"hydra:mapping": [
{
"@type": "<string>",
"variable": "<string>",
"property": "<string>",
"required": true
}
]
}
},
"tags": [
{
"@id": "/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997",
"@type": "EntityTag",
"id": "e0a24894-7fbf-48ae-bfb0-efaae30a6319",
"name": "Priority Entity",
"color": "#22c558",
"createdAt": "2020-01-01T12:15:00.000Z",
"updatedAt": "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 type; only recurring is allowed for creation
recurring "recurring"
Scheduler name; if omitted, the scheduler is created without a name
"Daily Invoices Scheduler"
Whether the scheduler is enabled
true
Entity tags to associate with the scheduler
[
"/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997"
]
Response
Scheduler resource response
Scheduler IRI reference
"/schedulers/91106968-1abd-4d64-85c1-4e73d96fb997"
JSON-LD resource type
"e0a24894-7fbf-48ae-bfb0-efaae30a6319"
Scheduler name; may be null for first-time schedulers created automatically by the platform
"Daily Invoices Scheduler"
Scheduler type
recurring "recurring"
Whether the scheduler is enabled
true
Show child attributes
Show child attributes
Show child attributes
Show child attributes
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?