NAV
cURL Python PHP Node Ruby Java C#
  • Synchroteam API v3
  • Authentication
  • Pagination
  • Rate Limits and Quotas
  • Errors
  • Resources
  • Activities
  • Activity types
  • Custom fields
  • Custom field values
  • Customers
  • Sites
  • Equipment
  • Jobs
  • Job Scheduling Preferences
  • Job Scheduling Windows
  • Job Types
  • Job Reports
  • Report Templates
  • Blocks
  • Recurrences
  • Positions
  • Users
  • Teams
  • Tax Rates
  • Attachments
  • Parts and Services
  • Invoices
  • Quotations
  • Credit Notes
  • Inventory Management
  • Part Movements
  • Part Requests
  • Stock Depots
  • Stock Parts
  • Messages
  • Synchroteam API v3

    Introduction

    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 solutions 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 applications.

    Endpoint URL

    Type Description
    Endpoint https://ws.synchroteam.com
    Protocol HTTPS (TLS 1.2+)

    Data Format

    By Default, JSON is returned by all API responses, including errors.

    For the data format to be visible in your API calls, you can manipulate the HTTP request headers to explicitly tell the Synchroteam API you are using JSON :

    JSON (Default)

    To exchange data in JSON you need to add the following HTTP headers:

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

    HTTP VERBS

    The Synchroteam API used standard HTTP verbs to support CRUD (Create, Read, Update, Delete) operations:

    Verb Operation
    POST creating OR updating records
    GET reading
    PUT updating object properties
    DELETE delete

    Authentication

    To authorize, use this code:

    curl --request GET \
      --url https://ws.synchroteam.com/Api/v3 \
      --header 'authorization: Basic bXljb21wYW55OmZmOGU1YjYzLTBlNzQtNDEwMi1iYTkzLWM4MjlhY2ZiNThmMw==' \
      --header 'cache-control: no-cache'
    
    import requests
    
    url = "https://ws.synchroteam.com/Api/v3/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://ws.synchroteam.com/Api/v3/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://ws.synchroteam.com/Api/v3/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://ws.synchroteam.com/Api/v3/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://ws.synchroteam.com/Api/v3/api_endpoint_here")
      .header("authorization", "Basic bXljb21wYW55OmZmOGU1YjYzLTBlNzQtNDEwMi1iYTkzLWM4MjlhY2ZiNThmMw==")
      .header("cache-control", "no-cache")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/Api/v3/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

    Pagination

    The Synchroteam API uses pagination for all endpoints that support bulk fetches via list API methods.

    Query Parameters

    Sample Request

    GET https://ws.synchroteam.com/v3/job/list?page=3&pageSize=25
    

    Pagination is controlled via page and pageSize query parameters applied to resources that support bulk fetches. If unspecified, the default values below are used:

    Parameter Default Description
    page 1 The page number (pagination starts at 1)
    pageSize 25 Maximum allowed pageSize is 100

    Response Properties

    Sample API response with pagination

    {
        "request":"list",
        "object":"job",
        "page":3,
        "pageSize":25,
        "records":25,
        "recordsTotal":452,
        "data":[
          {<job object>},
          {<job object>},
          ...
          {<job object>}
        ]
    }
    
    

    These methods will return page, pageSize, records, recordsTotal

    Parameter Description
    page page number returned
    pageSize page size requested
    records number of records returned
    recordsTotal total number or records available

    Rate Limits and Quotas

    The Synchroteam API applies Rate Limiting (per minute) and a Request Quota (per day). Usage rates are tracked per API Access Token.

    Rate Limits

    Sample HTTP Headers Returned

    X-RateLimit-Limit: 120
    X-RateLimit-Remaining: 54
    X-RateLimit-Reset: 1530199810
    X-Quota-Limit: 10000
    X-Quota-Remaining: 9452
    

    Request are throttled at a maximum rate of 120 requests every minute.

    Your current rate limit information is provided in the response headers of every request.

    Header Description
    X-RateLimit-Limit Maximum number of requests allowed in the current window
    X-RateLimit-Remaining Number of requests remaining in the current window
    X-RateLimit-Reset A UTC Unix timestamp detailing when the rate limit will reset

    Daily Request Quota

    Each API key has a daily request quota. You current daily quota information is provided in the response headers of every request.

    Header Description
    X-Quota-Limit Number of requests allowed in the current day
    X-Quota-Remaining Number of requests remaining in the current day (resets at UTC midnight)

    Errors

    Sample error reponse format

    REQUEST:
    GET https://ws.synchroteam.com/v3/job/list?page=3&pageSize=25
    
    RESPONSE:
    HTTP/1.0 429 Too Many Requests
    (...)
    Content-Type: application/json; charset=utf-8
    X-RateLimit-Limit: 120
    X-RateLimit-Remaining: 120
    X-RateLimit-Reset: 1530199810
    X-Quota-Limit: 10000
    X-Quota-Remaining: 0
    
    RESPONSE BODY:
    {
        "error":"Too Many Requests",
        "message":"You have gone above your daily quota"
    }
    

    When errors are encountered, the Synchroteam API uses and standard HTTP response code along with a standard error response format

    HTTP status code summary:

    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 requested resource does not exist
    405 Method Not Allowed -- You tried to access an object with an invalid method
    406 Not Acceptable -- You requested a format that isn't JSON
    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 temporarily offline for maintenance. Please try again later.

    Reponse Body Properties:

    Property Meaning
    error Short error description
    message Detailed error message

    Resources

    Activities

    The activity object

    JSON Representation

    {
      "id":5697,
      "activityType":{
        "id":596,
        "name":"Standard Travel",
        "category":"travel",
        "payable":true
      },
      "note":"Hey this is a sample note!",
      "dateStart":"2018-01-01 14:22",
      "dateEnd":"2018-01-01 14:50",
      "distance":{
        "km":10.50,
        "mi":6.52
      },
      "user": {
        "id":54022,
        "login":"login_user",
        "firstName":"John",
        "lastName":"Doe"
      },
      "team": null
    }
    

    Activities are data elements in Synchroteam that can be used to declare:

    An activity is represented by the following fields

    Field Type Description
    id integer Activity id (read only)
    activityType object Simplified Activity Type object, containing, the id, name, category and payable flag.
    note string Note for the activity
    dateStart dateTime Activity start date and time (Local time, ISO 8601 Representation : YYYY-MM-DD hh:mm)
    dateEnd dateTime Activity end date and time (Local time, ISO 8601 Representation : YYYY-MM-DD hh:mm)
    distance object Distance object provinding distance data in kilometers (km) and miles (mi). Used for travel activities.
    user object Simplified user object, containing the id, login, firstName and lastName of the user
    team object Simplified team object, containing the id and name of the team - used only for unavailabilities.

    Retrieve an activity

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/activity/details?id=5697' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/activity/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://ws.synchroteam.com/api/v3/activity/details?id=5967",
      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://ws.synchroteam.com/api/v3/activity/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://ws.synchroteam.com/api/v3/activity/details?id=5967")
    
    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://ws.synchroteam.com/api/v3/activity/details?id=5967")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/activity/details?id=5967");
    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);
    

    Example Response (Here, an unavailability assigned to an entire team)

    {
      "id":5697,
      "activityType":{
        "id":596,
        "name":"Parties",
        "category":"unavail",
        "payable":false
      },
      "note":"Everyone can attend!",
      "dateStart":"2018-01-01 14:00",
      "dateEnd":"2018-01-01 17:00",
      "distance": null
      "user": null
      "team": {
        "id": 476,
        "name": "East Team"
      }
    }
    

    HTTP Request

    GET /api/v3/activity/details?{paramType}={paramValue}

    Query Parameters

    Parameter Default Description
    {paramType} string Parameter name. Accepts id
    {paramValue} string id of the activity

    Request body

    none

    Response body

    Returns the activity if found.

    If the activity is not found a 404 Error is returned.

    Create/Update an activity

    Synchroteam provides a single endpoint to handle creating or updating activities. The API determines if the activity record already exists by checking the value provided for id.

    POST Body

    {
      "activityType":{
        "id":596
      },
      "note":"Hey this is a sample note!",
      "dateStart":"2018-01-01 14:22",
      "dateEnd":"2018-01-01 14:50",
      "distance":{
        "km":10.50,
        "mi":6.52
      },
      "user": {
        "id":54022
      },
      "team": null
    }
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/activity/send \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{\r\n  "activityType":{"id":596},\r\n  "note": "Hey, this is a sample note!" (...)'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/activity/send"
    
    payload = "{\r\n  \"activityType\":{\"id\":596},\r\n  \"note\": \"Hey, this is a sample note!\" (...)}"
    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://ws.synchroteam.com/api/v3/activity/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  \"activityType\":{\"id\":596},\r\n  \"note\": \"Hey, this is a sample note!\" (...)}",
      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://ws.synchroteam.com/api/v3/activity/send");
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
      "activityType": {"id":596},
      "note": "Hey, this is a sample note!", (...)
    });
    
    req.end(function (res) {
      if (res.error) throw new Error(res.error);
    
      console.log(res.body);
    });
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://ws.synchroteam.com/api/v3/activity/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  \"activityType\":{\"id\":596},\r\n  \"note\": \"Hey, this is a sample note!\", (...)}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/activity/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  \"activityType\":{\"id\":596},\r\n  \"note\": \"Hey, this is a sample note!\", (...)")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/activity/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  \"activityType\":{\"id\":596},\r\n  \"note\": \"Hey, this is a sample note!\", (...)}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
      "id":5697,
      "activityType":{
        "id":596,
        "name":"Standard Travel",
        "category":"travel",
        "payable":true
      },
      "note":"Hey this is a sample note!",
      "dateStart":"2018-01-01 14:22",
      "dateEnd":"2018-01-01 14:50",
      "distance":{
        "km":10.50,
        "mi":6.52
      },
      "user": {
        "id":54022,
        "login":"login_user",
        "firstName":"John",
        "lastName":"Doe"
      },
      "team": null
    }
    

    HTTP Request

    POST /api/v3/activity/send

    Request Body

    Activity information in JSON format, if the id exists, the activity will be updated, if not the activity will be created.

    When updating an activity, if you provide a partial payload, only the fields provided will be updated. Fields not provided will not be deleted .

    Required Fields For Creation

    Response Body

    The response contains the updated activity record, with the id field specified.

    If an error occured, a standard error payload will be returned.

    Delete an activity

    curl --request DELETE \
      --url 'https://ws.synchroteam.com/api/v3/activity/delete?id=8976' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/activity/delete"
    
    querystring = {"id":"8976"}
    
    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://ws.synchroteam.com/api/v3/activity/delete?id=8976",
      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://ws.synchroteam.com/api/v3/activity/delete");
    
    req.query({
      "id": "8976"
    });
    
    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://ws.synchroteam.com/api/v3/activity/delete?id=8976")
    
    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://ws.synchroteam.com/api/v3/activity/delete?id=8976")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/activity/delete?id=8976");
    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

    [
      {
        "id":8976
        "deleted":true
      }
    ]
    

    HTTP Request

    DELETE /api/v3/activity/delete

    Query Parameters

    Parameter Default Description
    {paramType} string Parameter name. Accepts id
    {paramValue} string id of the activity

    Request body

    none

    Response body

    Returns a list containing a single object with a deleted parameter set to true on success, and the activity ID. If no activity is found, a 404 error is returned.

    List activities

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/activity/list?team_id=476 \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/activity/list?team_id=476"
    
    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://ws.synchroteam.com/api/v3/activity/list?team_id=476",
      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://ws.synchroteam.com/api/v3/activity/list?team_id=476");
    
    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://ws.synchroteam.com/api/v3/activity/list?team_id=476")
    
    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://ws.synchroteam.com/api/v3/activity/list?team_id=476")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/activity/list?team_id=476");
    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);
    

    Example Response

    {
      "page":1,
      "pageSize":25,
      "records":6,
      "recordsTotal":6,
      "data":[
        {<activity object>},
        {<activity object>},
        ...
        {<activity object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/activity/list

    Query Parameters

    Parameter Type Description
    startDate dateTime Activity start date and time (yyyy-mm-dd hh:mm) (requires endDate)
    endDate dateTime Activity end date and time (yyyy-mm-dd hh:mm) (requires startDate)
    activityType_name string Performs an exact name search
    activityType_category string one of "unavailability", "atwork", "travel" or "clock"
    user_id integer return activities belonging to a user by user id
    user_login integer return activities belonging to a user by user login
    team_id integer return activities belonging to a team by team id
    sort string sort order, takes one of four values: startDate, endDate, activityType_name and user_login (Optional. Default is startDate)
    sortOrder string takes one of two values: ascending or descending (Optional. Default is ascending)

    Add pagination parameters if needed.

    Response body

    A list of activities found.

    If none are found, an empty list is returned.

    NB: Multiple filters are cumulative.

    Activity types

    The activity type object

    {
      "id":596,
      "name":"Standard Travel",
      "category":"travel",
      "color":"DDEEDD"
      "payable":true
    }
    

    Activity types are set and controlled via the Synchroteam Web based back office, and can fall in one of four categories:

    Do note that certain types ("travel" and "clock") only apply when the Time Tracking option is activated on your account.

    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
    category string One of "unavail", "atwork", "travel" or "clock"
    color string Color of the activity type (RGB, Hexadecimal format)
    payable boolean indicated whether or not time logged for this activity type is payable to the technician

    List activity types

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/activityType/list?category=unavail \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/activityType/list?category=unavail"
    
    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://ws.synchroteam.com/api/v3/activityType/list?category=unavail",
      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://ws.synchroteam.com/api/v3/activityType/list?category=unavail");
    
    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://ws.synchroteam.com/api/v3/activityType/list?category=unavail")
    
    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://ws.synchroteam.com/api/v3/activityType/list?category=unavail")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/activityType/list?category=unavail");
    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);
    

    Example Response

    {
      "page":1,
      "pageSize":25,
      "records":6,
      "recordsTotal":6,
      "data":[
        {<activity type object>},
        {<activity type object>},
        ...
        {<activity type object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/activityType/list

    Query Parameters

    Parameter Type Description
    {category} string One of "unavail", "atwork", "travel" or "clock"
    {name} string Will find all activity types containing name
    {sort} string sort order, takes one of two values: name or category (Optional. Default is name)
    {sortOrder} string takes one of two values: ascending or descending (Optional. Default is ascending)

    Response body

    A list of activity types found.

    If none are found, an empty list is returned.

    NB: Multiple filters are cumulative.

    Custom fields

    The custom field object

    JSON Representation

    {
      "id":"2",
      "label":"Equipment Serial Number",
      "type":"text",
      "private":false,
      "mandatory":true,
      "order":1
    }
    

    There can be any number of custom fields values associated with jobs, users, customers, sites, equipment. Custom fields consist of the following fields :

    Field Type Description
    id integer ID of the custom field (read only)
    label string Name of the custom field.
    type string Custom field type (text, select, date, number, checkbox, autocomplete, email or phone)
    private boolean Specifies whether or not the custom field is visible to customers
    mandatory boolean set to true if the current custom field is mandatory
    order int display order

    Custom fields are configured via the web based back office.

    Types are as follows:

    List Custom Fields

    List Custom Fields by object type (Job, Customer, Site, Equipment or User)

    Sample Code

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/customfield/list?type=customer \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/customfield/list?type=customer"
    
    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://ws.synchroteam.com/api/v3/customfield/list?type=customer",
      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://ws.synchroteam.com/api/v3/customfield/list?type=customer");
    
    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://ws.synchroteam.com/api/v3/customfield/list?type=customer")
    
    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://ws.synchroteam.com/api/v3/customfield/list?customer_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://ws.synchroteam.com/api/v3/customfield/list?type=customer");
    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);
    

    Example Response

    {
      "page":1,
      "pageSize":25,
      "records":4,
      "recordsTotal":4,
      "data":[
        {<customfield object>},
        {<customfield object>},
        ...
        {<customfield object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/customfield/list

    Query Parameters

    Parameter Type Description
    type string object type for which the custom field definition is returned, one of: job, customer, site, equipment or user (mandatory)
    sort string sort order, takes one of two values: label and order (Optional. Default is label)
    sortOrder string takes one of two values: ascending or descending (Optional. Default is ascending)

    Add pagination parameters if needed.

    Response Body

    A list of Custom Fields found.

    If none are found, an empty list is returned.

    Custom field values

    The custom field value object

    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)
    label string Name of the custom field.
    value string Value of the custom field for the associated object.
    {
      "id":"2",
      "label":"Equipment Serial Number",
      "value":"125FTD47842"
    }
    

    Customers

    The customer object

    JSON Representation

    {
        "id":35604,
        "myId":"sCustomer08",
        "name": "Sample Customer",
        "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
        "addressComplement": "United States",
        "addressCity": "Falls Church",
        "addressCountry": "United States",
        "addressProvince": "Virginia",
        "addressStreet": "6605 Fisher Avenue",
        "addressZIP": "22046",
        "contactEmail": "customer@synchroteam.com",
        "contactFirstName": "John",
        "contactFax": "(719) 388-1967",
        "contactPhone":"(719) 388-1966",
        "contactLastName": "Doe",
        "vatNumber":"34567-87695-345867",
        "publicLink":"https://yourdomain.synchroteam.com/Customer/....",
        "customFieldValues": [
            {
                "id":4658
                "label": "Zone",
                "value": "B4"
            },
            {
                "id": 94057
                "label": "Status"
                "value": "Silver",
            }
        ],
        "position":{
            longitude: "74.0060"
            latitude: "40.7128"
        },
        "tags" : ["plumber","restaurant","test"]
    }
    

    The customer object is represented by the following fields

    Field Type Description
    id integer Customer id (read only system ID)
    name string Customer name
    myId string Custom customer ID (e.g. can reference your internal customer ID)
    address string Complete Address
    addressStreet string Street address of the customer
    addressComplement string Complementary street address information
    addressZIP string Address zip code
    addressCity string Address city
    addressProvince string Address province/state
    addressCountry string Address country
    contactLastName 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
    vatNumber string VAT (or other service tax) number
    publicLink string Link you can share with your customer create/access jobs, invoices, etc. (read only)
    customFieldValues list List of custom field values for this customer. (optional)
    position position Position object associated with the customer. (optional)
    tags list(string) List of tags for the customer. (read only)

    Retrieve a customer

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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);
    

    Example Response

    {
        "id":35604,
        "myId":"sCustomer08",
        "name": "Sample Customer",
        "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
        "addressComplement": "United States",
        "addressCity": "Falls Church",
        "addressCountry": "United States",
        "addressProvince": "Virginia",
        "addressStreet": "6605 Fisher Avenue",
        "addressZIP": "22046",
        "contactEmail": "customer@synchroteam.com",
        "contactFirstName": "John",
        "contactFax": "(719) 388-1967",
        "contactPhone":"(719) 388-1966",
        "contactLastName": "Doe",
        "vatNumber":"34567-87695-345867",
        "publicLink":"https://yourdomain.synchroteam.com/Customer/....",
        "customFieldValues":[customfieldvalue1,...],
        "position":{Position},
        "tags" : ["plumber","restaurant","test"]
    }
    

    HTTP Request

    GET /api/v3/customer/details?{paramType}={paramValue}

    Query Parameters

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

    Request body

    none

    Response body

    Returns the customer if found.

    If the customer is not found a 404 Error is returned.

    Create/Update a customer

    Synchroteam provides a single endpoint to handle creating or updating customer. The API determines if the customer record already exists by checking values provide for id and/or myid.

    POST Body

    {
      "myId":"sCustomer08",
        "name": "Sample Customer",
      "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
      "addressComplement": "Unit B",
      "contactEmail": "customer@synchroteam.com",
      "contactFirstName": "John",
      "contactFax": "(719) 388-2222",
      "contactPhone":"(719) 388-3333",
      "contactLastName": "Doe",
      "customFieldValues":[customfieldvalue1,...],
      "position":{Position},
      (...)
    }
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/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": "Unit B", (...)}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/customer/send"
    
    payload = "{\n  \"address\": \"6605 Fisher Avenue, Falls Church, VA 22046, United States\", (...)}"
    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://ws.synchroteam.com/api/v3/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\", (...)}",
      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://ws.synchroteam.com/api/v3/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": "Unit B",
      (...)
    });
    
    req.end(function (res) {
      if (res.error) throw new Error(res.error);
    
      console.log(res.body);
    });
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://ws.synchroteam.com/api/v3/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\", (...)}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/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\", (...)}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/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\", (...)}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
        "id":35604,
        "myId":"sCustomer08",
        "name": "Sample Customer",
        "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
        "addressComplement": "Unit B",
        "addressCity": "Falls Church",
        "addressCountry": "United States",
        "addressProvince": "Virginia",
        "addressStreet": "6605 Fisher Avenue",
        "addressZIP": "22046",
        "contactEmail": "customer@synchroteam.com",
        "contactFirstName": "John",
        "contactFax": "(719) 388-2222",
        "contactPhone":"(719) 388-3333",
        "contactLastName": "Doe",
        "vatNumber":"34567-87695-345867",
        "publicLink":"https://yourdomain.synchroteam.com/Customer/....",
        "customFieldValues": [
            {
                "id":4658
                "label": "Zone",
                "value": "B4"
            },
            {
                "id": 94057
                "label": "Status"
                "value": "Silver",
            }
        ],
        "position":{
            longitude: "74.0060"
            latitude: "40.7128"
        },
        "tags" : ["plumber","restaurant","test"]
    }
    

    HTTP Request

    POST /api/v3/customer/send

    Parameters

    None

    Request Body

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

    When updating a customer, if you provide a partial payload, only the fields provided will be updated. Fields not provided will not be deleted.

    Response Body

    The response contains the updated customer record, with the id field specified.

    If an error occured, a standard error payload will be returned.

    Delete a customer

    curl --request DELETE \
      --url 'https://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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

    [
        {
            "id":40946
            "deleted":true
        },
        (...)
    ]
    

    HTTP Request

    DELETE /api/v3/customer/delete?{paramType}={paramValue}

    Query Parameters

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

    Request body

    none

    Response body

    Returns a list of objects with a deleted parameter set to true on success, and the customer ID. If no customers are found, a 404 error is returned.

    The list will generally only contain a single response object. However, if you perform a 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.

    Undelete a customer

    curl --request POST \
      --url 'https://ws.synchroteam.com/api/v3/customer/undelete?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://ws.synchroteam.com/api/v3/customer/undelete"
    
    querystring = {"name":"HAMILTON ASSET MANAGEMENT"}
    
    payload = ""
    headers = {
        'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
        'accept': "text/json",
        'content-type': "application/json",
        'cache-control': "no-cache"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers, params=querystring)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://ws.synchroteam.com/api/v3/customer/undelete?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 => "POST",
      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("POST", "https://ws.synchroteam.com/api/v3/customer/undelete");
    
    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://ws.synchroteam.com/api/v3/customer/undelete?name=HAMILTON%20ASSET%20MANAGEMENT")
    
    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'
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/customer/undelete?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://ws.synchroteam.com/api/v3/customer/undelete?name=HAMILTON%20ASSET%20MANAGEMENT");
    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");
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
        "customersDeleted": [
            {
                "id": 2711750,
                "isDeleted": true
            }
        ]
    }
    

    HTTP Request

    POST /api/v3/customer/undelete?{paramType}={paramValue}

    Query Parameters

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

    Request body

    none

    Response body

    Returns a list of objects with a undeleted parameter set to true on success, and the customer ID. If no customers are found, a 404 error is returned.

    The list will generally only contain a single response object. However, if you perform a 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 undeleted.

    List customers

    List all customers. Search parameters can be provided.

    If no parameters are given, will return all active customers.

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/customer/list?changedFrom=2016-11-02+16:32:00' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/customer/list"
    
    querystring = {"changedFrom":"2016-11-02 16:32:00"}
    
    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://ws.synchroteam.com/api/v3/customer/list?changedFrom=2016-11-02+16:32:00",
      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://ws.synchroteam.com/api/v3/customer/list");
    
    req.query({
      "changedFrom": "2016-11-02 16:32:00"
    });
    
    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://ws.synchroteam.com/api/v3/customer/list?changedFrom=2016-11-02+16:32:00")
    
    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://ws.synchroteam.com/api/v3/customer/list?changedFrom=2016-11-02+16:32:00")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/customer/list?changedFrom=2016-11-02+16:32:00");
    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);
    

    Example Response

    {
        "page":3,
        "pageSize":25,
        "records":25,
        "recordsTotal":589,
        "data":[
            {<customer object>},
            {<customer object>},
            ...
            {<customer object>}
        ]
    }
    

    HTTP Request

    GET /api/v3/customer/list

    Query Parameters

    Parameter Type Description
    changedSince dateTime return customers modified after the UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    name string search by name - a wildcard search is performed
    email string search by contactEmail. An exact search is performed
    sort string sort order, takes one of three values: name, dateModified, dateCreated and myId (Optional. Default is name)
    sortOrder string takes one of two values: ascending or descending (Optional. Default is ascending)

    Add pagination parameters if needed.

    Response body

    A list of customers found.

    If none are found, an empty list is returned.

    NB: Multiple filters are cumulative.

    Sites

    The site object

    JSON Representation

    {
      "id":2811,
      "myId": "ref-2511",
      "name":"Sample Site",
      "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
      "addressComplement": "Unit 2",
      "addressCity": "Falls Church",
      "addressCountry": "United States",
      "addressProvince": "Virginia",
      "addressStreet": "6605 Fisher Avenue",
      "addressZIP": "22046",
      "contactEmail":"paul@hamilton.com",
      "contactFax":"(719) 388-1967",
      "contactMobile":"(719) 388-1969",
      "contactName":"Mr Paul",
      "contactPhone":"(877) 413-5903",
      "publicLink":"https://yourdomain.synchroteam.com/Site/....",
      "customer": {
        "id":35604,
        "myId":"sCustomer08",
        "name":"Sample Customer"
      },
      "customFieldValues": [
        {
          "id":4411
          "label": "Service Area",
          "value": "East"
        },
        {
          "id": 95261
          "label": "Status"
          "value": "Silver",
        }
      ],
      "position":{
        "longitude": "74.0060"
        "latitude": "40.7128"
      },
      "tags" : ["plumber","restaurant","test"]
    }
    

    A site is represented by the following fields

    Field Type Description
    id integer Site id (read only)
    myId string Your custom reference number for this site
    name string Name of the site
    address string Complete Address
    addressStreet string Street address of the site
    addressComplement string Complementary street address information
    addressZIP string Address zip code
    addressCity string Address city
    addressProvince string Address province/state
    addressCountry string Address country
    contactLastName 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.
    publicLink string Link you can share with your customer to create/access the site's jobs, invoices, etc. (read only)
    customer object Object containing id, name and myId customer fields (id or myId required when creating a site)
    customFieldValues list List of custom field values for your site. (optional)
    position position position associated with the site. (optional)
    tags list(string) List of tags for this site. (read only)

    Retrieve a site

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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);
    

    Example Response

    {
      "id":2811,
      "myId": "ref-2511",
      "name":"Sample Site",
      "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
      "addressComplement": "Unit 2",
      "addressCity": "Falls Church",
      "addressCountry": "United States",
      "addressProvince": "Virginia",
      "addressStreet": "6605 Fisher Avenue",
      "addressZIP": "22046",
      "contactEmail":"paul@hamilton.com",
      "contactFax":"(719) 388-1967",
      "contactMobile":"(719) 388-1969",
      "contactName":"Mr Paul",
      "contactPhone":"(877) 413-5903",
      "publicLink":"https://yourdomain.synchroteam.com/Site/....",
      "customer": {
        "id":35604,
        "myId":"sCustomer08",
        "name":"Sample Customer"
      },
      "customFieldValues":[customfieldvalue1,...],
      "position":{Position},
      "tags" : ["plumber","restaurant","test"]
    }
    

    HTTP Request

    GET /api/v3/site/details?{paramType}={paramValue}

    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

    Returns the site if found.

    If the site is not found a 404 Error is returned.

    Create/Update a site

    Synchroteam provides a single endpoint to handle creating or updating sites. The API determines if the site record already exists by checking values provided for id and/or myid.

    POST Body

    {
      "id":2811,
      "myId": "ref-2541",
      "name":"Sample Site 2",
      "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
      "addressComplement": "Unit 3",
      "contactEmail":"paul@hamilton.com",
      "contactFax":"(719) 388-1967",
      "contactMobile":"(719) 388-1969",
      "contactName":"Mr Paul",
      "contactPhone":"(877) 413-5903",
      "customer": {
        "id":35604    
      },
      "customFieldValues":[customfieldvalue1,...],
      "position":{Position}
      (...)
    }
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/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" (...)'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/site/send"
    
    payload = "{\r\n  \"id\":1454,\r\n  \"address\": \"6605 Fisher Avenue, Falls Church, VA 22046, United States\" (...)}"
    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://ws.synchroteam.com/api/v3/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\" (...)}",
      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://ws.synchroteam.com/api/v3/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", (...)
    });
    
    req.end(function (res) {
      if (res.error) throw new Error(res.error);
    
      console.log(res.body);
    });
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://ws.synchroteam.com/api/v3/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\", (...)}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/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\", (...)")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/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\", (...)}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
      "id":2811,
      "myId": "ref-2541",
      "name":"Sample Site 2",
      "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
      "addressComplement": "Unit 3",
      "addressCity": "Falls Church",
      "addressCountry": "United States",
      "addressProvince": "Virginia",
      "addressStreet": "6605 Fisher Avenue",
      "addressZIP": "22046",
      "contactEmail":"paul@hamilton.com",
      "contactFax":"(719) 388-1967",
      "contactMobile":"(719) 388-1969",
      "contactName":"Mr Paul",
      "contactPhone":"(877) 413-5903",
      "publicLink":"https://yourdomain.synchroteam.com/Site/....",
      "customer": {
        "id":35604,
        "myId":"sCustomer08",
        "name":"Sample Customer"
      },
      "customFieldValues": [
        {
          "id":4411
          "label": "Service Area",
          "value": "West"
        },
        {
          "id": 95261
          "label": "Status"
          "value": "Bronze",
        }
      ],
      "position":{
        "longitude": "74.0060"
        "latitude": "40.7128"
      },
      "tags" : []
    }
    

    HTTP Request

    POST /api/v3/site/send

    Request Body

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

    When creating, if the referring customer has tags defined, these are inherited by the site.

    When updating a site, if you provide a partial payload, only the fields provided will be updated. Fields not provided will not be deleted.

    Response Body

    The response contains the updated site record, with the id field specified.

    If an error occured, a standard error payload will be returned.

    Delete a site

    curl --request DELETE \
      --url 'https://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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

    [
      {
        "id":2541542
        "deleted":true
      },
      (...)
    ]
    

    HTTP Request

    DELETE /api/v3/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

    Returns a list of objects with a deleted parameter set to true on success, and the site ID. If no sites are found, a 404 error is returned.

    The list will generally only contain a single response object. However, if you perform a deletion of sites with a given name and there is more than one site using this name, every site whose name is given as a parameter will be deleted.

    Undelete a site

    curl --request POST \
      --url 'https://ws.synchroteam.com/api/v3/site/undelete?id=2541542' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/site/undelete"
    
    querystring = {"id":"2541542"}
    
    payload = ""
    headers = {
        'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
        'accept': "text/json",
        'content-type': "application/json",
        'cache-control': "no-cache"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers, params=querystring)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://ws.synchroteam.com/api/v3/site/undelete?id=2541542",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      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("POST", "https://ws.synchroteam.com/api/v3/site/undelete");
    
    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://ws.synchroteam.com/api/v3/site/undelete?id=2541542")
    
    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'
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.Post("https://ws.synchroteam.com/api/v3/site/undelete?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://ws.synchroteam.com/api/v3/site/undelete?id=2541542");
    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");
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
        "SitesUnDeleted": [
            {
                "id": 1579434,
                "isUnDeleted": true
            }
        ]
    }
    

    HTTP Request

    POST /api/v3/site/undelete

    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

    Returns a list of objects with a undeleted parameter set to true on success, and the site ID. If no sites are found, a 404 error is returned.

    The list will generally only contain a single response object. However, if you perform a deletion of sites with a given name and there is more than one site using this name, every site whose name is given as a parameter will be undeleted.

    List sites

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/site/list?customer_id=35604 \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/site/list?customer_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)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://ws.synchroteam.com/api/v3/site/list?customer_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://ws.synchroteam.com/api/v3/site/list?customer_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://ws.synchroteam.com/api/v3/site/list?customer_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://ws.synchroteam.com/api/v3/site/list?customer_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://ws.synchroteam.com/api/v3/site/list?customer_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);
    

    Example Response

    {
      "page":1,
      "pageSize":25,
      "records":4,
      "recordsTotal":4,
      "data":[
        {<site object>},
        {<site object>},
        ...
        {<site object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/site/list

    Query Parameters

    Parameter Type Description
    changedSince dateTime return sites modified after the UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    name string search by name - a wildcard search is performed
    customer_id integer return sites belonging to a customer by customer id
    customer_myId integer return sites belonging to a customer by customer myId
    sort string sort order, takes one of four values: name, dateModified, dateCreated and myId (Optional. Default is name)
    sortOrder string takes one of two values: ascending or descending (Optional. Default is ascending)

    Add pagination parameters if needed.

    Response body

    A list of sites found.

    If none are found, an empty list is returned.

    NB: Multiple filters are cumulative.

    Equipment

    The equipment object

    JSON Representation

    {
      "id":93971,
      "myId": "ref-2541",
      "name":"Heater 2345",
      "publicLink":"https://yourdomain.synchroteam.com/Equipment/....",
      "customer": {
        "id":35604,
        "myId":"sCustomer08",
        "name":"Sample Customer"
      },
      "site": {
        "id":2811,
        "myId":"ref-2511",
        "name":"Sample Site"
      },
      "customFieldValues": [
        {
          "id":4411
          "label": "Service Area",
          "value": "East"
        },
        {
          "id": 95261
          "label": "Status"
          "value": "Silver",
        }
      ],
      "tags" : ["plumber","restaurant","test"]
    }
    

    A piece of equipment is represented by the following fields

    Field Type Description
    id integer Equipment id (read only)
    myId string Your custom reference number for this piece of equipment
    name string Name of the piece of equipment
    publicLink string Link you can share with your customer to create/access the piece of equipment's jobs, invoices, etc. (read only)
    customer object Object containing id, name and myId customer fields (id or myId of a customer or site are required when creating a new piece of equipment)
    site object Object containing id, name and myId site fields (id or myId of a customer or site are required when creating a new piece of equipment)
    customFieldValues list List of custom field values for your site. (optional)
    tags list(string) List of tags for this piece of equipment. (read-only)

    Retrieve equipment

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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://ws.synchroteam.com/api/v3/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",
      "publicLink":"https://yourdomain.synchroteam.com/Equipment/....",
      "customer": {
        "id":35604,
        "myId":"sCustomer08",
        "name":"Sample Customer"
      },
      "site": {
        "id":2811,
        "myId":"ref-2511",
        "name":"Sample Site"
      },
      "customFieldValues":[customfieldvalue1,...],
      "tags" : ["plumber","restaurant","test"]
    }
    

    HTTP Request

    GET /api/v3/equipment/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 piece of equipment

    Request body

    none

    Response body

    Returns the piece of equipment if found.

    If it is not found a 404 Error is returned.

    Create/Update equipment

    Synchroteam provides a single endpoint to handle creating or updating pieces of equipment. The API determines if the record already exists by checking values provide for id and/or myid.

    POST Body (Create with site association)

    {
      "myId": "ref-2541",
      "name":"Heater 2345",
      "site": {
        "id":2811,
        "myId":"ref-2511",
        "name":"Sample Site"
      },
      "customFieldValues":[customfieldvalue1,...]
    }
    

    OR (Create with customer association)

    {
      "myId": "ref-2541",
      "name":"Heater 2345",
      "customer": {
        "id":35604,
        "myId":"sCustomer08",
        "name":"Sample Customer"
      },
      "customFieldValues":[customfieldvalue1,...],
    }
    

    OR (Update - site/customer not required unless you want them updated)

    {
      "id":
      "myId": "ref-2541",
      "name":"New Heater 2345 Name",
      "customFieldValues":[customfieldvalue1,...],
    }
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/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", (...)}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/equipment/send"
    
    payload = "{\r\n \"myId\":\"ref-2542\",\r\n \"name\":\"Heater 2345\", (...)}"
    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://ws.synchroteam.com/api/v3/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\", (...)}",
      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://ws.synchroteam.com/api/v3/equipment/end");
    
    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",
      (...)
    });
    
    req.end(function (res) {
      if (res.error) throw new Error(res.error);
    
      console.log(res.body);
    });
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://ws.synchroteam.com/api/v3/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\", (...)}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/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\", (...)}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/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\", (...)}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
      "id":93971,
      "myId": "ref-2541",
      "name":"Heater 2345",
      "publicLink":"https://yourdomain.synchroteam.com/Equipment/....",
      "customer": {
        "id":35604,
        "myId":"sCustomer08",
        "name":"Sample Customer"
      },
      "site": {
        "id":2811,
        "myId":"ref-2511",
        "name":"Sample Site"
      },
      "customFieldValues": [
        {
          "id":4411
          "label": "Service Area",
          "value": "East"
        },
        {
          "id": 95261
          "label": "Status"
          "value": "Silver",
        }
      ],
      "tags" : ["plumber","restaurant","test"]
    }
    

    HTTP Request

    POST /api/v3/equipment/send

    Request Body

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

    When creating, if the referring site or customer has tags defined, these are inherited by the piece of equipment.

    When updating, if you provide a partial payload, only the fields provided will be updated. Fields not provided will not be deleted.

    Response Body

    The response contains the updated equipment record, with the id field specified.

    If an error occured, a standard error payload will be returned.

    Delete equipment

    curl --request DELETE \
      --url 'https://ws.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://ws.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://ws.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://ws.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://ws.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://ws.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://ws.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

    [
      {
        "id":939721
        "deleted":true
      },
      (...)
    ]
    

    HTTP Request

    DELETE /api/v3/equipment/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

    Returns a list of objects with a deleted parameter set to true on success, and the equipment ID. If no pieces of equipment are found, a 404 error is returned.

    The list will generally only contain a single response object. However, if you perform a deletion of pieces of equipment with a given name and there is more than one using this name, every equipment record that matches the name given as a parameter will be deleted.

    Undelete equipment

    curl --request POST \
      --url 'https://ws.synchroteam.com/api/v2/equipment/undelete?id=939721' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v2/equipment/undelete"
    
    querystring = {"id":"939721"}
    
    payload = ""
    headers = {
        'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
        'accept': "text/json",
        'content-type': "application/json",
        'cache-control': "no-cache"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers, params=querystring)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://ws.synchroteam.com/api/v2/equipment/undelete?id=939721",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      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("POST", "https://ws.synchroteam.com/api/v2/equipment/undelete");
    
    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://ws.synchroteam.com/api/v2/equipment/undelete?id=939721")
    
    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'
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v2/equipment/undelete?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://ws.synchroteam.com/api/v2/equipment/undelete?id=939721");
    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");
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
        "EquipmentsUnDeleted": [
            {
                "id": 939721,
                "isUnDeleted": true
            }
        ]
    }
    

    HTTP Request

    POST /api/v3/equipment/undelete

    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

    Returns a list of objects with a undeleted parameter set to true on success, and the equipment ID. If no pieces of equipment are found, a 404 error is returned.

    The list will generally only contain a single response object. However, if you perform a undeletion of pieces of equipment with a given name and there is more than one using this name, every equipment record that matches the name given as a parameter will be undeleted.

    List equipment

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/equipment/list?site_id=2811 \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/equipment/list?site_id=2811"
    
    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://ws.synchroteam.com/api/v3/equipment/list?site_id=2811",
      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://ws.synchroteam.com/api/v3/equipment/list?site_id=2811");
    
    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://ws.synchroteam.com/api/v3/equipment/list?site_id=2811")
    
    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://ws.synchroteam.com/api/v3/equipment/list?site_id=2811")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/equipment/list?site_id=2811");
    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);
    

    Example Response

    {
      "page":1,
      "pageSize":25,
      "records":6,
      "recordsTotal":6,
      "data":[
        {<equipment object>},
        {<equipment object>},
        ...
        {<equipment object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/equipment/list

    Query Parameters

    Parameter Type Description
    changedSince dateTime return pieces of equipment modified after the UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    name string search by name - a wildcard search is performed
    customer_id integer return equipment belonging to a customer by customer id
    customer_myId integer return equipment belonging to a customer by customer myId
    site_id integer return equipment belonging to a site by site id
    site_myId integer return equipment belonging to a site by site myId
    sort string sort order, takes one of three values: name, dateModified, dateCreated and myId (Optional. Default is name)
    sortOrder string takes one of two values: ascending or descending (Optional. Default is ascending)

    Add pagination parameters if needed.

    Response body

    A list of equipment found.

    If none are found, an empty list is returned.

    NB: Multiple filters are cumulative.

    Jobs

    The job object

    JSON Representation

    {
      "id": "265_160719144323649",
      "myId": "ref-job05014",
      "num": 154872,
      "description": "This is the job description",
      "priority":"low", 
      "customer":{
        "id":35604,
        "myId":"sCustomer08",
        "name": "Sample Customer",
      },
      "site":{
        "id":2811,
        "myId": "ref-2511",
        "name":"Sample Site",
      },
      "equipment":{
        "id":93971,
        "myId": "ref-2541",
        "name":"Heater 2345",
      },
      "type":{
        "id":629,
        "name":"Standard Job"
      },
      "reportTemplate":{
        "id":781,
        "name":"Maintenance Report"
      },
      "technician":{
        "id":1551,
        "name":"John Doe",
        "login":"johndoe"
      },
      "otherTechnicians":[
        {
          "id": 1552,
          "name": "Jim Doe",
          "login":"jimdoe"
        },
        {
          "id": 1553,
          "name": "Jane Doe",
          "login":"janedoe"
        }
      ],
      "createdBy":{
        "id":265,
        "name":"Bill Williams",
        "login":"billw"
      },
      "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
      "addressComplement": "Unit 2",
      "addressCity": "Falls Church",
      "addressCountry": "United States",
      "addressProvince": "Virginia",
      "addressStreet": "6605 Fisher Avenue",
      "addressZIP": "22046",
      "position": {
        "latitude": "43.9695148",
        "longitude": "-99.90181310000"
      },
      "contactFirstName":"Paul",
      "contactLastName":"Hamilton",
      "contactEmail":"paul@hamilton.com",
      "contactMobile":"(719) 388-1969",
      "contactPhone":"(877) 413-5903",
      "scheduledStart": "19/07/2016 14:43:00",
      "scheduledEnd": "19/07/2016 16:43:00",
      "actualStart": "19/07/2016 14:50:00",
      "actualEnd": "19/07/2016 16:16:00",
      "duration": 86,
      "status": "completed",
      "publicLink": "https://yourdomain.synchroteam.com/Jobs/PublicJob/afb5853-3ec6-46ea-bc9c-db4e75a63bc2",
      "timeEntries": [
        {
            "user": {
              "id":1551,
              "name":"John Doe",
              "login":"johndoe"
            },
            "start": "19/07/2016 14:50:00",
            "stop": "19/07/2016 14:56:00"
        },
        {
            "user": {
              "id":1551,
              "name":"John Doe",
              "login":"johndoe"
            },
            "start": "19/07/2016 15:05:00",
            "stop": "19/07/2016 15:46:00"
        },
        {
            "user": {
              "id":1551,
              "name":"John Doe",
              "login":"johndoe"
            },
            "login": "techtest",
            "start": "19/07/2016 15:58:00",
            "stop": "19/07/2016 16:16:00"
        }
      ],
      "parts": [
        {
          "id": 34454,
          "quantity": 2,
          "reference": "ACCROCHE FIX CF62033",
          "serialNumbers":["1234r5twy3y","45yue596ksmg5"]
        },
        {
          "id": 35947,
          "quantity": 10,
          "reference": "111-a",
          "serialNumbers": null
        }
      ],
      "report": <job report object>,
      "customFieldValues": [
        {
          "label": "sector",
          "value": "",
          "id": 182
        },
        {
          "label": "city",
          "value": "",
          "id": 185
        }
      ],
      "dateCreated": "15/07/2017 13:28:00",
      "dateModified": "19/07/2017 11:11:00",
      "preferences": {
        "date": "2019-03-10",
        "dateTime": null,
        "isDraft": true,
        "isPool": false,
        "schedulingWindow": {
            "id": 1,
            "name": "Morning"
        },
        "team": {
            "id": 4512,
            "name": "California"
        },
        "user": {
            "id": 72300,
            "name": "Andrew Smith",
            "login": "asmith"
        }
      },
      "skills":["Plumber","Electrician"],
      "tags":["East"],
      "validateBy": {
          "id": 57246,
          "login": "johndoe",
          "name": "John Doe",
          "date": "2021-02-01 15:37"
      }
    
    }
    

    A job is represented by the following fields.

    Field Type Description
    id string ID of the job (read only)
    myId string Your custom reference number for this job
    num integer Number of the job
    priority string Job priority: low,medium or high. Default is medium.
    description string Job Description
    customer object Object containing id, name and myId customer fields (id or myId required when creating a job)
    site object Object containing id, name and myId site fields (id or myId of a customer or site are required when creating a new job)
    equipment object Object containing id, name and myId equipment fields (optional)
    type object Object containing id and name for the job type.
    reportTemplate object Object containing id and name for the job report template
    technician object Object containing id, name and login for the user assigned to the job
    createdBy object Object containing id, login or name for the user that created the job
    address string Complete Address
    addressStreet string Street address for the job
    addressComplement string Complementary street address information
    addressZIP string Address zip code
    addressCity string Address city
    addressProvince string Address province/state
    addressCountry string Address country
    position position associated with the job. (optional)
    contactFirstName string Contact First Name
    contactLastName string Contact Last Name
    contactMobile string Contact Mobile Number
    contactPhone string Contact Phone Number
    contactEmail string Contact Email Address
    scheduledStart date time Scheduled Start Date
    scheduledEnd date time Scheduled End Date
    actualStart date time Actual Start Date
    actualEnd date time Actual End Date
    duration integer Time spent working on the job, given in minutes
    status string Job Status, one of: created, scheduled, synchronized, started, paused, completed, validated or cancelled
    publicLink string Public link for the job
    otherTechnicians list of objects Other technicians associated with this job. List of user objects containing id, name and login.
    timeEntries list of objects Each object contains a simplified user object, start (datetime) and stop (datetime)
    parts list List of parts consumed for the job
    report report Job Detail : Report details, as filled by the technician
    Job Creation : list of Item containing nmCategory,nmItem ,value, and iteration
    customFieldValues list List of custom field values for your job
    tags list(string) List of tags for this job (read-only)
    skills list(string) List of required skills for this job
    dateCreated datetime creation date
    dateModified datetime last modification date
    preferences object Job Scheduling Preferences for the job
    validateBy object Object containing id, login, name and datefor the user that validated the job and when

    Retrieve a job

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/job/details?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://ws.synchroteam.com/api/v3/job/details"
    
    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://ws.synchroteam.com/api/v3/job/details?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://ws.synchroteam.com/api/v3/job/details");
    
    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://ws.synchroteam.com/api/v3/job/details?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://ws.synchroteam.com/api/v3/job/details?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://ws.synchroteam.com/api/v3/job/details?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

    {
      "id": "265_160719144323649",
      "myId": "ref-job05014",
      "num": 154872,
      "description": "This is the job description",
      "priority":"low", 
      "customer":{
        "id":35604,
        "myId":"sCustomer08",
        "name": "Sample Customer",
      },
      "site":{
        "id":2811,
        "myId": "ref-2511",
        "name":"Sample Site",
      },
      "equipment":{
        "id":93971,
        "myId": "ref-2541",
        "name":"Heater 2345",
      },
      "type":{
        "id":629,
        "name":"Standard Job"
      },
      "reportTemplate":{
        "id":781,
        "name":"Maintenance Report"
      },
      "technician":{
        "id":1551,
        "name":"John Doe",
        "login":"johndoe"
      },
      "otherTechnicians":[
        {
          "id": 1552,
          "name": "Jim Doe",
          "login":"jimdoe"
        },
        {
          "id": 1553,
          "name": "Jane Doe",
          "login":"janedoe"
        }
      ],
      "createdBy":{
        "id":265,
        "name":"Bill Williams",
        "login":"billw"
      },
      "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
      "addressComplement": "Unit 2",
      "addressCity": "Falls Church",
      "addressCountry": "United States",
      "addressProvince": "Virginia",
      "addressStreet": "6605 Fisher Avenue",
      "addressZIP": "22046",
      "position": {
        "latitude": "43.9695148",
        "longitude": "-99.90181310000"
      },
      "contactFirstName":"Paul",
      "contactLastName":"Hamilton",
      "contactEmail":"paul@hamilton.com",
      "contactMobile":"(719) 388-1969",
      "contactPhone":"(877) 413-5903",
      "scheduledStart": "19/07/2016 14:43:00",
      "scheduledEnd": "19/07/2016 16:43:00",
      "actualStart": "19/07/2016 14:50:00",
      "actualEnd": "19/07/2016 16:16:00",
      "duration": 86,
      "status": "completed",
      "publicLink": "https://yourdomain.synchroteam.com/Jobs/PublicJob/afb5853-3ec6-46ea-bc9c-db4e75a63bc2",
      "timeEntries": [
        {
            "user": {
              "id":1551,
              "name":"John Doe",
              "login":"johndoe"
            },
            "start": "19/07/2016 14:50:00",
            "stop": "19/07/2016 14:56:00"
        },
        {
            "user": {
              "id":1551,
              "name":"John Doe",
              "login":"johndoe"
            },
            "start": "19/07/2016 15:05:00",
            "stop": "19/07/2016 15:46:00"
        },
        {
            "user": {
              "id":1551,
              "name":"John Doe",
              "login":"johndoe"
            },
            "login": "techtest",
            "start": "19/07/2016 15:58:00",
            "stop": "19/07/2016 16:16:00"
        }
      ],
      "parts": [
        {
          "id": 34454,
          "quantity": 2,
          "reference": "ACCROCHE FIX CF62033",
          "serialNumbers":["1234r5twy3y","45yue596ksmg5"]
        },
        {
          "id": 35947,
          "quantity": 10,
          "reference": "111-a",
          "serialNumbers": null
        }
      ],
      "report": <job report object>,
      "customFieldValues": [
        {
          "label": "sector",
          "value": "",
          "id": 182
        },
        {
          "label": "city",
          "value": "",
          "id": 185
        }
      ],
      "dateCreated": "17/07/2017 13:28:00",
      "dateModified": "19/07/2017 11:11:00",,
      "validateBy": {
          "id": 57246,
          "login": "johndoe",
          "name": "John Doe",
          "date": "2021-02-01 15:37"
      }
    }
    

    HTTP Request

    GET /api/v3/job/details?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 format

    Create/Update a job

    Synchroteam provides a single endpoint to handle creating or updating jobs. The API determines if the job record already exists by checking values provided for id and/or myid and/or num.

    POST Body

    {
      "myId": "ref-job05014",
      "description": "This is the job description",
      "priority":"low", 
      "customer":{
        "id":35604
      },
      "site":{
        "myId": "ref-2511"
      },
      "equipment":{
        "myId": "ref-2541"
      },
      "type":{
        "id":629
      },
      "reportTemplate":{
        "id":781
      },
      "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
      "addressComplement": "Unit 2",
      "contactFirstName":"Paul",
      "contactLastName":"Hamilton",
      "contactEmail":"paul@hamilton.com",
      "contactMobile":"(719) 388-1969",
      "contactPhone":"(877) 413-5903",
      "scheduledStart": "19/07/2016 14:43:00",
      "scheduledEnd": "19/07/2016 16:43:00",
      "status": "scheduled",
      "report": [<only for Job creation>
        {
          "nmCategory": "Customer section",
          "nmItem": "Did the Customer approve the quote?",
          "value": "Yes",
          "iteration": 0
        }, <...>,
      ],
      "customFieldValues": [
        {
          "label": "sector",
          "value": "",
          "id": 182
        },
        {
          "label": "city",
          "value": "",
          "id": 185
        }
      ],
      "skills":["Plumber"]
    }
    
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/job/send \
      --header 'accept: text/json' \
      --header 'content-type: application/json' \
      --data '{\r\n  "myId": "ref-job05014",\r\n "description": "This is the job description" (...)}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/job/send"
    
    payload = "{\r\n  \"myId\": \"ref-job05014\",\r\n \"description\": \"This is the job description\" (...)}"
    headers = {
        '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://ws.synchroteam.com/api/v3/job/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-job05014\",\r\n \"description\": \"This is the job description\" (...)}",
      CURLOPT_HTTPHEADER => array(
        "accept: text/json",    
        "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://ws.synchroteam.com/api/v3/job/send");
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json"
      "accept": "text/json",});
    
    req.type("json");
    req.send({
      "myId": "ref-job05014",
      "description": "This is the job description",
      (...)
    });
    
    req.end(function (res) {
      if (res.error) throw new Error(res.error);
    
      console.log(res.body);
    });
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://ws.synchroteam.com/api/v3/job/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["cache-control"] = 'no-cache'
    request.body = "{\r\n  \"myId\": \"ref-job05014\",\r\n \"description\": \"This is the job description\" (...)}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/job/send")
      .header("accept", "text/json")  .
    header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .body("{\r\n  \"myId\": \"ref-job05014\",\r\n \"description\": \"This is the job description\" (...)}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/job/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.AddParameter("application/json", "{\r\n  \"myId\": \"ref-job05014\",\r\n \"description\": \"This is the job description\" (...)}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
      "id": "265_160719144323649",
      "myId": "ref-job05014",
      "num": 154872,
      "description": "This is the job description",
      "priority":"low", 
      "customer":{
        "id":35604,
        "myId":"sCustomer08",
        "name": "Sample Customer",
      },
      "site":{
        "id":2811,
        "myId": "ref-2511",
        "name":"Sample Site",
      },
      "equipment":{
        "id":93971,
        "myId": "ref-2541",
        "name":"Heater 2345",
      },
      "type":{
        "id":629,
        "name":"Standard Job"
      },
      "reportTemplate":{
        "id":781,
        "name":"Maintenance Report"
      },
      "technician":null,
      "otherTechnicians":[],
      "createdBy":{
        "id":265,
        "name":"Bill Williams",
        "login":"billw"
      },
      "address": "6605 Fisher Avenue, Falls Church, VA 22046, United States",
      "addressComplement": "Unit 2",
      "addressCity": "Falls Church",
      "addressCountry": "United States",
      "addressProvince": "Virginia",
      "addressStreet": "6605 Fisher Avenue",
      "addressZIP": "22046",
      "position": {
        "latitude": "43.9695148",
        "longitude": "-99.90181310000"
      },
      "contactFirstName":"Paul",
      "contactLastName":"Hamilton",
      "contactEmail":"paul@hamilton.com",
      "contactMobile":"(719) 388-1969",
      "contactPhone":"(877) 413-5903",
      "scheduledStart": "19/07/2016 14:43:00",
      "scheduledEnd": "19/07/2016 16:43:00",
      "actualStart": null,
      "actualEnd": null,
      "duration": 86,
      "status": "scheduled",
      "publicLink": "https://yourdomain.synchroteam.com/Jobs/PublicJob/afb5853-3ec6-46ea-bc9c-db4e75a63bc2",
      "timeEntries": [],
      "report": <job report object>,
      "customFieldValues": [
        {
          "label": "sector",
          "value": "",
          "id": 182
        },
        {
          "label": "city",
          "value": "",
          "id": 185
        }
      ],
      "dateCreated": "17/07/2017 13:28:00",
      "dateModified": "19/07/2017 11:11:00",
    }
    

    HTTP Request

    POST /api/v3/job/send

    Request Body

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

    When updating a job, if you provide a partial payload, only the fields provided will be updated. Fields not provided will not be deleted.

    Response Body

    The response contains the updated job record, with the id field and num specified.

    If an error occured, a standard error payload will be returned.

    Remark

    Only when creating a Job (not updating) you can initialize Report Values using a Simplified Report which consists on an Array of Simplified Items. See sample on right panel.

    Delete a job

    curl --request DELETE \
      --url 'https://ws.synchroteam.com/api/v3/job/delete?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://ws.synchroteam.com/api/v3/job/delete"
    
    querystring = {"id":"265_160719144323649"}
    
    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://ws.synchroteam.com/api/v3/job/delete?id=265_160719144323649",
      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://ws.synchroteam.com/api/v3/job/delete");
    
    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://ws.synchroteam.com/api/v3/job/delete?id=265_160719144323649")
    
    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://ws.synchroteam.com/api/v3/job/delete?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://ws.synchroteam.com/api/v3/job/delete?id=265_160719144323649");
    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

    [
      {
        "id":265_160719144323649
        "deleted":true
      },
      (...)
    ]
    

    HTTP Request

    DELETE /api/v3/job/delete

    Query Parameters

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

    Request body

    none

    Response body

    Returns a list of objects with a deleted parameter set to true on success, and the job ID. If no jobs are found, a 404 error is returned.

    The list will generally only contain a single response object.

    List jobs

    Sample Code

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/job/list?customer_id=35604&dateFrom=2018-12-01+00:00:00 \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/job/list?customer_id=35604&dateFrom=2018-12-01+00:00:00"
    
    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://ws.synchroteam.com/api/v3/job/list?customer_id=35604&dateFrom=2018-12-01+00:00:00",
      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://ws.synchroteam.com/api/v3/job/list?customer_id=35604&dateFrom=2018-12-01+00:00:00");
    
    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://ws.synchroteam.com/api/v3/job/list?customer_id=35604&dateFrom=2018-12-01+00:00:00")
    
    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://ws.synchroteam.com/api/v3/job/list?customer_id=35604&dateFrom=2018-12-01+00:00:00")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/job/list?customer_id=35604&dateFrom=2018-12-01+00:00:00");
    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

    {
      "page":1,
      "pageSize":25,
      "records":25,
      "recordsTotal":32,
      "data":[
        {<job object>},
        {<job object>},
        ...
        {<job object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/job/list

    Query Parameters

    Parameter Type Description
    myId string Filter by job myId
    status integer Filter by current job status (created, scheduled, synchronized, started, paused, completed, validated or cancelled)
    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
    changedSince date time
    (yyyy-mm-dd hh:mm:ss)
    Get jobs planned, ongoing or completed, the older modification checked on or after changedFrom
    reportChangedSince date time
    (yyyy-mm-dd hh:mm:ss)
    Get jobs planned, ongoing or completed, the older modification checked in his report on or after reportChangedSince
    validatedSince date time
    (yyyy-mm-dd hh:mm:ss)
    Get jobs validated on or after validatedSince
    user_login string Get jobs assigned to a technician, by user login
    user_id integer Get jobs assigned to a technician, by user id
    team_id integer Get jobs assigned to a technician of the Team, by Team id
    team_id_pref integer Get jobs with the Team in the Scheduling Preferences, by Team id
    customer_id integer return jobs belonging to a customer by customer id
    customer_myId integer return jobs belonging to a customer by customer myId
    site_id integer return jobs belonging to a site by site id
    site_myId integer return jobs belonging to a site by site myId
    equipment_id integer return jobs belonging to a piece of equipment by equipment id
    equipment_myId integer return jobs belonging to a piece of equipment by equipment myId
    type_id integer Get jobs using a specific Job Type, by jobtype id
    type_name string Get jobs using a specific Job Type, by jobtype name
    reportTemplate_id integer Get jobs using a specific Job Report Template, by report id
    reportTemplate_name string Get jobs using a specific Job Report Template, by report name
    hasPhotos boolean whether or not the Job has pictures
    sort string sort order, takes one of the following values: num, scheduledstart, scheduledend, actualstart, actualend or datemodified (Optional. Default is num)
    sortOrder string takes one of two values: ascending or descending (Optional. Default is ascending)
    show string accepts one of three values: active, deleted or all (default: active)

    Add pagination parameters if needed.

    Response body

    A list of simplified jobs found. A Simplified Job is a job object without Report nor Parts nor Scheduling Preferences nor Other Technicians list nor Time Entries.

    If none are found, an empty list is returned.

    NB: Multiple filters are cumulative.

    Schedule a job

    Schedule a job using id, myId or num. Provide the desired schedule, and technician assigned.

    Example POST Body

    {
        "id": "265_160719144323649",
        "scheduledStart":"2018-12-12 15:00:00",
        "scheduledEnd":"2018-12-12 17:00:00",
        "technician":{
          "id": 1551
        },
        "otherTechnicians": [
            {
                "login": "alainpp"
            }
        ]
    }
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/job/schedule\
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{"id":"265_160719144323649","scheduledStart":"2018-12-12 15:00:00","scheduledEnd":"2018-12-12 17:00:00","technician":{"id":1551}}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/job/schedule
    
    payload = "{\"id\":\"265_160719144323649\",\"scheduledStart\":\"2018-12-12 15:00:00\",\"scheduledEnd\":\"2018-12-12 17:00:00\",\"technician\":{\"id\":1551}}"
    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://ws.synchroteam.com/api/v3/job/schedule,
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "{\"id\":\"265_160719144323649\",\"scheduledStart\":\"2018-12-12 15:00:00\",\"scheduledEnd\":\"2018-12-12 17:00:00\",\"technician\":{\"id\":1551}}",
      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://ws.synchroteam.com/api/v3/job/schedule);
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
      "id": "265_160719144323649",
      "scheduledStart":"2018-12-12 15:00:00",
      "scheduledEnd":"2018-12-12 17:00:00",
      "technician":{
          "id": 1551
        },
      "otherTechnicians": [
        {
           "login": "alainpp"
        }
      ]
    });
    
    req.end(function (res) {
      if (res.error) throw new Error(res.error);
    
      console.log(res.body);
    });
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://ws.synchroteam.com/api/v3/job/schedule)
    
    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 = "{\"id\":\"265_160719144323649\",\"scheduledStart\":\"2018-12-12 15:00:00\",\"scheduledEnd\":\"2018-12-12 17:00:00\",\"technician\":{\"id\":1551}}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/job/schedule)
      .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("{\"id\":\"265_160719144323649\",\"scheduledStart\":\"2018-12-12 15:00:00\",\"scheduledEnd\":\"2018-12-12 17:00:00\",\"technician\":{\"id\":1551}}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/job/schedule);
    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", "{\"id\":\"265_160719144323649\",\"scheduledStart\":\"2018-12-12 15:00:00\",\"scheduledEnd\":\"2018-12-12 17:00:00\",\"technician\":{\"id\":1551}}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    [
        {
          "id": "265_160719144323649",
          "status":"scheduled",
          "scheduledStart":"2018-12-12 15:00:00",
          "scheduledEnd":"2018-12-12 17:00:00",
          "technician":{
            "id":1551,
            "name":"John Doe",
            "login":"johndoe"
          },
          "otherTechnicians": [
            {
              "id": 59728,
              "name": "alain pp",
              "login": "alainpp"
            }
          ]
        }
    ]
    

    HTTP Request

    POST /v3/job/schedule

    Request body

    provide one or more of the following parameters in the JSON POST payload:

    Parameter Default Description
    id string ID of the job
    myId string Your custom reference number for this job
    num integer Number of the job
    scheduledStart date time
    (yyyy-mm-dd hh:mm:ss)
    Start date and time
    scheduledEnd date time
    (yyyy-mm-dd hh:mm:ss)
    End date and time
    technician object Object containing id, name and login for the user assigned to the job
    otherTechnicians list of objects Other technicians associated with this job. List of user objects containing id, name and login.

    Response body

    The response contains a list of scheduled jobs, job id, status, schedule and technician assigned.

    Unschedule a job

    Unschedule a job using id, myId or num.

    Example POST Body

    {
        "id": "265_160719144323649",
    }
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/job/unschedule\
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{"id":"265_160719144323649"}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/job/unschedule
    
    payload = "{\"id\":\"265_160719144323649\"}"
    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://ws.synchroteam.com/api/v3/job/unschedule,
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "{\"id\":\"265_160719144323649\"}",
      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://ws.synchroteam.com/api/v3/job/unschedule);
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
      "id": "265_160719144323649"
    });
    
    req.end(function (res) {
      if (res.error) throw new Error(res.error);
    
      console.log(res.body);
    });
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://ws.synchroteam.com/api/v3/job/unschedule)
    
    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 = "{\"id\":\"265_160719144323649\"}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/job/unschedule)
      .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("{\"id\":\"265_160719144323649\"}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/job/unschedule);
    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", "{\"id\":\"265_160719144323649\"}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    [
        {
          "id": "265_160719144323649",
          "status":"scheduled",
          "scheduledStart":null,
          "scheduledEnd":null,
          "technician":null
        }
    ]
    

    HTTP Request

    POST /v3/job/unschedule

    Request body

    provide one or more of the following parameters in the JSON POST payload:

    Parameter Default Description
    id string ID of the job
    myId string Your custom reference number for this job
    num integer Number of the job

    Response body

    The response contains a list of unscheduled jobs, job id and status with schedule and technician set to null.

    Cancel a job

    Cancel a job using id, myId or num.

    Example POST Body

    {
        "id": "265_160719144323649",
    }
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/job/cancel\
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{"id":"265_160719144323649"}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/job/cancel
    
    payload = "{\"id\":\"265_160719144323649\"}"
    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://ws.synchroteam.com/api/v3/job/cancel,
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "{\"id\":\"265_160719144323649\"}",
      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://ws.synchroteam.com/api/v3/job/cancel);
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
      "id": "265_160719144323649"
    });
    
    req.end(function (res) {
      if (res.error) throw new Error(res.error);
    
      console.log(res.body);
    });
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://ws.synchroteam.com/api/v3/job/cancel)
    
    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 = "{\"id\":\"265_160719144323649\"}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/job/cancel)
      .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("{\"id\":\"265_160719144323649\"}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/job/cancel);
    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", "{\"id\":\"265_160719144323649\"}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    [
        {
          "id": "265_160719144323649",
          "status":"cancelled",
        }
    ]
    

    HTTP Request

    POST /v3/job/cancel

    Request body

    provide one or more of the following parameters in the JSON POST payload:

    Parameter Default Description
    id string ID of the job
    myId string Your custom reference number for this job
    num integer Number of the job

    Response body

    The response contains a list of cancelled jobs, job id and status specified.

    Validate a job

    Validate a job using id, myId or num

    Example POST Body

    {
        "id": "265_160719144323649"
    }
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/job/validate \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{"id":"265_160719144323649"}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/job/validate"
    
    payload = "{\"id\":\"265_160719144323649\"}"
    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://ws.synchroteam.com/api/v3/job/validate",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "{\"id\":\"265_160719144323649\"}",
      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://ws.synchroteam.com/api/v3/job/validate");
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({"id":"265_160719144323649"});
    
    req.end(function (res) {
      if (res.error) throw new Error(res.error);
    
      console.log(res.body);
    });
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://ws.synchroteam.com/api/v3/job/validate")
    
    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 = "{\"id\":\"265_160719144323649\"}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/job/validate")
      .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("{\"id\":\"265_160719144323649\"}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/job/validate");
    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", "{\"id\":\"265_160719144323649\"}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    [
        {
            "id": "265_160719144323649",
            "status":"validated"
        }
    ]
    

    HTTP Request

    POST /v3/job/validate

    Request body

    provide one or more of the following parameters in the JSON POST payload:

    Parameter Default Description
    id string ID of the job
    myId string Your custom reference number for this job
    num integer Number of the job

    Response body

    The response contains a list of validated jobs, showing the job id and status.

    Confirm a job

    Confirm the Scheduling of a job currently in Draft status, using id, myId or num

    Example POST Body

    {
        "id": "265_160719144323649"
    }
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/job/confirm \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{"id":"265_160719144323649"}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/job/confirm"
    
    payload = "{\"id\":\"265_160719144323649\"}"
    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://ws.synchroteam.com/api/v3/job/confirm",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "{\"id\":\"265_160719144323649\"}",
      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://ws.synchroteam.com/api/v3/job/confirm");
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({"id":"265_160719144323649"});
    
    req.end(function (res) {
      if (res.error) throw new Error(res.error);
    
      console.log(res.body);
    });
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://ws.synchroteam.com/api/v3/job/confirm")
    
    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 = "{\"id\":\"265_160719144323649\"}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/job/confirm")
      .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("{\"id\":\"265_160719144323649\"}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/job/confirm");
    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", "{\"id\":\"265_160719144323649\"}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    [
        {
            "id": "265_160719144323649",
            "status":"confirmed"
        }
    ]
    

    HTTP Request

    POST /v3/job/confirm

    Request body

    provide one or more of the following parameters in the JSON POST payload:

    Parameter Default Description
    id string ID of the job
    myId string Your custom reference number for this job
    num integer Number of the job

    Response body

    The response contains a list of confirmed jobs, showing the job id and status.

    Complete a job

    Complete a job using id (or myId or num), and both actualStart and endStart

    Example POST Body

    {
        "id": "265_160719144323649",
        "actualStart":"2019-11-06 13:13",
        "actualEnd":"2019-11-06 14:28"
    }
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/job/complete \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{"id":"265_160719144323649","actualStart":"2019-11-06 13:13","actualEnd":"2019-11-06 14:28"}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/job/complete"
    
    payload = "{\"id\":\"265_160719144323649\",\"actualStart\":\"2019-11-06 13:13\",\"actualEnd\":\"2019-11-06 14:28\"}"
    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://ws.synchroteam.com/api/v3/job/complete",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "{\"id\":\"265_160719144323649\",\"actualStart\":\"2019-11-06 13:13\",\"actualEnd\":\"2019-11-06 14:28\"}",
      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://ws.synchroteam.com/api/v3/job/complete");
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({"id":"265_160719144323649","actualStart":"2019-11-06 13:13","actualEnd":"2019-11-06 14:28"});
    
    req.end(function (res) {
      if (res.error) throw new Error(res.error);
    
      console.log(res.body);
    });
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://ws.synchroteam.com/api/v3/job/complete")
    
    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 = "{\"id\":\"265_160719144323649\",\"actualStart\":\"2019-11-06 13:13\",\"actualEnd\":\"2019-11-06 14:28\"}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/job/complete")
      .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("{\"id\":\"265_160719144323649\",\"actualStart\":\"2019-11-06 13:13\",\"actualEnd\":\"2019-11-06 14:28\"}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/job/complete");
    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", "{\"id\":\"265_160719144323649\",\"actualStart\":\"2019-11-06 13:13\",\"actualEnd\":\"2019-11-06 14:28\"}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    [
        {
            "id": "265_160719144323649",
            "status":"completed"
        }
    ]
    

    HTTP Request

    POST /v3/job/complete

    Request body

    provide one or more of the following parameters in the JSON POST payload:

    Parameter Default Description
    id string ID of the job
    myId string Your custom reference number for this job
    num integer Number of the job
    actualStart datetime Real Start Date & Time
    actualEnd datetime Real End Date & Time

    Response body

    The response contains a list of completed jobs, showing the job id and status.

    Retrieve job photos

    Returns a list of photos for a given job. Get job photos by job id, num or myId

    DESCRIPTION

    NB: photos are represented using the following fields :

    Field Type Description
    url string url to download photo
    fileName string Name of the file, including the extension (.png, .jpg, etc.)
    iteration integer defaults to 0. If the photo is within a repeatable report block, will show which block iteration the photo came from.
    comment string Comment associated to the photo
    imageData String Image data encoded as a Base64String (optional)

    Sample Code

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/job/photos?myId=ref-25415&getImageData=true&getImageData=true' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/job/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://ws.synchroteam.com/api/v3/job/photos?myId=ref-25415&getImageData=true",
      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://ws.synchroteam.com/api/v3/job/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://ws.synchroteam.com/api/v3/job/photos?myId=ref-25415&getImageData=true")
    
    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://ws.synchroteam.com/api/v3/job/photos?myId=ref-25415&getImageData=true")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/job/photos?myId=ref-25415&getImageData=true");
    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
      },
      "photos":[
        {
          "url":"https://url.to/image.png",
          "fileName":  "image.png",
          "iteration": 0,
          "comment":"a Comment",
          "imageData":[Base64String]
        },
        {
          "url":"https://url.to/image1.png",
          "fileName":  "image1.png",
          "iteration": 0,
          "comment":"photo1",
          "imageData":[Base64String]
        },
        {
          "url":"https://url.to/image2.png",
          "fileName":  "image2.png",
          "iteration": 1,
          "comment":"photo2",
          "imageData":[Base64String]
        }
      ]
    }
    

    HTTP Request

    GET /v3/job/photos?{paramType}={paramValue}&getImageData={true|false}

    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
    getImageData boolean if set to true, image data will be provided in base64 format. If set to false imageData will be set to null (default: false)

    Request body

    none

    Response body

    A simplified job object and the list of photos for the job.

    Send job parts

    Synchroteam provides a single endpoint to handle adding Parts on a Job. The Job is identified by its id, num or myId.

    POST Body

    {
    "id": null,
    "myId": "GFrance2020-APIv3_2035",
    "num": 0,
    "parts": [
        {
          "id": null,
          "quantity": 2,
          "reference": "1002",
          "serialNumbers":["123","7"]
        },
        {
          "id": null,
          "quantity": 50,
          "reference": "REF_API_002",
          "serialNumbers": null
        },
          {
          "id": null,
          "quantity": 35,
          "reference": "REF_API_020",
          "serialNumbers": null
        }         
      ]
    }
    

    Sample Code

    curl --location --request POST 'https://ws.synchroteam.com/api/v3/job/parts/send' \
    --header 'Authorization: Basic ZGVtbzo1Y2MyODM4MS01ZTM0LTQ0YWUtYjk1MC05MWI1MDQxMTA3ZTE=' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-raw '{"id": null,"myId": "GFrance2020-APIv3_2035","num": 0,"parts": [(...)]}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/job/parts/send"
    
    payload = "{\"id\": null,\"myId\": \"GFrance2020-APIv3_2035\",\"num\": 0,\"parts\": [(...)]}"
    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://ws.synchroteam.com/api/v3/job/parts/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 => "{\"id\": null,\"myId\": \"GFrance2020-APIv3_2035\",\"num\": 0,\"parts\": [(...)]}",
      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://ws.synchroteam.com/api/v3/job/parts/send");
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
      "id": null,
      "myId": "GFrance2020-APIv3_2035",
      "num": 0,
      "parts": [(...)]
      });
    
    req.end(function (res) {
      if (res.error) throw new Error(res.error);
    
      console.log(res.body);
    });
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://ws.synchroteam.com/api/v3/job/parts/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 = "{\"id\": null,\"myId\": \"GFrance2020-APIv3_2035\",\"num\": 0,\"parts\": [(...)]}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/job/parts/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("{\"id\": null,\"myId\": \"GFrance2020-APIv3_2035\",\"num\": 0,\"parts\": [(...)]}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/job/parts/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", "{\"id\": null,\"myId\": \"GFrance2020-APIv3_2035\",\"num\": 0,\"parts\": [(...)]}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
        "id": "c1736b28-49ca-4bd7-b2e6-fb8c4a5b34fe",
        "parts": [
          {
            "id": null,
            "quantity": 2,
            "reference": "1002",
            "serialNumbers":["123","7"]
          },
          {
            "id": null,
            "quantity": 50,
            "reference": "REF_API_002",
            "serialNumbers": null
          },
            {
            "id": null,
            "quantity": 35,
            "reference": "REF_API_020",
            "serialNumbers": null
          }  
        ]
    }
    

    HTTP Request

    POST /api/v3/job/parts/send

    Request Body

    Job Scheduling Preferences

    The job scheduling preferences object

    {
        "date": "2019-03-10",
        "dateTime": null,
        "isDraft": true,
        "isPool": false,
        "schedulingWindow": {
            "id": 1,
            "name": "Morning"
        },
        "team": {
            "id": 4512,
            "name": "California"
        },
        "user": {
            "id": 72300,
            "name": "Andrew Smith",
            "login": "asmith"
        }
    }
    

    Job Scheduling Preferences are represented by the following fields

    Field Type Description
    date date (yyyy-mm-dd) Prefered Date
    dateTime date (yyyy-mm-dd hh:mm:ss) Meeting Date & Time
    isDraft bool Specify if the Job will be scheduled as Draft (not synced on technician devices)
    isPool bool Specify if the Job belongs to Job Pool list
    schedulingWindow object Object containing id and name job scheduling window fields
    team object Object containing id and name team fields
    user object Object containing id, name and login technician fields (name is read-only)

    Job Scheduling Windows

    The job scheduling window object

    {
      "id":476,
      "name":"Morning",
      "startTime":"08:00",
      "endTime":"12:00",
    }
    

    Job Scheduling Windows are set and controlled via the Synchroteam Web based back office.

    A job scheduling window is represented by the following fields

    Field Type Description
    id integer ID of the job scheduling window
    name string Name of the job scheduling window
    startTime time (hh:mm) Start time (24h time format)
    endTime time (hh:mm) End time (24h time format)

    List job scheduling windows

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/jobschedulingwindow/list \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/jobschedulingwindow/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://ws.synchroteam.com/api/v3/jobschedulingwindow/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://ws.synchroteam.com/api/v3/jobschedulingwindow/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://ws.synchroteam.com/api/v3/jobschedulingwindow/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://ws.synchroteam.com/api/v3/jobschedulingwindow/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://ws.synchroteam.com/api/v3/jobschedulingwindow/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);
    

    Example Response

    {
      "page":1,
      "pageSize":25,
      "records":10,
      "recordsTotal":10,
      "data":[
        {<job scheduling window object>},
        {<job scheduling window object>},
        ...
        {<job scheduling window object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/jobschedulingwindow/list

    Query Parameters

    Parameter Type Description
    sort string sort order, takes one value: name (Optional. Default is name)
    sortOrder string takes one of two values: ascending or descending (Optional. Default is ascending)

    Add pagination parameters if needed.

    Response body

    A list of job scheduling windows found.

    If none are found, an empty list is returned.

    Job Types

    The job type object

    {
        "id": 7464,
        "name": "Repair",
        "duration": "01:00:00",
        "isDefault": false,
        "priority": "medium",
        "customHeader": null,
        "customLogoUrl": null,
        "defaultJobReport": {
            "id": 7880,
            "name": "Maintenance"
        },
        "skills":["Plumber","Electrician"]
    }
    

    Job Types are set and controlled via the Synchroteam Web based back office.

    A job type is represented by the following fields

    Field Type Description
    id integer ID of the job type
    name string Name of the job type
    duration time (as string) The default duration (hh:mm:ss)
    isDefault boolean Whether or not this is the default job type
    priority string priority level : low, medium, high
    customHeader string Custom Address used in Header of Reports for this job type
    customLogoUrl string URL of the Custom Logo used in Header of Reports for this job type
    defaultJobReport object Object containing id and name report template fields
    skills list(string) List of skills for the job type

    Retrieve a job type

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/jobtype/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://ws.synchroteam.com/api/v3/jobtype/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://ws.synchroteam.com/api/v3/jobtype/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://ws.synchroteam.com/api/v3/jobtype/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://ws.synchroteam.com/api/v3/jobtype/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://ws.synchroteam.com/api/v3/jobtype/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://ws.synchroteam.com/api/v3/jobtype/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);
    

    Example Response

    {
        "id": 7464,
        "name": "Repair",
        "duration": "01:00:00",
        "isDefault": false,
        "priority": "medium",
        "customHeader": null,
        "customLogoUrl": null,
        "defaultJobReport": {
            "id": 7880,
            "name": "Maintenance"
        },
        "skills":["Plumber","Electrician"]
    }
    

    HTTP Request

    GET /api/v3/jobtype/details?{paramType}={paramValue}

    Query Parameters

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

    Request body

    none

    Response body

    Returns the job type if found.

    If the job type is not found a 404 Error is returned.

    List Job Types

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/jobtype/list?name=repair \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/jobtype/list?name=repair"
    
    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://ws.synchroteam.com/api/v3/jobtype/list?name=repair",
      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://ws.synchroteam.com/api/v3/jobtype/list?name=repair");
    
    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://ws.synchroteam.com/api/v3/jobtype/list?name=repair")
    
    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://ws.synchroteam.com/api/v3/jobtype/list?name=repair")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/jobtype/list?name=repair");
    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);
    

    Example Response

    {
      "page":1,
      "pageSize":25,
      "records":10,
      "recordsTotal":10,
      "data":[
        {<job type object>},
        {<job type object>},
        ...
        {<job type object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/jobtype/list

    Query Parameters

    Parameter Type Description
    name string Will find all job types containing name
    sort string sort order, takes one value: name (Optional. Default is name)
    sortOrder string takes one of two values: ascending or descending (Optional. Default is ascending)

    Add pagination parameters if needed.

    Response body

    A list of job types found.

    If none are found, an empty list is returned.

    NB: Multiple filters are cumulative.

    Job Reports

    The job report object

    JSON Representation

    [
        {
            "id": 3275,
            "name": "Sample Block 1",
            "isShared": false,
            "iteration": 0,
            "isMandatory": true,
            "position": 0,
            "items": [
                {
                    "id": 10363,
                    "type": "text",
                    "name": "Item name 1",
                    "isMandatory": false,
                    "isPrivate": false,
                    "conditionByItem": 0,
                    "conditionValue": "",
                    "position": 1,
                    "value": "sample value",
                    "comment": "hey, this is a comment!",
                    "issue": "Issue Reported"
                },
                {
                    "id": 10364,
                    "type": "list",
                    "name": "Item name 2",
                    "isMandatory": true,
                    "isPrivate": false,
                    "conditionByItem": 0,
                    "conditionValue": "",
                    "position": 2,
                    "value": "In the street",
                    "comment": "",
                    "issue": "Resolved"
                }
            ]
        },
        {
            "id": 3276,
            "blockName": "Sample Block 2",
            "isShared": false,
            "iteration": 0,
            "isMandatory": true,
            "position": 2,
            "items": [
                {
                    "id": 10365,
                    "type": "list",
                    "name": "Do we need to intervene?",
                    "isMandatory": false,
                    "isPrivate": false,
                    "conditionByItem": 0,
                    "conditionValue": "",
                    "position": 1,
                    "value": "yes",
                    "comment": "",
                    "issue": "-"
                },
                {
                    "id": 10366,
                    "type": "date",
                    "name": "Date for next visit",
                    "isMandatory": false,
                    "isPrivate": false,
                    "conditionByItem": 10365,
                    "conditionValue": "yes",
                    "position": 2,
                    "value": "",
                    "comment": "",
                    "issue": "-"
                }
            ]
        }
    ]
    

    A Job Report is represented by the following fields

    Field Type Description
    id int Job Report Type id
    name string Job Report Type name
    isPublished boolean Whether or not the block is published
    isDefault boolean Whether or not the block is shared
    blocks list of blocks each containing a list of items.

    NB: Note the following changes on items inside blocks:

    Retrieve a job report

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/jobReport/details?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://ws.synchroteam.com/api/v3/jobReport/details"
    
    querystring = {"id":"265_160719144323649"}
    
    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://ws.synchroteam.com/api/v3/jobReport/details?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_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://ws.synchroteam.com/api/v3/jobReport/details");
    
    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://ws.synchroteam.com/api/v3/jobReport/details?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://ws.synchroteam.com/api/v3/jobReport/details?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://ws.synchroteam.com/api/v3/jobReport/details?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);
    

    Example Response

    [
        {
            "id": 3275,
            "name": "Sample Block 1",
            "isShared": false,
            "iteration": 0,
            "isMandatory": true,
            "position": 0,
            "items": [
                {
                    "id": 10363,
                    "type": "text",
                    "name": "Item name 1",
                    "isMandatory": false,
                    "isPrivate": false,
                    "conditionByItem": 0,
                    "conditionValue": "",
                    "position": 1,
                    "value": "sample value",
                    "comment": "hey, this is a comment!",
                    "issue": "Issue Reported"
                },
                {
                    "id": 10364,
                    "type": "list",
                    "name": "Item name 2",
                    "isMandatory": true,
                    "isPrivate": false,
                    "conditionByItem": 0,
                    "conditionValue": "",
                    "position": 2,
                    "value": "In the street",
                    "comment": "",
                    "issue": "Resolved"
                }
            ]
        },
        {
            "id": 3276,
            "blockName": "Sample Block 2",
            "isShared": false,
            "iteration": 0,
            "isMandatory": true,
            "position": 2,
            "items": [
                {
                    "id": 10365,
                    "type": "list",
                    "name": "Do we need to intervene?",
                    "isMandatory": false,
                    "isPrivate": false,
                    "conditionByItem": 0,
                    "conditionValue": "",
                    "position": 1,
                    "value": "yes",
                    "comment": "",
                    "issue": "-"
                },
                {
                    "id": 10366,
                    "type": "date",
                    "name": "Date for next visit",
                    "isMandatory": false,
                    "isPrivate": false,
                    "conditionByItem": 10365,
                    "conditionValue": "yes",
                    "position": 2,
                    "value": "",
                    "comment": "",
                    "issue": "-"
                }
            ]
        }
    ]
    

    HTTP Request

    GET /api/v3/jobReport/details?{paramType}={paramValue}

    Query Parameters

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

    Request body

    none

    Response body

    Returns the job report if found.

    If the block is not found a 404 Error is returned.

    Report Templates

    Synchroteam supports different report templates each with customizable sections and items. The Job Report Templates API allows you to consult which templates are available along with their internal structure (blocks and items in each block).

    The report template object

    JSON Representation

    {
        "id":45690,
        "name":"Sample Job Report Template",
        "isPublished":true,
        "isDefault":false,
        "blocks":[
          {
            "id":4986
            "name":"Satisfaction Survey",
            "isShared":false,
            "position":0,
            "min":1,
            "max":1,
            "items":[
              {
                "id":3421,
                "type":"list",
                "name": "Pick a value",
                "isMandatory": false,
                "isPrivate": false,
                "conditionByItem": null,
                "conditionValue": null,
                "position": 0,
                "listValues": [
                    "not very",
                    "somewhat",
                    "very"
                ]
              },
              {
                "id":3422,
                "type":"numeric",
                "name": "How many?",
                "isMandatory": true,
                "isPrivate": false,
                "conditionByItem": null,
                "conditionValue": null,
                "position": 1,
                "listValues": null
              }
            ]
          },
          {
            "id":4992
            "name":"Window",
            "isShared":true,
            "position":1,
            "min":0,
            "max":0,
            "items":[
              <item object>,
              <item object>,
              (...),
              <item object>
            ]
          }
        ]
    }
    

    Report Template Object

    Field Type Description
    id int Job Report Template id
    name string Job Report Template name
    isPublished boolean Whether or not the template is published
    isDefault boolean Whether or not the template is the default template
    blocks list of blocks each containing a list of items.

    NB: Blocks defined inside a Job Report Template contain three additional fields: min, max and isMandatory

    NB2: Blocks defined inside a Job Report Template do not contain the field: isPublished. This field only has a meaning for shared blocks. If a shared block is inside a job report template, it has to be in a published state.§

    Retrieve a report template

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/jobReportTemplate/details?id=45690' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/jobReportTemplate/details"
    
    querystring = {"id":"45690"}
    
    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://ws.synchroteam.com/api/v3/jobReportTemplate/details?id=45690",
      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://ws.synchroteam.com/api/v3/jobReportTemplate/details");
    
    req.query({
      "id": "45690"
    });
    
    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://ws.synchroteam.com/api/v3/jobReportTemplate/details?id=45690")
    
    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://ws.synchroteam.com/api/v3/jobReportTemplate/details?id=45690")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/jobReportTemplate/details?id=45690");
    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);
    

    Example Response

    {
      "id":45690,
      "name":"Sample Job Report Template",
      "isPublished":true,
      "isDefault":false,
      "blocks":[
        {
          "id":4986
          "name":"Satisfaction Survey",
          "isShared":false,
          "isMandatory":true,
          "position":0,
          "min":1,
          "max":1,
          "items":[
            <item object>,
            <item object>,
            (...),
            <item object>
          ]
        },
        {
          "id":4992
          "name":"Window",
          "isShared":true,
          "isMandatory":false,
          "position":1,
          "min":0,
          "max":0,
          "items":[
            <item object>,
            <item object>,
            (...),
            <item object>
          ]
        }
      ]
    }
    

    HTTP Request

    GET /api/v3/jobReportTemplate/details?{paramType}={paramValue}

    Query Parameters

    Parameter Default Description
    {paramType} string Parameter name. Accepts id (Job Report Template id)
    {paramValue} string id

    Request body

    none

    Response body

    Returns the report template if found.

    If the report template is not found a 404 Error is returned.

    List job report templates

    Sample Code

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/jobReportTemplate/list \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/jobReportTemplate/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://ws.synchroteam.com/api/v3/jobReportTemplate/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://ws.synchroteam.com/api/v3/jobReportTemplate/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://ws.synchroteam.com/api/v3/jobReportTemplate/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://ws.synchroteam.com/api/v3/jobReportTemplate/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://ws.synchroteam.com/api/v3/jobReportTemplate/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);
    

    Example Response

    {
      "page":1,
      "pageSize":25,
      "records":8,
      "recordsTotal":8,
      "data":[
        {<job report template object without blocks>},
        {<job report template object without blocks>},
        ...
        {<job report template object without blocks>}
      ]
    }
    

    You can list available job report templates via the API.

    HTTP Request

    GET /api/v3/jobReportTemplate/list

    Query Parameters

    Parameter Type Description
    name string search by name - a wildcard search is performed
    isPublished boolean get published or unpublished job report templates
    sort string sort order, takes one value: name (Optional. Default is name)
    sortOrder string takes one of two values: ascending or descending (Optional. Default is ascending)

    Add pagination parameters if needed.

    Request body

    None

    Response body

    The list of job report templates. Each template will not show the blocks. An additional property called numBlocks is provided to show the number of blocks in each job report template.

    If none are found, an empty list is returned.

    Blocks

    The block object

    JSON Representation

    {
        "id":4986
        "name":"Satisfaction Survey",
        "isShared":false,
        "isPublished":true,
        "items":[
            {
                "id":3421,
                "type":"list",
                "name": "Pick a value",
                "isMandatory": false,
                "isPrivate": false,
                "conditionByItem": null,
                "conditionValue": null,
                "position": 0
            },
            {
                "id":3422,
                "type":"numeric",
                "name": "Number of doors",
                "isMandatory": true,
                "isPrivate": false,
                "conditionByItem": null,
                "conditionValue": null,
                "position": 1,
            },
            (...)
        ]
    }
    

    A block is represented by the following fields

    Field Type Description
    id int ID of the block
    name string Name of the block
    isPublished int Defines if the block is published (1) or not (0).
    isShared int Defines if the block is shared (1) or not (0).
    items list of items in the block, ordered by position.

    The item object

    JSON Representation

    {
        "id":3423,
        "type":"list",
        "name": "How happy are you?",
        "isMandatory": true,
        "isPrivate": false,
        "conditionByItem": 3549,
        "conditionValue": "1",
        "position": 1,
        "listValues": [
            "not very",
            "somewhat",
            "very"
        ]
    }
    

    An item is represented by the following fields

    Report Design Fields

    Field Type Description
    id int item id
    name string Name of the item
    type string one of: compliance, list, text, date, time, numeric, signature, picture
    isMandatory boolean Indicates if the item is mandatory.
    isPrivate boolean Indicates if the item is mandatory.
    conditionByItem int id of the item the current item depends on. O if there are no dependencies
    conditionValue string Value held in conditionByItem for the current item to be shown
    position int item position inside parent block. Starts at 0.
    listValues string array List of every possible value if the item is of type list. (defaults to null)

    Stored Values

    When viewing a job report inside a job (versus a template), these fields are added to the output

    Field Type Description
    value string value stored for the report item
    comment string comment stored for the report item
    issue string One of: Issue Reported, Resolved, None or - (meaning unspecified)

    Retrieve a block

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/block/details?id=45690' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/block/details"
    
    querystring = {"id":"45690"}
    
    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://ws.synchroteam.com/api/v3/block/details?id=45690",
      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://ws.synchroteam.com/api/v3/block/details");
    
    req.query({
      "id": "45690"
    });
    
    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://ws.synchroteam.com/api/v3/block/details?id=45690")
    
    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://ws.synchroteam.com/api/v3/block/details?id=45690")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/block/details?id=45690");
    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);
    

    Example Response

    {
        "id":4986
        "name":"Satisfaction Survey",
        "isShared":false,
        "isPublished":true,
        "items":[
            <item object>,
            <item object>,
            (...),
            <item object>
        ]
    }
    

    HTTP Request

    GET /api/v3/block/details?{paramType}={paramValue}

    Query Parameters

    Parameter Default Description
    {paramType} string Parameter name. Accepts id
    {paramValue} string id

    Request body

    none

    Response body

    Returns the block if found.

    If the block is not found a 404 Error is returned.

    List shared blocks

    Sample Code

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/block/list \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/block/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://ws.synchroteam.com/api/v3/block/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://ws.synchroteam.com/api/v3/block/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://ws.synchroteam.com/api/v3/block/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://ws.synchroteam.com/api/v3/block/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://ws.synchroteam.com/api/v3/block/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);
    

    Example Response

    {
      "page":1,
      "pageSize":25,
      "records":4,
      "recordsTotal":4,
      "data":[
        {<block object without items>},
        {<block object without items>},
        ...
        {<block object without items>}
      ]
    }
    

    Job Report Templates contain blocks that are uniquely tied to that particular report template.

    However, shared blocks are also available and can be added to a Job Report Type, or a Job Report. Shared blocks also have the option of being repeatable (e.g. A maintenance job may require recording information for more than one window or door).

    You can only list available shared blocks via the API.

    HTTP Request

    GET /api/v3/block/list

    Query Parameters

    Add pagination parameters if needed.

    Request body

    None

    Response body

    The list of shared blocks. Each shared block will not show the items. An additional property called numItems is provided to show the number of items in each shared block.

    If none are found, an empty list is returned.

    Recurrences

    The Recurrence object

    JSON Representation

    {
        "id": 123456,
        "myId": null,
        "num": 669,
        "description": "Annual Maintenance",
        "priority": "medium",
        "customer": {
            "id": 981232,
            "name": "ST Corp",
            "myId": ""
        },
        "site": {
            "id": 98123,
            "name": "Main Office",
            "myId": ""
        },
        "equipment": {
            "id": 1654952,
            "name": "Heat Pump #129349",
            "myId": ""
        },
        "type": {
            "id": 26565,
            "name": "Maintenance Air conditioning"
        },
        "reportTemplate": {
            "id": 4488,
            "name": "modèle par défaut"
        },
        "createdBy": {
            "id": 48984,
            "name": "William DELANO",
            "login": "william"
        },
        "address": "360 NW 27th St, Miami, FL 33127, États-Unis",
        "addressStreet": "360 Northwest 27th Street",
        "addressComplement": null,
        "addressCity": "Miami",
        "addressProvince": "Florida",
        "addressZIP": "33127",
        "addressCountry": "United States",
        "position": {
            "latitude": "25.8019892",
            "longitude": "-80.20158099999"
        },
        "contactFirstName": "John",
        "contactLastName": "Smith",
        "contactMobile": "+33623456789",
        "contactPhone": "+33123456789",
        "contactEmail": "jsmith@stcorp.com",
        "dateStart": "2022-03-01 00:00",
        "dateEnd": null,
        "frequency": 1,
        "frequencyLevel": "year",
        "days": "2",
        "duration": "01:00:00",
        "customFields": [
            {
                "id": 6542123,
                "label": "Installation Date",
                "value": "2019-04-17"
            }
        ],
        "preferences": {
            "schedulingWindow": {
                "id": 786786,
                "name": "Afternoon"
            },
            "team": {
                "id": 2455,
                "name": "Maintenance"
            },
            "user": {
                "id": null,
                "name": " "
            },
            "autoScheduleDays": 14,
            "flAutoSchedule": true,
            "specificTime": null
        },
        "isClosed": false,
        "idContract": null,
        "dateDeleted": null
    }
    

    A Recurrence is represented by the following fields

    Field Type Description
    id integer recurrence's ID (read only system ID)
    myId string Custom recurrence ID (e.g. can reference your internal recurrence ID)
    num integer Number of the recurrence
    description string Recurrence Description
    priority string Recurrence priority: low,medium or high. Default is medium.
    customer object Object containing id, name and myId customer fields (id or myId required when creating a Recurrence)
    site object Object containing id, name and myId site fields (id or myId of a customer or site are required when creating a new Recurrence)
    equipment object Object containing id, name and myId equipment fields (optional)
    type object Object containing id and name for the job type.
    reportTemplate object Object containing id and name for the job report template
    createdBy object Object containing id, login or name for the user that created the recurrence
    address string Complete Address
    addressStreet string Street address
    addressComplement string Complementary street address information
    addressZIP string Address zip code
    addressCity string Address city
    addressProvince string Address province/state
    addressCountry string Address country
    position position associated with the jobs. (optional)
    contactFirstName string Contact First Name
    contactLastName string Contact Last Name
    contactMobile string Contact Mobile Number
    contactPhone string Contact Phone Number
    contactEmail string Contact Email Address
    dateStart date Start Date for the Recurrence Contract
    dateEnd date End Date for the Recurrence Contract (optional)
    frequencyLevel string Recurrence frequency : day,week,month or year
    frequency integer Frequency for Job Creation : A job need to be scheduled every frequency frequencyLevel (e.g "every 2 years")
    days list of int Days in the Week to schedule the Job. 1 for Monday, 2 for Tuesday,... (e.g "2,5" means Tuesday AND Friday)
    duration string Duration for each Job (Read-only - inherited from Job Type duration)
    customFields list List of custom field values for Jobs
    preferences object Job Scheduling Preferences for the recurrence
    isClosed boolean whether or not the recurrence has been closed
    dateDeleted datetime Deletion date
    idContract integer linked contract id

    Retrieve a Recurrence

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/recurrence/details?id=123456' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/recurrence/details"
    
    querystring = {"id":"123456"}
    
    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://ws.synchroteam.com/api/v3/recurrence/details?id=123456",
      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://ws.synchroteam.com/api/v3/recurrence/details");
    
    req.query({
      "id": "123456"
    });
    
    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://ws.synchroteam.com/api/v3/recurrence/details?id=123456")
    
    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://ws.synchroteam.com/api/v3/recurrence/details?id=123456")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("cache-control", "no-cache")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/recurrence/details?id=123456");
    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);
    

    Example Response

    {
        "id": 123456,
        "myId": null,
        "num": 669,
        "description": "Annual Maintenance",
        "priority": "medium",
        "customer": {
            "id": 981232,
            "name": "ST Corp",
            "myId": ""
        },
        "site": {
            "id": 98123,
            "name": "Main Office",
            "myId": ""
        },
        "equipment": {
            "id": 1654952,
            "name": "Heat Pump #129349",
            "myId": ""
        },
        "type": {
            "id": 26565,
            "name": "Maintenance Air conditioning"
        },
        "reportTemplate": {
            "id": 4488,
            "name": "modèle par défaut"
        },
        "createdBy": {
            "id": 48984,
            "name": "William DELANO",
            "login": "william"
        },
        "address": "360 NW 27th St, Miami, FL 33127, États-Unis",
        "addressStreet": "360 Northwest 27th Street",
        "addressComplement": null,
        "addressCity": "Miami",
        "addressProvince": "Florida",
        "addressZIP": "33127",
        "addressCountry": "United States",
        "position": {
            "latitude": "25.8019892",
            "longitude": "-80.20158099999"
        },
        "contactFirstName": "John",
        "contactLastName": "Smith",
        "contactMobile": "+33623456789",
        "contactPhone": "+33123456789",
        "contactEmail": "jsmith@stcorp.com",
        "dateStart": "2022-03-01 00:00",
        "dateEnd": null,
        "frequency": 1,
        "frequencyLevel": "year",
        "days": "2",
        "duration": "01:00:00",
        "customFields": [customfieldvalue1,...],
        "preferences": {
            "schedulingWindow": {
                "id": 786786,
                "name": "Afternoon"
            },
            "team": {
                "id": 2455,
                "name": "Maintenance"
            },
            "user": {
                "id": null,
                "name": " "
            },
            "autoScheduleDays": 14,
            "flAutoSchedule": true,
            "specificTime": null
        },
        "isClosed": false,
        "idContract": null,
        "dateDeleted": null
    }
    

    HTTP Request

    GET /api/v3/recurrence/details?{paramType}={paramValue}

    Request Parameters

    Parameter Default Description
    {paramType} string Parameter name. Accepts id
    {paramValue} string The id of the recurrence

    Request body

    none

    Response body

    Returns the Recurrence if the id is found.

    If the recurrence is not found a 404 Error is returned.

    Delete a Recurrence

    curl --request DELETE \
      --url 'https://ws.synchroteam.com/api/v3/recurrence/delete?id=4494' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/recurrence/delete"
    
    querystring = {"id":4494}
    
    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://ws.synchroteam.com/api/v3/recurrence/delete?id=4494",
      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://ws.synchroteam.com/api/v3/recurrence/delete");
    
    req.query({
      "id": 4494
    });
    
    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://ws.synchroteam.com/api/v3/recurrence/delete?id=4494")
    
    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://ws.synchroteam.com/api/v3/recurrence/delete?id=4494")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/recurrence/delete?id=4494");
    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

    {
        "id": 4494,
        "isDeleted": true
    }
    

    HTTP Request

    DELETE /api/v3/recurrence/delete

    Query Parameters

    Parameter Default Description
    id integer ID of the recurrence

    Request body

    none

    Response body

    Returns recurrence id with a isDeleted parameter set to true on success. If no recurrence found, a 404 error is returned.

    Close a Recurrence

    curl --request PUT \
      --url 'https://ws.synchroteam.com/api/v3/recurrence/close?id=4494' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/recurrence/close"
    
    querystring = {"id":4494}
    
    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://ws.synchroteam.com/api/v3/recurrence/close?id=4494",
      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://ws.synchroteam.com/api/v3/recurrence/close");
    
    req.query({
      "id": 4494
    });
    
    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://ws.synchroteam.com/api/v3/recurrence/close?id=4494")
    
    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://ws.synchroteam.com/api/v3/recurrence/close?id=4494")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/recurrence/close?id=4494");
    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

    {
        "id": 4494,
        "isClosed": true
    }
    

    HTTP Request

    PUT /api/v3/recurrence/close

    Query Parameters

    Parameter Default Description
    id integer ID of the recurrence

    Request body

    none

    Response body

    Returns recurrence id with a isClosed parameter set to true on success. If no recurrence found, a 404 error is returned.

    List Recurrences

    List all recurrences. Search parameters can be provided.

    If no parameters are given, will return all active recurrences.

    Sample Code

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/recurrence/list?dateFrom=2022-01-01&show=ongoing' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/recurrence/list"
    
    querystring = {"dateFrom":"2022-01-01","show":"ongoing"}
    
    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://ws.synchroteam.com/api/v3/recurrence/list?dateFrom=2022-01-01&show=ongoing",
    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://ws.synchroteam.com/api/v3/recurrence/list");
    
    req.query({
      "dateFrom":"2022-01-01","show":"ongoing"
    });
    
    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://ws.synchroteam.com/api/v3/recurrence/list?dateFrom=2022-01-01&show=ongoing")
    
    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://ws.synchroteam.com/api/v3/recurrence/list?dateFrom=2022-01-01&show=ongoing")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("cache-control", "no-cache")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/recurrence/list?dateFrom=2022-01-01&show=ongoing");
    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);
    

    Example Response

    {
      "page":1,
      "pageSize":25,
      "records":16,
      "recordsTotal":16,
      "data":[
        {<recurrence object>},
        {<recurrence object>},
        ...
        {<recurrence object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/recurrence/list

    Request Parameters

    Parameter Type Description
    dateFrom date return recurrences that start after dateFrom
    dateTo date return recurrences that end before dateTo
    show string accepts one of both values: ongoing, or closed (default: ongoing)
    customer_id integer return recurrences belonging to a customer by customer id
    customer_myId integer return recurrences belonging to a customer by customer myId
    site_id integer return recurrences belonging to a site by site id
    site_myId integer return recurrences belonging to a site by site myId
    equipment_id integer return recurrences belonging to a piece of equipment by equipment id
    equipment_myId integer return recurrences belonging to a piece of equipment by equipment myId
    type_id integer Get recurrences using a specific Job Type, by jobtype id
    type_name string Get recurrences using a specific Job Type, by jobtype name
    reportTemplate_id integer Get recurrences using a specific Job Report Template, by report id
    reportTemplate_name string Get recurrences using a specific Job Report Template, by report name

    Add pagination parameters if needed.

    Response body

    A list of recurrences found.

    If none are found, an empty list is returned.

    Create/Update a recurrence

    Synchroteam provides a single endpoint to handle creating or updating recurrences. The API determines if the user record already exists by checking values provide for id, myId, and/or num.

    Example Request (POST Body)

    {
        "description": "Visit twice a month",
        "priority": "high",
        "client": {
            "name": "ST Corp"
        },
        "type": {
            "name": "Medical assistance"
        },
        "address": "360 NW 27th St, Miami, FL 33127, États-Unis",
        "dateStart": "2022-03-01 00:00",
        "dateEnd": "2022-04-28 00:00",
        "frequency": 2,
        "frequencyLevel": "week",
        "days": "1,5"
    }
    

    Sample Code

    curl --request POST \
      --url 'https://ws.synchroteam.com/api/v3/user/send' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{"description":"Visit twice a month","priority":"high",...}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/user/send"
    
    payload = "{\"description\":\"Visit twice a month\",\"priority\":\"high\",...}"
    headers = {
        'content-type': "application/json",
        'accept': "text/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://ws.synchroteam.com/api/v3/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 => "{\"description\":\"Visit twice a month\",\"priority\":\"high\",...}",
      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://ws.synchroteam.com/api/v3/user/send");
    
    
    req.headers({
      "cache-control": "no-cache",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
      "accept": "text/json",
      "content-type": "application/json"
    });
    
    req.type("json");
    req.send({
      "description": "Visit twice a month",
      "priority": "high",
      (...)
    });
    
    req.end(function (res) {
      if (res.error) throw new Error(res.error);
    
      console.log(res.body);
    });
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://ws.synchroteam.com/api/v3/user/send")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["content-type"] = 'application/json'
    request["accept"] = 'text/json'
    request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
    request["cache-control"] = 'no-cache'
    request.body = "{\"description\":\"Visit twice a month\",\"priority\":\"high\",...}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/user/send")
      .header("content-type", "application/json")
      .header("accept", "text/json")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("cache-control", "no-cache")
      .body("{\"description\":\"Visit twice a month\",\"priority\":\"high\",...}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/user/send");
    var request = new RestRequest(Method.POST);