Operations API
Leads
List All Leads
this endpoint ( get get ) retrieves all your leads the response is paginated; therefore, you should use the 'page' parameter for navigating through the results in subsequent requests on successful completion, it returns an array of lead object docid\ datefzmzfytk1y4i2gdzj , the number of available results and the flags used for filtering permissions customers view query parameters page fetch the results from a specific page it defaults to 1 per page the number of results to fetch per page the maximum is 50 , and if it defaults to 10 from appendix docid\ kfbmx4q3dxjtduqf75yx1 start date used for filtering to appendix docid\ kfbmx4q3dxjtduqf75yx1 end date used for filtering sort by an optional identifier used for sorting results the available options are name , email and country filter optional text used for filtering results affiliate partner id lead status if provided, it will return the leads with matching status the possible values are new lead , qualified , unqualified , contacted , followup and attempt to contact priority if provided, it will return the leads whose priority matches this value the possible values are low , normal , medium and high teammate id if provided, it will return the customers assigned to the teammate countries example ?countries=de,ro a list of country codes to use for filtering order determines in which order the results are returned the available options are asc (ascending) and desc (descending) the default value is desc require "uri" require "net/http" url = uri("https //api tamio com/v2/leads/list?page=1\&per page=10") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["authorization"] = "bearer your token here" response = https request(request) puts response read body var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //api tamio com/v2/leads/list?page=1\&per page=10", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));curl location request get 'https //api tamio com/v2/leads/list?page=1\&per page=10' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here'{ "status" 200, "leads" \[ { "id" "c5f3b078 5520 4694 a4d1 d45885a6314e", "email" "john doe\@tamio com", "name" "john", "last name" "doe", "country" "de", "locale" "en", "billing addresses" \[], "shipping addresses" \[], "created at" 1664635710, "stripe customer id" null, "object" "customer", "teammate id" null, "timezone offset" "+00 00", "category" "lead", "priority" "normal", "source" "import", "affiliate partner id" null, "lead status" "qualified" } ], "total results" 1 "page" 1, "per page" 10, "sort by" null, "filter" null }