By connecting software packages, manual labor can be automated. Avoid duplication of work, frustrations, and errors.

 

The API of Tim is accessible via TimSaas.com. Tim API works with an API key. This API key is linked to a user. You can generate an access token using this API key, which you use when calling the API.


Requesting an API key

 

The API key is created by Softmakers. So you can request an API key from us. The API key is a GUID.


Using the API Key

The base URL  =  https://timsaas.com/TimApi/ or https://develop.timsaas.com/TimApi/


Requesting Token (GET)

{{BaseUrl}}api/ApiAccess?tenantId=N&userId=N&apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

The response is in JSON format.


{
  "AccessToken": "eyJhbGciPiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6IjQwZDVkMGM0LTA5ZTAtNDM2Yi1hODU2LWU4OGE1KDIzMThmZSIsIm5iZiI6MTU3NTMwNDAyMCEiZXhwIjoxNjA2OTI2NTIwLCJpYXQhspE1NzUzMDQxMjB9.DPoUtMoy6KAyDg0c0RsRurHmjbZ4Y2RhEZyGJHwBe7Q",
  "TokenValid": "2021-01-31T17:28:40.3946847+01:00",
  "TenantIds": [
    {
      "TenantId": 912,
      "Name": "API bedrijf",
      "TenantType": {
        "TypeId": 2,
        "Description": "Production"
      },
      "UserRole": null,
      "ApiLocations": null
    }
  ]
}

The access token is the token you need to use for every call you make to the Tim API. Currently, this token remains valid for 8 hours. Additionally, you need the tenant ID for all calls. In this example, the tenant ID is 912.


API Calls

You can see which Tim API calls you can make by visiting https://{develop.}timsaas.com/TimApi/help. Below is an example of calling a DoProcedure using a PUT request.


{{BaseUrl}}/api/DoProcedure?tenantId=N&procedurename=TWC_GetCustomerData

Body

[
  {
    "Name": "@TenantId",
    "DataType": 8,
    "Value": 912
  },
  {
    "Name": "@UserName",
    "DataType": 3,
    "Value": "huibvandersteen@softmakers.nl"
  }
]


Example Response:

 

You will receive an HTTP response code or HTTP status code and a possible JSON if necessary.


{
  "EntityId": 390000899,
  "EANCode": "G871607401008341743",
  "EndAuthorization": "2012-01-01T00:00:00Z",
  "StreetName": "Brederoplein",
  "StreetNr": "1308",
  "ZipCode": "3594 XX",
  "City": "UTRECHT",
  "Country": "Netherlands"
}