{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"1a92be5b-799c-47bf-b4b2-071e8b68570a","name":"Tap Inspect v2 API","description":"The Tap Inspect API provides you full read/write access to all of your content in our system using the same interface that our official mobile applications use.\n\nTo take advantage of our API, contact us for an API key.\n\nThis document is copyright © 2023 Tap Inspect, Inc. All rights reserved.\n\n# Authentication\n\nAuthenticating requests with the Tap Inspect API requires 2 things:\n\n- An API key (contact us to get one)\n- A user's API Authentication Token\n    \n\nUsers can generate their own API authentication token by visiting their [integration settings page](https://app.tapinspect.com/integrations).\n\nPass these values in the request headers with every request as follows:\n\n| Header | Value |\n| --- | --- |\n| Authorization | The string \"Bearer TOKEN\", substituting the token provided by the user |\n| X-API-Key | The API key provided to you for your application |\n\nAll requests require HTTPS encryption.\n\n# Environments\n\nWe ❤️ automated testing!\n\nWe have a development environment available for any automated tests you want to run, or if you just want a sandbox to play around in without risking any production data.\n\nWe will provide you with a second API key for our development environment. You simply need to use a separate subdomain when making your request to target the development environment instead of the production environment.\n\n| Environment | Domain |\n| --- | --- |\n| Production | app.tapinspect.com |\n| Development | dev.tapinspect.com |\n\n# Device Management\n\nOur system allows multiple devices to work on the same set of data simultaneously without losing changes. In order to accomplish this, our API is slightly more complicated than those you may have experience with. The first way we do this is by uniquely identifying each device that connects to our system.\n\nYou must provide a 32 character [universally unique identifier (UUID)](https://en.wikipedia.org/wiki/Universally_unique_identifier) as a header in every request you send to our API to represent the device or system making the request. That device should consistently provide the same UUID across all requests that it makes over the API.\n\nIf you will be connecting to our API using a Web server or cluster of Web servers, it is sufficient to use a single UUID to represent your entire system across all of your requests.\n\nIf you are distributing multiple instances of a mobile or desktop application, each installation of the application should provide its own UUID. For our native mobile applications, we generate a UUID upon application installation.\n\nYou may also provide a few other optional request headers to further identify the device as follows. Providing this information assists us when debugging problems you encounter.\n\n| Header | Value |\n| --- | --- |\n| X-Device-UUID | A UUID of your choosing to represent the system/device making the request. Please use the same value consistently across requests. (required) Example: 123e4567e89b12d3a456426655440000 |\n| X-Device-Description | Description of the device (optional), i.e. \"Production Server\", \"iPhone 6\", etc. |\n| X-Platform | iOS, Android, 3rd party service name, etc. (optional) |\n| X-OS-Version | Version of the OS on the device (optional) |\n| X-SW-Version | Version of the app interacting with the API (optional) |\n\n# Example API Request\n\nHere is a simple Python script to give you an example of how to put an API request together.\n\n```\nimport requests\n# Substitute these values with information from your account\napi_key = 'ABCD'\napi_authentication_token = 'EFGH'\nteam_id = '123'\nheaders = {\n    'Content-Type':         'application/json',\n    'Accept':               'application/json',\n    'Authorization':        'Bearer ' + api_authentication_token,\n    'X-API-Key':            api_key,\n    'X-Device-UUID':        '123e4567e89b12d3a456426655440000', # Choose your own unique value to identify a specific device\n    'X-Device-Description': 'My Device',\n    'X-Platform':           'My Server App',\n    'X-OS-Version':         '1.0',\n    'X-SW-Version':         '1.0'\n}\n# Get a list of the first 100 jobs in your account\nurl = 'https://app.tapinspect.com/api/v2/teams/' + team_id + '/jobs?start=1&limit=100'\nresponse = requests.get(url, headers = headers, timeout=500)\nprint(response.text)\n\n```\n\n# Transaction Keys\n\nThe second way we ensure data consistency across multiple devices is the use of **transaction keys**. Every record accessible through the API has a transaction key property that uniquely identifies the state of the record. This transaction key is in the form of a 32 character UUID, and is changed any time a record is altered anywhere in the system.\n\nTap Inspect uses these transaction keys to ensure that any update to our database done through the API does not accidentally overwrite data from another device. When creating or updating a record through the API, follow these rules:\n\n- When creating a record, specify a new unique transaction key UUID for the **transaction key** parameter.\n- When updating a record, provide the previous known transaction key under the parameter **previous transaction key** and provide a new unique transaction key UUID for the parameter **transaction key**.\n- During an update transaction, if the **previous transaction key** value you specified does not match the current value of the record's transaction key, your transaction will be rejected with an \"out of sequence\" error. This means that the record in question has been modified elsewhere in the system, and there is a strong possibility your update transaction will cause data to be lost. When this occurs, you will need to perform a read transaction of that record through the API, merge any changes, and then perform the update transaction again using the updated transaction key.\n    \n\n# Primary Keys\n\nWith the exception of the user and team tables, every table accessible through the API also uses a UUID as the **primary key**. Most data in our system involves multiple relations with other tables. We use UUIDs for the primary key so that you can build multiple sets of related data simultaneously in your system without having to push them to the API in any specific order.\n\n- When you create a record through the API, you will need to specify a unique UUID as the **primary key** for that record.\n- When you perform any read or update transactions through the API, use the **primary key UUID** to specify the specific record in the URL.\n    \n\n# Data Hierarchy\n\nA **Team**\n\n- has one or more **Users**\n- has zero or more **Jobs**\n- has zero or more **Services**\n- has zero or more **Service Agreements**\n- has one or more **Service Roles** (i.e. Client, Agent, etc)\n- has zero or more **Saved Comments**, **Saved Comment Categories**, **Saved Comment Ranks**, and **Saved Comment Types**\n- has zero or more **People**, **Person Emails**, **Person Phones**, **Person Roles**, and **Contact Roles** representing the team's contacts\n- has zero or more **Message Templates** that each may have **Message Template Custom Recipients**, **Message Template Role Recipients**, and **Message Template Services**\n- has one or more **Change Events** that comprise an audit log of changes to the team data as part of our synchronization scheme.\n    \n\nA **Service**\n\n- has a title, price, and a duration\n- has zero or more **Agreements** (through **Service Agreements**) indicating what kind of agreements should be generated when that service is performed as part of a **Job**\n- has zero or more **Fees** and **Fee Options** that define how to calculate the price for a service\n- has zero or more **Templates** (through **Service Templates**) indicating what kind of reports should be generated when that service is performed as part of a **Job**\n- has zero or more **Tax Rates** (through **Service Tax Rates**) indicating tax rates that should automatically be applied to the invoice when that service is performed as part of a **Job**\n    \n\nA **Job**\n\n- has an address, inspection date/time, and a duration\n- has an optional photo (i.e. cover page photo)\n- has an optional **Invoice**\n- has zero or more **Job Agreement** representing documents that must be signed by the client\n- has one or more **Job Assignment** indicating which team members are assigned as inspectors to the job\n- has zero or more **Job Discount**\n- has zero or more **Job Person** (i.e. Client, Agents, etc.) that each may have **Job Person Emails** and **Job Person Phones**\n- has zero or more **Job Services** indicating what **Services** were performed for the Client and what the prices were\n- has zero or more **Job Tax Rate**\n- has zero or more **Notes**\n- has zero or more **Reports**\n    \n\nAn **Invoice**\n\n- has zero or more **Payments**\n    \n\nA **Report** or **Template**\n\n- has zero or more **Sections**\n- has zero or more **Condition Ratings**\n    \n\nA **Section**\n\n- has zero or more **Items**\n- has zero or more **Comments**\n- has zero or more **Sections** (sub-sections)\n    \n\nAn **Item**\n\n- has zero or more **Item Options** (if multiple choice)\n- has zero or more **Photos**\n- has zero or more **Comments**\n    \n\nA **Comment**\n\n- has zero or more **Photos**\n    \n\nA **Photo**\n\n- has zero or more **Photo Annotations**","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"3942037","team":99635,"collectionId":"1a92be5b-799c-47bf-b4b2-071e8b68570a","publishedId":"RWMBSAxq","public":true,"publicUrl":"https://apidocs.tapinspect.com","privateUrl":"https://go.postman.co/documentation/3942037-1a92be5b-799c-47bf-b4b2-071e8b68570a","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","version":"8.10.0","publishDate":"2018-07-12T20:10:29.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Production","id":"8b6421ea-222c-41ae-8529-dd0a3ee0d4a3","owner":"3942037","values":[{"key":"URL","value":"app.tapinspect.com","enabled":true,"type":"text"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/9cc313eb1503380622e0b75906a3a573dfc79b0d54080a9dbf97ad501f85728a","favicon":"https://tapinspect.com/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Production","value":"3942037-8b6421ea-222c-41ae-8529-dd0a3ee0d4a3"}],"canonicalUrl":"https://apidocs.tapinspect.com/view/metadata/RWMBSAxq"}