### List Groups API Request Examples Source: https://clint-api.readme.io/reference/groups Provides examples of how to call the 'List groups' endpoint of the Clint API using various programming languages. These examples demonstrate making a GET request to retrieve a paginated list of groups. ```shell curl --request GET \ --url 'https://api.clint.digital/v1/groups?limit=200&offset=0&page=1' \ --header 'accept: application/json' ``` ```node const options = { method: 'GET', url: 'https://api.clint.digital/v1/groups?limit=200&offset=0&page=1', headers: { 'accept': 'application/json' } }; fetch(options.url, options) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error(error)); ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.clint.digital/v1/groups?limit=200&offset=0&page=1") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["accept"] = "application/json" response = http.request(request) puts response.read_body ``` ```php ``` ```python import requests url = "https://api.clint.digital/v1/groups?limit=200&offset=0&page=1" headers = { 'accept': 'application/json' } response = requests.get(url, headers=headers) print(response.json()) ``` -------------------------------- ### List Contacts Ruby Request Example Source: https://clint-api.readme.io/reference/contacts-2 Example of how to list contacts using Ruby. This code snippet would typically use the 'net/http' library or a gem like 'httparty' to perform the GET request. ```ruby # Example using Net::HTTP require 'net/http' require 'uri' uri = URI.parse('https://api.clint.digital/v1/contacts?limit=200&offset=0&page=1') request = Net::HTTP::Get.new(uri) request['accept'] = 'application/json' response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http| http.request(request) end puts response.body ``` -------------------------------- ### List Contacts Python Request Example Source: https://clint-api.readme.io/reference/contacts-2 Example of how to list contacts using Python. This code snippet would typically use the 'requests' library to perform the GET request. ```python import requests url = 'https://api.clint.digital/v1/contacts?limit=200&offset=0&page=1' headers = { 'accept': 'application/json' } response = requests.get(url, headers=headers) if response.status_code == 200: print(response.json()) else: print(f'Error: {response.status_code}') ``` -------------------------------- ### List Tags using Node.js Source: https://clint-api.readme.io/reference/tags-2 Provides an example of how to fetch a paginated list of tags from the Clint API using Node.js. This snippet utilizes the 'node-fetch' library to make the HTTP GET request and handle the JSON response. ```javascript const fetch = require('node-fetch'); const options = { method: 'GET', headers: { 'accept': 'application/json' } }; fetch('https://api.clint.digital/v1/tags?limit=200&offset=0&page=1', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` -------------------------------- ### List Tags using Ruby Source: https://clint-api.readme.io/reference/tags-2 Illustrates how to retrieve a paginated list of tags from the Clint API using Ruby. This example uses the built-in 'net/http' library to perform the GET request and parse the JSON response. ```ruby require 'uri' require 'net/http' require 'json' uri = URI.parse('https://api.clint.digital/v1/tags?limit=200&offset=0&page=1') request = Net::HTTP::Get.new(uri) request['accept'] = 'application/json' response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http| http.request(request) end puts JSON.parse(response.body) ``` -------------------------------- ### List Contacts PHP Request Example Source: https://clint-api.readme.io/reference/contacts-2 Example of how to list contacts using PHP. This code snippet would typically use cURL or the Guzzle HTTP client to make the GET request. ```php // Example using cURL $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://api.clint.digital/v1/contacts?limit=200&offset=0&page=1'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); $headers = array(); $headers[] = 'Accept: application/json'; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); } else { echo $response; } curl_close($ch); ``` -------------------------------- ### List Origins - Python Request Source: https://clint-api.readme.io/reference/origins Demonstrates fetching a paginated list of origins using Python. This example would likely use the 'requests' library to make the HTTP GET call. ```python # Python example for listing origins would go here. # This would typically use the 'requests' library. ``` -------------------------------- ### List Tags using cURL Source: https://clint-api.readme.io/reference/tags-2 Demonstrates how to retrieve a paginated list of tags from the Clint API using a cURL request. This example shows the GET request structure, URL with query parameters, and necessary headers. ```shell curl --request GET \ --url 'https://api.clint.digital/v1/tags?limit=200&offset=0&page=1' \ --header 'accept: application/json' ``` -------------------------------- ### List Users Python Request Source: https://clint-api.readme.io/reference/users This snippet shows a Python example for fetching a paginated list of users. It uses the 'requests' library to make a GET request to the API, specifying query parameters and the 'accept' header. ```python import requests url = "https://api.clint.digital/v1/users" params = { "limit": 200, "offset": 0, "page": 1 } headers = { "accept": "application/json" } response = requests.get(url, params=params, headers=headers) print(response.json()) ``` -------------------------------- ### List Contacts Node.js Request Example Source: https://clint-api.readme.io/reference/contacts-2 Example of how to list contacts using Node.js. This code snippet would typically use a library like 'axios' or the built-in 'https' module to make the GET request to the API endpoint. ```javascript // Example using fetch API (Node.js 18+) fetch('https://api.clint.digital/v1/contacts?limit=200&offset=0&page=1', { method: 'GET', headers: { 'accept': 'application/json' } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ``` -------------------------------- ### GET /deals/{id} Source: https://clint-api.readme.io/reference/get_deals-id Retrieve a single deal by its unique identifier. ```APIDOC ## GET /deals/{id} ### Description Retrieve a single deal by ID. ### Method GET ### Endpoint /deals/{id} ### Parameters #### Path Parameters - **id** (string) - Required - UUID of the deal to retrieve. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **status** (integer) - Response status. - **data** (object) - The deal object, containing details like id, origin_id, user, contact, created_at, stage_id, updated_stage_at, status, won_at, won_by, lost_status_id, lost_at, lost_by, and fields. #### Response Example ```json { "status": 200, "data": { "id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8", "origin_id": "some-origin-id", "user": { "id": "user-id", "full_name": "User full name" }, "contact": { "id": "contact-id", "name": "Contact name", "email": "contact@email.com", "phone": "+5548999999999" }, "created_at": "2020-01-01T14:15:00.000000+00:00", "stage_id": "stage-id", "updated_stage_at": "2020-01-01T14:15:00.000000+00:00", "status": "OPEN", "won_at": null, "won_by": null, "lost_status_id": null, "lost_at": null, "lost_by": null, "fields": {} } } ``` ``` -------------------------------- ### GET /deals Source: https://clint-api.readme.io/reference/get_deals Retrieves a list of deals, with options to filter by various criteria such as update time, deal fields, and win/loss dates. Supports pagination. ```APIDOC ## GET /deals ### Description Retrieves a list of deals. This endpoint allows filtering by update stage time, deal fields, win/loss dates, and supports pagination. ### Method GET ### Endpoint /deals ### Parameters #### Query Parameters - **updated_stage_at_end** (DateTime) - Optional - Filter by updated_stage_at using LTE operator - **fields** (object) - Optional - Filter by deal fields. Can be used multiple times for each field - **won_at_start** (DateTime) - Optional - Filter by won_at using GTE operator - **won_at_end** (DateTime) - Optional - Filter by won_at using LTE operator - **lost_at_start** (DateTime) - Optional - Filter by lost_at using GTE operator - **lost_at_end** (DateTime) - Optional - Filter by lost_at_at using LTE operator - **api-token** (string) - Required - API Token - **limit** (integer) - Optional - Max number of rows returned (default: 200, max: 1000, min: 1) - **offset** (integer) - Optional - Number of rows skipped of the result (default: 0, min: 0) - **page** (integer) - Optional - Select the page of the result (default: 1, min: 1) ### Response #### Success Response (200) - **data** (array) - An array of Deal objects #### Response Example { "data": [ { "id": "some_id", "origin_id": "some_origin_id", "user": { "id": "user_id", "full_name": "User full name" }, "contact": { "id": "contact_id", "name": "Contact name", "email": "contact@email.com", "phone": "+5548999999999" }, "created_at": "2020-01-01T14:15:00.000000+00:00", "stage_id": "stage_id", "updated_stage_at": "2020-01-01T14:15:00.000000+00:00", "status": "open" } ] } ``` -------------------------------- ### List Users Ruby Request Source: https://clint-api.readme.io/reference/users This snippet provides a Ruby example for retrieving a paginated list of users. It uses the 'httparty' gem to send a GET request to the API, including query parameters and the necessary 'accept' header. ```ruby require 'httparty' response = HTTParty.get('https://api.clint.digital/v1/users', query: { limit: 200, offset: 0, page: 1 }, headers: { 'accept' => 'application/json' }) puts response.body ``` -------------------------------- ### List Tags using PHP Source: https://clint-api.readme.io/reference/tags-2 Shows how to fetch a paginated list of tags from the Clint API using PHP. This example uses cURL functions to make the HTTP GET request and process the JSON response. ```php ``` -------------------------------- ### List Origins - Node.js Request Source: https://clint-api.readme.io/reference/origins Provides an example of how to retrieve a paginated list of origins using Node.js. This snippet would typically involve making an HTTP GET request to the specified API endpoint. ```javascript // Node.js example for listing origins would go here. // This would typically use a library like 'axios' or the built-in 'https' module. ``` -------------------------------- ### GET /deals Source: https://clint-api.readme.io/reference/get_deals Retrieve a paginated list of deals. This endpoint allows filtering deals by various criteria such as origin, creation/update times, associated users and contacts, tags, and deal stage. ```APIDOC ## GET /deals ### Description Retrieve a paginated list of deals. This endpoint allows filtering deals by various criteria such as origin, creation/update times, associated users and contacts, tags, and deal stage. ### Method GET ### Endpoint /deals ### Parameters #### Query Parameters - **X-API-Key** (string) - Required - API key for authentication. - **limit** (integer) - Optional - Maximum number of deals to return. - **offset** (integer) - Optional - Number of deals to skip before returning results. - **page** (integer) - Optional - Page number for pagination. - **origin_id** (ID) - Optional - Filter by origin ID. - **created_at_start** (DateTime) - Optional - Filter by created_at using GTE operator. - **created_at_end** (DateTime) - Optional - Filter by created_at using LTE operator. - **updated_at_start** (DateTime) - Optional - Filter by updated_at using GTE operator. - **updated_at_end** (DateTime) - Optional - Filter by updated_at using LTE operator. - **user_id** (ID) - Optional - Filter by user ID. - **user_email** (string) - Optional - Filter by user e-mail. Example: "user@email.com" - **contact_id** (ID) - Optional - Filter by contact ID. - **phone** (string) - Optional - Filter by contact phone. Example: "999999999" - **email** (string) - Optional - Filter by contact e-mail. Example: "contact@email.com" - **tag_ids** (string) - Optional - Filter by tag IDs using OR operator. Separated by ','. Example: "8feade82-d77b-4e8b-9d35-fd43e972b5c8,99999999-d77b-4e8b-9d35-fd43e972b999" - **tag_names** (string) - Optional - Filter by tag names using OR operator. Separated by ','. Example: "tag1,tag2,tag3" - **status** (DealStatus) - Optional - Filter by status. - **stage_id** (ID) - Optional - Filter by stage ID. - **updated_stage_at_start** (DateTime) - Optional - Filter by updated_stage_at using GTE operator. ### Response #### Success Response (200) - **deals** (array) - A list of deal objects. - **pagination** (object) - Pagination information. #### Response Example ```json { "deals": [ { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "Example Deal", "value": 1000, "status": "open", "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T11:00:00Z" } ], "pagination": { "total": 100, "limit": 10, "offset": 0, "page": 1 } } ``` ``` -------------------------------- ### GET /tags Source: https://clint-api.readme.io/reference/get_tags Retrieve a paginated list of tags. Supports filtering by tag name and pagination parameters. ```APIDOC ## GET /tags ### Description Retrieve a paginated list of tags. Supports filtering by tag name and pagination parameters. ### Method GET ### Endpoint https://api.clint.digital/v1/tags ### Parameters #### Path Parameters None #### Query Parameters - **api-token** (string) - Required - API Token - **limit** (integer) - Optional - Max number of rows returned (default: 200, max: 1000, min: 1) - **offset** (integer) - Optional - Number of rows skipped of the result (default: 0, min: 0) - **page** (integer) - Optional - Select the page of the result (default: 1, min: 1) - **name** (string) - Optional - Filter by tag name (example: "Tag name") ### Request Example ```json { "example": "No request body for GET request" } ``` ### Response #### Success Response (200) - **status** (integer) - Response status - **totalCount** (integer) - Total items based on current filters - **page** (integer) - Current page - **totalPages** (integer) - Total pages based on current filters - **hasNext** (boolean) - Indicates that has next page - **hasPrevious** (boolean) - Indicates that has previous page - **data** (array) - An array of tag objects - **id** (string) - Unique identifier for the tag (format: uuid, example: "8feade82-d77b-4e8b-9d35-fd43e972b5c8") - **name** (string) - The name of the tag (example: "Tag name") - **color** (string) - The color of the tag (enum: ["#f44336", "#e91e63", "#9c27b0"]) #### Response Example ```json { "status": 200, "totalCount": 50, "page": 1, "totalPages": 10, "hasNext": true, "hasPrevious": false, "data": [ { "id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8", "name": "Tag name", "color": "#f44336" } ] } ``` ``` -------------------------------- ### Get Deal by ID Source: https://clint-api.readme.io/reference/get_deals-id Retrieves the details of a specific deal using its unique identifier. ```APIDOC ## GET /deals/{dealId} ### Description Retrieves a single deal by its unique ID. ### Method GET ### Endpoint /deals/{dealId} ### Parameters #### Path Parameters - **dealId** (string) - Required - The unique identifier of the deal to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the deal. - **name** (string) - The name of the deal. - **status** (string) - The current status of the deal. #### Response Example ```json { "id": "deal_123", "name": "Q4 Sales Campaign", "status": "Open" } ``` ``` -------------------------------- ### GET /v1/account/fields Source: https://clint-api.readme.io/reference/account Retrieves a list of fields associated with the account. Requires an API token for authentication. ```APIDOC ## GET /v1/account/fields ### Description Retrieve a list of fields available for the authenticated account. ### Method GET ### Endpoint https://api.clint.digital/v1/account/fields ### Parameters #### Headers - **api-token** (string) - Required - Your API authentication token. ### Request Example ```bash curl --request GET \ --url https://api.clint.digital/v1/account/fields \ --header 'accept: application/json' \ --header 'api-token: YOUR_API_TOKEN' ``` ### Response #### Success Response (200) - **fields** (array) - A list of available fields. #### Response Example ```json { "fields": [ { "id": "field_id_1", "name": "Field Name 1", "type": "text" }, { "id": "field_id_2", "name": "Field Name 2", "type": "number" } ] } ``` ``` -------------------------------- ### GET /users/{id} Source: https://clint-api.readme.io/reference/get_users-id Retrieve a single user by ID. This endpoint allows you to fetch detailed information about a specific user using their unique identifier. ```APIDOC ## GET /users/{id} ### Description Retrieve a single user by ID. ### Method GET ### Endpoint /users/{id} ### Parameters #### Path Parameters - **id** (string) - Required - UUID of the user to retrieve. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **status** (integer) - Response status. - **data** (object) - Contains the user object. - **id** (string) - UUID of the user. - **email** (string) - User e-mail. - **first_name** (string) - User first name. - **last_name** (string) - User last name. #### Response Example ```json { "status": 200, "data": { "id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8", "email": "User e-mail", "first_name": "User first name", "last_name": "User last name" } } ``` ``` -------------------------------- ### Get Organization by ID - cURL Request Source: https://clint-api.readme.io/reference/organizations Example cURL request to retrieve a single organization by its ID. Requires an API token in the headers. ```shell curl --request GET \ --url https://api.clint.digital/v1/organizations/id \ --header 'accept: application/json' ``` -------------------------------- ### List Deals with cURL Source: https://clint-api.readme.io/reference/deals-2 This snippet demonstrates how to list deals using cURL. It includes the GET request method, the API endpoint, and common query parameters like limit, offset, page, and status. The 'accept' header is also specified. ```shell curl --request GET \ --url 'https://api.clint.digital/v1/deals?limit=200&offset=0&page=1&status=OPEN' \ --header 'accept: application/json' ``` -------------------------------- ### Get Organization by ID - PHP Request Source: https://clint-api.readme.io/reference/organizations Example PHP request using cURL to retrieve a single organization by its ID. Requires an API token in the headers. ```php ``` -------------------------------- ### List Deals with Ruby Source: https://clint-api.readme.io/reference/deals-2 This snippet demonstrates how to list deals using Ruby. It makes a GET request to the Clint API endpoint with specified query parameters for filtering and pagination, and includes the 'accept' header for JSON response. ```ruby require 'uri' require 'net/http' url = URI("https://api.clint.digital/v1/deals?limit=200&offset=0&page=1&status=OPEN") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["accept"] = "application/json" response = http.request(request) puts response.read_body ``` -------------------------------- ### Get Organization by ID - Ruby Request Source: https://clint-api.readme.io/reference/organizations Example Ruby request using the 'httparty' gem to retrieve a single organization by its ID. Requires an API token in the headers. ```ruby require 'httparty' url = 'https://api.clint.digital/v1/organizations/{id}' api_token = 'YOUR_API_TOKEN' organization_id = 'YOUR_ORGANIZATION_ID' response = HTTParty.get(url.gsub('{id}', organization_id), headers: { 'accept' => 'application/json', 'api-token' => api_token } ) if response.success? puts response.parsed_response else puts "Error: #{response.code} - #{response.message}" end ``` -------------------------------- ### Get Organization by ID - Python Request Source: https://clint-api.readme.io/reference/organizations Example Python request using the 'requests' library to retrieve a single organization by its ID. Requires an API token in the headers. ```python import requests def get_organization(org_id, api_token): url = f"https://api.clint.digital/v1/organizations/{org_id}" headers = { "accept": "application/json", "api-token": api_token } response = requests.get(url, headers=headers) if response.status_code == 200: return response.json() else: print(f"Error: {response.status_code} - {response.text}") return None # Example usage: # organization_data = get_organization('your-organization-id', 'your-api-token') # if organization_data: # print(organization_data) ``` -------------------------------- ### Get Organization by ID - Node.js Request Source: https://clint-api.readme.io/reference/organizations Example Node.js request using the 'axios' library to retrieve a single organization by its ID. Requires an API token in the headers. ```javascript const axios = require('axios'); const getOrganization = async (id, apiToken) => { try { const response = await axios.get(`https://api.clint.digital/v1/organizations/${id}`, { headers: { 'accept': 'application/json', 'api-token': apiToken } }); return response.data; } catch (error) { console.error('Error fetching organization:', error); throw error; } }; // Example usage: // getOrganization('your-organization-id', 'your-api-token').then(data => console.log(data)); ``` -------------------------------- ### List Deals with PHP Source: https://clint-api.readme.io/reference/deals-2 This snippet illustrates how to list deals using PHP. It constructs a GET request to the Clint API endpoint, including query parameters for filtering and pagination, and sets the 'accept' header to request a JSON response. ```php ``` -------------------------------- ### List Deals with Python Source: https://clint-api.readme.io/reference/deals-2 This snippet shows how to list deals using Python's 'requests' library. It sends a GET request to the Clint API endpoint with query parameters for filtering and pagination, and specifies the 'accept' header for a JSON response. ```python import requests url = "https://api.clint.digital/v1/deals" params = { "limit": "200", "offset": "0", "page": "1", "status": "OPEN" } headers = { "accept": "application/json" } response = requests.get(url, params=params, headers=headers) print(response.text) ``` -------------------------------- ### List Origins - Ruby Request Source: https://clint-api.readme.io/reference/origins Shows an example of fetching a list of origins using Ruby. This would involve using an HTTP client library in Ruby to interact with the API. ```ruby # Ruby example for listing origins would go here. # This would typically use libraries like 'net/http' or 'httparty'. ``` -------------------------------- ### List Lost Status - cURL Request Source: https://clint-api.readme.io/reference/lost-status This snippet demonstrates how to make a GET request to the '/v1/lost-status' endpoint using cURL. It includes example query parameters for limit, offset, and page, along with the required 'accept' header. ```shell curl --request GET \ --url 'https://api.clint.digital/v1/lost-status?limit=200&offset=0&page=1' \ --header 'accept: application/json' ``` -------------------------------- ### List Deals with Node.js Source: https://clint-api.readme.io/reference/deals-2 This snippet shows how to retrieve a paginated list of deals using Node.js. It utilizes the 'axios' library to make a GET request to the Clint API endpoint, passing query parameters for filtering and pagination. ```javascript const axios = require('axios'); const options = { method: 'GET', url: 'https://api.clint.digital/v1/deals', params: { limit: '200', offset: '0', page: '1', status: 'OPEN' }, headers: { 'accept': 'application/json' } }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); }); ``` -------------------------------- ### POST /deals Source: https://clint-api.readme.io/reference/post_deals Creates a new deal within the Clint application. This endpoint allows for the creation of deals with various associated details such as contact information, value, and custom fields. ```APIDOC ## POST /deals ### Description Create a new Deal ### Method POST ### Endpoint /deals ### Parameters #### Header Parameters - **api-token** (string) - Required - API Token #### Request Body - **origin_id** (string) - Required - Unique identifier for the origin of the deal. - **name** (string) - Optional - The name of the contact associated with the deal. - **phone** (string) - Optional - The phone number of the contact. - **email** (string) - Optional - The email address of the contact. - **username** (string) - Optional - The username or identifier from a social platform. - **value** (number) - Optional - The monetary value of the deal. - **stage_id** (string) - Optional - The identifier for the deal stage. - **user_id** (string) - Optional - The identifier for the user assigned to the deal. - **contact_id** (string) - Optional - The identifier for the contact associated with the deal. - **fields** (object) - Optional - An object containing additional custom fields for the deal. - **contact** (object) - Optional - Nested object for contact-specific custom fields. - **organization** (object) - Optional - Nested object for organization-specific custom fields. ### Request Example ```json { "origin_id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8", "name": "John Doe", "phone": "48999999999", "email": "john.doe@example.com", "username": "johndoe_insta", "value": 150.75, "stage_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "user_id": "f0e9d8c7-b6a5-4321-0987-fedcba098765", "contact_id": "12345678-abcd-ef01-2345-67890abcdef0", "fields": { "contact": { "preferred_contact_method": "email" }, "organization": { "industry": "Technology" } } } ``` ### Response #### Success Response (201) - **id** (string) - The unique identifier of the created deal. #### Response Example ```json { "id": "98765432-abcd-ef01-2345-67890abcdef0" } ``` ``` -------------------------------- ### Create Tag - POST /tags Source: https://clint-api.readme.io/reference/post_tags Creates a new tag with a specified name and color. Requires an API token in the header for authentication. The request body must be a JSON object conforming to the TagCreateSchema, including 'name' and 'color'. ```json { "openapi": "3.0.2", "info": { "title": "Clint API", "description": "API for managing contacts, deals, and tags in the Clint application", "contact": { "name": "API Support", "url": "http://www.example.com/support", "email": "support@example.com" }, "version": "1.0.0" }, "servers": [ { "url": "https://api.clint.digital/v1", "description": "The production API server" }, { "url": "http://localhost:4004/v1", "description": "The development API server" } ], "tags": [ { "name": "Tags", "description": "Operations related to managing tags" } ], "paths": { "/tags": { "post": { "summary": "Create tag", "description": "Create a new tag", "parameters": [ { "$ref": "#/components/parameters/headerParamXAPIKey" } ], "tags": [ "Tags" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagCreateSchema" } } } }, "responses": { "200": { "$ref": "#/components/responses/200" } } } } }, "components": { "parameters": { "headerParamXAPIKey": { "description": "API Token", "in": "header", "name": "api-token", "schema": { "type": "string" }, "required": true } }, "responses": { "200": { "description": "OK" } }, "schemas": { "TagColor": { "type": "string", "default": "#f44336", "enum": [ "#f44336", "#e91e63", "#9c27b0", "#673ab7", "#3f51b5", "#2196f3", "#03a9f4", "#00bcd4", "#009688", "#4caf50", "#8bc34a", "#faa200", "#ff9800", "#ff5722", "#795548", "#607d8b" ] }, "TagCreateSchema": { "type": "object", "properties": { "name": { "type": "string", "example": "Tag name" }, "color": { "$ref": "#/components/schemas/TagColor" } }, "required": [ "name", "color" ] } } }, "x-readme": { "explorer-enabled": true, "proxy-enabled": true }, "_id": "65786ea0f083690077eabec2" } ``` -------------------------------- ### GET /lost-status/{id} Source: https://clint-api.readme.io/reference/get_lost-status-id Retrieve a single lost status by its unique identifier. ```APIDOC ## GET /lost-status/{id} ### Description Retrieve a single lost status by ID. ### Method GET ### Endpoint /lost-status/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier (UUID) of the lost status to retrieve. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **status** (integer) - The status code of the response. - **data** (object) - An object containing the lost status details. - **id** (string) - The unique identifier (UUID) of the lost status. - **name** (string) - The name of the lost status. #### Response Example ```json { "status": 200, "data": { "id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8", "name": "Lost status name" } } ``` ``` -------------------------------- ### List Users - OpenAPI Definition Source: https://clint-api.readme.io/reference/get_users This OpenAPI definition describes the GET /users endpoint, which allows retrieval of a paginated list of users. It includes parameters for limiting results, setting offsets, and specifying pages, along with response schemas for paginated data and user objects. Authentication is handled via an 'api-token' header. ```json { "openapi": "3.0.2", "info": { "title": "Clint API", "description": "API for managing contacts, deals, and tags in the Clint application", "contact": { "name": "API Support", "url": "http://www.example.com/support", "email": "support@example.com" }, "version": "1.0.0" }, "servers": [ { "url": "https://api.clint.digital/v1", "description": "The production API server" }, { "url": "http://localhost:4004/v1", "description": "The development API server" } ], "tags": [ { "name": "Users", "description": "Operations related to managing users" } ], "paths": { "/users": { "get": { "summary": "List users", "tags": [ "Users" ], "description": "Retrieve a paginated list of users", "parameters": [ { "$ref": "#/components/parameters/headerParamXAPIKey" }, { "$ref": "#/components/parameters/queryParam_limit" }, { "$ref": "#/components/parameters/queryParam_offset" }, { "$ref": "#/components/parameters/queryParam_page" } ], "responses": { "200": { "description": "A list of users", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Paginated" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/User" } } } } ] } } } } } } } }, "components": { "parameters": { "headerParamXAPIKey": { "description": "API Token", "in": "header", "name": "api-token", "schema": { "type": "string" }, "required": true }, "queryParam_limit": { "description": "Max number of rows returned", "in": "query", "name": "limit", "schema": { "default": 200, "maximum": 1000, "minimum": 1, "type": "integer" } }, "queryParam_offset": { "description": "Number of rows skipped of the result", "in": "query", "name": "offset", "schema": { "default": 0, "minimum": 0, "type": "integer" } }, "queryParam_page": { "description": "Select the page of the result", "in": "query", "name": "page", "schema": { "default": 1, "minimum": 1, "type": "integer" } } }, "schemas": { "ID": { "type": "string", "format": "uuid", "example": "8feade82-d77b-4e8b-9d35-fd43e972b5c8" }, "Paginated": { "type": "object", "properties": { "status": { "type": "integer", "example": "200", "description": "Response status" }, "totalCount": { "type": "integer", "example": "50", "description": "Total items based on current filters" }, "page": { "type": "integer", "example": "1", "description": "Current page" }, "totalPages": { "type": "integer", "example": "10", "description": "Total pages based on current filters" }, "hasNext": { "type": "boolean", "example": "true", "description": "Indicates that has next page" }, "hasPrevious": { "type": "boolean", "example": "true", "description": "Indicates that has previous page" } } }, "User": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/ID" }, "email": { "type": "string", "example": "User e-mail" }, "first_name": { "type": "string", "example": "User first name" }, "last_name": { "type": "string", "example": "User last name" } } } } }, "x-readme": { "explorer-enabled": true, "proxy-enabled": true }, "_id": "65786ea0f083690077eabec2" } ``` -------------------------------- ### GET /origins/{id} Source: https://clint-api.readme.io/reference/get_origins-id Retrieve a single origin by its unique identifier. ```APIDOC ## GET /origins/{id} ### Description Retrieve a single origin by ID. ### Method GET ### Endpoint /origins/{id} ### Parameters #### Path Parameters - **id** (string) - Required - UUID of the origin to retrieve. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **status** (integer) - Response status. - **data** (object) - An origin object containing details such as id, name, group, stages, archived_at, and archived_by. #### Response Example ```json { "status": 200, "data": { "id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8", "name": "Origin name", "group": { "id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8", "name": "Group name" }, "stages": [ { "id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8", "label": "Stage label", "order": 1, "type": "Stage type" } ], "archived_at": "2020-01-01T14:15:00.000000+00:00", "archived_by": "8feade82-d77b-4e8b-9d35-fd43e972b5c8" } } ``` ```