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
  • Timeline
  • Tasks
  • 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 Type 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 Type 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:

    Send Custom Fields

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

    POST Body

    {
        "Job": {
            "num": "24789"
        },
        "CustomFieldValues": [
            {
                "id": 6420,
                "label": "text",
                "value": "test"
            },
            {
                "id": 6418,
                "label": "case à cocher",
                "value": "0"
            }
        ]
    }
    

    Sample Code

    curl --location --request POST 'https://ws.synchroteam.com/api/v3/customfield/send' \
    --header 'Authorization: Basic ZGVtbzo1Y2MyODM4MS01ZTM0LTQ0YWUtYjk1MC05MWI1MDQxMTA3ZTE=' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-raw '"Job": { "num": "24789" }, "CustomFieldValues": [...]'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/customfield/send"
    
    payload = "{\"Job\": { \"num\": \"24789\" }, \"CustomFieldValues\": [...]"
    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/customfield/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 => "{\"Job\": { \"num\": \"24789\" }, \"CustomFieldValues\": [...]",
      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/customfield/send");
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
      "Job": { 
        "num": "24789" 
      },
      "CustomFieldValues": [...]
      });
    
    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/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 = "{\"Job\": { \"num\": \"24789\" }, \"CustomFieldValues\": [...]}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/customfield/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("{\"Job\": { \"num\": \"24789\" }, \"CustomFieldValues\": [...]}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/customfield/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", "{\"Job\": { \"num\": \"24789\" }, \"CustomFieldValues\": [...]}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
        "CustomFieldValues": [
            {
                "id": 6419,
                "label": "email",
                "value": "test@gmail.com"
            },
            {
                "id": 6420,
                "label": "text",
                "value": "test"
            },
            {
                "id": 6418,
                "label": "case à cocher",
                "value": "0"
            }
        ]
    }
    

    HTTP Request

    POST /api/v3/customfield/send

    Request Body

    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"],
        "active": true
    }
    

    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)
    active boolean Whether or not the customer is activated

    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 Type 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"],
        "dateModified": "2023-09-05 19:03",
        "dateCreated": "2023-07-28 20:01",
        "active": true
    }
    

    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 Type 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 Type 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
    active boolean search by active customers
    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.

    Activate a customer

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

    {
        "customersActivated": [
            {
                "id": 2711750,
                "isActivated": true
            }
        ]
    }
    

    HTTP Request

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

    Query Parameters

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

    Request body

    none

    Response body

    Returns a list of objects with a activated 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 an activation 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 activated.

    Desactivate a customer

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

    {
        "customersDesactivated": [
            {
                "id": 2711750,
                "isDesactivated": true
            }
        ]
    }
    

    HTTP Request

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

    Query Parameters

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

    Request body

    none

    Response body

    Returns a list of objects with a desactivated 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 desactivation 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 desactivated.

    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)
    active boolean Whether or not the site is activated

    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 Type 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" : [],
      "dateModified": "2023-09-05 19:03",
      "dateCreated": "2023-07-28 20:01",
      "active": true
    }
    

    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 Type 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 Type 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 string return sites belonging to a customer by customer myId
    active boolean search by active sites
    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.

    Activate a site

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

    {
        "SitesActivated": [
            {
                "id": 1579434,
                "isActivated": true
            }
        ]
    }
    

    HTTP Request

    POST /api/v3/site/activate

    Query Parameters

    Parameter Type 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 activated 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 an activation 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 activated.

    Desactivate a site

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

    {
        "SitesDesactivated": [
            {
                "id": 1579434,
                "isDesactivated": true
            }
        ]
    }
    

    HTTP Request

    POST /api/v3/site/desactivate

    Query Parameters

    Parameter Type 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 desactivated 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 desactivation 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 desactivated.

    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)
    active boolean Whether or not the equipment is activated

    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 Type 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"],
      "dateModified": "2023-09-05 19:03",
      "dateCreated": "2023-07-28 20:01",
      "active": true
    }
    

    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 Type 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 Type 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 string return equipment belonging to a customer by customer myId
    site_id integer return equipment belonging to a site by site id
    site_myId string return equipment belonging to a site by site myId
    active boolean search by active customers
    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.

    Activate an equipment

    curl --request POST \
      --url 'https://ws.synchroteam.com/api/v2/equipment/activate?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/activate"
    
    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/activate?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/activate");
    
    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/activate?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/activate?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/activate?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

    {
        "EquipmentsActivated": [
            {
                "id": 1579434,
                "isActivated": true
            }
        ]
    }
    

    HTTP Request

    POST /api/v3/equipment/activate

    Query Parameters

    Parameter Type 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 activated 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 an activation 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 activated.

    Desactivate an equipment

    curl --request POST \
      --url 'https://ws.synchroteam.com/api/v2/equipment/desactivate?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/desactivate"
    
    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/desactivate?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/desactivate");
    
    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/desactivate?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/desactivate?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/desactivate?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

    {
        "EquipmentsDesactivated": [
            {
                "id": 1579434,
                "isDesactivated": true
            }
        ]
    }
    

    HTTP Request

    POST /api/v3/equipment/desactivate

    Query Parameters

    Parameter Type 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 desactivated 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 desactivation 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 desactivated.

    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
    geocoding boolean Whether or not the geocoding is activated (true by default)

    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 Type 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 Type 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 string Filter by current job status (created, scheduled, synchronized, started, paused, completed, validated or cancelled), one or more status separated by commas are allowed.
    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 string return jobs belonging to a customer by customer myId
    site_id integer return jobs belonging to a site by site id
    site_myId string 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 string 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 Type 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.

    NB: You can re-schedule the suspended job to another technician.

    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 Type 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 Type 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",
        "validateBy": {
           "id": 57246,
           "login": "johndoe"
        }
    }
    

    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","validateBy": {"id": 57246,"login": "johndoe"}}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/job/validate"
    
    payload = "{\"id\": \"265_160719144323649\",\"validateBy\": {\"id\": 57246,\"login\": \"johndoe\"}}"
    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\",\"validateBy\": {\"id\": 57246,\"login\": \"johndoe\"}}",
      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","validateBy": {"id": 57246,"login": "johndoe"}});
    
    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\",\"validateBy\": {\"id\": 57246,\"login\": \"johndoe\"}}"
    
    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\",\"validateBy\": {\"id\": 57246,\"login\": \"johndoe\"}}")
      .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\",\"validateBy\": {\"id\": 57246,\"login\": \"johndoe\"}}", 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 Type Description
    id string ID of the job
    myId string Your custom reference number for this job
    num integer Number of the job
    validateBy object Object containing id or login of the user who validates the job

    Response body

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

    Start a job

    Start a job using id, myId or num and `actualStartv (default value = Date Time Now)

    Example POST Body

    {
        "id": "f9d0cb7b-ef8e-4f36-807f-21bcd47d53b7",
        "actualStart":"2023-08-19 13:20"
    }
    

    Sample Code

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

    [
        "job": {
            "id": "f9d0cb7b-ef8e-4f36-807f-21bcd47d53b7",
            "myId": null,
            "num": 2966
        },
        "startDate":"2023-08-19 13:20"
        "status": "started"
    ]
    

    HTTP Request

    POST /v3/job/start

    Request body

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

    Parameter Type 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 started job, showing the job, startDate and status.

    NB: If the job technician already has another started job, the latter is paused.

    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 Type 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 Type 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 Type 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 Type 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.

    Send job type

    Synchroteam provides a single endpoint to handle adding a Job Type. The Job Type is identified by its id or name.

    POST Body

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

    Sample Code

    curl --location --request POST 'https://ws.synchroteam.com/api/v3/jobtype/send' \
    --header 'Authorization: Basic ZGVtbzo1Y2MyODM4MS01ZTM0LTQ0YWUtYjk1MC05MWI1MDQxMTA3ZTE=' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-raw '{\"id\": 7464, \"name\": \"Repair\", \"duration\": \"01:00:00\", ...}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/jobtype/send"
    
    payload = "{\"id\": 7464, \"name\": \"Repair\", \"duration\": \"01:00:00\", ...}"
    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/jobtype/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\": 7464, \"name\": \"Repair\", \"duration\": \"01:00:00\", ...}",
      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/jobtype/send");
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
        "id": 7464,
        "name": "Repair",
        "duration": "01:00:00",
        "isDefault": false,
        "priority": "medium",
        "customHeader": null,
        "customLogoUrl": null,
        "defaultJobReport": {
            "id": 7880,
            "name": "Maintenance"
        },
        "skills":["Plumber","Electrician"]
    }
    );
    
    req.end(function (res) {
      if (res.error) throw new Error(res.error);
    
      console.log(res.body);
    });
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://ws.synchroteam.com/api/v3/jobtype/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\": 7464, \"name\": \"Repair\", \"duration\": \"01:00:00\", ...}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/jobtype/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\": 7464, \"name\": \"Repair\", \"duration\": \"01:00:00\", ...}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/jobtype/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\": 7464, \"name\": \"Repair\", \"duration\": \"01:00:00\", ...}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
        "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

    POST /api/v3/jobtype/send

    Request Body

    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 Type 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 Type 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 Type 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 Type 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 Type 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 Type 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 string return recurrences belonging to a customer by customer myId
    site_id integer return recurrences belonging to a site by site id
    site_myId string 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 string 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);
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
    request.AddHeader("accept", "text/json");
    request.AddHeader("content-type", "application/json");
    request.AddParameter("application/json", "{\"description\":\"Visit twice a month\",\"priority\":\"high\",...}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    Example Response

    {
        "id": 9846542,
        "myId": null,
        "num": 672,
        "description": "Visit twice a month",
        "priority": "high",
        "client": {
            "id": 4545816,
            "name": "ST Corp",
            "myId": ""
        },
        "site": {
            "id": null,
            "myId": ""
        },
        "equipment": {
            "id": null,
            "myId": ""
        },
        "type": {
            "id": 456456,
            "name": "Medical assistance"
        },
        "reportTemplate": {
            "id": 33878,
            "name": "Medical report"
        },
        "address": "360 NW 27th St, Miami, FL 33127, États-Unis",
        "addressStreet": "360 Northwest 27th Street",
        "addressComplement": null,
        "addressCity": "Miami",
        "addressProvince": "Miami-Dade County Florida",
        "addressZIP": "33127",
        "addressCountry": "United States",
        "position": {
            "latitude": "25.8019892",
            "longitude": "-80.20158099999"
        },
        "contactFirstName": null,
        "contactLastName": null,
        "contactMobile": null,
        "contactPhone": null,
        "contactEmail": null,
        "dateStart": "2022-03-01 00:00",
        "dateEnd": "2022-04-28 00:00",
        "frequency": 2,
        "frequencyLevel": "week",
        "days": "1,5",
        "duration": "02:00:00",
        "customFields": [],
        "preferences": {
            "schedulingWindow": {
                "id": null,
                "name": ""
            },
            "team": {
                "id": null
            },
            "user": {
                "id": null,
                "name": " "
            },
            "autoScheduleDays": 0,
            "flAutoSchedule": false,
            "specificTime": null
        },
        "flClosed": false,
        "idContract": null,
        "contactFax": null,
        "dateDeleted": null
    }
    

    HTTP Request

    POST /api/v3/recurrence/send

    Request Body

    recurrence information in JSON format, if id, myId or num exists, the recurrence will be updated, if not the recurrence will be created.

    Response Body

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

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

    Positions

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

    DESCRIPTION

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

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

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

    A representation of a position has the following fields :

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

    METHODS

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

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

    Users

    The user object

    JSON Representation

    {
        "id":54022,
        "firstName": "John",
        "lastName": "Doe",
        "login": "login_user",
        "phone": "(719) 388-1966",
        "profile": "technician",
        "email": "djohn@gmail.com",
        "language": "EN",
        "password": "123456abc",
        "startLocation": {
            "fullAddress": "411 Pearl St, New York, NY 10038, USA",
            "latitude": "40.7115539",
            "longitude": "-74.0035686"
        },
        "lastLocation": {
            "latitude": "40.726539",
            "longitude": "-73.859565",
            "datetime": "2019-04-02 16:28:45"
        },
        "customFieldValues": [
            {
                "id":85
                "label": "Sector",
                "value": "OD 89874 sector"
            },
            {
                "id": 88
                "label": "Contract Number"
                "value": "1547-TRH-402937",
            }
        ],
        "teams":["team5","team87"],
        "skilledTrades": [
            "plumber","electrician"
        ],
        "deleted": null,
        "lastConnection": "2020-10-14 12:53",
        "timezone": "Romance Standard Time"
    }
    

    An user is represented by the following fields

    Field Type Description
    id integer user's ID (read only system ID)
    firstName string First name
    lastName string Last name
    login string Login name
    password string Password of the user account (Write only - required when creating or updating)
    language string Language code for the user (possible value: EN,FR,ES,RO,CZ)
    email string Email address
    phone string Phone number
    profile string User level : technician, administrator, manager
    customFieldValues list List of custom field values for this user (optional)
    skilledTrades list(string) List of skilled for this user (optional)
    teams list(string) List of teams memberships for this user
    startLocation object User location information, containing these properties: fullAddress and latitude and longitude
    lastLocation object User last location based on GPS Tracking, containing these properties: latitude, longitude and datetime
    deleted date Deletion date. set to null if user record is active
    lastConnection date The last Date & Time connection (read-only)
    timezone string The Time Zone of the User - by default the Time zone of the Account

    Retrieve a user

    curl --request GET \
        --url 'https://ws.synchroteam.com/api/v3/user/details?id=54022' \
        --header 'accept: text/json' \
        --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
        --header 'cache-control: no-cache' \
        --header 'content-type: application/json' 
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/user/details"
    
    querystring = {"id":"54022"}
    
    headers = {
        'accept': "text/json",
        'content-type': "application/json",
        'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
        'cache-control': "no-cache"
    }
    
    response = requests.request("GET", url, headers=headers, params=querystring)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://ws.synchroteam.com/api/v3/user/details?id=54022",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => "",
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 30,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => array(
            "accept: text/json",
            "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
            "cache-control: no-cache",
            "content-type: application/json"
        ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    ?>
    
    var unirest = require("unirest");
    
    var req = unirest("GET", "https://ws.synchroteam.com/api/v3/user/details");
    
    req.query({
        "id": "54022"
    });
    
    req.headers({
        "cache-control": "no-cache",
        "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
        "content-type": "application/json",
        "accept": "text/json"
    });
    
    
    req.end(function (res) {
        if (res.error) throw new Error(res.error);
    
        console.log(res.body);
    });
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://ws.synchroteam.com/api/v3/user/details?id=54022")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accept"] = 'text/json'
    request["content-type"] = 'application/json'
    request["authorization"] = 'Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB'
    request["cache-control"] = 'no-cache'
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.get("https://ws.synchroteam.com/api/v3/user/details?id=54022")
        .header("accept", "text/json")
        .header("content-type", "application/json")
        .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
        .header("cache-control", "no-cache")
        .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/user/details?id=54022");
    var request = new RestRequest(Method.GET);
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
    request.AddHeader("content-type", "application/json");
    request.AddHeader("accept", "text/json");
    IRestResponse response = client.Execute(request);
    

    Example Response

    {
        "id": 54022,
        "firstName": "John",
        "lastName": "Doe",
        "login": "login_user",
        "phone": "(719) 388-1966",
        "profile": "technician",
        "email": "djohn@gmail.com",
        "language": "EN",
        "teams": [
        "team1",
        "team5"
        ],
        "skilledTrades": [
            "plumber",
            "electrician"
        ],
        "startLocation": {
            "fullAddress": "411 Pearl St, New York, NY 10038, USA",
            "latitude": "40.7115539",
            "longitude": "-74.0035686"
        },
        "lastLocation": {
            "latitude": "40.726539",
            "longitude": "-73.859565",
            "datetime": "2019-04-02 16:28:45"
        },
        "customFieldValues": [customfieldvalue1,...],
        "deleted": null,,
        "lastConnection": "2020-10-14 12:53",
        "lastSynchronization": "2023-07-02 16:20",
        "timezone": "Romance Standard Time"
    }
    

    HTTP Request

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

    Request Parameters

    Parameter Type Description
    {paramType} string Parameter name. Accepts login or id
    {paramValue} string The login or the id of the user
    {sort} string sort order, takes one of three values: login, dateModified (Optional. Default is login)
    {sortOrder} string takes one of two values: ascending or descending (Optional. Default is ascending)
    {phoneFormat} string takes one of two values: local or intl (Optional. Default is local)

    Request body

    none

    Response body

    Returns the user if the id or login is found.

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

    Create/Update a user

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

    Example Request (POST Body)

    {
        "firstName": "John",
        "lastName": "Doe",
        "login": "login_user",
        "phone": "(719) 388-1966",
        "profile": "technician",
        "email": "djohn@gmail.com",
        "language": "EN",
        "password": "123456abc",
        "startLocation": {
            "fullAddress": "411 Pearl St, New York, NY 10038, USA"
        },
        "customFieldValues": [
                {
                    "id":85
                    "label": "Sector",
                    "value": "OD 89874 sector"
                },
                {
                    "id": 88
                    "label": "Contract Number"
                    "value": "1547-TRH-402937",
                }
            ],
        "teams":["team5","team87"],
        "skilledTrades": ["plumber","electrician"],
        "timezone": "Romance Standard Time"
    }
    

    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 '{"id":54022, firstName":"John","lastName":"Doe", (...) }'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/user/send"
    
    payload = "{\"id\":54022,\"firstName\":\"John\", (...) }"
    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 => "{\"id\":54022,\"firstName\":\"John\",\"lastName\":\"Doe\", (...) }",
      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({
      "firstName": "John",
      "lastName": "Doe",
      (...)
    });
    
    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 = "{\"id\":54022,\"firstName\":\"John\",\"lastName\":\"Doe\", (...) }"
    
    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("{\"id\":54022,\"firstName\":\"John\",\"lastName\":\"Doe\", (...) }")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/user/send");
    var request = new RestRequest(Method.POST);
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
    request.AddHeader("accept", "text/json");
    request.AddHeader("content-type", "application/json");
    request.AddParameter("application/json", "{\"id\":54022,\"firstName\":\"John\",\"lastName\":\"Doe\", (...) }", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    Example Response

    {
        "id":54022,
        "firstName": "John",
        "lastName": "Doe",
        "login": "login_user",
        "phone": "(719) 388-1966",
        "profile": "technician",
        "email": "djohn@gmail.com",
        "language": "EN",
        "startLocation": {
          "fullAddress": "411 Pearl St, New York, NY 10038, USA",
          "latitude": "40.7115539",
          "longitude": "-74.0035686"
        },
        "lastLocation": {
            "latitude": "40.726539",
            "longitude": "-73.859565",
            "datetime": "2019-04-02 16:28:45"
        },
        "customFieldValues": [
            {
                "id":85
                "label": "Sector",
                "value": "OD 89874 sector"
            },
            {
                "id": 88
                "label": "Contract Number"
                "value": "1547-TRH-402937",
            }
        ],
        "teams":["team5","team87"],
        "skilledTrades": ["plumber","electrician"],
        "deleted": null,
        "lastConnection": "2020-10-14 12:53",
        "timezone": "Romance Standard Time"
    }
    

    HTTP Request

    POST /api/v3/user/send

    Request Body

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

    When creating a user, leave the id field out of the payload, or set to an null value.

    When updating a user, 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 user record, with the id field specified.

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

    Delete a user

    curl --request DELETE \
      --url 'https://ws.synchroteam.com/api/v3/user/delete?login=dave' \
      --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/user/delete"
    
    querystring = {"login":"dave"}
    
    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/user/delete?login=dave",
        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/user/delete");
    
    req.query({
        "login": "dave"
    });
    
    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/user/delete?login=dave")
    
    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/user/delete?login=dave")
        .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/user/delete?login=dave");
    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":50998
            "deleted":true
        }
    ]
    

    HTTP Request

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

    Request Parameters

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

    Response body

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

    List users

    List all users. Search parameters can be provided.

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

    Sample Code

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/user/list?teamId=23&skilledTrade=Electrician&show=all' \
      --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/user/list"
    
    querystring = {"teamId":23,"skilledTrade":"Electrician","show":"all"}
    
    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/user/list?teamId=23&skilledTrade=Electrician&show=all",
    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/user/list");
    
    req.query({
        "teamId":23,"skilledTrade":"Electrician","show":"all"
    });
    
    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/user/list?teamId=23&skilledTrade=Electrician&show=all")
    
    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/user/list?teamId=23&skilledTrade=Electrician&show=all")
        .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/user/list?teamId=23&skilledTrade=Electrician&show=all");
    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":[
            {<user object>},
            {<user object>},
            ...
            {<user object>}
        ]
    }
    

    HTTP Request

    GET /api/v3/user/list

    Request Parameters

    Parameter Type Description
    teamId int return users in the team with team ID
    teamName string return users in team name
    skilledTrade string return users having the skilled trade specified
    show string accepts one of three values: active, deleted or all (default: active)

    Add pagination parameters if needed.

    Response body

    A list of users found.

    If none are found, an empty list is returned.

    Teams

    The team object

    {
      "id":476,
      "name":"East Team",
      "description":"Team that works from the east end office",
      "numTechs":6,
      "numManagers":1,
      "tags":["maintenance","hvac"],
      "deleted":null
    }
    

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

    A team is represented by the following fields

    Field Type Description
    id integer ID of the team
    name string Name of the team
    description string Description given for the team
    numTechs int Number of currently active technicians in the team
    numManagers int Number of currently active managers in the team
    tags list(string) List of tags for the team.
    deleted date Deletion date. set to null if team record is active

    List teams

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/team/list?name=east \
      --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/team/list?name=east"
    
    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/team/list?name=east",
      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/team/list?name=east");
    
    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/team/list?name=east")
    
    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/team/list?name=east")
      .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/team/list?name=east");
    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":[
        {<team object>},
        {<team object>},
        ...
        {<team object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/team/list

    Query Parameters

    Parameter Type Description
    name string Will find all teams containing name
    show string accepts one of three values: active, deleted or all (default: active)
    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 teams found.

    If none are found, an empty list is returned.

    NB: Multiple filters are cumulative.

    Tax Rates

    The tax object

    {
      "id":476,
      "name":"VAT",
      "rate":"19.50",
      "default":false,
      "deleted":false
    }
    

    Tax Rates are set and controlled via the Synchroteam Web based back office.

    A tax is represented by the following fields

    Field Type Description
    id integer ID of the tax
    name string Name of the tax
    rate decimal (as string) The tax rate (Use a "." as the decimal separator)
    default boolean Whether or not this is the default tax rate

    List taxes

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/tax/list?name=vat \
      --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/tax/list?name=vat"
    
    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/tax/list?name=vat",
      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/tax/list?name=vat");
    
    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/tax/list?name=vat")
    
    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/tax/list?name=vat")
      .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/tax/list?name=vat");
    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":[
        {<tax object>},
        {<tax object>},
        ...
        {<tax object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/tax/list

    Query Parameters

    Parameter Type Description
    name string Will find all taxes containing name
    default boolean Will find all taxes with the specified value for default
    show string accepts one of three values: active, deleted or all (default: active)
    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 taxes found.

    If none are found, an empty list is returned.

    NB: Multiple filters are cumulative.

    Attachments

    Attachments can be added to Jobs, Customers, Sites or Equipment.

    You can also create general attachments, not associated with any other object.

    The attachment object

    JSON Representation (attached to a job)

    {
        "id":3547,
        "name":"Excel data file",
        "url":"https://yourdomainname.synchroteam.com/app/Attachment/Download/61370f0b-af50-4123-a066-a7565b57ad54",
        "isPrivate":false,
        "isExternalLink":false,
        "job":{
            "id":"265_160627143211768",
            "myId":"jb-4567-89",
            "num" : "587"
        },
        "customer":null,
        "site":null,
        "equipment":null
    }
    

    JSON Representation (external link attached to a site)

    {
        "id":3547,
        "name":"Sample External Link",
        "url":"https://externalsite.com",
        "isPrivate":false,
        "isExternalLink":true,
        "job":null,
        "customer":null,
        "site":{
          "id":2811,
          "name":"Sample Site"
          "myId":"ref-2511",
        },
        "equipment":null
    }
    

    An attachment is represented by the following fields

    Field Type Description
    id integer Attachment id (read only)
    name string Attachment name (or label)
    url string Url to access the attachment
    isPrivate boolean Whether or not the attachment is private (visible to your team only)
    isExternalLink boolean Whether or not the attachment is an external web link (versus being a file)
    job object Nullable partial job object containing id, myId and num fields
    customer object Nullable partial customer object containing id, name and myId fields.
    site object Nullable partial site object containing id, name and myId fields
    equipment object Nullable partial equipment object containing id, name and myId fields

    Create an attachment

    POST Body (creating file attachment)

    {
        "name":"Sample attachment name",
        "isPrivate":true,
        "isExternalLink":false,
        "equipment":{
            "id":93971,
            "myId": "ref-2541",
        },
        "fileName":"data5.csv",
        "fileData":[Base64String]
    }
    

    POST Body (creating external link)

    {
        "name":"Sample attachment name",
        "isPrivate":false,
        "isExternalLink":true,
        "equipment":{
            "id":93971,
            "myId": "ref-2541",
        },
        "url":"https://externalsite.com"
    }
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/attachment/create \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{\r\n    "name":"Sample Attachment Name",\r\n    "isPrivate":true (...)}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/attachment/create"
    
    payload = "{\r\n    \"name\":\"Sample Attachment Name\" \"isPrivate\":false (...)}"
    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/attachment/create",
      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    \"name\":\"Sample Attachment Name\" \"isPrivate\":false (...)}",
      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/attachment/create");
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
      "name": "Sample Attachment Name",
      "isPrivate": false,
      (...)
    });
    
    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/attachment/create")
    
    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    \"name\":\"Sample Attachment Name\" \"isPrivate\":false (...)}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/attachment/create")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .body("{\r\n    \"name\":\"Sample Attachment Name\" \"isPrivate\":false (...)}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/attachment/create");
    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    \"name\":\"Sample Attachment Name\" \"isPrivate\":false (...)}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
        "id":3547,
        "name":"Sample attachment name",
        "url":"https://yourdomainname.synchroteam.com/app/Attachment/Download/61370f0b-af50-4123-a066-a7565b57ad54",
        "isPrivate":true,
        "isExternalLink":false,
        "job":null,
        "customer":null,
        "site":null,
        "equipment":{
            "id":93971,
            "myId": "ref-2541",
            "name":"Sample Piece of Equipment"
        }
    }
    

    HTTP Request

    POST /api/v3/attachment/create

    Request Body

    attachment information in JSON format. See table below:

    Field Type Description
    name string Label for the attachment. For file attachments, will default to fileName if not provided. Required when isExternalLink:true
    url string The url for an external link. Required when isExternalLink:true
    isPrivate boolean Whether or not the attachment is private (visible to your team only)
    isExternalLink boolean Whether or not the attachment is an external web link (versus being a file)
    job object id or myId or num for the job (optional)
    customer object id or myId for the customer (optional)
    site object id or myId for the customer (optional)
    equipment object id or myId for the customer (optional)
    fileName string Name of the attachment. Required when isExternalLink:false
    fileData string File data encoded as a Base64String. Required when isExternalLink:false

    NB: if no job, customer, site or equipment objects are specified, you will be creating a general (global) attachment.

    Response body

    The response contains the attachment record, with the id field specified.

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

    Delete an attachment

    curl --request DELETE \
      --url 'https://ws.synchroteam.com/api/v3/attachment/delete?id=3547' \
      --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/attachment/delete"
    
    querystring = {"id":"3547"}
    
    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/attachment/delete?id=3547",
      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/attachment/delete");
    
    req.query({
      "id": "3547"
    });
    
    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/attachment/delete?id=3547")
    
    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/attachment/delete?id=3547")
      .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/attachment/delete?id=3547");
    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":3547
        "deleted":true
      }
    ]
    

    HTTP Request

    DELETE /api/v3/attachment/delete

    Query Parameters

    Parameter Type Description
    {paramType} string Parameter name. Accepts id
    {paramValue} string The id of the attachment

    Request body

    none

    Response body

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

    List attachments

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/attachment/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/attachment/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/attachment/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/attachment/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/attachment/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/attachment/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/attachment/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":[
        {<attachment object>},
        {<attachment object>},
        ...
        {<attachment object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/attachment/list

    Query Parameters

    Parameter Type Description
    name string search by name - a wildcard search is performed
    job_id integer return attachments belonging to a job by job id
    job_myId string return attachments belonging to a job by job myId
    job_num integer return attachments belonging to a job by job number (exact match)
    customer_id integer return attachments belonging to a customer by customer id
    customer_myId string return attachments belonging to a customer by customer myId
    site_id integer return attachments belonging to a site by site id
    site_myId string return attachments belonging to a site by site myId
    equipment_id integer return attachments belonging to a equipment by equipment id
    equipment_myId string return attachments belonging to a equipment by equipment myId
    sort string sort order, one of three values: id or name (Optional. Default is id)
    sortOrder string takes one of two values: ascending or descending (Optional. Default is ascending)

    Add pagination parameters if needed.

    Response body

    A list of attachments found.

    If none are found, an empty list is returned.

    NB: Multiple filters are cumulative.

    Parts and Services

    Parts and/or Services are represented using a part object.

    The part object

    JSON Representation

    {
      "id": 35918,
      "name": "5mm Bearing",
      "reference": "p458",
      "description": "This is the Description \n on 2 lines",
      "price": "10.00",
      "minQuantity": 5,
      "isTracked": false,
      "isSerializable": true,
      "category": {
        "id": 1532,
        "name": "Bearings"
      },
      "tax": {
        "id": 37,
        "name":"VAT",
        "rate": "14.00"
      },
      "status": "active",
      "type": "part",
      "dateModified":"2022-03-11 11:49"
    }
    

    A Part is represented by the following fields

    Field Type Description
    id integer ID of the part (read only)
    name string Part Name
    reference string Part reference number or code
    description string Description for the Part. Use \n for line break
    price decimal number The part unit price (before taxes)
    minQuantity integer The minimum stock quantity for this part (optional. meaningful is isTracked=true)
    isTracked boolean Whether or not the part's quantity is tracked (optional, default false)
    isSerializable boolean The part is serializable or not (optional, default false)
    tax object object containing the tax id, name and rate (optional)
    category integer object containing the part's category id and name and rate (optional)
    status string Part Status, one of:active (default), inactive (optional)
    type string Part Type, one of:part (default), service, travel, other (optional)
    dateModified datetime last modification date

    Retrieve a part

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/part/details?id=35918' \
      --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/part/details"
    
    querystring = {"id":"35918"}
    
    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/part/details?id=35918",
      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/part/details");
    
    req.query({
      "id": "35918"
    });
    
    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/part/details?id=35918")
    
    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/part/details?id=35918")
      .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/part/details?id=35918");
    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": 35918,
      "name": "5mm Bearing",
      "reference": "p458",
      "description": "This is the Description \n on 2 lines",
      "price": "10.00",
      "minQuantity": 5,
      "isTracked": false,
      "isSerializable": true,
      "category": {
        "id": 1532,
        "name": "Bearings"
      },
      "tax": {
        "id": 37,
        "name":"VAT",
        "rate": "14.00"
      },
      "status": "active",
      "type": "part"
    }
    

    HTTP Request

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

    Query Parameters

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

    Request body

    none

    Response body

    Returns the part if found.

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

    List parts

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/part/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/part/list"
    
    headers = {
        'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
        'accept': "text/json",
        'content-type': "application/json",
        'cache-control': "no-cache"
        }
    
    response = requests.request("GET", url, headers=headers)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://ws.synchroteam.com/api/v3/part/list",
      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/part/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/part/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/part/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/part/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":6,
      "recordsTotal":6,
      "data":[
        {<part object>},
        {<part object>},
        ...
        {<part object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/part/list?{paramType}={paramValue}

    Query Parameters

    Parameter Type Description
    category_id integer return Parts from a specific category, by category id
    category_name string return Parts from a specific category, by category id
    changedSince dateTime return Parts modified after the UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    isTracked boolean Whether or not the parts are tracked in inventory management
    isSerializable boolean Whether or not the parts are serializable
    status string Filter by Part status (active, inactive)
    type string Filter by Part type (part, service, travel, other)
    sort string sort order, takes one of four values: name (default), reference, category (name)
    sortOrder string takes one of two values: ascending or descending (Optional. Default is ascending)

    Request body

    none

    Response body

    Returns a list of parts.

    Create/Update a part

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

    POST Body (use existing part category and tax)

    {
      "name": "5mm Bearing",
      "reference": "p458",
      "description": "This is the Description \n on 2 lines",
      "price": "10.00",
      "minQuantity": 5,
      "isTracked": false,
      "isSerializable": true,
      "category": {
        "id": 1532
      },
      "tax": {
        "id": 37
      },
      "status": "active",
      "type": "part"
    }
    

    POST Body (Update part and create new part category, no tax)

    {
      "id":35918
      "name": "5mm Bearing",
      "reference": "p458",
      "description": "This is the Description \n on 2 lines",
      "price": "10.00",
      "minQuantity": 5,
      "isTracked": false,
      "isSerializable": true,
      "category": {
        "name": "Roller Bearings"
      },
      "tax": null
    }
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/part/send \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{"name":"5mm Bearing","reference":"p458" (...)'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/part/send"
    
    payload = "{\"name":\"5mm Bearing\",\"reference\":\"p458\" (...)}"
    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/part/send",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "{\"name":\"5mm Bearing\",\"reference\":\"p458\" (...)}",
      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/part/send");
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
      "name": "5mm Bearing",
      "reference": "p458", (...)
    });
    
    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/part/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 = "{\"name\":\"5mm Bearing\",\"reference\":\"p458\" (...)}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/part/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("{\"name\":\"5mm Bearing\",\"reference\":\"p458\" (...)")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/part/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", "{\"name\":\"5mm Bearing\",\"reference\":\"p458\" (...)}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
      "id": 35918,
      "name": "5mm Bearing",
      "reference": "p458",
      "description": "This is the Description \n on 2 lines",
      "price": "10.00",
      "minQuantity": 5,
      "isTracked": false,
      "isSerializable": true,
      "category": {
        "id": 1532,
        "name": "Bearings"
      },
      "tax": {
        "id": 37,
        "name":"VAT",
        "rate": "14.00"
      },
      "status": "active",
      "type": "part"
    }
    

    HTTP Request

    POST /api/v3/part/send

    Request Body

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

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

    NB:

    Response Body

    The response contains the created/updated part record, with the id field specified.

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

    Delete a part

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

    {
        "PartsDeleted": [
            {
                "id": 3168094,
                "isDeleted": true
            },
            (...)
        ]
    }
    

    HTTP Request

    DELETE /api/v3/part/delete

    Query Parameters

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

    Request body

    none

    Response body

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

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

    Bulk part price update

    POST Body

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

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/part/prices \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '[{"reference": "p11","price":"10,25"} (...)]'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/part/prices"
    
    payload = "[{\"reference\": \"p11\",\"price\":\"10,25\"} (...)]"
    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/part/prices",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "[{\"reference\": \"p11\",\"price\":\"10,25\"} (...)]",
      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/part/prices");
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send([
      {
        "reference": "p11",
        "price": "10,25"
      } (...)
    ]);
    
    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/part/prices")
    
    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 = "[{\"reference\": \"p11\",\"price\":\"10,25\"} (...)]"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/part/prices")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .body("[{\"reference\": \"p11\",\"price\":\"10,25\"} (...)]")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/part/prices");
    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", "[{\"reference\": \"p11\",\"price\":\"10,25\"} (...)]", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

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

    HTTP Request

    POST /api/v3/part/prices

    Request Body

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

    Response Body

    If the request is entirely or partially successful, the response will contain the request content with an error field added to each part (set to null if there was no error, otherwise error description is shown).

    If another type of error occured, a standard error payload will be returned.

    Invoices

    The invoice object

    JSON Representation

    {
      "id":456,
      "num":132,
      "reference":"132_Invoice_12_6_2022",
      "type":"invoice",
      "status":"draft",
      "description":"Boiler Installation Invoice",
      "paymentDate":"2018-05-02",
      "customer":{
        "id":35604,
        "myId":"sCustomer08",
        "name": "Sample Customer",
      },
      "site":{
        "id":2811,
        "myId": "ref-2511",
        "name":"Sample Site",
      },
      "job":{
        "id": "265_160719144323649",
        "myId": "ref-job05014",
        "num": 154872
      },
      "dateCreated": "2018-04-06 10:19",
      "lines":[
        {
          "description":"Hybrid Valve", 
          "partReference":"HV-11",
          "quantity":"10",
          "unitPrice":"19.95",
          "discountPercent":"0",
          "subTotal":"199.50",
          "taxRate":"10.00", 
          "taxAmt":"19.95",
          "total":"219.45"
        },
        {
          "description":"Valve Gasket (Special Order)", 
          "partReference":"",
          "quantity":"10",
          "unitPrice":"2.00",
          "discountPercent":"50.00",
          "subTotal":"10.00",
          "taxRate":"10.00", 
          "taxAmt":"1.00",
          "total":"11.00"
        }
      ],
      "subtotal": 209.50,
      "taxAmt": 20.95,
      "total": 230.45,
      "customFieldValues": [
        {
            "id": 6543,
            "label": "Contact",
            "value": "Marketing"
        },
        {
            "id": 6544,
            "label": "Date",
            "value": "2022-12-22"
        },
        {
            "id": 6545,
            "label": "Reference",
            "value": "ref_132"
        }
      ]
    }
    

    Invoices are represented by the following fields

    Field Type Description
    id integer Invoice id (read only)
    num integer Invoice number
    reference string Invoice reference
    type string type : invoice
    status string Status of the invoice, one of draft, new, sent, late, paid or cancelled
    description string Description of the Invoice
    paymentDate datetime Invoice payment date
    dateCreated datetime Invoice creation date
    customer object Object containing id, name and myId customer fields (required when creating an invoice)
    site object Object containing id, name and myId site fields (optional - not required when creating an invoice)
    job object Object containing id, num and myId job fields (optional - not required when creating an invoice)
    lines list List of line items (see below)
    subtotal decimal Sub-total (before taxes)
    taxAmt decimal Total taxes applied
    total decimal Total amount
    customFieldValues list List of custom field values for your invoice

    A representation of an Invoice's or a Quotation's or a Credit Note's line has the following fields :

    Field Type Description
    description string Line description (or Part description if the line refers to a part)
    partReference string Part reference number
    quantity string Number or items/parts for the line
    unitPrice string Price for one part/item
    discountPercent string percent discount applied. defaults to 0.
    subTotal string sub total for the line with the discount (if any) applied
    taxRate string The tax rate applied
    taxAmt string The tax amount calculated (based on subTotal)
    total string Calculated total, inclusive of tax

    Retrieve an invoice

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/invoice/details?num=132' \
      --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/invoice/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/invoice/details?num=132",
      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/invoice/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/invoice/details?num=132")
    
    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/invoice/details?num=132")
      .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/invoice/details?num=132");
    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":456,
      "num":132,
      "reference":"132_Invoice_12_6_2022",
      "type":"invoice",
      "status":"draft",
      "description":"Boiler Installation Invoice",
      "paymentDate":"2018-05-02",
      "customer":{
        "id":35604,
        "myId":"sCustomer08",
        "name": "Sample Customer",
      },
      "site":{
        "id":2811,
        "myId": "ref-2511",
        "name":"Sample Site",
      },
      "job":{
        "id": "265_160719144323649",
        "myId": "ref-job05014",
        "num": 154872
      },
      "dateCreated": "2018-04-06 10:19",
      "lines":[
        {
          "description":"Hybrid Valve", 
          "partReference":"HV-11",
          "quantity":"10",
          "unitPrice":"19.95",
          "discountPercent":"0",
          "subTotal":"199.50",
          "taxRate":"10.00", 
          "taxAmt":"19.95",
          "total":"219.45"
        },
        {
          "description":"Valve Gasket (Special Order)", 
          "partReference":"",
          "quantity":"10",
          "unitPrice":"2.00",
          "discountPercent":"50.00",
          "subTotal":"10.00",
          "taxRate":"10.00", 
          "taxAmt":"1.00",
          "total":"11.00"
        }
      ],
      "subtotal": 209.50,
      "taxAmt": 20.95,
      "total": 230.45,
      "customFieldValues": [
        {
            "id": 6543,
            "label": "Contact",
            "value": "Marketing"
        },
        {
            "id": 6544,
            "label": "Date",
            "value": "2022-12-22"
        },
        {
            "id": 6545,
            "label": "Reference",
            "value": "ref_132"
        }
      ]
    }
    

    HTTP Request

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

    Query Parameters

    Parameter Type Description
    {paramType} string Parameter name. Accepts id, reference or num
    {paramValue} string The id, reference or num of the invoice

    Request body

    none

    Response body

    Returns the invoice if found.

    If the invoice/quotation is not found a 404 Error is returned.

    Create/Update an invoice

    POST Body (creating)

    {
      "num":132,
      "reference":"132_Invoice_12_6_2022",
      "type":"invoice",
      "status":"draft",
      "description":"Boiler Installation Invoice",
      "action":"add",
      "customer":{
        "id":35604,
      },
      "site":{
        "myId": "ref-2511",
      },
      "job":{
        "num": 154872
      },
      "lines":[
        {
          "description":"Hybrid Valve", 
          "partReference":"HV-11",
          "quantity":"10",
          "unitPrice":"19.95",
          "discountPercent":"0",
          "subTotal":"199.50",
          "taxRate":"10.00", 
          "taxAmt":"19.95",
          "total":"219.45"
        },
        {
          "description":"Valve Gasket (Special Order)", 
          "partReference":"",
          "quantity":"10",
          "unitPrice":"2.00",
          "discountPercent":"50.00",
          "subTotal":"10.00",
          "taxRate":"10.00", 
          "taxAmt":"1.00",
          "total":"11.00"
        }
      ],
      "customFieldValues": [
        {
            "id": 6543,
            "label": "Contact",
            "value": "Marketing"
        },
        {
            "id": 6544,
            "label": "Date",
            "value": "2022-12-22"
        },
        {
            "id": 6545,
            "label": "Reference",
            "value": "ref_132"
        }
      ]
    }
    

    POST Body (updating invoice lines)

    {
      "num":132,
      "reference":"132_Invoice_12_6_2022",
      "type":"invoice",
      "status":"draft",
      "description":"Boiler Installation Invoice",
      "action":"replace",
      "lines":[
        {
          "description":"Hybrid Valve", 
          "partReference":"HV-11",
          "quantity":"10",
          "unitPrice":"19.95",
          "discountPercent":"0",
          "subTotal":"199.50",
          "taxRate":"10.00", 
          "taxAmt":"19.95",
          "total":"219.45"
        },
        {
          "description":"Valve Gasket (Special Order)", 
          "partReference":"",
          "quantity":"10",
          "unitPrice":"2.00",
          "discountPercent":"50.00",
          "subTotal":"10.00",
          "taxRate":"10.00", 
          "taxAmt":"1.00",
          "total":"11.00"
        }
      ]
    }
    

    POST Body (changing status)

    {
      "num":132,
      "status":"sent",
      "action":"add",
      "lines":[]
    }
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/invoice/send \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{\r\n  "num":132,\r\n  "type": "invoice" (...)'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/invoice/send"
    
    payload = "{\r\n  \"num\":132,\r\n  \"type\": \"Invoice\" (...)}"
    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/invoice/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  \"num\":132,\r\n  \"type\": \"Invoice\" (...)}",
      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/invoice/send");
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
      "num": 132,
      "type": "invoice", (...)
    });
    
    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/invoice/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  \"num\":132,\r\n  \"type\": \"Invoice\", (...)}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/invoice/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  \"num\":132,\r\n  \"type\": \"Invoice\", (...)")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/invoice/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  \"num\":132,\r\n  \"type\": \"Invoice\", (...)}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
      "id":456,
      "num":132,
      "reference":"132_Invoice_12_6_2022",
      "type":"invoice",
      "status":"draft",
      "description":"Boiler Installation Invoice",
      "paymentDate":"2018-05-02",
      "customer":{
        "id":35604,
        "myId":"sCustomer08",
        "name": "Sample Customer",
      },
      "site":{
        "id":2811,
        "myId": "ref-2511",
        "name":"Sample Site",
      },
      "job":{
        "id": "265_160719144323649",
        "myId": "ref-job05014",
        "num": 154872
      },
      "dateCreated": "2018-04-06 10:19",
      "lines":[
        {
          "description":"Hybrid Valve", 
          "partReference":"HV-11",
          "quantity":"10",
          "unitPrice":"19.95",
          "discountPercent":"0",
          "subTotal":"199.50",
          "taxRate":"10.00", 
          "taxAmt":"19.95",
          "total":"219.45"
        },
        {
          "description":"Valve Gasket (Special Order)", 
          "partReference":"",
          "quantity":"10",
          "unitPrice":"2.00",
          "discountPercent":"50.00",
          "subTotal":"10.00",
          "taxRate":"10.00", 
          "taxAmt":"1.00",
          "total":"11.00"
        }
      ],
      "subtotal": 209.50,
      "taxAmt": 20.95,
      "total": 230.45,
      "customFieldValues": [
        {
            "id": 6543,
            "label": "Contact",
            "value": "Marketing"
        },
        {
            "id": 6544,
            "label": "Date",
            "value": "2022-12-22"
        },
        {
            "id": 6545,
            "label": "Reference",
            "value": "ref_132"
        }
      ]
    }
    

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

    HTTP Request

    POST /api/v3/invoice/send

    Request Body

    Invoice information in JSON format, if the id, num or reference exist, the invoice will be updated, if not the invoice will be created.

    Special Parameters

    Field Type Description
    action string add (lines specified are added to the invoice) or replace (lines specified replace all the existing invoice lines)
    customer object Object containing all or any of id, name and myId customer fields (required when creating a quotation/invoice)
    site object Object containing all or any of id, name and myId site fields (optional - not required when creating a quotation/invoice)
    job object Object containing all or any of id, num and myId job fields (optional - not required when creating a quotation/invoice)

    Do note, if you just want to change an invoice status, use "action":"add" and send no lines ("lines":[]).

    Response Body

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

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

    Duplicate an invoice

    curl --request POST \
      --url 'https://ws.synchroteam.com/api/v3/invoice/duplicate' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{"id": 98654}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/invoice/duplicate"
    
    payload = "{\"id\": 651232}"
    
    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)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://ws.synchroteam.com/api/v3/invoice/duplicate",
      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\": 651232}",
      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/invoice/duplicate");
    
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
      "id": 984612
    });
    
    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/invoice/duplicate")
    
    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\": 984612}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/invoice/duplicate")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .body("{\"id\": 984612}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/invoice/duplicate");
    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\": 984561}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned if cancel = true

    {
        "id": 456,
        "idCreditnote": 457,
        "idDraft": 458
    }
    

    JSON Returned if cancel = false

    {
      "id":456,
      "num":0,
      "reference":null,
      "type":"invoice",
      "status":"draft",
      "description":"Boiler Installation Quote",
      "paymendDate":null,
      "customer":{
        "id":35604,
        "myId":"sCustomer08",
        "name": "Sample Customer",
      },
      "site":{
        "id":2811,
        "myId": "ref-2511",
        "name":"Sample Site",
      },
      "job":{
        "id": "265_160719144323649",
        "myId": "ref-job05014",
        "num": 154872
      },
      "dateCreated": "2018-04-06 10:19",
      "lines":[
        {
          "description":"Hybrid Valve", 
          "partReference":"HV-11",
          "quantity":"10",
          "unitPrice":"19.95",
          "discountPercent":"0",
          "subTotal":"199.50",
          "taxRate":"10.00", 
          "taxAmt":"19.95",
          "total":"219.45"
        },
        {
          "description":"Valve Gasket (Special Order)", 
          "partReference":"",
          "quantity":"10",
          "unitPrice":"2.00",
          "discountPercent":"50.00",
          "subTotal":"10.00",
          "taxRate":"10.00", 
          "taxAmt":"1.00",
          "total":"11.00"
        }
      ],
      "subtotal": 209.50,
      "taxAmt": 20.95,
      "total": 230.45,
      "customFieldValues": [
        {
            "id": 6543,
            "label": "Contact",
            "value": "Marketing"
        },
        {
            "id": 6544,
            "label": "Date",
            "value": "2022-12-22"
        },
        {
            "id": 6545,
            "label": "Reference",
            "value": "ref_132"
        }
      ]
    }
    

    HTTP Request

    POST /api/v3/invoice/duplicate

    Request body

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

    Parameter Type Description
    id integer ID of the invoice
    num integer Number of the invoice
    reference string Reference of the invoice

    Special Parameter

    Field Type Description
    cancel boolean If set to true, a credit note will be generated + the invoice will be canceled + the invoice will be duplicated in draft. If set to false, the invoice will be duplicated in draft (default: false)

    Response body

    If cancel = true: The response contains id of current invoice, idCreditnote and idDraft.

    If cancel = false: The response contains the generated invoice record, with the id field specified.

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

    Cancel an invoice

    curl --request POST \
      --url 'https://ws.synchroteam.com/api/v3/invoice/cancel' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{\r\n  "num":132,\r\n  "id": 98654, \r\n "reference":"98654_Invoice_12_6_2022"}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/invoice/cancel"
    
    payload = "{\r\n  \"num\":132,\r\n  \"id\": 98654, \r\n \"reference\":\"98654_Invoice_12_6_2022\"}"
    
    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)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://ws.synchroteam.com/api/v3/invoice/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 => "{\r\n  \"num\":132,\r\n  \"id\": 98654, \r\n \"reference\":\"98654_Invoice_12_6_2022\"}",
      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/invoice/cancel");
    
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
      "num": 132,
      "id": 98654
      "reference": "98654_Invoice_12_6_2022"
    });
    
    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/invoice/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 = "{\r\n  \"num\":132,\r\n  \"id\": 98654, \r\n \"reference\":\"98654_Invoice_12_6_2022\"}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/invoice/cancel")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .body("{\r\n  \"num\":132,\r\n  \"id\": 98654, \r\n \"reference\":\"98654_Invoice_12_6_2022\"}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/invoice/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", "{\r\n  \"num\":132,\r\n  \"id\": 98654, \r\n \"reference\":\"98654_Invoice_12_6_2022\"}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned if credit note has been created

      {
        "id": 98654,
        "status": "canceled",
        "idCreditnote": 98655
      }
    

    JSON Returned if credit note hasn't been created

      {
        "id": 98654,
        "status": "canceled"
      }
    

    HTTP Request

    DELETE /api/v3/invoice/cancel

    Request body

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

    Parameter Type Description
    id integer ID of the invoice
    num integer Number of the invoice
    reference string Reference of the invoice

    Special Parameter

    Field Type Description
    createCreditnote boolean Whether or not create a credit note (default: false)

    Response body

    Returns a Json object with the status canceled, the invoice id and the credit note id (if it was created). If no invoice found, a 404 error is returned.

    List invoices

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/invoice/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/invoice/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/invoice/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/invoice/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/invoice/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/invoice/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/invoice/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":[
        {<invoice object>},
        {<invoice object>},
        ...
        {<invoice object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/invoice/list

    Query Parameters

    Parameter Type Description
    changedSince dateTime return invoices modified after the UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    createdSince dateTime return invoices created after the UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    paidSince dateTime return invoices paid after the UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    status string draft, new, sent, late, paid or cancelled
    customer_id integer return invoices belonging to a customer by customer id
    customer_myId string return invoices belonging to a customer by customer myId
    site_id integer return invoices belonging to a site by site id
    site_myId string return invoices belonging to a site by site myId
    job_id integer return invoices belonging to a job by job id
    job_myId string return invoices belonging to a job by job myId
    job_num integer return invoices belonging to a job by job num
    sort string sort order, takes one of four values: changedSince, paidSince, status and num (Optional. Default is num)
    sortOrder string takes one of two values: ascending or descending (Optional. Default is descending)

    Add pagination parameters if needed.

    Response body

    A list of invoices found.

    If none are found, an empty list is returned.

    NB: Multiple filters are cumulative.

    Quotations

    The quotation object

    JSON Representation

    {
      "id":456,
      "num":132,
      "reference":"132_Quotation_12_6_2022",
      "type":"quotation",
      "status":"draft",
      "description":"Boiler Installation Quote",
      "paymendDate":null,
      "customer":{
        "id":35604,
        "myId":"sCustomer08",
        "name": "Sample Customer",
      },
      "site":{
        "id":2811,
        "myId": "ref-2511",
        "name":"Sample Site",
      },
      "job":{
        "id": "265_160719144323649",
        "myId": "ref-job05014",
        "num": 154872
      },
      "dateCreated": "2018-04-06 10:19",
      "lines":[
        {
          "description":"Hybrid Valve", 
          "partReference":"HV-11",
          "quantity":"10",
          "unitPrice":"19.95",
          "discountPercent":"0",
          "subTotal":"199.50",
          "taxRate":"10.00", 
          "taxAmt":"19.95",
          "total":"219.45"
        },
        {
          "description":"Valve Gasket (Special Order)", 
          "partReference":"",
          "quantity":"10",
          "unitPrice":"2.00",
          "discountPercent":"50.00",
          "subTotal":"10.00",
          "taxRate":"10.00", 
          "taxAmt":"1.00",
          "total":"11.00"
        }
      ],
      "subtotal": 209.50,
      "taxAmt": 20.95,
      "total": 230.45,
      "customFieldValues": [
        {
            "id": 6543,
            "label": "Contact",
            "value": "Marketing"
        },
        {
            "id": 6544,
            "label": "Date",
            "value": "2022-12-22"
        },
        {
            "id": 6545,
            "label": "Reference",
            "value": "ref_132"
        }
      ]
    }
    

    Quotations are the same as invoices, with minor differences:

    Quotations are represented by the following fields

    Field Type Description
    id integer Quotation id (read only)
    num integer Quotation number
    reference string Quotation reference
    type string type : quotation
    status string Status of the quotation, one of draft, new, sent or accepted
    description string Description of the Quotation
    customer object Object containing id, name and myId customer fields (required when creating a quotation)
    site object Object containing id, name and myId site fields (optional - not required when creating a quotation)
    job object Object containing id, num and myId job fields (optional - not required when creating a quotation)
    lines list List of line items (see below)
    subtotal decimal Sub-total (before taxes)
    taxAmt decimal Total taxes applied
    total decimal Total amount
    customFieldValues list List of custom field values for your quotation

    A representation of an Invoice's or a Quotation's line has the following fields :

    Field Type Description
    description string Line description (or Part description if the line refers to a part)
    partReference string Part reference number
    quantity string Number or items/parts for the line
    unitPrice string Price for one part/item
    discountPercent string percent discount applied. defaults to 0.
    subTotal string sub total for the line with the discount (if any) applied
    taxRate string The tax rate applied
    taxAmt string The tax amount calculated (based on subTotal)
    total string Calculated total, inclusive of tax

    Retrieve a quotation

    HTTP Request

    GET /api/v3/quotation/details

    Uses the same endpoint definition as invoices: See Retrieve an invoice

    Create/Update a quotation

    HTTP Request

    POST /api/v3/quotation/send

    Uses the same endpoint as invoices: See Create/Update an invoice

    Cancel a quotation

    curl --request POST \
      --url 'https://ws.synchroteam.com/api/v3/quotation/cancel' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{\r\n  "num":132,\r\n  "id": 98654}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/quotation/cancel"
    
    payload = "{\r\n  \"num\":132,\r\n  \"id\": 651232}"
    
    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)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://ws.synchroteam.com/api/v3/quotation/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 => "{\r\n  \"num\":132,\r\n  \"id\": 651232}",
      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/quotation/cancel");
    
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
      "num": 132,
      "id": 984612
    });
    
    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/quotation/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 = "{\r\n  \"num\":132,\r\n  \"id\": 984612}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/quotation/cancel")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .body("{\r\n  \"num\":132,\r\n  \"id\": 984612}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/quotation/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", "{\r\n  \"num\":132,\r\n  \"id\": 984561}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    [
      {
        "id":984561,
        "status":"canceled"
      }
    

    HTTP Request

    DELETE /api/v3/quotation/cancel

    Request body

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

    Parameter Type Description
    id integer ID of the quotation
    num integer Number of the quotation
    reference string Reference of the quotation

    Response body

    Returns a Json object with the status canceled, and the quotation ID. If no quotations are found, a 404 error is returned.

    Duplicate a quotation

    curl --request POST \
      --url 'https://ws.synchroteam.com/api/v3/quotation/duplicate' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{"id": 98654}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/quotation/duplicate"
    
    payload = "{\"id\": 651232}"
    
    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)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://ws.synchroteam.com/api/v3/quotation/duplicate",
      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\": 651232}",
      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/quotation/duplicate");
    
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
      "id": 984612
    });
    
    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/quotation/duplicate")
    
    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\": 984612}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/quotation/duplicate")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .body("{\"id\": 984612}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/quotation/duplicate");
    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\": 984561}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
      "id":456,
      "num":0,
      "reference":null,
      "type":"quotation",
      "status":"draft",
      "description":"Boiler Installation Quote",
      "paymendDate":null,
      "customer":{
        "id":35604,
        "myId":"sCustomer08",
        "name": "Sample Customer",
      },
      "site":{
        "id":2811,
        "myId": "ref-2511",
        "name":"Sample Site",
      },
      "job":{
        "id": "265_160719144323649",
        "myId": "ref-job05014",
        "num": 154872
      },
      "dateCreated": "2018-04-06 10:19",
      "lines":[
        {
          "description":"Hybrid Valve", 
          "partReference":"HV-11",
          "quantity":"10",
          "unitPrice":"19.95",
          "discountPercent":"0",
          "subTotal":"199.50",
          "taxRate":"10.00", 
          "taxAmt":"19.95",
          "total":"219.45"
        },
        {
          "description":"Valve Gasket (Special Order)", 
          "partReference":"",
          "quantity":"10",
          "unitPrice":"2.00",
          "discountPercent":"50.00",
          "subTotal":"10.00",
          "taxRate":"10.00", 
          "taxAmt":"1.00",
          "total":"11.00"
        }
      ],
      "subtotal": 209.50,
      "taxAmt": 20.95,
      "total": 230.45,
      "customFieldValues": [
        {
            "id": 6543,
            "label": "Contact",
            "value": "Marketing"
        },
        {
            "id": 6544,
            "label": "Date",
            "value": "2022-12-22"
        },
        {
            "id": 6545,
            "label": "Reference",
            "value": "ref_132"
        }
      ]
    }
    

    HTTP Request

    POST /api/v3/quotation/duplicate

    Request body

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

    Parameter Type Description
    id integer ID of the quotation
    num integer Number of the quotation
    reference string Reference of the quotation

    Response body

    The response contains the generated quotation record, with the id field specified.

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

    NB: The generated quotation will be in draft.

    List quotations

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/quotation/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/quotation/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/quotation/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/quotation/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/quotation/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/quotation/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/quotation/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":[
        {<quotation object>},
        {<quotation object>},
        ...
        {<quotation object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/quotation/list

    Query Parameters

    Parameter Type Description
    changedSince dateTime return quotations modified after the UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    createdSince dateTime return quotations created after the UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    status string draft, new, sent or accepted
    customer_id integer return quotations belonging to a customer by customer id
    customer_myId string return quotations belonging to a customer by customer myId
    site_id integer return quotations belonging to a site by site id
    site_myId string return quotations belonging to a site by site myId
    job_id integer return quotations belonging to a job by job id
    job_myId string return quotations belonging to a job by job myId
    job_num integer return quotations belonging to a job by job num
    sort string sort order, takes one of four values: changedSince, paidSince, status and num (Optional. Default is changedSince)
    sortOrder string takes one of two values: ascending or descending (Optional. Default is descending)

    Add pagination parameters if needed.

    Response body

    A list of quotations found.

    If none are found, an empty list is returned.

    NB: Multiple filters are cumulative.

    Credit Notes

    The Credit Note object

    JSON Representation

    {
      "id":456,
      "num":132,
      "type":"creditnote",
      "status":"draft",
      "description":"",
      "paymendDate":null,
      "customer":{
        "id":35604,
        "myId":"sCustomer08",
        "name": "Sample Customer",
      },
      "site":{
        "id":2811,
        "myId": "ref-2511",
        "name":"Sample Site",
      },
      "job":{
        "id": "265_160719144323649",
        "myId": "ref-job05014",
        "num": 154872
      },
      "dateCreated": "2018-04-06 10:19",
      "lines":[
        {
          "description":"Hybrid Valve", 
          "partReference":"HV-11",
          "quantity":"10",
          "unitPrice":"19.95",
          "discountPercent":"0",
          "subTotal":"199.50",
          "taxRate":"10.00", 
          "taxAmt":"19.95",
          "total":"219.45"
        },
        {
          "description":"Valve Gasket (Special Order)", 
          "partReference":"",
          "quantity":"10",
          "unitPrice":"2.00",
          "discountPercent":"50.00",
          "subTotal":"10.00",
          "taxRate":"10.00", 
          "taxAmt":"1.00",
          "total":"11.00"
        }
      ],
      "subtotal": 209.50,
      "taxAmt": 20.95,
      "total": 230.45
    }
    

    Credit Notes are represented by the following fields

    Field Type Description
    id integer Creditnote id (read only)
    num integer Creditnote number
    type string type : creditnote
    status string Status of the Credit Note, one of draft, new, sent or accepted
    description string Description of the Credit Note
    customer object Object containing id, name and myId customer fields
    site object Object containing id, name and myId site fields
    job object Object containing id, num and myId job fields
    lines list List of line items (see below)
    subtotal decimal Sub-total (before taxes)
    taxAmt decimal Total taxes applied
    total decimal Total amount

    A representation of an Invoice's or a Quotation's line has the following fields :

    Field Type Description
    description string Line description (or Part description if the line refers to a part)
    partReference string Part reference number
    quantity string Number or items/parts for the line
    unitPrice string Price for one part/item
    discountPercent string percent discount applied. defaults to 0.
    subTotal string sub total for the line with the discount (if any) applied
    taxRate string The tax rate applied
    taxAmt string The tax amount calculated (based on subTotal)
    total string Calculated total, inclusive of tax

    Retrieve a Credit Note

    HTTP Request

    GET /api/v3/creditnote/details

    Uses the same endpoint definition as invoices: See Retrieve an invoice

    List Credit Notes

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/creditnote/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/creditnote/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/creditnote/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/creditnote/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/creditnote/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/creditnote/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/creditnote/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":[
        {<Credit Note object>},
        {<Credit Note object>},
        ...
        {<Credit Note object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/creditnote/list

    Query Parameters

    Parameter Type Description
    changedSince dateTime return Credit Notes modified after the UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    createdSince dateTime return Credit Notes created after the UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    status string draft, new, sent or accepted
    customer_id integer return Credit Notes belonging to a customer by customer id
    customer_myId string return Credit Notes belonging to a customer by customer myId
    site_id integer return Credit Notes belonging to a site by site id
    site_myId string return Credit Notes belonging to a site by site myId
    job_id integer return Credit Notes belonging to a job by job id
    job_myId string return Credit Notes belonging to a job by job myId
    job_num integer return Credit Notes belonging to a job by job num
    sort string sort order, takes one of four values: changedSince, paidSince, status and num (Optional. Default is changedSince)
    sortOrder string takes one of two values: ascending or descending (Optional. Default is descending)

    Add pagination parameters if needed.

    Response body

    A list of Credit Notes found.

    If none are found, an empty list is returned.

    NB: Multiple filters are cumulative.

    Inventory Management

    In Synchroteam Inventory Management is an extension of the Parts and Services catalogue. It allows you to manage Stock Depots and either request or move parts between them.

    Part Movements

    Move parts

    The parts and quantities specified are moved from the source depot to the destination depot.

    POST Body (serialized part)

    {
      "source":{
        "id":"18af2bf1-0973-4958-a66e-c5fe974ec129"
      },
      "destination":{
        "name":"Test stock depot"
      },
      "part":{
        "id": "p666",
        "serials":["bb11","bb22"]
      }
    }
    

    POST Body (unserialized part)

    {
      "source":{
        "id":"18af2bf1-0973-4958-a66e-c5fe974ec129"
      },
      "destination":{
        "name":"Test stock depot"
      },
      "part":{
        "reference": "MO_T23",
        "quantity":2
      }
    }
    

    Sample Code

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

    JSON Returned

    {
      "quantityMoved":2,
      "serialsMoved":["bb11","bb22"]
    }
    

    HTTP Request

    POST /api/v3/partmovement/do

    Request body

    Field Type Description
    source object Source depot for movement. Specify id or name.
    destination object Destination depot for movement. Specify id or name.
    part part Specify the part reference (or id) and quantity. For serialized parts, provide a list of serial numbers and omit the quantity (serials: list of strings).

    Response body

    If successful, the response contains the following data:

    Field Type Description
    quantityMoved integer Number of parts moved
    serialsMoved list(string) List of part serial numbers moved (empty list if the part was not serialized)

    Errors

    If an error is encountered a 400 Error is returned, e.g.:

    Part Requests

    The parts request object

    JSON Representation

    {
      "id": "22aa76ac-03c8-4fdb-baee-dca2d33cdd23",
      "source": {
        "idStock": "18af2bf1-0973-4958-a66e-c5fe974ec129",
        "nmStock": "stock4"
      },
      "destination": {
        "idStock": "d6a71643-0ad2-4de8-abcb-34f54c4ca12e",
        "nmStock": "stock"
      },
      "user": {
        "id":54022,
        "name": "John Doe",
        "login": "login_user",
      }
      "part": {
        "id": 35947,
        "reference": "p6666",
        "name": "p6666",
        "unitPrice": "12.50"
        "isSerializable":true
      },
      "quantity": 2,
      "isDeleted": false,
      "isComplete": true,
      "isUrgent": false,
      "dateCreated":"2019-01-01 14:10:00"
    }
    

    A part request is represented by the following fields

    Field Type Description
    id string part movement request ID (read-only)
    source object Source depot for movement (id and name).
    destination object Destination depot for movement (id or name).
    user object Object containing id, name and login for the user that made the request
    part object Object containing id, reference, name, isSerializable and unitPrice for the part
    quantity integer Number of parts in the request
    isDeleted boolean whether or not the request has been deleted
    isComplete boolean whether or not the request has been completed
    isUrgent boolean whether or not the request is urgent
    dateCreated datetime
    (yyyy-mm-dd HH:mm)
    Date the request was created

    Retrieve a part request

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/partrequest/details?id=22aa76ac-03c8-4fdb-baee-dca2d33cdd23' \
      --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/partrequest/details"
    
    querystring = {"id":"22aa76ac-03c8-4fdb-baee-dca2d33cdd23"}
    
    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/partrequest/details?id=22aa76ac-03c8-4fdb-baee-dca2d33cdd23",
      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/partrequest/details");
    
    req.query({
      "id": "22aa76ac-03c8-4fdb-baee-dca2d33cdd23"
    });
    
    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/partrequest/details?id=22aa76ac-03c8-4fdb-baee-dca2d33cdd23")
    
    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/partrequest/details?id=22aa76ac-03c8-4fdb-baee-dca2d33cdd23")
      .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/partrequest/details?id=22aa76ac-03c8-4fdb-baee-dca2d33cdd23");
    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": "22aa76ac-03c8-4fdb-baee-dca2d33cdd23",
      "source": {
        "idStock": "18af2bf1-0973-4958-a66e-c5fe974ec129",
        "nmStock": "stock4"
      },
      "destination": {
        "idStock": "d6a71643-0ad2-4de8-abcb-34f54c4ca12e",
        "nmStock": "stock"
      },
      "user": {
        "id":54022,
        "name": "John Doe",
        "login": "login_user",
      }
      "part": {
        "id": 35947,
        "reference": "p6666",
        "name": "p6666",
        "unitPrice": "12.50"
        "isSerializable":true
      },
      "quantity": 2,
      "isDeleted": false,
      "isComplete": true,
      "isUrgent": false,
      "dateCreated":"2019-01-01 14:10:00"
    }
    

    HTTP Request

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

    Query Parameters

    Parameter Type Description
    {paramType} string Parameter name. Accepts id
    {paramValue} string The id of the partrequest

    Request body

    none

    Response body

    Returns the part request if found.

    If the part request is not found a 404 Error is returned.

    Create/Update a part request

    Creates a request for the movement of parts from the source depot to the destination depot.

    POST Body (serialized part)

    {
      "source": {
        "idStock": "18af2bf1-0973-4958-a66e-c5fe974ec129"
      },
      "destination": {
        "nmStock": "stock"
      },
      "user": {
        "id":54022,
      }
      "part": {
        "id": 35947
      },
      "quantity": 2,
      "isUrgent": false
    },
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/partrequest/send \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{"source":{"idStock":"18af2bf1-0973-4958-a66e-c5fe974ec129"} (...)}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/partrequest/send"
    
    payload = "{\"source\":{\"idStock\":\"18af2bf1-0973-4958-a66e-c5fe974ec129\"} (...)}"
    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/partrequest/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 => "{\"source\":{\"idStock\":\"18af2bf1-0973-4958-a66e-c5fe974ec129\"} (...)}",
      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/partrequest/send");
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
      "source":{"idStock":"18af2bf1-0973-4958-a66e-c5fe974ec129"} (...)
    });
    
    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/partrequest/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 = "{\"source\":{\"idStock\":\"18af2bf1-0973-4958-a66e-c5fe974ec129\"} (...)}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/partrequest/send")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .body("{\"source\":{\"idStock\":\"18af2bf1-0973-4958-a66e-c5fe974ec129\"} (...)}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/partrequest/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", "{\"source\":{\"idStock\":\"18af2bf1-0973-4958-a66e-c5fe974ec129\"} (...)}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
      "id": "22aa76ac-03c8-4fdb-baee-dca2d33cdd23",
      "source": {
        "idStock": "18af2bf1-0973-4958-a66e-c5fe974ec129",
        "nmStock": "stock4"
      },
      "destination": {
        "idStock": "d6a71643-0ad2-4de8-abcb-34f54c4ca12e",
        "nmStock": "stock"
      },
      "user": {
        "id":54022,
        "name": "John Doe",
        "login": "login_user",
      }
      "part": {
        "id": 35947,
        "reference": "p6666",
        "name": "p6666",
        "unitPrice": "12.50"
        "isSerializable":true
      },
      "quantity": 2,
      "isDeleted": false,
      "isComplete": true,
      "isUrgent": false,
      "dateCreated":"2019-01-01 14:10:00"
    }
    

    HTTP Request

    POST /api/v3/partrequest/send

    Request body

    Field Type Description
    id string part movement request ID (read-only - optional: specify to perform an update)
    source object Source depot for movement. Specify id and/or name.
    destination object Destination depot for movement. Specify id and/or name.
    user object Object containing id and/or login for the user that makes the request
    part object Object containing id and/or reference for the part
    quantity integer Number of parts moved (optional if you provide a list of serial numbers)
    isDeleted boolean whether or not the request has been deleted (optional - default false)
    isUrgent boolean whether or not the request is urgent (optional - default false)

    Response body

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

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

    List part requests

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/partrequest/list?isUrgent=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/partrequest/list?isUrgent=true"
    
    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/partrequest/list?isUrgent=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/partrequest/list?isUrgent=true");
    
    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/partrequest/list?isUrgent=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/partrequest/list?isUrgent=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/partrequest/list?isUrgent=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);
    

    Example Response

    {
      "page":1,
      "pageSize":25,
      "records":8,
      "recordsTotal":8,
      "data":[
        {<part request object>},
        {<part request object>},
        ...
        {<part request object>}
      ]
    }
    

    HTTP Request

    GET /api/v3/partrequest/list

    Query Parameters

    Parameter Type Description
    isUrgent boolean Is the request urgent (true/false)?
    isDeleted boolean Is the request deleted (true/false)?
    isSent boolean Is the request sent (true/false)?
    isComplete boolean Has the request been completed (true/false)?
    changedSince date time
    (yyyy-mm-dd HH:mm)
    Get requests modified after changedSince
    createdSince date time
    (yyyy-mm-dd HH:mm)
    Get requests created after createdSince
    sort string sort order, takes one of three values: dateCreated, isUrgent and isSent (Optional. Default is dateCreated)
    sortOrder string takes one of two values: ascending or descending (Optional. Default is ascending)

    Add pagination parameters if needed.

    Response body

    A list of part requests found.

    If none are found, an empty list is returned.

    NB: Multiple filters are cumulative.

    Fulfill a parts request

    POST Body (for a serialized part)

    {
      "quantity":2,
      "requestId":"1C9035A3-CE56-4E13-B9D0-DFFB9C02E782",
      "serials":["bb11","bb22"]
    }
    

    POST Body (for an unserialized part)

    {
      "quantity":2,
      "requestId":"1C9035A3-CE56-4E13-B9D0-DFFB9C02E782",
    }
    

    Sample Code

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

    JSON Returned

    {
      "id": "22aa76ac-03c8-4fdb-baee-dca2d33cdd23",
      "source": {
        "idStock": "18af2bf1-0973-4958-a66e-c5fe974ec129",
        "nmStock": "stock4"
      },
      "destination": {
        "idStock": "d6a71643-0ad2-4de8-abcb-34f54c4ca12e",
        "nmStock": "stock"
      },
      "user": {
        "id":54022,
        "name": "John Doe",
        "login": "login_user",
      }
      "part": {
        "id": 35947,
        "reference": "p6666",
        "name": "p6666",
        "unitPrice": "12.50"
        "isSerializable":true
      },
      "quantity": 2,
      "isDeleted": false,
      "isComplete": true,
      "isUrgent": false,
      "dateCreated":"2019-01-01 14:10:00"
    }
    

    HTTP Request

    POST /api/v3/partrequest/fulfill

    Request body

    Field Type Description
    id string ID of the part movement request
    isPartial boolean if true the request will not be marked as completed (default false)
    quantity integer Number of parts (only required when the request relates to an unserialized part)

    Response body

    The response contains the updated part request.

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

    Stock Depots

    Within Sychroteam's Stock Management. You can have one or more stock depots, and each of your technicians' vehicles can be tracked as stock depots as well, allowing you to follow part movements across your infrastructure.

    The stock depot object

    JSON Representation

    {
      "id":"1C9035A3-CE56-4E13-B9D0-DFFB9C02E782",
      "name":"Main Depot",
      "isDefault": true,
      "isProvider": true,
      "parts":[{
          "id":245684,
          "name":"10mm Bearing",
          "reference": "refHi001",
          "quantity": 4,
          "serials":["3000","3103","3020","3057"]
        },{
          "id":685946,
          "name":"Titanium Hinges Ti48",
          "reference": "KAAQ3104A",
          "quantity":20,
          "serials":[]
        }
      ]
    }
    

    A stock depot is represented by the following fields

    Field Type Description
    id int Stock Depot ID
    name string Stock Depot Name
    isDefault boolean Sets this stock depot as the default (true) or not (false).
    isProvider boolean Sets this stock depot as a provider (true) or not (false).*
    parts list of objects List of all parts in the depot, with id, name, reference and quantity (and serial numbers for serialized parts).

    (*) A provider depot is one that generally sources parts to mobile depots, such as a technician's vehicle

    Retrieve a depot

    curl --request GET \
      --url 'https://ws.synchroteam.com/api/v3/depot/details?id=1C9035A3-CE56-4E13-B9D0-DFFB9C02E782' \
      --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/depot/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/depot/details?id=1C9035A3-CE56-4E13-B9D0-DFFB9C02E782",
      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/depot/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/depot/details?id=1C9035A3-CE56-4E13-B9D0-DFFB9C02E782")
    
    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/depot/details?id=1C9035A3-CE56-4E13-B9D0-DFFB9C02E782")
      .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/depot/details?id=1C9035A3-CE56-4E13-B9D0-DFFB9C02E782");
    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":"1C9035A3-CE56-4E13-B9D0-DFFB9C02E782",
      "name":"Main Depot",
      "isDefault": true,
      "isProvider": true,
      "parts":[{
          "id":245684,
          "name":"10mm Bearing",
          "reference": "refHi001",
          "quantity": 4,
          "serials":["3000","3103","3020","3057"]
        },{
          "id":685946,
          "name":"Titanium Hinges Ti48",
          "reference": "KAAQ3104A",
          "quantity":20,
          "serials":[]
        }
      ]
    }
    

    HTTP Request

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

    Query Parameters

    Parameter Type Description
    {paramType} string Parameter name. Accepts id
    {paramValue} string The id of the depot

    Request body

    none

    Response body

    Returns the stock depot if found.

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

    List depots

    curl --request GET \
      --url https://ws.synchroteam.com/api/v3/depot/list?isProvider=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/depot/list?isProvider=true"
    
    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/depot/list?isProvider=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/depot/list?isProvider=true");
    
    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/depot/list?isProvider=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/depot/list?isProvider=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/depot/list?isProvider=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);
    

    Example Response

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

    HTTP Request

    GET /api/v3/depot/list

    Query Parameters

    Parameter Type Description
    isProvider boolean true/false (optional)
    isDefault boolean true/false (optional)
    name string search by name - a wildcard search is performed
    sort string sort order, takes one of two values: name or isProvider (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 depots found (NB: In this mode, the part list for each depot is not provided. Retrieve a specific depot to see the parts list)

    If none are found, an empty list is returned.

    NB: Multiple filters are cumulative.

    Initialize depot quantities

    POST Body

    [
     {
        "depot":{
          "name":"stock4"
        },
        "parts":[{
            "productCode": "KAAQ3104A",
            "quantity":210
          },{
            "productCode": "refHi001",
            "serials":["771000","771010","771020","771050","771045","771045"]
          }
        ]
      },
      {
        "depot":{
          "id":"1C9035A3-CE56-4E13-B9D0-DFFB9C02E782",
        }
        "parts":[{
            "productCode": "refHi001",
            "quantity": null
            "serials":["3000","3103","3020","3057"]
          },{
            "productCode": "KAAQ3104A",
            "quantity":20,
            "serials":[]
          }
        ]
      }
    ]
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/depot/quantities \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '[\r\n   {\r\n       "depot":{"name":"stock4"},\r\n       "parts":[{\r\n (...)'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/depot/quantities"
    
    payload = "[\r\n   {\r\n       \"depot\":{\"name\":\"stock4\"},\r\n       \"parts\":[{\r\n (...)"
    headers = {
        'authorization': "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
        'accept': "text/json",
        'content-type': "application/json",
        'cache-control': "no-cache"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://ws.synchroteam.com/api/v3/depot/quantities",
      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   {\r\n       \"depot\":{\"name\":\"stock4\"},\r\n       \"parts\":[{\r\n (...)",
      CURLOPT_HTTPHEADER => array(
        "accept: text/json",
        "authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
        "cache-control: no-cache",
        "content-type: application/json"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    ?>
    
    var unirest = require("unirest");
    
    var req = unirest("POST", "https://ws.synchroteam.com/api/v3/depot/quantities");
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send([
      {
        "depot": {"name":"stock4"},
        "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/depot/quantities")
    
    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   {\r\n       \"depot\":{\"name\":\"stock4\"},\r\n       \"parts\":[{\r\n (...)"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/depot/quantities")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("accept", "text/json")
      .header("content-type", "application/json")
      .header("cache-control", "no-cache")
      .body("[\r\n   {\r\n       \"depot\":{\"name\":\"stock4\"},\r\n       \"parts\":[{\r\n (...)")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/depot/quantities");
    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   {\r\n       \"depot\":{\"name\":\"stock4\"},\r\n       \"parts\":[{\r\n (...)", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
      "numErrors":0,
      "result":[
       {
          "depot":{
            "id":"1D9035A4-AA56-4E13-C9D0-DFFB9C02E784",
            "name":"stock4"
          },
          "partsLoaded":2,
          "errors":[]
        },
        {
          "depot":{
            "id":"1C9035A3-CE56-4E13-B9D0-DFFB9C02E782",
            "name":"stock"
          }
          "partsLoaded":2,
          "errors":[]
        }
      ]
    }
    

    HTTP Request

    POST /api/v3/depot/quantities

    Query Parameters

    None

    Request body

    A list of objects containing:

    Response body

    A json object containing the number of errors (numErrors) and a result.

    result is list of objects containing:

    Stock Parts

    See the Parts and Services documentation.

    Messages

    The Message object

    JSON Representation

    {
      "title":"Training Info",
      "message": "Hi - The Synchroteam Training is scheduled for Monday at 2pm",
      "priority" : "high", 
      "users" : [
      {
          "id":123654
      },
      {
          "login" : "john"
      }
      ]
    }
    

    A Message is represented by the following fields

    Field Type Description
    title string Title of the message
    message string The message to send
    priority string Priority : null, medium, high
    users list(User) Users recipients, defined by id or login

    Send a Message

    Synchroteam provides a single endpoint to send a Message to a Technician. These are Messages that the Technician can find inside the Mobile App

    Sample Code

    curl --request POST \
      --url 'https://ws.synchroteam.com/api/v3/message/send' \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{"title":"Training Info","priority" : "high", (...) }'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/message/send"
    
    payload = "{\"title\":\"Training Info\",\"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/message/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 => "{\"title\":\"Training Info\",\"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/message/send");
    
    
    req.headers({
      "cache-control": "no-cache",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB",
      "accept": "text/json",
      "content-type": "application/json"
    });
    
    req.type("json");
    req.send({
      "title": "Training Info",
      "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/message/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 = "{\"title\":\"Training Info\",\"priority\" : \"high\", (...) }"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/message/send")
      .header("content-type", "application/json")
      .header("accept", "text/json")
      .header("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB")
      .header("cache-control", "no-cache")
      .body("{\"title\":\"Training Info\",\"priority\" : \"high\", (...) }")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/message/send");
    var request = new RestRequest(Method.POST);
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("authorization", "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB");
    request.AddHeader("accept", "text/json");
    request.AddHeader("content-type", "application/json");
    request.AddParameter("application/json", "{\"title\":\"Training Info\",\"priority\" : \"high\", (...) }", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    Example Response

    {
        "message": "Hi - The Synchroteam Training is scheduled for Monday at 2pm",
        "priority": "high",
        "title": "Training Info",
        "users": [
            {
                "id": 123654,
                "login": "william"
            },
            {
                "id": 13579,
                "login": "john"
            }
        ]
    }
    

    Timeline

    The Timeline object

    JSON Representation

    {
        "id": 7,
        "type": "meeting",
        "title": "Test Note",
        "content": "Note Content",
        "isPinned": true,
        "isPublic": false,
        "dateCreated": "2023-04-29 22:45",
        "event": null,
        "source": "timeline",
        "customer": {
            "id": 24306,
            "name": " Philippe The Originals",
            "myId": "ref Philippe "
        },
        "site": {
            "id": 267681,
            "name": "Philippe The Originals -- Site1",
            "myId": "ref Site1"
        },
        "equipment": {
            "id": 260484,
            "name": "Philippe The Originals -- Site1 -- Equip1",
            "myId": "ref Equip1"
        },
        "job": {
            "id": "91e79fa9-c307-4570-9946-73d5b409a8de",
            "num": "2861",
            "myId": "ref job 2861"
        },
        "user": {
            "id": 272,
            "name": "ADIL ROUAY",
            "login": "arouay"
        }
    }
    

    Timeline items are represented by the following fields

    Field Type Description
    id integer Timeline item id (read only)
    type string Timeline item type: note , call , email , meeting , sms
    title string Timeline item title
    content string Timeline item note
    isPinned boolean Whether or not the Timeline item is pinned
    isPublic boolean Whether or not the Timeline item is public
    dateCreated datetime Timeline item creation date
    event string Timeline item event: unscheduled , created , scheduled , synchronized , started , paused , completed , validated , cancelled , deleted or null
    source string Timeline item source: timeline , notification
    customer object Object containing id , name and myId customer fields
    site object Object containing id , name and myId site fields
    equipment object Object containing id , name and myId equipment fields
    job object Object containing id , num and myId job fields
    user object Object containing id , name and login user fields

    List Timeline items

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

    [
        {<timeline object>},
        {<timeline object>},
        ...
        {<timeline object>}
    ]
    

    HTTP Request

    GET /api/v3/timeline/list

    Query Parameters

    Parameter Type Description
    changedSince dateTime return Timeline items modified after the UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    createdSince dateTime return Timeline items created after the UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    isPinned boolean return pinned Timeline items
    isPublic boolean return public Timeline items
    customer_id integer return Timeline items belonging to a customer by customer id
    customer_myId string return Timeline items belonging to a customer by customer myId
    site_id integer return Timeline items belonging to a site by site id
    site_myId string return Timeline items belonging to a site by site myId
    equipment_id integer return Timeline items belonging to a equipment by equipment id
    equipment_myId string return Timeline items belonging to a equipment by equipment myId
    job_id integer return Timeline items belonging to a job by job id
    job_myId string return Timeline items belonging to a job by job myId
    job_num integer return Timeline items belonging to a job by job num
    user_id integer return Timeline items belonging to a user by user id
    user_login string return Timeline items belonging to a user by user login
    type string note , call , email , meeting , sms
    event string unscheduled , created , scheduled , synchronized , started , paused , completed , validated , cancelled , deleted or null
    source string timeline , notification

    Response body

    A list of timeline found.

    If none are found, an empty list is returned.

    The returned list contains notes + notifications.

    NB: Multiple filters are cumulative.

    Create a Timeline item

    POST Body

    {
        "type": "sms",
        "title": "sms note 22",
        "content": "sms 22",
        "isPinned": true,
        "isPublic": false,
        "client": {
            "id": 1232872,
            "name": "Café La Boheme",
            "myId": "ref - Café La Boheme"
        },
        "site": {
            "id": 386109,
            "name": "Café La Boheme - Site 1"
        },
        "equipment": null,
        "job": {
            "id": "91e79fa9-c307-4570-0946-73d5b4a9a8de"
        },
        "user": {
            "id": 272,
            "name": "ADIL ROUAY",
            "login": "arouay"
        }
    }
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/timeline/send \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{\r\n  "type": "sms",\r\n  "title": "sms note 22" (...)}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/timeline/send"
    
    payload = "{\r\n  "type": "sms",\r\n  "title": "sms note 22" (...)}"
    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/timeline/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  "type": "sms",\r\n  "title": "sms note 22" (...)}",
      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/timeline/send");
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
      "type": "sms",
      "title": "sms note 22", (...)
    });
    
    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/timeline/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  \"type\": "sms",\r\n  \"title\": \"sms note 22\", (...)}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/timeline/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  \"type\": "sms",\r\n  \"title\": \"sms note 22\", (...)}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/timeline/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  \"type\": "sms",\r\n  \"title\": \"sms note 22\", (...)}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
        "id": 24,
        "type": "sms",
        "title": "sms note 22",
        "content": "sms 22",
        "isPinned": true,
        "isPublic": false,
        "created": "2023-05-06 10:39",
        "event": null,
        "source": "timeline",
        "client": {
            "id": 24024,
            "name": " Philippe The Originals"
        },
        "site": null,
        "equipment": null,
        "job": {
            "id": "91e79fa9-c347-4570-9946-73d4b4a9a8de",
            "num": "2861"
        },
        "user": {
            "id": 272,
            "name": "ADIL ROUAY",
            "login": "arouay"
        }
    }
    

    HTTP Request

    POST /api/v3/timeline/send

    Request Body

    Timeline information in JSON format, only creation is allowed no updates.

    Response Body

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

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

    Tasks

    The Task object

    JSON Representation

    {
            "id": 27,
            "content": "test 22",
            "dateDue": "2023-05-26 00:00",
            "dateDone": null,
            "dateCreated": "2023-05-06 20:22",
            "customer": {
                "id": 24126,
                "name": " Philippe The Originals",
                "myId": "ref Philippe "
            },
            "site": {
                "id": 267981,
                "name": "Philippe The Originals -- Site1",
                "myId": "ref Site1"
            },
            "equipment": {
                "id": 261484,
                "name": "Equip 01",
                "myId": "ref Equip 01"
            },
            "job": {
                "id": "91e79f09-c307-4570-9946-73d5b4a9a8de",
                "num": "2801",
                "myId": "ref job 2801"
            },
            "user": {
                "id": 272,
                "name": "ADIL ROUAY",
                "login": "arouay"
            },
            "userDone": {
                "id": 271,
                "name": "Tech Mobile",
                "login": "techm"
            },
            "category": "meeting"
        }
    

    Tasks are represented by the following fields

    Field Type Description
    id integer Task id (read only)
    content string Task note
    dateDue datetime Task due date
    dateDone datetime Task done date
    dateCreated datetime Task creation date
    customer object Object containing id , name and myId customer fields
    site object Object containing id , name and myId site fields
    equipment object Object containing id , name and myId equipment fields
    job object Object containing id , num and myId job fields
    user object Object containing id , name and login user fields
    userDone object Object containing id , name and login user fields
    category string Task category rappel , email , followup , meeting ...

    List Tasks

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

    [
        {<task object>},
        {<task object>},
        ...
        {<task object>}
    ]
    

    HTTP Request

    GET /api/v3/tasks/list

    Query Parameters

    Parameter Type Description
    changedSince dateTime return Tasks modified after the UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    createdSince dateTime return Tasks created after the UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    from dateTime return Tasks due after UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    to dateTime return Tasks due befor the UTC date+time specified (dateTime format: yyyy-mm-dd HH:mm:ss)
    customer_id integer return Tasks belonging to a customer by customer id
    customer_myId string return Tasks belonging to a customer by customer myId
    site_id integer return Tasks belonging to a site by site id
    site_myId string return Tasks belonging to a site by site myId
    equipment_id integer return Tasks belonging to a equipment by equipment id
    equipment_myId string return Tasks belonging to a equipment by equipment myId
    job_id integer return Tasks belonging to a job by job id
    job_myId string return Tasks belonging to a job by job myId
    job_num integer return Tasks belonging to a job by job num
    user_id integer return Tasks belonging to a user by user id
    user_login string return Tasks belonging to a user by user login
    userDone_id integer return Tasks done to a user by user id
    userDone_login string return Tasks done to a user by user login
    category string rappel , email , followup , meeting ...

    Response body

    A list of tasks found.

    If none are found, an empty list is returned.

    NB: Multiple filters are cumulative.

    Create a Task

    POST Body

    {
        "content": "test task",
        "dateDue": "2023-05-26 00:00",
        "customer": {
            "id": 24306,
            "name": " Philippe The Originals",
            "myId": "ref Philippe "
        },
        "site": {
            "id": 217681,
            "name": "Philippe The Originals -- Site1",
            "myId": "ref Site1"
        },
        "equipment": {
            "id": 260404,
            "name": "Equip 01",
            "myId": "ref Equip 01"
        },
        "job": {
            "id": "91e79fa9-c307-4506-9946-73d5b4a9a8de",
            "num": "2061",
            "myId": "ref job 2061"
        },
        "user": {
            "id": 272,
            "name": "ADIL ROUAY",
            "login": "arouay"
        },
        "category": "followup"
    }
    

    Sample Code

    curl --request POST \
      --url https://ws.synchroteam.com/api/v3/tasks/send \
      --header 'accept: text/json' \
      --header 'authorization: Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB' \
      --header 'cache-control: no-cache' \
      --header 'content-type: application/json' \
      --data '{\r\n  "content": "test task",\r\n  "dateDue": "2023-05-26 00:00" (...)}'
    
    import requests
    
    url = "https://ws.synchroteam.com/api/v3/tasks/send"
    
    payload = "{\r\n  "content": "test task",\r\n  "dateDue": "2023-05-26 00:00" (...)}"
    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/tasks/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  "content": "test task",\r\n  "dateDue": "2023-05-26 00:00" (...)}",
      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/tasks/send");
    
    req.headers({
      "cache-control": "no-cache",
      "content-type": "application/json",
      "accept": "text/json",
      "authorization": "Basic c3luY2hyb3RlYW06MTUzODc0REItMUM0OC00NDQzLUE0OEUtQzhEMjg4NzhBQThB"
    });
    
    req.type("json");
    req.send({
        "content": "test task",
        "dateDue": "2023-05-26 00:00" (...)
    });
    
    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/tasks/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  "content": "test task",\r\n  "dateDue": "2023-05-26 00:00" (...)}"
    
    response = http.request(request)
    puts response.read_body
    
    HttpResponse<String> response = Unirest.post("https://ws.synchroteam.com/api/v3/tasks/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  "content": "test task",\r\n  "dateDue": "2023-05-26 00:00" (...)}")
      .asString();
    
    var client = new RestClient("https://ws.synchroteam.com/api/v3/tasks/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  "content": "test task",\r\n  "dateDue": "2023-05-26 00:00" (...)}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    

    JSON Returned

    {
        "id": 27,
        "content": "test 22",
        "dateDue": "2023-05-26 00:00",
        "dateDone": null,
        "dateCreated": "2023-05-06 20:22",
        "customer": {
            "id": 24306,
            "name": " Philippe The Originals",
            "myId": "ref Philippe "
        },
        "site": {
            "id": 217681,
            "name": "Philippe The Originals -- Site1",
            "myId": "ref Site1"
        },
        "equipment": {
            "id": 260404,
            "name": "Equip 01",
            "myId": "ref Equip 01"
        },
        "job": {
            "id": "91e79fa9-c307-4506-9946-73d5b4a9a8de",
            "num": "2061",
            "myId": "ref job 2061"
        },
        "user": {
            "id": 272,
            "name": "ADIL ROUAY",
            "login": "arouay"
        },
        "userDone": null,
        "category": "followup"
    }
    

    HTTP Request

    POST /api/v3/tasks/send

    Request Body

    Tasks information in JSON format, only creation is allowed no updates.

    Response Body

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

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