curl --request PUT \
--url https://api.syntage.com/schedulers/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Daily Invoices Scheduler",
"isEnabled": true,
"tags": [
"/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997"
]
}
'import requests
url = "https://api.syntage.com/schedulers/{id}"
payload = {
"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.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Daily Invoices Scheduler',
isEnabled: true,
tags: ['/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997']
})
};
fetch('https://api.syntage.com/schedulers/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'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/{id}"
payload := strings.NewReader("{\n \"name\": \"Daily Invoices Scheduler\",\n \"isEnabled\": true,\n \"tags\": [\n \"/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.syntage.com/schedulers/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\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/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\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>"
}Update a scheduler
Update a scheduler’s name or enabled state.
curl --request PUT \
--url https://api.syntage.com/schedulers/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Daily Invoices Scheduler",
"isEnabled": true,
"tags": [
"/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997"
]
}
'import requests
url = "https://api.syntage.com/schedulers/{id}"
payload = {
"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.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Daily Invoices Scheduler',
isEnabled: true,
tags: ['/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997']
})
};
fetch('https://api.syntage.com/schedulers/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'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/{id}"
payload := strings.NewReader("{\n \"name\": \"Daily Invoices Scheduler\",\n \"isEnabled\": true,\n \"tags\": [\n \"/entity-tags/91106968-1abd-4d64-85c1-4e73d96fb997\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.syntage.com/schedulers/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\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/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\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.
Path Parameters
Body
Scheduler name
"Daily Invoices Scheduler"
Whether the scheduler is enabled
true
Tags to associate with the scheduler; sending this key replaces the existing tag collection
[
"/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?