NAV
cURL Python PHP Node Ruby Java C#

Introduction

Welcome

Welcome to the Synchroteam API!

Synchroteam’s data is not locked in. We understand that there exists a wide variety of situations where you will want to read data kept within synchroteam.com, or push data into it. We are happy to provide you with a complete REST API that will allow you to integrate Synchroteam.com with other systems.

If you use other systems to manage your customer information (CRM, Invoicing systems, etc.), you will not want to duplicate data between them and Synchroteam.com. By leveraging the data transparency provided by the REST API, you can exchange data between Synchroteam.com and other systems.

Conventions

The Synchroteam API is implemented over authenticated HTTP and returns data in JSON or XML format. Four HTTP methods are used: GET, POST, PUT and DELETE.

By manipulating the HTTP request headers, you can tell the Synchroteam API which format you want to use to send the request, and read the reponse.

Exchanging XML

To exchange data in XML you need tp include following HTTP headers:

Header Value
Content-Type text/xml
Accept text/xml

Exchanging JSON

To exchange data in JSON you need tp include following HTTP headers:

Header Value
Content-Type application/json
Accept application/json

Authentication

To authorize, use this code:

curl --request GET \
  --url https://apis.synchroteam.com/Api/v1 \
  --header 'authorization: Basic bXljb21wYW55OmZmOGU1YjYzLTBlNzQtNDEwMi1iYTkzLWM4MjlhY2ZiNThmMw==' \
  --header 'cache-control: no-cache'
import requests

url = "https://apis.synchroteam.com/Api/v1/api_endpoint_here"

headers = {
    'authorization': "Basic bXljb21wYW55OmZmOGU1YjYzLTBlNzQtNDEwMi1iYTkzLWM4MjlhY2ZiNThmMw==",
    'cache-control': "no-cache",
    }

response = requests.request("GET", url, headers=headers)

print(response.text)
<?php
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v1/api_endpoint_here",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Basic bXljb21wYW55OmZmOGU1YjYzLTBlNzQtNDEwMi1iYTkzLWM4MjlhY2ZiNThmMw=="
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("GET", "https://apis.synchroteam.com/Api/v1/api_endpoint_here");

req.headers({
  "authorization": "Basic bXljb21wYW55OmZmOGU1YjYzLTBlNzQtNDEwMi1iYTkzLWM4MjlhY2ZiNThmMw=="
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);
  console.log(res.body);
});
require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v1/api_endpoint_here")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic bXljb21wYW55OmZmOGU1YjYzLTBlNzQtNDEwMi1iYTkzLWM4MjlhY2ZiNThmMw=='

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://apis.synchroteam.com/Api/v1/api_endpoint_here")
  .header("authorization", "Basic bXljb21wYW55OmZmOGU1YjYzLTBlNzQtNDEwMi1iYTkzLWM4MjlhY2ZiNThmMw==")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v1/api_endpoint_here");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic bXljb21wYW55OmZmOGU1YjYzLTBlNzQtNDEwMi1iYTkzLWM4MjlhY2ZiNThmMw==");
IRestResponse response = client.Execute(request);

The Synchroteam API is implemented over authenticated HTTP using Basic Authentication.

To connect using basic HTTP authentication, you will need both your personnalized domain identifier and your API key.

Synchroteam expects for the API key to be included in all API requests to the server. A basic HTTP authentication header looks like the following:

Authorization: Basic a2VlcG9uOjczNmYxMDFmLTE0ZTAtNDgzZC1iNzBlLWY4YjNjZjBmOGFmMQ==

This encoded portion is the base64 encoded representation of:

domain:api-key

Parameter Example Description
domain mycompany This is your domain identifier if your domain is https://mycompany.synchroteam.com
api-key ff8e5b63-0e74-4102-ba93-c829acfb58f3 Find this key under Configuration, Authentication Key

Activities

An Activity is represented by the following fields

Field Type Description
idActivity integer ID of the activity
nmActivity string Name of the activity
noteActivity string Note for the activity
dtStart date time Activity start date
dtEnd date time Activity end date
user object The id,login,first name,last name and team of the user

SEARCH Activities

POST Body

{
  "dateFrom":"2016-04-29",
  "dateTo":"2016-09-29",
  "loginUser":"Bill",
  "nameActivity":""
}

Sample Code

curl --request POST \
  --url https://apis.synchroteam.com/Api/v2/Activities/Search \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{\r\n  "dateFrom":"2015-09-29",\r\n  "dateTo":"2016-09-29",\r\n  "loginUser":"Bill",\r\n  "nameActivity":""\r\n}'
import requests

url = "https://apis.synchroteam.com/Api/v2/Activities/Search"

payload = "{\r\n  \"dateFrom\":\"2015-09-29\",\r\n  \"dateTo\":\"2016-09-29\",\r\n  \"loginUser\":\"Bill\",\r\n  \"nameActivity\":\"\"\r\n}"
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Activities/Search",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\r\n  \"dateFrom\":\"2015-09-29\",\r\n  \"dateTo\":\"2016-09-29\",\r\n  \"loginUser\":\"Bill\",\r\n  \"nameActivity\":\"\"\r\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));


$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("POST", "https://apis.synchroteam.com/Api/v2/Activities/Search");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});

req.type("json");
req.send({
  "dateFrom": "2015-09-29",
  "dateTo": "2016-09-29",
  "loginUser": "Bill",
  "nameActivity": ""
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Activities/Search")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\r\n  \"dateFrom\":\"2015-09-29\",\r\n  \"dateTo\":\"2016-09-29\",\r\n  \"loginUser\":\"Bill\",\r\n  \"nameActivity\":\"\"\r\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://apis.synchroteam.com/Api/v2/Activities/Search")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .body("{\r\n  \"dateFrom\":\"2015-09-29\",\r\n  \"dateTo\":\"2016-09-29\",\r\n  \"loginUser\":\"Bill\",\r\n  \"nameActivity\":\"\"\r\n}")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Activities/Search");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddParameter("application/json", "{\r\n  \"dateFrom\":\"2015-09-29\",\r\n  \"dateTo\":\"2016-09-29\",\r\n  \"loginUser\":\"Bill\",\r\n  \"nameActivity\":\"\"\r\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned

[
  {
    "dtEnd": "2016-06-06 00:00",
    "dtStart": "2016-06-01 00:00",
    "idActivity": 119,
    "nmActivity": "Cleaner ",
    "noteActivity": "",
    "user": {
      "Groups": "",
      "fisrtName": "corger",
      "id": 268,
      "lastName": "Bill",
      "login": "Bill"
    }
  },
  {
    "dtEnd": "2016-08-22 00:00",
    "dtStart": "2016-08-01 00:00",
    "idActivity": 120,
    "nmActivity": "Holiday",
    "noteActivity": "",
    "user": {
      "Groups": "",
      "fisrtName": "corger",
      "id": 268,
      "lastName": "Bill",
      "login": "Bill"
    }
  },
  {
    "dtEnd": "2016-07-06 00:00",
    "dtStart": "2016-07-04 00:00",
    "idActivity": 121,
    "nmActivity": "Sickness",
    "noteActivity": "",
    "user": {
      "Groups": "",
      "fisrtName": "corger",
      "id": 268,
      "lastName": "Bill",
      "login": "Bill"
    }
  }
]

HTTP Request

POST /Api/v2/Activities/Search

Query Parameters

None

Request body

Available Filters :

Filter Type Description
dateFrom date time
(yyyy-mm-dd)
Get the list of activities created on or after dateFrom.
dateTo date time
(yyyy-mm-dd)
Get the list of activities created on or before dateTo.
loginUser string Get the list of activities for loginUser.
name string Get activities by name

Response body

A list of activities.

Activity type

An activity type is represented by the following fields

Field Type Description
id integer ID of the activity type
name string Name of the activity type
color string Color of the activity type
hasConflit boolean Indicates if the activity type can raise scheduling conflicts

SEND Activity type

Create or update the activity type.

POST Body

{

  "id":"2541",
  "name":"Type activity 8",
  "color": "887788",
  "hasConflit":"true"
}

Sample Code

curl --request POST \
  --url https://apis.synchroteam.com/Api/V2/ActivityType/Send \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{\r\n  "color": "887788",\r\n  "name":"Type activity 8",\r\n  "hasConflit":"true",\r\n  "id":""\r\n}'
import requests

url = "https://apis.synchroteam.com/Api/V2/ActivityType/Send"

payload = "{\r\n  \"color\": \"887788\",\r\n  \"name\":\"Type activity 8\",\r\n  \"hasConflit\":\"true\",\r\n  \"id\":\"\"\r\n}"
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/V2/ActivityType/Send",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\r\n  \"color\": \"887788\",\r\n  \"name\":\"Type activity 8\",\r\n  \"hasConflit\":\"true\",\r\n  \"id\":\"\"\r\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("POST", "https://apis.synchroteam.com/Api/V2/ActivityType/Send");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});

req.type("json");
req.send({
  "color": "887788",
  "name": "Type activity 8",
  "hasConflit": "true",
  "id": ""
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/V2/ActivityType/Send")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\r\n  \"color\": \"887788\",\r\n  \"name\":\"Type activity 8\",\r\n  \"hasConflit\":\"true\",\r\n  \"id\":\"\"\r\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://apis.synchroteam.com/Api/V2/ActivityType/Send")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .body("{\r\n  \"color\": \"887788\",\r\n  \"name\":\"Type activity 8\",\r\n  \"hasConflit\":\"true\",\r\n  \"id\":\"\"\r\n}")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/V2/ActivityType/Send");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddParameter("application/json", "{\r\n  \"color\": \"887788\",\r\n  \"name\":\"Type activity 8\",\r\n  \"hasConflit\":\"true\",\r\n  \"id\":\"\"\r\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned

{
  "code": 1,
  "data": {
    "color": "887788",
    "hasConflit": true,
    "id": 84,
    "name": "Type activity 8"
  },
  "msg": ""
}

HTTP Request

POST /Api/V2/ActivityType/Send

Request body

Activity type information in JSON or XML format, if the id or name exists, the activity type will be updated. If not the activity type will be created.

Response body

On success, the Activity Type data members are returned. On error, the msg field contains the error message.

SEARCH Activity type

POST Body

{
  "color": "777777",
  "name":"Type activitdy 7",
  "hasConflit":"",
  "id":""
}

Sample Code

curl --request POST \
  --url https://apis.synchroteam.com/Api/V2/ActivityType/Search \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{\r\n  "color": "777777",\r\n  "name":"Type activitdy 7",\r\n  "hasConflit":"",\r\n  "id":""\r\n}'
import requests

url = "https://apis.synchroteam.com/Api/V2/ActivityType/Search"

payload = "{\r\n  \"color\": \"777777\",\r\n  \"name\":\"Type activitdy 7\",\r\n  \"hasConflit\":\"\",\r\n  \"id\":\"\"\r\n}"
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/V2/ActivityType/Search",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\r\n  \"color\": \"777777\",\r\n  \"name\":\"Type activitdy 7\",\r\n  \"hasConflit\":\"\",\r\n  \"id\":\"\"\r\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("POST", "https://apis.synchroteam.com/Api/V2/ActivityType/Search");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});

req.type("json");
req.send({
  "color": "777777",
  "name": "Type activitdy 7",
  "hasConflit": "",
  "id": ""
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});


require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/V2/ActivityType/Search")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\r\n  \"color\": \"777777\",\r\n  \"name\":\"Type activitdy 7\",\r\n  \"hasConflit\":\"\",\r\n  \"id\":\"\"\r\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://apis.synchroteam.com/Api/V2/ActivityType/Search")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .body("{\r\n  \"color\": \"777777\",\r\n  \"name\":\"Type activitdy 7\",\r\n  \"hasConflit\":\"\",\r\n  \"id\":\"\"\r\n}")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/V2/ActivityType/Search");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddParameter("application/json", "{\r\n  \"color\": \"777777\",\r\n  \"name\":\"Type activitdy 7\",\r\n  \"hasConflit\":\"\",\r\n  \"id\":\"\"\r\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned

[
  {
    "color": "777777",
    "hasConflit": true,
    "id": 83,
    "name": "Type activity 8"
  },
  {
    "color": "777777",
    "hasConflit": true,
    "id": 84,
    "name": "Type activity 10"
  },
  {
    "color": "777777",
    "hasConflit": true,
    "id": 85,
    "name": "Type activity 9"
  },
  {
    "color": "777777",
    "hasConflit": true,
    "id": 86,
    "name": "Type activity 11"
  }
]

HTTP Request

POST /Api/v2/ActivityType/Search

Query Parameters

None

Request body

Filters available :

Filter Type Description
id integer ID of the type activity
color string Color of the type activity
name string Name of the type activity
hasConflit boolean true/false

Response body

List of activity types

DELETE Activity type

POST Body

{
  "name":"",
  "id":"56555"
}

Sample Code

curl --request DELETE \
  --url https://apis.synchroteam.com/Api/V2/ActivityType/Delete \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{\r\n  "name":"",\r\n  "id":"56555"\r\n}'
import requests

url = "https://apis.synchroteam.com/Api/V2/ActivityType/Delete"

payload = "{\r\n  \"name\":\"\",\r\n  \"id\":\"56555\"\r\n}"
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("DELETE", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/V2/ActivityType/Delete",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "{\r\n  \"name\":\"\",\r\n  \"id\":\"56555\"\r\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("DELETE", "https://apis.synchroteam.com/Api/V2/ActivityType/Delete");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});

req.type("json");
req.send({
  "name": "",
  "id": "56555"
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});


require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/V2/ActivityType/Delete")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\r\n  \"name\":\"\",\r\n  \"id\":\"56555\"\r\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.delete("https://apis.synchroteam.com/Api/V2/ActivityType/Delete")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .body("{\r\n  \"name\":\"\",\r\n  \"id\":\"56555\"\r\n}")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/V2/ActivityType/Delete");
var request = new RestRequest(Method.DELETE);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddParameter("application/json", "{\r\n  \"name\":\"\",\r\n  \"id\":\"56555\"\r\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned


{
  "code": 0,
  "msg": "The element to be deleted does not exist"
}

HTTP Request

DELETE /Api/v2/ActivityType/Delete

Query Parameters

none

Response body

On success, The number of deleted activity types is shown in the code field response. On error, the msg parameter will state that the activity type has not deleted.

Attachments

SEND Attachment

POST Body

{
    "job":{
        "id":"265_160627143211768",
        "myId":"",
        "num" : ""
    },
    "customer":{
        "id":"",
        "myId":""
    },
    "fileName":"data5.csv",
    "fileData":[Base64String]

}

Sample Code

curl --request POST \
  --url https://apis.synchroteam.com/Api/v2/Attachments/Send \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{\r\n    "job":{\r\n        "id":"265_160627143211768",\r\n        "myId":"",\r\n        "num" : ""\r\n    },\r\n    "customer":{\r\n        "id":"",\r\n        "myId":""\r\n    },\r\n    "fileName":"data51.csv",\r\n    "fileData":"Base64String"\r\n\r\n}'
import requests

url = "https://apis.synchroteam.com/Api/v2/Attachments/Send"

payload = "{\r\n    \"job\":{\r\n        \"id\":\"265_160627143211768\",\r\n        \"myId\":\"\",\r\n        \"num\" : \"\"\r\n    },\r\n    \"customer\":{\r\n        \"id\":\"\",\r\n        \"myId\":\"\"\r\n    },\r\n    \"fileName\":\"data51.csv\",\r\n    \"fileData\":\"Base64String\"\r\n\r\n}"
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Attachments/Send",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\r\n    \"job\":{\r\n        \"id\":\"265_160627143211768\",\r\n        \"myId\":\"\",\r\n        \"num\" : \"\"\r\n    },\r\n    \"customer\":{\r\n        \"id\":\"\",\r\n        \"myId\":\"\"\r\n    },\r\n    \"fileName\":\"data51.csv\",\r\n    \"fileData\":\"Base64String\"\r\n\r\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("POST", "https://apis.synchroteam.com/Api/v2/Attachments/Send");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});

req.type("json");
req.send({
  "job": {
    "id": "265_160627143211768",
    "myId": "",
    "num": ""
  },
  "customer": {
    "id": "",
    "myId": ""
  },
  "fileName": "data51.csv",
  "fileData": "Base64String"
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Attachments/Send")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\r\n    \"job\":{\r\n        \"id\":\"265_160627143211768\",\r\n        \"myId\":\"\",\r\n        \"num\" : \"\"\r\n    },\r\n    \"customer\":{\r\n        \"id\":\"\",\r\n        \"myId\":\"\"\r\n    },\r\n    \"fileName\":\"data51.csv\",\r\n    \"fileData\":\"Base64String\"\r\n\r\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://apis.synchroteam.com/Api/v2/Attachments/Send")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .body("{\r\n    \"job\":{\r\n        \"id\":\"265_160627143211768\",\r\n        \"myId\":\"\",\r\n        \"num\" : \"\"\r\n    },\r\n    \"customer\":{\r\n        \"id\":\"\",\r\n        \"myId\":\"\"\r\n    },\r\n    \"fileName\":\"data51.csv\",\r\n    \"fileData\":\"Base64String\"\r\n\r\n}")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Attachments/Send");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddParameter("application/json", "{\r\n    \"job\":{\r\n        \"id\":\"265_160627143211768\",\r\n        \"myId\":\"\",\r\n        \"num\" : \"\"\r\n    },\r\n    \"customer\":{\r\n        \"id\":\"\",\r\n        \"myId\":\"\"\r\n    },\r\n    \"fileName\":\"data51.csv\",\r\n    \"fileData\":\"Base64String\"\r\n\r\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned

{
  "data": {
    "id": "297",
    "url": url
  },
  "msg": [],
  "result": "1"
}

HTTP Request

POST /Api/v2/Attachments/Send

Query Parameters

None

Request body

The attachment information:

Field Type Description
fileName string Name of the attachment
fileData string File data encoded as a Base64String
job object id, myId and num for the job
customer object id and myId for the customer

Response body

The id and url of the attachment, or an error message.

Blocks

A block is represented by the following fields

Field Type Description
id int ID of the block
name string Name of the block
flPublished int Defines if the block is published (1) or not (0).
flShared int Defines if the block is shared (1) or not (0).
items list of items List of every item in the block.

List shared blocks

Sample Code

curl --request GET \
  --url https://apis.synchroteam.com/Api/v2/SharedBlocks/List \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
import requests

url = "https://apis.synchroteam.com/Api/v2/SharedBlocks/List"

payload = ""
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/SharedBlocks/List",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("GET", "https://apis.synchroteam.com/Api/v2/SharedBlocks/List");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});


require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/SharedBlocks/List")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://apis.synchroteam.com/Api/v2/SharedBlocks/List")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/SharedBlocks/List");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
IRestResponse response = client.Execute(request);

JSON Returned

[
  {
    "flPublished": true,
    "flShared": true,
    "id": 1169,
    "items": [
      {
        "conditionItem": null,
        "conditionValue": null,
        "positionNumber": 0,
        "valueList": null,
        "idCategory": 1169,
        "idItem": 3421,
        "idTypeItem": 7,
        "mandatory": false,
        "name": "Signature"
      },
      {
        "conditionItem": null,
        "conditionValue": null,
        "positionNumber": 1,
        "valueList": null,
        "idCategory": 1169,
        "idItem": 3422,
        "idTypeItem": 2,
        "mandatory": false,
        "name": "Print Name"
      },
      {
        "conditionItem": null,
        "conditionValue": null,
        "positionNumber": 2,
        "valueList": null,
        "idCategory": 1169,
        "idItem": 3423,
        "idTypeItem": 2,
        "mandatory": false,
        "name": "Position"
      },
      {
        "conditionItem": null,
        "conditionValue": null,
        "positionNumber": 3,
        "valueList": null,
        "idCategory": 1169,
        "idItem": 3424,
        "idTypeItem": 3,
        "mandatory": false,
        "name": "Date"
      }
    ],
    "name": "Sign Off"
  },
  ...
]

HTTP Request

GET /Api/v2/SharedBlocks/List

Query Parameters

None

Request body

None

Response body

The list of blocks.

Block Items

An item is represented by the following fields

Field Type Description
idItem int ID of the item
name string Name of the item
idCategory int ID of the block
positionNumber int Position of the item in the block
conditionItem int idItem of the item the current item depends on. O if it does not depend on another
conditionValue string Value held in conditionItem for the current item to be shown
idTypeItem fixed integer Type of the item (0 [compliance], 1 [list of values], 2 [Text], 3 [Date], 4 [Time], 5 [Numeric], 7 [Signature], 8 [Picture])
valueList string List of every possible value if the item is of type list.
mandatory boolean Indicates if the item is mandatory.
{
  "conditionItem": 3736,
  "conditionValue": "2",
  "positionNumber": 1,
  "valueList": [
    "ref-2",
    "ref-4",
    "ref-6"
  ],
  "idCategory": 1225,
  "idItem": 3737,
  "idTypeItem": 1,
  "mandatory": false,
  "name": "code article"
}

Customers

A customer is represented by the following fields

Field Type Description
id integer id of the customer (read only)
name string Name of the customer
myId string Your customer reference number for this customer
address string Address of the customer
addressComplement string Additional address information
contactName string Contact last name
contactFirstName string Contact first name
contactPhone string Contact phone number
contactMobile string Contact mobile number
contactEmail string Contact email address
contactFax string Contact fax number
sites list List of sites for this customer. (optional)
equipments list List of pieces of equipment for this customer. (optional)
customFieldValues list List of custom field values for this customer. (optional)
position position Position associated with the job. (optional)
tags list of string List of tags for this customer. (optional)

GET Customer

curl --request GET \
  --url 'https://apis.synchroteam.com/Api/v2/Customer/Details?id=35604' \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' 
import requests

url = "https://apis.synchroteam.com/Api/v2/Customer/Details"

querystring = {"id":"35604"}

payload = ""
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Customer/Details?id=35604",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("GET", "https://apis.synchroteam.com/Api/v2/Customer/Details");

req.query({
  "id": "35604"
});

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Customer/Details?id=35604")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://apis.synchroteam.com/Api/v2/Customer/Details?id=35604")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Customer/Details?id=35604");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
IRestResponse response = client.Execute(request);

JSON Returned

{
  "id":35604,
  "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
  "addressComplement": "",
  "contactEmail": "customer@synchroteam.com",
  "contactFirstName": "Jean",
  "contactFax": "(719) 388-1967",
  "contactPhone":"(719) 388-1966",
  "contactName": "Claud",
  "myId":"sCustomer08",
  "name": "Sample Customer",
  "customFieldValues":[customfieldvalue1,...],
  "position":{Position},
  "tags" : ["plumber","restaurant","test"]
}

HTTP Request

GET /Api/v2/Customer/Details?{paramType}={paramValue}

Query Parameters

Parameter Default Description
{paramType} string Parameter name. Accepts name or id or myId
{paramValue} string The name or the id or myId for the customer

Request body

none

Response body

Customer details

SEND Customer

Create or update a customer

POST Body

{
  "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
  "addressComplement": "qsfqsfq",
  "contactEmail": "customer@synchroteam.com",
  "contactFirstName": "Jean",
  "contactFax": "(719) 388-1967",
  "contactPhone":"(719) 388-1966",
  "contactName": "Claud",
  "myId":"sCustomer08",
  "name": "Sample Customer",
  "customFieldValues":[customfieldvalue1,...],
  "position":{Position},
  "tags" : ["plumber","restaurant","test"]
}

Sample Code

curl --request POST \
  --url https://apis.synchroteam.com/Api/v2/Customer/Send \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{\n  "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",\n  "addressComplement": "qsfqsfq",\n  "contactEmail": "customer@synchroteam.com",\n  "contactFirstName": "Jean",\n  "contactFax": "(719) 388-1967",\n  "contactPhone":"(719) 388-1966",\n  "contactName": "Claud",\n  "myId":"sCustomer08",\n  "name": "Sample Customer ",\n  "tags" : ["plumber","restaurant","test"]\n}'
import requests

url = "https://apis.synchroteam.com/Api/v2/Customer/Send"

payload = "{\n  \"address\": \"6605 Fisher Avenue, Falls Church, VA 22046, United States\",\n  \"addressComplement\": \"qsfqsfq\",\n  \"contactEmail\": \"customer@synchroteam.com\",\n  \"contactFirstName\": \"Jean\",\n  \"contactFax\": \"(719) 388-1967\",\n  \"contactPhone\":\"(719) 388-1966\",\n  \"contactName\": \"Claud\",\n  \"myId\":\"sCustomer08\",\n  \"name\": \"Sample Customer \",\n  \"tags\" : [\"plumber\",\"restaurant\",\"test\"]\n}"
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Customer/Send",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n  \"address\": \"6605 Fisher Avenue, Falls Church, VA 22046, United States\",\n  \"addressComplement\": \"qsfqsfq\",\n  \"contactEmail\": \"customer@synchroteam.com\",\n  \"contactFirstName\": \"Jean\",\n  \"contactFax\": \"(719) 388-1967\",\n  \"contactPhone\":\"(719) 388-1966\",\n  \"contactName\": \"Claud\",\n  \"myId\":\"sCustomer08\",\n  \"name\": \"Sample Customer \",\n  \"tags\" : [\"plumber\",\"restaurant\",\"test\"]\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("POST", "https://apis.synchroteam.com/Api/v2/Customer/Send");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});

req.type("json");
req.send({
  "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
  "addressComplement": "qsfqsfq",
  "contactEmail": "customer@synchroteam.com",
  "contactFirstName": "Jean",
  "contactFax": "(719) 388-1967",
  "contactPhone": "(719) 388-1966",
  "contactName": "Claud",
  "myId": "sCustomer08",
  "name": "Sample Customer ",
  "tags" : ["plumber","restaurant","test"]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Customer/Send")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\n  \"address\": \"6605 Fisher Avenue, Falls Church, VA 22046, United States\",\n  \"addressComplement\": \"qsfqsfq\",\n  \"contactEmail\": \"customer@synchroteam.com\",\n  \"contactFirstName\": \"Jean\",\n  \"contactFax\": \"(719) 388-1967\",\n  \"contactPhone\":\"(719) 388-1966\",\n  \"contactName\": \"Claud\",\n  \"myId\":\"sCustomer08\",\n  \"name\": \"Sample Customer \",\n  \"tags\" : [\"plumber\",\"restaurant\",\"test\"]\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://apis.synchroteam.com/Api/v2/Customer/Send")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .body("{\n  \"address\": \"6605 Fisher Avenue, Falls Church, VA 22046, United States\",\n  \"addressComplement\": \"qsfqsfq\",\n  \"contactEmail\": \"customer@synchroteam.com\",\n  \"contactFirstName\": \"Jean\",\n  \"contactFax\": \"(719) 388-1967\",\n  \"contactPhone\":\"(719) 388-1966\",\n  \"contactName\": \"Claud\",\n  \"myId\":\"sCustomer08\",\n  \"name\": \"Sample Customer \",\n  \"tags\" : [\"plumber\",\"restaurant\",\"test\"]\n}")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Customer/Send");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddParameter("application/json", "{\n  \"address\": \"6605 Fisher Avenue, Falls Church, VA 22046, United States\",\n  \"addressComplement\": \"qsfqsfq\",\n  \"contactEmail\": \"customer@synchroteam.com\",\n  \"contactFirstName\": \"Jean\",\n  \"contactFax\": \"(719) 388-1967\",\n  \"contactPhone\":\"(719) 388-1966\",\n  \"contactName\": \"Claud\",\n  \"myId\":\"sCustomer08\",\n  \"Name\": \"Sample Customer \",\n  \"tags\" : [\"plumber\",\"restaurant\",\"test\"]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned

{
  "code": 35642,
  "message": ""
}

HTTP Request

POST /Api/v2/Customer/Send

Parameters

None

Request Body

Customer information in JSON or XML format, if the id or myId exist, the customer will be updated, if not the customer will be created.

Response Body

The response contains the id of the new customer created or updated by this action. This value is in the code field of the response

If there is an error, a message is returned in message field.

DELETE Customer

curl --request DELETE \
  --url 'https://apis.synchroteam.com/Api/v2/Customer/Delete?name=HAMILTON%20ASSET%20MANAGEMENT' \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
import requests

url = "https://apis.synchroteam.com/Api/v2/Customer/Delete"

querystring = {"name":"HAMILTON ASSET MANAGEMENT"}

payload = ""
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("DELETE", url, data=payload, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Customer/Delete?name=HAMILTON%20ASSET%20MANAGEMENT",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("DELETE", "https://apis.synchroteam.com/Api/v2/Customer/Delete");

req.query({
  "name": "HAMILTON ASSET MANAGEMENT"
});

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Customer/Delete?name=HAMILTON%20ASSET%20MANAGEMENT")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.delete("https://apis.synchroteam.com/Api/v2/Customer/Delete?name=HAMILTON%20ASSET%20MANAGEMENT")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Customer/Delete?name=HAMILTON%20ASSET%20MANAGEMENT");
var request = new RestRequest(Method.DELETE);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
IRestResponse response = client.Execute(request);

JSON Returned

{
  "code":1
}

HTTP Request

DELETE /Api/v2/Customer/Delete?{paramType}={paramValue}

Query Parameters

Parameter Default Description
{paramType} string Parameter name. Accepts name or id or myId
{paramValue} string The name or the id or the myId of the customer

Request body

none

Response body

The response contains the number of customers deleted by this action (0 or more). This value is in the code field of the response. If you ask for deletion of customers with a given name and there is more than one customer using this name, every customer whose name is given as a parameter will be deleted.

LIST Customers

curl --request GET \
  --url 'https://apis.synchroteam.com/Api/v2/Customer/List?ChangedFrom=2016-11-02' \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
import requests

url = "https://apis.synchroteam.com/Api/v2/Customer/List"

querystring = {"ChangedFrom":"2016-11-02"}

headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Customer/List?ChangedFrom=2016-11-02",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("GET", "https://apis.synchroteam.com/Api/v2/Customer/List");

req.query({
  "ChangedFrom": "2016-11-02"
});

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});


require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Customer/List?ChangedFrom=2016-11-02")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://apis.synchroteam.com/Api/v2/Customer/List?ChangedFrom=2016-11-02")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Customer/List?ChangedFrom=2016-11-02");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
IRestResponse response = client.Execute(request);

JSON Returned

[{
  "id":35604,
  "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
  "addressComplement": "",
  "contactEmail": "customer@synchroteam.com",
  "contactFirstName": "Jean",
  "contactFax": "(719) 388-1967",
  "contactPhone":"(719) 388-1966",
  "contactName": "Claude",
  "myId":"sCustomer08",
  "name": "Sample Customer",
  "position": {
        "Latitude": "38.8998214",
        "Longitude": "-77.1791373"
  },
  "customFieldValues": [
        {
          "name": "N° SIRET",
          "value": "145872-2154",
          "id": 82
        },
        {
          "name": "Refernce",
          "value": "sq4545-5",
          "id": 146
        }
  ]
},
  {  
  "id":35605,
  "address": "8867 Grand Ave, Beulah, CO 81023",
  "addressComplement": "",
  "contactEmail": "customer2@synchroteam.com",
  "contactFirstName": "Jean",
  "contactFax": "(719) 485-3193",
  "contactPhone":"(719) 485-3195",
  "contactName": "Bargan",
  "myId":"sCustomer10",
  "name": "US Post Office",
  "position": {
        "Latitude": "38.0752884",
        "Longitude": "-104.9868629"
  },
  "customFieldValues": [
        {
          "name": "N° SIRET",
          "value": "145872-2154",
          "id": 82
        },
        {
          "name": "Refernce",
          "value": "sq4545-5",
          "id": 146
        }
  ]
  }
  ]

HTTP Request

GET /Api/v2/Customer/List

Query Parameters

Parameter Default Description
{ChangedFrom} date time
(yyyy-mm-dd)
The date of the older modification checked.

Request body

none

Response body

Customer List.

Custom field values

DESCRIPTION

There can be any number of different custom field values associated with jobs, users, customers, sites, equipment. A representation of a custom field value has the following fields :

Field Type Description
id integer ID of the custom field (read only)
name string Name of the custom field.
value string Value of the custom field for the associated object.

METHODS

The are no methods directly associated to custom field values. They can be accessed, created, deleted, altered via the associated data.

{
  "id":"2",
  "name":"Equipment Serial Number",
  "value":"125FTD47842"
}

Equipment

An equipment is represented by the following fields

Field Type Description
id integer ID of the equipment (read only)
myId string Your custom reference number for this piece of equipment
name string Name of the piece of equipment
customerName string Name of the customer
customerId string Customer ID
customerMyId string Your customer reference number for this customer
siteName string Name of the site
siteId string ID of the site
siteMyId string Your custom reference number for the site
customFieldValues list List of custom field values for your equipment. (optional)
tags list of string List of tags for this piece of equipment. (optional)

GET Equipment

curl --request GET \
  --url 'https://apis.synchroteam.com/Api/v2/Equipment/Details?id=93971' \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' 
import requests

url = "https://apis.synchroteam.com/Api/v2/Equipment/Details"

querystring = {"id":"93971"}

payload = ""
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Equipment/Details?id=93971",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("GET", "https://apis.synchroteam.com/Api/v2/Equipment/Details");

req.query({
  "id": "93971"
});

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Equipment/Details?id=93971")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://apis.synchroteam.com/Api/v2/Equipment/Details?id=93971")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Equipment/Details?id=93971");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
IRestResponse response = client.Execute(request);

JSON Returned

{
 "id":93971,
 "myId":"ref-2541",
 "name":"Heater 2345",
 "customerName":"World Inc.",
 "customerId": 2541,
 "customerMyId": "ref-54",
 "siteName":"New York Office",
 "siteId": 14587,
 "siteMyId": "",
 "customFieldValues":[customfieldvalue1,...],
 "tags" : ["plumber","restaurant","test"]
}

HTTP Request

GET /Api/v2/Equipment/Details

Query Parameters

Parameter Default Description
{paramType} string Parameter name. Accepts name or id or myId
{paramValue} string The name or the id of the equipment

Request body

none

Response body

A Description of the Equipment asked for.

SEND Equipment

POST Body

{
 "myId":"ref-2542",
 "name":"Heater 2345",
 "customerId": 35551,
 "siteId": 62649,
 "customFieldValues":[customfieldvalue1,...],
 "tags" : ["plumber","restaurant","test"]
}

Sample Code

curl --request POST \
  --url https://apis.synchroteam.com/Api/v2/Equipment/Send \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' 
  --data '{\r\n "myId":"ref-2542",\r\n "name":"Heater 2345",\r\n "customerId": 35551,\r\n "siteId": 62649,\r\n  "tags" : ["plumber","restaurant","test"]\r\n}'
import requests

url = "https://apis.synchroteam.com/Api/v2/Equipment/Send"

payload = "{\r\n \"myId\":\"ref-2542\",\r\n \"name\":\"Heater 2345\",\r\n \"customerId\": 35551,\r\n \"siteId\": 62649,\r\n  \"tags\" : [\"plumber\",\"restaurant\",\"test\"]\r\n}"
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Equipment/Send",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\r\n \"myId\":\"ref-2542\",\r\n \"name\":\"Heater 2345\",\r\n \"customerId\": 35551,\r\n \"siteId\": 62649,\r\n  \"tags\" : [\"plumber\",\"restaurant\",\"test\"]\r\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("POST", "https://apis.synchroteam.com/Api/v2/Equipment/Send");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});

req.type("json");
req.send({
  "myId": "ref-2542",
  "name": "Heater 2345",
  "customerId": 35551,
  "siteId": 62649,
  "tags" : ["plumber","restaurant","test"]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Equipment/Send")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\r\n \"myId\":\"ref-2542\",\r\n \"name\":\"Heater 2345\",\r\n \"customerId\": 35551,\r\n \"siteId\": 62649,\r\n  \"tags\" : [\"plumber\",\"restaurant\",\"test\"]\r\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://apis.synchroteam.com/Api/v2/Equipment/Send")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .body("{\r\n \"myId\":\"ref-2542\",\r\n \"name\":\"Heater 2345\",\r\n \"customerId\": 35551,\r\n \"siteId\": 62649,\r\n  \"tags\" : [\"plumber\",\"restaurant\",\"test\"]\r\n}")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Equipment/Send");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddParameter("application/json", "{\r\n \"myId\":\"ref-2542\",\r\n \"name\":\"Heater 2345\",\r\n \"customerId\": 35551,\r\n \"siteId\": 62649,\r\n  \"tags\" : [\"plumber\",\"restaurant\",\"test\"]\r\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned

{
  "code": 93972,
  "message": ""
}

HTTP Request

POST /Api/v2/Equipment/Send

Request Body

Data for a piece of equipment in JSON or XML format. If the id or myId exist, the piece of equipment will be updated, if not the piece of equipment will be created.

Response Body

The response contains id of the new piece of equipment created or updated by this action. This value is in the code field of the response.

If there is an error, a message is returned in message field.

DELETE Equipment

curl --request DELETE \
  --url 'https://apis.synchroteam.com/Api/v2/Equipment/Delete?id=939721' \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' 
import requests

url = "https://apis.synchroteam.com/Api/v2/Equipment/Delete"

querystring = {"id":"939721"}

payload = ""
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("DELETE", url, data=payload, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Equipment/Delete?id=939721",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("DELETE", "https://apis.synchroteam.com/Api/v2/Equipment/Delete");

req.query({
  "id": "939721"
});

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Equipment/Delete?id=939721")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.delete("https://apis.synchroteam.com/Api/v2/Equipment/Delete?id=939721")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Equipment/Delete?id=939721");
var request = new RestRequest(Method.DELETE);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
IRestResponse response = client.Execute(request);

JSON Returned

{
  "code":1
}

HTTP Request

DELETE /Api/v2/Equipment/Delete

Query Parameters

Parameter Default Description
{paramType} string Parameter name. Accepts name or id or myId
{paramValue} string The name or id or myId of the piece of equipment

Request body

none

Response body

The number of deleted pieces of equipment.

GET Equipment list By Customer and Site

curl --request GET \
  --url https://apis.synchroteam.com/Api/v2/Equipment/List/Customer/8248/Site/47706 \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' 
import requests

url = "https://apis.synchroteam.com/Api/v2/Equipment/List/Customer/8248/Site/47706"

payload = ""
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Equipment/List/Customer/8248/Site/47706",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("GET", "https://apis.synchroteam.com/Api/v2/Equipment/List/Customer/8248/Site/47706");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Equipment/List/Customer/8248/Site/47706")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://apis.synchroteam.com/Api/v2/Equipment/List/Customer/8248/Site/47706")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Equipment/List/Customer/8248/Site/47706");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
IRestResponse response = client.Execute(request);

JSON Returned

[[
  {
    "customerId": 8248,
    "customerMyId": "cust-05",
    "customerName": "testFullSite",
    "myId": "ref-e-01",
    "name": "test equi1",
    "siteId": 47706,
    "siteMyId": "ref-01",
    "siteName": "testSite",
    "id": 93973
  },
  {
    "customerId": 8248,
    "customerMyId": "cust-05",
    "customerName": "testFullSite",
    "myId": "ref-e-02",
    "name": "test equip2",
    "siteId": 47706,
    "siteMyId": "ref-01",
    "siteName": "testSite",
    "id": 93974
  }
]...
]

HTTP Request

GET /Api/v2/Equipment/List/Customer/{CustomerName}/Site/{siteName}

Query Parameters

Parameter Default Description
{paramValue} string The id or name of the customer
{paramValue} string The id or name of the site

Request body

none

Response body

Equipment list associated with the customer and the site given as parameters.

Jobs

A job is represented by the following fields

Field Type Description
idJob integer ID of the job (read only)
myId string Your custom reference number for this job
num string Number of the job
idJobType integer Job Type ID
idCustomer integer Customer ID
customerMyId string Customer’s myId
customerName String Customer Name
idSite integer Site ID (optional)
siteMyId string Site’s myId (optional)
siteName String Site Name (optional)
idEquipment integer Equipment ID (optional)
equipmentMyId string Equipment’s myId(optional)
nameEquipment String Equipment Name (optional)
idUser integer Technician’s User ID
login integer Technician’s Login
idCreator integer ID of the manager who created the job
description string Job Description
priority fixed Job priority (0 [low],1 [medium], 2[high])
scheduledBeginDate date time Schedule Start Date
scheduledEndDate date time Scheduled End Date
realBeginDate date time Actual Start Date
realEndDate date time Actual End Date
validationDate date time Date the job was validated
duration integer Time spent working on the job, given in minutes
globalAddress string Job Address
complementAddress string Additional address information
status integer Job Status (0 [created], 1 [scheduled], 2 [synchronized to mobile], 3 [started] , 4 [suspended/paused], 5 [completed], 6 [validated], 7 [canceled])
validationUser integer User ID of the person that validated the job
idReport integer Job Report Type ID
contactName string Contact Last Name
contactFirstName string Contact First Name
contactPhone string Contact Phone Number
contactEmail string Contact Email Address
publicLink string Public link of the job
report report Report details, as filled by the technician
partsList list List of parts consumed for the job
otherTechnicians array of strings Other technicians associated with this job
customFieldValues list List of custom field values for your job
position A Position Position associated with the job

GET Job Detail

curl --request GET \
  --url 'https://apis.synchroteam.com/Api/v2/Jobs/Detail?id=265_160719144323649' \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
import requests

url = "https://apis.synchroteam.com/Api/v2/Jobs/Detail"

querystring = {"id":"265_160719144323649"}

payload = ""
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Jobs/Detail?id=265_160719144323649",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("GET", "https://apis.synchroteam.com/Api/v2/Jobs/Detail");

req.query({
  "id": "265_160719144323649"
});

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Jobs/Detail?id=265_160719144323649")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://apis.synchroteam.com/Api/v2/Jobs/Detail?id=265_160719144323649")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Jobs/Detail?id=265_160719144323649");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
IRestResponse response = client.Execute(request);

JSON Returned

{
  "scheduledBeginDate": "19/07/2016 14:43:00",
  "scheduledEndDate": "19/07/2016 16:43:00",
  "siteName": "new site name",
  "customerMyId": "ref_54154",
  "description": "description of the job",
  "idCreator": 265,
  "idCustomer": 8386,
  "idEquipment": 93929,
  "idJob": "265_160719144323649",
  "idJobType": 629,
  "idReport": 781,
  "idSite": 62611,
  "idUser": 1551,
  "login": "techtest",
  "nameEquipment": "equipement v1",
  "priority": 0,
  "publicLink": "https://synchroteam.com/Jobs/PublicJob/afb5853-3ec6-46ea-bc9c-db4e75a63bc2",
  "status": 1,
  "customFieldValues": [
    {
      "name": "sector",
      "value": "",
      "id": 182
    },
    {
      "name": "city",
      "value": "",
      "id": 185
    }....
  ],
  "customerName": "name customer",
  "duration": 0,
  "globalAddress": "SD, États-Unis",
  "myId": "ref-job05014",
  "parts": [
    {
      "id": 34454,
      "quantity": 2,
      "reference": "ACCROCHE FIX CF62033"
    },
    {
      "id": 35947,
      "quantity": 10,
      "reference": "111-a"
    }
  ],
  "position": {
    "Latitude": "43.9695148",
    "Longitude": "-99.90181310000"
  },
  "report": [
    {
      "id": 3422,
      "idCategory": 1169,
      "nmCategory": "Sign Off",
      "nmItem": "Print Name",
      "value": "fadil"
    },
    {
      "id": 3427,
      "idCategory": 1171,
      "nmCategory": "details",
      "nmItem": "date creation",
      "value": "13/07/2016"
    }.....
  ],
  "OtherTechnicians": [
        "steven",
        "ann"
    ]
}

HTTP Request

GET /Api/v2/Jobs/Detail?paramType=paramValue

Query Parameters

Parameter Default Description
{paramType} string Parameter name. Accepts num or id or myId
{paramValue} string The num or id or myId for the job

Request body

none

Response body

Job information in JSON or XML format

SEND Job

Create or update the job

POST Body

{
  "idCustomer": "35615",
  "nmJobType":"Aire acondicioa",
  "myId":"ref-job1405",
  "description": "update job",
  "scheduledBeginDate":"2016-10-13 10:00",
  "scheduledEndDate":"2016-10-13 17:00",
  "idUser": "266",
  "customFieldValues": [
    {
      "name": "Sector",
      "value": "OD 89874 sector"
    },
    {
      "name": "Code breakdown",
      "value": "KO"
    }
  ],
    "parts": [
        {
            "reference": "VOYANT VCYL 7 S 7/8",
            "quantity": 2.5
        },
         {
             "id":"5671",
            "reference": null,
            "quantity": 1.9
        }
    ],
    "report": [
        {
            "id": 3132,
            "value": "documentation"
        },
         {
            "nmItem":"valid",
            "value": "Yes"
        },
        {
            "nmCategory":"Category 2",
            "nmItem":"hour",
            "value": "15:20"
        }
    ], 
  "priority": "1",
  "status":"1",
  "globalAddress":""
}

Sample Code

curl --request POST \
  --url https://apis.synchroteam.com/Api/v2/Jobs/Send \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{\r\n  "idCustomer": "35615",\r\n  "nmJobType":"Aire acondicioa",\r\n  "myId":"ref-job1405",\r\n  "description": "update job",\r\n  "scheduledBeginDate":"2016-10-13 10:00",\r\n  "scheduledEndDate":"2016-10-13 17:00",\r\n  "idUser": "266",\r\n  "customFieldValues": [\r\n    {\r\n      "Name": "sector",\r\n      "Value": "OD 89874 sector"\r\n    },\r\n    {\r\n      "Name": "Code breakdown",\r\n      "Value": "KO"\r\n    }\r\n  ],\r\n    "Parts": [\r\n        {\r\n            "reference": "VOYANT VCYL 7 S 7/8",\r\n            "quantity": 2.5\r\n        },\r\n         {\r\n             "id":"5671",\r\n            "reference": null,\r\n            "quantity": 1.9\r\n        }\r\n    ],\r\n    "report": [\r\n        {\r\n            "id": 3132,\r\n            "value": "ceci est un doc"\r\n        },\r\n         {\r\n            "nmItem":"valid",\r\n            "value": "Yes"\r\n        },\r\n        {\r\n            "nmCategory":"Category 2",\r\n            "nmItem":"hour",\r\n            "value": "15:20"\r\n        },\r\n        {\r\n            "idCategory":1135,\r\n            "nmItem":"date",\r\n            "value": "2015-01-02"\r\n        } \r\n    ], \r\n  "priority": "1",\r\n  "status":"1",\r\n  "globalAddress":""\r\n}'
import requests

url = "https://apis.synchroteam.com/Api/v2/Jobs/Send"

payload = "{\r\n  \"idCustomer\": \"35615\",\r\n  \"nmJobType\":\"Aire acondicioa\",\r\n  \"myId\":\"ref-job1405\",\r\n  \"description\": \"update job\",\r\n  \"scheduledBeginDate\":\"2016-10-13 10:00\",\r\n  \"scheduledEndDate\":\"2016-10-13 17:00\",\r\n  \"idUser\": \"266\",\r\n  \"customFieldValues\": [\r\n    {\r\n      \"Name\": \"sector\",\r\n      \"Value\": \"OD 89874 sector\"\r\n    },\r\n    {\r\n      \"Name\": \"Code breakdown\",\r\n      \"Value\": \"KO\"\r\n    }\r\n  ],\r\n    \"Parts\": [\r\n        {\r\n            \"reference\": \"VOYANT VCYL 7 S 7/8\",\r\n            \"quantity\": 2.5\r\n        },\r\n         {\r\n             \"id\":\"5671\",\r\n            \"reference\": null,\r\n            \"quantity\": 1.9\r\n        }\r\n    ],\r\n    \"report\": [\r\n        {\r\n            \"id\": 3132,\r\n            \"value\": \"ceci est un doc\"\r\n        },\r\n         {\r\n            \"nmItem\":\"valid\",\r\n            \"value\": \"Yes\"\r\n        },\r\n        {\r\n            \"nmCategory\":\"Category 2\",\r\n            \"nmItem\":\"hour\",\r\n            \"value\": \"15:20\"\r\n        },\r\n        {\r\n            \"idCategory\":1135,\r\n            \"nmItem\":\"date\",\r\n            \"value\": \"2015-01-02\"\r\n        } \r\n    ], \r\n  \"priority\": \"1\",\r\n  \"status\":\"1\",\r\n  \"globalAddress\":\"\"\r\n}"
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Jobs/Send",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\r\n  \"idCustomer\": \"35615\",\r\n  \"nmJobType\":\"Aire acondicioa\",\r\n  \"myId\":\"ref-job1405\",\r\n  \"description\": \"update job\",\r\n  \"scheduledBeginDate\":\"2016-10-13 10:00\",\r\n  \"scheduledEndDate\":\"2016-10-13 17:00\",\r\n  \"idUser\": \"266\",\r\n  \"customFieldValues\": [\r\n    {\r\n      \"Name\": \"sector\",\r\n      \"Value\": \"OD 89874 sector\"\r\n    },\r\n    {\r\n      \"Name\": \"Code breakdown\",\r\n      \"Value\": \"KO\"\r\n    }\r\n  ],\r\n    \"Parts\": [\r\n        {\r\n            \"reference\": \"VOYANT VCYL 7 S 7/8\",\r\n            \"quantity\": 2.5\r\n        },\r\n         {\r\n             \"id\":\"5671\",\r\n            \"reference\": null,\r\n            \"quantity\": 1.9\r\n        }\r\n    ],\r\n    \"report\": [\r\n        {\r\n            \"id\": 3132,\r\n            \"value\": \"ceci est un doc\"\r\n        },\r\n         {\r\n            \"nmItem\":\"valid\",\r\n            \"value\": \"Yes\"\r\n        },\r\n        {\r\n            \"nmCategory\":\"Category 2\",\r\n            \"nmItem\":\"hour\",\r\n            \"value\": \"15:20\"\r\n        },\r\n        {\r\n            \"idCategory\":1135,\r\n            \"nmItem\":\"date\",\r\n            \"value\": \"2015-01-02\"\r\n        } \r\n    ], \r\n  \"priority\": \"1\",\r\n  \"status\":\"1\",\r\n  \"globalAddress\":\"\"\r\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("POST", "https://apis.synchroteam.com/Api/v2/Jobs/Send");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});

req.type("json");
req.send({
  "idCustomer": "35615",
  "nmJobType": "Aire acondicioa",
  "myId": "ref-job1405",
  "description": "update job",
  "scheduledBeginDate": "2016-10-13 10:00",
  "scheduledEndDate": "2016-10-13 17:00",
  "idUser": "266",
  "customFieldValues": [
    {
      "name": "sector",
      "value": "OD 89874 sector"
    },
    {
      "name": "Code breakdown",
      "value": "KO"
    }
  ],
  "parts": [
    {
      "reference": "VOYANT VCYL 7 S 7/8",
      "quantity": 2.5
    },
    {
      "id": "5671",
      "reference": null,
      "quantity": 1.9
    }
  ],
  "report": [
    {
      "id": 3132,
      "value": "ceci est un doc"
    },
    {
      "nmItem": "valid",
      "value": "Yes"
    },
    {
      "nmCategory": "Category 2",
      "nmItem": "hour",
      "value": "15:20"
    },
    {
      "idCategory": 1135,
      "nmItem": "date",
      "value": "2015-01-02"
    }
  ],
  "priority": "1",
  "status": "1",
  "globalAddress": ""
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});


require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Jobs/Send")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\r\n  \"idCustomer\": \"35615\",\r\n  \"nmJobType\":\"Aire acondicioa\",\r\n  \"myId\":\"ref-job1405\",\r\n  \"description\": \"update job\",\r\n  \"scheduledBeginDate\":\"2016-10-13 10:00\",\r\n  \"scheduledEndDate\":\"2016-10-13 17:00\",\r\n  \"idUser\": \"266\",\r\n  \"customFieldValues\": [\r\n    {\r\n      \"Name\": \"sector\",\r\n      \"Value\": \"OD 89874 sector\"\r\n    },\r\n    {\r\n      \"Name\": \"Code breakdown\",\r\n      \"Value\": \"KO\"\r\n    }\r\n  ],\r\n    \"Parts\": [\r\n        {\r\n            \"reference\": \"VOYANT VCYL 7 S 7/8\",\r\n            \"quantity\": 2.5\r\n        },\r\n         {\r\n             \"id\":\"5671\",\r\n            \"reference\": null,\r\n            \"quantity\": 1.9\r\n        }\r\n    ],\r\n    \"report\": [\r\n        {\r\n            \"id\": 3132,\r\n            \"value\": \"ceci est un doc\"\r\n        },\r\n         {\r\n            \"nmItem\":\"valid\",\r\n            \"value\": \"Yes\"\r\n        },\r\n        {\r\n            \"nmCategory\":\"Category 2\",\r\n            \"nmItem\":\"hour\",\r\n            \"value\": \"15:20\"\r\n        },\r\n        {\r\n            \"idCategory\":1135,\r\n            \"nmItem\":\"date\",\r\n            \"value\": \"2015-01-02\"\r\n        } \r\n    ], \r\n  \"priority\": \"1\",\r\n  \"status\":\"1\",\r\n  \"globalAddress\":\"\"\r\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://apis.synchroteam.com/Api/v2/Jobs/Send")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .body("{\r\n  \"idCustomer\": \"35615\",\r\n  \"nmJobType\":\"Aire acondicioa\",\r\n  \"myId\":\"ref-job1405\",\r\n  \"description\": \"update job\",\r\n  \"scheduledBeginDate\":\"2016-10-13 10:00\",\r\n  \"scheduledEndDate\":\"2016-10-13 17:00\",\r\n  \"idUser\": \"266\",\r\n  \"customFieldValues\": [\r\n    {\r\n      \"Name\": \"sector\",\r\n      \"Value\": \"OD 89874 sector\"\r\n    },\r\n    {\r\n      \"Name\": \"Code breakdown\",\r\n      \"Value\": \"KO\"\r\n    }\r\n  ],\r\n    \"Parts\": [\r\n        {\r\n            \"reference\": \"VOYANT VCYL 7 S 7/8\",\r\n            \"quantity\": 2.5\r\n        },\r\n         {\r\n             \"id\":\"5671\",\r\n            \"reference\": null,\r\n            \"quantity\": 1.9\r\n        }\r\n    ],\r\n    \"report\": [\r\n        {\r\n            \"id\": 3132,\r\n            \"value\": \"ceci est un doc\"\r\n        },\r\n         {\r\n            \"nmItem\":\"valid\",\r\n            \"value\": \"Yes\"\r\n        },\r\n        {\r\n            \"nmCategory\":\"Category 2\",\r\n            \"nmItem\":\"hour\",\r\n            \"value\": \"15:20\"\r\n        },\r\n        {\r\n            \"idCategory\":1135,\r\n            \"nmItem\":\"date\",\r\n            \"value\": \"2015-01-02\"\r\n        } \r\n    ], \r\n  \"priority\": \"1\",\r\n  \"status\":\"1\",\r\n  \"globalAddress\":\"\"\r\n}")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Jobs/Send");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddParameter("application/json", "{\r\n  \"idCustomer\": \"35615\",\r\n  \"nmJobType\":\"Aire acondicioa\",\r\n  \"myId\":\"ref-job1405\",\r\n  \"description\": \"update job\",\r\n  \"scheduledBeginDate\":\"2016-10-13 10:00\",\r\n  \"scheduledEndDate\":\"2016-10-13 17:00\",\r\n  \"idUser\": \"266\",\r\n  \"customFieldValues\": [\r\n    {\r\n      \"Name\": \"sector\",\r\n      \"Value\": \"OD 89874 sector\"\r\n    },\r\n    {\r\n      \"Name\": \"Code breakdown\",\r\n      \"Value\": \"KO\"\r\n    }\r\n  ],\r\n    \"Parts\": [\r\n        {\r\n            \"reference\": \"VOYANT VCYL 7 S 7/8\",\r\n            \"quantity\": 2.5\r\n        },\r\n         {\r\n             \"id\":\"5671\",\r\n            \"reference\": null,\r\n            \"quantity\": 1.9\r\n        }\r\n    ],\r\n    \"report\": [\r\n        {\r\n            \"id\": 3132,\r\n            \"value\": \"ceci est un doc\"\r\n        },\r\n         {\r\n            \"nmItem\":\"valid\",\r\n            \"value\": \"Yes\"\r\n        },\r\n        {\r\n            \"nmCategory\":\"Category 2\",\r\n            \"nmItem\":\"hour\",\r\n            \"value\": \"15:20\"\r\n        },\r\n        {\r\n            \"idCategory\":1135,\r\n            \"nmItem\":\"date\",\r\n            \"value\": \"2015-01-02\"\r\n        } \r\n    ], \r\n  \"priority\": \"1\",\r\n  \"status\":\"1\",\r\n  \"globalAddress\":\"\"\r\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned

{
  "code": 13497,
  "message": null
}

HTTP Request

POST /Api/v2/Jobs/Send

Request Body

Job information in JSON or XML format, if idJob or myId or num exist, the job will be updated, if not the job will be created.

Response Body

The response contains num for the job created or updated by this action. This value is in the code field of the response.

If there is an error, a message is returned in the message field.

SEARCH Jobs

POST Body

{
    "dateFrom":"2015-05-15",
    "dateTo":"2016-05-18",
    "changedFrom":"2016-05-16",
    "reportChangedFrom":"2017-01-16 15:35:00",
    "myId":"ref-25487",
    "userName":"Bill",
    "status":3
}

Sample Code

curl --request POST \
  --url https://apis.synchroteam.com/Api/v2/Jobs/Search \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{\r\n    "dateFrom":"2015-05-15",\r\n    "dateTo":"2016-05-18",\r\n    "userName":"Bill",\r\n    "status":3\r\n}'
import requests

url = "https://apis.synchroteam.com/Api/v2/Jobs/Search"

payload = "{\r\n    \"dateFrom\":\"2015-05-15\",\r\n    \"dateTo\":\"2016-05-18\",\r\n    \"userName\":\"Bill\",\r\n    \"status\":3\r\n}"
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Jobs/Search",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\r\n    \"dateFrom\":\"2015-05-15\",\r\n    \"dateTo\":\"2016-05-18\",\r\n    \"userName\":\"Bill\",\r\n    \"status\":3\r\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("POST", "https://apis.synchroteam.com/Api/v2/Jobs/Search");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});

req.type("json");
req.send({
  "dateFrom": "2015-05-15",
  "dateTo": "2016-05-18",
  "userName": "Bill",
  "status": 3
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Jobs/Search")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\r\n    \"dateFrom\":\"2015-05-15\",\r\n    \"dateTo\":\"2016-05-18\",\r\n    \"userName\":\"Bill\",\r\n    \"status\":3\r\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://apis.synchroteam.com/Api/v2/Jobs/Search")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .body("{\r\n    \"dateFrom\":\"2015-05-15\",\r\n    \"dateTo\":\"2016-05-18\",\r\n    \"userName\":\"Bill\",\r\n    \"status\":3\r\n}")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Jobs/Search");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddParameter("application/json", "{\r\n    \"dateFrom\":\"2015-05-15\",\r\n    \"dateTo\":\"2016-05-18\",\r\n    \"userName\":\"Bill\",\r\n    \"status\":3\r\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned

[
  {
    "id": "265_1606271438784211768",
    "myId": "ref-25487"
  },
  {
    "id": "2687_160627143454211768",
    "myId": "ref-job004"
  }....
]

HTTP Request

POST /Api/v2/Jobs/Search

Query Parameters

None

Request body

Available Filters:

Filter Type Description
dateFrom date time
(yyyy-mm-dd hh:mm:ss)
Get jobs planned, ongoing or completed on or after dateFrom
dateTo date time
(yyyy-mm-dd hh:mm:ss)
Get jobs planned, ongoing or completed on or before dateTo
changedFrom date time
(yyyy-mm-dd hh:mm:ss)
Get jobs planned, ongoing or completed, the older modification checked on or after changedFrom
reportChangedFrom date time
(yyyy-mm-dd hh:mm:ss)
Get jobs planned, ongoing or completed, the older modification checked in his report on or after reportChangedFrom
userName string Get jobs assigned to a technician, by userName
userId integer Get jobs assigned to a technician, by userId
status integer Filter by current job status (0 [created], 1 [scheduled], 2 [synchronized to mobile], 3 [started] , 4 [suspended/paused], 5 [completed], 6 [validated], 7 [canceled])
myId string Filter by job myId

Response body

A list of id and myId for the jobs found.

VALIDATE Job

Sample Code

curl --request PUT \
  --url 'https://apis.synchroteam.com/Api/v2/Jobs/Validate?myId=ref-25415' \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' 
import requests

url = "https://apis.synchroteam.com/Api/v2/Jobs/Validate"

querystring = {"myId":"ref-25415"}

payload = ""
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("PUT", url, data=payload, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Jobs/Validate?myId=ref-25415",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("PUT", "https://apis.synchroteam.com/Api/v2/Jobs/Validate");

req.query({
  "myId": "ref-25415"
});

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});


require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Jobs/Validate?myId=ref-25415")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.put("https://apis.synchroteam.com/Api/v2/Jobs/Validate?myId=ref-25415")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Jobs/Validate?myId=ref-25415");
var request = new RestRequest(Method.PUT);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
IRestResponse response = client.Execute(request);

JSON Returned

{
  "code": 1
}

HTTP Request

PUT /v2/Jobs/Validate?myId=ref-25415

Query Parameters

Parameter Default Description
{paramType} string Parameter name. Accepts num or id or myId
{paramValue} string The num or id or myId of the job

Request body

none

Response body

The response contains number of validated jobs. This value is in the code field of the response

Job PHOTOS

DESCRIPTION

A representation of a Photo has the following fields :

Field Type Description
fileName string Name of the file, including the extention (.png, .jpg, etc.)
comment string Comment associated to the photo
imageData String Image data encoded as a Base64String
job object id and myId and Num for the job

Sample Code

curl --request GET \
  --url 'https://apis.synchroteam.com/Api/v2/Jobs/Photos?myId=ref-25415' \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' 
import requests

url = "https://apis.synchroteam.com/Api/v2/Jobs/Photos"

querystring = {"myId":"ref-25415"}

payload = ""
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Jobs/Photos?myId=ref-25415",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("GET", "https://apis.synchroteam.com/Api/v2/Jobs/Photos");

req.query({
  "myId": "ref-25415"
});

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Jobs/Photos?myId=ref-25415")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://apis.synchroteam.com/Api/v2/Jobs/Photos?myId=ref-25415")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Jobs/Photos?myId=ref-25415");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
IRestResponse response = client.Execute(request);

JSON Returned

{
 "job": {
      "id": "265_160719144323649",
      "myId": "ref-25415",
      "num": 13473
    },
 "fileName":  "image.png",
 "comment":"a Comment",
 "imageData":[Base64String]
}

HTTP Request

GET /v2/Jobs/Photos?myId=ref-25415

Query Parameters

Parameter Default Description
{paramType} string Parameter name. Accepts num or id or myId
{paramValue} string num or id or myId for the job

Request body

none

Response body

The list of photos for the job.

Job PDF

Sample Code

curl --request GET \
  --url 'https://apis.synchroteam.com/Api/v2/Jobs/PDF?num=13473' \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' 
import requests

url = "https://apis.synchroteam.com/Api/v2/Jobs/PDF"

querystring = {"num":"13473"}

payload = ""
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Jobs/PDF?num=13473",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("GET", "https://apis.synchroteam.com/Api/v2/Jobs/PDF");

req.query({
  "num": "13473"
});

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Jobs/PDF?num=13473")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://apis.synchroteam.com/Api/v2/Jobs/PDF?num=13473")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Jobs/PDF?num=13473");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
IRestResponse response = client.Execute(request);

JSON Returned

{
 "pdfData":[Base64String]
}

HTTP Request

GET /Api/v2/Jobs/PDF?num=13473

Query Parameters

Parameter Default Description
{paramType} string Parameter name. Accepts num or id or myId
{paramValue} string The num or id or myId of the job

Request body

none

Response body

The pdf data

CANCEL Job

Sample Code

curl --request PUT \
  --url 'https://apis.synchroteam.com/Api/v2/Jobs/Cancel?myId=ref-25415' \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --header 'postman-token: 8f3da600-0f54-19aa-0ba4-ed46d95e2ad8'
import requests

url = "https://apis.synchroteam.com/Api/v2/Jobs/Cancel"

querystring = {"myId":"ref-25415"}

payload = ""
headers = {
    'accept': "text/json",
    'content-type': "application/json",
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'cache-control': "no-cache"
    }

response = requests.request("PUT", url, data=payload, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Jobs/Cancel?myId=ref-25415",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("PUT", "https://apis.synchroteam.com/Api/v2/Jobs/Cancel");

req.query({
  "myId": "ref-25415"
});

req.headers({
  "cache-control": "no-cache",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
  "content-type": "application/json",
  "accept": "text/json"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Jobs/Cancel?myId=ref-25415")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.put("https://apis.synchroteam.com/Api/v2/Jobs/Cancel?myId=ref-25415")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Jobs/Cancel?myId=ref-25415");
var request = new RestRequest(Method.PUT);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
IRestResponse response = client.Execute(request);

JSON Returned

{
  "code": 1
}

HTTP Request

PUT /v2/Jobs/Cancel?myId=ref-25415

Query Parameters

Parameter Default Description
{paramType} string Parameter name. Accepts num or id or myId
{paramValue} string The num or id or myId of the job

Request body

none

Response body

The response contains number of Canceled jobs. This value is in the code field of the response

Positions

Description of positions objects. Position objects are GPS coordinates, they are associated with jobs, customers and sites.

DESCRIPTION

There can be only one position for each job, customer or site. The values can only be acccessed with the associated object.

When an object associated with a position is created if no GPS position is provided, a position is associated with it according to its address field, if it is possible.

When an object associated with a position is changed an a new address is provided, and no position is provided, a new position is calculated; if it is possible.

A representation of a position has the following fields :

Field Type Description
latitude decimal The latitude of the position, the value is greater than -90 and smaller than 90
longitude decimal The longitude of the position, the value is greater than -90 and smaller than 90.

METHODS

The are no methods directly associated to positions. They can be accessed, created, deleted, altered via the associated data.

{
  "latitude":"42.479",
  "latitude":"-0.4586"
}

Sites

A site is represented by the following fields

Field Type Description
id integer ID of the site (read only)
myId string Your custom reference number for this site
name string Name of the site
customerId string ID of the customer
customerMyId string Your custom reference number for the customer
customerName string Name of the customer
address string Address of the site
addressComplement string A complement to the address of the site.
contactName string Last name of your contact
contactFirstName string First name of your contact.
contactPhone string Phone number of your contact.
contactMobile string Mobile number of your contact.
contactEmail string Email of your contact.
contactFax string Fax number of your contact.
equipments list List of Pieces of equipment for your site. (optional)
customFieldValues list List of custom field values for your site. (optional)
position position position associated with the job. (optional)
tags list of string List of tags for this site. (optional)

GET Site

curl --request GET \
  --url 'https://apis.synchroteam.com/Api/v2/Site/Details?id=345' \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' 
import requests

url = "https://apis.synchroteam.com/Api/v2/Site/Details"

querystring = {"id":"345"}

headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, headers=headers, params=querystring)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Site/Details?id=345",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("GET", "https://apis.synchroteam.com/Api/v2/Site/Details");

req.query({
  "id": "345"
});

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Site/Details?id=345")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://apis.synchroteam.com/Api/v2/Site/Details?id=345")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Site/Details?id=345");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
IRestResponse response = client.Execute(request);

JSON Returned

{
  "id":2811,
  "myId": "ref-2511",
  "address":"6605 Fisher Avenue, Falls Church, VA 22046, United States",
  "addressComplement":"2nd Floor left",
  "contactEmail":"paul@hamilton.com",
  "contactFax":"(719) 388-1967",
  "contactMobile":"(719) 388-1969",
  "contactName":"Mr Paul",
  "contactPhone":"(877) 413-5903",
  "name":"site name",
  "equipments":[equipments,...],
  "customFieldValues":[customfieldvalue1,...],
  "position":{Position},
  "tags" : ["plumber","restaurant","test"]
}

HTTP Request

GET /Api/v2/Site/Details

Query Parameters

Parameter Default Description
{paramType} string Parameter name. Accepts name or id or myId
{paramValue} string The name, the id or myId of the site

Request body

none

Response body

A description of a site

SEND Site

Create or update the site

POST Body

{
  "id":"1454",
  "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
  "addressComplement": "",
  "contactEmail": "contact@synchroteam.com",
  "contactFax": "0524548798",
  "contactFirstName": "Paul",
  "contactMobile": "",
  "contactName": "",
  "contactPhone": "(719) 388-1966",
  "customerId": 35646,
  "myId": "ref-2541",
  "name": "Site name",
  "customerName": "Sample Customer",  
  "tags" : ["plumber","restaurant","test"]
}

Sample Code

curl --request POST \
  --url https://apis.synchroteam.com/Api/v2/Site/Send \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{\r\n  "id":"1454",\r\n  "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",\r\n  "addressComplement": "",\r\n  "contactEmail": "contact@synchroteam.com",\r\n  "contactFax": "0524548798",\r\n  "contactFirstName": "Paul",\r\n  "contactMobile": "",\r\n  "contactName": "",\r\n  "contactPhone": "(719) 388-1966",\r\n  "customerId": 35646,\r\n  "myId": "ref-2541",\r\n  "name": "Site name",\r\n  "customerName": "Sample Customer",\r\n  "tags" : ["plumber","restaurant","test"]\r\n}'
import requests

url = "https://apis.synchroteam.com/Api/v2/Site/Send"

payload = "{\r\n  \"id\":\"1454\",\r\n  \"address\": \"6605 Fisher Avenue, Falls Church, VA 22046, United States\",\r\n  \"addressComplement\": \"\",\r\n  \"contactEmail\": \"contact@synchroteam.com\",\r\n  \"contactFax\": \"0524548798\",\r\n  \"contactFirstName\": \"Paul\",\r\n  \"contactMobile\": \"\",\r\n  \"contactName\": \"\",\r\n  \"contactPhone\": \"(719) 388-1966\",\r\n  \"customerId\": 35646,\r\n  \"myId\": \"ref-2541\",\r\n  \"name\": \"Site name\",\r\n  \"customerName\": \"Sample Customer\",\r\n  \"tags\" : [\"plumber\",\"restaurant\",\"test\"]\r\n}"
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Site/Send",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\r\n  \"id\":\"1454\",\r\n  \"address\": \"6605 Fisher Avenue, Falls Church, VA 22046, United States\",\r\n  \"addressComplement\": \"\",\r\n  \"contactEmail\": \"contact@synchroteam.com\",\r\n  \"contactFax\": \"0524548798\",\r\n  \"contactFirstName\": \"Paul\",\r\n  \"contactMobile\": \"\",\r\n  \"contactName\": \"\",\r\n  \"contactPhone\": \"(719) 388-1966\",\r\n  \"customerId\": 35646,\r\n  \"myId\": \"ref-2541\",\r\n  \"name\": \"Site name\",\r\n  \"customerName\": \"Sample Customer\",\r\n  \"tags\" : [\"plumber\",\"restaurant\",\"test\"]\r\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("POST", "https://apis.synchroteam.com/Api/v2/Site/Send");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});

req.type("json");
req.send({
  "id": "1454",
  "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
  "addressComplement": "",
  "contactEmail": "contact@synchroteam.com",
  "contactFax": "0524548798",
  "contactFirstName": "Paul",
  "contactMobile": "",
  "contactName": "",
  "contactPhone": "(719) 388-1966",
  "customerId": 35646,
  "myId": "ref-2541",
  "name": "Site name",
  "customerName": "Sample Customer",
  "tags": [
    "plumber",
    "restaurant",
    "test"
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Site/Send")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\r\n  \"id\":\"1454\",\r\n  \"address\": \"6605 Fisher Avenue, Falls Church, VA 22046, United States\",\r\n  \"addressComplement\": \"\",\r\n  \"contactEmail\": \"contact@synchroteam.com\",\r\n  \"contactFax\": \"0524548798\",\r\n  \"contactFirstName\": \"Paul\",\r\n  \"contactMobile\": \"\",\r\n  \"contactName\": \"\",\r\n  \"contactPhone\": \"(719) 388-1966\",\r\n  \"customerId\": 35646,\r\n  \"myId\": \"ref-2541\",\r\n  \"name\": \"Site name\",\r\n  \"customerName\": \"Sample Customer\",\r\n  \"tags\" : [\"plumber\",\"restaurant\",\"test\"]\r\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://apis.synchroteam.com/Api/v2/Site/Send")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .header("postman-token", "d648854e-7fa0-d97e-825e-fd8f3157cfa1")
  .body("{\r\n  \"id\":\"1454\",\r\n  \"address\": \"6605 Fisher Avenue, Falls Church, VA 22046, United States\",\r\n  \"addressComplement\": \"\",\r\n  \"contactEmail\": \"contact@synchroteam.com\",\r\n  \"contactFax\": \"0524548798\",\r\n  \"contactFirstName\": \"Paul\",\r\n  \"contactMobile\": \"\",\r\n  \"contactName\": \"\",\r\n  \"contactPhone\": \"(719) 388-1966\",\r\n  \"customerId\": 35646,\r\n  \"myId\": \"ref-2541\",\r\n  \"name\": \"Site name\",\r\n  \"customerName\": \"Sample Customer\",\r\n}  \"tags\" : [\"plumber\",\"restaurant\",\"test\"]\r\n}")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Site/Send");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddParameter("application/json", "{\r\n  \"id\":\"1454\",\r\n  \"address\": \"6605 Fisher Avenue, Falls Church, VA 22046, United States\",\r\n  \"addressComplement\": \"\",\r\n  \"contactEmail\": \"contact@synchroteam.com\",\r\n  \"contactFax\": \"0524548798\",\r\n  \"contactFirstName\": \"Paul\",\r\n  \"contactMobile\": \"\",\r\n  \"contactName\": \"\",\r\n  \"contactPhone\": \"(719) 388-1966\",\r\n  \"customerId\": 35646,\r\n  \"myId\": \"ref-2541\",\r\n  \"name\": \"Site name\",\r\n  \"customerName\": \"Sample Customer\",\r\n  \"tags\" : [\"plumber\",\"restaurant\",\"test\"]\r\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned

{
  "code": 62650,
  "message": ""
}

HTTP Request

POST /Api/v2/Site/Send

Request Body

Site information in JSON or XML format, if the id or myId exist, the site will be updated, if not the site will be created.

Response Body

The response contains id of the new site created or updated by this action. This value is in the code field of the response.

If there is an error, a message is returned in message field.

DELETE Site

curl --request DELETE \
  --url 'https://apis.synchroteam.com/Api/v2/Site/Delete?id=2541542' \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' 
import requests

url = "https://apis.synchroteam.com/Api/v2/Site/Delete"

querystring = {"id":"2541542"}

payload = ""
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("DELETE", url, data=payload, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Site/Delete?id=2541542",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("DELETE", "https://apis.synchroteam.com/Api/v2/Site/Delete");

req.query({
  "id": "2541542"
});

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Site/Delete?id=2541542")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.delete("https://apis.synchroteam.com/Api/v2/Site/Delete?id=2541542")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Site/Delete?id=2541542");
var request = new RestRequest(Method.DELETE);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
IRestResponse response = client.Execute(request);

JSON Returned

{
  "code":1
}

HTTP Request

DELETE /Api/v2/Site/Delete

Query Parameters

Parameter Default Description
{paramType} string Parameter name. Accepts name or id or myId
{paramValue} string The name, id or myId of the site

Request body

none

Response body

The number of deleted sites.

GET Sites List By Customer id

curl --request GET \
  --url https://apis.synchroteam.com/Api/v2/Site/List/byCustomer/id/8384 \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' 
import requests

url = "https://apis.synchroteam.com/Api/v2/Site/List/byCustomer/id/8384"

payload = ""
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Site/List/byCustomer/id/8384",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("GET", "https://apis.synchroteam.com/Api/v2/Site/List/byCustomer/id/8384");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Site/List/byCustomer/id/8384")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://apis.synchroteam.com/Api/v2/Site/List/byCustomer/id/8384")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Site/List/byCustomer/id/8384");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
IRestResponse response = client.Execute(request);

JSON Returned

[{
  "id":2811,
  "myId": "ref-2511",
  "address":"6605 Fisher Avenue, Falls Church, VA 22046, United States",
  "addressComplement":"2nd Floor left",
  "contactEmail":"Micheal@hamilton.com",
  "contactFax":"(719) 485-3193",
  "contactMobile":"(877)413-5903",
  "contactName":"Paul",
  "contactPhone":"(719) 485-3173",
  "name":"site name 1",
  "customerName": "Labo office"
},
{
  "id":2810,
  "myId": "ref-2510",
  "address":"8867 Grand Ave, Beulah, CO 81023",
  "addressComplement":"2nd Floor left",
  "contactEmail":"paul@hamilton.com",
  "contactFax":"(719) 485-3198",
  "contactMobile":"(877)413-5453",
  "contactName":"Paul",
  "contactPhone":"(719) 485-3113",
  "name":"site name 2",
  "customerName": "US Post Office"
}...
]

HTTP Request

GET /Api/v2/Site/List/byCustomer/id/{paramValue}

Query Parameters

Parameter Default Description
{paramValue} string The id of the customer

Request body

none

Response body

A List of sites.

GET Sites List By Customer myId

curl --request GET \
  --url https://apis.synchroteam.com/Api/v2/Site/List/byCustomer/myId/ref-25 \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' 
import requests

url = "https://apis.synchroteam.com/Api/v2/Site/List/byCustomer/myId/ref-25"

payload = ""
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Site/List/byCustomer/myId/ref-25",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("GET", "https://apis.synchroteam.com/Api/v2/Site/List/byCustomer/myId/ref-25");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Site/List/byCustomer/myId/ref-25")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://apis.synchroteam.com/Api/v2/Site/List/byCustomer/myId/ref-25")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Site/List/byCustomer/myId/ref-25");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
IRestResponse response = client.Execute(request);

JSON Returned

[{
  "id":2811,
  "myId": "ref-2511",
  "address":"6605 Fisher Avenue, Falls Church, VA 22046, United States",
  "addressComplement":"2nd Floor left",
  "contactEmail":"Micheal@hamilton.com",
  "contactFax":"(719) 485-3193",
  "contactMobile":"(877)413-5903",
  "contactName":"Paul",
  "contactPhone":"(719) 485-3173",
  "name":"site name 1",
  "customerName": "Labo office"
},
{
  "id":2810,
  "myId": "ref-2510",
  "address":"8867 Grand Ave, Beulah, CO 81023",
  "addressComplement":"2nd Floor left",
  "contactEmail":"paul@hamilton.com",
  "contactFax":"(719) 485-3198",
  "contactMobile":"(877)413-5453",
  "contactName":"Paul",
  "contactPhone":"(719) 485-3113",
  "name":"site name 2",
  "customerName": "US Post Office"
}...
]

HTTP Request

GET /Api/v2/Site/List/byCustomer/myId/{paramValue}

Query Parameters

Parameter Default Description
{paramValue} string The myId of the customer

Request body

none

Response body

A List of sites.

Stock

A stock is represented by the following fields

Field Type Description
id int Stock Depot ID
name string Stock Depot Name
flDefault int Sets this stock depot as the default (1) or not (0).
flProvider int Sets this stock depot as a provider (1) or not (0).

Complete a replenishment

PUT Body

{
  "isPartial": true,
  "quantity":3,
  "id":"1C9035A3-CE56-4E13-B9D0-DFFB9C02E782",
  "serials":["bb11","bb22"]
}

Sample Code

curl --request PUT \
  --url https://apis.synchroteam.com/Api/v2/StockRequest/Complete \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{\r\n  "isPartial": true,\r\n  "quantity":3,\r\n  "id":"1C9035A3-CE56-4E13-B9D0-DFFB9C02E782",\r\n  "serials":["bb11","bb22"]\r\n}'
import requests

url = "https://apis.synchroteam.com/Api/v2/StockRequest/Complete"

payload = "{\r\n  \"isPartial\": true,\r\n  \"quantity\":3,\r\n  \"id\":\"1C9035A3-CE56-4E13-B9D0-DFFB9C02E782\",\r\n  \"serials\":[\"bb11\",\"bb22\"]\r\n}"
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/StockRequest/Complete",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\r\n  \"isPartial\": true,\r\n  \"quantity\":3,\r\n  \"id\":\"1C9035A3-CE56-4E13-B9D0-DFFB9C02E782\",\r\n  \"serials\":[\"bb11\",\"bb22\"]\r\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("PUT", "https://apis.synchroteam.com/Api/v2/StockRequest/Complete");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});

req.type("json");
req.send({
  "isPartial": true,
  "quantity": 3,
  "id": "1C9035A3-CE56-4E13-B9D0-DFFB9C02E782",
  "serials": [
    "bb11",
    "bb22"
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

});


require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/StockRequest/Complete")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\r\n  \"isPartial\": true,\r\n  \"quantity\":3,\r\n  \"id\":\"1C9035A3-CE56-4E13-B9D0-DFFB9C02E782\",\r\n  \"serials\":[\"bb11\",\"bb22\"]\r\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.put("https://apis.synchroteam.com/Api/v2/StockRequest/Complete")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .body("{\r\n  \"isPartial\": true,\r\n  \"quantity\":3,\r\n  \"id\":\"1C9035A3-CE56-4E13-B9D0-DFFB9C02E782\",\r\n  \"serials\":[\"bb11\",\"bb22\"]\r\n}")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/StockRequest/Complete");
var request = new RestRequest(Method.PUT);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddParameter("application/json", "{\r\n  \"isPartial\": true,\r\n  \"quantity\":3,\r\n  \"id\":\"1C9035A3-CE56-4E13-B9D0-DFFB9C02E782\",\r\n  \"serials\":[\"bb11\",\"bb22\"]\r\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned

{
  "code": 1
}

HTTP Request

PUT /Api/v2/StockRequest/Complete

Query Parameters

None

Request body

The information for the replenishment request:

Field Type Description
id integer ID of the replenishment request
isPartial boolean If the request is partially complete or not (true/false)
quantity integer Number of parts
serials list of string The serial numbers for the parts

Response body

The response contains number of requests completed by this action. This value is in the code field of the response

Search replenishment requests

POST Body

{
  "isUrgent": "",
  "isDeleted":false,
  "isSent":"",
  "modifiedAfter": "",
  "createdAfter":""
}

Sample Code

curl --request POST \
  --url https://apis.synchroteam.com/Api/v2/StockRequest/Search \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{\r\n  "isUrgent": "",\r\n  "isDeleted":true,\r\n  "isSent":"",\r\n  "modifiedAfter": "",\r\n  "createdAfter":""\r\n}'
import requests

url = "https://apis.synchroteam.com/Api/v2/StockRequest/Search"

payload = "{\r\n  \"isUrgent\": \"\",\r\n  \"isDeleted\":true,\r\n  \"isSent\":\"\",\r\n  \"modifiedAfter\": \"\",\r\n  \"createdAfter\":\"\"\r\n}"
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/StockRequest/Search",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\r\n  \"isUrgent\": \"\",\r\n  \"isDeleted\":true,\r\n  \"isSent\":\"\",\r\n  \"modifiedAfter\": \"\",\r\n  \"createdAfter\":\"\"\r\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("POST", "https://apis.synchroteam.com/Api/v2/StockRequest/Search");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});

req.type("json");
req.send({
  "isUrgent": "",
  "isDeleted": true,
  "isSent": "",
  "modifiedAfter": "",
  "createdAfter": ""
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/StockRequest/Search")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\r\n  \"isUrgent\": \"\",\r\n  \"isDeleted\":true,\r\n  \"isSent\":\"\",\r\n  \"modifiedAfter\": \"\",\r\n  \"createdAfter\":\"\"\r\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://apis.synchroteam.com/Api/v2/StockRequest/Search")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .body("{\r\n  \"isUrgent\": \"\",\r\n  \"isDeleted\":true,\r\n  \"isSent\":\"\",\r\n  \"modifiedAfter\": \"\",\r\n  \"createdAfter\":\"\"\r\n}")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/StockRequest/Search");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddParameter("application/json", "{\r\n  \"isUrgent\": \"\",\r\n  \"isDeleted\":true,\r\n  \"isSent\":\"\",\r\n  \"modifiedAfter\": \"\",\r\n  \"createdAfter\":\"\"\r\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned

[
    {
        "destination": {
            "idStock": "d6a71643-0ad2-4de8-abcb-34f54c4ca12e",
            "nmStock": "stock"
        },
        "id": "22aa76ac-03c8-4fdb-baee-dca2d33cdd23",
        "isDeleted": false,
        "isSent": true,
        "isUrgent": false,
        "part": {
            "codeProduit": "p6666",
            "idPiece": 35947,
            "nmPiece": "p6666",
            "prixPiece": 123
        },
        "quantity": 0,
        "source": {
            "idStock": "18af2bf1-0973-4958-a66e-c5fe974ec129",
            "nmStock": "stock4"
        },
        "user": {
            "idUser": 265,
            "loginUser": "npinault",
            "nomUser": "PINAULT",
            "prenomUser": "Nicolas 2"
        }
    },
    {
        "destination": {
            "idStock": "d6a71643-0ad2-4de8-abcb-34f54c4ca12e",
            "nmStock": "stock"
        },
        "id": "48fa4674-8b6c-4fe6-a1d9-2d96eebe63c0",
        "isDeleted": false,
        "isSent": true,
        "isUrgent": false,
        "part": {
            "codeProduit": "aaa",
            "idPiece": 35930,
            "nmPiece": "*****aaaaa",
            "prixPiece": 55
        },
        "quantity": -1,
        "source": {
            "idStock": "18af2bf1-0973-4958-a66e-c5fe974ec129",
            "nmStock": "stock4"
        },
        "user": {
            "idUser": 265,
            "loginUser": "npinault",
            "nomUser": "PINAULT",
            "prenomUser": "Nicolas 2"
        }
    },
    {
        "destination": {
            "idStock": "d6a71643-0ad2-4de8-abcb-34f54c4ca12e",
            "nmStock": "stock"
        },
        "id": "1c9035a3-ce56-4e13-b9d0-dffb9c02e782",
        "isDeleted": false,
        "isSent": true,
        "isUrgent": false,
        "part": {
            "codeProduit": "ref005f",
            "idPiece": 35909,
            "nmPiece": "111",
            "prixPiece": 110
        },
        "quantity": 6,
        "source": {
            "idStock": "18af2bf1-0973-4958-a66e-c5fe974ec129",
            "nmStock": "stock4"
        },
        "user": {
            "idUser": 265,
            "loginUser": "npinault",
            "nomUser": "PINAULT",
            "prenomUser": "Nicolas 2"
        }
    }
]

HTTP Request

POST /Api/v2/StockRequest/Search

Query Parameters

None

Request body

Available filters:

Filter Type Description
isUrgent boolean Is the request urgent (true/false)?
isDeleted boolean Is the request deleted (true/false)?
isSent boolean Is the request sent (true/false)?
modifiedAfter date time
(yyyy-mm-dd)
Get requests modified after modifiedAfter
createdAfter date time
(yyyy-mm-dd)
Get requests created after createdAfter

Response body

Replenishment request information.

Initialize the quantities

PUT Body

[
   {
       "depot":"stock4",
       "parts":[{
                                   "reference": "KAAQ3104A",
                                   "quantity":210,
                                   "serials":[]
                   },
                   {
                                   "reference": "refHi001",
                                   "quantity":"",
                                   "serials":["771000","771010","771020","771050","771045","771045"]
                   }
               ]
    } ,
    {
       "depot":"stock",
       "parts":[{
                                   "reference": "refHi001",
                                   "quantity":"",
                                   "serials":["3000","3103","3020","3057"]
                   },
                   {
                                   "reference": "KAAQ3104A",
                                   "quantity":20,
                                   "serials":[]
                   }
               ]
    }
]

Sample Code

curl --request PUT \
  --url https://apis.synchroteam.com/Api/v2/Inventory/Quantities \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '[\r\n   {\r\n       "depot":"stock4",\r\n       "parts":[{\r\n                                   "reference": "KAAQ3104A",\r\n                                   "quantity":210,\r\n                                   "serials":[]\r\n                   },\r\n                   {\r\n                                   "reference": "refHi001",\r\n                                   "quantity":"",\r\n                                   "serials":["771000","771010","771020","771050","771045","771045"]\r\n                   }\r\n               ]\r\n    } ,\r\n    {\r\n       "depot":"stock",\r\n       "parts":[{\r\n                                   "reference": "refHi001",\r\n                                   "quantity":"",\r\n                                   "serials":["3000","3103","3020","3057"]\r\n                   },\r\n                   {\r\n                                   "reference": "KAAQ3104A",\r\n                                   "quantity":20,\r\n                                   "serials":[]\r\n                   }\r\n               ]\r\n    }\r\n]\r\n'
import requests

url = "https://apis.synchroteam.com/Api/v2/Inventory/Quantities"

payload = "[\r\n   {\r\n       \"depot\":\"stock4\",\r\n       \"parts\":[{\r\n                                   \"reference\": \"KAAQ3104A\",\r\n                                   \"quantity\":210,\r\n                                   \"serials\":[]\r\n                   },\r\n                   {\r\n                                   \"reference\": \"refHi001\",\r\n                                   \"quantity\":\"\",\r\n                                   \"serials\":[\"771000\",\"771010\",\"771020\",\"771050\",\"771045\",\"771045\"]\r\n                   }\r\n               ]\r\n    } ,\r\n    {\r\n       \"depot\":\"stock\",\r\n       \"parts\":[{\r\n                                   \"reference\": \"refHi001\",\r\n                                   \"quantity\":\"\",\r\n                                   \"serials\":[\"3000\",\"3103\",\"3020\",\"3057\"]\r\n                   },\r\n                   {\r\n                                   \"reference\": \"KAAQ3104A\",\r\n                                   \"quantity\":20,\r\n                                   \"serials\":[]\r\n                   }\r\n               ]\r\n    }\r\n]\r\n"
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Inventory/Quantities",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "[\r\n   {\r\n       \"depot\":\"stock4\",\r\n       \"parts\":[{\r\n                                   \"reference\": \"KAAQ3104A\",\r\n                                   \"quantity\":210,\r\n                                   \"serials\":[]\r\n                   },\r\n                   {\r\n                                   \"reference\": \"refHi001\",\r\n                                   \"quantity\":\"\",\r\n                                   \"serials\":[\"771000\",\"771010\",\"771020\",\"771050\",\"771045\",\"771045\"]\r\n                   }\r\n               ]\r\n    } ,\r\n    {\r\n       \"depot\":\"stock\",\r\n       \"parts\":[{\r\n                                   \"reference\": \"refHi001\",\r\n                                   \"quantity\":\"\",\r\n                                   \"serials\":[\"3000\",\"3103\",\"3020\",\"3057\"]\r\n                   },\r\n                   {\r\n                                   \"reference\": \"KAAQ3104A\",\r\n                                   \"quantity\":20,\r\n                                   \"serials\":[]\r\n                   }\r\n               ]\r\n    }\r\n]\r\n",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("PUT", "https://apis.synchroteam.com/Api/v2/Inventory/Quantities");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});

req.type("json");
req.send([
  {
    "depot": "stock4",
    "parts": [
      {
        "reference": "KAAQ3104A",
        "quantity": 210,
        "serials": []
      },
      {
        "reference": "refHi001",
        "quantity": "",
        "serials": [
          "771000",
          "771010",
          "771020",
          "771050",
          "771045",
          "771045"
        ]
      }
    ]
  },
  {
    "depot": "stock",
    "parts": [
      {
        "reference": "refHi001",
        "quantity": "",
        "serials": [
          "3000",
          "3103",
          "3020",
          "3057"
        ]
      },
      {
        "reference": "KAAQ3104A",
        "quantity": 20,
        "serials": []
      }
    ]
  }
]);

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Inventory/Quantities")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "[\r\n   {\r\n       \"depot\":\"stock4\",\r\n       \"parts\":[{\r\n                                   \"reference\": \"KAAQ3104A\",\r\n                                   \"quantity\":210,\r\n                                   \"serials\":[]\r\n                   },\r\n                   {\r\n                                   \"reference\": \"refHi001\",\r\n                                   \"quantity\":\"\",\r\n                                   \"serials\":[\"771000\",\"771010\",\"771020\",\"771050\",\"771045\",\"771045\"]\r\n                   }\r\n               ]\r\n    } ,\r\n    {\r\n       \"depot\":\"stock\",\r\n       \"parts\":[{\r\n                                   \"reference\": \"refHi001\",\r\n                                   \"quantity\":\"\",\r\n                                   \"serials\":[\"3000\",\"3103\",\"3020\",\"3057\"]\r\n                   },\r\n                   {\r\n                                   \"reference\": \"KAAQ3104A\",\r\n                                   \"quantity\":20,\r\n                                   \"serials\":[]\r\n                   }\r\n               ]\r\n    }\r\n]\r\n"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.put("https://apis.synchroteam.com/Api/v2/Inventory/Quantities")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .body("[\r\n   {\r\n       \"depot\":\"stock4\",\r\n       \"parts\":[{\r\n                                   \"reference\": \"KAAQ3104A\",\r\n                                   \"quantity\":210,\r\n                                   \"serials\":[]\r\n                   },\r\n                   {\r\n                                   \"reference\": \"refHi001\",\r\n                                   \"quantity\":\"\",\r\n                                   \"serials\":[\"771000\",\"771010\",\"771020\",\"771050\",\"771045\",\"771045\"]\r\n                   }\r\n               ]\r\n    } ,\r\n    {\r\n       \"depot\":\"stock\",\r\n       \"parts\":[{\r\n                                   \"reference\": \"refHi001\",\r\n                                   \"quantity\":\"\",\r\n                                   \"serials\":[\"3000\",\"3103\",\"3020\",\"3057\"]\r\n                   },\r\n                   {\r\n                                   \"reference\": \"KAAQ3104A\",\r\n                                   \"quantity\":20,\r\n                                   \"serials\":[]\r\n                   }\r\n               ]\r\n    }\r\n]\r\n")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Inventory/Quantities");
var request = new RestRequest(Method.PUT);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddParameter("application/json", "[\r\n   {\r\n       \"depot\":\"stock4\",\r\n       \"parts\":[{\r\n                                   \"reference\": \"KAAQ3104A\",\r\n                                   \"quantity\":210,\r\n                                   \"serials\":[]\r\n                   },\r\n                   {\r\n                                   \"reference\": \"refHi001\",\r\n                                   \"quantity\":\"\",\r\n                                   \"serials\":[\"771000\",\"771010\",\"771020\",\"771050\",\"771045\",\"771045\"]\r\n                   }\r\n               ]\r\n    } ,\r\n    {\r\n       \"depot\":\"stock\",\r\n       \"parts\":[{\r\n                                   \"reference\": \"refHi001\",\r\n                                   \"quantity\":\"\",\r\n                                   \"serials\":[\"3000\",\"3103\",\"3020\",\"3057\"]\r\n                   },\r\n                   {\r\n                                   \"reference\": \"KAAQ3104A\",\r\n                                   \"quantity\":20,\r\n                                   \"serials\":[]\r\n                   }\r\n               ]\r\n    }\r\n]\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned

{
  "code": 1,
  "errors": ""

HTTP Request

PUT /Api/v2/Inventory/Quantities

Query Parameters

None

Request body

The name of the depots, the reference and quantity of parts or the reference and serial numbers for the parts (for any depot).

Type Description
depot string The name of depot
parts list of parts The reference and quantity for the part, or the reference and serial numbers for the part

Response body

1 if all parts are updated, 0 if any one part is not updated

Stock Parts

A Part is represented by the following fields

Field Type Description
id integer ID of the part (read only)
name string Part Name
reference string Part reference number or code
price decimal number The billable price (exc. taxes)
taxId integer The id of the tax applied to this part
categoryId integer The id of the category for this part
categoryName string The name of the category for this part
quantity decimal number How many of this part was used on a given Job. This field is ONLY used to know part usage associated with jobs (optional)
minQuantity integer The minimum stock quantity for this part
tracked boolean The part is tracked or not
serializable boolean The part is serializable or not

SEND Part

Create or update the part

POST Body

{
   "name":"Angle inter. H50 White",
   "price":7.35,
   "categoryName":"Electricity",
   "reference":"LEG10602",
   "taxId":5,
   "minQuantity": 2,
   "tracked":true,
   "serializable":true   
}

Sample Code

curl --request POST \
  --url https://apis.synchroteam.com/Api/v2/Part/Send \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{\n   "name":"Angle inter. H50 White",\n   "price":7.35,\n   "categoryName":"Electricity",\n   "reference":"LEG10602",\n   "taxId":5,\n    "minQuantity": 2,\n    "tracked":true,\n    "serializable":true\n\n}'
import requests

url = "https://apis.synchroteam.com/Api/v2/Part/Send"

payload = "{\n   \"name\":\"Angle inter. H50 White\",\n   \"price\":7.35,\n   \"categoryName\":\"Electricity\",\n   \"reference\":\"LEG10602\",\n   \"taxId\":5,\n    \"minQuantity\": 2,\n    \"tracked\":true,\n    \"serializable\":true\n\n}"
headers = {
    'accept': "text/json",
    'content-type': "application/json",
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Part/Send",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n   \"name\":\"Angle inter. H50 White\",\n   \"price\":7.35,\n   \"categoryName\":\"Electricity\",\n   \"reference\":\"LEG10602\",\n   \"taxId\":5,\n    \"minQuantity\": 2,\n    \"tracked\":true,\n    \"serializable\":true\n\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("POST", "https://apis.synchroteam.com/Api/v2/Part/Send");

req.headers({
  "cache-control": "no-cache",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
  "content-type": "application/json",
  "accept": "text/json"
});

req.type("json");
req.send({
  "name": "Angle inter. H50 White",
  "price": 7.35,
  "categoryName": "Electricity",
  "reference": "LEG10602",
  "taxId": 5,
  "minQuantity": 2,
  "tracked": true,
  "serializable": true
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});


require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Part/Send")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["cache-control"] = 'no-cache'
request.body = "{\n   \"name\":\"Angle inter. H50 White\",\n   \"price\":7.35,\n   \"categoryName\":\"Electricity\",\n   \"reference\":\"LEG10602\",\n   \"taxId\":5,\n    \"minQuantity\": 2,\n    \"tracked\":true,\n    \"serializable\":true\n\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://apis.synchroteam.com/Api/v2/Part/Send")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("cache-control", "no-cache")
  .body("{\n   \"name\":\"Angle inter. H50 White\",\n   \"price\":7.35,\n   \"categoryName\":\"Electricity\",\n   \"reference\":\"LEG10602\",\n   \"taxId\":5,\n    \"minQuantity\": 2,\n    \"tracked\":true,\n    \"serializable\":true\n\n}")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Part/Send");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddParameter("application/json", "{\n   \"name\":\"Angle inter. H50 White\",\n   \"price\":7.35,\n   \"categoryName\":\"Electricity\",\n   \"reference\":\"LEG10602\",\n   \"taxId\":5,\n    \"minQuantity\": 2,\n    \"tracked\":true,\n    \"serializable\":true\n\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned

{
  "code": 35958
}

HTTP Request

POST /Api/v2/Part/Send

Request Body

Part information in JSON or XML format, if the id or reference exists, the part will be updated, if not the part will be created.

Response Body

The response contains the id of the part that was either created or updated by this action. This value is in the code field of the response.

DELETE Part

curl --request DELETE \
  --url 'https://apis.synchroteam.com/Api/v2/Part/Delete?id=35958' \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' 
import requests

url = "https://apis.synchroteam.com/Api/v2/Part/Delete"

querystring = {"id":"35958"}

payload = ""
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("DELETE", url, data=payload, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Part/Delete?id=35958",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("DELETE", "https://apis.synchroteam.com/Api/v2/Part/Delete");

req.query({
  "id": "35958"
});

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Part/Delete?id=35958")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.delete("https://apis.synchroteam.com/Api/v2/Part/Delete?id=35958")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Part/Delete?id=35958");
var request = new RestRequest(Method.DELETE);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
IRestResponse response = client.Execute(request);

JSON Returned

{
  "code":1
}

HTTP Request

DELETE /Api/v2/Part/Delete

Query Parameters

Parameter Default Description
{paramType} string Parameter name. Accepts reference or id
{paramValue} string The reference or id of the part

Request body

none

Response body

The number of deleted parts.

UPDATE Parts Pricing

PUT Body

[
    {
        "reference": "p11",
        "price":"10,25"
    },
    {
        "id": 35959,
        "price":"70,25"
    },
    {
        "id": 35919,
        "price":"-100,25"
    },
    {
        "id": 359112519,
        "price":"540,25"
    }
]

Sample Code

curl --request PUT \
  --url https://apis.synchroteam.com/Api/v2/Part/Prices \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '[\r\n    {\r\n        "reference": "p11",\r\n        "price":"10,25"\r\n    },\r\n    {\r\n        "id": 35959,\r\n        "price":"70,25"\r\n    },\r\n    {\r\n        "id": 35919,\r\n        "price":"-100,25"\r\n    },\r\n    {\r\n        "id": 359112519,\r\n        "price":"540,25"\r\n    }    \r\n]'
import requests

url = "https://apis.synchroteam.com/Api/v2/Part/Prices"

payload = "[\r\n    {\r\n        \"reference\": \"p11\",\r\n        \"price\":\"10,25\"\r\n    },\r\n    {\r\n        \"id\": 35959,\r\n        \"price\":\"70,25\"\r\n    },\r\n    {\r\n        \"id\": 35919,\r\n        \"price\":\"-100,25\"\r\n    },\r\n    {\r\n        \"id\": 359112519,\r\n        \"price\":\"540,25\"\r\n    }    \r\n]"
headers = {
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'accept': "text/json",
    'content-type': "application/json",
    'cache-control': "no-cache"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Part/Prices",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "[\r\n    {\r\n        \"reference\": \"p11\",\r\n        \"price\":\"10,25\"\r\n    },\r\n    {\r\n        \"id\": 35959,\r\n        \"price\":\"70,25\"\r\n    },\r\n    {\r\n        \"id\": 35919,\r\n        \"price\":\"-100,25\"\r\n    },\r\n    {\r\n        \"id\": 359112519,\r\n        \"price\":\"540,25\"\r\n    }    \r\n]",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("PUT", "https://apis.synchroteam.com/Api/v2/Part/Prices");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/json",
  "accept": "text/json",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
});

req.type("json");
req.send([
  {
    "reference": "p11",
    "price": "10,25"
  },
  {
    "id": 35959,
    "price": "70,25"
  },
  {
    "id": 35919,
    "price": "-100,25"
  },
  {
    "id": 359112519,
    "price": "540,25"
  }
]);

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Part/Prices")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "[\r\n    {\r\n        \"reference\": \"p11\",\r\n        \"price\":\"10,25\"\r\n    },\r\n    {\r\n        \"id\": 35959,\r\n        \"price\":\"70,25\"\r\n    },\r\n    {\r\n        \"id\": 35919,\r\n        \"price\":\"-100,25\"\r\n    },\r\n    {\r\n        \"id\": 359112519,\r\n        \"price\":\"540,25\"\r\n    }    \r\n]"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.put("https://apis.synchroteam.com/Api/v2/Part/Prices")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .body("[\r\n    {\r\n        \"reference\": \"p11\",\r\n        \"price\":\"10,25\"\r\n    },\r\n    {\r\n        \"id\": 35959,\r\n        \"price\":\"70,25\"\r\n    },\r\n    {\r\n        \"id\": 35919,\r\n        \"price\":\"-100,25\"\r\n    },\r\n    {\r\n        \"id\": 359112519,\r\n        \"price\":\"540,25\"\r\n    }    \r\n]")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Part/Prices");
var request = new RestRequest(Method.PUT);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddParameter("application/json", "[\r\n    {\r\n        \"reference\": \"p11\",\r\n        \"price\":\"10,25\"\r\n    },\r\n    {\r\n        \"id\": 35959,\r\n        \"price\":\"70,25\"\r\n    },\r\n    {\r\n        \"id\": 35919,\r\n        \"price\":\"-100,25\"\r\n    },\r\n    {\r\n        \"id\": 359112519,\r\n        \"price\":\"540,25\"\r\n    }    \r\n]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned

{
  "code": 0,
  "errors": [
    {
      "id": "35919",
      "price": "-100,25",
      "reference": null
    },
    {
      "id": "359112519",
      "price": "540,25",
      "reference": null
    }
  ]
}

HTTP Request

PUT /Api/v2/Part/Prices

Request Body

Set of id or reference paired with the new price, in JSON or XML format.

Response Body

1 if all parts have been updated. 0 if any part was not updated - the part(s) concerned show up in the error field.

GET Part Detail

curl --request GET \
  --url 'https://apis.synchroteam.com/Api/v2/Part/Details?reference=458' \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
import requests

url = "https://apis.synchroteam.com/Api/v2/Part/Details"

querystring = {"reference":"458"}

headers = {
    'accept': "text/json",
    'content-type': "application/json",
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/Part/Details?reference=458",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("GET", "https://apis.synchroteam.com/Api/v2/Part/Details");

req.query({
  "reference": "458"
});

req.headers({
  "cache-control": "no-cache",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
  "content-type": "application/json",
  "accept": "text/json"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/Part/Details?reference=458")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://apis.synchroteam.com/Api/v2/Part/Details?reference=458")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/Part/Details?reference=458");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
IRestResponse response = client.Execute(request);

JSON Returned

{
  "categoryId": 1532,
  "categoryName": "software",
  "id": 35918,
  "name": "Antivirus",
  "price": "10",
  "reference": "458",
  "taxId": 37,
  "taxVal": "14"
}

HTTP Request

GET /Api/v2/Part/Details

Query Parameters

Parameter Default Description
{paramType} string Parameter name. Accepts reference or id
{paramValue} string The reference or the id of the part

Request body

none

Response body

A description of a part

Users

An user is represented by the following fields

Field Type Description
id integer ID of the user (read only)
firstName string First name of the user
lastName string Last name of the user
login string Login of the user account
password string Password of the user account
language string Code of the language of the user, possible value: EN,FR,ES,RO,CZ.
email string User email adresse
phone string User phone number.
profile string The profile of the user, possible values : technician, administrator, manager
customFieldValues list List of custom field values for this user. (optional)
skilledTrades list of string List of skilled for this user. (optional)
groups list of string List of groups for this user

GET User Detail

curl --request GET \
  --url 'https://apis.synchroteam.com/Api/v2/User/Details?id=54022' \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' 
import requests

url = "https://apis.synchroteam.com/Api/v2/User/Details"

querystring = {"id":"54022"}

headers = {
    'accept': "text/json",
    'content-type': "application/json",
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/User/Details?id=54022",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("GET", "https://apis.synchroteam.com/Api/v2/User/Details");

req.query({
  "id": "54022"
});

req.headers({
  "cache-control": "no-cache",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
  "content-type": "application/json",
  "accept": "text/json"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});


require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/User/Details?id=54022")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://apis.synchroteam.com/Api/v2/User/Details?id=54022")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("cache-control", "no-cache")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/User/Details?id=54022");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
IRestResponse response = client.Execute(request);

JSON Returned

{
    "id": 54022,
    "firstName": "John",
    "lastName": "Doe",
    "login": "login_user",
    "phone": "(719) 388-1966",
    "profile": "technician",
    "email": "djohn@gmail.com",
    "language": "EN",
    "groups": [
        "group1",
        "group5"
    ],
    "skilledTrades": [
        "plumber",
        "electrician"
    ],
    "CustomFieldValues": [customfieldvalue1,...]
}

HTTP Request

GET /Api/v2/User/Details

Query Parameters

Parameter Default Description
{paramType} string Parameter name. Accepts login or id
{paramValue} string The login or the id of the user

Request body

none

Response body

A Description of the User asked for.

SEARCH User

POST Body

{
    "group":{
        "id":"",
        "name":"group1"
    },
    "skilledTrades":"plumber"
}

Sample Code

curl --request POST \
curl --request POST \
  --url https://apis.synchroteam.com/Api/v2/User/Search \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{\n    "group":{\n        "id":"",\n        "name":"group1"\n    },\n    "skilledTrades":"plumber"\n}'
import requests

url = "https://apis.synchroteam.com/Api/v2/User/Search"

payload = "{\n    \"group\":{\n        \"id\":\"\",\n        \"name\":\"group1\"\n    },\n    \"skilledTrades\":\"plumber\"\n}"
headers = {
    'accept': "text/json",
    'content-type': "application/json",
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/User/Search",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n    \"group\":{\n        \"id\":\"\",\n        \"name\":\"group1\"\n    },\n    \"skilledTrades\":\"plumber\"\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("POST", "https://apis.synchroteam.com/Api/v2/User/Search");

req.headers({
  "cache-control": "no-cache",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
  "content-type": "application/json",
  "accept": "text/json"
});

req.type("json");
req.send({
  "group": {
    "id": "",
    "name": "group1"
  },
  "skilledTrades": "plumber"
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});


require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/User/Search")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["cache-control"] = 'no-cache'
request.body = "{\n    \"group\":{\n        \"id\":\"\",\n        \"name\":\"group1\"\n    },\n    \"skilledTrades\":\"plumber\"\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://apis.synchroteam.com/Api/v2/User/Search")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("cache-control", "no-cache")
  .body("{\n    \"group\":{\n        \"id\":\"\",\n        \"name\":\"group1\"\n    },\n    \"skilledTrades\":\"plumber\"\n}")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/User/Search");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddParameter("application/json", "{\n    \"group\":{\n        \"id\":\"\",\n        \"name\":\"group1\"\n    },\n    \"skilledTrades\":\"plumber\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned

[
    {
        "id": 266,
        "login": "login_user12"
    },
    {
        "id": 53993,
        "login": "login_user87"
    },
    {
        "id": 2658,
        "login": "login_user1985"
    }
]

HTTP Request

POST /Api/v2/User/Search

Query Parameters

None

Request body

Available Filters:

Filter Type Description
group object the id or name of the group
skilledTrades string the skilled name

Response body

A list of id and login for the users found.

SEND User

Create or update the User

POST Body

{
    "firstName": "John",
    "lastName": "Doe",
    "login": "login_user",
    "phone": "(719) 388-1966",
    "profile": "technician",
    "email": "djohn@gmail.com",
    "language": "EN",
    "password": "123456",
    "CustomFieldValues": [
        {
            "Name": "Sector",
            "Value": "OD 89874 sector"
        },
        {
            "Value": "1547-PO",
            "id": 88
        }
    ],
    "groups":["group5","group87"],
    "skilledTrades": [
        "plumber","electrician"
    ]
}

Sample Code

curl --request POST \
  --url https://apis.synchroteam.com/Api/v2/User/Send \
  --header 'accept: text/json' \
  --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{\n    "firstName": "John",\n "lastName": "Doe",\n    "login": "login_user",\n    "phone": "(719) 388-1966",\n    "profile": "technician",\n    "email": "djohn@gmail.com",\n    "language": "EN",\n    "password": "123456",\n    "CustomFieldValues": [\n        {\n            "Name": "Sector",\n            "Value": "OD 89874 sector"\n        },\n        {\n            "Value": "1547-PO",\n            "id": 88\n        }\n    ],\n    "groups":["group5","group87"],\n    "skilledTrades": [\n        "plumber","electrician"\n    ]\n}'
import requests

url = "https://apis.synchroteam.com/Api/v2/User/Send"

payload = "{\n    \"firstName\": \"John\",\n\t\"lastName\": \"Doe\",\n    \"login\": \"login_user\",\n    \"phone\": \"(719) 388-1966\",\n    \"profile\": \"technician\",\n    \"email\": \"djohn@gmail.com\",\n    \"language\": \"EN\",\n    \"password\": \"123456\",\n    \"CustomFieldValues\": [\n        {\n            \"Name\": \"Sector\",\n            \"Value\": \"OD 89874 sector\"\n        },\n        {\n            \"Value\": \"1547-PO\",\n            \"id\": 88\n        }\n    ],\n    \"groups\":[\"group5\",\"group87\"],\n    \"skilledTrades\": [\n        \"plumber\",\"electrician\"\n    ]\n}"
headers = {
    'accept': "text/json",
    'content-type': "application/json",
    'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://apis.synchroteam.com/Api/v2/User/Send",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n    \"firstName\": \"John\",\n\t\"lastName\": \"Doe\",\n    \"login\": \"login_user\",\n    \"phone\": \"(719) 388-1966\",\n    \"profile\": \"technician\",\n    \"email\": \"djohn@gmail.com\",\n    \"language\": \"EN\",\n    \"password\": \"123456\",\n    \"CustomFieldValues\": [\n        {\n            \"Name\": \"Sector\",\n            \"Value\": \"OD 89874 sector\"\n        },\n        {\n            \"Value\": \"1547-PO\",\n            \"id\": 88\n        }\n    ],\n    \"groups\":[\"group5\",\"group87\"],\n    \"skilledTrades\": [\n        \"plumber\",\"electrician\"\n    ]\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: text/json",
    "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
var unirest = require("unirest");

var req = unirest("POST", "https://apis.synchroteam.com/Api/v2/User/Send");

req.headers({
  "cache-control": "no-cache",
  "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
  "content-type": "application/json",
  "accept": "text/json"
});

req.type("json");
req.send({
  "firstName": "John",
  "lastName": "Doe",
  "login": "login_user",
  "phone": "(719) 388-1966",
  "profile": "technician",
  "email": "djohn@gmail.com",
  "language": "EN",
  "password": "123456",
  "CustomFieldValues": [
    {
      "Name": "Sector",
      "Value": "OD 89874 sector"
    },
    {
      "Value": "1547-PO",
      "id": 88
    }
  ],
  "groups": [
    "group5",
    "group87"
  ],
  "skilledTrades": [
    "plumber",
    "electrician"
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

require 'uri'
require 'net/http'

url = URI("https://apis.synchroteam.com/Api/v2/User/Send")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["accept"] = 'text/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
request["cache-control"] = 'no-cache'
request.body = "{\n    \"firstName\": \"John\",\n\t\"lastName\": \"Doe\",\n    \"login\": \"login_user\",\n    \"phone\": \"(719) 388-1966\",\n    \"profile\": \"technician\",\n    \"email\": \"djohn@gmail.com\",\n    \"language\": \"EN\",\n    \"password\": \"123456\",\n    \"CustomFieldValues\": [\n        {\n            \"Name\": \"Sector\",\n            \"Value\": \"OD 89874 sector\"\n        },\n        {\n            \"Value\": \"1547-PO\",\n            \"id\": 88\n        }\n    ],\n    \"groups\":[\"group5\",\"group87\"],\n    \"skilledTrades\": [\n        \"plumber\",\"electrician\"\n    ]\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://apis.synchroteam.com/Api/v2/User/Send")
  .header("accept", "text/json")
  .header("content-type", "application/json")
  .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
  .header("cache-control", "no-cache")
  .body("{\n    \"firstName\": \"John\",\n\t\"lastName\": \"Doe\",\n    \"login\": \"login_user\",\n    \"phone\": \"(719) 388-1966\",\n    \"profile\": \"technician\",\n    \"email\": \"djohn@gmail.com\",\n    \"language\": \"EN\",\n    \"password\": \"123456\",\n    \"CustomFieldValues\": [\n        {\n            \"Name\": \"Sector\",\n            \"Value\": \"OD 89874 sector\"\n        },\n        {\n            \"Value\": \"1547-PO\",\n            \"id\": 88\n        }\n    ],\n    \"groups\":[\"group5\",\"group87\"],\n    \"skilledTrades\": [\n        \"plumber\",\"electrician\"\n    ]\n}")
  .asString();
var client = new RestClient("https://apis.synchroteam.com/Api/v2/User/Send");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
request.AddHeader("content-type", "application/json");
request.AddHeader("accept", "text/json");
request.AddParameter("application/json", "{\n    \"firstName\": \"John\",\n\t\"lastName\": \"Doe\",\n    \"login\": \"login_user\",\n    \"phone\": \"(719) 388-1966\",\n    \"profile\": \"technician\",\n    \"email\": \"djohn@gmail.com\",\n    \"language\": \"EN\",\n    \"password\": \"123456\",\n    \"CustomFieldValues\": [\n        {\n            \"Name\": \"Sector\",\n            \"Value\": \"OD 89874 sector\"\n        },\n        {\n            \"Value\": \"1547-PO\",\n            \"id\": 88\n        }\n    ],\n    \"groups\":[\"group5\",\"group87\"],\n    \"skilledTrades\": [\n        \"plumber\",\"electrician\"\n    ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

JSON Returned

{
    "code": 54023,
    "message": ""
}

HTTP Request

POST /Api/v2/User/Send

Request Body

User information in JSON or XML format, if id or login exist, the user will be updated, if not the user will be created.

Response Body

The response contains id for the user created or updated by this action. This value is in the code field of the response.

If there is an error, a message is returned in the message field.

Errors

The Synchroteam API uses the following error codes:

Error Code Meaning
400 Bad Request – You have an error in your request
401 Unauthorized – Your API key is wrong
403 Forbidden – The resource you are trying to access is Forbidden
404 Not Found – The API endpoint you are trying to access was not found
405 Method Not Allowed – You tried to access a kitten with an invalid method
406 Not Acceptable – You requested a format that isn’t JSON or XML
429 Too Many Requests – You’ve hit our API rate limits
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarially offline for maintenance. Please try again later.