Operations API
Customers
List All Customers
this api endpoint ( get get ) retrieves all your customers 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 customer object docid\ x0e6zfnwaym4bwj4a82ex , 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 to use for filtering (the date the customer was created) to appendix docid\ kfbmx4q3dxjtduqf75yx1 end date used for filtering (the date the customer was created) sort by an optional identifier used for sorting results available options are name , email and country filter optional text used for filtering results affiliate partner id affiliate program partner id if provided, it will return the customers that were referred by the partner affiliate program id if provided, it will return the customers that were referred by affiliates who joined this affiliate program teammate id if provided, it will return the customers that are assigned to the teammate product id if provided, it will return the customers who bought this product countries ( appendix docid\ kfbmx4q3dxjtduqf75yx1 ) ( 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/customers/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/customers/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/customers/list?page=1\&per page=10' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here'{ "status" 200, "customers" \[ { "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" "customer", "priority" "normal", "source" "import", "affiliate partner id" null, "lead status" null } ], "total results" 1, "page" 1, "per page" 10, "sort by" null, "filter" null }