Overview
This document describes the procedure for uploading data to the Tim API. It outlines the steps required to obtain the necessary credentials, generate an authentication token, and successfully call the ExternalObject endpoint.
Obtaining a Tim-API Key
API operations. Store them securely.
Generating a Bearer Token
To generate a Bearer Token, follow these steps:
Open the Swagger UI at:
https://start.timsaas.com/TimApi/swagger/ui/indexOr navigate directly to the token generation endpoint:
https://start.timsaas.com/TimApi/swagger/ui/index#!/ApiAccess/ApiAccess_GetEnter the following values in the request form:
- Tenant ID
- Email your Microsoft account email
- API Key
Click Execute to generate the Bearer Token.
Authentication
Use the generated Bearer Token for all authenticated API requests. The Authorization header must be formatted as follows:
Authorization: Bearer <your_token>
Token & Key Validity
| Credential | Validity Period | Renewal Procedure |
|---|---|---|
| Bearer Token | 30 minutes | Generate a new token via Swagger UI |
| API Key | 6 months | Request a new API Key |
Endpoint: ExternalObject
The ExternalObject endpoint allows external applications to send JSON data to Tim.
Endpoint Details
- Method:
POST - URL:
/api/ExternalObject
Authentication
A valid Bearer Token is required. Include the token in the Authorization header.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tenantId | Integer | Yes | The unique identifier of your Tim API environment (tenant). |
Example Request
POST /api/ExternalObject?tenantId=123
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Content-Type: application/jsonRequest Body example:
{
"Type": "QUOTE",
"Object": {
"id": 260700008,
"generalInformation": {
"id": "number",
"name": "string",
"marketId": "number"
}
}
}Type Field
The Type field must be one of the following values:
QUOTEENGAGEMENT
Important Notes
- A Bearer Token is valid for 30 minutes. After expiration, a new token must be generated.
- An API Key is valid for 6 months. After expiration, a new API Key must be requested.
- Always ensure secure storage of credentials and tokens.
Additional Reference
Swagger UI
https://start.timsaas.com/TimApi/swagger/ui/index?#!/ExternalObject