put
https://api.toriihq.com/v1.0/services/sync/custom
Use the following code snippet to validate an uploaded data file and sync a custom integration
<code class="hljs">curl -X PUT -d '{"idFile":"{FILE_ID}", "idAppAccount": "{APP_ACCOUNT_ID}"}' -H "Authorization: Bearer API_KEY" -H "Content-Type: application/json" "https://api.toriihq.com/v1.0/services/sync/custom"</code>
<ul>
<li>The uploaded file must be a JSON file.</li>
<li>Before uploading a file using <a href="#operation--files-url-get">File upload API</a>, follow the file schema.</li>
<li>File type is "customIntegrationData".</li>
<li>Only one sync can run at a time, a 409 error code will be returned if there's an attempt to run more than one sync at a time.</li>
</ul>
<details>
<summary>File schema</summary>
Default values are marked in <span style="color:red;">red</span>
<ol>
<li>users - Array [required] - Must have at least 1 valid user</li>
<div>User object:</div>
<ul>
<li>id - String [optional] - The unique identifier of a user in the application</li>
<li>email - String [required]</li>
<li>firstName - String [optional]</li>
<li>lastName - String [optional]</li>
<li>status - Enum (<span style="color:red;">active</span>/deleted ) [optional] - The status of the user in Torii. Only active users are displayed as users of the application</li>
<li>externalStatus - String [optional] - The status of the user as it appears on the application’s site</li>
<li>roles - String[] [optional]</li>
<li>lastUsedDate - Date [optional] - ISO 8601 (YYYY-MM-DD)</li>
</ul>
<li>licenses - Array [optional]</li>
<div>License object:</div>
<ul>
<li>name - String [required]</li>
<li>unassignedAmount - Number [optional] - Number of licenses that are not assigned to users</li>
<li>users - Array [optional]</li>
<div>License user object:</div>
<ul>
<li>email - String [required] - user's email</li>
<li>licenseStatus - Enum ( active/inactive/deleted ) [optional] - If not provided, will be defined by user status</li>
</ul>
<li>pricePerUser - Number [optional] - should be sent in cents (will be saved in the organization's display currency) </li>
<ul>
</ol>
</details>
<details>
<summary>File example</summary>
{
"users": [
{
"id: "15893",
"email": "[email protected]",
"firstName": "Adam",
"lastName": "Test",
"status": "active",
"externalStatus": "Active",
"roles": ["Admin", "Super admin"],
"lastUsedDate": "2021-07-05T20:43:14Z"
},
{
"id": "39471",
"email": "[email protected]",
"firstName": "Tony",
"lastName": "Example",
"status": "active",
"externalStatus": "Deactivated",
"roles": ["Member"],
"lastUsedDate": "2021-05-05T14:43:14Z"
}
],
"licenses": [
{
"name": "Pro",
"unassignedAmount": 10,
"users": [
{
"email": "[email protected]",
"licenseStatus": "active"
}
],
"pricePerUser": 15000
},
{
"name": "Basic",
"unassignedAmount": 5,
"users": [],
"pricePerUser": 0
},
{
"name": "Corp",
"unassignedAmount": 20,
"users": [
{
"email": "[email protected]",
"licenseStatus": "inactive"
}
],
"pricePerUser": 20000
}
]
}
- Rate limit: 200 requests per minute
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…