{"info":{"_postman_id":"9852f6aa-dc2d-b08c-f8f3-d0c92f09f86c","name":"Total Expert Public API","description":"<html><head></head><body><p>The Total Expert REST API allows you to programmatically create, retrieve, update, and delete information through various endpoints.</p>\n<hr>\n<h3 id=\"documentation-layout\">Documentation Layout</h3>\n<p>Each section of this documentation describes a collection of related endpoints that affect a given resource.</p>\n<p>Where applicable, at the top of a section you will find a table listing the attributes for the resource and a second showing its relationships with other resources.</p>\n<p><strong>NOTE:</strong> If an attribute is marked as 'Assignable', its value can be set via a POST/PATCH. You can also modify the data for an 'Assignable' relationship.</p>\n<hr>\n<h3 id=\"authentication-in-the-te-api\">Authentication in the TE API</h3>\n<p>Interaction with the TE API is protected with OAuth 2.0. A client ID/secret pair is required to use the API.</p>\n<p>The ID/secret pair is used to request an access token from the '/token' endpoint. This token will need to be present within the header on all calls to the API.</p>\n<p><strong>NOTE:</strong> See the 'Authentication' endpoint collection for more information. See the 'Heartbeats' endpoint collection for more information on how to test your authentication.</p>\n<hr>\n<h3 id=\"endpoint-standards\">Endpoint Standards</h3>\n<p>Each endpoint provides interaction with two aspects of an entity:</p>\n<p>'Attributes' - Attributes of the entity itself. Includes things like first name, phone number, or birthday of the contact.<br>E.g. A 'Contact'</p>\n<p>'Relationships' - Describe a relationship between that entity and another entity.<br>E.g. A contact that has an owner in the TE System OR a set of contact groups (separate entities with their own endpoint).</p>\n<hr>\n<h3 id=\"attributes\">Attributes</h3>\n<p>Each endpoint returns a JSON object with a set of attributes. Each endpoint collection should describe the names and types of attributes available in each endpoint.</p>\n<h6 id=\"data-types\">Data Types</h6>\n<p>Each attribute has a type. There are four data types in the TE API - Numeric, String, Boolean, and Date.</p>\n<h5 id=\"data-types-1\">Data Types</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Numeric</td>\n<td>Integer or floating point numbers. Supplied with no surrounding quotes. e.g. { \"loan_rate\":4.5 }</td>\n</tr>\n<tr>\n<td>String</td>\n<td>String of characters - supplied surrounded with quotes. e.g. { \"first_name\":\"Clark\" }</td>\n</tr>\n<tr>\n<td>Boolean</td>\n<td>Truth value - supplied in one of two ways - see Boolean (String) and Boolean (Numeric) for details</td>\n</tr>\n<tr>\n<td>Boolean (String)</td>\n<td>Truth value - supplied as the word \"True\" or \"False\", surrounded by quotes. e.g. { \"first_time_buyer\":\"True\" }</td>\n</tr>\n<tr>\n<td>Boolean (Numeric)</td>\n<td>Truth value - supplied as the number 1 or 0, not surrounded by quotes. e.g. { \"first_time_buyer\":0 }</td>\n</tr>\n<tr>\n<td>Date</td>\n<td>A date and time - preferred supplied in the format \"YYYY-MM-DD hh:mm:ss\". All dates must be provided in UTC timezone. When returned, the value will be expressed in UTC. To clear a field with a date type, use the value \"0000-00-00 00:00:00\".</td>\n</tr>\n</tbody>\n</table>\n</div><h6 id=\"phone-numbers\">Phone Numbers</h6>\n<p>Phone numbers are accepted in any format. For deduplication, any non-numeric symbols will be stripped out and the numeric phone number will be stored separately. If a numerically identical phone number is used in a different format later, the records are compared using the numeric value only. This applies only to phone numbers with at least 7 digits.</p>\n<p>All phone numbers will also be converted into E164 for use in external services (e.g. Twilio). If a phone number cannot be converted into E164, the number will be marked 'Invalid', and external services that rely on phone numbers will not function.</p>\n<h6 id=\"uniqueness-in-the-te-api\">Uniqueness in the TE API</h6>\n<p>Each type of entity in the TE API can be uniquely identified by a set of attributes. In some cases, multiple options are available to uniquely identify an entity. See each section below for details. These sets of attributes are used to deduplicate entries on creation and to uniquely identify the target in a relationship.</p>\n<hr>\n<h3 id=\"relationships\">Relationships</h3>\n<p>Relationships in the TE API are very flexible.</p>\n<h3 id=\"geting\">'GET'ing</h3>\n<p>When GETing an entity, a relationship will be returned with only a partial set of attributes that make sense in the context of that endpoint - e.g. the 'contact_groups' relationship on the '/contacts' endpoint will display only the group name of the target contact_group.</p>\n<h3 id=\"post-and-patch-requests\">POST and PATCH Requests</h3>\n<p>When setting a relationship (by POST or PATCH), the target entity is specified using one or more attributes that uniquely identify the entity.</p>\n<p>The allowed attributes are listed in the 'Settable Fields' column of each Relationships table. For example, when POSTing to the '/contact-groups' endpoint, either of the following are allowed:</p>\n<ul>\n<li><p>{<br>  \"group_name\": \"Hot Leads\",<br>  \"owner\":{\"username\": \"alfred\"}<br>  }<br>  OR</p>\n</li>\n<li><p>{<br>  \"group_name\": \"Hot Leads\",<br>  \"owner\":{\"id\": \"123589\"}<br>  }</p>\n</li>\n</ul>\n<p>In cases where an endpoint's relationship supports multiple Settable Fields be aware that the request examples may only make use of one of the attributes though any could be used in its place.</p>\n<hr>\n<h3 id=\"interacting-with-the-api\">Interacting with the API</h3>\n<h4 id=\"admin-calls-vs-user-calls\">Admin Calls vs User Calls</h4>\n<p>You'll notice that many sections of the documentation have samples for POSTs and GETs that are labeled \"As Admin\" or \"As User\".<br>When using client credentials to access the API, you'll use the \"As Admin\" examples. For Authorization Code access, you'll use the \"As User\" examples.</p>\n<h3 id=\"geting-1\">'GET'ing</h3>\n<p>There are two types of GETable endpoints in the TE API: Paging and Individual. Paging endpoints provide lists of entities. E.g. '/contacts' returns a list of contacts.</p>\n<h6 id=\"getting-individual-entities\">Getting Individual Entities</h6>\n<p>Individual endpoints return specific individual entities, specified by TE ID. E.g. '/contacts/51151' returns the contact with the 'id' attribute '51151' (the TE internal identifier).</p>\n<h6 id=\"getting-multiple-entities-paging\">Getting Multiple Entities (Paging)</h6>\n<p>Paging endpoints will return an object with two properties: 'objects' and 'links'. The 'objects' property will be an array of entities in 'pages'. Each page will have a number of entities along with a set of links. The page size and page number can be specified using the '?page' GET parameter. Setting '?page[number]=5' will return the fifth page. Setting '?page[size]=100' will make each page consist of 100 items, instead of the default of 10. Both attributes can be set together. E.g. setting '?page[size]=100&amp;page[number]=6' will return items 501-600.</p>\n<h6 id=\"paging-links\">Paging Links</h6>\n<p>The 'links' attribute on a page object will have four attributes, specifying metadata about the number of entities available to page.</p>\n<ul>\n<li><p>'first' will be the page number of the first page of entities (always '1').</p>\n</li>\n<li><p>'last' will be the page number of the last page of entities.</p>\n</li>\n<li><p>'next' will be the page number of the next page after the currently requested one. 'next' may be null if there are no subsequent pages.</p>\n</li>\n<li><p>'prev' will be the page number of the page immediately preceding the current one. 'prev' may be null if there are no preceding pages.</p>\n</li>\n</ul>\n<h3 id=\"posting\">'POST'ing</h3>\n<p>Entities can be created in the TE system by POSTing to paging endpoints. E.g. sending a POST to '/contacts' will create a contact.</p>\n<h6 id=\"deduplication\">Deduplication</h6>\n<p>When POSTing an entity, the TE API will attempt to 'Deduplicate' by searching for existing entities with similar attributes. If such a duplicate does exist, the TE API will treat the POST as a PATCH to that entity instead. See each section for details on what attributes will be used to search for duplicates.</p>\n<h3 id=\"patching\">'PATCH'ing</h3>\n<p>Entities can be updated in the TE system by PATCHing to individual endpoints. E.g. sending a PATCH to '/contacts/51151' will update the attributes of the contact with TE 'id' of '51151'.</p>\n<h3 id=\"deleteing\">'DELETE'ing</h3>\n<p>Entities can be deleted only by TE ID. Send a DELETE request to the appropriate individual entity endpoint to delete it.</p>\n<hr>\n<h3 id=\"return-codes\">Return Codes</h3>\n<p>Where applicable, the API will respond with an HTTP status code that indicates what happened during the request. Possible values include:</p>\n<h5 id=\"http-codes\">HTTP CODES</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status Code</th>\n<th>General Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200 SUCCESS</td>\n<td>The operation completed successfully. See the response body for details (if applicable).</td>\n</tr>\n<tr>\n<td>201 CREATED</td>\n<td>The object was created successfully. See the response body for details (if applicable).</td>\n</tr>\n<tr>\n<td>400 BAD REQUEST</td>\n<td>The JSON supplied to the API was malformed and unparseable.</td>\n</tr>\n<tr>\n<td>401 UNAUTHORIZED</td>\n<td>The request's credentials are invalid. This could mean your token has expired and should be renewed. See the response body for details.</td>\n</tr>\n<tr>\n<td>403 FORBIDDEN</td>\n<td>An attempt was made to access a resource for which you do not have permission</td>\n</tr>\n<tr>\n<td>405 METHOD NOT ALLOWED</td>\n<td>An attempt was made to interact with an endpoint in an unsupported manner, e.g. sending a POST to '/contacts/1'</td>\n</tr>\n<tr>\n<td>415 UNSUPPORTED MEDIA TYPE</td>\n<td>The API endpoints expect a content type of 'media/json'</td>\n</tr>\n<tr>\n<td>422 UNPROCESSABLE ENTITY</td>\n<td>The JSON body supplied is valid, but not processable semantically. For example, the 'owner' relationship for a contact refers to a User that does not exist in the TE system.</td>\n</tr>\n<tr>\n<td>418 I'M A TEAPOT</td>\n<td>The API is a <a href=\"https://www.ietf.org/rfc/rfc2324.txt\">teapot</a> (See the 'Heartbeat' section for details).</td>\n</tr>\n<tr>\n<td>503 SERVICE UNAVAILABLE</td>\n<td>The API is unavailable. Please try your request again later. If this message persists, please contact Technical Support</td>\n</tr>\n</tbody>\n</table>\n</div></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"1929166","collectionId":"9852f6aa-dc2d-b08c-f8f3-d0c92f09f86c","publishedId":"6Z2RYyU","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2017-07-05T18:44:16.000Z"},"item":[{"name":"Authentication","item":[{"name":"Fetch a Token From Client Credentials Grant","event":[{"listen":"test","script":{"id":"70f18138-e864-4c59-9a18-b9d3d07b1a78","type":"text/javascript","exec":[""]}}],"id":"3a75925c-3a49-4cd3-9037-0c846265dbdd","request":{"method":"POST","header":[{"key":"Authorization","value":"Basic {{basic_auth}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"grant_type\": \"client_credentials\"\n}"},"url":"{{external_api_host}}/v1/token","description":"<p>Supply client credentials to obtain an access token.</p>\n<p>If you are integrating with the Total Expert API from a <a href=\"https://tools.ietf.org/html/rfc6749#section-2.1\">confidential</a> client you will likely want to use this endpoint. For the client_credentials <a href=\"https://tools.ietf.org/html/rfc6749#section-1.3\">authorization grant</a> type you will need to make certain that your client is also the <a href=\"https://tools.ietf.org/html/rfc6749#section-1.1\">resource owner</a>.</p>\n<hr />\n<h6 id=\"authorization-header-encoding\">Authorization Header Encoding</h6>\n<p>Shown in the HEADERS table below, the Authorization header field implements the <a href=\"https://tools.ietf.org/html/rfc2617#section-2\">Basic Authentication Schema</a>. The 'basic_auth' value needs to be a base64-encoded string containing your client_id and client_secret. The string that you encode must be in the format:</p>\n<p>  yourclientid:yourclientsecret</p>\n<p>The following are examples of methods that can be used to base64-encode a string.</p>\n<p>On BSD/Linux/Mac run:</p>\n<p>  echo -n 'yourclientid:yourclientsecret' | openssl base64</p>\n<p>  (note - this often injects one or more newlines into the encoded string, remove it before using to authenticate)</p>\n<p>For Windows see:</p>\n<p><a href=\"https://support.microsoft.com/en-us/kb/191239\">https://support.microsoft.com/en-us/kb/191239</a></p>\n<hr />\n<h6 id=\"using-the-token\">Using The Token</h6>\n<p>To interact with the secure endpoints in the TE API, supply the token in the 'Authorization' header as 'Bearer {Token}'</p>\n","urlObject":{"path":["v1","token"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"1d08c064-19cd-46e5-b2a1-48b4cd3815db","name":"Fetch a Token (scopes defined)","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Basic {{basic_auth}}"},{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"grant_type\": \"client_credentials\",\n  \"scope\": \"leadInteraction\"\n}"},"url":"{{external_api_host}}/v1/token"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"access_token\": \"407573dd426fe03eec4c63064a4bfbe9525107fa\",\n    \"expires_in\": 3600,\n    \"token_type\": \"bearer\",\n    \"scope\": \"leadInteraction\"\n}"},{"id":"ca7e5963-3fd2-43b8-ab9e-988175debdbe","name":"Invalid credentials","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Basic {{basic_auth}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"grant_type\": \"client_credentials\"\n}"},"url":"{{external_api_host}}/v1/token"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"invalid_client\",\n    \"error_description\": \"The client credentials are invalid\"\n}"},{"id":"310630e0-2d5b-4d86-82ae-004f00b9d9e1","name":"Fetch a Token","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Basic {{basic_auth}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"grant_type\": \"client_credentials\"\n}"},"url":"{{external_api_host}}/v1/token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"access_token\": \"9ecdc290d0a51c1b58ceb7f04622904df485b150\",\n    \"expires_in\": 3600,\n    \"token_type\": \"bearer\",\n    \"scope\": \"leadInteraction loanInteraction\"\n}"}],"_postman_id":"3a75925c-3a49-4cd3-9037-0c846265dbdd"},{"name":"Fetch a Token From Authorization Code","event":[{"listen":"test","script":{"id":"70f18138-e864-4c59-9a18-b9d3d07b1a78","exec":[""],"type":"text/javascript"}}],"id":"5386087c-314f-44e9-b408-f16201cc2238","request":{"method":"POST","header":[{"key":"Authorization","value":"Basic {{basic_auth}}"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n\t\"grant_type\":\"authorization_code\",\r\n\t\"code\":\"{{authorization_code}}\",\r\n    \"redirect_uri\":\"{{redirect_uri}}\"\r\n}"},"url":"{{external_api_host}}/v1/token","description":"<p>Supply an authorization code to obtain an access token.</p>\n<hr />\n<h6 id=\"authorization-header-encoding\">Authorization Header Encoding</h6>\n<p>Shown in the HEADERS table below, the Authorization header field implements the <a href=\"https://tools.ietf.org/html/rfc2617#section-2\">Basic Authentication Schema</a>. The 'basic_auth' value needs to be a base64-encoded string containing your client_id and client_secret. The string that you encode must be in the format:</p>\n<p>  yourclientid:yourclientsecret</p>\n<p>The following are examples of methods that can be used to base64-encode a string.</p>\n<p>On BSD/Linux/Mac run:</p>\n<p>  echo -n 'yourclientid:yourclientsecret' | openssl base64</p>\n<p>  (note - this often injects one or more newlines into the encoded string, remove it before using to authenticate)</p>\n<p>For Windows see:</p>\n<p><a href=\"https://support.microsoft.com/en-us/kb/191239\">https://support.microsoft.com/en-us/kb/191239</a></p>\n<hr />\n<h3 id=\"authorization-code-encoding\">Authorization Code Encoding</h3>\n<p>Supply the authorization code in the POST body as \"code\". Also supply the \"grant_type\" as \"authorization_code\"\nFor details on obtaining an authorization code, please see our <a href=\"https://public.totalexpert.net/v1/docs/OAuth+Authorization+Guide.pdf\">authorization documentation</a></p>\n<p>When the authorization code was created using a dynamic redirect uri, 'redirect_uri' must also be supplied. The supplied value must match the value used to create the authorization code.</p>\n<hr />\n<h6 id=\"using-the-token\">Using The Token</h6>\n<p>To interact with the secure endpoints in the TE API, supply the token in the 'Authorization' header as 'Bearer {Token}'</p>\n","urlObject":{"path":["v1","token"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"5386087c-314f-44e9-b408-f16201cc2238"},{"name":"Refresh a Token","event":[{"listen":"test","script":{"id":"70f18138-e864-4c59-9a18-b9d3d07b1a78","exec":[""],"type":"text/javascript"}}],"id":"6d9b4cf2-2144-4bf1-890a-e3585ec603e2","request":{"method":"POST","header":[{"key":"Authorization","value":"Basic {{basic_auth}}"},{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"grant_type\":\"refresh_token\",\r\n\t\"refresh_token\":\"{{refresh_token}}\"\r\n}"},"url":"{{external_api_host}}/v1/token","description":"<p>Supply a refresh token to retrieve another new refresh token.</p>\n<hr />\n<h6 id=\"authorization-header-encoding\">Authorization Header Encoding</h6>\n<p>Shown in the HEADERS table below, the Authorization header field implements the <a href=\"https://tools.ietf.org/html/rfc2617#section-2\">Basic Authentication Schema</a>. The 'basic_auth' value needs to be a base64-encoded string containing your client_id and client_secret. The string that you encode must be in the format:</p>\n<p>  yourclientid:yourclientsecret</p>\n<p>The following are examples of methods that can be used to base64-encode a string.</p>\n<p>On BSD/Linux/Mac run:</p>\n<p>  echo -n 'yourclientid:yourclientsecret' | openssl base64</p>\n<p>  (note - this often injects one or more newlines into the encoded string, remove it before using to authenticate)</p>\n<p>For Windows see:</p>\n<p><a href=\"https://support.microsoft.com/en-us/kb/191239\">https://support.microsoft.com/en-us/kb/191239</a></p>\n<hr />\n<h3 id=\"refresh-token-encoding\">Refresh Token Encoding</h3>\n<p>Supply the refresh token in the POST body as \"refresh_token\". Also supply the \"grant_type\" as \"refresh_token\"</p>\n<hr />\n<h6 id=\"using-the-token\">Using The Token</h6>\n<p>To interact with the secure endpoints in the TE API, supply the token in the 'Authorization' header as 'Bearer {Token}'</p>\n","urlObject":{"path":["v1","token"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"6d9b4cf2-2144-4bf1-890a-e3585ec603e2"}],"id":"70ff3725-cdc3-4e79-9ccc-5383296aab17","description":"<p>The Total Expert API uses <a href=\"https://tools.ietf.org/html/rfc6749\">OAuth2.0</a> to authorize and authenticate requests to the API.</p>\n<p>Before you can use the API, you must first obtain an access token by using the ‘/token’ POST endpoint. Please obtain the token by supplying your client credentials (highlighted above) or an authorization code. Once you have your token, you will use it in the Authorization header of subsequent requests.</p>\n<ul>\n<li>Total Expert maintains all production and sandbox/test environments behind the same URL. Your organization will be provided with separate credentials for the production and sandbox/test environments.</li>\n<li>The Authentication token is good for 3600 seconds (60 mins).</li>\n<li>You will retrieve a token for the highest level of scopes you need for the subsequent calls. Highly recommended best practice is to retrieve the token and cache it for the full hour that it’s valid then request a new token towards the end of the hour.</li>\n<li>The Total Expert API has a limit of 1,000 requests per minute on all endpoints.</li>\n<li>It might be necessary to requeue the requests for certain response codes. Ensure your organization has a process for error handling. See ‘Return Codes’ section above.</li>\n</ul>\n","event":[{"listen":"prerequest","script":{"id":"9b4f9026-84a6-4234-9ade-894aa79e2e2a","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"e58d7879-4bc1-4129-a9bb-af05caa2c0df","type":"text/javascript","exec":[""]}}],"_postman_id":"70ff3725-cdc3-4e79-9ccc-5383296aab17"},{"name":"Heartbeat","item":[{"name":"Fetch Heartbeat","id":"63a2d038-f81f-49c5-90bb-6e388edbdcd2","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/heartbeat","description":"<p>The API will respond with a heartbeat with a string describing the running item. Useful for testing routing and API status.</p>\n","urlObject":{"path":["v1","heartbeat"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"8bcdea2d-6c48-4bfd-a027-498e826bd2bb","name":"Fetch Heartbeat","originalRequest":{"method":"GET","header":[],"url":"{{external_api_host}}/v1/heartbeat"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"running_item\": \"Total Expert External API\"\n}"}],"_postman_id":"63a2d038-f81f-49c5-90bb-6e388edbdcd2"},{"name":"Fetch Teapot","id":"ffb644a8-7877-7551-8520-64e84da3ab35","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/teapot","description":"<p>Checks whether the API is a <a href=\"https://www.ietf.org/rfc/rfc2324.txt\">teapot</a>. Should return '418 - IM A TEAPOT'. This is, naturally, protected information. You will need to authenticate with the API in order to check whether the API is a teapot.</p>\n<p>This endpoint is useful for testing whether your authentication credentials are correct, particularly when first integrating with the TE API.</p>\n","urlObject":{"path":["v1","teapot"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"c23a4fea-bf5c-4766-b671-bb6c9e94dbd6","name":"Fetch Teapot","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/teapot"},"status":"I'm a teapot (RFC 2324)","code":418,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"code\": \"418 I'm a teapot\",\n    \"status\": \"short and stout\"\n}"}],"_postman_id":"ffb644a8-7877-7551-8520-64e84da3ab35"}],"id":"6880ade4-ca2d-f9ca-bf6e-ba9f3a74bf56","description":"<p>Endpoints for initial integration testing.</p>\n","event":[{"listen":"prerequest","script":{"id":"f0cb77eb-3dc0-4986-af17-0c0f84bc00a6","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"df3ac0f4-a441-4829-9e0b-f177cac69ab8","type":"text/javascript","exec":[""]}}],"_postman_id":"6880ade4-ca2d-f9ca-bf6e-ba9f3a74bf56"},{"name":"Contact Endpoints","item":[{"name":"Contacts","item":[{"name":"Fetch Contact","id":"bd7c4fef-2dde-494a-857f-ae2d4720ecc1","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{external_api_host}}/v1/contacts/{{contact_id}}","description":"<p>Fetch a specific contact specified by ID.</p>\n","urlObject":{"path":["v1","contacts","{{contact_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"37f3f032-d504-4ade-87c8-2a270bf6b2e1","name":"Fetch Contact (as User)","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/contacts/{{contact_id}}"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"address\": \"1234 Fake St\",\n    \"address_2\": \"Apartment -8\",\n    \"birthday\": \"1900-01-01\",\n    \"city\": \"Pleasantville\",\n    \"classification\": \"\",\n    \"close_date\": \"2016-12-26\",\n    \"creation_date\": \"2017-01-01 11:11:11\",\n    \"credit_score\": null,\n    \"credit_score_date\": null,\n    \"credit_score_expiration_date\": null,\n    \"email\": \"username@example.com\",\n    \"email_work\": \"clark.gable2@totalexpertinc.com\",\n    \"employer_address\": \"1235 Fake Ave.\",\n    \"employer_address_2\": \"Ste 10058818144\",\n    \"employer_city\": \"Unpleasantville\",\n    \"employer_license_number\": null,\n    \"employer_name\": \"BigIndustry Co, Inc. LLC\",\n    \"employer_state\": \"WI\",\n    \"employer_zip\": \"54321\",\n    \"external_id\": \"101010\",\n    \"fax\": null,\n    \"first_name\": \"Clark\",\n    \"id\": 2317,\n    \"internal_created_at\": \"2019-01-31 18:53:53\",\n    \"internal_updated_at\": \"2019-01-31 18:55:29\",\n    \"last_contacted_date\": \"2017-01-01 12:12:12\",\n    \"last_modified_date\": null,\n    \"last_name\": \"Gable\",\n    \"license_number\": \"Q10101010101011\",\n    \"linkedin_url\": null,\n    \"list_date\": \"2016-12-25\",\n    \"nickname\": null,\n    \"ok_to_call\": false,\n    \"ok_to_email\": false,\n    \"ok_to_mail\": false,\n    \"other_url\": null,\n    \"phone_cell\": \"(763)555-0123\",\n    \"phone_home\": \"(612)-555-0123\",\n    \"phone_office\": \"(763)555-1234\",\n    \"pre_approval_issued_date\": null,\n    \"referred_by\": \"\",\n    \"referred_to\": \"\",\n    \"source\": \"OurSystem\",\n    \"state\": \"MN\",\n    \"suffix\": null,\n    \"title\": \"Doctor\",\n    \"website_url\": null,\n    \"zip_code\": \"12345\",\n    \"contact_groups\": [\n        {\n            \"group_name\": \"Past Client\",\n            \"id\": 14\n        },\n        {\n            \"group_name\": \"Prospect\",\n            \"id\": 15\n        }\n    ],\n    \"external_ids\": [\n        {\n            \"external_id\": \"abcd\",\n            \"source\": \"local\"\n        },\n        {\n            \"external_id\": \"101010\",\n            \"source\": \"OurSystem\"\n        }\n    ],\n    \"external_status\": {\n        \"status_name\": \"Processing\"\n    },\n    \"preferences\": {\n        \"is_silenced\": true\n    },\n    \"assignee\": {\n        \"email\": \"toni.ark@expert.com\",\n        \"external_id\": \"ironExpertExternal\",\n        \"id\": \"58\",\n        \"username\": \"ironExpert\"\n    },\n    \"owner\": {\n        \"email\": \"stevie.dodgers@expert.com\",\n        \"external_id\": \"captainExpertExternal\",\n        \"id\": \"59\",\n        \"username\": \"captainExpert\"\n    },\n    \"shared_with_users\": [\n        {\n            \"email\": \"pete.park@expert.com\",\n            \"external_id\": \"spiderExpertExternal\",\n            \"id\": \"56\",\n            \"username\": \"spiderExpert\"\n        }\n    ]\n}"},{"id":"44ea5eb2-03aa-4608-b1ed-a55442757220","name":"Fetch Contact (as Admin)","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/contacts/{{contact_id}}"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"address\": \"1234 Fake St\",\n    \"address_2\": \"Apartment -8\",\n    \"birthday\": \"1900-01-01\",\n    \"city\": \"Pleasantville\",\n    \"classification\": \"\",\n    \"close_date\": \"2016-12-26\",\n    \"creation_date\": \"2017-01-01 11:11:11\",\n    \"credit_score\": null,\n    \"credit_score_date\": null,\n    \"credit_score_expiration_date\": null,\n    \"email\": \"username@example.com\",\n    \"email_work\": \"clark.gable2@totalexpertinc.com\",\n    \"employer_address\": \"1235 Fake Ave.\",\n    \"employer_address_2\": \"Ste 10058818144\",\n    \"employer_city\": \"Unpleasantville\",\n    \"employer_license_number\": null,\n    \"employer_name\": \"BigIndustry Co, Inc. LLC\",\n    \"employer_state\": \"WI\",\n    \"employer_zip\": \"54321\",\n    \"external_id\": \"101010\",\n    \"fax\": null,\n    \"first_name\": \"Clark\",\n    \"id\": 2317,\n    \"internal_created_at\": \"2019-01-31 18:53:53\",\n    \"internal_updated_at\": \"2019-01-31 18:55:29\",\n    \"last_contacted_date\": \"2017-01-01 12:12:12\",\n    \"last_modified_date\": null,\n    \"last_name\": \"Gable\",\n    \"license_number\": \"Q10101010101011\",\n    \"linkedin_url\": null,\n    \"list_date\": \"2016-12-25\",\n    \"nickname\": null,\n    \"ok_to_call\": false,\n    \"ok_to_email\": false,\n    \"ok_to_mail\": false,\n    \"other_url\": null,\n    \"phone_cell\": \"(763)555-0123\",\n    \"phone_home\": \"(612)-555-0123\",\n    \"phone_office\": \"(763)555-1234\",\n    \"pre_approval_issued_date\": null,\n    \"referred_by\": \"\",\n    \"referred_to\": \"\",\n    \"source\": \"OurSystem\",\n    \"state\": \"MN\",\n    \"suffix\": null,\n    \"title\": \"Doctor\",\n    \"website_url\": null,\n    \"zip_code\": \"12345\",\n    \"contact_groups\": [\n        {\n            \"group_name\": \"Past Client\",\n            \"id\": 14\n        },\n        {\n            \"group_name\": \"Prospect\",\n            \"id\": 15\n        }\n    ],\n    \"external_ids\": [\n        {\n            \"external_id\": \"abcd\",\n            \"source\": \"local\"\n        },\n        {\n            \"external_id\": \"101010\",\n            \"source\": \"OurSystem\"\n        }\n    ],\n    \"external_status\": {\n        \"status_name\": \"Processing\"\n    },\n    \"owner\": {\n        \"email\": \"ted@example.com\",\n        \"external_id\": \"userExternal1\",\n        \"id\": 65412,\n        \"username\": \"ted-example\"\n    },\n    \"preferences\": {\n        \"is_silenced\": true\n    }\n}"}],"_postman_id":"bd7c4fef-2dde-494a-857f-ae2d4720ecc1"},{"name":"Fetch Contacts","id":"c40877aa-1ea9-4f67-929f-4de286c64ce8","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{external_api_host}}/v1/contacts?page[number]=1&page[size]=10","description":"<p>Fetch a page of contacts. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","contacts"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"c40877aa-1ea9-4f67-929f-4de286c64ce8"},{"name":"Create Contact (as Admin)","event":[{"listen":"test","script":{"id":"d20f4d42-94a1-4b9e-8be6-3d1db74496bc","type":"text/javascript","exec":[""]}}],"id":"4f48dd5f-bbb5-46e3-bb22-e3c572aa76f3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Doctor\",\n  \"first_name\": \"Clark\",\n  \"last_name\": \"Gable\",\n  \"email\": \"username@example.com\",\n  \"email_work\": \"clark.gable2@totalexpert.com\",\n  \"address\": \"1234 Fake St\",\n  \"address_2\": \"Apartment -8\",\n  \"city\": \"Pleasantville\",\n  \"state\": \"MN\",\n  \"zip_code\": \"12345\",\n  \"phone_cell\": \"(763)555-0123\",\n  \"phone_office\": \"(763)555-1234\",\n  \"phone_home\": \"(612)-555-0123\",\n  \"employer_name\": \"BigIndustry Co, Inc. LLC\",\n  \"employer_address\": \"1235 Fake Ave.\",\n  \"employer_address_2\": \"Ste 10058818144\",\n  \"employer_city\": \"Unpleasantville\",\n  \"employer_state\": \"WI\",\n  \"employer_zip\": \"54321\",\n  \"license_number\": \"Q10101010101011\",\n  \"source\": \"OurSystem\",\n  \"creation_date\": \"2017-01-01 11:11:11\",\n  \"last_contacted_date\": \"2017-01-01 12:12:12\",\n  \"list_date\": \"2016-12-25 10:00:00\",\n  \"close_date\": \"2016-12-26 09:09:09\",\n  \"external_id\": \"101010\",\n  \"birthday\": \"1970-01-01\",\n  \"ok_to_mail\": 0,\n  \"ok_to_email\": 0,\n  \"ok_to_call\": 0,\n  \"preferences\":{\n    \"is_silenced\": true\n  },\n  \"owner\" : {\n    \"external_id\":\"userExternal1\"\n  },\n  \"contact_groups\": [\n    {\n      \"group_name\": \"Past Client\"\n    },\n    {\n      \"id\":\"14\"\n    }\n  ],\n  \"custom\": [\n  \t{\n  \t\t\"field_name\": \"custom_string\",\n  \t\t\"value\": \"the custom field string value\"\n  \t}\n  ],\n  \"external_ids\": [\n    {\n      \"source\":\"local\",\n      \"external_id\":\"abcd\"\n    }\n  ],\n  \"external_status\": {\n    \"status_name\":\"Processing\"\n  }\n}"},"url":"{{external_api_host}}/v1/contacts","description":"<p>Create a contact.</p>\n<p>Required Attributes (one of the following combinations):</p>\n<ul>\n<li>source, first_name, last_name, email</li>\n<li>source, first_name, last_name, phone_cell</li>\n<li>source, first_name, last_name, phone_home</li>\n<li>source, first_name, last_name, phone_office</li>\n<li>source, first_name, last_name, address, city, state, zip_code</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>owner*</li>\n</ul>\n<p>*required if authenticated as an organization admin</p>\n","urlObject":{"path":["v1","contacts"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"84e65a9f-0a04-422b-9588-2874cb98060d","name":"Update Contact (as Admin)","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Doctor\",\n  \"first_name\": \"Clark\",\n  \"last_name\": \"Gable\",\n  \"email\": \"username@example.com\",\n  \"email_work\": \"clark.gable2@totalexpertinc.com\",\n  \"address\": \"1234 Fake St\",\n  \"address_2\": \"Apartment -8\",\n  \"city\": \"Pleasantville\",\n  \"state\": \"MN\",\n  \"zip_code\": \"12345\",\n  \"phone_cell\": \"(763)555-0123\",\n  \"phone_office\": \"(763)555-1234\",\n  \"phone_home\": \"(612)-555-0123\",\n  \"employer_name\": \"BigIndustry Co, Inc. LLC\",\n  \"employer_address\": \"1235 Fake Ave.\",\n  \"employer_address_2\": \"Ste 10058818144\",\n  \"employer_city\": \"Unpleasantville\",\n  \"employer_state\": \"WI\",\n  \"employer_zip\": \"54321\",\n  \"license_number\": \"Q10101010101011\",\n  \"source\": \"OurSystem\",\n  \"creation_date\": \"2017-01-01 11:11:11\",\n  \"last_contacted_date\": \"2017-01-01 12:12:12\",\n  \"list_date\": \"2016-12-25 10:00:00\",\n  \"close_date\": \"2016-12-26 09:09:09\",\n  \"external_id\": \"101010\",\n  \"birthday\": \"1970-01-01\",\n  \"ok_to_mail\": 0,\n  \"ok_to_email\": 0,\n  \"ok_to_call\": 0,\n  \"preferences\":{\n    \"is_silenced\": true\n  },\n  \"owner\" : {\n    \"external_id\":\"userExternal1\"\n  },\n  \"contact_groups\": [\n    {\n      \"group_name\": \"Past Client\"\n    },\n    {\n      \"id\":\"14\"\n    }\n  ],\n  \"external_ids\": [\n    {\n      \"source\":\"local\",\n      \"external_id\":\"abcd\"\n    }\n  ],\n  \"external_status\": {\n    \"status_name\":\"Processing\"\n  }\n}"},"url":"{{external_api_host}}/v1/contacts"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"duplicate\": \"external-api.totaldev.us/v1/contacts/56495\",\n    \"id\": 56495\n}"},{"id":"62f2924c-3d4a-4887-b5c9-9806f99832d3","name":"Create Contact (as Admin)","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Doctor\",\n  \"first_name\": \"Clark\",\n  \"last_name\": \"Gable\",\n  \"email\": \"username@example.com\",\n  \"email_work\": \"clark.gable2@totalexpertinc.com\",\n  \"address\": \"1234 Fake St\",\n  \"address_2\": \"Apartment -8\",\n  \"city\": \"Pleasantville\",\n  \"state\": \"MN\",\n  \"zip_code\": \"12345\",\n  \"phone_cell\": \"(763)555-0123\",\n  \"phone_office\": \"(763)555-1234\",\n  \"phone_home\": \"(612)-555-0123\",\n  \"employer_name\": \"BigIndustry Co, Inc. LLC\",\n  \"employer_address\": \"1235 Fake Ave.\",\n  \"employer_address_2\": \"Ste 10058818144\",\n  \"employer_city\": \"Unpleasantville\",\n  \"employer_state\": \"WI\",\n  \"employer_zip\": \"54321\",\n  \"license_number\": \"Q10101010101011\",\n  \"source\": \"OurSystem\",\n  \"creation_date\": \"2017-01-01 11:11:11\",\n  \"last_contacted_date\": \"2017-01-01 12:12:12\",\n  \"list_date\": \"2016-12-25 10:00:00\",\n  \"close_date\": \"2016-12-26 09:09:09\",\n  \"external_id\": \"101010\",\n  \"birthday\": \"1970-01-01\",\n  \"ok_to_mail\": 0,\n  \"ok_to_email\": 0,\n  \"ok_to_call\": 0,\n  \"preferences\":{\n    \"is_silenced\": true\n  },\n  \"owner\" : {\n    \"external_id\":\"userExternal1\"\n  },\n  \"contact_groups\": [\n    {\n      \"group_name\": \"Past Client\"\n    },\n    {\n      \"id\":\"14\"\n    }\n  ],\n  \"external_ids\": [\n    {\n      \"source\":\"local\",\n      \"external_id\":\"abcd\"\n    }\n  ],\n  \"external_status\": {\n    \"status_name\":\"Processing\"\n  }\n}"},"url":"{{external_api_host}}/v1/contacts"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"created\": \"{external_api_host}/v1/contacts/56495\",\n    \"id\": 56495\n}"}],"_postman_id":"4f48dd5f-bbb5-46e3-bb22-e3c572aa76f3"},{"name":"Create Contact (as User)","event":[{"listen":"test","script":{"id":"87916f75-b829-457f-9b97-248ea35a51a1","type":"text/javascript","exec":[""]}}],"id":"50bfe0d2-6db0-43de-a838-297e495f7141","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"title\": \"Doctor\",\n    \"first_name\": \"Clark\",\n    \"last_name\": \"Gable\",\n    \"email\": \"username@example.com\",\n    \"email_work\": \"clark.gable2@totalexpertinc.com\",\n    \"address\": \"1234 Fake St\",\n    \"address_2\": \"Apartment -8\",\n    \"city\": \"Pleasantville\",\n    \"state\": \"MN\",\n    \"zip_code\": \"12345\",\n    \"phone_cell\": \"(763)555-0123\",\n    \"phone_office\": \"(763)555-1234\",\n    \"phone_home\": \"(612)-555-0123\",\n    \"employer_name\": \"BigIndustry Co, Inc. LLC\",\n    \"employer_address\": \"1235 Fake Ave.\",\n    \"employer_address_2\": \"Ste 10058818144\",\n    \"employer_city\": \"Unpleasantville\",\n    \"employer_state\": \"WI\",\n    \"employer_zip\": \"54321\",\n    \"license_number\": \"Q10101010101011\",\n    \"source\": \"OurSystem\",\n    \"creation_date\": \"2017-01-01 11:11:11\",\n    \"last_contacted_date\": \"2017-01-01 12:12:12\",\n    \"list_date\": \"2016-12-25 10:00:00\",\n    \"close_date\": \"2016-12-26 09:09:09\",\n    \"external_id\": \"101010\",\n    \"birthday\": \"1970-01-01\",\n    \"ok_to_mail\": 0,\n    \"ok_to_email\": 0,\n    \"ok_to_call\": 0,\n    \"preferences\": {\n        \"is_silenced\": 0\n    },\n    \"external_ids\": [\n        {\n            \"source\": \"local\",\n            \"external_id\": \"abcd\"\n        }\n    ],\n    \"contact_groups\": [\n        {\n            \"group_name\": \"Past Client\"\n        }\n    ],\n    \"external_status\": {\n        \"status_name\": \"Processing\"\n    },\n    \"owner\": {\n        \"external_id\": \"ironExpertExternal\"\n    },\n    \"assignee\": {\n        \"external_id\": \"captainExpertExternal\"\n    },\n    \"shared_with_users\": [\n        {\n            \"external_id\": \"spiderExpertExternal\"\n        }\n    ]\n}"},"url":"{{external_api_host}}/v1/contacts","description":"<p>Create a contact.</p>\n<p>Required Attributes (one of the following combinations):</p>\n<ul>\n<li>source, first_name, last_name, email</li>\n<li>source, first_name, last_name, phone_cell</li>\n<li>source, first_name, last_name, phone_home</li>\n<li>source, first_name, last_name, phone_office</li>\n<li>source, first_name, last_name, address, city, state, zip_code</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>[none]</li>\n</ul>\n","urlObject":{"path":["v1","contacts"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"50bfe0d2-6db0-43de-a838-297e495f7141"},{"name":"Create Contact (as Admin) with Entity","event":[{"listen":"test","script":{"id":"d20f4d42-94a1-4b9e-8be6-3d1db74496bc","exec":[""],"type":"text/javascript"}}],"id":"bf48c669-cd20-4907-ae90-5ae84974afa2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"title\": \"Doctor\",\n    \"first_name\": \"Clark\",\n    \"last_name\": \"Gable\",\n    \"email\": \"username@example.com\",\n    \"email_work\": \"clark.gable2@totalexpertinc.com\",\n    \"address\": \"1234 Fake St\",\n    \"address_2\": \"Apartment -8\",\n    \"city\": \"Pleasantville\",\n    \"state\": \"MN\",\n    \"zip_code\": \"12345\",\n    \"phone_cell\": \"(763)555-0123\",\n    \"phone_office\": \"(763)555-1234\",\n    \"phone_home\": \"(612)-555-0123\",\n    \"employer_name\": \"BigIndustry Co, Inc. LLC\",\n    \"employer_address\": \"1235 Fake Ave.\",\n    \"employer_address_2\": \"Ste 10058818144\",\n    \"employer_city\": \"Unpleasantville\",\n    \"employer_state\": \"WI\",\n    \"employer_zip\": \"54321\",\n    \"license_number\": \"Q10101010101011\",\n    \"source\": \"OurSystem\",\n    \"creation_date\": \"2017-01-01 11:11:11\",\n    \"last_contacted_date\": \"2017-01-01 12:12:12\",\n    \"list_date\": \"2016-12-25 10:00:00\",\n    \"close_date\": \"2016-12-26 09:09:09\",\n    \"external_id\": \"101010\",\n    \"birthday\": \"1970-01-01\",\n    \"ok_to_mail\": 0,\n    \"ok_to_email\": 0,\n    \"ok_to_call\": 0,\n    \"preferences\": {\n        \"is_silenced\": true\n    },\n    \"owner\": {\n        \"external_id\": \"userExternal1\"\n    },\n    \"contact_groups\": [\n        {\n            \"group_name\": \"Past Client\"\n        },\n        {\n            \"id\": \"14\"\n        }\n    ],\n    \"external_ids\": [\n        {\n            \"source\": \"local\",\n            \"external_id\": \"abcd\"\n        }\n    ],\n    \"external_status\": {\n        \"status_name\": \"Processing\"\n    },\n    \"related_entities\": [\n        {\n            \"relationship_type\": {\n                \"system_name\": \"household\"\n            },\n            \"parent\": {\n                \"id\": \"1234abcd7\",\n                \"entity_name\": \"Gable Household\"\n            }\n        }\n    ]\n}"},"url":"{{external_api_host}}/v1/contacts","description":"<p>Create a contact.</p>\n<p>Required Attributes (one of the following combinations):</p>\n<ul>\n<li>source, first_name, last_name, email</li>\n<li>source, first_name, last_name, phone_cell</li>\n<li>source, first_name, last_name, phone_home</li>\n<li>source, first_name, last_name, phone_office</li>\n<li>source, first_name, last_name, address, city, state, zip_code</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>owner*</li>\n</ul>\n<p>*required if authenticated as an organization admin</p>\n","urlObject":{"path":["v1","contacts"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"bf48c669-cd20-4907-ae90-5ae84974afa2"},{"name":"Update Contact","id":"7b52b130-fe28-4329-994a-442ecf9eed70","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Doctor\",\n  \"first_name\": \"Clark\",\n  \"last_name\": \"Gable\",\n  \"email\": \"username@example.com\",\n  \"email_work\": \"clark.gable2@totalexpertinc.com\",\n  \"address\": \"1234 Fake St\",\n  \"address_2\": \"Apartment -8\",\n  \"city\": \"Pleasantville\",\n  \"state\": \"MN\",\n  \"zip_code\": \"12345\",\n  \"phone_cell\": \"(763)555-0123\",\n  \"phone_office\": \"(763)555-1234\",\n  \"phone_home\": \"(612)-555-0123\",\n  \"employer_name\": \"BigIndustry Co, Inc. LLC\",\n  \"employer_address\": \"1235 Fake Ave.\",\n  \"employer_address_2\": \"Ste 10058818144\",\n  \"employer_city\": \"Unpleasantville\",\n  \"employer_state\": \"WI\",\n  \"employer_zip\": \"54321\",\n  \"license_number\": \"Q10101010101011\",\n  \"source\": \"OurSystem\",\n  \"creation_date\": \"2017-01-01 11:11:11\",\n  \"last_contacted\": \"2017-01-01 12:12:12\",\n  \"list_date\": \"2016-12-25 10:00:00\",\n  \"close_date\": \"2016-12-26 09:09:09\",\n  \"external_id\": \"101010\",\n  \"birthday\": \"1970-01-01\",\n  \"ok_to_mail\": 0,\n  \"ok_to_email\": 0,\n  \"ok_to_call\": 0,\n  \"contact_groups\": [\n    {\n      \"group_name\": \"Past Client\"\n    },\n  {\n    \"group_name\": \"Open House Visitors\"\n  }\n  ],\n  \"external_ids\": [\n    {\n      \"source\":\"local\",\n      \"external_id\":\"abcd\"\n    }\n  ]\n}"},"url":"{{external_api_host}}/v1/contacts/{{contact_id}}","description":"<p>Update an existing contact by ID.</p>\n","urlObject":{"path":["v1","contacts","{{contact_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7b52b130-fe28-4329-994a-442ecf9eed70"},{"name":"Delete Contact","id":"4efd33e1-f6ae-44c9-9678-78cba2b25ea3","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/contacts/{{contact_id}}","description":"<p>Delete a contact by ID.</p>\n","urlObject":{"path":["v1","contacts","{{contact_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4efd33e1-f6ae-44c9-9678-78cba2b25ea3"}],"id":"ea884c5a-8eb4-4872-9b08-70a5a910509f","description":"<p>Endpoints for interacting with the contacts resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Generated identifier for contact.</td>\n</tr>\n<tr>\n<td>address</td>\n<td>Yes</td>\n<td>string</td>\n<td>Street address portion of contact's address.</td>\n</tr>\n<tr>\n<td>address_2</td>\n<td>Yes</td>\n<td>string</td>\n<td>Line 2 portion of contact's address.</td>\n</tr>\n<tr>\n<td>birthday</td>\n<td>Yes</td>\n<td>string</td>\n<td>Contact's birthday, formatted as a date with 1970 as the year. Preferred format: '1970-MM-DD'</td>\n</tr>\n<tr>\n<td>city</td>\n<td>Yes</td>\n<td>string</td>\n<td>City portion of contact's address.</td>\n</tr>\n<tr>\n<td>close_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>Date/time contact closed. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>creation_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>Date of creation of this contact. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>credit_score</td>\n<td>Yes</td>\n<td>string</td>\n<td>TE credit rating of contact. Accepted values: 'Excellent', 'Good', 'Fair', 'Poor', 'Very Poor'</td>\n</tr>\n<tr>\n<td>credit_score_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>Date/time of contact's credit score. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>email</td>\n<td>Yes</td>\n<td>string</td>\n<td>Contact's personal email address.</td>\n</tr>\n<tr>\n<td>email_work</td>\n<td>Yes</td>\n<td>string</td>\n<td>Contact's work email address.</td>\n</tr>\n<tr>\n<td>employer_address</td>\n<td>Yes</td>\n<td>string</td>\n<td>Street address portion of contact's employer's address.</td>\n</tr>\n<tr>\n<td>employer_address_2</td>\n<td>Yes</td>\n<td>string</td>\n<td>Line 2 portion of contact's employer's address.</td>\n</tr>\n<tr>\n<td>employer_city</td>\n<td>Yes</td>\n<td>string</td>\n<td>City portion of contact's employer's address.</td>\n</tr>\n<tr>\n<td>employer_license_number</td>\n<td>Yes</td>\n<td>string</td>\n<td>Contact's employer's license number.</td>\n</tr>\n<tr>\n<td>employer_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name of contact's employer.</td>\n</tr>\n<tr>\n<td>employer_state</td>\n<td>Yes</td>\n<td>string</td>\n<td>State portion of contact's employer's address.</td>\n</tr>\n<tr>\n<td>employer_zip</td>\n<td>Yes</td>\n<td>string</td>\n<td>Zip code portion of contact's employer's address.</td>\n</tr>\n<tr>\n<td>external_id</td>\n<td>Yes</td>\n<td>string</td>\n<td>Contact's external identifier, e.g. the unique identifier from the contact's source.</td>\n</tr>\n<tr>\n<td>fax</td>\n<td>Yes</td>\n<td>string</td>\n<td>Contact's fax number. Preferred format: '(555)555-1234'</td>\n</tr>\n<tr>\n<td>first_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Contact's first name.</td>\n</tr>\n<tr>\n<td>internal_created_at</td>\n<td>No</td>\n<td>string</td>\n<td>Date of creation of this contact in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>internal_updated_at</td>\n<td>No</td>\n<td>string</td>\n<td>Date of last change for this contact in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>last_contacted_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>Date/time of last interaction with contact. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>last_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Contact's last name.</td>\n</tr>\n<tr>\n<td>license_number</td>\n<td>Yes</td>\n<td>string</td>\n<td>Contact's license number.</td>\n</tr>\n<tr>\n<td>linkedin_url</td>\n<td>Yes</td>\n<td>string</td>\n<td>Contact's LinkedIn Profile URL</td>\n</tr>\n<tr>\n<td>list_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>Date/time contact's home was listed. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>nickname</td>\n<td>Yes</td>\n<td>string</td>\n<td>Nickname for the contact</td>\n</tr>\n<tr>\n<td>ok_to_call</td>\n<td>Yes</td>\n<td>string</td>\n<td>Indicator whether it is ok to call this contact. 1=yes, 0=no.</td>\n</tr>\n<tr>\n<td>ok_to_email</td>\n<td>Yes</td>\n<td>numeric</td>\n<td>Indicator whether it is ok to email this contact. 1=yes, 0=no.</td>\n</tr>\n<tr>\n<td>ok_to_mail</td>\n<td>Yes</td>\n<td>string</td>\n<td>Indicator whether it is ok to mail this contact. 1=yes, 0=no.</td>\n</tr>\n<tr>\n<td>other_url</td>\n<td>Yes</td>\n<td>string</td>\n<td>Other URL relevant to the contact</td>\n</tr>\n<tr>\n<td>phone_cell</td>\n<td>Yes</td>\n<td>string</td>\n<td>Contact's cell phone number, preferred format: '(555)555-1234'</td>\n</tr>\n<tr>\n<td>phone_home</td>\n<td>Yes</td>\n<td>string</td>\n<td>Contact's home phone number, preferred format: '(555)555-1234'</td>\n</tr>\n<tr>\n<td>phone_office</td>\n<td>Yes</td>\n<td>string</td>\n<td>Contact's office phone number, preferred format: '(555)555-1234'</td>\n</tr>\n<tr>\n<td>pre_approval_issued_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>Date loan pre-approval was issued for this lead. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>preferences</td>\n<td>Yes</td>\n<td>object</td>\n<td>Collection of owner-specific contact preferences. See the \"Contact Preferences\" table for available attributes.</td>\n</tr>\n<tr>\n<td>referred_by</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name of person this contact was referred by.</td>\n</tr>\n<tr>\n<td>referred_to</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name of person this contact has been referred to.</td>\n</tr>\n<tr>\n<td>source</td>\n<td>Yes</td>\n<td>string</td>\n<td>Source of the contact.</td>\n</tr>\n<tr>\n<td>state</td>\n<td>Yes</td>\n<td>string</td>\n<td>State portion of contact's address.</td>\n</tr>\n<tr>\n<td>suffix</td>\n<td>Yes</td>\n<td>string</td>\n<td>Contact's suffix, e.g. 'Jr.'</td>\n</tr>\n<tr>\n<td>title</td>\n<td>Yes</td>\n<td>string</td>\n<td>Contact's honorific/title, e.g. \"Doctor\"</td>\n</tr>\n<tr>\n<td>website_url</td>\n<td>Yes</td>\n<td>string</td>\n<td>URL for the contact's personal website</td>\n</tr>\n<tr>\n<td>zip_code</td>\n<td>Yes</td>\n<td>string</td>\n<td>Zip code portion of contact's address.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"contact-preferences\">Contact Preferences</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>is_silenced</td>\n<td>Yes</td>\n<td>boolean</td>\n<td>Indicator whether owner is permitted to communicate with the contact. (0/false - permitted communication, 1/true - denied communication)</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"relationships\">Relationships</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>owner</td>\n<td>Yes*</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>Owning user of the contact. One to many relationship, so returned as an object. *Only assignable/visible if authenticated as an organization admin.</td>\n</tr>\n<tr>\n<td>contact_groups</td>\n<td>Yes</td>\n<td>Contact Group</td>\n<td>group_name, id</td>\n<td>Groups for this contact. Many-to-many relationship, so returned as an array.</td>\n</tr>\n<tr>\n<td>external_ids</td>\n<td>Yes</td>\n<td>Contact External Id</td>\n<td>source,external_id</td>\n<td>External ids for this contact, paired with the source for that id. One-to-many relationship, so returned as an array.</td>\n</tr>\n<tr>\n<td>related_entities</td>\n<td>Yes</td>\n<td>*</td>\n<td>*</td>\n<td>*(See Entities documentation)</td>\n</tr>\n<tr>\n<td>channels</td>\n<td>Yes</td>\n<td>Channel</td>\n<td>system_name</td>\n<td>Business channels for this contact. Many-to-many relationship, so returned as an array.</td>\n</tr>\n<tr>\n<td>wlp_access</td>\n<td>Yes</td>\n<td>Channel</td>\n<td>access_type</td>\n<td>WLP Access Type for this contact. Many-to-one relationship, so returns as an object.</td>\n</tr>\n<tr>\n<td>custom</td>\n<td>Yes</td>\n<td>Custom Field</td>\n<td>*(See Custom Fields)</td>\n<td>*(See Custom Fields)</td>\n</tr>\n<tr>\n<td>shared_with_users</td>\n<td>Yes</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>Users that this contact is shared with. Many-to-many relationship, so returned as an array.</td>\n</tr>\n<tr>\n<td>assignee</td>\n<td>Yes</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>The user that this contact is assigned to.  <br />One-to-many relationship, so returned</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"special-postpatch-relationships\">Special POST/PATCH Relationships</h3>\n<p>These relationships are used to manipulate the contact but are neither contact attributes nor bona fide relationships. These attributes will not appear in responses.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>remove_contact_groups</td>\n<td>Contact Group</td>\n<td>group_name, id</td>\n<td>Groups to remove this contact from. Array of group objects.</td>\n</tr>\n<tr>\n<td>options</td>\n<td>Object</td>\n<td>See below table.</td>\n<td>Options to apply to the request.</td>\n</tr>\n<tr>\n<td>remove_related_entities</td>\n<td>*</td>\n<td>*</td>\n<td>*(See Entities documentation)</td>\n</tr>\n<tr>\n<td>remove_channels</td>\n<td>Channel</td>\n<td>system_name</td>\n<td>Channels from which to remove this contact. Array of channel objects.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"special-postpatch-attributes\">Special POST/PATCH Attributes</h3>\n<p>These attributes are used to manipulate the contact but are not contact attributes. These attributes will not appear in responses.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>do_not_contact</td>\n<td>String</td>\n<td>Indicator whether it is ok to contact this contact.1 = yes, 0 = no.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"postpatch-options\">POST/PATCH Options</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Type</th>\n<th>Description</th>\n<th>Default Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>suppress_emails</td>\n<td>boolean</td>\n<td>Whether to suppress auto-campaign emails that would be sent as a direct result of this request. WARNING: Using this option has consequences. Do not use this option before talking with your TE integration consultant.</td>\n<td>False</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"sorting\">Sorting</h3>\n<p>Use the 'sort=attribute_name,attribute_name_2' query to return the list of contacts sorted by the given attribute. Use a minus sign in front of the attribute name to sort the results in descending order. For example, to sort by the internal_updated_at attribute and place the results in descending order, the URL would include:</p>\n<p>/contacts?sort=-internal_updated_at</p>\n<p>The sort query supports the attributes listed in the Attributes table. The query does not support sorting by relationship values.</p>\n<hr />\n<h3 id=\"filtering\">Filtering</h3>\n<p>Use the 'filter=attribute_name=x,attribute_name_2=y' query to return the list of contacts that meet the filter criteria. For example, to filter contacts modified between Oct. 14, 2017 17:41:01 (UTC) and Oct. 15, 2017 17:41:09 (UTC), sorted by the internal_updated_at attribute in ascending order, the following query could be used:</p>\n<p>/contacts?sort=internal_updated_at&amp;filter=internal_updated_at_start=2017-10-14T17:41:01Z,internal_updated_at_end=2017-10-15T17:41:09Z</p>\n<p>Use the contains filters to return the list of contacts who's first name, last name or email contains a specific string. The minimum character length for contains filters are 3. For example, in order to query for a list of contacts who's first name contains the string \"cat\" the following query could be used:</p>\n<p>/contacts?page[number]=1&amp;page[size]=10&amp;filter=first_name_contains=cat</p>\n<p>The supported filter attributes are shown in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>internal_updated_at_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>internal_updated_at_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>owner_id</td>\n<td>TE ID of the owning user.</td>\n</tr>\n<tr>\n<td>owner_email</td>\n<td>Email of the owning user.</td>\n</tr>\n<tr>\n<td>owner_username</td>\n<td>Username of the owning user.</td>\n</tr>\n<tr>\n<td>first_name</td>\n<td>First name of the contact.</td>\n</tr>\n<tr>\n<td>last_name</td>\n<td>Last name of the contact</td>\n</tr>\n<tr>\n<td>email</td>\n<td>Email of the contact</td>\n</tr>\n<tr>\n<td>first_name_contains</td>\n<td>First name of the contact contains</td>\n</tr>\n<tr>\n<td>last_name_contains</td>\n<td>Last name of the contact contains</td>\n</tr>\n<tr>\n<td>email_contains</td>\n<td>Email of the contact contains</td>\n</tr>\n<tr>\n<td>group_id</td>\n<td>Contact belongs to the group ID specified</td>\n</tr>\n<tr>\n<td>group_name</td>\n<td>Contact belongs to the group name specified</td>\n</tr>\n<tr>\n<td>phone_cell</td>\n<td>Contact's cell phone number</td>\n</tr>\n<tr>\n<td>phone_home</td>\n<td>Contact's home phone number</td>\n</tr>\n<tr>\n<td>phone_office</td>\n<td>Contact's office phone number</td>\n</tr>\n<tr>\n<td>owner_external_id</td>\n<td>External ID of the owning user.</td>\n</tr>\n<tr>\n<td>archieved</td>\n<td>Indicator whether contact is archieved</td>\n</tr>\n<tr>\n<td>external_id</td>\n<td>External ID of the contact</td>\n</tr>\n<tr>\n<td>source</td>\n<td>Source of the contact.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"deduplication-logic\">Deduplication Logic</h3>\n<p>Through the API, the external IDs array contains a contact’s unique identifier that comes from the external source. If there is a match within the external IDs array, the contact is successfully matched as well.</p>\n<ul>\n<li>If the external IDs array does not contain a match, the logic looks for matches on first name, last name, and email.</li>\n<li>If the first name, last name, and email do not match, the logic looks for matches on first name, last name, and address, city, state, and zip code.</li>\n<li>If the first name, last name, address, city, stat, and zip code does not match, the logic looks for matches on first name, last name, and home phone.</li>\n<li>If the first name, last name, and home phone does not match, the logic looks for matches on first name, last name, and cell phone.</li>\n<li>If the first name, last name, and cell phone does not match, the logic looks for matches on first name, last name, and office phone.</li>\n<li>If the first name, last name, and home phone does not match, the system will create a new contact.</li>\n</ul>\n","event":[{"listen":"prerequest","script":{"id":"04d6c4e2-7300-40cd-af13-973609a911bb","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"a7972dcb-d897-4099-92a9-9f73a6912719","type":"text/javascript","exec":[""]}}],"_postman_id":"ea884c5a-8eb4-4872-9b08-70a5a910509f"},{"name":"Contact Groups","item":[{"name":"Fetch Contact Group","id":"55c68915-07d2-775d-e454-b7e4708523d7","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{external_api_host}}/v1/contact-groups/{{contact_group_id}}","description":"<p>Fetch a contact group by ID.</p>\n","urlObject":{"path":["v1","contact-groups","{{contact_group_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"2546a1cb-efda-4fa7-aae4-0a4a13b7a7b0","name":"Fetch Contact Group (as User)","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/contact-groups/{{contact_group_id}}"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"group_name\": \"My Group\",\n    \"id\": 15643,\n    \"user_editable\": false\n}"},{"id":"1901943d-2adf-4f9e-8522-14d031147331","name":"Fetch Contact Group (as Admin)","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/contact-groups/{{contact_group_id}}"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"group_name\": \"My Group\",\n    \"id\": 15643,\n    \"user_editable\": false,\n    \"owner\": {\n        \"email\": \"ted@example.com\",\n        \"external_id\": \"userExternal1\",\n        \"id\": 65412,\n        \"username\": \"ted-example\"\n    }\n}"}],"_postman_id":"55c68915-07d2-775d-e454-b7e4708523d7"},{"name":"Fetch Contact Groups","id":"1f0ae00b-59b5-5ff8-f396-fbb9e0d48cbf","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{external_api_host}}/v1/contact-groups?page[number]=1&page[size]=100","description":"<p>Fetch a page of contact groups. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","contact-groups"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"100"}],"variable":[]}},"response":[{"id":"c1c31b8e-76e1-45bb-8520-7d0ccf17ab9c","name":"Fetch Contact Groups (as Admin)","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":{"raw":"{{external_api_host}}/v1/contact-groups?page[number]=1&page[size]=100","host":["{{external_api_host}}"],"path":["v1","contact-groups"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"100"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"items\": [\n        {\n            \"group_name\": \"Active Lead\",\n            \"id\": 5,\n            \"user_editable\": false,\n            \"owner\": {\n                \"email\": \"ted@example.com\",\n                \"external_id\": \"userExternal1\",\n                \"id\": 65412,\n                \"username\": \"ted-example\"\n            }\n        },\n        {\n            \"group_name\": \"Active Client\",\n            \"id\": 6,\n            \"user_editable\": false,\n            \"owner\": {\n                \"email\": \"ted@example.com\",\n                \"external_id\": \"userExternal1\",\n                \"id\": 65412,\n                \"username\": \"ted-example\"\n            }\n        },\n        {\n            \"group_name\": \"Past Client\",\n            \"id\": 7,\n            \"user_editable\": false,\n            \"owner\": {\n                \"email\": \"ted@example.com\",\n                \"external_id\": \"userExternal1\",\n                \"id\": 65412,\n                \"username\": \"ted-example\"\n            }\n        },\n        {\n            \"group_name\": \"Won\",\n            \"id\": 8,\n            \"user_editable\": false,\n            \"owner\": {\n                \"email\": \"ted@example.com\",\n                \"external_id\": \"userExternal1\",\n                \"id\": 65412,\n                \"username\": \"ted-example\"\n            }\n        },\n        {\n            \"group_name\": \"Lost\",\n            \"id\": 9,\n            \"user_editable\": false,\n            \"owner\": {\n                \"email\": \"ted@example.com\",\n                \"external_id\": \"userExternal1\",\n                \"id\": 65412,\n                \"username\": \"ted-example\"\n            }\n        },\n        {\n            \"group_name\": \"Pre-Approved\",\n            \"id\": 10,\n            \"user_editable\": false,\n            \"owner\": {\n                \"email\": \"ted@example.com\",\n                \"external_id\": \"userExternal1\",\n                \"id\": 65412,\n                \"username\": \"ted-example\"\n            }\n        },\n        {\n            \"group_name\": \"Referral\",\n            \"id\": 11,\n            \"user_editable\": false,\n            \"owner\": {\n                \"email\": \"ted@example.com\",\n                \"external_id\": \"userExternal1\",\n                \"id\": 65412,\n                \"username\": \"ted-example\"\n            }\n        },\n        {\n            \"group_name\": \"Under Contract\",\n            \"id\": 12,\n            \"user_editable\": false,\n            \"owner\": {\n                \"email\": \"ted@example.com\",\n                \"external_id\": \"userExternal1\",\n                \"id\": 65412,\n                \"username\": \"ted-example\"\n            }\n        },\n        {\n            \"group_name\": \"Dead\",\n            \"id\": 13,\n            \"user_editable\": false,\n            \"owner\": {\n                \"email\": \"ted@example.com\",\n                \"external_id\": \"userExternal1\",\n                \"id\": 65412,\n                \"username\": \"ted-example\"\n            }\n        },\n        {\n            \"group_name\": \"Past Client\",\n            \"id\": 14,\n            \"user_editable\": false,\n            \"owner\": {\n                \"email\": \"eric@example.com\",\n                \"external_id\": \"userExternalTwo\",\n                \"id\": 70564,\n                \"username\": \"eric-example\"\n            }\n        }\n    ],\n    \"links\": {\n        \"first\": 1,\n        \"last\": 2,\n        \"next\": 2,\n        \"prev\": null\n    }\n}"}],"_postman_id":"1f0ae00b-59b5-5ff8-f396-fbb9e0d48cbf"},{"name":"Create Contact Group (as Admin)","event":[{"listen":"test","script":{"id":"a5f90b6e-6fdd-4b26-a675-dcb1fd99acba","type":"text/javascript","exec":[""]}}],"id":"8490f4dc-d5ef-e466-e24e-c421f1ee1d5b","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"group_name\": \"My Group\",\n  \"owner\": {\n    \"external_id\":\"userExternal1\"\n  }\n}"},"url":"{{external_api_host}}/v1/contact-groups","description":"<p>Create a contact group.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>group_name</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>owner*</li>\n</ul>\n<p>*required if authenticated as an organization admin</p>\n","urlObject":{"path":["v1","contact-groups"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"706aa209-4b2b-4811-800a-d459683051c5","name":"Owner not found","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"group_name\": \"My Group\",\n  \"owner\": {\n    \"external_id\":\"userExternal1\"\n  }\n}"},"url":"{{external_api_host}}/v1/contact-groups"},"status":"Unprocessable Entity (WebDAV) (RFC 4918)","code":422,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Unable to find target for relationship: 'owner'\"\n}"},{"id":"38a76b3d-9304-4a5b-88ba-bed1d56e34e2","name":"Create Contact Group (as Admin)","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"group_name\": \"My Group\",\n  \"owner\": {\n    \"external_id\":\"userExternal1\"\n  }\n}"},"url":"{{external_api_host}}/v1/contact-groups"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"created\": \"{{external_api_host}}/v1/contact-groups/15643\",\n    \"id\": 15643\n}"}],"_postman_id":"8490f4dc-d5ef-e466-e24e-c421f1ee1d5b"},{"name":"Create Contact Group (as User)","event":[{"listen":"test","script":{"id":"f7b54c61-6814-4d02-bc30-34b23722ea7b","type":"text/javascript","exec":[""]}}],"id":"b2084398-935e-97c7-3d1c-2d79d2dc46d6","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"group_name\": \"My Group\"\n}"},"url":"{{external_api_host}}/v1/contact-groups","description":"<p>Create a contact group.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>group_name</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>[none]</li>\n</ul>\n","urlObject":{"path":["v1","contact-groups"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"aa765087-1b3a-44da-afe3-5417b6f9ba88","name":"Create Contact Group (as User)","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"group_name\": \"My Group\"\n}"},"url":"{{external_api_host}}/v1/contact-groups"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"created\": \"{{external_api_host}}/v1/contact-groups/15656\",\n    \"id\": 15656\n}"}],"_postman_id":"b2084398-935e-97c7-3d1c-2d79d2dc46d6"},{"name":"Update Contact Group","id":"ee00ae8a-43b3-8244-9da8-725429944ac6","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"group_name\": \"My Group\"\n}"},"url":"{{external_api_host}}/v1/contact-groups/{{contact_group_id}}","description":"<p>Update an existing contact group by ID.</p>\n","urlObject":{"path":["v1","contact-groups","{{contact_group_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"a0507763-146b-44f8-9d7c-db0c20a9e25d","name":"Update Contact Group","originalRequest":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"group_name\": \"My Group\"\n}"},"url":"{{external_api_host}}/v1/contact-groups/{{contact_group_id}}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"[]"}],"_postman_id":"ee00ae8a-43b3-8244-9da8-725429944ac6"},{"name":"Delete Contact Group","id":"1bf9fa52-ca03-3b01-cb7b-eb0600ae2711","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/contact-groups/{{contact_group_id}}","description":"<p>Deletes a contact group by ID.</p>\n","urlObject":{"path":["v1","contact-groups","{{contact_group_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"aae7b545-74ca-4887-8b93-303ed9139ce9","name":"Delete Contact Group","originalRequest":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/contact-groups/{{contact_group_id}}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"[]"}],"_postman_id":"1bf9fa52-ca03-3b01-cb7b-eb0600ae2711"}],"id":"544e8dd1-6ed8-0e4c-e02c-5fcc1317ae85","description":"<p>Groups are an easy way for you to combine and categorize certain contacts or leads. </p>\n<p><strong>NOTE:</strong> \nSome organizations require specific groups to be added to a contact on contact creation or the API call will fail. If you an encounter this error, please reach out to the organization you are working with to get a list of their currently required groups. </p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Generated identifier for contact group.</td>\n</tr>\n<tr>\n<td>group_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name of the contact groups.</td>\n</tr>\n<tr>\n<td>user_editable</td>\n<td>Yes</td>\n<td>boolean</td>\n<td>Whether the group can be edited in the UI. Defaults to true.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"uniqueness\">Uniqueness</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Fields</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>group_name</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"relationships\">Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>owner</td>\n<td>Yes*</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>Owning user of the contact. One to many relationship, so returned as an object. *Only assignable/visible if authenticated as an organization admin.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"23bce064-b90b-4101-899b-4e0adf9c5a69","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"fa92abe1-2eec-453c-8b81-fe816c757fbd","type":"text/javascript","exec":[""]}}],"_postman_id":"544e8dd1-6ed8-0e4c-e02c-5fcc1317ae85"},{"name":"Contact Surveys","item":[{"name":"Get Contact Survey","id":"0b29a944-268a-4d02-a399-78439063c4c4","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":"{{external_api_host}}/v1/contact-surveys/{{contact_survey_id}}","description":"<p>Fetch a specific survey specified by ID.</p>\n","urlObject":{"path":["v1","contact-surveys","{{contact_survey_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"f2559377-ba83-4760-97ac-9a4cfce17b68","name":"Get Contact Survey","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":"{{external_api_host}}/v1/contact-surveys/{{contact_survey_id}}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"external_id\": null,\n    \"id\": \"69003b93703638cf\",\n    \"internal_created_at\": \"2018-10-23 20:55:21\",\n    \"survey_name\": \"First Time Buyer Funnel\",\n    \"version\": \"1.3\",\n    \"questions\": [\n        {\n            \"data_type\": \"text\",\n            \"id\": \"7d06643723812637\",\n            \"question_text\": \"Any additional information you would like to leave?\",\n            \"sort_order\": \"3\",\n            \"system_name\": \"comments\"\n        },\n        {\n            \"data_type\": \"choice\",\n            \"id\": \"e68569b18b191912\",\n            \"question_text\": \"Are granite countertops a must?\",\n            \"sort_order\": \"2\",\n            \"system_name\": \"granite_tops\",\n            \"possible_choice_answers\": [\n                {\n                    \"sort_order\": \"0\",\n                    \"system_name\": \"no\",\n                    \"value\": \"Nope\"\n                },\n                {\n                    \"sort_order\": \"0\",\n                    \"system_name\": \"yes\",\n                    \"value\": \"Absolutely!\"\n                }\n            ]\n        },\n        {\n            \"data_type\": \"decimal\",\n            \"id\": \"f8781f1a6d2f3ab5\",\n            \"question_text\": \"What is your maximum price range?\",\n            \"sort_order\": \"1\",\n            \"system_name\": \"max_price\"\n        }\n    ]\n}"}],"_postman_id":"0b29a944-268a-4d02-a399-78439063c4c4"},{"name":"Get Contact Surveys","id":"1df1c4c0-e583-47d9-9fa1-f92a87f61c97","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":"{{external_api_host}}/v1/contact-surveys?page[number]=1&page[size]=10","description":"<p>Fetch a page of surveys. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","contact-surveys"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"1df1c4c0-e583-47d9-9fa1-f92a87f61c97"},{"name":"Create Contact Survey","id":"0d3a515f-9be8-4a53-bf94-c853a95ca868","request":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{access_token}}"},{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"source\": \"Survey Origination System\",\r\n    \"survey_name\": \"First Time Buyer Funnel\",\r\n    \"version\": \"1.3\",\r\n    \"questions\": [\r\n        {\r\n            \"question_text\": \"What is your maximum price range?\",\r\n            \"system_name\": \"max_price\",\r\n            \"data_type\": \"decimal\",\r\n            \"sort_order\": \"1\" \r\n        },\r\n        {\r\n            \"question_text\": \"Any additional information you would like to leave?\",\r\n            \"system_name\": \"comments\",\r\n            \"data_type\": \"text\",\r\n            \"sort_order\": \"3\" \r\n        },\r\n        {\r\n            \"question_text\": \"Are granite countertops a must?\",\r\n            \"system_name\": \"granite_tops\",\r\n            \"data_type\": \"choice\",\r\n            \"sort_order\": \"2\",\r\n            \"possible_choice_answers\": [\r\n                {\r\n                    \"value\":\"Absolutely!\",\r\n                    \"system_name\":\"yes\"\r\n                },\r\n                {\r\n                    \"value\":\"Nope\",\r\n                    \"system_name\":\"no\"\r\n                }\r\n            ]\r\n        }\r\n    ]\r\n}"},"url":"{{external_api_host}}/v1/contact-surveys","description":"<p>Create a survey.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>source</li>\n<li>survey_name</li>\n<li>questions</li>\n<li>questions.question_text</li>\n<li>questions.system_name</li>\n<li>questions.data_type</li>\n</ul>\n","urlObject":{"path":["v1","contact-surveys"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"b86da6ad-b4b5-4c20-9460-e084647998fe","name":"Create Contact Survey","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n\t\"source\": \"Survey Origination System\",\r\n    \"survey_name\": \"First Time Buyer Funnel\",\r\n    \"version\": \"1.3\",\r\n    \"questions\": [\r\n        {\r\n            \"question_text\": \"What is your maximum price range?\",\r\n            \"system_name\": \"max_price\",\r\n            \"data_type\": \"decimal\",\r\n            \"sort_order\": \"1\" \r\n        },\r\n        {\r\n            \"question_text\": \"Any additional information you would like to leave?\",\r\n            \"system_name\": \"comments\",\r\n            \"data_type\": \"text\",\r\n            \"sort_order\": \"3\" \r\n        },\r\n        {\r\n            \"question_text\": \"Are granite countertops a must?\",\r\n            \"system_name\": \"granite_tops\",\r\n            \"data_type\": \"choice\",\r\n            \"sort_order\": \"2\",\r\n            \"possible_choice_answers\": [\r\n                {\r\n                    \"value\":\"Absolutely!\",\r\n                    \"system_name\":\"yes\"\r\n                },\r\n                {\r\n                    \"value\":\"Nope\",\r\n                    \"system_name\":\"no\"\r\n                }\r\n            ]\r\n        }\r\n    ]\r\n}"},"url":"{{external_api_host}}/v1/contact-surveys"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"created\": \"public.totalexpert.net/v1/contact-surveys/69003b93703638cf\",\r\n    \"id\": \"69003b93703638cf\"\r\n}"}],"_postman_id":"0d3a515f-9be8-4a53-bf94-c853a95ca868"},{"name":"Update Contact Survey","id":"1a23ef5d-ae4f-4ab2-8abc-ce2a39cbc93a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"warning":"This is a duplicate header and will be overridden by the Authorization header generated by Postman.","key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"source\": \"Survey Origination System\",\n    \"survey_name\": \"First Time Buyer Funnel\",\n    \"version\": \"1.3\",\n    \"questions\": [\n        {\n            \"question_text\": \"What is your maximum price range?\",\n            \"system_name\": \"max_price\",\n            \"data_type\": \"decimal\",\n            \"sort_order\": \"1\" \n        },\n        {\n            \"question_text\": \"Any additional information you would like to leave?\",\n            \"system_name\": \"comments\",\n            \"data_type\": \"text\",\n            \"sort_order\": \"3\" \n        },\n        {\n            \"question_text\": \"Are granite countertops a must?\",\n            \"system_name\": \"granite_tops\",\n            \"data_type\": \"choice\",\n            \"sort_order\": \"2\",\n            \"possible_choice_answers\": [\n                {\n                    \"value\":\"Absolutely!\",\n                    \"system_name\":\"yes\"\n                },\n                {\n                    \"value\":\"Nope\",\n                    \"system_name\":\"no\"\n                }\n            ]\n        }\n    ]\n}"},"url":"{{external_api_host}}/v1/contact-surveys/{{contact_survey_id}}","description":"<p>Update a survey.</p>\n<p>Required Attributes:</p>\n<p>At least one questions array, which could be empty.</p>\n","urlObject":{"path":["v1","contact-surveys","{{contact_survey_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"b16b3751-40fe-4bbe-a0e0-59217b4280de","name":"Update Contact Survey","originalRequest":{"method":"PATCH","header":[{"warning":"This is a duplicate header and will be overridden by the Authorization header generated by Postman.","key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"source\": \"Survey Origination System\",\n    \"survey_name\": \"First Time Buyer Funnel\",\n    \"version\": \"1.3\",\n    \"questions\": [\n        {\n            \"question_text\": \"What is your maximum price range?\",\n            \"system_name\": \"max_price\",\n            \"data_type\": \"decimal\",\n            \"sort_order\": \"1\" \n        },\n        {\n            \"question_text\": \"Any additional information you would like to leave?\",\n            \"system_name\": \"comments\",\n            \"data_type\": \"text\",\n            \"sort_order\": \"3\" \n        },\n        {\n            \"question_text\": \"Are granite countertops a must?\",\n            \"system_name\": \"granite_tops\",\n            \"data_type\": \"choice\",\n            \"sort_order\": \"2\",\n            \"possible_choice_answers\": [\n                {\n                    \"value\":\"Absolutely!\",\n                    \"system_name\":\"yes\"\n                },\n                {\n                    \"value\":\"Nope\",\n                    \"system_name\":\"no\"\n                }\n            ]\n        }\n    ]\n}"},"url":"{{external_api_host}}/v1/contact-surveys/{{contact_survey_id}}"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"created\": \"public.totalexpert.net/v1/contact-surveys/69003b93703638cf\",\n    \"id\": \"69003b93703638cf\"\n}"}],"_postman_id":"1a23ef5d-ae4f-4ab2-8abc-ce2a39cbc93a"}],"id":"7b449914-780f-4d14-a912-010d431fa25e","description":"<p>Endpoints for interacting with the contact surveys resource.</p>\n<h5 id=\"overview\">Overview</h5>\n<p>Surveys are a flexible data structure that allow integrations to store additional details around a contact that aren’t supported by the standard contact field set. For example, if a contact was interested in a refinance opportunity and supplied information about their property location, value, and existing mortgage, etc., you could store this information in a survey response and tie it to that contact.</p>\n<h5 id=\"advantages-of-using-the-surveys-endpoint\">Advantages of using the surveys endpoint</h5>\n<p>There are a few advantages to using the surveys endpoint:</p>\n<ul>\n<li>Multiple survey structures can be created for an organization for different purposes. You can have one for refinance, auto loan interest, or any other data you wish to collect from your contacts.</li>\n<li>A contact can submit multiple surveys and new submissions will show up in the survey response area in the UI rather than overwriting old data. This makes it easy to keep track of different interactions with the contact.</li>\n<li>Contact survey responses can be used to trigger marketing automation and can also be used as different conditions within the journey.</li>\n</ul>\n<h5 id=\"general-flow\">General Flow</h5>\n<p>To submit survey responses to the API (examples in the Contact Survey Responses documentation), you first need to create the survey. The survey is structured as a set of questions and potential answers with their field types.</p>\n<p>When creating the survey via the API, the API will return a survey ID in its response. Once you have that ID, you can retrieve the IDs of the questions from the API for use when creating a survey response.</p>\n<p>Now that you have the IDs of the questions, you can create survey responses for that specific organization when data is being sent to Total Expert from your platform as described in the Contact Surveys Response documentation.</p>\n<p><strong>Note</strong><br />If you are sending standard contact data with a survey, that will have to be sent first in a separate request so that you can obtain the Total Expert contact ID that you want to associate the survey with.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>string</td>\n<td>Generated identifier for survey.</td>\n</tr>\n<tr>\n<td>external_id</td>\n<td>Yes</td>\n<td>string</td>\n<td>Survey's external identifier.</td>\n</tr>\n<tr>\n<td>internal_created_at</td>\n<td>No</td>\n<td>string</td>\n<td>Date of creation of this survey in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>questions</td>\n<td>Yes</td>\n<td>object</td>\n<td>Collection of questions. See the \"Contact Survey Question Attributes\" table for available attributes.</td>\n</tr>\n<tr>\n<td>source</td>\n<td>Yes</td>\n<td>string</td>\n<td>Source system of the survey.</td>\n</tr>\n<tr>\n<td>survey_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name of the survey.</td>\n</tr>\n<tr>\n<td>version</td>\n<td>Yes</td>\n<td>string</td>\n<td>Survey's version.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"contact-survey-question-attributes\">Contact Survey Question Attributes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>data_type</td>\n<td>Yes</td>\n<td>string</td>\n<td>Question type. One of: decimal, choice, text. If choice, possible_choice_answers must be provided.</td>\n</tr>\n<tr>\n<td>possible_choice_answers</td>\n<td>Yes</td>\n<td>object</td>\n<td>Collection of multiple-choice answers. See the \"Contact Survey Question Choice Answer Attributes\" table for available attributes.</td>\n</tr>\n<tr>\n<td>question_text</td>\n<td>Yes</td>\n<td>string</td>\n<td>Content of the survey question.</td>\n</tr>\n<tr>\n<td>sort_order</td>\n<td>Yes</td>\n<td>integer</td>\n<td>For UI. Order of this question in any list displayed in TE UI.</td>\n</tr>\n<tr>\n<td>system_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Normalized name which TE can use to match questions across surveys. For example, if a Refinance funnel and a New Home funnel have the same question, using the same system name on both questions will allow TE to treat them in the same way for triggering events. Questions in the same survey must have unique system names.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"contact-survey-question-choice-answer-attributes\">Contact Survey Question Choice Answer Attributes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>sort_order</td>\n<td>Yes</td>\n<td>integer</td>\n<td>For UI. Order of this choice in any list displayed in TE UI.</td>\n</tr>\n<tr>\n<td>system_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Normalized name which TE can use to match choice values across surveys/questions.</td>\n</tr>\n<tr>\n<td>value</td>\n<td>Yes</td>\n<td>string</td>\n<td>Content of the choice.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"filtering\">Filtering</h3>\n<p>Use the 'filter=attribute_name=x,attribute_name_2=y' query to return the list of contact surveys that meet the filter criteria. For example, to filter contact surveys created between Oct. 14, 2017 17:41:01 (UTC) and Oct. 15, 2017 17:41:09 (UTC), the following query could be used:</p>\n<p>/contact-surveys?filter=internal_created_at_start=2017-10-14T17:41:01Z,internal_created_at_end=2017-10-15T17:41:09Z</p>\n<p>The supported filter attributes are shown in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>internal_created_at_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>internal_created_at_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>survey_name</td>\n<td>Name of the survey.</td>\n</tr>\n<tr>\n<td>version</td>\n<td>Survey's version.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"54043eca-709f-4aa6-ae5a-cf27182c6a41","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"84647ef4-e5aa-42ac-bd58-9c4567f4fe02","type":"text/javascript","exec":[""]}}],"_postman_id":"7b449914-780f-4d14-a912-010d431fa25e"},{"name":"Contact Survey Responses","item":[{"name":"Get Contact Survey Response","id":"79cfa4a8-fddc-475f-a026-9d294ddc901b","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":"{{external_api_host}}/v1/contact-survey-responses/{{contact_survey_response_id}}","description":"<p>Fetch a specific survey response specified by ID.</p>\n","urlObject":{"path":["v1","contact-survey-responses","{{contact_survey_response_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"a5e359ce-167b-47ce-8f58-35b41ab50fbd","name":"Get Contact Survey Response","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{external_api_host}}/v1/contact-survey-responses/{{contact_survey_response_id}}","host":["{{external_api_host}}"],"path":["v1","contact-survey-responses","{{contact_survey_response_id}}"],"query":[{"key":"","value":"","type":"text"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"fe20e62940c8a6fb\",\n    \"internal_created_at\": \"2018-10-23 21:10:27\",\n    \"contact\": {\n        \"id\": 4\n    },\n    \"question_responses\": [\n        {\n            \"response_value\": \"265000\",\n            \"question\": {\n                \"data_type\": \"decimal\",\n                \"id\": \"f8781f1a6d2f3ab5\",\n                \"question_text\": \"What is your maximum price range?\",\n                \"sort_order\": \"1\",\n                \"system_name\": \"max_price\"\n            }\n        },\n        {\n            \"response_value\": \"Nope\",\n            \"question\": {\n                \"data_type\": \"choice\",\n                \"id\": \"e68569b18b191912\",\n                \"question_text\": \"Are granite countertops a must?\",\n                \"sort_order\": \"2\",\n                \"system_name\": \"granite_tops\",\n                \"possible_choice_answers\": [\n                    {\n                        \"sort_order\": \"0\",\n                        \"system_name\": \"no\",\n                        \"value\": \"Nope\"\n                    },\n                    {\n                        \"sort_order\": \"0\",\n                        \"system_name\": \"yes\",\n                        \"value\": \"Absolutely!\"\n                    }\n                ]\n            }\n        },\n        {\n            \"response_value\": \"Look forward to working with you!\",\n            \"question\": {\n                \"data_type\": \"text\",\n                \"id\": \"7d06643723812637\",\n                \"question_text\": \"Any additional information you would like to leave?\",\n                \"sort_order\": \"3\",\n                \"system_name\": \"comments\"\n            }\n        }\n    ]\n}"}],"_postman_id":"79cfa4a8-fddc-475f-a026-9d294ddc901b"},{"name":"Get Contact Survey Responses","id":"a4b52c6b-97c7-4fa8-969f-995ee85ca8f3","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":"{{external_api_host}}/v1/contact-survey-responses?page[number]=1&page[size]=10","description":"<p>Fetch a page of survey responses. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","contact-survey-responses"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"a4b52c6b-97c7-4fa8-969f-995ee85ca8f3"},{"name":"Create Contact Survey Response (As User)","id":"e498f48d-05ed-48d5-9510-8c1e0a5c52e2","request":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{access_token}}"},{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"contact\": {\r\n\t\t\"id\": 4\r\n\t},\r\n\t\"survey\": {\r\n\t\t\"id\": \"69003b93703638cf\"\r\n\t},\r\n\t\"question_responses\": [\r\n\t\t{\r\n\t\t\t\"question\": {\r\n\t\t\t  \"id\": \"f8781f1a6d2f3ab5\"\r\n\t\t\t},\r\n\t\t\t\"response_value\": \"265000\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"question\": {\r\n\t\t\t\t\"id\": \"e68569b18b191912\"\r\n\t\t\t},\r\n\t\t\t\"response_value\": \"Nope\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"question\": {\r\n\t\t\t\t\"id\": \"7d06643723812637\"\r\n\t\t\t},\r\n\t\t\t\"response_value\": \"Look forward to working with you!\"\r\n\t\t}\r\n\t]\r\n}"},"url":"{{external_api_host}}/v1/contact-survey-responses","description":"<p>Create a response to a survey. Once created, responses may not be modified.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>question_responses</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>survey</li>\n<li>contact</li>\n</ul>\n","urlObject":{"path":["v1","contact-survey-responses"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"42f4b24e-3633-4fc5-996b-1e86a9249f7d","name":"Create Contact Survey Response","originalRequest":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{access_token}}"},{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"contact\": {\r\n\t\t\"id\": 4\r\n\t},\r\n\t\"survey\": {\r\n\t\t\"id\": \"69003b93703638cf\"\r\n\t},\r\n\t\"question_responses\": [\r\n\t\t{\r\n\t\t\t\"question\": {\r\n\t\t\t  \"id\": \"f8781f1a6d2f3ab5\"\r\n\t\t\t},\r\n\t\t\t\"response_value\": \"265000\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"question\": {\r\n\t\t\t\t\"id\": \"e68569b18b191912\"\r\n\t\t\t},\r\n\t\t\t\"response_value\": \"Nope\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"question\": {\r\n\t\t\t\t\"id\": \"7d06643723812637\"\r\n\t\t\t},\r\n\t\t\t\"response_value\": \"Look forward to working with you!\"\r\n\t\t}\r\n\t]\r\n}"},"url":"{{external_api_host}}/v1/contact-survey-responses"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"created\": \"public.totalexpert.net/v1/contact-survey-responses/192c0803946dab25\",\n    \"id\": \"192c0803946dab25\"\n}"},{"id":"4180a1ef-5807-4af3-8c77-668558b64b0c","name":"Unknown contact","originalRequest":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{access_token}}"},{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"contact\": {\r\n\t\t\"id\": 600\r\n\t},\r\n\t\"survey\": {\r\n\t\t\"id\": \"69003b93703638cf\"\r\n\t},\r\n\t\"question_responses\": [\r\n\t\t{\r\n\t\t\t\"question\": {\r\n\t\t\t  \"id\": \"f8781f1a6d2f3ab5\"\r\n\t\t\t},\r\n\t\t\t\"response_value\": \"265000\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"question\": {\r\n\t\t\t\t\"id\": \"e68569b18b191912\"\r\n\t\t\t},\r\n\t\t\t\"response_value\": \"Nope\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"question\": {\r\n\t\t\t\t\"id\": \"7d06643723812637\"\r\n\t\t\t},\r\n\t\t\t\"response_value\": \"Look forward to working with you!\"\r\n\t\t}\r\n\t]\r\n}"},"url":"{{external_api_host}}/v1/contact-survey-responses"},"status":"Unprocessable Entity (WebDAV) (RFC 4918)","code":422,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Unable to find target for relationship: 'contact'\"\n}"}],"_postman_id":"e498f48d-05ed-48d5-9510-8c1e0a5c52e2"},{"name":"Create Contact Survey Response (As Admin)","id":"a59b27e6-2ecd-453e-9298-f6038bc98392","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{access_token}}"},{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"contact\": {\n        \"id\": 4\n    },\n    \"survey\": {\n        \"id\": \"69003b93703638cf\"\n    },\n    \"owner\": {\n        \"external_id\": \"userExternal1\"\n    },\n    \"question_responses\": [\n        {\n            \"question\": {\n                \"id\": \"f8781f1a6d2f3ab5\"\n            },\n            \"response_value\": \"265000\"\n        },\n        {\n            \"question\": {\n                \"id\": \"e68569b18b191912\"\n            },\n            \"response_value\": \"Nope\"\n        },\n        {\n            \"question\": {\n                \"id\": \"7d06643723812637\"\n            },\n            \"response_value\": \"Look forward to working with you!\"\n        }\n    ]\n}"},"url":"{{external_api_host}}/v1/contact-survey-responses","description":"<p>Create a response to a survey. Once created, responses may not be modified.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>question_responses</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>survey</li>\n<li>contact</li>\n<li>owner</li>\n</ul>\n","urlObject":{"path":["v1","contact-survey-responses"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"145b45b6-84f0-44fa-98db-29a890b57261","name":"Create Contact Survey Response","originalRequest":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{access_token}}"},{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"contact\": {\r\n\t\t\"id\": 4\r\n\t},\r\n\t\"survey\": {\r\n\t\t\"id\": \"69003b93703638cf\"\r\n\t},\r\n\t\"question_responses\": [\r\n\t\t{\r\n\t\t\t\"question\": {\r\n\t\t\t  \"id\": \"f8781f1a6d2f3ab5\"\r\n\t\t\t},\r\n\t\t\t\"response_value\": \"265000\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"question\": {\r\n\t\t\t\t\"id\": \"e68569b18b191912\"\r\n\t\t\t},\r\n\t\t\t\"response_value\": \"Nope\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"question\": {\r\n\t\t\t\t\"id\": \"7d06643723812637\"\r\n\t\t\t},\r\n\t\t\t\"response_value\": \"Look forward to working with you!\"\r\n\t\t}\r\n\t]\r\n}"},"url":"{{external_api_host}}/v1/contact-survey-responses"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"created\": \"public.totalexpert.net/v1/contact-survey-responses/192c0803946dab25\",\n    \"id\": \"192c0803946dab25\"\n}"},{"id":"7c1c4d20-a4e1-45a6-b38a-12fb61c61aa5","name":"Unknown contact","originalRequest":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{access_token}}"},{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"contact\": {\r\n\t\t\"id\": 600\r\n\t},\r\n\t\"survey\": {\r\n\t\t\"id\": \"69003b93703638cf\"\r\n\t},\r\n\t\"question_responses\": [\r\n\t\t{\r\n\t\t\t\"question\": {\r\n\t\t\t  \"id\": \"f8781f1a6d2f3ab5\"\r\n\t\t\t},\r\n\t\t\t\"response_value\": \"265000\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"question\": {\r\n\t\t\t\t\"id\": \"e68569b18b191912\"\r\n\t\t\t},\r\n\t\t\t\"response_value\": \"Nope\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"question\": {\r\n\t\t\t\t\"id\": \"7d06643723812637\"\r\n\t\t\t},\r\n\t\t\t\"response_value\": \"Look forward to working with you!\"\r\n\t\t}\r\n\t]\r\n}"},"url":"{{external_api_host}}/v1/contact-survey-responses"},"status":"Unprocessable Entity (WebDAV) (RFC 4918)","code":422,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Unable to find target for relationship: 'contact'\"\n}"}],"_postman_id":"a59b27e6-2ecd-453e-9298-f6038bc98392"}],"id":"5474dd9a-9c5e-407d-94a8-c5b4f5b46a5c","description":"<p>Endpoints for interacting with the contact survey responses resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>string</td>\n<td>Generated identifier for survey response.</td>\n</tr>\n<tr>\n<td>internal_created_at</td>\n<td>No</td>\n<td>string</td>\n<td>Date of creation of this survey in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>question_responses</td>\n<td>Yes</td>\n<td>object</td>\n<td>Collection of question responses. See the \"Contact Survey Question Response Attributes\" table for available attributes.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"contact-survey-question-response-attributes\">Contact Survey Question Response Attributes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>response_value</td>\n<td>Yes</td>\n<td>string</td>\n<td>Value entered in response to question. If this is a response to a 'choice' question this value must be one of the configured 'possible_choice_answers'.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"relationships\">Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>owner</td>\n<td>Yes*</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>Owning user of the contact. One to many relationship, so returned as an object. *Only assignable/visible if authenticated as an organization admin.</td>\n</tr>\n<tr>\n<td>contact</td>\n<td>Yes</td>\n<td>Contact</td>\n<td>See contact documentation for uniqueness options.</td>\n<td>Contact who provided these responses. One to many relationship, so returned as an object. Contact must already exist in the system.</td>\n</tr>\n<tr>\n<td>survey</td>\n<td>Yes</td>\n<td>Contact Survey</td>\n<td>id</td>\n<td>Survey that this is a response to. Returned as an object. Survey must already exist in the system.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"54043eca-709f-4aa6-ae5a-cf27182c6a41","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"84647ef4-e5aa-42ac-bd58-9c4567f4fe02","type":"text/javascript","exec":[""]}}],"_postman_id":"5474dd9a-9c5e-407d-94a8-c5b4f5b46a5c"},{"name":"Contact Notes","item":[{"name":"Fetch Contact Note","id":"df5d790c-6c9a-a8a8-62bf-e022dbee1791","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{external_api_host}}/v1/contact-notes/{{contact_note_id}}","description":"<p>Fetch a contact notes by ID.</p>\n","urlObject":{"path":["v1","contact-notes","{{contact_note_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"e6df4cf8-781d-4b83-b040-3ea1c3beafcf","name":"Fetch Contact Note","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/contact-notes/14"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"id\": 14,\n    \"note\": \"My Note Content2\",\n    \"title\": \"My Title2\",\n    \"type_id\": \"2\",\n    \"contact\": {\n        \"id\": 65489\n    },\n    \"owner\": {\n        \"email\": \"ted@example.com\",\n        \"external_id\": \"userExternal1\",\n        \"id\": 65412,\n        \"username\": \"ted-example\"\n    }\n}"}],"_postman_id":"df5d790c-6c9a-a8a8-62bf-e022dbee1791"},{"name":"Fetch Contact Notes","id":"2733186e-20e1-cdb1-a125-2c55d9b1679b","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{external_api_host}}/v1/contact-notes?page[number]=1&page[size]=10","description":"<p>Fetch a page of contact notes. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","contact-notes"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[{"id":"b8a701a3-171e-4017-a634-a875274f4359","name":"Fetch Contact Notes (as User)","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":{"raw":"{{external_api_host}}/v1/contact-notes?page[number]=1&page[size]=10","host":["{{external_api_host}}"],"path":["v1","contact-notes"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}]}},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"items\": [\r\n        {\r\n            \"id\": 1,\r\n            \"note\": \"Additional information pending\",\r\n            \"title\": \"Contact info\",\r\n            \"type_id\": \"1\",\r\n            \"contact\": {\r\n                \"id\": 45613\r\n            }\r\n        },\r\n        {\r\n            \"id\": 2,\r\n            \"note\": \"This is a note with a link https://www.totalexpert.com\",\r\n            \"title\": \"Link note\",\r\n            \"type_id\": \"1\",\r\n            \"contact\": {\r\n                \"id\": 65548\r\n            }\r\n        },\r\n        {\r\n            \"id\": 3,\r\n            \"note\": \"This needs attention\",\r\n            \"title\": \"Contact update success\",\r\n            \"type_id\": \"2\",\r\n            \"contact\": {\r\n                \"id\": 65548\r\n            }\r\n        },\r\n        {\r\n            \"id\": 4,\r\n            \"note\": \"Failed to push contact\",\r\n            \"title\": \"Integration Note\",\r\n            \"type_id\": \"2\",\r\n            \"contact\": {\r\n                \"id\": 65548\r\n            }\r\n        }\r\n    ],\r\n    \"links\": {\r\n        \"first\": 1,\r\n        \"last\": 1,\r\n        \"next\": null,\r\n        \"prev\": null\r\n    }\r\n}"},{"id":"6c7f3234-ebf4-4377-94eb-454e357ce69b","name":"Fetch Contact Notes (as Admin)","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":{"raw":"{{external_api_host}}/v1/contact-notes?page[number]=1&page[size]=10","host":["{{external_api_host}}"],"path":["v1","contact-notes"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"items\": [\n        {\n            \"id\": 1,\n            \"note\": \"Additional information pending\",\n            \"title\": \"Contact info\",\n            \"type_id\": \"1\",\n            \"contact\": {\n                \"id\": 45613\n            },\n            \"owner\": {\n                \"email\": \"ted@example.com\",\n                \"external_id\": \"userExternal1\",\n                \"id\": 65412,\n                \"username\": \"ted-example\"\n            }\n        },\n        {\n            \"id\": 2,\n            \"note\": \"This is a note with a link https://www.totalexpert.com\",\n            \"title\": \"Link note\",\n            \"type_id\": \"1\",\n            \"contact\": {\n                \"id\": 65548\n            },\n            \"owner\": {\n                \"email\": \"ted@example.com\",\n                \"external_id\": \"userExternal1\",\n                \"id\": 65412,\n                \"username\": \"ted-example\"\n            }\n        },\n        {\n            \"id\": 3,\n            \"note\": \"This needs attention\",\n            \"title\": \"Contact update success\",\n            \"type_id\": \"2\",\n            \"owner\": {\n                \"email\": \"ted@example.com\",\n                \"external_id\": \"userExternal1\",\n                \"id\": 65412,\n                \"username\": \"ted-example\"\n            }\n        },\n        {\n            \"id\": 4,\n            \"note\": \"Failed to push contact\",\n            \"title\": \"Integration Note\",\n            \"type_id\": \"2\",\n            \"owner\": {\n                \"email\": \"ted@example.com\",\n                \"external_id\": \"userExternal1\",\n                \"id\": 65412,\n                \"username\": \"ted-example\"\n            }\n        }\n    ],\n    \"links\": {\n        \"first\": 1,\n        \"last\": 1,\n        \"next\": null,\n        \"prev\": null\n    }\n}"}],"_postman_id":"2733186e-20e1-cdb1-a125-2c55d9b1679b"},{"name":"Create Contact Note (as User)","event":[{"listen":"test","script":{"id":"e3bee73e-c6b4-4213-9533-4348175929f2","type":"text/javascript","exec":[""]}}],"id":"a1283d5c-4f32-f5e7-5f5a-003dab781a32","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"My Title\",\n  \"note\": \"My Note Content:<br/>It includes linebreaks <sup>superscripts</sup>, <sub>subscripts</sub>, and even <em>italicized text!!</em>\",\n  \"type_id\": 1,\n  \"contact\": {\n  \"first_name\":\"Clark\",\n  \"last_name\":\"Gable2\",\n  \"email\":\"me@you2.com\",\n  \"source\":\"local\"\n  },\n  \"outcome\": {\n    \"outcome_id\": 1\n  }\n}"},"url":"{{external_api_host}}/v1/contact-notes","description":"<p>Create a contact note.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>title</li>\n<li>note</li>\n<li>type_id</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>contact</li>\n</ul>\n","urlObject":{"path":["v1","contact-notes"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"025151c5-99d6-4e2f-a712-9f5447bd04dd","name":"Create Contact Note (as User)","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"My Title\",\n  \"note\": \"My Note Content:<br/>It includes linebreaks <sup>superscripts</sup>, <sub>subscripts</sub>, and even <em>italicized text!!</em>\",\n  \"type_id\": 1,\n  \"contact\": {\n  \"first_name\":\"Clark\",\n  \"last_name\":\"Gable2\",\n  \"email\":\"me@you2.com\",\n  \"source\":\"local\"\n  }\n}"},"url":"{{external_api_host}}/v1/contact-notes"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"created\": \"{external_api_host}/v1/contact-notes/14\",\n    \"id\": 14\n}"},{"id":"b641c8df-bb11-4bd2-99e7-3a80a983b1dd","name":"Contact not found","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"My Title\",\n  \"note\": \"My Note Content:<br/>It includes linebreaks <sup>superscripts</sup>, <sub>subscripts</sub>, and even <em>italicized text!!</em>\",\n  \"type_id\": 1,\n  \"contact\": {\n  \"first_name\":\"Clark\",\n  \"last_name\":\"Gable2\",\n  \"email\":\"me@you2.com\",\n  \"source\":\"local\"\n  }\n}"},"url":"{{external_api_host}}/v1/contact-notes"},"status":"Unprocessable Entity (WebDAV) (RFC 4918)","code":422,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Unable to find target for relationship: 'contact'\"\n}"}],"_postman_id":"a1283d5c-4f32-f5e7-5f5a-003dab781a32"},{"name":"Create Contact Note (as Admin)","event":[{"listen":"test","script":{"id":"c40919d0-37fe-4f22-b582-8e82ee9e473e","type":"text/javascript","exec":[""]}}],"id":"d59406dd-74cb-edaf-93b7-c5909a60e0da","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"My Title\",\n  \"note\": \"My Note Content:<br/>It includes linebreaks <sup>superscripts</sup>, <sub>subscripts</sub>, and even <em>italicized text!!</em>\",\n  \"type_id\": 1,\n  \"contact\": {\n    \"first_name\":\"Clark\",\n  \"last_name\":\"Gable\",\n  \"email\":\"me@you2.com\",\n  \"source\":\"local\"\n  },\n  \"owner\": {\n    \"username\":\"ted\"\n  },\n  \"outcome\": {\n    \"outcome_id\": 1\n  }\n}"},"url":"{{external_api_host}}/v1/contact-notes","description":"<p>Create a contact note.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>title</li>\n<li>note</li>\n<li>type_id</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>contact</li>\n<li>owner</li>\n</ul>\n","urlObject":{"path":["v1","contact-notes"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"8262f4ce-4abc-4ed1-ad91-65280482f7b7","name":"Create Contact Note (as Admin)","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"My Title\",\n  \"note\": \"My Note Content:<br/>It includes linebreaks <sup>superscripts</sup>, <sub>subscripts</sub>, and even <em>italicized text!!</em>\",\n  \"type_id\": 1,\n  \"contact\": {\n    \"first_name\":\"Clark\",\n  \"last_name\":\"Gable\",\n  \"email\":\"me@you2.com\",\n  \"source\":\"local\"\n  },\n  \"owner\": {\n    \"username\":\"ted\"\n  }\n}"},"url":"{{external_api_host}}/v1/contact-notes"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"created\": \"{external_api_host}/v1/contact-notes/14\",\n    \"id\": 14\n}"}],"_postman_id":"d59406dd-74cb-edaf-93b7-c5909a60e0da"},{"name":"Update Contact Note","id":"3dca2409-614d-1fa8-3a12-27448ce52f93","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"My Title2\",\n  \"note\": \"My Note Content2\",\n  \"type_id\": 2,\n  \"contact\": {\n  \"first_name\":\"Clark\",\n  \"last_name\":\"Gable\",\n  \"email\":\"me@you.com\",\n  \"source\":\"local\"\n  }\n}"},"url":"{{external_api_host}}/v1/contact-notes/{{contact_note_id}}","description":"<p>Update an existing contact note by ID.</p>\n","urlObject":{"path":["v1","contact-notes","{{contact_note_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"baa4cc3a-6c8f-4c20-a364-4f11ce34c30b","name":"Update Contact Note","originalRequest":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"My Title2\",\n  \"note\": \"My Note Content2\",\n  \"type_id\": 2,\n  \"contact\": {\n  \"first_name\":\"Clark\",\n  \"last_name\":\"Gable\",\n  \"email\":\"me@you.com\",\n  \"source\":\"local\"\n  }\n}"},"url":"{{external_api_host}}/v1/contact-notes/{{contact_note_id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[]"}],"_postman_id":"3dca2409-614d-1fa8-3a12-27448ce52f93"},{"name":"Delete Contact Note","id":"494f6648-0e49-ec35-5b3c-17592158364a","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/contact-notes/{{contact_note_id}}","description":"<p>Deletes a contact note by ID.</p>\n","urlObject":{"path":["v1","contact-notes","{{contact_note_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"04f0fa85-e5c0-4874-a74f-3f3e68a65485","name":"Delete Contact Note","originalRequest":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/contact-notes/{{contact_note_id}}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"[]"}],"_postman_id":"494f6648-0e49-ec35-5b3c-17592158364a"}],"id":"656ac0e1-0469-f286-8999-732020655417","description":"<p>Endpoints for interacting with the contact notes resource.</p>\n<p>Before creating a contact note, the contact must exist and be owned by the user specified before being created.</p>\n<ul>\n<li><p>If including contact information when creating the note, the contact information must match exactly.</p>\n</li>\n<li><p>Contact information cannot be created or edited through Contact Note endpoints.</p>\n</li>\n<li><p>Delay sending your contact note POST until after you have received a successful create contact response if you are creating a contact note upon initial submission of a new contact.</p>\n</li>\n<li><p>Deduplication does not apply. Existing Contact Note cannot be edited through the Create (POST) endpoint. Update (PATCH) endpoint must be used to edit any existing notes and the contact_note_id must be passed.</p>\n</li>\n</ul>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Generated identifier for contact group.</td>\n</tr>\n<tr>\n<td>title</td>\n<td>Yes</td>\n<td>string</td>\n<td>Note title.</td>\n</tr>\n<tr>\n<td>note</td>\n<td>Yes</td>\n<td>string</td>\n<td>The content of the note. May contain HTML formatting.</td>\n</tr>\n<tr>\n<td>type_id</td>\n<td>Yes</td>\n<td>numeric</td>\n<td>A type ID. See table below for details.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"uniqueness\">Uniqueness</h5>\n<p>Notes are not uniquely identifiable except by TE id. Deduplication does not apply.</p>\n<hr />\n<h5 id=\"relationships\">Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>contact</td>\n<td>Yes</td>\n<td>Contact</td>\n<td>See contact documentation for uniqueness options.</td>\n<td>Contact for this note. One to many relationship, so returned as an object.</td>\n</tr>\n<tr>\n<td>owner</td>\n<td>Yes*</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>Owning user of the contact note. One to many relationship, so returned as an object. *Only assignable/visible if authenticated as an organization admin.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"special-postpatch-relationships\">Special POST/PATCH relationships</h5>\n<p>These relationships are used to manipulate the contact/note but are neither note attributes nor bona fide relationships. These attributes will not appear in responses.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th><strong>Settable Fields</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>outcome</td>\n<td>Outcome</td>\n<td>outcome_id</td>\n<td>Outcome for contact set by this note. Can trigger journeys depending on journey configuration.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"type-ids\">Type IDs</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>ID</th>\n<th>Note Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>General Note</td>\n</tr>\n<tr>\n<td>2</td>\n<td>Task</td>\n</tr>\n<tr>\n<td>3</td>\n<td>Email Opened</td>\n</tr>\n<tr>\n<td>4</td>\n<td>Email Sent</td>\n</tr>\n<tr>\n<td>5</td>\n<td>Prequalification</td>\n</tr>\n<tr>\n<td>6</td>\n<td>Message Received</td>\n</tr>\n<tr>\n<td>7</td>\n<td>Contacted</td>\n</tr>\n<tr>\n<td>8</td>\n<td>Welcome Email Sent</td>\n</tr>\n<tr>\n<td>9</td>\n<td>SMS Sent</td>\n</tr>\n<tr>\n<td>10</td>\n<td>SMS Received</td>\n</tr>\n<tr>\n<td>11</td>\n<td>Email Delivered</td>\n</tr>\n<tr>\n<td>12</td>\n<td>Email Unsubscribed</td>\n</tr>\n<tr>\n<td>13</td>\n<td>Email Delivery Failure</td>\n</tr>\n<tr>\n<td>14</td>\n<td>Email Link Clicked</td>\n</tr>\n<tr>\n<td>15</td>\n<td>Print Material Sent</td>\n</tr>\n<tr>\n<td>16</td>\n<td>Open House Registration</td>\n</tr>\n<tr>\n<td>17</td>\n<td>Event Registration</td>\n</tr>\n<tr>\n<td>18</td>\n<td>Contact Assigned</td>\n</tr>\n<tr>\n<td>19</td>\n<td>Contact Passed</td>\n</tr>\n<tr>\n<td>20</td>\n<td>Contact Shared</td>\n</tr>\n<tr>\n<td>21</td>\n<td>Drip Campaign Ended</td>\n</tr>\n<tr>\n<td>22</td>\n<td>Spam Complaint</td>\n</tr>\n<tr>\n<td>23</td>\n<td>Drip Campaign Added</td>\n</tr>\n<tr>\n<td>24</td>\n<td>Contact Accepted</td>\n</tr>\n<tr>\n<td>25</td>\n<td>Appointment Scheduled</td>\n</tr>\n<tr>\n<td>26</td>\n<td>Transaction Scheduled</td>\n</tr>\n<tr>\n<td>27</td>\n<td>Drip Campaign Deleted</td>\n</tr>\n<tr>\n<td>28</td>\n<td>Listing Alert Sent</td>\n</tr>\n<tr>\n<td>29</td>\n<td>Drip Campaign Email Sent</td>\n</tr>\n<tr>\n<td>30</td>\n<td>Connection Invite Sent</td>\n</tr>\n<tr>\n<td>31</td>\n<td>Auto Campaign Email Sent</td>\n</tr>\n<tr>\n<td>32</td>\n<td>Movement Registration</td>\n</tr>\n<tr>\n<td>33</td>\n<td>Auto Campaign Print Order Sent</td>\n</tr>\n<tr>\n<td>34</td>\n<td>Task Complete Email Sent</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"filtering\">Filtering</h3>\n<p>Use the 'filter=attribute_name=x,attribute_name_2=y' query to return the list of contact notes that meet the filter criteria. For example, to filter contact notes created between Oct. 14, 2017 17:41:01 (UTC) and Oct. 15, 2017 17:41:09 (UTC), the following query could be used:</p>\n<p>/contact-notes?filter=created_on_start=2017-10-14T17:41:01Z,created_on_end=2017-10-15T17:41:09Z</p>\n<p>The supported filter attributes are shown in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>created_on_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>created_on_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>title</td>\n<td>Note title.</td>\n</tr>\n<tr>\n<td>notes</td>\n<td>The content of the note.</td>\n</tr>\n<tr>\n<td>is_private</td>\n<td>Indicator if notes are private</td>\n</tr>\n<tr>\n<td>type_id</td>\n<td>A numeric type ID for contact note.</td>\n</tr>\n<tr>\n<td>title_contains</td>\n<td>Title of contact notes contains</td>\n</tr>\n<tr>\n<td>notes_contains</td>\n<td>Contents of the note contains.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"42be8e21-a437-4dc4-9440-f35343e20acc","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"ad58f764-6e88-4c4e-8e3e-1eba0a1a7bcc","type":"text/javascript","exec":[""]}}],"_postman_id":"656ac0e1-0469-f286-8999-732020655417"},{"name":"Contact Recruiting Endpoints","item":[{"name":"Contacts - Recruits","item":[{"name":"Fetch Contact Recruit","id":"39166f9c-ca18-4713-8d12-0801f446189a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/contact-recruits/{{contact_id}}","description":"<p>Fetch a specific contact specified by ID.</p>\n","urlObject":{"path":["v1","contact-recruits","{{contact_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"d2d84d0e-38b0-4a1c-99b8-9d9d8c3ac529","name":"Fetch Contact Recruit","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/contact-recruits/{{contact_id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"address\": \"1234 Bermuda St\",\n    \"address_2\": \"Apt. 3\",\n    \"birthday\": \"1900-01-01\",\n    \"city\": \"Pleasantville\",\n    \"classification\": \"\",\n    \"close_date\": null,\n    \"creation_date\": \"2017-01-01 11:11:11\",\n    \"credit_score\": null,\n    \"credit_score_date\": null,\n    \"credit_score_expiration_date\": null,\n    \"email\": \"jlsmith@example.com\",\n    \"email_work\": \"jlsmith@otherlender.com\",\n    \"employer_address\": \"1235 Fake Ave.\",\n    \"employer_address_2\": \"Ste 5\",\n    \"employer_city\": \"Unpleasantville\",\n    \"employer_license_number\": null,\n    \"employer_name\": \"Other Lender LLC\",\n    \"employer_state\": \"WI\",\n    \"employer_zip\": \"54321\",\n    \"external_id\": \"101010\",\n    \"fax\": null,\n    \"first_name\": \"Jane\",\n    \"id\": 520,\n    \"internal_created_at\": \"2019-03-21 18:10:48\",\n    \"internal_updated_at\": \"2019-03-21 18:10:48\",\n    \"last_contacted_date\": \"2017-01-01 12:12:12\",\n    \"last_modified_date\": null,\n    \"last_name\": \"Smith\",\n    \"license_number\": \"Q10101010101011\",\n    \"linkedin_url\": null,\n    \"list_date\": null,\n    \"nickname\": null,\n    \"ok_to_call\": false,\n    \"ok_to_email\": false,\n    \"ok_to_mail\": false,\n    \"other_url\": null,\n    \"phone_cell\": \"(763)555-0123\",\n    \"phone_home\": \"(612)-555-0123\",\n    \"phone_office\": \"(763)555-1234\",\n    \"pre_approval_issued_date\": null,\n    \"referred_by\": \"\",\n    \"referred_to\": \"\",\n    \"source\": \"Recruit Intake System\",\n    \"state\": \"MN\",\n    \"suffix\": null,\n    \"title\": \"Ms.\",\n    \"website_url\": null,\n    \"zip_code\": \"12345\",\n    \"contact_groups\": [\n        {\n            \"group_name\": \"Recruit - Hot\",\n            \"id\": 15\n        }\n    ],\n    \"external_ids\": [\n        {\n            \"external_id\": \"abcd\",\n            \"source\": \"Other Recruit Intake System\"\n        },\n        {\n            \"external_id\": \"101010\",\n            \"source\": \"Recruit Intake System\"\n        }\n    ],\n    \"external_status\": {\n        \"status_name\": \"Processing\"\n    },\n    \"owner\": {\n        \"email\": \"john@example.com\",\n        \"external_id\": \"userExternal1\",\n        \"id\": 57,\n        \"username\": \"john-example\"\n    },\n    \"preferences\": {\n        \"is_silenced\": true\n    },\n    \"recruit_info\": {\n        \"background\": \"Jane started as a loan officer...\",\n        \"commission_cap\": \"26002\",\n        \"commission_split\": \"50%\",\n        \"corporate_objective\": \"1\",\n        \"has_resume\": true,\n        \"nmls_id\": \"NMLS identifier\",\n        \"resume_url\": \"http:/jlsmith.lender.com/resume\",\n        \"sourced_percentage\": \"10\",\n        \"ust_is_complete\": true,\n        \"years_experience\": \"6\",\n        \"branch_manager\": {\n            \"email\": \"glen@lender.com\",\n            \"external_id\": \"\",\n            \"id\": 53,\n            \"username\": \"glen-lender\"\n        },\n        \"division_manager\": {\n            \"email\": \"suzy@lender.com\",\n            \"external_id\": \"\",\n            \"id\": 53,\n            \"username\": \"suzy-lender\"\n        },\n        \"recruit_status\": {\n            \"status_name\": \"Active\"\n        },\n        \"regional_manager\": {\n            \"email\": \"richard@lender.com\",\n            \"external_id\": \"\",\n            \"id\": 53,\n            \"username\": \"richard-lender\"\n        }\n    },\n    \"recruit_metrics\": [\n        {\n            \"on_date\": null,\n            \"value\": \"30\",\n            \"metric\": {\n                \"metric_name\": \"Builders\",\n                \"metric_type\": \"business_source\"\n            },\n            \"unit\": {\n                \"unit_name\": \"percent\"\n            }\n        },\n        {\n            \"on_date\": null,\n            \"value\": \"40\",\n            \"metric\": {\n                \"metric_name\": \"Realtors\",\n                \"metric_type\": \"business_source\"\n            },\n            \"unit\": {\n                \"unit_name\": \"percent\"\n            }\n        },\n        {\n            \"on_date\": \"2018-01-01 00:00:00\",\n            \"value\": \"10123\",\n            \"metric\": {\n                \"metric_name\": \"Sales Production\",\n                \"metric_type\": \"sales_production\"\n            },\n            \"unit\": {\n                \"unit_name\": \"dollars\"\n            }\n        }\n    ],\n    \"state_licenses\": [\n        {\n            \"state_name\": \"MN\"\n        },\n        {\n            \"state_name\": \"KS\"\n        }\n    ]\n}"}],"_postman_id":"39166f9c-ca18-4713-8d12-0801f446189a"},{"name":"Fetch Contact Recruits","id":"f031ec5a-5ff1-45cc-8d48-00ca55414033","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/contact-recruits?page[number]=1&page[size]=10","description":"<p>Fetch a page of contacts. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","contact-recruits"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[{"id":"e601dddd-cbff-410f-8bc0-54834814367a","name":"Fetch Contact Recruits","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":{"raw":"{{external_api_host}}/v1/contact-recruits?page[number]=1&page[size]=10","host":["{{external_api_host}}"],"path":["v1","contact-recruits"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"items\": [\n        {\n            \"address\": \"1234 Bermuda St\",\n            \"address_2\": \"Apt. 3\",\n            \"birthday\": \"1900-01-01\",\n            \"city\": \"Pleasantville\",\n            \"classification\": \"\",\n            \"close_date\": null,\n            \"creation_date\": \"2017-01-01 11:11:11\",\n            \"credit_score\": null,\n            \"credit_score_date\": null,\n            \"credit_score_expiration_date\": null,\n            \"email\": \"jlsmith@example.com\",\n            \"email_work\": \"jlsmith@otherlender.com\",\n            \"employer_address\": \"1235 Fake Ave.\",\n            \"employer_address_2\": \"Ste 5\",\n            \"employer_city\": \"Unpleasantville\",\n            \"employer_license_number\": null,\n            \"employer_name\": \"Other Lender LLC\",\n            \"employer_state\": \"WI\",\n            \"employer_zip\": \"54321\",\n            \"external_id\": \"101010\",\n            \"fax\": null,\n            \"first_name\": \"Jane\",\n            \"id\": 520,\n            \"internal_created_at\": \"2019-03-21 18:10:48\",\n            \"internal_updated_at\": \"2019-03-21 18:10:48\",\n            \"last_contacted_date\": \"2017-01-01 12:12:12\",\n            \"last_modified_date\": null,\n            \"last_name\": \"Smith\",\n            \"license_number\": \"Q10101010101011\",\n            \"linkedin_url\": null,\n            \"list_date\": null,\n            \"nickname\": null,\n            \"ok_to_call\": false,\n            \"ok_to_email\": false,\n            \"ok_to_mail\": false,\n            \"other_url\": null,\n            \"phone_cell\": \"(763)555-0123\",\n            \"phone_home\": \"(612)-555-0123\",\n            \"phone_office\": \"(763)555-1234\",\n            \"pre_approval_issued_date\": null,\n            \"referred_by\": \"\",\n            \"referred_to\": \"\",\n            \"source\": \"Recruit Intake System\",\n            \"state\": \"MN\",\n            \"suffix\": null,\n            \"title\": \"Ms.\",\n            \"website_url\": null,\n            \"zip_code\": \"12345\",\n            \"contact_groups\": [\n                {\n                    \"group_name\": \"Recruit - Hot\",\n                    \"id\": 15\n                }\n            ],\n            \"external_ids\": [\n                {\n                    \"external_id\": \"abcd\",\n                    \"source\": \"Other Recruit Intake System\"\n                },\n                {\n                    \"external_id\": \"101010\",\n                    \"source\": \"Recruit Intake System\"\n                }\n            ],\n            \"external_status\": {\n                \"status_name\": \"Processing\"\n            },\n            \"owner\": {\n                \"email\": \"john@example.com\",\n                \"external_id\": \"userExternal1\",\n                \"id\": 57,\n                \"username\": \"john-example\"\n            },\n            \"preferences\": {\n                \"is_silenced\": true\n            },\n            \"recruit_info\": {\n                \"background\": \"Jane started as a loan officer...\",\n                \"commission_cap\": \"26002\",\n                \"commission_split\": \"50%\",\n                \"corporate_objective\": \"1\",\n                \"has_resume\": true,\n                \"nmls_id\": \"NMLS identifier\",\n                \"resume_url\": \"http:/jlsmith.lender.com/resume\",\n                \"sourced_percentage\": \"10\",\n                \"ust_is_complete\": true,\n                \"years_experience\": \"6\",\n                \"branch_manager\": {\n                    \"email\": \"glen@lender.com\",\n                    \"external_id\": \"\",\n                    \"id\": 53,\n                    \"username\": \"glen-lender\"\n                },\n                \"division_manager\": {\n                    \"email\": \"suzy@lender.com\",\n                    \"external_id\": \"\",\n                    \"id\": 53,\n                    \"username\": \"suzy-lender\"\n                },\n                \"recruit_status\": {\n                    \"status_name\": \"Active\"\n                },\n                \"regional_manager\": {\n                    \"email\": \"richard@lender.com\",\n                    \"external_id\": \"\",\n                    \"id\": 53,\n                    \"username\": \"richard-lender\"\n                }\n            },\n            \"recruit_metrics\": [\n                {\n                    \"on_date\": null,\n                    \"value\": \"30\",\n                    \"metric\": {\n                        \"metric_name\": \"Builders\",\n                        \"metric_type\": \"business_source\"\n                    },\n                    \"unit\": {\n                        \"unit_name\": \"percent\"\n                    }\n                },\n                {\n                    \"on_date\": null,\n                    \"value\": \"40\",\n                    \"metric\": {\n                        \"metric_name\": \"Realtors\",\n                        \"metric_type\": \"business_source\"\n                    },\n                    \"unit\": {\n                        \"unit_name\": \"percent\"\n                    }\n                },\n                {\n                    \"on_date\": \"2018-01-01 00:00:00\",\n                    \"value\": \"10123\",\n                    \"metric\": {\n                        \"metric_name\": \"Sales Production\",\n                        \"metric_type\": \"sales_production\"\n                    },\n                    \"unit\": {\n                        \"unit_name\": \"dollars\"\n                    }\n                }\n            ],\n            \"state_licenses\": [\n                {\n                    \"state_name\": \"MN\"\n                },\n                {\n                    \"state_name\": \"KS\"\n                }\n            ]\n        }\n    ],\n    \"links\": {\n        \"first\": 1,\n        \"last\": 1,\n        \"next\": null,\n        \"prev\": null\n    }\n}"}],"_postman_id":"f031ec5a-5ff1-45cc-8d48-00ca55414033"},{"name":"Create Contact Recruit (as Admin)","event":[{"listen":"test","script":{"id":"ee67e6dc-d2ae-469b-8476-c761da1dfe9f","exec":[""],"type":"text/javascript"}}],"id":"54035e57-9229-4d28-9237-994aa16a9366","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Ms.\",\n  \"first_name\": \"Jane\",\n  \"last_name\": \"Smith\",\n  \"email\": \"jlsmith@example.com\",\n  \"email_work\": \"jlsmith@otherlender.com\",\n  \"address\": \"1234 Bermuda St\",\n  \"address_2\": \"Apt. 3\",\n  \"city\": \"Pleasantville\",\n  \"state\": \"MN\",\n  \"zip_code\": \"12345\",\n  \"phone_cell\": \"(763)555-0123\",\n  \"phone_office\": \"(763)555-1234\",\n  \"phone_home\": \"(612)-555-0123\",\n  \"employer_name\": \"Other Lender LLC\",\n  \"employer_address\": \"1235 Fake Ave.\",\n  \"employer_address_2\": \"Ste 5\",\n  \"employer_city\": \"Unpleasantville\",\n  \"employer_state\": \"WI\",\n  \"employer_zip\": \"54321\",\n  \"license_number\": \"Q10101010101011\",\n  \"source\": \"Recruit Intake System\",\n  \"creation_date\": \"2017-01-01 11:11:11\",\n  \"last_contacted_date\": \"2017-01-01 12:12:12\",\n  \"external_id\": \"101010\",\n  \"birthday\": \"1970-01-01\",\n  \"ok_to_mail\": 0,\n  \"ok_to_email\": 0,\n  \"ok_to_call\": 0,\n  \"preferences\": {\n    \"is_silenced\": true\n  },\n  \"owner\": {\n    \"external_id\": \"userExternal1\"\n  },\n  \"contact_groups\": [\n    {\n      \"group_name\": \"Recruit - Hot\"\n    }\n  ],\n  \"external_ids\": [\n    {\n      \"source\": \"Recruit Intake System\",\n      \"external_id\": \"101010\"\n    },\n    {\n      \"source\": \"Other Recruit Intake System\",\n      \"external_id\": \"abcd\"\n    }\n  ],\n  \"external_status\": {\n    \"status_name\": \"Processing\"\n  },\n  \"recruit_info\": {\n    \"nmls_id\": \"NMLS identifier\",\n    \"regional_manager\": {\n      \"username\": \"glen-lender\"\n    },\n    \"division_manager\": {\n      \"username\": \"suzy-lender\"\n    },\n    \"branch_manager\": {\n      \"username\": \"richard-lender\"\n    },\n    \"recruit_status\": {\n      \"status_name\": \"Active\"\n    },\n    \"corporate_objective\": \"2306\",\n    \"sourced_percentage\": \"10\",\n    \"commission_cap\": \"26002\",\n    \"commission_split\": \"50%\",\n    \"ust_is_complete\": true,\n    \"background\": \"Jane started as a loan officer...\",\n    \"years_experience\": 6,\n    \"has_resume\":true,\n    \"resume_url\":\"http:/jlsmith.lender.com/resume\"\n  },\n  \"state_licenses\": [\n    {\n      \"state_name\": \"minnesota\"\n    },\n    {\n      \"state_name\": \"KS\"\n    }\n  ],\n  \"recruit_metrics\": [\n    {\n      \"metric\": {\n        \"metric_name\": \"Builders\",\n        \"metric_type\": \"business_source\"\n      },\n      \"unit\": {\n        \"unit_name\": \"percent\"\n      },\n      \"value\": \"30\"\n    },\n    {\n      \"metric\": {\n        \"metric_name\": \"Realtors\",\n        \"metric_type\": \"business_source\"\n      },\n      \"unit\": {\n        \"unit_name\": \"percent\"\n      },\n      \"value\": \"40\"\n    },\n\t  {\n  \t\t\"metric\": {\n  \t\t\t\"metric_name\": \"Sales Production\",\n  \t\t\t\"metric_type\": \"sales_production\"\n  \t\t},\n  \t\t\"unit\": {\n  \t\t\t\"unit_name\": \"dollars\"\n  \t\t},\n  \t\t\"value\": \"10123\",\n  \t\t\"on_date\": \"2018\"\n  \t}\n  ]\n}"},"url":"{{external_api_host}}/v1/contact-recruits","description":"<p>Create a contact.</p>\n<p>Required Attributes (one of the following combinations):</p>\n<ul>\n<li>source, first_name, last_name, email</li>\n<li>source, first_name, last_name, phone_cell</li>\n<li>source, first_name, last_name, phone_home</li>\n<li>source, first_name, last_name, phone_office</li>\n<li>source, first_name, last_name, address, city, state, zip_code</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>owner*</li>\n</ul>\n<p>*required if authenticated as an organization admin</p>\n","urlObject":{"path":["v1","contact-recruits"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"d5b5beee-ef18-4743-a4a1-3bf2af4482ff","name":"Create Contact Recruit (as Admin)","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Ms.\",\n  \"first_name\": \"Jane\",\n  \"last_name\": \"Smith\",\n  \"email\": \"jlsmith@example.com\",\n  \"email_work\": \"jlsmith@otherlender.com\",\n  \"address\": \"1234 Bermuda St\",\n  \"address_2\": \"Apt. 3\",\n  \"city\": \"Pleasantville\",\n  \"state\": \"MN\",\n  \"zip_code\": \"12345\",\n  \"phone_cell\": \"(763)555-0123\",\n  \"phone_office\": \"(763)555-1234\",\n  \"phone_home\": \"(612)-555-0123\",\n  \"employer_name\": \"Other Lender LLC\",\n  \"employer_address\": \"1235 Fake Ave.\",\n  \"employer_address_2\": \"Ste 5\",\n  \"employer_city\": \"Unpleasantville\",\n  \"employer_state\": \"WI\",\n  \"employer_zip\": \"54321\",\n  \"license_number\": \"Q10101010101011\",\n  \"source\": \"Recruit Intake System\",\n  \"creation_date\": \"2017-01-01 11:11:11\",\n  \"last_contacted_date\": \"2017-01-01 12:12:12\",\n  \"external_id\": \"101010\",\n  \"birthday\": \"1970-01-01\",\n  \"ok_to_mail\": 0,\n  \"ok_to_email\": 0,\n  \"ok_to_call\": 0,\n  \"preferences\": {\n    \"is_silenced\": true\n  },\n  \"owner\": {\n    \"external_id\": \"userExternal1\"\n  },\n  \"contact_groups\": [\n    {\n      \"group_name\": \"Recruit - Hot\"\n    }\n  ],\n  \"external_ids\": [\n    {\n      \"source\": \"Recruit Intake System\",\n      \"external_id\": \"101010\"\n    },\n    {\n      \"source\": \"Other Recruit Intake System\",\n      \"external_id\": \"abcd\"\n    }\n  ],\n  \"external_status\": {\n    \"status_name\": \"Processing\"\n  },\n  \"recruit_info\": {\n    \"nmls_number\": \"NMLS identifier\",\n    \"regional_manager\": {\n      \"username\": \"glen-lender\"\n    },\n    \"division_manager\": {\n      \"username\": \"suzy-lender\"\n    },\n    \"branch_manager\": {\n      \"username\": \"richard-lender\"\n    },\n    \"recruit_status\": {\n      \"status_name\": \"Active\"\n    },\n    \"corporate_objective\": \"2306\",\n    \"sourced_percentage\": \"10\",\n    \"commission_cap\": \"26002\",\n    \"commission_split\": \"50%\",\n    \"ust_is_complete\": true,\n    \"background\": \"Jane started as a loan officer...\",\n    \"years_experience\": 6,\n    \"has_resume\":true,\n    \"resume_url\":\"http:/jlsmith.lender.com/resume\"\n  },\n  \"state_licenses\": [\n    {\n      \"state_name\": \"minnesota\"\n    },\n    {\n      \"state_name\": \"KS\"\n    }\n  ],\n  \"recruit_metrics\": [\n    {\n      \"metric\": {\n        \"metric_name\": \"Builders\",\n        \"metric_type\": \"business_source\"\n      },\n      \"unit\": {\n        \"unit_name\": \"percent\"\n      },\n      \"value\": \"30\"\n    },\n    {\n      \"metric\": {\n        \"metric_name\": \"Realtors\",\n        \"metric_type\": \"business_source\"\n      },\n      \"unit\": {\n        \"unit_name\": \"percent\"\n      },\n      \"value\": \"40\"\n    },\n\t  {\n  \t\t\"metric\": {\n  \t\t\t\"metric_name\": \"Sales Production\",\n  \t\t\t\"metric_type\": \"sales_production\"\n  \t\t},\n  \t\t\"unit\": {\n  \t\t\t\"unit_name\": \"dollars\"\n  \t\t},\n  \t\t\"value\": \"10123\",\n  \t\t\"on_date\": \"2018\"\n  \t}\n  ]\n}"},"url":"{{external_api_host}}/v1/contact-recruits"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"created\": \"external-api.totaldev.us/v1/contact-recruits/520\",\n    \"id\": 520\n}"},{"id":"409f9054-9a9d-4583-bdd4-7f407974fb12","name":"Insufficient Scope","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Ms.\",\n  \"first_name\": \"Jane\",\n  \"last_name\": \"Smith\",\n  \"email\": \"jlsmith@example.com\",\n  \"email_work\": \"jlsmith@otherlender.com\",\n  \"address\": \"1234 Bermuda St\",\n  \"address_2\": \"Apt. 3\",\n  \"city\": \"Pleasantville\",\n  \"state\": \"MN\",\n  \"zip_code\": \"12345\",\n  \"phone_cell\": \"(763)555-0123\",\n  \"phone_office\": \"(763)555-1234\",\n  \"phone_home\": \"(612)-555-0123\",\n  \"employer_name\": \"Other Lender LLC\",\n  \"employer_address\": \"1235 Fake Ave.\",\n  \"employer_address_2\": \"Ste 5\",\n  \"employer_city\": \"Unpleasantville\",\n  \"employer_state\": \"WI\",\n  \"employer_zip\": \"54321\",\n  \"license_number\": \"Q10101010101011\",\n  \"source\": \"Recruit Intake System\",\n  \"creation_date\": \"2017-01-01 11:11:11\",\n  \"last_contacted_date\": \"2017-01-01 12:12:12\",\n  \"external_id\": \"101010\",\n  \"birthday\": \"1970-01-01\",\n  \"ok_to_mail\": 0,\n  \"ok_to_email\": 0,\n  \"ok_to_call\": 0,\n  \"preferences\": {\n    \"is_silenced\": true\n  },\n  \"owner\": {\n    \"external_id\": \"userExternal1\"\n  },\n  \"contact_groups\": [\n    {\n      \"group_name\": \"Recruit - Hot\"\n    }\n  ],\n  \"external_ids\": [\n    {\n      \"source\": \"Recruit Intake System\",\n      \"external_id\": \"101010\"\n    },\n    {\n      \"source\": \"Other Recruit Intake System\",\n      \"external_id\": \"abcd\"\n    }\n  ],\n  \"external_status\": {\n    \"status_name\": \"Processing\"\n  },\n  \"recruit_info\": {\n    \"nmls_number\": \"NMLS identifier\",\n    \"regional_manager\": {\n      \"username\": \"glen-lender\"\n    },\n    \"division_manager\": {\n      \"username\": \"suzy-lender\"\n    },\n    \"branch_manager\": {\n      \"username\": \"richard-lender\"\n    },\n    \"recruit_status\": {\n      \"status_name\": \"Active\"\n    },\n    \"corporate_objective\": \"2306\",\n    \"sourced_percentage\": \"10\",\n    \"commission_cap\": \"26002\",\n    \"commission_split\": \"50%\",\n    \"ust_is_complete\": true,\n    \"background\": \"Jane started as a loan officer...\",\n    \"years_experience\": 6,\n    \"has_resume\":true,\n    \"resume_url\":\"http:/jlsmith.lender.com/resume\"\n  },\n  \"state_licenses\": [\n    {\n      \"state_name\": \"minnesota\"\n    },\n    {\n      \"state_name\": \"KS\"\n    }\n  ],\n  \"recruit_metrics\": [\n    {\n      \"metric\": {\n        \"metric_name\": \"Builders\",\n        \"metric_type\": \"business_source\"\n      },\n      \"unit\": {\n        \"unit_name\": \"percent\"\n      },\n      \"value\": \"30\"\n    },\n    {\n      \"metric\": {\n        \"metric_name\": \"Realtors\",\n        \"metric_type\": \"business_source\"\n      },\n      \"unit\": {\n        \"unit_name\": \"percent\"\n      },\n      \"value\": \"40\"\n    },\n\t  {\n  \t\t\"metric\": {\n  \t\t\t\"metric_name\": \"Sales Production\",\n  \t\t\t\"metric_type\": \"sales_production\"\n  \t\t},\n  \t\t\"unit\": {\n  \t\t\t\"unit_name\": \"dollars\"\n  \t\t},\n  \t\t\"value\": \"10123\",\n  \t\t\"on_date\": \"2018\"\n  \t}\n  ]\n}"},"url":"{{external_api_host}}/v1/contact-recruits"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"insufficient_scope\",\n    \"error_description\": \"The request requires higher privileges than provided by the access token\"\n}"},{"id":"15cf5a2c-a86a-4c6c-ac9c-2f7ee3978b25","name":"Update Contact Recruit (as Admin)","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Ms.\",\n  \"first_name\": \"Jane\",\n  \"last_name\": \"Smith\",\n  \"email\": \"jlsmith@example.com\",\n  \"email_work\": \"jlsmith@otherlender.com\",\n  \"address\": \"1234 Bermuda St\",\n  \"address_2\": \"Apt. 3\",\n  \"city\": \"Pleasantville\",\n  \"state\": \"MN\",\n  \"zip_code\": \"12345\",\n  \"phone_cell\": \"(763)555-0123\",\n  \"phone_office\": \"(763)555-1234\",\n  \"phone_home\": \"(612)-555-0123\",\n  \"employer_name\": \"Other Lender LLC\",\n  \"employer_address\": \"1235 Fake Ave.\",\n  \"employer_address_2\": \"Ste 5\",\n  \"employer_city\": \"Unpleasantville\",\n  \"employer_state\": \"WI\",\n  \"employer_zip\": \"54321\",\n  \"license_number\": \"Q10101010101011\",\n  \"source\": \"Recruit Intake System\",\n  \"creation_date\": \"2017-01-01 11:11:11\",\n  \"last_contacted_date\": \"2017-01-01 12:12:12\",\n  \"external_id\": \"101010\",\n  \"birthday\": \"1970-01-01\",\n  \"ok_to_mail\": 0,\n  \"ok_to_email\": 0,\n  \"ok_to_call\": 0,\n  \"preferences\": {\n    \"is_silenced\": true\n  },\n  \"owner\": {\n    \"external_id\": \"userExternal1\"\n  },\n  \"contact_groups\": [\n    {\n      \"group_name\": \"Recruit - Hot\"\n    }\n  ],\n  \"external_ids\": [\n    {\n      \"source\": \"Recruit Intake System\",\n      \"external_id\": \"101010\"\n    },\n    {\n      \"source\": \"Other Recruit Intake System\",\n      \"external_id\": \"abcd\"\n    }\n  ],\n  \"external_status\": {\n    \"status_name\": \"Processing\"\n  },\n  \"recruit_info\": {\n    \"nmls_number\": \"NMLS identifier\",\n    \"regional_manager\": {\n      \"username\": \"glen-lender\"\n    },\n    \"division_manager\": {\n      \"username\": \"suzy-lender\"\n    },\n    \"branch_manager\": {\n      \"username\": \"richard-lender\"\n    },\n    \"recruit_status\": {\n      \"status_name\": \"Active\"\n    },\n    \"corporate_objective\": \"2306\",\n    \"sourced_percentage\": \"10\",\n    \"commission_cap\": \"26002\",\n    \"commission_split\": \"50%\",\n    \"ust_is_complete\": true,\n    \"background\": \"Jane started as a loan officer...\",\n    \"years_experience\": 6,\n    \"has_resume\":true,\n    \"resume_url\":\"http:/jlsmith.lender.com/resume\"\n  },\n  \"state_licenses\": [\n    {\n      \"state_name\": \"minnesota\"\n    },\n    {\n      \"state_name\": \"KS\"\n    }\n  ],\n  \"recruit_metrics\": [\n    {\n      \"metric\": {\n        \"metric_name\": \"Builders\",\n        \"metric_type\": \"business_source\"\n      },\n      \"unit\": {\n        \"unit_name\": \"percent\"\n      },\n      \"value\": \"30\"\n    },\n    {\n      \"metric\": {\n        \"metric_name\": \"Realtors\",\n        \"metric_type\": \"business_source\"\n      },\n      \"unit\": {\n        \"unit_name\": \"percent\"\n      },\n      \"value\": \"40\"\n    },\n\t  {\n  \t\t\"metric\": {\n  \t\t\t\"metric_name\": \"Sales Production\",\n  \t\t\t\"metric_type\": \"sales_production\"\n  \t\t},\n  \t\t\"unit\": {\n  \t\t\t\"unit_name\": \"dollars\"\n  \t\t},\n  \t\t\"value\": \"10123\",\n  \t\t\"on_date\": \"2018\"\n  \t}\n  ]\n}"},"url":"{{external_api_host}}/v1/contact-recruits"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"duplicate\": \"external-api.totaldev.us/v1/contact-recruits/520\",\n    \"id\": 520\n}"}],"_postman_id":"54035e57-9229-4d28-9237-994aa16a9366"},{"name":"Create Contact Recruit (as User)","event":[{"listen":"test","script":{"id":"ee67e6dc-d2ae-469b-8476-c761da1dfe9f","exec":[""],"type":"text/javascript"}}],"id":"02570879-9ea4-49f9-886e-5220e46911e6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Ms.\",\n  \"first_name\": \"Jane\",\n  \"last_name\": \"Smith\",\n  \"email\": \"jlsmith@example.com\",\n  \"email_work\": \"jlsmith@otherlender.com\",\n  \"address\": \"1234 Bermuda St\",\n  \"address_2\": \"Apt. 3\",\n  \"city\": \"Pleasantville\",\n  \"state\": \"MN\",\n  \"zip_code\": \"12345\",\n  \"phone_cell\": \"(763)555-0123\",\n  \"phone_office\": \"(763)555-1234\",\n  \"phone_home\": \"(612)-555-0123\",\n  \"employer_name\": \"Other Lender LLC\",\n  \"employer_address\": \"1235 Fake Ave.\",\n  \"employer_address_2\": \"Ste 5\",\n  \"employer_city\": \"Unpleasantville\",\n  \"employer_state\": \"WI\",\n  \"employer_zip\": \"54321\",\n  \"license_number\": \"Q10101010101011\",\n  \"source\": \"Recruit Intake System\",\n  \"creation_date\": \"2017-01-01 11:11:11\",\n  \"last_contacted_date\": \"2017-01-01 12:12:12\",\n  \"external_id\": \"101010\",\n  \"birthday\": \"1970-01-01\",\n  \"ok_to_mail\": 0,\n  \"ok_to_email\": 0,\n  \"ok_to_call\": 0,\n  \"preferences\": {\n    \"is_silenced\": true\n  },\n  \"contact_groups\": [\n    {\n      \"group_name\": \"Recruit - Hot\"\n    }\n  ],\n  \"external_ids\": [\n    {\n      \"source\": \"Recruit Intake System\",\n      \"external_id\": \"101010\"\n    },\n    {\n      \"source\": \"Other Recruit Intake System\",\n      \"external_id\": \"abcd\"\n    }\n  ],\n  \"external_status\": {\n    \"status_name\": \"Processing\"\n  },\n  \"recruit_info\": {\n    \"nmls_id\": \"NMLS identifier\",\n    \"regional_manager\": {\n      \"username\": \"glen-lender\"\n    },\n    \"division_manager\": {\n      \"username\": \"suzy-lender\"\n    },\n    \"branch_manager\": {\n      \"username\": \"richard-lender\"\n    },\n    \"recruit_status\": {\n      \"status_name\": \"Active\"\n    },\n    \"corporate_objective\": \"2306\",\n    \"sourced_percentage\": \"10\",\n    \"commission_cap\": \"26002\",\n    \"commission_split\": \"50%\",\n    \"ust_is_complete\": true,\n    \"background\": \"Jane started as a loan officer...\",\n    \"years_experience\": 6,\n    \"has_resume\":true,\n    \"resume_url\":\"http:/jlsmith.lender.com/resume\"\n  },\n  \"state_licenses\": [\n    {\n      \"state_name\": \"minnesota\"\n    },\n    {\n      \"state_name\": \"KS\"\n    }\n  ],\n  \"recruit_metrics\": [\n    {\n      \"metric\": {\n        \"metric_name\": \"Builders\",\n        \"metric_type\": \"business_source\"\n      },\n      \"unit\": {\n        \"unit_name\": \"percent\"\n      },\n      \"value\": \"30\"\n    },\n    {\n      \"metric\": {\n        \"metric_name\": \"Realtors\",\n        \"metric_type\": \"business_source\"\n      },\n      \"unit\": {\n        \"unit_name\": \"percent\"\n      },\n      \"value\": \"40\"\n    },\n\t  {\n  \t\t\"metric\": {\n  \t\t\t\"metric_name\": \"Sales Production\",\n  \t\t\t\"metric_type\": \"sales_production\"\n  \t\t},\n  \t\t\"unit\": {\n  \t\t\t\"unit_name\": \"dollars\"\n  \t\t},\n  \t\t\"value\": \"10123\",\n  \t\t\"on_date\": \"2018\"\n  \t}\n  ]\n}"},"url":"{{external_api_host}}/v1/contact-recruits","description":"<p>Create a contact.</p>\n<p>Required Attributes (one of the following combinations):</p>\n<ul>\n<li>source, first_name, last_name, email</li>\n<li>source, first_name, last_name, phone_cell</li>\n<li>source, first_name, last_name, phone_home</li>\n<li>source, first_name, last_name, phone_office</li>\n<li>source, first_name, last_name, address, city, state, zip_code</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>[none]</li>\n</ul>\n","urlObject":{"path":["v1","contact-recruits"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"46c99bd7-7e7f-4cea-9f7c-3bb0a5b28acc","name":"Update Contact Recruit (as User)","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Ms.\",\n  \"first_name\": \"Jane\",\n  \"last_name\": \"Smith\",\n  \"email\": \"jlsmith@example.com\",\n  \"email_work\": \"jlsmith@otherlender.com\",\n  \"address\": \"1234 Bermuda St\",\n  \"address_2\": \"Apt. 3\",\n  \"city\": \"Pleasantville\",\n  \"state\": \"MN\",\n  \"zip_code\": \"12345\",\n  \"phone_cell\": \"(763)555-0123\",\n  \"phone_office\": \"(763)555-1234\",\n  \"phone_home\": \"(612)-555-0123\",\n  \"employer_name\": \"Other Lender LLC\",\n  \"employer_address\": \"1235 Fake Ave.\",\n  \"employer_address_2\": \"Ste 5\",\n  \"employer_city\": \"Unpleasantville\",\n  \"employer_state\": \"WI\",\n  \"employer_zip\": \"54321\",\n  \"license_number\": \"Q10101010101011\",\n  \"source\": \"Recruit Intake System\",\n  \"creation_date\": \"2017-01-01 11:11:11\",\n  \"last_contacted_date\": \"2017-01-01 12:12:12\",\n  \"external_id\": \"101010\",\n  \"birthday\": \"1970-01-01\",\n  \"ok_to_mail\": 0,\n  \"ok_to_email\": 0,\n  \"ok_to_call\": 0,\n  \"preferences\": {\n    \"is_silenced\": true\n  },\n  \"contact_groups\": [\n    {\n      \"group_name\": \"Recruit - Hot\"\n    }\n  ],\n  \"external_ids\": [\n    {\n      \"source\": \"Recruit Intake System\",\n      \"external_id\": \"101010\"\n    },\n    {\n      \"source\": \"Other Recruit Intake System\",\n      \"external_id\": \"abcd\"\n    }\n  ],\n  \"external_status\": {\n    \"status_name\": \"Processing\"\n  },\n  \"recruit_info\": {\n    \"nmls_number\": \"NMLS identifier\",\n    \"regional_manager\": {\n      \"username\": \"glen-lender\"\n    },\n    \"division_manager\": {\n      \"username\": \"suzy-lender\"\n    },\n    \"branch_manager\": {\n      \"username\": \"richard-lender\"\n    },\n    \"recruit_status\": {\n      \"status_name\": \"Active\"\n    },\n    \"corporate_objective\": \"2306\",\n    \"sourced_percentage\": \"10\",\n    \"commission_cap\": \"26002\",\n    \"commission_split\": \"50%\",\n    \"ust_is_complete\": true,\n    \"background\": \"Jane started as a loan officer...\",\n    \"years_experience\": 6,\n    \"has_resume\":true,\n    \"resume_url\":\"http:/jlsmith.lender.com/resume\"\n  },\n  \"state_licenses\": [\n    {\n      \"state_name\": \"minnesota\"\n    },\n    {\n      \"state_name\": \"KS\"\n    }\n  ],\n  \"recruit_metrics\": [\n    {\n      \"metric\": {\n        \"metric_name\": \"Builders\",\n        \"metric_type\": \"business_source\"\n      },\n      \"unit\": {\n        \"unit_name\": \"percent\"\n      },\n      \"value\": \"30\"\n    },\n    {\n      \"metric\": {\n        \"metric_name\": \"Realtors\",\n        \"metric_type\": \"business_source\"\n      },\n      \"unit\": {\n        \"unit_name\": \"percent\"\n      },\n      \"value\": \"40\"\n    },\n\t  {\n  \t\t\"metric\": {\n  \t\t\t\"metric_name\": \"Sales Production\",\n  \t\t\t\"metric_type\": \"sales_production\"\n  \t\t},\n  \t\t\"unit\": {\n  \t\t\t\"unit_name\": \"dollars\"\n  \t\t},\n  \t\t\"value\": \"10123\",\n  \t\t\"on_date\": \"2018\"\n  \t}\n  ]\n}"},"url":"{{external_api_host}}/v1/contact-recruits"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"duplicate\": \"external-api.totaldev.us/v1/contact-recruits/520\",\n    \"id\": 520\n}"},{"id":"23ad4e1b-a21b-416a-b93c-7e6817951200","name":"Create Contact Recruit (as User)","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Ms.\",\n  \"first_name\": \"Jane\",\n  \"last_name\": \"Smith\",\n  \"email\": \"jlsmith@example.com\",\n  \"email_work\": \"jlsmith@otherlender.com\",\n  \"address\": \"1234 Bermuda St\",\n  \"address_2\": \"Apt. 3\",\n  \"city\": \"Pleasantville\",\n  \"state\": \"MN\",\n  \"zip_code\": \"12345\",\n  \"phone_cell\": \"(763)555-0123\",\n  \"phone_office\": \"(763)555-1234\",\n  \"phone_home\": \"(612)-555-0123\",\n  \"employer_name\": \"Other Lender LLC\",\n  \"employer_address\": \"1235 Fake Ave.\",\n  \"employer_address_2\": \"Ste 5\",\n  \"employer_city\": \"Unpleasantville\",\n  \"employer_state\": \"WI\",\n  \"employer_zip\": \"54321\",\n  \"license_number\": \"Q10101010101011\",\n  \"source\": \"Recruit Intake System\",\n  \"creation_date\": \"2017-01-01 11:11:11\",\n  \"last_contacted_date\": \"2017-01-01 12:12:12\",\n  \"external_id\": \"101010\",\n  \"birthday\": \"1970-01-01\",\n  \"ok_to_mail\": 0,\n  \"ok_to_email\": 0,\n  \"ok_to_call\": 0,\n  \"preferences\": {\n    \"is_silenced\": true\n  },\n  \"contact_groups\": [\n    {\n      \"group_name\": \"Recruit - Hot\"\n    }\n  ],\n  \"external_ids\": [\n    {\n      \"source\": \"Recruit Intake System\",\n      \"external_id\": \"101010\"\n    },\n    {\n      \"source\": \"Other Recruit Intake System\",\n      \"external_id\": \"abcd\"\n    }\n  ],\n  \"external_status\": {\n    \"status_name\": \"Processing\"\n  },\n  \"recruit_info\": {\n    \"nmls_number\": \"NMLS identifier\",\n    \"regional_manager\": {\n      \"username\": \"glen-lender\"\n    },\n    \"division_manager\": {\n      \"username\": \"suzy-lender\"\n    },\n    \"branch_manager\": {\n      \"username\": \"richard-lender\"\n    },\n    \"recruit_status\": {\n      \"status_name\": \"Active\"\n    },\n    \"corporate_objective\": \"2306\",\n    \"sourced_percentage\": \"10\",\n    \"commission_cap\": \"26002\",\n    \"commission_split\": \"50%\",\n    \"ust_is_complete\": true,\n    \"background\": \"Jane started as a loan officer...\",\n    \"years_experience\": 6,\n    \"has_resume\":true,\n    \"resume_url\":\"http:/jlsmith.lender.com/resume\"\n  },\n  \"state_licenses\": [\n    {\n      \"state_name\": \"minnesota\"\n    },\n    {\n      \"state_name\": \"KS\"\n    }\n  ],\n  \"recruit_metrics\": [\n    {\n      \"metric\": {\n        \"metric_name\": \"Builders\",\n        \"metric_type\": \"business_source\"\n      },\n      \"unit\": {\n        \"unit_name\": \"percent\"\n      },\n      \"value\": \"30\"\n    },\n    {\n      \"metric\": {\n        \"metric_name\": \"Realtors\",\n        \"metric_type\": \"business_source\"\n      },\n      \"unit\": {\n        \"unit_name\": \"percent\"\n      },\n      \"value\": \"40\"\n    },\n\t  {\n  \t\t\"metric\": {\n  \t\t\t\"metric_name\": \"Sales Production\",\n  \t\t\t\"metric_type\": \"sales_production\"\n  \t\t},\n  \t\t\"unit\": {\n  \t\t\t\"unit_name\": \"dollars\"\n  \t\t},\n  \t\t\"value\": \"10123\",\n  \t\t\"on_date\": \"2018\"\n  \t}\n  ]\n}"},"url":"{{external_api_host}}/v1/contact-recruits"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"created\": \"external-api.totaldev.us/v1/contact-recruits/520\",\n    \"id\": 520\n}"},{"id":"0ad7802f-7874-44b6-acdc-40aecadfe367","name":"Insufficient Scope","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Ms.\",\n  \"first_name\": \"Jane\",\n  \"last_name\": \"Smith\",\n  \"email\": \"jlsmith@example.com\",\n  \"email_work\": \"jlsmith@otherlender.com\",\n  \"address\": \"1234 Bermuda St\",\n  \"address_2\": \"Apt. 3\",\n  \"city\": \"Pleasantville\",\n  \"state\": \"MN\",\n  \"zip_code\": \"12345\",\n  \"phone_cell\": \"(763)555-0123\",\n  \"phone_office\": \"(763)555-1234\",\n  \"phone_home\": \"(612)-555-0123\",\n  \"employer_name\": \"Other Lender LLC\",\n  \"employer_address\": \"1235 Fake Ave.\",\n  \"employer_address_2\": \"Ste 5\",\n  \"employer_city\": \"Unpleasantville\",\n  \"employer_state\": \"WI\",\n  \"employer_zip\": \"54321\",\n  \"license_number\": \"Q10101010101011\",\n  \"source\": \"Recruit Intake System\",\n  \"creation_date\": \"2017-01-01 11:11:11\",\n  \"last_contacted_date\": \"2017-01-01 12:12:12\",\n  \"external_id\": \"101010\",\n  \"birthday\": \"1970-01-01\",\n  \"ok_to_mail\": 0,\n  \"ok_to_email\": 0,\n  \"ok_to_call\": 0,\n  \"preferences\": {\n    \"is_silenced\": true\n  },\n  \"owner\": {\n    \"external_id\": \"userExternal1\"\n  },\n  \"contact_groups\": [\n    {\n      \"group_name\": \"Recruit - Hot\"\n    }\n  ],\n  \"external_ids\": [\n    {\n      \"source\": \"Recruit Intake System\",\n      \"external_id\": \"101010\"\n    },\n    {\n      \"source\": \"Other Recruit Intake System\",\n      \"external_id\": \"abcd\"\n    }\n  ],\n  \"external_status\": {\n    \"status_name\": \"Processing\"\n  },\n  \"recruit_info\": {\n    \"nmls_number\": \"NMLS identifier\",\n    \"regional_manager\": {\n      \"username\": \"glen-lender\"\n    },\n    \"division_manager\": {\n      \"username\": \"suzy-lender\"\n    },\n    \"branch_manager\": {\n      \"username\": \"richard-lender\"\n    },\n    \"recruit_status\": {\n      \"status_name\": \"Active\"\n    },\n    \"corporate_objective\": \"2306\",\n    \"sourced_percentage\": \"10\",\n    \"commission_cap\": \"26002\",\n    \"commission_split\": \"50%\",\n    \"ust_is_complete\": true,\n    \"background\": \"Jane started as a loan officer...\",\n    \"years_experience\": 6,\n    \"has_resume\":true,\n    \"resume_url\":\"http:/jlsmith.lender.com/resume\"\n  },\n  \"state_licenses\": [\n    {\n      \"state_name\": \"minnesota\"\n    },\n    {\n      \"state_name\": \"KS\"\n    }\n  ],\n  \"recruit_metrics\": [\n    {\n      \"metric\": {\n        \"metric_name\": \"Builders\",\n        \"metric_type\": \"business_source\"\n      },\n      \"unit\": {\n        \"unit_name\": \"percent\"\n      },\n      \"value\": \"30\"\n    },\n    {\n      \"metric\": {\n        \"metric_name\": \"Realtors\",\n        \"metric_type\": \"business_source\"\n      },\n      \"unit\": {\n        \"unit_name\": \"percent\"\n      },\n      \"value\": \"40\"\n    },\n\t  {\n  \t\t\"metric\": {\n  \t\t\t\"metric_name\": \"Sales Production\",\n  \t\t\t\"metric_type\": \"sales_production\"\n  \t\t},\n  \t\t\"unit\": {\n  \t\t\t\"unit_name\": \"dollars\"\n  \t\t},\n  \t\t\"value\": \"10123\",\n  \t\t\"on_date\": \"2018\"\n  \t}\n  ]\n}"},"url":"{{external_api_host}}/v1/contact-recruits"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"insufficient_scope\",\n    \"error_description\": \"The request requires higher privileges than provided by the access token\"\n}"}],"_postman_id":"02570879-9ea4-49f9-886e-5220e46911e6"},{"name":"Update Contact Recruit","id":"295482db-2d05-4e6a-8aae-a6993f535445","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\"recruit_metrics\": [\r\n\t{\r\n\t\t\"metric\": {\r\n\t\t\t\"metric_name\": \"Builders\",\r\n\t\t\t\"metric_type\": \"business_source\"\r\n\t\t},\r\n\t\t\"unit\": {\r\n\t\t\t\"unit_name\": \"percent\"\r\n\t\t},\r\n\t\t\"value\": \"50\"\r\n\t},\r\n\t{\r\n\t\t\"metric\": {\r\n\t\t\t\"metric_name\": \"Realtors\",\r\n\t\t\t\"metric_type\": \"business_source\"\r\n\t\t},\r\n\t\t\"unit\": {\r\n\t\t\t\"unit_name\": \"percent\"\r\n\t\t},\r\n\t\t\"value\": \"20\"\r\n\t},\r\n\t{\r\n\t\t\"metric\": {\r\n\t\t\t\"metric_name\": \"Sales Production\",\r\n\t\t\t\"metric_type\": \"sales_production\"\r\n\t\t},\r\n\t\t\"unit\": {\r\n\t\t\t\"unit_name\": \"dollars\"\r\n\t\t},\r\n\t\t\"value\": \"10123\",\r\n\t\t\"on_date\": \"2018\"\r\n\t}\r\n]\r\n}"},"url":"{{external_api_host}}/v1/contact-recruits/{{contact_id}}","description":"<p>Update an existing contact by ID.</p>\n","urlObject":{"path":["v1","contact-recruits","{{contact_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"d5afa70d-a39c-4577-9912-2ce6fb4a08f5","name":"Remove Metric","originalRequest":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\"remove_recruit_metrics\": [\r\n\t{\r\n\t\t\"metric\": {\r\n\t\t\t\"metric_name\": \"Builders\",\r\n\t\t\t\"metric_type\": \"business_source\"\r\n\t\t},\r\n\t\t\"unit\": {\r\n\t\t\t\"unit_name\": \"percent\"\r\n\t\t}\r\n\t}\r\n]\r\n}"},"url":"{{external_api_host}}/v1/contact-recruits/{{contact_id}}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"[]"},{"id":"1d124f9e-8dda-4394-a2cc-da3d8cca2f4a","name":"Update Contact Recruit","originalRequest":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\"recruit_metrics\": [\r\n\t{\r\n\t\t\"metric\": {\r\n\t\t\t\"metric_name\": \"Builders\",\r\n\t\t\t\"metric_type\": \"business_source\"\r\n\t\t},\r\n\t\t\"unit\": {\r\n\t\t\t\"unit_name\": \"percent\"\r\n\t\t},\r\n\t\t\"value\": \"50\"\r\n\t},\r\n\t{\r\n\t\t\"metric\": {\r\n\t\t\t\"metric_name\": \"Realtors\",\r\n\t\t\t\"metric_type\": \"business_source\"\r\n\t\t},\r\n\t\t\"unit\": {\r\n\t\t\t\"unit_name\": \"percent\"\r\n\t\t},\r\n\t\t\"value\": \"20\"\r\n\t},\r\n\t{\r\n\t\t\"metric\": {\r\n\t\t\t\"metric_name\": \"Sales Production\",\r\n\t\t\t\"metric_type\": \"sales_production\"\r\n\t\t},\r\n\t\t\"unit\": {\r\n\t\t\t\"unit_name\": \"dollars\"\r\n\t\t},\r\n\t\t\"value\": \"10123\",\r\n\t\t\"on_date\": \"2018\"\r\n\t}\r\n]\r\n}"},"url":"{{external_api_host}}/v1/contact-recruits/{{contact_id}}"},"code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[]"},{"id":"10eb7cb1-693a-4539-b9af-00b3383484cb","name":"Remove State License","originalRequest":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"remove_state_licenses\": [{\"state_name\":\"AK\"}, {\"state_name\":\"kansas\"}]\n}"},"url":"{{external_api_host}}/v1/contact-recruits/{{contact_id}}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"[]"}],"_postman_id":"295482db-2d05-4e6a-8aae-a6993f535445"},{"name":"Delete Contact Recruit","event":[{"listen":"prerequest","script":{"id":"587ad705-e7b4-45ab-bc32-998e50fd892a","exec":[""],"type":"text/javascript"}}],"id":"87e76cc1-0ad4-4702-8fa4-c169a2bac7ce","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/contact-recruits/{{contact_id}}","description":"<p>Delete a contact by ID.</p>\n","urlObject":{"path":["v1","contact-recruits","{{contact_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"87e76cc1-0ad4-4702-8fa4-c169a2bac7ce"}],"id":"769e57f8-f5c5-45b6-8868-d024cf50120c","description":"<p>Endpoints for interacting with the contact-recruits resource.</p>\n<hr />\n<h3 id=\"attributes\">Attributes</h3>\n<p>See the <strong>Contacts</strong> documentation for accepted attributes and uniqueness considerations. See below for additional special attributes accepted by the Contact Recruits endpoints:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>recruit_info</td>\n<td>Yes</td>\n<td>object</td>\n<td>Collection of recruit's professional data. See the \"Recruit Info Attributes\" and \"Recruit Info Relationships\" tables for available attributes.</td>\n</tr>\n<tr>\n<td>state_licenses</td>\n<td>Yes</td>\n<td>object</td>\n<td>Collection of recruit's state licenses. See the \"Recruit State License Attributes\" table for available attributes.</td>\n</tr>\n<tr>\n<td>recruit_metrics</td>\n<td>Yes</td>\n<td>object</td>\n<td>Collection of recruit's professional metrics. See the \"Recruit Metric Attributes\" and \"Recruit Metric Relationships\" tables for available attributes.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"recruit-info-attributes\">Recruit Info Attributes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>nmls_id</td>\n<td>Yes</td>\n<td>string</td>\n<td>The NMLS identifier.</td>\n</tr>\n<tr>\n<td>corporate_objective</td>\n<td>Yes</td>\n<td>string</td>\n<td>The recruit's sales objective with their current employer.</td>\n</tr>\n<tr>\n<td>sourced_percent</td>\n<td>Yes</td>\n<td>string</td>\n<td>The percent of the recruit's business they source versus leads that are handed to them by their current employer.</td>\n</tr>\n<tr>\n<td>commission_cap</td>\n<td>Yes</td>\n<td>string</td>\n<td>The maximum amount of commission the recruit can acquire.</td>\n</tr>\n<tr>\n<td>commission_split_percent</td>\n<td>Yes</td>\n<td>string</td>\n<td>The percent split of profit share between the organization and the loan officer.</td>\n</tr>\n<tr>\n<td>ust_is_complete</td>\n<td>Yes</td>\n<td>boolean</td>\n<td>The recruit has completed the uniform state test.</td>\n</tr>\n<tr>\n<td>background</td>\n<td>Yes</td>\n<td>string</td>\n<td>A summary of the contact's background and/or experience.</td>\n</tr>\n<tr>\n<td>years_experience</td>\n<td>Yes</td>\n<td>string</td>\n<td>The number of years of relevant experience that the contact has.</td>\n</tr>\n<tr>\n<td>has_resume</td>\n<td>Yes</td>\n<td>boolean</td>\n<td>Contact has provided a resume.</td>\n</tr>\n<tr>\n<td>resume_url</td>\n<td>Yes</td>\n<td>string</td>\n<td>Link to the contact's resume page.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"recruit-info-relationships\">Recruit Info Relationships</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>branch_manager</td>\n<td>Yes</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>Existing user to associate with the recruit.</td>\n</tr>\n<tr>\n<td>division_manager</td>\n<td>Yes</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>Existing user to associate with the recruit.</td>\n</tr>\n<tr>\n<td>regional_manager</td>\n<td>Yes</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>Existing user to associate with the recruit.</td>\n</tr>\n<tr>\n<td>recruit_status</td>\n<td>Yes</td>\n<td>Contact Recruit Status</td>\n<td>status_name</td>\n<td>Existing recruitment status to associate with this contact.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"recruit-state-license-attributes\">Recruit State License Attributes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>state_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name or abbreviation of a U.S. state. Names will be converted to state abbreviations.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"recruit-metric-attributes\">Recruit Metric Attributes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>value</td>\n<td>Yes</td>\n<td>integer</td>\n<td>The numeric value for the metric. The 'unit' relationship defines the number's meaning.</td>\n</tr>\n<tr>\n<td>on_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>Date/year to which metric applies. Preferred format: 'YYYY', 'YYYY-MM-DD', 'YYYY-MM'</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"recruit-metric-relationships\">Recruit Metric Relationships</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>metric</td>\n<td>Yes</td>\n<td>Contact Recruit Metric</td>\n<td>metric_name, metric_type</td>\n<td>Existing metric definition associated with the metric 'value'.</td>\n</tr>\n<tr>\n<td>unit</td>\n<td>Yes</td>\n<td>Contact Recruit Metric Unit</td>\n<td>unit_name</td>\n<td>Existing metric unit definition associate with the metric 'value'.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"special-postpatch-attributes\">Special POST/PATCH Attributes</h3>\n<p>These attributes are used to manipulate the recruit but are neither recruit attributes or relationships. These attributes will not appear in responses. </p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>remove_state_licenses</td>\n<td>Recruit State License</td>\n<td>state_name</td>\n<td>License to remove from recruit's state licenses. Array of recruit state license objects.</td>\n</tr>\n<tr>\n<td>remove_recruit_metrics</td>\n<td>Recruit Metric</td>\n<td>metric, unit</td>\n<td>Metrics to remove from recruit's professional metrics. Array of recruit metric objects.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"restrictions-on-metrics\">Restrictions on Metrics</h3>\n<p>There are a few quirks to metrics. Contact metrics must meet the following requirements:</p>\n<ul>\n<li>Any \"sales_production\" metrics must have an \"on_date\" included. For other metrics, \"on_date\" is optional.</li>\n<li>Any \"system_experience\" metrics must use the \"years\" unit.</li>\n<li>Metrics of a given metric type (e.g. \"business_source\") that are expressed with the \"percent\" unit must have a combined sum that does not exceed 100%. If you receive an error related to this and your POST/PATCH body meets this requirement ensure that there are no pre-existing metrics in the system that would be adding to the sum for the recruit.</li>\n</ul>\n","event":[{"listen":"prerequest","script":{"id":"03aab143-4c0a-46ba-89f8-6b4facd850d0","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"b2fee9bf-318f-447e-93a8-c1534dc008fa","type":"text/javascript","exec":[""]}}],"_postman_id":"769e57f8-f5c5-45b6-8868-d024cf50120c"},{"name":"Contact Recruit Status","item":[{"name":"Fetch Contact Recruit Statuses","id":"31b2ee23-837c-4c2d-ab44-1f7b816fd963","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/contact-recruit-statuses?page[number]=1&page[size]=10","urlObject":{"path":["v1","contact-recruit-statuses"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[{"id":"953cd5de-639f-4096-a4dd-775742368c44","name":"Fetch Contact Recruit Statuses","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":{"raw":"{{external_api_host}}/v1/contact-recruit-statuses?page[number]=1&page[size]=10","host":["{{external_api_host}}"],"path":["v1","contact-recruit-statuses"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"items\": [\n        {\n            \"status_name\": \"Active\"\n        },\n        {\n            \"status_name\": \"On Hold\"\n        },\n        {\n            \"status_name\": \"Decline\"\n        },\n        {\n            \"status_name\": \"Engaged\"\n        },\n        {\n            \"status_name\": \"Offer Out\"\n        }\n    ],\n    \"links\": {\n        \"first\": 1,\n        \"last\": 1,\n        \"next\": null,\n        \"prev\": null\n    }\n}"}],"_postman_id":"31b2ee23-837c-4c2d-ab44-1f7b816fd963"}],"id":"652ce2c7-318b-4948-be2e-04768194665c","description":"<p>Endpoints for interacting with the contact-recruit-statuses resource. These are the definitions for the recruit statuses the user's organization allows.</p>\n<hr />\n<h3 id=\"attributes\">Attributes</h3>\n<p>The attributes returned by the Contact Recruit Statuses endpoint:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>status_name</td>\n<td>No</td>\n<td>string</td>\n<td>The name of the status (e.g. Active, On Hold).</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"99a37f63-3a4a-4958-8f61-4c9eefae87bd","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"63fa848b-5aa3-4176-b715-ee2e1ad6f54b","type":"text/javascript","exec":[""]}}],"_postman_id":"652ce2c7-318b-4948-be2e-04768194665c"},{"name":"Contact Recruit Metrics","item":[{"name":"Fetch Contact Recruit Metrics","id":"da6ecb4c-a7b9-43b7-a9a4-81355dcddb6d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/contact-recruit-metrics?page[number]=1&page[size]=10","urlObject":{"path":["v1","contact-recruit-metrics"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[{"id":"1afcab8f-d231-4573-b2d0-bb1010baa339","name":"Fetch Contact Recruit Metrics","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":{"raw":"{{external_api_host}}/v1/contact-recruit-metrics?page[number]=1&page[size]=10","host":["{{external_api_host}}"],"path":["v1","contact-recruit-metrics"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"items\": [\n        {\n            \"metric_name\": \"Referrals\",\n            \"metric_type\": \"business_source\"\n        },\n        {\n            \"metric_name\": \"Leads\",\n            \"metric_type\": \"business_source\"\n        },\n        {\n            \"metric_name\": \"Lead Sources\",\n            \"metric_type\": \"business_source\"\n        },\n        {\n            \"metric_name\": \"Realtors\",\n            \"metric_type\": \"business_source\"\n        },\n        {\n            \"metric_name\": \"Sales Production\",\n            \"metric_type\": \"sales_production\"\n        },\n        {\n            \"metric_name\": \"Builders\",\n            \"metric_type\": \"business_source\"\n        },\n        {\n            \"metric_name\": \"Conforming\",\n            \"metric_type\": \"product\"\n        },\n        {\n            \"metric_name\": \"FHA/VA\",\n            \"metric_type\": \"product\"\n        },\n        {\n            \"metric_name\": \"Jumbo\",\n            \"metric_type\": \"product\"\n        },\n        {\n            \"metric_name\": \"Broker\",\n            \"metric_type\": \"product\"\n        }\n    ],\n    \"links\": {\n        \"first\": 1,\n        \"last\": 2,\n        \"next\": 2,\n        \"prev\": null\n    }\n}"}],"_postman_id":"da6ecb4c-a7b9-43b7-a9a4-81355dcddb6d"}],"id":"e02ff7b8-8b28-43a2-bf97-9b3c925edc64","description":"<p>Endpoints for interacting with the contact-recruit-metrics resource. These are the definitions for the metrics the user's organization is collecting.</p>\n<hr />\n<h3 id=\"attributes\">Attributes</h3>\n<p>The attributes returned by the Contact Recruit Metrics endpoint:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>metric_name</td>\n<td>No</td>\n<td>string</td>\n<td>The name of the metric (e.g. Builders, Total Expert).</td>\n</tr>\n<tr>\n<td>metric_type</td>\n<td>No</td>\n<td>string</td>\n<td>The type of metric (e.g. business_source, system_experience).</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"2156edcb-83ef-43e2-9c2b-a8ed587eee65","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"9b053e3a-7628-450b-9696-ed5482148170","type":"text/javascript","exec":[""]}}],"_postman_id":"e02ff7b8-8b28-43a2-bf97-9b3c925edc64"},{"name":"Contact Recruit Units","item":[{"name":"Fetch Contact Recruit Metric Units","id":"4d88f1e4-39d8-4702-9e2e-039692cfb47d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/contact-recruit-metric-units?page[number]=1&page[size]=10","urlObject":{"path":["v1","contact-recruit-metric-units"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[{"id":"587f6f0a-12ba-4c91-93fd-7dbbabfd42e9","name":"Fetch Contact Recruit Metric Units","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":{"raw":"{{external_api_host}}/v1/contact-recruit-metric-units?page[number]=1&page[size]=10","host":["{{external_api_host}}"],"path":["v1","contact-recruit-metric-units"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"items\": [\n        {\n            \"unit_name\": \"percent\"\n        },\n        {\n            \"unit_name\": \"dollars\"\n        },\n        {\n            \"unit_name\": \"loans\"\n        },\n        {\n            \"unit_name\": \"years\"\n        }\n    ],\n    \"links\": {\n        \"first\": 1,\n        \"last\": 1,\n        \"next\": null,\n        \"prev\": null\n    }\n}"}],"_postman_id":"4d88f1e4-39d8-4702-9e2e-039692cfb47d"}],"id":"4e2b2866-fea8-4ad2-bad7-579ea9e1aedd","description":"<p>Endpoints for interacting with the contact-recruit-metric-units resource. These are the definitions for the metric units the user's organization allows.</p>\n<hr />\n<h3 id=\"attributes\">Attributes</h3>\n<p>The attributes returned by the Contact Recruit Metric Units endpoint:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>unit_name</td>\n<td>No</td>\n<td>string</td>\n<td>The name of the unit (e.g. dollars, years).</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"fc98af50-7209-4f9d-877d-e7ccc2f014dd","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"f7c8c5ea-138e-4eef-8e52-70180963bd21","type":"text/javascript","exec":[""]}}],"_postman_id":"4e2b2866-fea8-4ad2-bad7-579ea9e1aedd"}],"id":"2f188af0-8499-4135-a129-66a5e8400d58","_postman_id":"2f188af0-8499-4135-a129-66a5e8400d58","description":""},{"name":"Contact Communication Consent","item":[{"name":"Grant Consent on Create","id":"e0fe3170-1c0e-4dc1-97ff-73b28fb7148a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Doctor\",\n  \"first_name\": \"Clark\",\n  \"last_name\": \"Gable\",\n  \"email\": \"username@example.com\",\n  \"email_work\": \"clark.gable2@totalexpertinc.com\",\n  \"address\": \"1234 Fake St\",\n  \"address_2\": \"Apartment -8\",\n  \"city\": \"Pleasantville\",\n  \"state\": \"MN\",\n  \"zip_code\": \"12345\",\n  \"phone_cell\": \"(763)555-0123\",\n  \"phone_office\": \"(763)555-1234\",\n  \"phone_home\": \"(612)-555-0123\",\n  \"external_ids\": [\n    {\n      \"source\":\"local\",\n      \"external_id\":\"abcd\"\n    }\n  ],\n  \"grant_consent\": {\n    \"communication_agent\": \"agentic-a-i\",\n    \"communication_channel\": \"phone\",\n    \"channel_target\": \"+17635550123\",\n    \"contact_purpose\": \"marketing\",\n    \"capture_source\": \"A web form check box\",\n    \"consent_language\": \"Contact has consented to AI calls\",\n    \"ip_address\": \"1.1.1.1\"\n  }\n}"},"url":"{{external_api_host}}/v1/contacts/","urlObject":{"path":["v1","contacts",""],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e0fe3170-1c0e-4dc1-97ff-73b28fb7148a"},{"name":"Grant Consent on Update","id":"490643d3-2835-4b55-815a-26903374806a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Doctor\",\n  \"first_name\": \"Clark\",\n  \"last_name\": \"Gable\",\n  \"email\": \"username@example.com\",\n  \"email_work\": \"clark.gable2@totalexpertinc.com\",\n  \"address\": \"1234 Fake St\",\n  \"address_2\": \"Apartment -8\",\n  \"city\": \"Pleasantville\",\n  \"state\": \"MN\",\n  \"zip_code\": \"12345\",\n  \"phone_cell\": \"(763)555-0123\",\n  \"phone_office\": \"(763)555-1234\",\n  \"phone_home\": \"(612)-555-0123\",\n  \"external_ids\": [\n    {\n      \"source\":\"local\",\n      \"external_id\":\"abcd\"\n    }\n  ],\n  \"grant_consent\": {\n    \"communication_agent\": \"agentic-a-i\",\n    \"communication_channel\": \"phone\",\n    \"channel_target\": \"+17635550123\",\n    \"contact_purpose\": \"marketing\",\n    \"capture_source\": \"A web form check box\",\n    \"consent_language\": \"Contact has consented to AI calls\",\n    \"ip_address\": \"1.1.1.1\"\n  }\n}"},"url":"{{external_api_host}}/v1/contacts/","urlObject":{"path":["v1","contacts",""],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"490643d3-2835-4b55-815a-26903374806a"},{"name":"Revoke Consent","id":"78029990-0719-4be5-ac9b-b7b5ba1cb716","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Doctor\",\n  \"first_name\": \"Clark\",\n  \"last_name\": \"Gable\",\n  \"email\": \"username@example.com\",\n  \"email_work\": \"clark.gable2@totalexpertinc.com\",\n  \"address\": \"1234 Fake St\",\n  \"address_2\": \"Apartment -8\",\n  \"city\": \"Pleasantville\",\n  \"state\": \"MN\",\n  \"zip_code\": \"12345\",\n  \"phone_cell\": \"(763)555-0123\",\n  \"phone_office\": \"(763)555-1234\",\n  \"phone_home\": \"(612)-555-0123\",\n  \"external_ids\": [\n    {\n      \"source\":\"local\",\n      \"external_id\":\"abcd\"\n    }\n  ],\n  \"revoke_consent\": {\n    \"communication_agent\": \"agentic-a-i\",\n    \"communication_channel\": \"phone\",\n    \"channel_target\": \"+17635550123\",\n    \"contact_purpose\": \"marketing\",\n    \"capture_source\": \"Customer support\",\n    \"consent_language\": \"Contact has revoked consented for AI calls\",\n    \"ip_address\": \"1.1.1.1\"\n  }\n}"},"url":"{{external_api_host}}/v1/contacts/","urlObject":{"path":["v1","contacts",""],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"78029990-0719-4be5-ac9b-b7b5ba1cb716"}],"id":"e1fb304b-091d-481c-890a-a68a680f7140","description":"<p>The communication consent toolset provides a mechanism for recording the consent records your organization collects from your contacts. This tool is currently tailored specifically for telephone communication by an agentic A.I. application.</p>\n<p>The API is designed around 2 primary operations: \"Consent Grant\" and \"Consent Revoke\". In order for consent to be revoked, it must have been previously granted.</p>\n<p>Once consent has been granted, the corresponding Journey Condition will allow or block the AI Sales Assistant from making automated calls depending on the status of the Contact's AI Consent. AI Consent status will also be displayed on the Contact Profile, with an option to revoke manually through the User Interface.</p>\n<p>The consent api follows the same command structure that the other Contact API endpoints for identifiying your contact, plus an object that describes your \"grant\" or revocation \"revoke\".</p>\n<p><strong>Note</strong>: Consent grant may be attached for a Create Contact (POST) or a Update Contact (PATCH). Revoking consent must be performed as a Contact Update (PATCH).</p>\n<h1 id=\"parameters\">Parameters</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Parameter name</strong></th>\n<th><strong>Type and values</strong></th>\n<th><strong>Required</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>first_name</code></td>\n<td>string</td>\n<td>true</td>\n<td>refer to Consent Create and update for the full list of contact parameters.</td>\n</tr>\n<tr>\n<td><code>last_name</code></td>\n<td>string</td>\n<td>true</td>\n<td>...</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>string: A valid email</td>\n<td>false</td>\n<td>...</td>\n</tr>\n<tr>\n<td><code>grant_consent or revoke_consent</code></td>\n<td>Object</td>\n<td>true</td>\n<td></td>\n</tr>\n<tr>\n<td>.<code>communication_agent</code></td>\n<td>string</td>\n<td>true</td>\n<td>\"agentic-a-i\"</td>\n</tr>\n<tr>\n<td>.<code>communication_channel</code></td>\n<td>string</td>\n<td>true</td>\n<td>\"phone\"</td>\n</tr>\n<tr>\n<td>.<code>channel_target</code></td>\n<td>string</td>\n<td>true</td>\n<td>an <a href=\"https://www.itu.int/rec/T-REC-E.164/en\">e164</a> formatted (U.S.) phone number. ie- \"+16125551212\"</td>\n</tr>\n<tr>\n<td>.<code>contact_purpose</code></td>\n<td>string</td>\n<td>true</td>\n<td>\"marketing\", \"existing-business\"</td>\n</tr>\n<tr>\n<td>.<code>capture_source</code></td>\n<td>string</td>\n<td>true</td>\n<td>a description of the way in which the consent was established. ie- \"Online form checkbox\"</td>\n</tr>\n<tr>\n<td>.<code>consent_language</code></td>\n<td>string</td>\n<td>true</td>\n<td>The copy that the user was presented with when they opted in with consent.</td>\n</tr>\n<tr>\n<td>.<code>ip_address</code></td>\n<td>string</td>\n<td>true</td>\n<td>A valid ip4 or ip6 addess if it can be captured accurately. Pass 1.1.1.1 if the address has not been captured.</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"api-example\">API Example</h1>\n<h2 id=\"granting-consent\">Granting Consent</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"first_name\": \"first\",\n  \"last_name\": \"last\",\n  \"email\": \"test@test.com\",\n  \"grant_consent\": {\n    \"communication_agent\": \"agentic-a-i\",\n    \"communication_channel\": \"phone\",\n    \"channel_target\": \"+16518675309\",\n    \"contact_purpose\": \"marketing\",\n    \"capture_source\": \"A web form check box\",\n    \"consent_language\": \"Contact has consented to AI calls\",\n    \"ip_address\": \"1.1.1.1\"\n  }\n}  \n\n</code></pre>\n<h3 id=\"revoking-consent\">Revoking Consent</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"first_name\": \"first\",\n  \"last_name\": \"last\",\n  \"email\": \"test@test.com\",\n  \"revoke_consent\": {\n    \"communication_agent\": \"agentic-a-i\",\n    \"communication_channel\": \"phone\",\n    \"channel_target\": \"+16518675309\",\n    \"contact_purpose\": \"marketing\",\n    \"consent_language\": \"Contact has consented to AI calls\",\n    \"ip_address\": \"1.1.1.1\"\n  }\n}\n\n</code></pre>\n","_postman_id":"e1fb304b-091d-481c-890a-a68a680f7140"},{"name":"Additional Contact Related Endpoints","item":[{"name":"Channels","item":[{"name":"Fetch Channels","id":"c43f1af8-2737-4d59-8783-60e967023adb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/channels?page[number]=1","description":"<p>Fetch a page of channels. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","channels"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"disabled":true,"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"c43f1af8-2737-4d59-8783-60e967023adb"}],"id":"72a9cdba-a6be-4c6f-a479-765ec8972d6d","description":"<p>Endpoints for interacting with the channels resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>system_name</td>\n<td>No</td>\n<td>string</td>\n<td>The unique system name of the channel</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"623761ca-34df-42aa-ad35-6fa22d40ad05","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"66d2771b-8430-464c-bc60-7fce3d60f9bd","type":"text/javascript","exec":[""]}}],"_postman_id":"72a9cdba-a6be-4c6f-a479-765ec8972d6d"},{"name":"WLP Access Types","item":[{"name":"Fetch WLP Access Types","id":"2c9a2a5d-07ee-4730-bf49-597061ee8e68","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/wlp-access-types?page[number]=1","description":"<p>Fetch a page of wlp access types. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","wlp-access-types"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"disabled":true,"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"2c9a2a5d-07ee-4730-bf49-597061ee8e68"}],"id":"6f00a509-33db-4ae1-9195-e26f42859c11","description":"<p>Endpoints for interacting with the wlp-access-types resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>access_type</td>\n<td>No</td>\n<td>string</td>\n<td>The unique name of the WLP access type</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"623761ca-34df-42aa-ad35-6fa22d40ad05","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"66d2771b-8430-464c-bc60-7fce3d60f9bd","type":"text/javascript","exec":[""]}}],"_postman_id":"6f00a509-33db-4ae1-9195-e26f42859c11"},{"name":"Campaigns","item":[{"name":"Fetch Campaigns","id":"203716c0-4244-46f4-b4d3-b53516bbeaf9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/campaigns","description":"<p>Fetch a page of campaigns. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","campaigns"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"203716c0-4244-46f4-b4d3-b53516bbeaf9"},{"name":"Fetch Campaign","id":"4e26a565-a032-4fa9-b750-c82684311f87","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/campaigns/{{campaign_id}}","description":"<p>Fetch a campaign by id.</p>\n","urlObject":{"path":["v1","campaigns","{{campaign_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4e26a565-a032-4fa9-b750-c82684311f87"},{"name":"Create Campaign","event":[{"listen":"test","script":{"id":"1131a048-c109-493f-8283-ce3005dac37b","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"contact_group_id\", jsonData.id);"],"type":"text/javascript"}}],"id":"2f54aaec-3018-454b-aaca-ca053870628e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Campaign Test Name\"\n}"},"url":"{{external_api_host}}/v1/campaigns","description":"<p>Create a campaign.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>name</li>\n</ul>\n","urlObject":{"path":["v1","campaigns"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2f54aaec-3018-454b-aaca-ca053870628e"}],"id":"084f2c90-7e60-4118-9cc4-4ffbc59158f0","description":"<p>Endpoints for interacting with the Campaigns resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>string</td>\n<td>Generated hexadecimal identifier for campaign.</td>\n</tr>\n<tr>\n<td>name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name of the campaign.</td>\n</tr>\n<tr>\n<td>visible</td>\n<td>Yes</td>\n<td>boolean</td>\n<td>Whether the campaign is visible in the UI.</td>\n</tr>\n<tr>\n<td>start_date</td>\n<td>Yes</td>\n<td>datetime</td>\n<td>Starting date for the campaign.</td>\n</tr>\n<tr>\n<td>end_date</td>\n<td>Yes</td>\n<td>datetime</td>\n<td>Ending date for the campaign.</td>\n</tr>\n<tr>\n<td>archived</td>\n<td>Yes</td>\n<td>boolean</td>\n<td>Whether the campaign has been archived.</td>\n</tr>\n<tr>\n<td>internal_created_at</td>\n<td>Yes</td>\n<td>datetime</td>\n<td>Date the campaign was created in TE (read-only).</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"uniqueness\">Uniqueness</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Fields</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>name</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"filtering\">Filtering</h3>\n<p>Use the 'filter=attribute_name=x,attribute_name_2=y' query to return the list of campaigns that meet the filter criteria. For example, to filter campaigns started between Oct. 14, 2017 17:41:01 (UTC) and Oct. 15, 2017 17:41:09 (UTC), the following query could be used:</p>\n<p>/campaigns?filter=start_date_start=2017-10-14T17:41:01Z,start_date_end=2017-10-15T17:41:09Z</p>\n<p>The supported filter attributes are shown in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>start_date_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>start_date_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>end_date_start</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>end_date_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"d06193a6-1b64-4564-a86e-6c1135f02651","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"2e6bff4f-c655-4eed-ae53-c18806820a96","type":"text/javascript","exec":[""]}}],"_postman_id":"084f2c90-7e60-4118-9cc4-4ffbc59158f0"},{"name":"Campaign Activity","item":[{"name":"Create Campaign Activity","event":[{"listen":"test","script":{"id":"1131a048-c109-493f-8283-ce3005dac37b","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"contact_group_id\", jsonData.id);"],"type":"text/javascript"}}],"id":"36fbeb86-848c-4d6b-aad9-67311e903a32","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"touched_at\":\"2019-01-01 10:00:00\",\n  \"owner\": {\n  \t\"id\":50\n  },\n  \"contact\":{\n  \t\"id\":\"500\"\n  },\n  \"campaign\": {\n  \t\"id\":\"374363f2971dedcddae7502e5f920c35\"\n  }\n}"},"url":"{{external_api_host}}/v1/campaign-activity","description":"<p>Create a campaign activity.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>[none]</li>\n</ul>\n<p>Required Relationsips:</p>\n<ul>\n<li>contact</li>\n<li>campaign</li>\n</ul>\n","urlObject":{"path":["v1","campaign-activity"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"36fbeb86-848c-4d6b-aad9-67311e903a32"},{"name":"Delete Campaign Activity","event":[{"listen":"test","script":{"id":"1131a048-c109-493f-8283-ce3005dac37b","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"contact_group_id\", jsonData.id);"],"type":"text/javascript"}}],"id":"0259f258-ea13-423e-ad9d-5013a5a3ed93","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/campaign-activity/","description":"<p>Delete a campaign activity record by id.</p>\n","urlObject":{"path":["v1","campaign-activity",""],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"0259f258-ea13-423e-ad9d-5013a5a3ed93"},{"name":"Fetch Campaign Activities","id":"56f54c30-206c-4311-9bad-e813f3dee68e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/campaign-activity?page[number]=1&page[size]=100","description":"<p>Fetch a page of campaign activity records. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","campaign-activity"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"100"}],"variable":[]}},"response":[],"_postman_id":"56f54c30-206c-4311-9bad-e813f3dee68e"},{"name":"Fetch Campaign Activity","id":"134b6035-7a04-4d25-a80c-9d3b52ad9462","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/campaign-activity/{{campaign_activity_id}}","description":"<p>Fetch a campaign activity by id.</p>\n","urlObject":{"path":["v1","campaign-activity","{{campaign_activity_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"134b6035-7a04-4d25-a80c-9d3b52ad9462"}],"id":"63220b1b-ffd6-4e09-a8bb-a9e251b0de7d","description":"<p>Endpoints for interacting with the Campaign Activity resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>string</td>\n<td>Generated hexadecimal identifier for campaign activity.</td>\n</tr>\n<tr>\n<td>touched_at</td>\n<td>Yes</td>\n<td>datetime</td>\n<td>Timestamp the activity occurred.</td>\n</tr>\n<tr>\n<td>internal_created_at</td>\n<td>Yes</td>\n<td>string</td>\n<td>Timestamp the activity was created in TE (read-only).</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"uniqueness\">Uniqueness</h5>\n<p>Campaign activity is not deduplicated. Each post will create a new activity.</p>\n<hr />\n<h4 id=\"relationships\">Relationships</h4>\n<p>The \"owner\" section at the top level of the <code>POST</code>, <code>PATCH</code>, or <code>DELETE</code> is required when contacts are included in the request. All included contacts are created or updated for that owner, and only one owner can be used per request.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>owner</td>\n<td>Yes*</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>Owning user of the entity. One to many relationship, so returned as an object. *Only assignable/visible if authenticated as an organization admin.</td>\n</tr>\n<tr>\n<td>contact</td>\n<td>Yes</td>\n<td>Contact</td>\n<td>(See contact documentation)</td>\n<td>Contact for whom this activity occurred.</td>\n</tr>\n<tr>\n<td>campaign</td>\n<td>Yes</td>\n<td>Campaign</td>\n<td>id, name</td>\n<td>(See Related Entities Relationships Section, below)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"filtering\">Filtering</h3>\n<p>Use the 'filter=attribute_name=x,attribute_name_2=y' query to return the list of campaign activities that meet the filter criteria. For example, to filter campaign activities created between Oct. 14, 2017 17:41:01 (UTC) and Oct. 15, 2017 17:41:09 (UTC), the following query could be used:</p>\n<p>/campaign-activity?filter=internal_created_at_start=2017-10-14T17:41:01Z,internal_created_at_end=2017-10-15T17:41:09Z</p>\n<p>The supported filter attributes are shown in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>internal_created_at_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>internal_created_at_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>touched_at_start</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>touched_at_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>related_range_ext_field</td>\n<td>Related range extension field.</td>\n</tr>\n<tr>\n<td>contact_id</td>\n<td>ID for the contact.</td>\n</tr>\n<tr>\n<td>campaign_id</td>\n<td>Identifier for campaign.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"d06193a6-1b64-4564-a86e-6c1135f02651","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"2e6bff4f-c655-4eed-ae53-c18806820a96","type":"text/javascript","exec":[""]}}],"_postman_id":"63220b1b-ffd6-4e09-a8bb-a9e251b0de7d"}],"id":"9a8b96cd-3fc6-4310-ad39-8bf8c0ee6e6e","description":"<p>The following endpoints are in limited availability and are not recommended for general use. For questions about these endpoints, please reach out to support. </p>\n","_postman_id":"9a8b96cd-3fc6-4310-ad39-8bf8c0ee6e6e"}],"id":"60505d53-7df5-455e-9ae4-f1d7f3985057","description":"<p>The varying contact endpoints that are associated with the following collections are used for</p>\n<ul>\n<li><p>Adding contacts</p>\n</li>\n<li><p>Updating existing contacts</p>\n</li>\n<li><p>Transferring ownership of contacts</p>\n</li>\n<li><p>Obtaining the TE ID of contacts</p>\n</li>\n<li><p>Creating and submitting Contact Surveys</p>\n</li>\n<li><p>Creating contact groups, etc.</p>\n</li>\n</ul>\n<h3 id=\"tips-for-using-the-contact-endpoints\">Tips for using the Contact endpoints</h3>\n<ul>\n<li><p>You will see a “duplicate” response if utilizing the Create (POST) method for updating existing contacts. However, the original entity will be updated.</p>\n</li>\n<li><p>You may want to utilize more than one identifier, such as ‘email address,’ if your organization has overlap when specifying the owner of a contact based on the User’s External ID.</p>\n</li>\n<li><p>If the data field does not exist within your environment, it is better to not submit this attribute in the request – rather than submitting it as blank. Ex: Do not submit a date of “0000-00-00”</p>\n</li>\n<li><p>Only use valid dates when submitting through the API. Omit the attribute if the date does not exist.</p>\n</li>\n<li><p>The maximum number of contacts returned per page on a GET request is 100. Specify using ‘?page[size]=100’</p>\n</li>\n</ul>\n<h3 id=\"why-contacts-are-important\">Why Contacts Are Important</h3>\n<p>Ensuring that you have the most up-to-date contact information within your TE system allows you to confidently send relevant communication, enable the right kinds of marketing automation at the right time, strengthen both your new and past relationships with customers and increase your overall brand image.</p>\n<h3 id=\"contact-source\">Contact Source</h3>\n<p>If the contact is coming from a third-party lead generating source, such as LeadPops, Velocify, LendingTree, etc. it is recommended to call use the source attribute in the call.</p>\n<h3 id=\"contact-ownership\">Contact Ownership</h3>\n<p>Specifying the owner of a contact is important because they are the only user that has the ability to remove or share/assign the contact record to other users within the TE system.</p>\n<p>As an admin that is POSTing contacts to the TE system, you need to specify the contact’s owner. When specifying who the contact owner is, you can use the following settable fields within the request:</p>\n<ul>\n<li><p>Username</p>\n</li>\n<li><p>ID</p>\n</li>\n<li><p>External ID</p>\n</li>\n<li><p>Email<br />  You do not need to specify the contact’s owner if you have user-level authentication access.</p>\n</li>\n</ul>\n<h4 id=\"how-to-change-contact-ownership\">How to Change Contact Ownership</h4>\n<p>Similar to specifying the contact’s owner, you need to have admin-level authentication access. A POST call is required to update the owner of an already created contact. Simply include the contact ID and the updated owner ID in call. Deduplication logic will apply (see below for details).</p>\n<h3 id=\"contact-webhooks\">Contact Webhooks</h3>\n<p>Total Expert has webhooks for the following contact interactions:</p>\n<ul>\n<li><p>Contact Update</p>\n</li>\n<li><p>Contact Creation</p>\n</li>\n<li><p>Contact Archived</p>\n</li>\n</ul>\n<p>Check out the Webhook documentation for more details on how to subscribe to these webhooks.</p>\n","_postman_id":"60505d53-7df5-455e-9ae4-f1d7f3985057"},{"name":"Lead Opportunities (New)","item":[{"name":"Error Scenarios","item":[{"name":"Missing Required Fields","id":"961a3bbe-7f8e-4f67-977f-48c0c4e34b64","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"John\"\n}"},"url":"{{external_api_host}}/v1/lead-opportunities","description":"<p>Example error when required fields are missing.</p>\n<p><strong>Expected Response (400):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Missing required fields. Must provide: first_name, last_name, source, and either phone or email\"\n}\n</code></pre>\n","urlObject":{"path":["v1","lead-opportunities"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"961a3bbe-7f8e-4f67-977f-48c0c4e34b64"},{"name":"Invalid Filter Expression","id":"b6e28d92-b630-46d0-836c-9c2568b99340","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{external_api_host}}/v1/lead-opportunities?filter=invalidfilter","description":"<p>Example error for invalid filter syntax.</p>\n<p><strong>Expected Response (400):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Invalid filter expression: invalidfilter\"\n}\n</code></pre>\n","urlObject":{"path":["v1","lead-opportunities"],"host":["{{external_api_host}}"],"query":[{"key":"filter","value":"invalidfilter"}],"variable":[]}},"response":[],"_postman_id":"b6e28d92-b630-46d0-836c-9c2568b99340"},{"name":"Invalid Sort Field","id":"90b31341-c4b9-4a38-ade1-6aac68bbdb8e","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{external_api_host}}/v1/lead-opportunities?sort=invalid_field","description":"<p>Example error for invalid sort field.</p>\n<p><strong>Allowed Fields:</strong> created_at, updated_at, lead_stage, loan_purpose</p>\n<p><strong>Expected Response (400):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Invalid sort field: 'invalid_field'.\"\n}\n</code></pre>\n","urlObject":{"path":["v1","lead-opportunities"],"host":["{{external_api_host}}"],"query":[{"key":"sort","value":"invalid_field"}],"variable":[]}},"response":[],"_postman_id":"90b31341-c4b9-4a38-ade1-6aac68bbdb8e"},{"name":"Page Out of Range","id":"dd87e493-0c7c-40dd-a60c-1f40619c20d6","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{external_api_host}}/v1/lead-opportunities?page[number]=999","description":"<p>Example error when requesting a page beyond the result set.</p>\n<p><strong>Expected Response (422):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Page requested is outside of result set\"\n}\n</code></pre>\n","urlObject":{"path":["v1","lead-opportunities"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"999"}],"variable":[]}},"response":[],"_postman_id":"dd87e493-0c7c-40dd-a60c-1f40619c20d6"}],"id":"4fb5c1ff-b05f-447d-8adf-96aea472dfa2","description":"<p>Error scenarios demonstrating validation and boundary conditions.</p>\n","_postman_id":"4fb5c1ff-b05f-447d-8adf-96aea472dfa2"},{"name":"List Lead Opportunities (Default)","id":"02bb9c00-c506-49f5-9059-24369143ae99","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{external_api_host}}/v1/lead-opportunities","description":"<p>Retrieve a paginated list of lead opportunities with default settings.</p>\n<p><strong>Default Pagination:</strong></p>\n<ul>\n<li>Page 1</li>\n<li>25 items per page</li>\n</ul>\n<p><strong>Response:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"items\": [\n    {\n      \"id\": \"uuid\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"stage\": {\"id\": \"stage-1\", \"name\": \"New Lead\"},\n      \"product\": {\"type\": \"mortgage\", \"values\": {...}},\n      \"source\": {\"id\": 1, \"display_name\": \"Website\"},\n      \"assigned_user_id\": 789,\n      \"legacy_contact_id\": 456,\n      \"created_at\": \"2024-01-15T10:30:00Z\",\n      \"updated_at\": \"2024-01-16T14:20:00Z\"\n    }\n  ],\n  \"links\": {\"first\": 1, \"last\": 10, \"next\": 2, \"prev\": null}\n}\n</code></pre>\n<p><strong>cURL:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl \"{{external_api_host}}/v1/lead-opportunities\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Accept: application/json\"\n</code></pre>\n","urlObject":{"path":["v1","lead-opportunities"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"02bb9c00-c506-49f5-9059-24369143ae99"},{"name":"List with Pagination","id":"fb26ea56-a08d-4df1-a5fc-07555e5e965e","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{external_api_host}}/v1/lead-opportunities?page[number]=1&page[size]=10","description":"<p>Get lead opportunities with custom pagination settings.</p>\n<p><strong>Parameters:</strong></p>\n<ul>\n<li><code>page[number]</code> - Page number to retrieve (minimum: 1)</li>\n<li><code>page[size]</code> - Number of items per page (minimum: 1, default: 25)</li>\n</ul>\n<p><strong>cURL:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl \"{{external_api_host}}/v1/lead-opportunities?page[number]=1&amp;page[size]=10\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Accept: application/json\"\n</code></pre>\n","urlObject":{"path":["v1","lead-opportunities"],"host":["{{external_api_host}}"],"query":[{"description":{"content":"<p>Page number (default: 1, min: 1)</p>\n","type":"text/plain"},"key":"page[number]","value":"1"},{"description":{"content":"<p>Items per page (default: 25, min: 1)</p>\n","type":"text/plain"},"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"fb26ea56-a08d-4df1-a5fc-07555e5e965e"},{"name":"Filter by Contact ID","id":"f1a3d47e-9160-4ac7-a5fc-e3efed015f57","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{external_api_host}}/v1/lead-opportunities?filter=contact_id=456","description":"<p>Filter lead opportunities by a specific contact ID.</p>\n<p><strong>Supported Filters:</strong></p>\n<ul>\n<li><code>contact_id</code> - Contact identifier</li>\n<li><code>user_id</code> - User identifier</li>\n</ul>\n<p><strong>cURL:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl \"{{external_api_host}}/v1/lead-opportunities?filter=contact_id=456\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Accept: application/json\"\n</code></pre>\n","urlObject":{"path":["v1","lead-opportunities"],"host":["{{external_api_host}}"],"query":[{"description":{"content":"<p>Filter by contact ID</p>\n","type":"text/plain"},"key":"filter","value":"contact_id=456"}],"variable":[]}},"response":[],"_postman_id":"f1a3d47e-9160-4ac7-a5fc-e3efed015f57"},{"name":"Multiple Filters","id":"eeb3225d-f085-4000-a4a4-785a5064334e","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{external_api_host}}/v1/lead-opportunities?filter=user_id=789,contact_id=456","description":"<p>Filter by multiple fields using comma-separated expressions.</p>\n<p><strong>Syntax:</strong> <code>filter=field1=value1,field2=value2</code></p>\n<p><strong>cURL:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl \"{{external_api_host}}/v1/lead-opportunities?filter=user_id=789,contact_id=456\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Accept: application/json\"\n</code></pre>\n","urlObject":{"path":["v1","lead-opportunities"],"host":["{{external_api_host}}"],"query":[{"description":{"content":"<p>Multiple comma-separated filters</p>\n","type":"text/plain"},"key":"filter","value":"user_id=789,contact_id=456"}],"variable":[]}},"response":[],"_postman_id":"eeb3225d-f085-4000-a4a4-785a5064334e"},{"name":"Sort by Created Date (Descending)","id":"c470af38-6098-453f-8c43-0dd50998a554","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{external_api_host}}/v1/lead-opportunities?sort=-created_at","description":"<p>Sort lead opportunities by creation date, newest first.</p>\n<p><strong>Sort Format:</strong></p>\n<ul>\n<li><code>field</code> - Ascending order</li>\n<li><code>-field</code> - Descending order (with minus prefix)</li>\n</ul>\n<p><strong>Allowed Fields:</strong></p>\n<ul>\n<li><code>created_at</code></li>\n<li><code>updated_at</code></li>\n<li><code>lead_stage</code></li>\n<li><code>loan_purpose</code></li>\n</ul>\n<p><strong>cURL:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl \"{{external_api_host}}/v1/lead-opportunities?sort=-created_at\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Accept: application/json\"\n</code></pre>\n","urlObject":{"path":["v1","lead-opportunities"],"host":["{{external_api_host}}"],"query":[{"description":{"content":"<p>Sort descending (- prefix)</p>\n","type":"text/plain"},"key":"sort","value":"-created_at"}],"variable":[]}},"response":[],"_postman_id":"c470af38-6098-453f-8c43-0dd50998a554"},{"name":"Sort by Updated Date (Ascending)","id":"2a423512-7983-45b2-be39-cc7532a7e541","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{external_api_host}}/v1/lead-opportunities?sort=updated_at","description":"<p>Sort lead opportunities by update date, oldest first.</p>\n<p><strong>cURL:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl \"{{external_api_host}}/v1/lead-opportunities?sort=updated_at\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Accept: application/json\"\n</code></pre>\n","urlObject":{"path":["v1","lead-opportunities"],"host":["{{external_api_host}}"],"query":[{"description":{"content":"<p>Sort ascending</p>\n","type":"text/plain"},"key":"sort","value":"updated_at"}],"variable":[]}},"response":[],"_postman_id":"2a423512-7983-45b2-be39-cc7532a7e541"},{"name":"Combined - Filter, Sort, Paginate","id":"8ae25d54-d798-45c0-ba94-c7c51964e99c","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{external_api_host}}/v1/lead-opportunities?page[number]=1&page[size]=10&filter=contact_id=456&sort=-updated_at","description":"<p>Combine pagination, filtering, and sorting in a single request.</p>\n<p>This example:</p>\n<ul>\n<li><p>Returns page 1 with 10 items</p>\n</li>\n<li><p>Filters by contact_id=456</p>\n</li>\n<li><p>Sorts by most recently updated first</p>\n</li>\n</ul>\n<p><strong>cURL:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl \"{{external_api_host}}/v1/lead-opportunities?page[number]=1&amp;page[size]=10&amp;filter=contact_id=456&amp;sort=-updated_at\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Accept: application/json\"\n\n</code></pre>\n","urlObject":{"path":["v1","lead-opportunities"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"},{"key":"filter","value":"contact_id=456"},{"key":"sort","value":"-updated_at"}],"variable":[]}},"response":[],"_postman_id":"8ae25d54-d798-45c0-ba94-c7c51964e99c"},{"name":"Get Lead Opportunity by ID","id":"10294e79-2d80-43c3-a650-c7b36f82b462","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{external_api_host}}/v1/lead-opportunities/{{lead_opportunity_id}}","description":"<p>Retrieve a specific lead opportunity by its unique identifier.</p>\n<p><strong>Path Parameters:</strong></p>\n<ul>\n<li><code>id</code> - Lead opportunity UUID or alphanumeric ID</li>\n</ul>\n<p><strong>Response (200 OK):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n  \"first_name\": \"John\",\n  \"last_name\": \"Doe\",\n  \"stage\": {\"id\": \"stage-123\", \"name\": \"New Lead\"},\n  \"product\": {\"type\": \"mortgage\", \"values\": {...}},\n  \"source\": {\"id\": 1, \"display_name\": \"Website\"},\n  \"assigned_user_id\": 789,\n  \"legacy_contact_id\": 456,\n  \"created_at\": \"2024-01-15T10:30:00Z\",\n  \"updated_at\": \"2024-01-16T14:20:00Z\"\n}\n</code></pre>\n<p><strong>Response (404 Not Found):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Object with id '550e8400-e29b-41d4-a716-446655440000' not found\"\n}\n</code></pre>\n<p><strong>cURL:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl \"{{external_api_host}}/v1/lead-opportunities/550e8400-e29b-41d4-a716-446655440000\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Accept: application/json\"\n</code></pre>\n","urlObject":{"path":["v1","lead-opportunities","{{lead_opportunity_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"10294e79-2d80-43c3-a650-c7b36f82b462"},{"name":"Create Lead Opportunity (Minimal)","id":"98cb054a-0bc0-45b9-aab1-e11b58cbcc8f","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"John\",\n  \"last_name\": \"Doe\",\n  \"source\": \"website\",\n  \"email\": \"john.doe@example.com\"\n}"},"url":"{{external_api_host}}/v1/lead-opportunities","description":"<p>Create a lead opportunity with minimal required fields.</p>\n<p><strong>Required Fields (one combination):</strong></p>\n<ol>\n<li><code>first_name</code>, <code>last_name</code>, <code>source</code>, <code>phone</code></li>\n<li><code>first_name</code>, <code>last_name</code>, <code>source</code>, <code>email</code></li>\n</ol>\n<p><strong>Response (201 Created):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n  \"contact_id\": 456\n}\n</code></pre>\n<p><strong>cURL:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl -X POST \"{{external_api_host}}/v1/lead-opportunities\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"source\": \"website\",\n    \"email\": \"john.doe@example.com\"\n  }'\n</code></pre>\n","urlObject":{"path":["v1","lead-opportunities"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"98cb054a-0bc0-45b9-aab1-e11b58cbcc8f"},{"name":"Create Lead Opportunity (Full)","id":"8bf73512-4c4c-49fc-b94b-988f57849d01","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"John\",\n  \"last_name\": \"Doe\",\n  \"source\": \"website\",\n  \"phone\": \"555-123-4567\",\n  \"email\": \"john.doe@example.com\",\n  \"contact_id\": 456,\n  \"assigned_user\": {\n    \"user_id\": 789\n  },\n  \"product\": {\n    \"type\": \"mortgage\",\n    \"values\": {\n      \"loan_purpose\": \"Purchase\",\n      \"loan_amount\": 350000,\n      \"property_type\": \"Single-Family\",\n      \"property_state\": \"CA\",\n      \"credit_score\": 720\n    }\n  },\n  \"stage\": {\n    \"id\": \"1\",\n    \"name\": \"New Lead\"\n  },\n  \"referred_by\": \"Jane Smith\",\n  \"utm_source\": \"google\",\n  \"utm_campaign\": \"spring_sale\",\n  \"utm_medium\": \"cpc\"\n}"},"url":"{{external_api_host}}/v1/lead-opportunities","description":"<p>Create a lead opportunity with all available fields.</p>\n<p><strong>Optional Fields:</strong></p>\n<ul>\n<li><p><code>contact_id</code> - Existing contact ID</p>\n</li>\n<li><p><code>assigned_user_id</code> - User to assign</p>\n</li>\n<li><p><code>product.type</code> and <code>product.values</code> - Must be provided together</p>\n</li>\n<li><p><code>product.values.loan_purpose</code> - Required when product provided</p>\n</li>\n<li><p><code>stage.id</code> and <code>stage.name</code> - Stage assignment</p>\n</li>\n<li><p><code>referred_by</code> - Referrer name</p>\n</li>\n<li><p><code>utm_source</code>, <code>utm_campaign</code>, <code>utm_medium</code>: marketing attribution values (all optional, strings)</p>\n</li>\n</ul>\n<p><strong>cURL:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl -X POST \"{{external_api_host}}/v1/lead-opportunities\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"source\": \"website\",\n    \"phone\": \"555-123-4567\",\n    \"email\": \"john.doe@example.com\",\n    \"assigned_user_id\": 789,\n    \"product\": {\n      \"type\": \"mortgage\",\n      \"values\": {\n        \"loan_purpose\": \"purchase\",\n        \"loan_amount\": 350000\n      }\n    },\n    \"stage\": {\"id\": \"stage-123\", \"name\": \"New Lead\"},\n    \"referred_by\": \"Jane Smith\",\n    \"utm_source\": \"google\",\n    \"utm_campaign\": \"spring_sale\",\n    \"utm_medium\": \"cpc\"\n  }'\n\n</code></pre>\n","urlObject":{"path":["v1","lead-opportunities"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"8bf73512-4c4c-49fc-b94b-988f57849d01"},{"name":"Update Lead Opportunity","id":"752a6e41-778a-4d65-869c-feed73139226","request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"contact_id\": 456,\n  \"first_name\": \"Jane\",\n  \"last_name\": \"Smith\",\n  \"email\": \"jane.smith@example.com\",\n  \"assigned_user\": {\n    \"user_id\": 999\n  },\n  \"product\": {\n    \"values\": {\n      \"loan_amount\": 400000,\n      \"credit_score\": 750\n    }\n  },\n  \"stage\": {\n    \"id\": \"stage-456\"\n  },\n  \"utm_source\": \"bing\",\n  \"utm_campaign\": \"summer_promo\",\n  \"utm_medium\": \"email\"\n}"},"url":"{{external_api_host}}/v1/lead-opportunities/{{lead_opportunity_id}}","description":"<p>Update an existing lead opportunity.</p>\n<p><strong>Required:</strong> <code>contact_id</code> (always required for updates)</p>\n<p><strong>Update Behavior:</strong>\nThree independent operations:</p>\n<ol>\n<li>Assignment update (assigned_user_id)</li>\n<li>Stage update (stage.id)</li>\n<li>Lead opportunity update (other fields)</li>\n</ol>\n<p><strong>Product Values:</strong> Partial updates merge with existing values.</p>\n<p><strong>Marketing attribution:</strong> <code>utm_source</code>, <code>utm_campaign</code>, <code>utm_medium</code> are optional strings, each patched independently. Omit a field to leave its stored value unchanged; send a field to overwrite it.</p>\n<p><strong>Response (200 OK):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"leadOpportunity\": {\"id\": \"...\", \"contact_id\": 456},\n  \"errors\": {\"stage\": \"Failed to update stage\"}\n}\n</code></pre>\n<p><strong>cURL Examples:</strong></p>\n<p>Update assignment:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl -X PATCH \"{{external_api_host}}/v1/lead-opportunities/550e8400-e29b-41d4-a716-446655440000\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"contact_id\": 456, \"assigned_user_id\": 999}'\n</code></pre>\n<p>Update product:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl -X PATCH \"{{external_api_host}}/v1/lead-opportunities/550e8400-e29b-41d4-a716-446655440000\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"contact_id\": 456, \"product\": {\"values\": {\"loan_amount\": 400000}}}'\n</code></pre>\n<p>Update marketing attribution:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl -X PATCH \"{{external_api_host}}/v1/lead-opportunities/550e8400-e29b-41d4-a716-446655440000\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"contact_id\": 456, \"utm_source\": \"bing\", \"utm_campaign\": \"summer_promo\", \"utm_medium\": \"email\"}'\n</code></pre>\n","urlObject":{"path":["v1","lead-opportunities","{{lead_opportunity_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"752a6e41-778a-4d65-869c-feed73139226"}],"id":"95a16720-fefb-4598-8bf0-e718d3c369d1","description":"<p><strong>Important Note:</strong> As part of Total Expert’s new Lead Management feature, this new endpoint has been created. Because both the new endpoint (v1/lead-opportunities) and the existing (v1/leads) endpoint deal with “leads” in the platform, there is a conflict with the nomenclature used by both endpoints.</p>\n<p><em>This section of the documentation refers exclusively to the new v1/lead-opportunities endpoint.</em></p>\n<p><em>For information on the older v1/leads endpoint, formerly called Lead Opportunities in the documentation, please see the “ALM Leads (formerly Lead Opportunities)” section.</em></p>\n<p><em>Unless and until further notice, users cannot utilize both endpoints concurrently.</em></p>\n<p>The Lead Opportunities endpoints allow lead providers to POST, GET, and PATCH lead and lead opportunity details, including offer details and custom fields.</p>\n<p><strong>Base Endpoint</strong>: <code>/v1/lead-opportunities</code><br /><strong>OAuth Scope</strong>: <code>leadOpportunitiesSalesPipelineInteraction</code></p>\n<hr />\n<h4 id=\"supported-operations\">Supported Operations</h4>\n<ul>\n<li><p><strong>GET</strong> <code>/v1/lead-opportunities</code> - List with pagination, filtering, and sorting</p>\n</li>\n<li><p><strong>GET</strong> <code>/v1/lead-opportunities/{id}</code> - Get specific lead opportunity</p>\n</li>\n<li><p><strong>POST</strong> <code>/v1/lead-opportunities</code> - Create new lead opportunity</p>\n</li>\n<li><p><strong>PATCH</strong> <code>/v1/lead-opportunities/{id}</code> - Update existing lead opportunity</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"pagination\">Pagination</h4>\n<p>All list endpoints support pagination:</p>\n<ul>\n<li><p><code>page[number]</code> - Page number (default: 1, min: 1)</p>\n</li>\n<li><p><code>page[size]</code> - Items per page (default: 25, min: 1)</p>\n</li>\n</ul>\n<p><strong>Response includes pagination links</strong>:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"items\": [...],\n  \"links\": {\"first\": 1, \"last\": 10, \"next\": 2, \"prev\": null}\n}\n\n</code></pre>\n<hr />\n<h4 id=\"filtering\">Filtering</h4>\n<p>Use comma-separated <code>field=value</code> expressions:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>filter=contact_id=123,user_id=456\n\n</code></pre><p><strong>Supported Filter Fields</strong>:</p>\n<ul>\n<li><p><code>contact_id</code> - Filter by contact ID</p>\n</li>\n<li><p><code>user_id</code> - Filter by user ID</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"sorting\">Sorting</h4>\n<p>Use <code>sort</code> query parameter with optional <code>-</code> prefix for descending:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>sort=created_at        # Ascending\nsort=-updated_at       # Descending\n\n</code></pre><p><strong>Allowed Sort Fields</strong>:</p>\n<ul>\n<li><p><code>created_at</code> - Creation date</p>\n</li>\n<li><p><code>updated_at</code> - Last update date</p>\n</li>\n<li><p><code>lead_stage</code> - Lead stage</p>\n</li>\n<li><p><code>loan_purpose</code> - Loan purpose</p>\n</li>\n</ul>\n<p><strong>Behavior</strong>:</p>\n<ul>\n<li><p>Uses first field only if multiple provided</p>\n</li>\n<li><p>Case-insensitive, whitespace trimmed</p>\n</li>\n<li><p>Invalid field returns 400 error</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"required-fields-for-creation\">Required Fields for Creation</h4>\n<p><strong>Must provide ONE of these combinations</strong>:</p>\n<ol>\n<li><p><code>first_name</code>, <code>last_name</code>, <code>source</code>, <code>phone</code></p>\n</li>\n<li><p><code>first_name</code>, <code>last_name</code>, <code>source</code>, <code>email</code></p>\n</li>\n</ol>\n<hr />\n<h4 id=\"product-validation\">Product Validation</h4>\n<ul>\n<li><p><code>product.type</code> and <code>product.values</code> must be provided together</p>\n</li>\n<li><p><code>product.values.loan_purpose</code> is <strong>required</strong> when product is provided</p>\n</li>\n<li><p>Partial updates merge new values with existing product values</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"update-requirements\">Update Requirements</h4>\n<ul>\n<li><p><code>contact_id</code> is <strong>always required</strong> for PATCH requests</p>\n</li>\n<li><p>Updates target three independent areas:</p>\n<ol>\n<li><p>Assignment (<code>assigned_user</code>)</p>\n<ol>\n<li><p><code>user_id</code></p>\n</li>\n<li><p><code>email</code></p>\n</li>\n</ol>\n</li>\n</ol>\n</li>\n</ul>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">  \"assigned_user\": {\n    \"user_id\": 789\n  },\n\n</code></pre>\n<p>or</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">  \"assigned_user\": {\n    \"email\": \"john@example.com\"\n  },\n\n</code></pre>\n<ul>\n<li><p>Stage (<code>stage.id</code>)</p>\n</li>\n<li><p>Lead Opportunity data (other fields)</p>\n</li>\n<li><p>Partial failures return both successes and errors</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"error-response-codes\">Error Response Codes</h4>\n<ul>\n<li><p><strong>400</strong> - Bad request (invalid body, missing fields, invalid filter/sort)</p>\n</li>\n<li><p><strong>404</strong> - Not found (lead opportunity doesn't exist)</p>\n</li>\n<li><p><strong>422</strong> - Unprocessable entity (page number out of range)</p>\n</li>\n<li><p><strong>500</strong> - Internal server error</p>\n</li>\n</ul>\n<hr />\n<h4 id=\"valid-attributes\">Valid Attributes</h4>\n<p>The following list of values are valid on the product entity.</p>\n<p><strong>Loan Purpose Options</strong> <code>product.values.loan_purpose</code></p>\n<ul>\n<li><p>Purchase</p>\n</li>\n<li><p>Refinance - No Cash Out</p>\n</li>\n<li><p>Refinance - Cash Out</p>\n</li>\n<li><p>HELOC</p>\n</li>\n<li><p>Home Equity Loan</p>\n</li>\n<li><p>Reverse Mortgage</p>\n</li>\n<li><p>Second Mortgage</p>\n</li>\n<li><p>Construction Loan</p>\n</li>\n<li><p>Other</p>\n</li>\n<li><p>TBD</p>\n</li>\n</ul>\n<p><strong>Property Type Options</strong> <code>product.values.property_type</code></p>\n<ul>\n<li><p>Single-Family</p>\n</li>\n<li><p>2-4 Unit</p>\n</li>\n<li><p>Condo</p>\n</li>\n<li><p>Co-op</p>\n</li>\n<li><p>Manufactured Housing</p>\n</li>\n<li><p>Planned Unit Development (PUD)</p>\n</li>\n<li><p>Other</p>\n</li>\n</ul>\n<p><strong>Stage Names</strong> <code>stage.name</code></p>\n<ul>\n<li><p>NewLead</p>\n</li>\n<li><p>ContactAttempted</p>\n</li>\n<li><p>Engaged</p>\n</li>\n<li><p>ApplicationStarted</p>\n</li>\n<li><p>ApplicationSubmitted</p>\n</li>\n<li><p>PreApproved</p>\n</li>\n<li><p>InProcess</p>\n</li>\n<li><p>Closed</p>\n</li>\n</ul>\n<p><strong>Occupancy</strong> <code>product.values.occupancy</code></p>\n<ul>\n<li><p>Primary Residence</p>\n</li>\n<li><p>Second Home</p>\n</li>\n<li><p>Investment</p>\n</li>\n<li><p>Other</p>\n</li>\n</ul>\n<p><strong>Self Reported Credit Rating</strong> <code>product.values.self_reported_credit_rating</code></p>\n<ul>\n<li><p>Excellent</p>\n</li>\n<li><p>Good</p>\n</li>\n<li><p>Fair</p>\n</li>\n<li><p>Poor</p>\n</li>\n</ul>\n<p><strong>Desired Timeframe</strong> <code>product.values.desired_timeframe</code></p>\n<ul>\n<li><p>Next 30 days</p>\n</li>\n<li><p>3 months</p>\n</li>\n<li><p>6 months</p>\n</li>\n<li><p>6+ months</p>\n</li>\n</ul>\n<p><strong>Found Home/ Veteran / First Time Buyer found under</strong> <code>product.values</code></p>\n<ul>\n<li><p>Yes</p>\n</li>\n<li><p>No</p>\n</li>\n<li><p>Unknown</p>\n</li>\n</ul>\n<p><strong>Stage Id Mapping</strong></p>\n<p>1: New Lead</p>\n<p>2: Contact Attempted</p>\n<p>3: Engaged</p>\n<p>4: Application Started</p>\n<p>5: Application Submitted</p>\n<p>6: Pre-Approved</p>\n<p>7: In Process</p>\n<p>8: Closed</p>\n<hr />\n<h4 id=\"quick-examples\">Quick Examples</h4>\n<p><strong>Create a Lead</strong>:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl -X POST \"{{external_api_host}}/v1/lead-opportunities\" \\\n  -H \"Authorization: Bearer TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"first_name\":\"John\",\"last_name\":\"Doe\",\"source\":\"website\",\"email\":\"john@example.com\"}'\n\n</code></pre>\n<p><strong>List with Filters</strong>:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl \"{{external_api_host}}/v1/lead-opportunities?page[size]=10&amp;filter=contact_id=456&amp;sort=-created_at\" \\\n  -H \"Authorization: Bearer TOKEN\"\n\n</code></pre>\n<p><strong>Update Assignment</strong>:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl -X PATCH \"{{external_api_host}}/v1/lead-opportunities/{id}\" \\\n  -H \"Authorization: Bearer TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"contact_id\":456,\"assigned_user_id\":789}'\n\n</code></pre>\n","_postman_id":"95a16720-fefb-4598-8bf0-e718d3c369d1"},{"name":"Custom Fields","item":[],"id":"e2c1510b-60df-4add-9d22-227d198dce7c","description":"<p>Interacting with the Custom Fields relationships.</p>\n<p>Custom Fields cannot be accessed directly. For the several endpoints that can be related to custom fields, interacting with Custom Fields is similar to other relationships.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>description</td>\n<td>No</td>\n<td>string</td>\n<td>Short description of the custom field.</td>\n</tr>\n<tr>\n<td>field_name</td>\n<td>No</td>\n<td>string</td>\n<td>System name (used as identifier) for the custom field.</td>\n</tr>\n<tr>\n<td>value</td>\n<td>Yes</td>\n<td>mixed</td>\n<td>Value of the custom field*.</td>\n</tr>\n</tbody>\n</table>\n</div><p>*The value must match the specified data format used when creating the custom field definition.</p>\n<hr />\n<h3 id=\"as-relationships\">As Relationships</h3>\n<p>This relationship is to be used through other entities that support custom fields. See the attributes list above for those that appear in <code>GET</code> responses.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>custom</td>\n<td>Custom Fields</td>\n<td>field_name, value</td>\n<td>Custom Field Values to add to the entity.</td>\n</tr>\n</tbody>\n</table>\n</div><p>The 'field_name' field is used as the identifier in the context of the entity you are interacting with. For example, when interacting with a <code>contact</code>, the field_name is a unique identifier for <code>contact</code> entities and your organization.</p>\n<hr />\n<h3 id=\"special-postpatch-value-handling\">Special POST/PATCH 'Value' Handling</h3>\n<p>Unlike other relationships, custom field values are deleted by setting the 'value' field to null. Note that there is no \"remove relationship\" for custom fields.</p>\n","event":[{"listen":"prerequest","script":{"id":"e9cf5f01-65dd-417c-92ca-b5a508816842","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"74536fc9-7e74-47c4-a38e-1efaff1cbc88","type":"text/javascript","exec":[""]}}],"_postman_id":"e2c1510b-60df-4add-9d22-227d198dce7c"},{"name":"Insight Endpoints","item":[{"name":"Insight Types","item":[{"name":"Fetch Insight Types","id":"b556588b-2ac6-455b-ad75-fdaa06fc2a03","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/insight-types?page[number]=1&page[size]=10","description":"<p>Fetch a page of insight types. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","insight-types"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"},{"disabled":true,"key":"filter","value":"type=listings"}],"variable":[]}},"response":[],"_postman_id":"b556588b-2ac6-455b-ad75-fdaa06fc2a03"}],"id":"1db38283-5eba-47ef-9fda-b84d54673574","description":"<p>Endpoints for interacting with the Insight Types resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Generated identifier for insight.</td>\n</tr>\n<tr>\n<td>description</td>\n<td>No</td>\n<td>string</td>\n<td>Description of the insight type.</td>\n</tr>\n<tr>\n<td>expiration_interval</td>\n<td>No</td>\n<td>numeric</td>\n<td>The default time (in seconds) before an insight of this type expires.</td>\n</tr>\n<tr>\n<td>type</td>\n<td>No</td>\n<td>string</td>\n<td>The unique system name for this insight type.</td>\n</tr>\n<tr>\n<td>internal_created_at</td>\n<td>No</td>\n<td>string</td>\n<td>Date of creation of this insight type in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>internal_updated_at</td>\n<td>No</td>\n<td>string</td>\n<td>Date of last change for this insight type in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"filtering\">Filtering</h3>\n<p>Use the 'filter=attribute_name=x,attribute_name_2=y' query to return the list of insight types that meet the filter criteria. For example, to filter insights by type 'property', the following query could be used:</p>\n<p>/insight-types?filter=type=property</p>\n<p>The supported filter attributes are shown in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>type</td>\n<td>Type of insight type</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"5e8bc395-cfd1-49bd-8090-9e9b2d81495c","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"582a16af-5e9b-426f-92df-bf4714a736a3","type":"text/javascript","exec":[""]}}],"_postman_id":"1db38283-5eba-47ef-9fda-b84d54673574"},{"name":"Insights","item":[{"name":"Fetch Insight","id":"759b1667-b9e2-4eed-8b6f-9bb1e6a93c4d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/insights/{{insight_id}}","description":"<p>Fetch a specific insight specified by ID.</p>\n","urlObject":{"path":["v1","insights","{{insight_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"759b1667-b9e2-4eed-8b6f-9bb1e6a93c4d"},{"name":"Fetch Insights","id":"1c4dee1e-5565-497c-9d49-302bd9d24c5e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/insights?page[number]=1&page[size]=10","description":"<p>Fetch a page of insights. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","insights"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"1c4dee1e-5565-497c-9d49-302bd9d24c5e"},{"name":"Create Insight (as Admin)","event":[{"listen":"test","script":{"id":"35788950-547d-4e37-aacb-63b17da28c73","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"contact_id\", jsonData.id);"],"type":"text/javascript"}}],"id":"bd2a8932-de33-4eb8-b05b-7736d95ac93d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"data\": {\n\t\t\"description\": \"This insight is very insightful\"\n\t},\n\t\"insight_date\": \"2020-04-12 12:34:56\",\n\t\"owner\": {\n\t\t\"id\": 50\n\t},\n\t\"contact\": {\n\t\t\"id\": 451\n\t},\n\t\"type\": {\n\t\t\"id\": 7\n\t}\n}"},"url":"{{external_api_host}}/v1/insights","description":"<p>Create an Insight.</p>\n<p>Required Relationships:</p>\n<ul>\n<li>owner*</li>\n<li>type</li>\n<li>contact</li>\n</ul>\n<p>*required if authenticated as an organization admin</p>\n","urlObject":{"path":["v1","insights"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"bd2a8932-de33-4eb8-b05b-7736d95ac93d"},{"name":"Create Insight (as User)","event":[{"listen":"test","script":{"id":"836e39fa-d5eb-4d42-888f-498652d4b5e4","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"contact_id\", jsonData.id);"],"type":"text/javascript"}}],"id":"18a18a94-ec7a-4be9-9f8e-ad6812fd73b1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"data\": {\n\t\t\"description\": \"This insight is very insightful\"\n\t},\n\t\"insight_date\": \"2020-04-12 12:34:56\",\n\t\"contact\": {\n\t\t\"id\": 451\n\t},\n\t\"type\": {\n\t\t\"id\": 7\n\t}\n}"},"url":"{{external_api_host}}/v1/insights","description":"<p>Create an Insight.</p>\n<p>Required Relationships:</p>\n<ul>\n<li>type</li>\n<li>contact</li>\n</ul>\n","urlObject":{"path":["v1","insights"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"18a18a94-ec7a-4be9-9f8e-ad6812fd73b1"}],"id":"76ff22f7-11b1-4db1-90a1-3e6ec9900227","description":"<p>Endpoints for interacting with the Insights resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Generated identifier for insight.</td>\n</tr>\n<tr>\n<td>data</td>\n<td>Yes</td>\n<td>object</td>\n<td>Additional data pertaining to this insight.</td>\n</tr>\n<tr>\n<td>expires_at</td>\n<td>Yes</td>\n<td>string</td>\n<td>Date of expiration of this insight. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>insight_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>Date of creation of this insight in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>internal_updated_at</td>\n<td>No</td>\n<td>string</td>\n<td>Date of last change for this insight in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"filtering\">Filtering</h4>\n<p>Use the 'filter=attribute_name=x,attribute_name_2=y' query to return the list of insight types that meet the filter criteria. For example, to filter insights by owner email, the following query could be used:</p>\n<p>insights?filter=owner_email=<a href=\"mailto:test@test.com\">test@test.com</a></p>\n<p>The supported filter attributes are shown in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>owner_email</td>\n<td>Insight owner email address</td>\n</tr>\n<tr>\n<td>owner_id</td>\n<td>Insight owner id</td>\n</tr>\n<tr>\n<td>owner_external_id</td>\n<td>Insight owner external id</td>\n</tr>\n<tr>\n<td>type_id</td>\n<td>Insight type id</td>\n</tr>\n<tr>\n<td>contact_id</td>\n<td>Contact id</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"insight-data\">Insight Data</h4>\n<p>Additional, unstructured data can be passed in through this field as applicable for your insight and insight type. Some integrations make use of this data, and may require a specific schema unless otherwise noted. We recommend passing a <code>description</code> key into this field at a minimum.</p>\n<hr />\n<h5 id=\"relationships\">Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>owner</td>\n<td>Yes*</td>\n<td>User</td>\n<td>username, id, external_id</td>\n<td>Owning user of the contact. One to many relationship, so returned as an object. *Only assignable/visible if authenticated as an organization admin.</td>\n</tr>\n<tr>\n<td>contact</td>\n<td>Yes</td>\n<td>Contact</td>\n<td>See contact documentation for uniqueness options.</td>\n<td>Contact associated with this insight.</td>\n</tr>\n<tr>\n<td>type</td>\n<td>Yes</td>\n<td>InsightType</td>\n<td>id, type</td>\n<td>Type of insight. See Insight Types documentation for more information.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"d80df47b-d280-46dd-9771-62a0c581f4d0","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"6e08863b-d0ce-4cc0-b0ba-2d12c0e9b081","type":"text/javascript","exec":[""]}}],"_postman_id":"76ff22f7-11b1-4db1-90a1-3e6ec9900227"}],"id":"70f27fd7-40ae-45f8-9b0b-8c6841fdbcc1","description":"<p>With the Total Expert Insights API, you can provide insights from events occurring within your platform which can be leveraged to drive marketing automation in Total Expert. For example, a user downloading your mobile app could trigger an insight via our API called \"Mobile App Downloaded\" which would then trigger marketing automation that sends an email about all the features within the mobile app. </p>\n<h5 id=\"advantages-of-insights\">Advantages of Insights</h5>\n<ul>\n<li>Insights can be used to trigger a marketing automation flow within Total Expert. </li>\n<li>Insights can be used to create a custom Focused View of contacts within Total Expert.</li>\n</ul>\n<h5 id=\"insight-structure\">Insight Structure</h5>\n<p>To begin using insights through the API, you will need to coordinate with our team to create new insight types specific to your integration. Once these insight types are created, they can be used to create insights associated with any contact within TE (that you have access to).  </p>\n<p>Our standard naming convention for insight types is to prefix them with the integration partner’s name. For Example: “Lending Software: Loan application submitted”.  </p>\n<p>When submitting an insight for a contact you are able to provide a description within the insight that will show up within Total Expert. That area is freeform text and will not be formatted within Total Expert but is available to provide additional context around an insight.  </p>\n","_postman_id":"70f27fd7-40ae-45f8-9b0b-8c6841fdbcc1"},{"name":"User Endpoints","item":[{"name":"Users","item":[{"name":"Fetch User","id":"1f7139f2-33e4-4cf2-b9d8-63692b31d1b7","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/users/{{user_id}}","description":"<p>Fetch a specific user by ID.</p>\n","urlObject":{"path":["v1","users","{{user_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1f7139f2-33e4-4cf2-b9d8-63692b31d1b7"},{"name":"Fetch Users","id":"a2de5549-4e71-4656-bd3b-1e6d2b4e5618","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/users?page[number]=1&page[size]=10","description":"<p>Fetch a page of users. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","users"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"a2de5549-4e71-4656-bd3b-1e6d2b4e5618"},{"name":"Create Users","id":"e6a13529-13ee-4b3f-a5d6-5877e0078307","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"email\": \"fred@example.com\",\r\n\t\"status\": 0,\r\n\t\"type\": \"Lender\",\r\n\t\"role\": {\r\n\t\t\"role_name\": \"Real Estate Lender\"\r\n\t},\r\n\t\"info\": {\r\n\t\t\"job_title\": \"Real Estate Loan Officer\",\r\n\t\t\"first_name\": \"Fred\",\r\n\t\t\"last_name\": \"Smith\",\r\n\t\t\"company\": \"Big Lender\",\r\n\t\t\"website\": \"http://biglender.com/freddy\",\r\n\t\t\"testimonial_url\": \"http://biglender.com/freddy/testimonials\",\r\n\t\t\"phone_cell\": \"612-100-200\",\r\n\t\t\"phone_fax\": \"612-300-400\",\r\n\t\t\"phone_office\": \"612-500-600\",\r\n\t\t\"address\": \"123 Main St.\",\r\n\t\t\"address_2\": \"Suite 1\",\r\n\t\t\"city\": \"Eden Prairie\",\r\n\t\t\"state\": \"MN\",\r\n\t\t\"zip_code\": \"55346\",\r\n\t\t\"cost_center\": \"18\",\r\n\t\t\"timezone_name\": \"America/Chicago\",\r\n\t\t\"location_id\": \"1\"\r\n\t},\r\n\t\"settings_marketing\": {\r\n\t\t\"agent_bio\": \"Freddy is a loan officer\",\r\n\t\t\"application_url\": \"apply.biglender.com\",\r\n\t\t\"disclaimer\": \"Freddy disclaimer text\",\r\n\t\t\"icon_one_img_url\": \"https://totalexpert.com/icon1.jpg\",\r\n\t\t\"icon_two_img_url\": \"https://totalexpert.com/icon2.jpg\",\r\n\t\t\"icon_three_img_url\": \"https://totalexpert.com/icon3.jpg\",\r\n\t\t\"logo_img_url\": \"https://totalexpert.com/freddy_logo.jpg\",\r\n\t\t\"license_title\": \"Bonafide loan officer\",\r\n\t\t\"profile_img_url\": \"https://totalexpert.com/freddy_profile.jpg\",\r\n\t\t\"short_name\": \"FreddyS\",\r\n\t\t\"social_facebook\": \"freddy.facebook.com\",\r\n\t\t\"social_twitter\": \"freddy.twitter.com\",\r\n\t\t\"social_google\": \"freddy.google.com\",\r\n\t\t\"social_linkedin\": \"freddy.linkedin.com\",\r\n\t\t\"daily_spend_threshold\": \"200\",\r\n\t\t\"user_quote\": \"Changing the world, one close at a time\",\r\n\t\t\"weekly_spend_threshold\": \"800\",\r\n\t\t\"wistia_id\": \"XYZ\"\r\n\t\t\r\n\t},\r\n\t\"expenditure_approver\": {\r\n\t\t\"username\": \"cadence\"\r\n\t},\r\n\t\"licenses\": [{\r\n\t\t\t\"license_name\": \"MN\",\r\n\t\t\t\"content\": \"LIC 12345\"\r\n\t\t}, {\r\n\t\t\t\"license_name\": \"IA\",\r\n\t\t\t\"content\": \"LIC 54321\"\r\n\t\t}\r\n\t],\r\n    \"disclaimers\": [{\r\n        \"disclaimer_name\": \"Flyer Disclaimer\",\r\n        \"content\": \"Subject to change\",\r\n        \"type\": {\r\n            \"name\": \"Print Disclaimer\"\r\n        }\r\n    }, {\r\n        \"disclaimer_name\": \"New Customer Email Disclaimer\",\r\n        \"content\": \"Subject to change\",\r\n        \"type\": {\r\n            \"name\": \"Email Disclaimer\"\r\n        }\r\n    }],\r\n\t\"teams\": [{\r\n\t\t\t\"team_name\": \"Alice Sunny Team\",\r\n\t\t\t\"managers\": [{\r\n\t\t\t\t\t\"username\": \"alice\"\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t}, {\r\n\t\t\t\"team_name\": \"Regional Team - West\",\r\n\t\t\t\"managers\": [{\r\n\t\t\t\t\t\"username\": \"grant\"\r\n\t\t\t\t}, {\r\n\t\t\t\t\t\"username\": \"dominic\"\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t}\r\n\t]\r\n}"},"url":"{{external_api_host}}/v1/users","description":"<p>Create a user.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>email</li>\n<li>type</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>info</li>\n<li>role</li>\n</ul>\n","urlObject":{"path":["v1","users"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e6a13529-13ee-4b3f-a5d6-5877e0078307"},{"name":"Update User","id":"c3dcb204-0cf3-4876-8225-6f2c65dc1f94","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"info\": {\r\n\t\t\"job_title\": \"Manager\"\r\n\t},\r\n\t\"settings_marketing\": {\r\n\t\t\"weekly_spend_threshold\":\"400\"\r\n\t},\r\n\t\"licenses\":[{\r\n\t\t\"license_name\":\"MN\",\r\n\t\t\"content\":\"LIC 12345\"\r\n\t\t} \r\n\t], \r\n\t\"remove_licenses\":[{\r\n\t\t\"license_name\":\"IA\", \r\n\t\t\"content\":\"LIC 54321\"\r\n\t\t} \r\n\t],\r\n    \"disclaimers\": [{\r\n        \"disclaimer_name\": \"Flyer Disclaimer\",\r\n        \"content\": \"Subject to change\",\r\n        \"type\": {\r\n            \"name\": \"Print Disclaimer\"\r\n        }\r\n    }],\r\n    \"remove_disclaimers\": [{\r\n        \"disclaimer_name\": \"New Customer Email Disclaimer\",\r\n        \"content\": \"Subject to change\",\r\n        \"type\": {\r\n            \"name\": \"Email Disclaimer\"\r\n        }\r\n    }],\r\n\t\"teams\":[\r\n\t\t{\r\n\t\t\t\"team_name\": \"Fred's Team\",\r\n\t\t\t\"managers\" : [{\"username\": \"freddy\"}]\r\n\t\t} \r\n\t], \r\n\t\"remove_teams\":[\r\n\t\t{\r\n\t\t\t\"team_name\": \"Alice Sunny's Team\", \r\n\t\t\t\"managers\" : [{\"username\": \"alice\"}] \r\n\t\t} \r\n\t]\r\n}"},"url":"{{external_api_host}}/v1/users/{{user_id}}","description":"<p>Update a user</p>\n","urlObject":{"path":["v1","users","{{user_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c3dcb204-0cf3-4876-8225-6f2c65dc1f94"}],"id":"c39a3d8f-879f-4831-b1f0-61087d370aad","description":"<p>Endpoints for interacting with the users resource. These endpoints are restricted to organization admin users.</p>\n<hr />\n<h3 id=\"attributes\">Attributes</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Generated identifier for user.</td>\n</tr>\n<tr>\n<td>email</td>\n<td>Yes*</td>\n<td>string</td>\n<td>User's email address. *Cannot be modified after initial assignment.</td>\n</tr>\n<tr>\n<td>external_id</td>\n<td>Yes</td>\n<td>string</td>\n<td>User's external identifier.</td>\n</tr>\n<tr>\n<td>info</td>\n<td>Yes</td>\n<td>object</td>\n<td>Collection of user details. See the \"User Information Attributes\" table for available attributes.</td>\n</tr>\n<tr>\n<td>internal_created_at</td>\n<td>No</td>\n<td>string</td>\n<td>Date of creation of this user in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>internal_updated_at</td>\n<td>No</td>\n<td>string</td>\n<td>Date of last change for this user in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>last_login_date</td>\n<td>No</td>\n<td>string</td>\n<td>Date this user last logged into the TE system. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>licenses</td>\n<td>Yes</td>\n<td>Array of objects</td>\n<td>Collection of state user licenses. See the \"User Licenses Attributes\" table for available attributes.</td>\n</tr>\n<tr>\n<td>disclaimers</td>\n<td>Yes</td>\n<td>Array of objects</td>\n<td>Collection of disclaimers. See the \"User Disclaimers Attributes\" table for available attributes.</td>\n</tr>\n<tr>\n<td>settings_marketing</td>\n<td>Yes</td>\n<td>object</td>\n<td>Collection of user marketing settings. See the \"User Marketing Settings Attributes\" table for available attributes.</td>\n</tr>\n<tr>\n<td>status</td>\n<td>Yes</td>\n<td>integer</td>\n<td>0 - User is inactive. 1 - User is active. On user creation, if this is not provided, an active user is created.</td>\n</tr>\n<tr>\n<td>type</td>\n<td>Yes</td>\n<td>string</td>\n<td>One of: \"Realtor\", \"Lender\", \"Title\"</td>\n</tr>\n<tr>\n<td>username</td>\n<td>No</td>\n<td>string</td>\n<td>User's TE username. Read only. On user creation, this is generated from the user's email. For example, an email of \"<a href=\"mailto:John.Smith@totalexpert.com\">John.Smith@totalexpert.com</a>\" would create a username like \"john-smith-totalexpert####\", where none or up to four digits may be appended.</td>\n</tr>\n<tr>\n<td>saml_subject_id</td>\n<td>No</td>\n<td>string</td>\n<td>Custom subject ID for this user for SSO.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"user-information-attributes\">User Information Attributes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>address</td>\n<td>Yes</td>\n<td>string</td>\n<td>Street address portion of user's address.</td>\n</tr>\n<tr>\n<td>address_2</td>\n<td>Yes</td>\n<td>string</td>\n<td>Line 2 portion of user's address.</td>\n</tr>\n<tr>\n<td>city</td>\n<td>Yes</td>\n<td>string</td>\n<td>City portion of user's address.</td>\n</tr>\n<tr>\n<td>state</td>\n<td>Yes</td>\n<td>string</td>\n<td>State portion of user's address.</td>\n</tr>\n<tr>\n<td>zip_code</td>\n<td>Yes</td>\n<td>string</td>\n<td>Zip code portion of user's address.</td>\n</tr>\n<tr>\n<td>first_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>User's first name.</td>\n</tr>\n<tr>\n<td>last_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>User's last name.</td>\n</tr>\n<tr>\n<td>phone_cell</td>\n<td>Yes</td>\n<td>string</td>\n<td>User's cell phone number, preferred format: '(555)555-1234'</td>\n</tr>\n<tr>\n<td>phone_office</td>\n<td>Yes</td>\n<td>string</td>\n<td>User's office phone number, preferred format: '(555)555-1234'</td>\n</tr>\n<tr>\n<td>phone_fax</td>\n<td>Yes</td>\n<td>string</td>\n<td>User's fax number, preferred format: '(555)555-1234'</td>\n</tr>\n<tr>\n<td>job_title</td>\n<td>Yes</td>\n<td>string</td>\n<td>User's job title</td>\n</tr>\n<tr>\n<td>cost_center</td>\n<td>Yes</td>\n<td>string</td>\n<td>Value used for accounting purposes. Typically used by an organization to determine how a user is segmented for billing within the organization.</td>\n</tr>\n<tr>\n<td>website</td>\n<td>Yes</td>\n<td>string</td>\n<td>The user's homepage.</td>\n</tr>\n<tr>\n<td>testimonial_url</td>\n<td>Yes</td>\n<td>string</td>\n<td>Link to page (usually from user's website) that features testimonials about working with that user</td>\n</tr>\n<tr>\n<td>timezone_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>The time zone the user operates in.</td>\n</tr>\n<tr>\n<td>location_id</td>\n<td>Yes</td>\n<td>string</td>\n<td></td>\n</tr>\n<tr>\n<td>company</td>\n<td>Yes</td>\n<td>string</td>\n<td>Employer of user</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"user-marketing-settings-attributes\">User Marketing Settings Attributes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>agent_bio</td>\n<td>Yes</td>\n<td>string</td>\n<td>User's professional bio</td>\n</tr>\n<tr>\n<td>application_url</td>\n<td>Yes</td>\n<td>string</td>\n<td>Link to Loan Officer's page where a contact can start a loan application</td>\n</tr>\n<tr>\n<td>daily_spend_threshold</td>\n<td>Yes</td>\n<td>float</td>\n<td>Dollar amount user is authorized to spend of their organization cost share per day</td>\n</tr>\n<tr>\n<td>disclaimer</td>\n<td>Yes</td>\n<td>string</td>\n<td>User's disclaimer text.</td>\n</tr>\n<tr>\n<td>icon_one_img_url</td>\n<td>Yes</td>\n<td>string</td>\n<td>Link to image (1) to import for use in specific marketing material.</td>\n</tr>\n<tr>\n<td>icon_two_img_url</td>\n<td>Yes</td>\n<td>string</td>\n<td>Link to image (2) to import for use in specific marketing material.</td>\n</tr>\n<tr>\n<td>icon_three_img_url</td>\n<td>Yes</td>\n<td>string</td>\n<td>Link to image (3) to import for use in specific marketing material.</td>\n</tr>\n<tr>\n<td>license_title</td>\n<td>Yes</td>\n<td>string</td>\n<td>User's license title.</td>\n</tr>\n<tr>\n<td>logo_img_url</td>\n<td>Yes</td>\n<td>string</td>\n<td>Link to image to import as the user's logo image.</td>\n</tr>\n<tr>\n<td>profile_img_url</td>\n<td>Yes</td>\n<td>string</td>\n<td>Link to image to import as the user's TE profile image.</td>\n</tr>\n<tr>\n<td>short_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>User's short name which can be used for links in their email signatures</td>\n</tr>\n<tr>\n<td>social_facebook</td>\n<td>Yes</td>\n<td>string</td>\n<td>Link to personal or business page for the user on Facebook</td>\n</tr>\n<tr>\n<td>social_google</td>\n<td>Yes</td>\n<td>string</td>\n<td>Link to personal or business page for the user on Google</td>\n</tr>\n<tr>\n<td>social_linkedin</td>\n<td>Yes</td>\n<td>string</td>\n<td>Link to personal or business page for the user on LinkedIn</td>\n</tr>\n<tr>\n<td>social_twitter</td>\n<td>Yes</td>\n<td>string</td>\n<td>Link to personal or business page for the user on Twitter</td>\n</tr>\n<tr>\n<td>user_quote</td>\n<td>Yes</td>\n<td>string</td>\n<td>Secondary mission statement for the user. Used on specific marketing material.</td>\n</tr>\n<tr>\n<td>weekly_spend_threshold</td>\n<td>Yes</td>\n<td>float</td>\n<td>Dollar amount user is authorized to spend of their organization cost share per week</td>\n</tr>\n<tr>\n<td>wistia_id</td>\n<td>Yes</td>\n<td>string</td>\n<td>User's Wistia.com video identifier</td>\n</tr>\n<tr>\n<td>post_close_survey_url</td>\n<td>Yes</td>\n<td>string</td>\n<td>url for the user's post close survey</td>\n</tr>\n</tbody>\n</table>\n</div><p>Acceptable formats for images (any of the *_img_url fields) are: jpeg, jpg, png, and gif. The domains which host the image URLs must be pre-registered with Total Expert.</p>\n<h4 id=\"user-disclaimer-attributes\">User Disclaimer Attributes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Assignable</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>disclaimer_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name of the disclaimer.</td>\n</tr>\n<tr>\n<td>content</td>\n<td>Yes</td>\n<td>string</td>\n<td>Content of the disclaimer.</td>\n</tr>\n<tr>\n<td>type</td>\n<td>Yes</td>\n<td>object</td>\n<td>Type of the disclaimer. Please see \"User Disclaimer Type Attributes\" table for available attributes.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"user-disclaimer-type-attributes\">User Disclaimer Type Attributes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Assignable</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Type of the disclaimer. The available types are 'Print Disclaimer', 'Web Disclaimer', 'Email Disclaimer', 'License Number', and 'Sub-Disclaimer'</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"user-license-attributes\">User License Attributes</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>license_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name of license. For example, a U.S. state abbreviation.</td>\n</tr>\n<tr>\n<td>content</td>\n<td>Yes</td>\n<td>string</td>\n<td>Content of license. For example, the license number.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"uniqueness\">Uniqueness</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Fields</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>username</td>\n</tr>\n<tr>\n<td>2</td>\n<td>email</td>\n</tr>\n<tr>\n<td>3</td>\n<td>external_id</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"relationships\">Relationships</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>expenditure_approver</td>\n<td>Yes</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>User responsible for approving overages on daily or weekly organization cost share threshold.</td>\n</tr>\n<tr>\n<td>role</td>\n<td>Yes</td>\n<td>User Role</td>\n<td>id, role_name</td>\n<td>Role of the user.</td>\n</tr>\n<tr>\n<td>teams</td>\n<td>Yes</td>\n<td>Team</td>\n<td>id, team_name</td>\n<td>Teams to add this user to. Array of Team objects.</td>\n</tr>\n</tbody>\n</table>\n</div><p>Use a team's \"managers\" and \"remove_managers\" relationships to define the users managing a team. Alternatively, use the Teams endpoints to assign or remove team managers.</p>\n<hr />\n<h3 id=\"special-postpatch-attributes\">Special POST/PATCH Attributes</h3>\n<p>These attributes are used to manipulate the user but are neither user attributes or relationships. These attributes will not appear in responses.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>remove_teams</td>\n<td>Team</td>\n<td>team_name, id</td>\n<td>Teams to remove this user from. Array of team objects.</td>\n</tr>\n<tr>\n<td>remove_licenses</td>\n<td>License</td>\n<td>license_name</td>\n<td>Licenses to remove from this user. Array of license objects.</td>\n</tr>\n<tr>\n<td>remove_disclaimers</td>\n<td>Disclaimer</td>\n<td>disclaimer_name, type</td>\n<td>Disclaimers to remove from this user. Array of disclaimer objects.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"filtering\">Filtering</h3>\n<p>Use the 'filter=attribute_name=x,attribute_name_2=y' query to return the list of users that meet the filter criteria. For example, to filter users modified between Oct. 14, 2017 17:41:01 (UTC) and Oct. 15, 2017 17:41:09 (UTC), the following query could be used:</p>\n<p>/users?filter=internal_updated_at_start=2017-10-14T17:41:01Z,internal_updated_at_end=2017-10-15T17:41:09Z</p>\n<p>The supported filter attributes are shown in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>internal_updated_at_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>internal_updated_at_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>email</td>\n<td>User's email address.</td>\n</tr>\n<tr>\n<td>username</td>\n<td>User's TE username.</td>\n</tr>\n<tr>\n<td>status</td>\n<td>Indicator of user's status.</td>\n</tr>\n<tr>\n<td>external_id</td>\n<td>User's external identifier.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"51124e41-1756-40c4-89b2-9618add6a332","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"012d03ac-b977-4872-9cce-da022c93ef39","type":"text/javascript","exec":[""]}}],"_postman_id":"c39a3d8f-879f-4831-b1f0-61087d370aad"},{"name":"User Roles","item":[{"name":"Fetch User Roles","id":"e5742b49-d5c5-fe53-4269-b065efb0becd","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/user-roles?page[number]=1&page[size]=10","description":"<p>Fetch a page of user roles. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","user-roles"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"e5742b49-d5c5-fe53-4269-b065efb0becd"},{"name":"Fetch User Role","id":"426eeaae-51e3-bae8-e6b5-c2a7af605894","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/user-roles/{{user_role_id}}","description":"<p>Fetch a specific user role specified by ID.</p>\n","urlObject":{"path":["v1","user-roles","{{user_role_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"426eeaae-51e3-bae8-e6b5-c2a7af605894"},{"name":"Fetch Permissions for User Role","id":"29a7cc5d-36cc-428e-b638-66327aaa030e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{external_api_host}}/v1/role-permissions/{{role_id}}","urlObject":{"path":["v1","role-permissions","{{role_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"29a7cc5d-36cc-428e-b638-66327aaa030e"}],"id":"718b1c1d-0f04-11ab-f728-9e9d38406030","description":"<p>Endpoints for interacting with the user roles resource. These endpoints are restricted to organization admin users.</p>\n<hr />\n<h3 id=\"attributes\">Attributes</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Generated identifier for role.</td>\n</tr>\n<tr>\n<td>role_name</td>\n<td>No</td>\n<td>string</td>\n<td>Name of role.</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"718b1c1d-0f04-11ab-f728-9e9d38406030"},{"name":"Teams","item":[{"name":"Fetch Team","id":"ae802814-6400-8c07-a35f-eac7513859b2","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/teams/{{team_id}}","description":"<p>Fetch a team by ID.</p>\n","urlObject":{"path":["v1","teams","{{team_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"ae802814-6400-8c07-a35f-eac7513859b2"},{"name":"Fetch Teams","id":"cf1cc2ee-5b52-9d0c-8c16-1feddbcd4af5","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/teams?page[number]=1&page[size]=10","description":"<p>Fetch a page of teams. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","teams"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"cf1cc2ee-5b52-9d0c-8c16-1feddbcd4af5"},{"name":"Create Team","id":"3326cb26-0a21-92b6-7ffb-0eb1765676be","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"team_name\": \"Harry N's Team\",\n  \"managers\": [\n        {\n            \"username\": \"harryn\"\n        },\n        {\n            \"username\": \"rickyg\"\n        }\n    ]\n}"},"url":"{{external_api_host}}/v1/teams","description":"<p>Create a Team.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>team_name</li>\n</ul>\n","urlObject":{"path":["v1","teams"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"3326cb26-0a21-92b6-7ffb-0eb1765676be"},{"name":"Update Team","id":"4c6b35ae-1fcd-c0f3-7985-86dd2defb320","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"remove_managers\": [\n        {\n            \"username\": \"rickyg\"\n        }\n    ]\n}"},"url":"{{external_api_host}}/v1/teams/{{team_id}}","description":"<p>Update an existing team by ID.</p>\n","urlObject":{"path":["v1","teams","{{team_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4c6b35ae-1fcd-c0f3-7985-86dd2defb320"},{"name":"Delete Team","id":"1084f814-8a0d-be59-20fb-709f22fa4d7d","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/teams/{{team_id}}","description":"<p>Deletes a team by ID.</p>\n","urlObject":{"path":["v1","teams","{{team_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1084f814-8a0d-be59-20fb-709f22fa4d7d"}],"id":"14222a06-cb03-1b70-4f41-71ab26f6a128","description":"<p>Endpoints for interacting with the teams resource.</p>\n<hr />\n<h3 id=\"attributes\">Attributes</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Generated identifier for team.</td>\n</tr>\n<tr>\n<td>team_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name of the team.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"relationships\">Relationships</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>managers</td>\n<td>Yes</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>Managers of the team. Many-to-many relationship, so returned as an array.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"special-postpatch-attributes\">Special POST/PATCH Attributes</h3>\n<p>These attributes are used to manipulate the team but are neither team attributes or relationships. These attributes will not appear in responses. </p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>remove_managers</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>Users to remove as managers. Array of User objects. These users will not be removed from the team (this must be done through the Users endpoints).</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"80e840db-ae83-4502-8fe5-5c90cc1c4a64","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"b23486b3-abd9-45e0-813b-2e8221764ec6","type":"text/javascript","exec":[""]}}],"_postman_id":"14222a06-cb03-1b70-4f41-71ab26f6a128"},{"name":"Permissions","item":[{"name":"Fetch Permissions","id":"7ab2acc5-f74f-4a32-8ec9-09255e1fcd8e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"token":"<token>"},"isInherited":false},"method":"GET","header":[],"url":"{{external_api_host}}/v1/permissions?page[number]=1&page[size]=10","urlObject":{"path":["v1","permissions"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"7ab2acc5-f74f-4a32-8ec9-09255e1fcd8e"},{"name":"Fetch Permission","id":"b8ed0856-1973-4db6-9936-1d665d4e4b7a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"token":"<token>"},"isInherited":false},"method":"GET","header":[],"url":"{{external_api_host}}/v1/permissions/{{permission_id}}","urlObject":{"path":["v1","permissions","{{permission_id}}"],"host":["{{external_api_host}}"],"query":[{"disabled":true,"key":"","value":""}],"variable":[]}},"response":[],"_postman_id":"b8ed0856-1973-4db6-9936-1d665d4e4b7a"}],"id":"f3745292-8661-45cc-b079-9ab0439b0671","_postman_id":"f3745292-8661-45cc-b079-9ab0439b0671","description":""}],"id":"cadf999c-2dac-48d1-972d-b0e5af0ea72b","_postman_id":"cadf999c-2dac-48d1-972d-b0e5af0ea72b","description":""},{"name":"Entities","item":[{"name":"Fetch Entity","id":"e8e0d036-4c1f-4922-a7b2-cc7529ef72e1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/entities/{{entity_id}}","description":"<p>Fetch a specific entity specified by ID.</p>\n","urlObject":{"path":["v1","entities","{{entity_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e8e0d036-4c1f-4922-a7b2-cc7529ef72e1"},{"name":"Fetch Entities","id":"cc0b51ad-2422-492c-9661-bc2ea6375f73","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/entities?page[number]=1&page[size]=10","description":"<p>Fetch a page of entities. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","entities"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"cc0b51ad-2422-492c-9661-bc2ea6375f73"},{"name":"Fetch Entity Relationship Types","id":"db9c777c-7802-4d1a-a0b6-7b3463f17421","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/entity-relationship-types?page[number]=1&page[size]=10","description":"<p>Fetch a page of entities. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","entity-relationship-types"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"db9c777c-7802-4d1a-a0b6-7b3463f17421"},{"name":"Create Entity (as Admin)","event":[{"listen":"test","script":{"id":"2b249af8-ba41-4a84-8a00-5e56ebc49eea","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"contact_id\", jsonData.id);"],"type":"text/javascript"}}],"id":"b3f43503-deb0-4d4f-a8e5-f719dce8f331","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"entity_name\": \"Squiggle Whomp Household\",\n    \"entity_type\": {\n        \"system_name\": \"household\"\n    },\n    \"related_entities\": [\n        {\n        \t\"relationship_type\": {\n        \t\t\"system_name\": \"members\"\n        \t},\n        \t\"children\": [\n        \t\t{\n        \t\t\t\"external_id\": \"abcd1234\"\n        \t\t}\n        \t]\n        }\n    ],\n    \"custom\": [\n        {\n            \"field_name\": \"gold_star_string\",\n            \"value\": \"value\"\n        }\n    ]\n}"},"url":"{{external_api_host}}/v1/entities","description":"<p>Create an entity.</p>\n","urlObject":{"path":["v1","entities"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b3f43503-deb0-4d4f-a8e5-f719dce8f331"},{"name":"Update Entity","id":"58d56f99-5ce1-413b-842d-6a882a81e703","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"phone\": \"5558675309\"\n}"},"url":"{{external_api_host}}/v1/entities/{{entity_id}}","description":"<p>Update an existing entity by ID.</p>\n","urlObject":{"path":["v1","entities","{{entity_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"58d56f99-5ce1-413b-842d-6a882a81e703"},{"name":"Delete Entity","id":"2acfdf84-1589-4729-b773-2ccdbe029d6f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/entities/{{entity_id}}","description":"<p>Delete an entity by ID.</p>\n","urlObject":{"path":["v1","entities","{{entity_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2acfdf84-1589-4729-b773-2ccdbe029d6f"}],"id":"1036d088-04eb-4492-8fbc-399c7a1ed2ee","description":"<p>Endpoints for interacting with the entities resource. These endpoints are restricted to organization admin users.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>string</td>\n<td>Generated identifier for entity.</td>\n</tr>\n<tr>\n<td>address</td>\n<td>Yes</td>\n<td>string</td>\n<td>Street address portion of entity's address.</td>\n</tr>\n<tr>\n<td>address_2</td>\n<td>Yes</td>\n<td>string</td>\n<td>Line 2 portion of entity's address.</td>\n</tr>\n<tr>\n<td>city</td>\n<td>Yes</td>\n<td>string</td>\n<td>City portion of entity's address.</td>\n</tr>\n<tr>\n<td>entity_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name of the entity.</td>\n</tr>\n<tr>\n<td>external_id</td>\n<td>Yes</td>\n<td>string</td>\n<td>entity's external identifier, e.g. the unique identifier from the entity's source.</td>\n</tr>\n<tr>\n<td>state</td>\n<td>Yes</td>\n<td>string</td>\n<td>State portion of entity's address.</td>\n</tr>\n<tr>\n<td>zip_code</td>\n<td>Yes</td>\n<td>string</td>\n<td>Zip code portion of entity's address.</td>\n</tr>\n<tr>\n<td>phone</td>\n<td>Yes</td>\n<td>string</td>\n<td>Entity's phone number, preferred format: '(555)555-1234'</td>\n</tr>\n<tr>\n<td>internal_created_at</td>\n<td>No</td>\n<td>string</td>\n<td>Date of creation of this entity in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>internal_updated_at</td>\n<td>No</td>\n<td>string</td>\n<td>Date of last change for this entity in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"relationships\">Relationships</h4>\n<p>The \"owner\" section at the top level of the <code>POST</code>, <code>PATCH</code>, or <code>DELETE</code> is required when contacts are included in the request. All included contacts are created or updated for that owner, and only one owner can be used per request.</p>\n<p>Some relationship types are discrete and can only have one child.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>owner</td>\n<td>Yes*</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>Owning user of the entity. One to many relationship, so returned as an object. *Only assignable/visible if authenticated as an organization admin.</td>\n</tr>\n<tr>\n<td>entity_type</td>\n<td>Yes</td>\n<td>Entity Type</td>\n<td>system_name</td>\n<td>Type for this entity. Many-to-one relationship, is returned as an object.</td>\n</tr>\n<tr>\n<td>related_entities</td>\n<td>Yes</td>\n<td>*</td>\n<td>*</td>\n<td>*(See Related Entities Relationships Section, below)</td>\n</tr>\n<tr>\n<td>custom</td>\n<td>Yes</td>\n<td>Custom Field</td>\n<td>*(See Custom Fields)</td>\n<td>*(See Custom Fields)</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h4 id=\"related-entities-relationships\">Related Entities Relationships</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>relationship_type</td>\n<td>Yes</td>\n<td>Entity Relationship Type</td>\n<td>system_name</td>\n<td>The type of relationship to the target contacts.</td>\n</tr>\n<tr>\n<td>children</td>\n<td>Yes</td>\n<td>Contacts</td>\n<td>*</td>\n<td>*(See contact documentation)</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"special-postpatch-attributes---depending-on-posting-endpoint\">Special POST/PATCH Attributes - depending on posting endpoint</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>children</td>\n<td>Yes</td>\n<td>Contacts</td>\n<td>*</td>\n<td>*(See contact documentation) - available when posting inside an entity</td>\n</tr>\n<tr>\n<td>parent</td>\n<td>Yes</td>\n<td>Entity</td>\n<td>*</td>\n<td>*(See entity resource documentation, above) - Only available when posting inside a contact</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"special-postpatch-attributes\">Special POST/PATCH Attributes</h3>\n<p>These attributes are used to manipulate the entity but are neither entity attributes or relationships. These attributes will not appear in responses.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>remove_related_entities</td>\n<td>*</td>\n<td>*</td>\n<td>*(See Related Entities Relationships Section, above, to dissociate related entities)</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"sorting\">Sorting</h3>\n<p>Use the 'sort=attribute_name,attribute_name_2' query to return the list of entities sorted by the given attribute. Use a minus sign in front of the attribute name to sort the results in descending order. For example, to sort by the internal_updated_at attribute and place the results in descending order, the URL would include:</p>\n<p>/entities?sort=-internal_updated_at</p>\n<p>The sort query supports the attributes listed in the Attributes table. The query does not support sorting by relationship values.</p>\n","event":[{"listen":"prerequest","script":{"id":"0879f709-90f6-4621-99ba-86b46fcd513b","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"138dd6f4-de3a-4c3b-9987-d17bdff13e29","type":"text/javascript","exec":[""]}}],"_postman_id":"1036d088-04eb-4492-8fbc-399c7a1ed2ee"},{"name":"Loan Endpoints","item":[{"name":"Loans","item":[{"name":"Fetch Loan","id":"3c0895bb-69a0-9e0f-233d-22ab4ff1f7d5","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{external_api_host}}/v1/loans/{{loan_id}}","description":"<p>Fetch a specific loan type specified by ID.</p>\n","urlObject":{"path":["v1","loans","{{loan_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"3c0895bb-69a0-9e0f-233d-22ab4ff1f7d5"},{"name":"Fetch Loans","id":"f885ca4f-43f0-6c61-351c-d7e3d121b5ce","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"formdata","formdata":[]},"url":"{{external_api_host}}/v1/loans?page[number]=1&page[size]=10","description":"<p>Fetch a page of loans. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","loans"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"f885ca4f-43f0-6c61-351c-d7e3d121b5ce"},{"name":"Create Loan (as Admin)","event":[{"listen":"test","script":{"id":"7e3bddc1-691b-4543-9873-f61b27805927","exec":[""],"type":"text/javascript"}}],"id":"cddb67e8-0ee9-ed03-d7a4-d6bd34b0f6f3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"external_id\": \"2161010\",\r\n    \"loan_number\": \"2161010\",\r\n    \"address\": \"446 Second St\",\r\n    \"address_2\": null,\r\n    \"city\": \"Middlesex\",\r\n    \"state\": \"NJ\",\r\n    \"zip_code\": \"08846\",\r\n    \"owner\": {\r\n        \"username\": \"jsmith\"\r\n    },\r\n    \"borrower\": {\r\n        \"source\": \"PCLender\",\r\n        \"first_name\": \"Jenny\",\r\n        \"last_name\": \"Kristoff\",\r\n        \"email\": \"jennyK@example.com\",\r\n        \"custom\": [\r\n            {\r\n                \"field_name\": \"custom_string\",\r\n                \"value\": \"the custom field string value\"\r\n            }\r\n        ]\r\n    },\r\n    \"coborrower\": {\r\n        \"source\": \"PCLender\",\r\n        \"first_name\": \"Anthony\",\r\n        \"last_name\": \"Kristoff\",\r\n        \"email\": \"anthonyK@example.com\"\r\n    },\r\n    \"loan_program\": {\r\n        \"loan_program\": \"10-year Fixed\"\r\n    },\r\n    \"loan_purpose\": {\r\n        \"loan_purpose\": \"Refinance\"\r\n    },\r\n    \"loan_status\": {\r\n        \"loan_status\": \"Pending\"\r\n    },\r\n    \"loan_type\": {\r\n        \"loan_type\": \"Conventional Fixed Rate\"\r\n    },\r\n    \"loan_subordinate_financing_type\": {\r\n        \"loan_subordinate_financing_type\": \"HELOC\"\r\n    },\r\n    \"buyers_agent\": {\r\n        \"source\": \"PCLender\",\r\n        \"first_name\": \"Jay\",\r\n        \"last_name\": \"Jenkel\",\r\n        \"email\": \"jagent@example.com\"\r\n    },\r\n    \"sellers_agent\": {\r\n        \"source\": \"PCLender\",\r\n        \"first_name\": \"Fred\",\r\n        \"last_name\": \"Ingle\",\r\n        \"email\": \"fseller@example.com\"\r\n    },\r\n    \"settlement_agent\": {\r\n        \"source\": \"PCLender\",\r\n        \"first_name\": \"Angie\",\r\n        \"last_name\": \"Deedle\",\r\n        \"email\": \"asettlement@example.com\"\r\n    },\r\n    \"account_class\": {\r\n        \"class_name\": \"mortgage\",\r\n        \"class_type\": \"LOAN\"\r\n    },\r\n    \"custom\": [\r\n        {\r\n            \"field_name\": \"custom_string\",\r\n            \"value\": \"the custom field string value\"\r\n        }\r\n    ]\r\n}"},"url":"{{external_api_host}}/v1/loans","description":"<p>Create a loan.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>external_id</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>owner</li>\n<li>borrower<ul>\n<li>Must have required fields for contact creation, found here: <strong><a href=\"https://documenter.getpostman.com/view/1929166/total-expert-public-api/6Z2RYyU#4f48dd5f-bbb5-46e3-bb22-e3c572aa76f3\">Create Contact (as Admin)</a></strong></li>\n</ul>\n</li>\n<li>any other required loan participant roles, which can be found using the <strong><a href=\"https://documenter.getpostman.com/view/1929166/total-expert-public-api/6Z2RYyU#87c4f245-16e0-4ab8-a8d3-c1c6d1d43de9\">Fetch Loan Participant Roles</a></strong> request (requires <code>describeSchema</code> scope to access)</li>\n</ul>\n","urlObject":{"path":["v1","loans"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"cddb67e8-0ee9-ed03-d7a4-d6bd34b0f6f3"},{"name":"Create Loan (as User)","event":[{"listen":"test","script":{"id":"5789e5d3-a6f0-46d5-a49e-6e222d77f7ee","exec":[""],"type":"text/javascript"}}],"id":"a174df6c-c694-3dc1-7cf7-926bf2cf55b8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"external_id\": \"2161006\",\n    \"loan_number\": \"2161006\",\n    \"loan_rate\": \"4.00\",\n    \"loan_term\": 360,\n    \"loan_application_number\": null,\n    \"purchase_price\": null,\n    \"appraised_value\": \"450000.00\",\n    \"is_first_time_buyer\": 0,\n    \"property_type\": null,\n    \"address\": \"446 Second St\",\n    \"address_2\": null,\n    \"city\": \"Middlesex\",\n    \"state\": \"NJ\",\n    \"zip_code\": \"08846\",\n    \"loan_name\": null,\n    \"pre_approval_issued\": null,\n    \"loan_amount\": \"357904.00\",\n    \"loan_to_value_combined\": \"86.24\",\n    \"occupancy_type\": \"Owner\",\n    \"estimated_value\": null,\n    \"lock_status\": \"Locked\",\n    \"escrow_waived\": 0,\n    \"referral_source\": null,\n    \"annual_review_date\": null,\n    \"application_date\": \"2016-07-27 00:00:00\",\n    \"appraisal_expected_date\": null,\n    \"appraisal_ordered_date\": \"2017-04-21 00:00:00\",\n    \"appraisal_received_date\": \"2017-04-28 00:00:00\",\n    \"approval_date\": null,\n    \"closing_date\": \"2017-05-19 00:00:00\",\n    \"created_date\": \"2017-06-06 15:51:19\",\n    \"ctc_date\": null,\n    \"documents_signed_date\": null,\n    \"epo_date\": null,\n    \"last_modified_date\": \"2017-05-15 06:55:00\",\n    \"first_payment_date\": \"2017-06-01 00:00:00\",\n    \"funded_date\": null,\n    \"loan_arm_expiration_date\": null,\n    \"lock_date\": \"2017-04-26 00:00:00\",\n    \"lock_expiration_date\": \"2017-05-25 00:00:00\",\n    \"pre_approval_expiration_date\": null,\n    \"pre_approval_issued_date\": null,\n    \"processing_start_date\": \"2016-08-05 00:00:00\",\n    \"underwriting_approval_date\": null,\n    \"underwriting_submission_date\": \"2016-08-02 00:00:00\",\n    \"internal_created_at\": \"2017-06-06 15:51:19\",\n    \"internal_updated_at\": \"2017-06-06 15:51:20\",\n    \"borrower\": {\n        \"id\": 502\n    },\n    \"coborrower\": {\n        \"id\": 502\n    },\n    \"loan_program\": {\n        \"loan_program\": \"30-year Fixed\"\n    },\n    \"loan_purpose\": {\n        \"loan_purpose\": \"New\"\n    },\n    \"loan_status\": {\n        \"loan_status\": \"In review\"\n    },\n    \"loan_type\": {\n        \"loan_type\": \"Conventional Fixed Rate\"\n    },\n    \"loan_subordinate_financing_type\": {\n        \"loan_subordinate_financing_type\": \"HELOC\"\n    },\n    \"account_class\": {\n        \"class_name\": \"mortgage\",\n        \"class_type\": \"LOAN\"\n    },\n    \"custom\": [\n        {\n            \"field_name\": \"custom_string\",\n            \"value\": \"the custom field string value\"\n        }\n    ]\n}"},"url":"{{external_api_host}}/v1/loans","description":"<p>Create a loan.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>external_id</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>borrower<ul>\n<li>Must have required fields for contact creation, found here: <strong><a href=\"https://documenter.getpostman.com/view/1929166/total-expert-public-api/6Z2RYyU#50bfe0d2-6db0-43de-a838-297e495f7141\">Create Contact (as User)</a></strong></li>\n</ul>\n</li>\n<li>any other required loan participant roles, which can be found using the <strong><a href=\"https://documenter.getpostman.com/view/1929166/total-expert-public-api/6Z2RYyU#87c4f245-16e0-4ab8-a8d3-c1c6d1d43de9\">Fetch Loan Participant Roles</a></strong> request (requires <code>describeSchema</code> scope to access)</li>\n</ul>\n","urlObject":{"path":["v1","loans"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"a174df6c-c694-3dc1-7cf7-926bf2cf55b8"},{"name":"Update Loan ","id":"8eff5898-6ccb-8840-cd94-6d6d0a3bd307","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n      \"external_id\": \"2161006\",\n      \"loan_number\": \"2161006\",\n      \"loan_rate\": \"4.00\",\n      \"loan_term\": 360,\n      \"loan_application_number\": null,\n      \"purchase_price\": null,\n      \"appraised_value\": \"450000.00\",\n      \"is_first_time_buyer\": 0,\n      \"property_type\": null,\n      \"address\": \"446 Second St\",\n      \"address_2\": null,\n      \"city\": \"Middlesex\",\n      \"state\": \"NJ\",\n      \"zip_code\": 8846,\n      \"loan_name\": null,\n      \"pre_approval_issued\": null,\n      \"loan_amount\": \"357904.00\",\n      \"loan_to_value_combined\": \"86.24\",\n      \"occupancy_type\": \"Owner\",\n      \"estimated_value\": null,\n      \"lock_status\": \"Locked\",\n      \"escrow_waived\": 0,\n      \"referral_source\": null,\n      \"annual_review_date\": null,\n      \"application_date\": \"2016-07-27 00:00:00\",\n      \"appraisal_expected_date\": null,\n      \"appraisal_ordered_date\": \"2017-04-21 00:00:00\",\n      \"appraisal_received_date\": \"2017-04-28 00:00:00\",\n      \"approval_date\": null,\n      \"closing_date\": \"2017-05-19 00:00:00\",\n      \"created_date\": \"2017-06-06 15:51:19\",\n      \"ctc_date\": null,\n      \"documents_signed_date\": null,\n      \"epo_date\": null,\n      \"last_modified_date\": \"2017-05-15 06:55:00\",\n      \"first_payment_date\": \"2017-06-01 00:00:00\",\n      \"funded_date\": null,\n      \"loan_arm_expiration_date\": null,\n      \"lock_date\": \"2017-04-26 00:00:00\",\n      \"lock_expiration_date\": \"2017-05-25 00:00:00\",\n      \"pre_approval_expiration_date\": null,\n      \"pre_approval_issued_date\": null,\n      \"processing_start_date\": \"2016-08-05 00:00:00\",\n      \"underwriting_approval_date\": null,\n      \"underwriting_submission_date\": \"2016-08-02 00:00:00\",\n      \"internal_created_at\": \"2017-06-06 15:51:19\",\n      \"internal_updated_at\": \"2017-06-06 15:51:20\",\n      \"coborrower\": {\n        \"id\": 1186\n      },\n      \"loan_program\": {\n        \"loan_program\": \"30-year Fixed\"\n      },\n      \"loan_purpose\": {\n        \"loan_purpose\": \"New\"\n      },\n      \"loan_status\": {\n        \"loan_status\": \"In review\"\n      },\n      \"loan_type\": {\n        \"loan_type\": \"Conventional Fixed Rate\"\n      },\n      \"account_class\": {\n    \t\"class_name\": \"mortgage\",\n    \t\"class_type\": \"LOAN\"\n      }\n}"},"url":"{{external_api_host}}/v1/loans/{{loan_id}}","description":"<p>Update an existing loan by ID.</p>\n","urlObject":{"path":["v1","loans","{{loan_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"8eff5898-6ccb-8840-cd94-6d6d0a3bd307"},{"name":"Delete Loan","id":"d2bd4af8-36ba-18dd-21ab-65f59b741be9","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/loans/{{loan_id}}","description":"<p>Deletes a loan by ID.</p>\n","urlObject":{"path":["v1","loans","{{loan_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d2bd4af8-36ba-18dd-21ab-65f59b741be9"}],"id":"ec243dd9-e4e4-a203-d4f7-536db0b2f3e0","description":"<p>Endpoints for interacting with the loans resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>numeric</td>\n<td>generated identifier for loan.</td>\n</tr>\n<tr>\n<td>address</td>\n<td>Yes</td>\n<td>string</td>\n<td>street address portion of the property</td>\n</tr>\n<tr>\n<td>address_2</td>\n<td>Yes</td>\n<td>string</td>\n<td>second line of the address of the property</td>\n</tr>\n<tr>\n<td>amort_type</td>\n<td>Yes</td>\n<td>string</td>\n<td>type of loan repayment mechanism</td>\n</tr>\n<tr>\n<td>amort_type_arm_desc</td>\n<td>yes</td>\n<td>string</td>\n<td>type of ARM amortization</td>\n</tr>\n<tr>\n<td>annual_review_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date of annual review for the loan, formatted as a date with 1970 as the year. Preferred format: '1970-MM-DD'</td>\n</tr>\n<tr>\n<td>application_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time of the application for the loan. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>appraised_value</td>\n<td>Yes</td>\n<td>string</td>\n<td>appraised value of the property</td>\n</tr>\n<tr>\n<td>appraisal_expected_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>expected date/time of the appraisal. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>appraisal_ordered_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time when the appraisal was ordered. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>appraisal_received_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time when the appraisal was received. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>approval_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time the loan was approved. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>audits_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time auditor finished preparing loan for shipping. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>available_line_amount</td>\n<td>Yes</td>\n<td>string</td>\n<td>Dollar available line amount</td>\n</tr>\n<tr>\n<td>borrower_entity_type</td>\n<td>Yes</td>\n<td>string</td>\n<td>Type of Borrower Entity</td>\n</tr>\n<tr>\n<td>business_partner</td>\n<td>Yes</td>\n<td>string</td>\n<td>Business Partner</td>\n</tr>\n<tr>\n<td>buydown_points</td>\n<td>Yes</td>\n<td>numeric</td>\n<td>Mortgage/discount points applied to the loan</td>\n</tr>\n<tr>\n<td>channel</td>\n<td>Yes</td>\n<td>string</td>\n<td>Channel</td>\n</tr>\n<tr>\n<td>city</td>\n<td>Yes</td>\n<td>string</td>\n<td>city portion of the address of the property</td>\n</tr>\n<tr>\n<td>closing_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time of the closing for the loan. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>closing_date_estimated</td>\n<td>Yes</td>\n<td>string</td>\n<td>estimated date/time of the closing for the loan. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>completion_date</td>\n<td>Yes</td>\n<td>String</td>\n<td>Date mortgage is completed and funds are disbursed. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>closing_disclosure_out_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>Date the signed closing documents were issued to the buyer</td>\n</tr>\n<tr>\n<td>closing_disclosure_signed_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>Date the signed closing documents were received from the buyer</td>\n</tr>\n<tr>\n<td>county</td>\n<td>Yes</td>\n<td>string</td>\n<td>County containing property</td>\n</tr>\n<tr>\n<td>created_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time the loan was created. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>credit_report_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>Date of the credit report</td>\n</tr>\n<tr>\n<td>ctc_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time of the loan clear-to-close. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>debt_to_income</td>\n<td>Yes</td>\n<td>string</td>\n<td>Debt to income ratio (float value)</td>\n</tr>\n<tr>\n<td>docs_out_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>the date in which documents required by federal law and contract were sent to the borrower/co-borrower. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>documents_signed_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time the documents were signed. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>epo_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time of the loan early payoff. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>escrow_waived</td>\n<td>Yes</td>\n<td>numeric</td>\n<td>Indicator whether escrow has been waived</td>\n</tr>\n<tr>\n<td>estimated_value</td>\n<td>Yes</td>\n<td>string</td>\n<td>estimated value of the property</td>\n</tr>\n<tr>\n<td>external_id</td>\n<td>Yes</td>\n<td>string</td>\n<td>ID of loan in source system</td>\n</tr>\n<tr>\n<td>first_payment_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time of the first payment for the loan. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>funded_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time the funds were released. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>funding_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>anticipated date/time funds are to be released. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>funds_requested_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time funds were requested. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>guarantee_type</td>\n<td>Yes</td>\n<td>string</td>\n<td>Guarantee Type</td>\n</tr>\n<tr>\n<td>internal_created_at</td>\n<td>No</td>\n<td>string</td>\n<td>date of creation of this contact in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>internal_updated_at</td>\n<td>No</td>\n<td>string</td>\n<td>date of last change for this contact in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>investor</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name of the entity that has purchased this loan on the secondary market</td>\n</tr>\n<tr>\n<td>is_first_time_buyer</td>\n<td>Yes</td>\n<td>numeric</td>\n<td>indicator whether the borrower is a first time borrower. 1=yes, 0=no.</td>\n</tr>\n<tr>\n<td>last_modified_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time the loan was last modified. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>legal_entity_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Legal Entity Name</td>\n</tr>\n<tr>\n<td>lender_paid_compensation</td>\n<td>Yes</td>\n<td>string</td>\n<td>Dollar amount of lender paid compensation</td>\n</tr>\n<tr>\n<td>lien_position</td>\n<td>Yes</td>\n<td>string</td>\n<td>order of priority for the loan payment in the event of default</td>\n</tr>\n<tr>\n<td>line_amount</td>\n<td>Yes</td>\n<td>string</td>\n<td>Dollar line amount</td>\n</tr>\n<tr>\n<td>loan_amount</td>\n<td>Yes</td>\n<td>string</td>\n<td>loan amount</td>\n</tr>\n<tr>\n<td>loan_application_number</td>\n<td>Yes</td>\n<td>string</td>\n<td>loan application number</td>\n</tr>\n<tr>\n<td>loan_arm_expiration_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time the ARM expires for the loan. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>loan_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>name for the loan</td>\n</tr>\n<tr>\n<td>loan_number</td>\n<td>Yes</td>\n<td>string</td>\n<td>loan number</td>\n</tr>\n<tr>\n<td>loan_rate</td>\n<td>Yes</td>\n<td>string</td>\n<td>loan rate</td>\n</tr>\n<tr>\n<td>lock_status</td>\n<td>Yes</td>\n<td>string</td>\n<td>lock status for the loan</td>\n</tr>\n<tr>\n<td>loan_term</td>\n<td>Yes</td>\n<td>numeric</td>\n<td>loan term (in months)</td>\n</tr>\n<tr>\n<td>loan_to_value_combined</td>\n<td>Yes</td>\n<td>string</td>\n<td>percentage ratio of loan amount to purchase price, including all loans on the property.</td>\n</tr>\n<tr>\n<td>loan_to_value</td>\n<td>Yes</td>\n<td>string</td>\n<td>percentage ratio of loan amount to purchase price</td>\n</tr>\n<tr>\n<td>lock_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time the loan was locked. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>lock_expiration_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time the loan lock expires. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>occupancy_type</td>\n<td>Yes</td>\n<td>string</td>\n<td>occupancy type of the property (e.g. Owner)</td>\n</tr>\n<tr>\n<td>origination_fee</td>\n<td>Yes</td>\n<td>string</td>\n<td>Dollar amount of origination fee</td>\n</tr>\n<tr>\n<td>master_loc_number</td>\n<td>Yes</td>\n<td>string</td>\n<td>LOC number. Applies to LOC-P loans.</td>\n</tr>\n<tr>\n<td>max_acquisition_ltc</td>\n<td>Yes</td>\n<td>string</td>\n<td>Maximum acquistion loan-to-cost</td>\n</tr>\n<tr>\n<td>max_ltv</td>\n<td>Yes</td>\n<td>string</td>\n<td>Maximum loan-to-value</td>\n</tr>\n<tr>\n<td>max_rehab_ltc</td>\n<td>Yes</td>\n<td>string</td>\n<td>Maximum rehab loan-to-cost</td>\n</tr>\n<tr>\n<td>monthly_pi_payment</td>\n<td>Yes</td>\n<td>numeric</td>\n<td>Dollar amount of monthly payment</td>\n</tr>\n<tr>\n<td>monthly_pi_with_mi_payment</td>\n<td>Yes</td>\n<td>numeric</td>\n<td>Dollar amount of monthly payment</td>\n</tr>\n<tr>\n<td>pre_approval_expiration_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time the pre-approval expires for the loan. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>pre_approval_issued</td>\n<td>Yes</td>\n<td>numeric</td>\n<td>indicator whether a pre-approval was issued for this loan. 1=yes, 0=no.</td>\n</tr>\n<tr>\n<td>pre_approval_issued_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time the pre-approval was issued for the loan. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>pricing_option</td>\n<td>Yes</td>\n<td>string</td>\n<td>Pricing Option</td>\n</tr>\n<tr>\n<td>processing_start_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time processing began for the loan. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>property_type</td>\n<td>Yes</td>\n<td>string</td>\n<td>type of property (e.g. Single Family)</td>\n</tr>\n<tr>\n<td>post_closed_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date mortgage is completed and funds are disbursed. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>purchased_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time purchase occurred. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>purchase_price</td>\n<td>Yes</td>\n<td>string</td>\n<td>purchase price for the loan</td>\n</tr>\n<tr>\n<td>referral_source</td>\n<td>Yes</td>\n<td>string</td>\n<td>the source of the referral</td>\n</tr>\n<tr>\n<td>resubmittal_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time of file is returned to underwriting after rejection. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>source</td>\n<td>Yes</td>\n<td>string</td>\n<td>The internal business channel or cost center a loan originated from</td>\n</tr>\n<tr>\n<td>state</td>\n<td>Yes</td>\n<td>string</td>\n<td>state portion of the address of the property</td>\n</tr>\n<tr>\n<td>underwriting_approval_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time underwriting was approved for the loan. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>underwriting_submission_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time the loan was submitted for underwriting</td>\n</tr>\n<tr>\n<td>zip_code</td>\n<td>Yes</td>\n<td>string</td>\n<td>zip code portion of the address of the property</td>\n</tr>\n<tr>\n<td>pre_approval_issues</td>\n<td>Yes</td>\n<td>string</td>\n<td>Pre approval issues</td>\n</tr>\n<tr>\n<td>denial_reason</td>\n<td>Yes</td>\n<td>string</td>\n<td>Denial reason</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"uniqueness\">Uniqueness</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Fields</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>external_id</td>\n</tr>\n<tr>\n<td>2</td>\n<td>loan_number</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"filtering\">Filtering</h3>\n<p>Use the 'filter=attribute_name=x,attribute_name_2=y' query to return the list of loans that meet the filter criteria. For example, to filter loans modified between Oct. 14, 2017 17:41:01 (UTC) and Oct. 15, 2017 17:41:09 (UTC), sorted by the internal_updated_at attribute in ascending order, the following query could be used:</p>\n<p>/loans?sort=internal_updated_at&amp;filter=internal_updated_at_start=2017-10-14T17:41:01Z,internal_updated_at_end=2017-10-15T17:41:09Z</p>\n<p>The supported filter attributes are shown in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>internal_updated_at_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>internal_updated_at_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>internal_created_at_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>internal_created_at_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>owner_id</td>\n<td>TE ID of the owning user.</td>\n</tr>\n<tr>\n<td>owner_email</td>\n<td>Email of the owning user.</td>\n</tr>\n<tr>\n<td>owner_username</td>\n<td>Username of the owning user.</td>\n</tr>\n<tr>\n<td>owner_external_id</td>\n<td>External ID of the owning user.</td>\n</tr>\n<tr>\n<td>external_id</td>\n<td>External ID of the loan.</td>\n</tr>\n<tr>\n<td>loan_number</td>\n<td>Loan number of loan.</td>\n</tr>\n<tr>\n<td>borrower_id</td>\n<td>Id of the borrower.</td>\n</tr>\n<tr>\n<td>role_system_name</td>\n<td>Role system name for the loan participant.</td>\n</tr>\n<tr>\n<td>agent_id</td>\n<td>ID of the agent participant on the loan.</td>\n</tr>\n<tr>\n<td>other_id</td>\n<td>ID of the other participant on the loan.</td>\n</tr>\n<tr>\n<td>account_class_name</td>\n<td>Account Classification Name for the loan.</td>\n</tr>\n<tr>\n<td>account_class_type</td>\n<td>Account class type for the loan.</td>\n</tr>\n<tr>\n<td>loan_type</td>\n<td>Type of the loan.</td>\n</tr>\n<tr>\n<td>loan_status</td>\n<td>Status of the loan.</td>\n</tr>\n<tr>\n<td>loan_program</td>\n<td>Program of the loan.</td>\n</tr>\n<tr>\n<td>loan_purpose</td>\n<td>Purpose of the loan.</td>\n</tr>\n<tr>\n<td>loan_name_contains</td>\n<td>Loan Name for the loan contains the specified string.</td>\n</tr>\n<tr>\n<td>funded_date_start</td>\n<td>Loan Funded Date</td>\n</tr>\n<tr>\n<td>funded_date_end</td>\n<td>Loan Funded Date (requires funded_date_start filter)</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"relationships\">Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>owner</td>\n<td>Yes*</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>Owning loan officer for the loan. Many-to-one relationship, so returned as an object. *Only assignable/visible if authenticated as an organization admin.</td>\n</tr>\n<tr>\n<td>referring_loan_officer</td>\n<td>Yes</td>\n<td>User</td>\n<td>username, id, external_id</td>\n<td>Loan officer who referred the loan. Many-to-one relationship, so returned as an object.</td>\n</tr>\n<tr>\n<td>borrower</td>\n<td>Yes</td>\n<td>contact</td>\n<td>See contact documentation for uniqueness options.</td>\n<td>Primary borrower for the loan. Many-to-one relationship, so returned as an object.</td>\n</tr>\n<tr>\n<td>coborrower</td>\n<td>Yes</td>\n<td>contact</td>\n<td>See contact documentation for uniqueness options.</td>\n<td>Co-borrower for the loan. Many-to-one relationship, so returned as an object.</td>\n</tr>\n<tr>\n<td>buyers_agent</td>\n<td>Yes</td>\n<td>contact</td>\n<td>See contact documentation for uniqueness options.</td>\n<td>Buyer's agent for the loan. Many-to-one relationship, so returned as an object.</td>\n</tr>\n<tr>\n<td>sellers_agent</td>\n<td>Yes</td>\n<td>contact</td>\n<td>See contact documentation for uniqueness options.</td>\n<td>Seller's agent for the loan. Many-to-one relationship, so returned as an object.</td>\n</tr>\n<tr>\n<td>settlement_agent</td>\n<td>Yes</td>\n<td>contact</td>\n<td>See contact documentation for uniqueness options.</td>\n<td>Settlement agent for the loan. Many-to-one relationship, so returned as an object.</td>\n</tr>\n<tr>\n<td>attorney</td>\n<td>Yes</td>\n<td>contact</td>\n<td>See contact documentation for uniqueness options.</td>\n<td>Attorney for the loan. Many-to-one relationship, so returned as an object.</td>\n</tr>\n<tr>\n<td>loan_program</td>\n<td>Yes</td>\n<td>loan-program</td>\n<td>id</td>\n<td>Program for this loan. Many-to-one relationship, so returned as an object.</td>\n</tr>\n<tr>\n<td>loan_purpose</td>\n<td>Yes</td>\n<td>loan-purpose</td>\n<td>id</td>\n<td>Purpose for this loan. Many-to-one relationship, so returned as an object.</td>\n</tr>\n<tr>\n<td>loan_status</td>\n<td>Yes</td>\n<td>loan-status</td>\n<td>id</td>\n<td>Status for this loan. Many-to-one relationship, so returned as an object.</td>\n</tr>\n<tr>\n<td>loan_type</td>\n<td>Yes</td>\n<td>loan-type</td>\n<td>id</td>\n<td>Type for this loan. Many-to-one relationship, so returned as an object.</td>\n</tr>\n<tr>\n<td>loan_subordinate_financing_type</td>\n<td>Yes</td>\n<td>subordinate-financing-type</td>\n<td>subordinate_financing_type</td>\n<td>Subordinate financing type for this loan. Many-to-one relationship, so returned as an object.</td>\n</tr>\n<tr>\n<td>account_class</td>\n<td>Yes</td>\n<td>account class</td>\n<td>class_name and class_type</td>\n<td>Classification of the loan (example: a mortgage). Must match an existing account class. Not required for loans which are mortgages.</td>\n</tr>\n<tr>\n<td>custom</td>\n<td>Yes</td>\n<td>Custom Field</td>\n<td>*(See Custom Fields)</td>\n<td>*(See Custom Fields)</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"subordinate-financing-type-attributes\">Subordinate Financing Type Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>subordinate_financing_type</td>\n<td>string</td>\n<td>The financing / loan type for loans in the secondary lien position. E.g. 'HELOC'</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"special-postpatch-attributes\">Special POST/PATCH Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>options</td>\n<td>Object</td>\n<td>See below table.</td>\n<td>Options to apply to the request.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"postpatch-options\">POST/PATCH Options</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Type</th>\n<th>Description</th>\n<th>Default Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>suppress_emails</td>\n<td>boolean</td>\n<td>Whether to suppress auto-campaign emails that would be sent as a direct result of this request. WARNING: Using this option has consequences. Do not use this option before talking with your TE integration consultant.</td>\n<td>False</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"transferring-loan-ownership\">Transferring Loan Ownership</h5>\n<p>Admin users may transfer loans from one loan officer to another in their organization by changing a loan's 'owner' relationship. This operation can be accomplished through either a POST or a PATCH request. If a POST request is used, the POST body must include the loan's 'id' attribute, otherwise the request is interpreted as a request to create a new loan instead of transferring an existing one.</p>\n<p>As part of the loan ownership transfer, contacts for the borrower, co-borrower, and agents are created for the new owner if the new owner does not have them as existing contacts. Existing contacts are detected using the uniqueness constraints documented for the Contacts endpoint. Newly created contacts do not belong to any contact group. The contacts associated with the previous owner remain in the system but are disassociated from the loan.</p>\n<p>In the case that the new owner has an existing loan that matches the uniqueness constraints of the loan being transferred, the ownership transfer will fail and return a 422 (Unprocessable Entity) HTTP status code.</p>\n<hr />\n<h5 id=\"account-classification\">Account Classification</h5>\n<p>Account classifications will allow you to create or update a resource's classification type.<br />Account classifications are not required. If no classification is provided the loan will be assumed to be a mortgage.<br />Currently only mortgages are visible/actionable within the CRM</p>\n","event":[{"listen":"prerequest","script":{"id":"bac3ac72-6b8a-4fcb-a96d-72be313970cd","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"ebd4969e-f36c-428f-af9b-46fbacc13006","type":"text/javascript","exec":[""]}}],"_postman_id":"ec243dd9-e4e4-a203-d4f7-536db0b2f3e0"},{"name":"Loan Types","item":[{"name":"Fetch Loan Type","id":"2f5b0ec7-6dea-077a-291d-368fdbd7bbde","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{external_api_host}}/v1/loan-types/{{type_id}}","description":"<p>Fetch a specific loan type specified by ID.</p>\n","urlObject":{"path":["v1","loan-types","{{type_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2f5b0ec7-6dea-077a-291d-368fdbd7bbde"},{"name":"Fetch Loan Types","id":"9403751a-6bce-0ca0-7f01-737c6f2cdbc1","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"formdata","formdata":[]},"url":"{{external_api_host}}/v1/loan-types?page[number]=1&page[size]=10","description":"<p>Fetch a page of loan types. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","loan-types"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"9403751a-6bce-0ca0-7f01-737c6f2cdbc1"},{"name":"Create Loan Type","event":[{"listen":"test","script":{"id":"1c193de9-1abc-4098-8acb-4ac7e42774e0","exec":[""],"type":"text/javascript"}}],"id":"0d4367e8-abec-6d10-d815-783a23ed654e","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"loan_type\": \"Conventional Fixed Rate\",\n  \"account_class\": {\n\t\"class_name\": \"mortgage\",\n\t\"class_type\": \"LOAN\"\n  }\n}"},"url":"{{external_api_host}}/v1/loan-types","description":"<p>Create a loan type.\nRequired Attributes:</p>\n<ul>\n<li>loan_type</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>owning_organization*</li>\n</ul>\n<p>*required if authenticated as an TE admin</p>\n","urlObject":{"path":["v1","loan-types"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"0d4367e8-abec-6d10-d815-783a23ed654e"}],"id":"e1aafc9f-212a-ed44-caf8-ee1e794104a1","description":"<p>Endpoints for interacting with the loan types resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Generated identifier for loan type.</td>\n</tr>\n<tr>\n<td>loan_type</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name of the loan type.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"uniqueness\">Uniqueness</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Fields</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>loan_type</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"relationships\">Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>account_class</td>\n<td>Yes</td>\n<td>account class</td>\n<td>class_name and class_type</td>\n<td>Classification of the type (example: a type which applies to mortgages). Must match an existing account class. Not required for mortgage types.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"689fb084-8ccd-4f8f-8a56-7c8fe39c95aa","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"f89e0cbe-80ff-4fcc-8827-6edb8b5b8e3a","type":"text/javascript","exec":[""]}}],"_postman_id":"e1aafc9f-212a-ed44-caf8-ee1e794104a1"},{"name":"Loan Statuses","item":[{"name":"Fetch Loan Status","id":"848c0418-30d3-ad66-2da3-90bb4d247970","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{external_api_host}}/v1/loan-statuses/{{status_id}}","description":"<p>Fetch a specific loan status specified by ID.</p>\n","urlObject":{"path":["v1","loan-statuses","{{status_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"848c0418-30d3-ad66-2da3-90bb4d247970"},{"name":"Fetch Loan Statuses","id":"41dc7ccf-b5ad-f2cf-a8e5-82aff09c8fd1","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"formdata","formdata":[]},"url":"{{external_api_host}}/v1/loan-statuses?page[number]=1&page[size]=10","description":"<p>Fetch a page of loan statuses. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","loan-statuses"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"41dc7ccf-b5ad-f2cf-a8e5-82aff09c8fd1"},{"name":"Create Loan Status","event":[{"listen":"test","script":{"id":"1d70a9fb-d072-439b-a412-1af82ac3c7ce","exec":[""],"type":"text/javascript"}}],"id":"fd9fc162-8cea-b684-aeb8-db9c3a6d7a87","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"loan_status\": \"Pending\",\n  \"account_class\": {\n\t\"class_name\": \"mortgage\",\n\t\"class_type\": \"LOAN\"\n  }\n}"},"url":"{{external_api_host}}/v1/loan-statuses","description":"<p>Create a loan status.\nRequired Attributes:</p>\n<ul>\n<li>loan_status</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>owning_organization*</li>\n</ul>\n<p>*required if authenticated as an TE admin</p>\n","urlObject":{"path":["v1","loan-statuses"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"fd9fc162-8cea-b684-aeb8-db9c3a6d7a87"}],"id":"199da90c-2546-a988-f43b-b533f53668e5","description":"<p>Endpoints for interacting with the loan statuses resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Generated identifier for loan status.</td>\n</tr>\n<tr>\n<td>loan_status</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name of the loan status.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"uniqueness\">Uniqueness</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Fields</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>loan_status</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"relationships\">Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>account_class</td>\n<td>Yes</td>\n<td>account class</td>\n<td>class_name and class_type</td>\n<td>Classification of the status (example: a status which applies to mortgages). Must match an existing account class. Not required for mortgage statuses.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"ef4da957-a362-47df-b92c-6a5f7b8a0429","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"79931cba-09f2-47a4-9634-2aa3c697fb72","type":"text/javascript","exec":[""]}}],"_postman_id":"199da90c-2546-a988-f43b-b533f53668e5"},{"name":"Loan Purposes","item":[{"name":"Fetch Loan Purpose","id":"24e2d09a-837d-2522-02af-b2defa5dc863","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{external_api_host}}/v1/loan-purposes/{{purpose_id}}","description":"<p>Fetch a specific loan purpose specified by ID.</p>\n","urlObject":{"path":["v1","loan-purposes","{{purpose_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"24e2d09a-837d-2522-02af-b2defa5dc863"},{"name":"Fetch Loan Purposes","id":"86d59b25-3512-0b90-d0db-c727227bb917","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"formdata","formdata":[]},"url":"{{external_api_host}}/v1/loan-purposes?page[number]=1&page[size]=10","description":"<p>Fetch a page of loan purposes. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","loan-purposes"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"86d59b25-3512-0b90-d0db-c727227bb917"},{"name":"Create Loan Purpose","event":[{"listen":"test","script":{"id":"8cf03866-d957-412e-831f-3eb8fd67d8ab","exec":[""],"type":"text/javascript"}}],"id":"9ff50191-f69d-20ae-7c32-95059d42283d","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"loan_purpose\": \"Refinance\",\n  \"account_class\": {\n\t\"class_name\": \"mortgage\",\n\t\"class_type\": \"LOAN\"\n  }\n}"},"url":"{{external_api_host}}/v1/loan-purposes","description":"<p>Create a loan purpose.\nRequired Attributes:</p>\n<ul>\n<li>loan_purpose</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>owning_organization*</li>\n</ul>\n<p>*required if authenticated as an TE admin</p>\n","urlObject":{"path":["v1","loan-purposes"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"9ff50191-f69d-20ae-7c32-95059d42283d"}],"id":"e98e9907-8811-db07-0463-8bcba544ea07","description":"<p>Endpoints for interacting with the loan purposes resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Generated identifier for loan purpose.</td>\n</tr>\n<tr>\n<td>loan_purpose</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name of the loan purpose.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"uniqueness\">Uniqueness</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Fields</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>loan_purpose</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"relationships\">Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>account_class</td>\n<td>Yes</td>\n<td>account class</td>\n<td>class_name and class_type</td>\n<td>Classification of the purpose (example: a purpose which applies to mortgages). Must match an existing account class. Not required for mortgage purposes.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"b0f96627-496c-4bb7-bcef-07c2dcb04a20","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"4b924c90-fb23-4707-9b81-0f6e4e986465","type":"text/javascript","exec":[""]}}],"_postman_id":"e98e9907-8811-db07-0463-8bcba544ea07"},{"name":"Loan Programs","item":[{"name":"Fetch Loan Program","id":"79a0910b-14a6-f0f5-4d68-5e06a483851b","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{external_api_host}}/v1/loan-programs/{{program_id}}","description":"<p>Fetch a specific loan program specified by TE ID.</p>\n","urlObject":{"path":["v1","loan-programs","{{program_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"79a0910b-14a6-f0f5-4d68-5e06a483851b"},{"name":"Fetch Loan Programs","id":"cc7ef492-3708-6353-ab15-c06f79652862","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"formdata","formdata":[]},"url":"{{external_api_host}}/v1/loan-programs?page[number]=1&page[size]=10","description":"<p>Fetch a page of loan programs. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","loan-programs"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"cc7ef492-3708-6353-ab15-c06f79652862"},{"name":"Create Loan Program","event":[{"listen":"test","script":{"id":"cfbec8bd-c364-464d-a062-db9d9ddf7aa1","exec":[""],"type":"text/javascript"}}],"id":"bd0fe9e4-b0da-e0bf-f822-048495c35350","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"loan_program\": \"10-year Fixed\",\n  \"account_class\": {\n\t\"class_name\": \"mortgage\",\n\t\"class_type\": \"LOAN\"\n  }\n}"},"url":"{{external_api_host}}/v1/loan-programs","description":"<p>Create a loan program.\nRequired Attributes:</p>\n<ul>\n<li>loan_program</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>owning_organization*</li>\n</ul>\n<p>*required if authenticated as an TE admin</p>\n","urlObject":{"path":["v1","loan-programs"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"bd0fe9e4-b0da-e0bf-f822-048495c35350"}],"id":"71f7bba6-2ed8-44ed-15e0-a2fb7974983f","description":"<p>Endpoints for interacting with the loan programs resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Generated identifier for loan program.</td>\n</tr>\n<tr>\n<td>loan_program</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name of the loan program.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"uniqueness\">Uniqueness</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Fields</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>loan_program</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"relationships\">Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>account_class</td>\n<td>Yes</td>\n<td>account class</td>\n<td>class_name and class_type</td>\n<td>Classification of the program (example: a program which applies to mortgages). Must match an existing account class. Not required for mortgage programs.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"716abdda-a08b-4f29-9945-9d2f613c5c70","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"9f669f6d-4518-4b00-8743-e3b976b6743f","type":"text/javascript","exec":[""]}}],"_postman_id":"71f7bba6-2ed8-44ed-15e0-a2fb7974983f"}],"id":"3801c9b2-dfce-48d0-b8fd-f18ef8ed65eb","_postman_id":"3801c9b2-dfce-48d0-b8fd-f18ef8ed65eb","description":""},{"name":"Account Endpoints","item":[{"name":"Accounts","item":[{"name":"Fetch Account","event":[{"listen":"prerequest","script":{"id":"7443d00a-47bb-422c-804c-05dafdf89c4c","exec":[""],"type":"text/javascript"}}],"id":"4abd79d3-f659-4b14-ae2b-4b2553804af9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/accounts/{{account_id}}","description":"<p>Fetch a specific account specified by ID.</p>\n","urlObject":{"path":["v1","accounts","{{account_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4abd79d3-f659-4b14-ae2b-4b2553804af9"},{"name":"Fetch Accounts","id":"7fd4d9fc-7e7f-4866-a37f-d42480b9c71a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/accounts?page[number]=1&page[size]=10","description":"<p>Fetch a page of accounts. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","accounts"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"7fd4d9fc-7e7f-4866-a37f-d42480b9c71a"},{"name":"Create Accounts","event":[{"listen":"test","script":{"id":"e5c083cd-f5ea-4cf2-87c7-45d7dcd6ea14","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"account_id\", jsonData.id);"],"type":"text/javascript"}}],"id":"1299f327-7e69-46cc-b681-80c751a1d204","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"external_id\": \"Test5\",\r\n    \"account_name\": \"Test5 Checking Account\",\r\n    \"account_number\": \"Test5\",\r\n    \"address\": \"132 Fake St.\",\r\n    \"address_2\": \"Suite 12\",\r\n    \"application_number\": \"123654789\",\r\n    \"city\": \"Smallton\",\r\n    \"open_date\": \"2018-10-16 04:20:00\",\r\n    \"zip_code\": \"55442\",\r\n    \"source\": \"An Account source\",\r\n    \"state\": \"Minnesota\",\r\n    \"primary_account_holder\": {\r\n        \"source\": \"Test\",\r\n        \"email\": \"test@test.com\",\r\n        \"first_name\": \"Firstname\",\r\n        \"last_name\": \"Lastname\",\r\n        \"custom\": [\r\n            {\r\n                \"field_name\": \"custom_string\",\r\n                \"value\": \"the custom field string value\"\r\n            }\r\n        ]\r\n    },\r\n    \"owner\": {\r\n        \"username\": \"testacct\"\r\n    },\r\n    \"account_class\": {\r\n        \"class_name\": \"checking_account\",\r\n        \"class_type\": \"ACCOUNT\"\r\n    },\r\n    \"account_status\": {\r\n        \"account_status\": \"Status One - Checking\"\r\n    },\r\n    \"account_type\": {\r\n        \"account_type\": \"Type One - Checking\"\r\n    },\r\n    \"custom\": [\r\n        {\r\n            \"field_name\": \"custom_string\",\r\n            \"value\": \"the custom field string value\"\r\n        }\r\n    ]\r\n}"},"url":"{{external_api_host}}/v1/accounts","description":"<p>Create an account</p>\n","urlObject":{"path":["v1","accounts"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1299f327-7e69-46cc-b681-80c751a1d204"},{"name":"Update Account","event":[{"listen":"prerequest","script":{"id":"a6c139dd-e234-4854-934f-7a177520774d","exec":["// postman.setEnvironmentVariable(\"loan_id\", \"7769878\");"],"type":"text/javascript"}}],"id":"1dc3fdf4-15e5-49af-8c42-55f9ec498826","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"external_id\": \"Test7\",\r\n    \"account_name\": \"Test7 Checking Account\",\r\n    \"account_number\": \"Test7\",\r\n    \"address\": \"132 Fake St.\",\r\n    \"address_2\": \"Suite 12\",\r\n    \"application_number\": \"123654789\",\r\n    \"city\": \"Smallton\",\r\n    \"last_modified_date\": \"2019-08-28 04:20:00\",\r\n    \"open_date\": \"2018-10-16 04:20:00\",\r\n    \"zip_code\": \"55442\",\r\n    \"source\": \"An Account source\",\r\n    \"state\": \"Minnesota\",\r\n    \"primary_account_holder\": {\r\n        \"source\": \"Test\",\r\n        \"email\": \"test@nationslending.com\",\r\n        \"first_name\": \"Firstname\",\r\n        \"last_name\": \"Lastname\"\r\n    },\r\n    \"owner\": {\r\n        \"username\": \"testacct\"\r\n    },\r\n    \"account_class\": {\r\n        \"class_name\": \"checking_account\",\r\n        \"class_type\": \"ACCOUNT\"\r\n    },\r\n    \"account_status\": {\r\n        \"account_status\": \"Status One - Checking\"\r\n    },\r\n    \"account_type\": {\r\n        \"account_type\": \"Type One - Checking\"\r\n    }\r\n}"},"url":"{{external_api_host}}/v1/accounts/{{account_id}}","description":"<p>Update an existing account by ID.</p>\n","urlObject":{"path":["v1","accounts","{{account_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1dc3fdf4-15e5-49af-8c42-55f9ec498826"}],"id":"2b86cb31-24d3-4dec-89d6-782894d62063","description":"<p>Endpoints for interacting with the accounts resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>account_name</td>\n<td>Yes</td>\n<td>varchar(255)</td>\n<td>name of the account</td>\n</tr>\n<tr>\n<td>account_number</td>\n<td>Yes</td>\n<td>varchar(255)</td>\n<td>number of the account</td>\n</tr>\n<tr>\n<td>account_rate</td>\n<td>Yes</td>\n<td>decimal(8,5)</td>\n<td>Interest rate of the account</td>\n</tr>\n<tr>\n<td>address</td>\n<td>Yes</td>\n<td>varchar(255)</td>\n<td>Mailing street address for account communication</td>\n</tr>\n<tr>\n<td>address_2</td>\n<td>Yes</td>\n<td>varchar(255)</td>\n<td>Mailing suite/unit number for account communication</td>\n</tr>\n<tr>\n<td>application_number</td>\n<td>Yes</td>\n<td>varchar(255)</td>\n<td>number of the application</td>\n</tr>\n<tr>\n<td>city</td>\n<td>Yes</td>\n<td>varchar(255)</td>\n<td>Mailing city for account communication</td>\n</tr>\n<tr>\n<td>external_id</td>\n<td>Yes</td>\n<td>varchar(255)</td>\n<td>ID of account in source system</td>\n</tr>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>bigint(10) unsigned</td>\n<td>generated identifier for account</td>\n</tr>\n<tr>\n<td>internal_created_at</td>\n<td>Yes</td>\n<td>datetime</td>\n<td>date/time when the account was created Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>internal_updated_at</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time when the account was updated. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>last_modified_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>date/time the account was modified. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>open_date</td>\n<td>Yes</td>\n<td>datetime</td>\n<td>Date account was opened</td>\n</tr>\n<tr>\n<td>source</td>\n<td>Yes</td>\n<td>string</td>\n<td>Account origination source</td>\n</tr>\n<tr>\n<td>state</td>\n<td>Yes</td>\n<td>varchar(100)</td>\n<td>Mailing state for account communication</td>\n</tr>\n<tr>\n<td>zip_code</td>\n<td>Yes</td>\n<td>varchar(10)</td>\n<td>Mailing postal code for account communication</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"uniqueness\">Uniqueness</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Fields</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>id</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"relationships\">Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>owner</td>\n<td>Yes</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>Owning loan officer for the account. Many-to-one relationship, so returned as an object.</td>\n</tr>\n<tr>\n<td>account_class</td>\n<td>Yes</td>\n<td>account</td>\n<td>class_name, class_type</td>\n<td>Account classification. Many-to-one relationship, so returned as an object.</td>\n</tr>\n<tr>\n<td>account_status</td>\n<td>Yes</td>\n<td>account</td>\n<td>account_status</td>\n<td>Account status. Many-to-one relationship, so returned as an object.</td>\n</tr>\n<tr>\n<td>account_type</td>\n<td>Yes</td>\n<td>account</td>\n<td>account_type</td>\n<td>Account type. Many-to-one relationship, so returned as an object.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"filtering\">Filtering</h5>\n<p>Use the 'filter=attribute_name=x,attribute_name_2=y' query to return the list of accounts that meet the filter criteria. For example, to filter contacts modified between Oct. 14, 2017 17:41:01 (UTC) and Oct. 15, 2017 17:41:09 (UTC), the following query could be used:</p>\n<p>/contacts?filter=internal_updated_at_start=2017-10-14T17:41:01Z,internal_updated_at_end=2017-10-15T17:41:09Z</p>\n<p>The supported filter attributes are shown in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>internal_updated_at_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>internal_updated_at_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>internal_created_at_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>internal_created_at_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>owner_id</td>\n<td>TE ID of the owning user.</td>\n</tr>\n<tr>\n<td>owner_email</td>\n<td>Email of the owning user.</td>\n</tr>\n<tr>\n<td>owner_username</td>\n<td>Username of the owning user.</td>\n</tr>\n<tr>\n<td>owner_external_id</td>\n<td>External ID of the owning user.</td>\n</tr>\n<tr>\n<td>account_number</td>\n<td>Account Number for the account.</td>\n</tr>\n<tr>\n<td>account_class_name</td>\n<td>Account Classification Name for the account.</td>\n</tr>\n<tr>\n<td>account_status</td>\n<td>Account Status for the account.</td>\n</tr>\n<tr>\n<td>account_type</td>\n<td>Account Type for the account.</td>\n</tr>\n<tr>\n<td>account_name_contains</td>\n<td>Account Name for the account contains the specified string.</td>\n</tr>\n<tr>\n<td>role_system_name</td>\n<td>Role system name for the account participant.</td>\n</tr>\n<tr>\n<td>borrower_id</td>\n<td>ID of the borrower participant on the account.</td>\n</tr>\n<tr>\n<td>agent_id</td>\n<td>ID of the agent participant on the account.</td>\n</tr>\n<tr>\n<td>other_id</td>\n<td>ID of the other participant on the account.</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"2b86cb31-24d3-4dec-89d6-782894d62063"},{"name":"Account Types","item":[{"name":"Fetch Account Type","event":[{"listen":"prerequest","script":{"id":"a843e381-bbc5-43e6-bbe7-8e1330a4181b","exec":[""],"type":"text/javascript"}}],"id":"f0d2d254-5881-491b-b307-c44d1efbda95","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/account-types/{{type_id}}","description":"<p>Fetch a specific account type specified by ID.</p>\n","urlObject":{"path":["v1","account-types","{{type_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f0d2d254-5881-491b-b307-c44d1efbda95"},{"name":"Fetch Account Types","id":"dd8a16d0-f93d-4365-94c0-1b421caafc6a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/account-types?page[number]=1&page[size]=10","description":"<p>Fetch a page of account types. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","account-types"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"dd8a16d0-f93d-4365-94c0-1b421caafc6a"},{"name":"Create Account Type","event":[{"listen":"test","script":{"id":"d4b5e195-d6c5-4c4e-8ea1-c64b4f1ff518","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"type_id\", jsonData.id);"],"type":"text/javascript"}}],"id":"53f82ca5-c1f5-4e7b-b051-f1386a7f3d65","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"account_type\": \"new type 3\",\n  \"account_class\": {\n  \t\"class_name\": \"cd_account\",\n  \t\"class_type\":\"ACCOUNT\"\n  }\n  \n}"},"url":"{{external_api_host}}/v1/account-types","description":"<p>Create an account type.\nRequired Attributes:</p>\n<ul>\n<li>account_type</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>owning_organization*</li>\n</ul>\n<p>*required if authenticated as an TE admin</p>\n","urlObject":{"path":["v1","account-types"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"53f82ca5-c1f5-4e7b-b051-f1386a7f3d65"},{"name":"Update Account Type","event":[{"listen":"test","script":{"id":"e1f1a389-f4d4-4003-abb4-5993cc7558a7","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"type_id\", jsonData.id);"],"type":"text/javascript"}}],"id":"00422ac9-2ef0-46cf-9312-bfcd6105492e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"account_type\": \"new type 3\",\n  \"account_class\": {\n  \t\"class_name\": \"cd_account\",\n  \t\"class_type\":\"ACCOUNT\"\n  }\n}"},"url":"{{external_api_host}}/v1/account-types/{{type_id}}","description":"<p>Update an existing account type by ID.</p>\n","urlObject":{"path":["v1","account-types","{{type_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"00422ac9-2ef0-46cf-9312-bfcd6105492e"}],"id":"d04b7356-ff2f-4b39-8b0a-3ba81bab90cb","description":"<p>Endpoints for interacting with the account types resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Generated identifier for account type.</td>\n</tr>\n<tr>\n<td>account_type</td>\n<td>Yes</td>\n<td>string</td>\n<td>Name of the account type.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"uniqueness\">Uniqueness</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Fields</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>id</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"relationships\">Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>account_class_id</td>\n<td>Yes</td>\n<td>account class</td>\n<td>class_name and class_type</td>\n<td>Classification of the type. Must match an existing account class id.</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"d04b7356-ff2f-4b39-8b0a-3ba81bab90cb"},{"name":"Account Classifications","item":[{"name":"Fetch Classes","id":"ca65460c-ef2e-48aa-b834-3a238a7fb59c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/account-classifications","urlObject":{"path":["v1","account-classifications"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"ca65460c-ef2e-48aa-b834-3a238a7fb59c"}],"id":"2ad4c76e-d23e-47cf-8692-58db5f849d30","_postman_id":"2ad4c76e-d23e-47cf-8692-58db5f849d30","description":""},{"name":"Account Statuses","item":[{"name":"Fetch Status","event":[{"listen":"prerequest","script":{"id":"8dd3a573-e62b-4695-a528-9ffe1249c8ae","exec":[""],"type":"text/javascript"}}],"id":"fbe4b65e-c25b-4f05-a103-9d33578bf5e1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/account-statuses/{{status_id}}","description":"<p>Fetch a specific account status specified by ID.</p>\n","urlObject":{"path":["v1","account-statuses","{{status_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"fbe4b65e-c25b-4f05-a103-9d33578bf5e1"},{"name":"Fetch Statuses","id":"abe35d1d-7250-46cb-890e-d0dbd7bbf4af","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/account-statuses?page[number]=1&page[size]=10","description":"<p>Fetch a page of account statuses. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","account-statuses"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"abe35d1d-7250-46cb-890e-d0dbd7bbf4af"},{"name":"Create Status","event":[{"listen":"test","script":{"id":"eb617e94-1b7a-457b-927b-dda670604468","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"status_id\", jsonData.id);"],"type":"text/javascript"}}],"id":"abd970f6-2e72-4f07-961c-cc3c27ca76a6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"account_status\": \"New status\",\n    \"account_class\": {\n        \"class_name\": \"checking_account\",\n        \"class_type\": \"ACCOUNT\"\n    }\n}"},"url":"{{external_api_host}}/v1/account-statuses","description":"<p>Create an account status.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>account_status</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>owning_organization*</li>\n</ul>\n<p>*required if authenticated as an TE admin</p>\n","urlObject":{"path":["v1","account-statuses"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"abd970f6-2e72-4f07-961c-cc3c27ca76a6"},{"name":"Update Status","event":[{"listen":"test","script":{"id":"57e421c4-3f72-4ad0-838e-172c80d50d3a","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"status_id\", jsonData.id);"],"type":"text/javascript"}}],"id":"c8ba9e42-9bb5-4cb7-9ed8-19136fdb6b4a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"account_status\": \"New status\",\n    \"account_class\": {\n        \"class_name\": \"checking_account\",\n        \"class_type\": \"ACCOUNT\"\n    }\n}"},"url":"{{external_api_host}}/v1/account-statuses/{{status_id}}","description":"<p>Update an existing account status by ID.</p>\n","urlObject":{"path":["v1","account-statuses","{{status_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c8ba9e42-9bb5-4cb7-9ed8-19136fdb6b4a"}],"id":"7e130a21-657b-46a2-a273-9a95c8c1342e","_postman_id":"7e130a21-657b-46a2-a273-9a95c8c1342e","description":""}],"id":"188e7ff1-ea6a-4c1b-ab5f-b565960fc3cc","event":[{"listen":"prerequest","script":{"id":"a6795d0a-b13e-4c48-9d52-999985701c3f","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"dfeb5f63-4eaf-4d09-85d3-0aa02db84476","type":"text/javascript","exec":[""]}}],"_postman_id":"188e7ff1-ea6a-4c1b-ab5f-b565960fc3cc","description":""},{"name":"Scenarios","item":[{"name":"Fetch Scenario","id":"d994ac93-06c1-4905-9bab-72b064dc4e5c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/scenarios/{{scenario_id}}","description":"<p>Fetch a specific scenario specified by ID.</p>\n","urlObject":{"path":["v1","scenarios","{{scenario_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d994ac93-06c1-4905-9bab-72b064dc4e5c"},{"name":"Fetch Scenarios","id":"6b96eacd-4b2f-4a59-885e-e3e60b726edf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/scenarios?page[number]=1&page[size]=10","description":"<p>Fetch a page of scenarios. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters. Can also filter by name, display_name, or expiration_date.</p>\n","urlObject":{"path":["v1","scenarios"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"6b96eacd-4b2f-4a59-885e-e3e60b726edf"},{"name":"Create Scenario (as Admin)","event":[{"listen":"test","script":{"id":"26ad4cd3-6c72-498e-932c-708f1d42389f","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"contact_id\", jsonData.id);"],"type":"text/javascript"}}],"id":"3861da81-f881-4f53-aaa4-3619d8b02c3c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"name\": \"123 Street Road, City, MN 12345\",\r\n    \"display_name\": \"123 Street Road Pricing\",\r\n    \"expiration_date\": \"2020-03-01 12:00:00\",\r\n    \"owner\":{\r\n        \"id\":50\r\n    },\r\n    \"tags\": [\r\n        {\r\n        \t\"type\": \"MLS_NUMBER\",\r\n        \t\"value\":\"123456\"\r\n    \t},\r\n    \t{\r\n    \t\t\"type\": \"CONTACT\",\r\n    \t\t\"value\": 12345\r\n    \t}\r\n    ],\r\n    \"data\": {\r\n        \"loan_scenarios\": [\r\n            {\r\n                \"product_name\": \"Conv 30 Year Fixed\",\r\n                \"rate\": 3.875,\r\n                \"apr\": 3.901,\r\n                \"monthly_payment\": 940,\r\n                \"monthly_premium\": 0,\r\n                \"is_arm\": false,\r\n                \"ltv\": 80,\r\n                \"num_payments\": 360,\r\n                \"term_total\": 30,\r\n                \"closing_costs\": 1200,\r\n                \"list_price\": 240000,\r\n                \"loan_amount\": 200000,\r\n                \"base_loan_amount\": 200000,\r\n                \"down_payment\": 40000,\r\n                \"down_payment_pct\": 20,\r\n                \"raw_down_payment_pct\": 0.2,\r\n                \"conforming\": true,\r\n                \"non_conforming\": false,\r\n                \"fha\": false,\r\n                \"va\": false,\r\n                \"fico_score\": 740,\r\n                \"arm_term\": null,\r\n                \"arm_index_value\": null,\r\n                \"arm_index\": null,\r\n                \"arm_margin\": null,\r\n                \"arm_cap_1\": null,\r\n                \"arm_cap_2\": null,\r\n                \"arm_cap_3\": null,\r\n                \"indexed_rate\": null\r\n            },\r\n            {\r\n                \"product_name\": \"Conv 30 Year Fixed\",\r\n                \"rate\": 3.875,\r\n                \"apr\": 3.901,\r\n                \"monthly_payment\": 1115,\r\n                \"monthly_premium\": 80,\r\n                \"is_arm\": false,\r\n                \"ltv\": 90,\r\n                \"num_payments\": 360,\r\n                \"term_total\": 30,\r\n                \"closing_costs\": 1200,\r\n                \"list_price\": 240000,\r\n                \"loan_amount\": 220000,\r\n                \"base_loan_amount\": 220000,\r\n                \"down_payment\": 20000,\r\n                \"down_payment_pct\": 10,\r\n                \"raw_down_payment_pct\": 0.1,\r\n                \"conforming\": true,\r\n                \"non_conforming\": false,\r\n                \"fha\": false,\r\n                \"va\": false,\r\n                \"fico_score\": 740,\r\n                \"arm_term\": null,\r\n                \"arm_index_value\": null,\r\n                \"arm_index\": null,\r\n                \"arm_margin\": null,\r\n                \"arm_cap_1\": null,\r\n                \"arm_cap_2\": null,\r\n                \"arm_cap_3\": null,\r\n                \"indexed_rate\": null\r\n            },\r\n            {\r\n                \"product_name\": \"Conv 7/1 ARM\",\r\n                \"rate\": 3.675,\r\n                \"apr\": 3.812,\r\n                \"monthly_payment\": 900,\r\n                \"monthly_premium\": 0,\r\n                \"is_arm\": true,\r\n                \"ltv\": 80,\r\n                \"num_payments\": 360,\r\n                \"term_total\": 30,\r\n                \"closing_costs\": 1300,\r\n                \"list_price\": 240000,\r\n                \"loan_amount\": 200000,\r\n                \"base_loan_amount\": 200000,\r\n                \"down_payment\": 40000,\r\n                \"down_payment_pct\": 20,\r\n                \"raw_down_payment_pct\": 0.2,\r\n                \"conforming\": true,\r\n                \"non_conforming\": false,\r\n                \"fha\": false,\r\n                \"va\": false,\r\n                \"fico_score\": 740,\r\n                \"arm_term\": 84,\r\n                \"arm_index_value\": 1.72,\r\n                \"arm_index\": \"CMT\",\r\n                \"arm_margin\": 2.25,\r\n                \"arm_cap_1\": 2,\r\n                \"arm_cap_2\": 2,\r\n                \"arm_cap_3\": 5,\r\n                \"indexed_rate\": 3.97\r\n            }\r\n        ]\r\n    }\r\n}"},"url":"{{external_api_host}}/v1/scenarios","description":"<p>Create a scenario.</p>\n<p>Required Attributes (one of the following combinations):</p>\n<ul>\n<li>name, data</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>owner*</li>\n<li>tags</li>\n</ul>\n<p>*required if authenticated as an organization admin</p>\n","urlObject":{"path":["v1","scenarios"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"3861da81-f881-4f53-aaa4-3619d8b02c3c"},{"name":"Update Scenario","id":"98041458-b285-484c-a223-2bba5e592f5e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"name\": \"123 Street Road, City, MN 12345\",\r\n    \"display_name\": \"123 Street Road Pricing\",\r\n    \"expiration_date\": \"2020-03-01 12:00:00\",\r\n    \"owner\":{\r\n        \"id\":50\r\n    },\r\n    \"tags\": [\r\n        {\r\n        \t\"type\": \"MLS_NUMBER\",\r\n        \t\"value\":\"654321\"\r\n    \t}\r\n    ],\r\n    \"remove_tags\": [\r\n    \t{\r\n    \t\t\"type\": \"CONTACT\",\r\n    \t\t\"value\": 12345\r\n    \t}\r\n    ],\r\n    \"data\": {\r\n        \"loan_scenarios\": [\r\n            {\r\n                \"product_name\": \"Conv 30 Year Fixed\",\r\n                \"rate\": 3.875,\r\n                \"apr\": 3.901,\r\n                \"monthly_payment\": 940,\r\n                \"monthly_premium\": 0,\r\n                \"is_arm\": false,\r\n                \"ltv\": 80,\r\n                \"num_payments\": 360,\r\n                \"term_total\": 30,\r\n                \"closing_costs\": 1200,\r\n                \"list_price\": 240000,\r\n                \"loan_amount\": 200000,\r\n                \"base_loan_amount\": 200000,\r\n                \"down_payment\": 40000,\r\n                \"down_payment_pct\": 20,\r\n                \"raw_down_payment_pct\": 0.2,\r\n                \"conforming\": true,\r\n                \"non_conforming\": false,\r\n                \"fha\": false,\r\n                \"va\": false,\r\n                \"fico_score\": 740,\r\n                \"arm_term\": null,\r\n                \"arm_index_value\": null,\r\n                \"arm_index\": null,\r\n                \"arm_margin\": null,\r\n                \"arm_cap_1\": null,\r\n                \"arm_cap_2\": null,\r\n                \"arm_cap_3\": null,\r\n                \"indexed_rate\": null\r\n            }\r\n        ]\r\n    }\r\n}"},"url":"{{external_api_host}}/v1/scenarios/{{scenario_id}}","description":"<p>Update an existing scenario by ID.</p>\n","urlObject":{"path":["v1","scenarios","{{scenario_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"98041458-b285-484c-a223-2bba5e592f5e"},{"name":"Delete Scenario","id":"42cb133b-c6a2-42a4-851e-05d6f6c3a52d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{external_api_host}}/v1/scenarios/{{scenario_id}}","description":"<p>Delete a scenario by ID.</p>\n","urlObject":{"path":["v1","scenarios","{{scenario_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"42cb133b-c6a2-42a4-851e-05d6f6c3a52d"}],"id":"f0702a40-ddba-4545-b487-56cf58c4c56f","description":"<p>Endpoints for interacting with the scenarios resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Generated identifier for scenario.</td>\n</tr>\n<tr>\n<td>name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Scenario's system name</td>\n</tr>\n<tr>\n<td>display_name</td>\n<td>Yes</td>\n<td>string</td>\n<td>Scenario's display name</td>\n</tr>\n<tr>\n<td>data</td>\n<td>Yes</td>\n<td>json</td>\n<td>Scenario data (see \"Scenario Data\" below).</td>\n</tr>\n<tr>\n<td>expiration_date</td>\n<td>Yes</td>\n<td>string</td>\n<td>Date of expiration for this scenario. Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>internal_created_at</td>\n<td>No</td>\n<td>string</td>\n<td>Date of creation of this scenario in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>internal_updated_at</td>\n<td>No</td>\n<td>string</td>\n<td>Date of last change for this scenario in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"scenario-data\">Scenario Data</h4>\n<p>The <code>data</code> field is validated against the JSON schema document specific to your organization. This field should not be encoded separately within the request.</p>\n<hr />\n<h5 id=\"relationships\">Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>owner</td>\n<td>Yes*</td>\n<td>User</td>\n<td>username, id, external_id</td>\n<td>Owning user of the scenario. One to many relationship, so returned as an object. *Only assignable/visible if authenticated as an organization admin.</td>\n</tr>\n<tr>\n<td>tags</td>\n<td>Yes</td>\n<td>Scenario Tag</td>\n<td>type, value</td>\n<td>Tags to which this scenario should apply. Many-to-one relationship, so returned as an array of objects. Tags can only be added or removed, they cannot be updated.</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"remove-relationships\">Remove Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>remove_tags</td>\n<td>Yes</td>\n<td>Scenario Tag</td>\n<td>type, value</td>\n<td>Tags to remove from the scenario.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"filtering\">Filtering</h3>\n<p>Use the 'filter=attribute_name=x,attribute_name_2=y' query to return the list of scenarios that meet the filter criteria. For example, to filter scenarios expired between Oct. 14, 2017 17:41:01 (UTC) and Oct. 15, 2017 17:41:09 (UTC), the following query could be used:</p>\n<p>/scenarios?filter=expiration_date_start=2017-10-14T17:41:01Z,expiration_date_end=2017-10-15T17:41:09Z</p>\n<p>The supported filter attributes are shown in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>expiration_date_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>expiration_date_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>name</td>\n<td>Scenario's system name</td>\n</tr>\n<tr>\n<td>display_name</td>\n<td>Scenario's display name</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"04d6c4e2-7300-40cd-af13-973609a911bb","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"a7972dcb-d897-4099-92a9-9f73a6912719","type":"text/javascript","exec":[""]}}],"_postman_id":"f0702a40-ddba-4545-b487-56cf58c4c56f"},{"name":"Email Unsubscribes","item":[{"name":"Fetch Email Domains","id":"7ffe5d17-e167-44b3-ae80-a473d6cd24ae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/email-domains","description":"<p>Fetch a page of email domains. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>domain_name</td>\n<td>No</td>\n<td>string</td>\n<td>The sending domain, e.g. 'totalexpert.com'</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["v1","email-domains"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7ffe5d17-e167-44b3-ae80-a473d6cd24ae"},{"name":"Create Email Unsubscribe","event":[{"listen":"test","script":{"id":"d6a59789-544c-4036-afd6-4e56866f4970","exec":[""],"type":"text/javascript"}}],"id":"7c87f5ba-17ab-4ecf-9a37-50159398acfe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"dontemailmeanymore@domain.com\",\r\n    \"organization_wide\": false,\r\n    \"users\": [\r\n        {\r\n            \"email\": \"user1@mycompany.net\"\r\n        },\r\n        {\r\n            \"external_id\": \"mycompany.user2\"\r\n        },\r\n        {\r\n            \"id\": 59\r\n        },\r\n        {\r\n            \"username\": \"user4\"\r\n        }\r\n    ],\r\n    \"domains\": [\r\n    \t{\r\n    \t\t\"domain_name\":\"mycompany.net\"\r\n    \t}\r\n\t]\r\n}"},"url":"{{external_api_host}}/v1/email-unsubscribes","description":"<p>Change the subscripition status for an email.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>email</li>\n</ul>\n<p>Required Relationships:\nNone</p>\n","urlObject":{"path":["v1","email-unsubscribes"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7c87f5ba-17ab-4ecf-9a37-50159398acfe"},{"name":"Fetch Email Unsubscribes","id":"922c1469-f581-4e5c-96ce-110247b3d614","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/email-unsubscribes?page[number]=1&page[size]=10","description":"<p>Fetch a page of unsubscribes. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>int</td>\n<td>The id of the email unsubscribe</td>\n</tr>\n<tr>\n<td>email</td>\n<td>No</td>\n<td>string</td>\n<td>The email that is unsubscribed</td>\n</tr>\n<tr>\n<td>organization_unsub_at</td>\n<td>No</td>\n<td>datetime</td>\n<td>The timestamp of when an organization unsubscribed</td>\n</tr>\n<tr>\n<td>organization_wide</td>\n<td>No</td>\n<td>bool</td>\n<td>The unsubscribe is org-wide</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["v1","email-unsubscribes"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[{"id":"01ba7bdc-bc03-442c-b10c-9eb99a2be54f","name":"Fetch Email Unsubscribes","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":{"raw":"{{external_api_host}}/v1/email-unsubscribes?page[number]=1&page[size]=10","host":["{{external_api_host}}"],"path":["v1","email-unsubscribes"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}]}},"code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"items\": [\n        {\n            \"email\": \"example-email@domain.com\",\n            \"id\": 1,\n            \"organization_unsub_at\": \"2021-01-28T16:21:40.000000Z\",\n            \"organization_wide\": true,\n            \"domains\": [\n                {\n                    \"domain_name\": \"totalexpertinc.com\",\n                    \"id\": 1,\n                    \"domain_unsub_at\": \"2021-01-28T16:21:40.000000Z\"\n                }\n            ],\n            \"users\": [\n                {\n                    \"email\": \"test-user@totalexpert.com\",\n                    \"external_id\": \"test\",\n                    \"id\": 50,\n                    \"username\": \"testacct\",\n                    \"user_unsub_at\": \"2021-01-28T16:21:40.000000Z\"\n                }\n            ]\n        }\n    ],\n    \"links\": {\n        \"first\": 1,\n        \"last\": 1,\n        \"next\": null,\n        \"prev\": null\n    }\n}"}],"_postman_id":"922c1469-f581-4e5c-96ce-110247b3d614"},{"name":"Fetch Email Unsubscribe","id":"222a1a7a-2e0d-47ed-adc1-dbf13d44261c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/email-unsubscribes/{{email_unsubscribe_id}}","description":"<p>Fetch a particular email unsubscribe by id.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>int</td>\n<td>The id of the email unsubscribe</td>\n</tr>\n<tr>\n<td>email</td>\n<td>No</td>\n<td>string</td>\n<td>The email that is unsubscribed</td>\n</tr>\n<tr>\n<td>organization_unsub_at</td>\n<td>No</td>\n<td>datetime</td>\n<td>The timestamp of when an organization unsubscribed</td>\n</tr>\n<tr>\n<td>organization_wide</td>\n<td>No</td>\n<td>bool</td>\n<td>The unsubscribe is org-wide</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["v1","email-unsubscribes","{{email_unsubscribe_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"5690cd39-cf59-4b5f-b956-020ab4b65fca","name":"Fetch Email Unsubscribe","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/email-unsubscribes/{{email_unsubscribe_id}}"},"code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"email\": \"example-email@domain.com\",\n    \"id\": 1,\n    \"organization_unsub_at\": \"2021-01-28T16:21:40.000000Z\",\n    \"organization_wide\": true,\n    \"domains\": [\n        {\n            \"domain_name\": \"totalexpertinc.com\",\n            \"id\": 1,\n            \"domain_unsub_at\": \"2021-01-28T16:21:40.000000Z\"\n        }\n    ],\n    \"users\": [\n        {\n            \"email\": \"test-user@totalexpert.com\",\n            \"external_id\": \"test\",\n            \"id\": 50,\n            \"username\": \"testacct\",\n            \"user_unsub_at\": \"2021-01-28T16:21:40.000000Z\"\n        }\n    ]\n}"}],"_postman_id":"222a1a7a-2e0d-47ed-adc1-dbf13d44261c"}],"id":"7692b9f9-1533-463b-a859-e97d8c166dfe","description":"<p>Endpoints for unsubscribing and tracking unsubscribes in TE.</p>\n<p>Unsubscribes are at three tiers - organization-wide unsubscribes, domain-level unsubscribes, and user-level unsubscribes.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>int</td>\n<td>The id of the email unsubscribe</td>\n</tr>\n<tr>\n<td>email</td>\n<td>Yes</td>\n<td>string</td>\n<td>email to subscribe or unsubscribe.</td>\n</tr>\n<tr>\n<td>organization_wide</td>\n<td>Yes</td>\n<td>boolean</td>\n<td>whether the email is unsubscribed for the entire organization</td>\n</tr>\n<tr>\n<td>organization_unsub_at</td>\n<td>No</td>\n<td>datetime</td>\n<td>The timestamp of when an organization unsubscribed</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"relationships\">Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>users</td>\n<td>Yes</td>\n<td>User</td>\n<td>username, id, external_id,email</td>\n<td>List of users from which this email is unsubscribed</td>\n</tr>\n<tr>\n<td>domains</td>\n<td>Yes</td>\n<td>EmailDomain</td>\n<td>domain_name, id</td>\n<td>List of domains from which this email is unsubscribed</td>\n</tr>\n<tr>\n<td>remove_users</td>\n<td>Yes</td>\n<td>User</td>\n<td>username, id, external_id,email</td>\n<td>List of users from which this email is no longer unsubscribed. Only available in some organizations.</td>\n</tr>\n<tr>\n<td>remove_domains</td>\n<td>Yes</td>\n<td>EmailDomain</td>\n<td>domain_name, id</td>\n<td>List of domains from which this email is no longer unsubscribed. Only available in some organizations.</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"notes\">Notes</h5>\n<p>Email unsubscribe changes will be sent via webhook to webhook subscriptions subscribed to the \"EMAIL_UNSUBSCRIBE/UPDATED\" action.</p>\n<h3 id=\"filtering\">Filtering</h3>\n<p>Use the 'filter=attribute_name=x,attribute_name_2=y' query to return the list of eamil unsubscribes that meet the filter criteria. For example, to filter email unsubscribes by field 'email', the following query could be used:</p>\n<p>/email-unsubscribes?filter=email=<a href=\"mailto:somebody@mail.com\">somebody@mail.com</a></p>\n<p>The supported filter attributes are shown in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>email used to subscribe or unsubscribe.</td>\n</tr>\n<tr>\n<td>organization_unsub_at_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest of ORGANIZATION unsubscribes, inclusive.</td>\n</tr>\n<tr>\n<td>organization_unsub_at_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest of ORGANIZATION unsubscribes, inclusive.</td>\n</tr>\n<tr>\n<td>user_unsub_at_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest of USER unsubscribes, inclusive.</td>\n</tr>\n<tr>\n<td>user_unsub_at_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest of USER unsubscribes, inclusive.</td>\n</tr>\n<tr>\n<td>domain_unsub_at_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest of DOMAIN unsubscribes, inclusive.</td>\n</tr>\n<tr>\n<td>domain_unsub_at_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest of DOMAIN unsubscribes, inclusive.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"fe813650-17f2-4f28-b9ba-bde4a95b68d9","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"9045a9f0-2e98-4ad3-adcc-f3fbede3527a","type":"text/javascript","exec":[""]}}],"_postman_id":"7692b9f9-1533-463b-a859-e97d8c166dfe"},{"name":"SMS Opting","item":[{"name":"Create Opt-in","event":[{"listen":"test","script":{"id":"1131a048-c109-493f-8283-ce3005dac37b","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"contact_group_id\", jsonData.id);"],"type":"text/javascript"}}],"id":"0db9474f-bcf2-4bce-b290-a14b0922eb95","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"phone_number\": \"612.555.1234\",\n    \"user\": {\n        \"id\": 50\n    },\n    \"status\": \"OPTED_IN\"\n}"},"url":"{{external_api_host}}/v1/sms/opt-in","description":"<p>Create a SMS Opt-in record.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>phone_number</li>\n<li>user</li>\n<li>status</li>\n</ul>\n","urlObject":{"path":["v1","sms","opt-in"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"0db9474f-bcf2-4bce-b290-a14b0922eb95"},{"name":"Create Opt-out","event":[{"listen":"test","script":{"id":"1131a048-c109-493f-8283-ce3005dac37b","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"contact_group_id\", jsonData.id);"],"type":"text/javascript"}}],"id":"c79dbc5b-9817-4ed0-bd2b-67ba13817cbf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"phone_number\": \"612.555.1234\"\n}"},"url":"{{external_api_host}}/v1/sms/opt-out","description":"<p>Create a SMS Opt-out record.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>phone_number</li>\n</ul>\n","urlObject":{"path":["v1","sms","opt-out"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c79dbc5b-9817-4ed0-bd2b-67ba13817cbf"}],"id":"63499b22-10ed-4993-8ef2-84aef75f1018","description":"<p>Endpoints for interacting with the SMS resources.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>phone_number</td>\n<td>Yes</td>\n<td>string</td>\n<td>Mobile phone number.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"opt-in-attributes\">Opt-in Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>status</td>\n<td>Yes</td>\n<td>string</td>\n<td>Status of the Opt-in: 'OPTED_IN'  <br />  <br />!! 'REQUESTED' and 'OPTED_OUT' have been deprecated. The request will not perform an update when passed; will be removed on 2025-12-09</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"relationships\">Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>user</td>\n<td>Yes*</td>\n<td>User</td>\n<td>username, id, external_id</td>\n<td>Owning user of the SMS Opt-in. One to many relationship, so returned as an object. *Only assignable on opt-in.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"d06193a6-1b64-4564-a86e-6c1135f02651","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"2e6bff4f-c655-4eed-ae53-c18806820a96","type":"text/javascript","exec":[""]}}],"_postman_id":"63499b22-10ed-4993-8ef2-84aef75f1018"},{"name":"Webhooks","item":[{"name":"Fetch Webhook Actions","id":"f82fb06a-2b9f-4794-a056-b93e2fdfd1ca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/webhook-actions/","description":"<p>Fetch a page of the list of subscribable actions. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>action</td>\n<td>No</td>\n<td>string</td>\n<td>name of the subscribed verb, e.g. 'CREATED'</td>\n</tr>\n<tr>\n<td>item</td>\n<td>Yes</td>\n<td>string</td>\n<td>name of the subscribed item, e.g. 'CONTACT'</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["v1","webhook-actions",""],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f82fb06a-2b9f-4794-a056-b93e2fdfd1ca"},{"name":"Create Webhook Subscription","event":[{"listen":"test","script":{"id":"d6a59789-544c-4036-afd6-4e56866f4970","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"subscription_id\", jsonData.id);"],"type":"text/javascript"}}],"id":"a3638ece-01cd-42f4-a1d7-831a77c3e631","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"url\": \"https://mydomain.example.com/v1/sample-webhook-consume5/\",\n  \"secret\":\"abcd1234\",\n    \"actions\": [\n        {\n            \"action\": \"CREATED\",\n            \"item\": \"CONTACT\"\n        }\n    ],\n    \"remove_actions\": [\n      {\n        \"action\":\"DELETED\",\n        \"item\":\"CONTACT\"\n      }\n    ]\n}"},"url":"{{external_api_host}}/v1/webhook-subscriptions","description":"<p>Create a webhook subscription.</p>\n<p>Required Attributes:</p>\n<ul>\n<li>url</li>\n</ul>\n<p>Required Relationships:</p>\n<ul>\n<li>actions</li>\n</ul>\n","urlObject":{"path":["v1","webhook-subscriptions"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"a3638ece-01cd-42f4-a1d7-831a77c3e631"},{"name":"Fetch Webhook Subscriptions","id":"14e5f165-541b-4b2c-8373-d0ff5a9c7e4c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/webhook-subscriptions?page[number]=1&page[size]=10","description":"<p>Fetch a page of subscriptions. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.</p>\n","urlObject":{"path":["v1","webhook-subscriptions"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"14e5f165-541b-4b2c-8373-d0ff5a9c7e4c"},{"name":"Fetch Webhook Subscription","id":"fb13de49-f475-4539-95ee-a756522f7fc6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/webhook-subscriptions/{{subscription_id}}?page[number]=1&page[size]=10","description":"<p>Fetch a specific subscription specified by ID.</p>\n","urlObject":{"path":["v1","webhook-subscriptions","{{subscription_id}}"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"fb13de49-f475-4539-95ee-a756522f7fc6"},{"name":"Delete Webhook Subscription","id":"e52a6c2f-c6f1-44da-b4e2-152ec87b993d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"formdata","formdata":[]},"url":"{{external_api_host}}/v1/webhook-subscriptions/{{subscription_id}}?page[number]=1&page[size]=10","description":"<p>Deletes a subscription by ID.</p>\n","urlObject":{"path":["v1","webhook-subscriptions","{{subscription_id}}"],"host":["{{external_api_host}}"],"query":[{"key":"page[number]","value":"1"},{"key":"page[size]","value":"10"}],"variable":[]}},"response":[],"_postman_id":"e52a6c2f-c6f1-44da-b4e2-152ec87b993d"},{"name":"Update Webhook Subscription","event":[{"listen":"test","script":{"id":"857a1572-8cfb-423a-b2d0-2bd9d68f33a5","exec":[""],"type":"text/javascript"}}],"id":"d3aa926c-ee19-42c5-9545-6a317f80acac","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"url\": \"https://mydomain.example.com/v1/sample-webhook-consume/\",\n    \"actions\": [\n        {\n            \"action\": \"CREATED\",\n            \"item\": \"CONTACT\"\n        },\n        {\n            \"action\": \"DELETED\",\n            \"item\": \"CONTACT\"\n        },\n        {\n            \"action\": \"UPDATED\",\n            \"item\": \"CONTACT\"\n        }\n    ],\n    \"secret\":\"new_secret\"\n}"},"url":"{{external_api_host}}/v1/webhook-subscriptions/{{subscription_id}}","description":"<p>Update an existing subscription by ID.</p>\n<p>This can be used to rotate the webhook secret. The updated secret will be applied for any changes <em>originating</em> after the subscription is patched. Pending webhooks will still be sent using the old secret.</p>\n","urlObject":{"path":["v1","webhook-subscriptions","{{subscription_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d3aa926c-ee19-42c5-9545-6a317f80acac"}],"id":"936e56d7-e12a-404e-85e1-5ea107bb6a4f","description":"<p>Webhooks allow you to stay informed on certain events that occur within the platform. They serve as a mechanism that keeps the system in sync by allowing one application to deliver information to another application in real-time. In other words, you receive data immediately.  </p>\n<h5 id=\"when-should-i-subscribe-to-webhooks\">When Should I Subscribe to Webhooks?</h5>\n<p>A subscription to a webhook is useful if your organization has a mirrored copy of your TE database, and you want to be informed of any changes that are occurring. Once you have a webhook, you retrieve data about a possible change. At that time, you can make the decision to update your database or not.  </p>\n<h6 id=\"webhook-examples\">Webhook Examples:</h6>\n<ul>\n<li>Organizations or vendors that have a CRM separate from the TE system could be informed of any contact or lead that is manually added through the TE system and not the CRM first.  </li>\n<li>When contacts are being updated directly within the TE system and not the CRM. This ensures the other system(s) stay in sync.  </li>\n<li>Deleting contacts or archiving contacts within TE ensures that the correct contacts are removed from the CRM database as well.  </li>\n<li>If contacts opt out of email communication within TE, the other CRM database can be updated to ensure communication does not reach them.</li>\n</ul>\n<h5 id=\"requesting-webhooks\">Requesting Webhooks</h5>\n<p>The following must be included during a webhook request: </p>\n<ul>\n<li>A URL where notifications are sent. This must be HTTPS protected by a valid certification.  </li>\n<li>A list of actions to subscribe to. To get a full list of these actions, use the fetch webhooks endpoint. </li>\n<li>A secret field that is included in any webhook notification sent by TE to the specified URL. This is used to authenticate that the process is not malicious.<br />-- A randomly generated HEX string of 32 to 64 characters is suggested. A secret of up to 255 characters is supported.<br />-- This secret can be rotated by performing a PATCH against the endpoint using the subscription ID you received when first creating the subscription.</li>\n</ul>\n<h5 id=\"webhook-notification-limitations\">Webhook Notification Limitations</h5>\n<p>NOTE: </p>\n<ul>\n<li>Users only receive notifications when the contact record is associated with your organization. </li>\n<li>Users do not receive notifications from contacts that are not associated with their organization. Co-marketers of organizational contacts also do not receive notifications.</li>\n</ul>\n<h5 id=\"what-happens-when-a-request-action-occurs\">What Happens When a Request Action Occurs?</h5>\n<p>TE generates a webhook notification. This consists of an HTTP POST request sent to the URL provided in the request.  </p>\n<h6 id=\"example-webhook-body\">Example Webhook Body</h6>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{ \n  \"item\":\"&lt;item&gt;\", \n  \"action\":\"&lt;action&gt;\", \n  \"id\":&lt;id&gt;, \n  \"hashValue\":\"&lt;hashValue&gt;\", \n  \"secret\":\"&lt;secret&gt;\" \n} \n</code></pre><p>Attributes </p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Attributes</strong></th>\n<th><strong>Descriptions</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>item</td>\n<td>Name of the subscribed item, ex: ‘CONTACT’</td>\n</tr>\n<tr>\n<td>action</td>\n<td>Name of the subscribed verb, ex: ‘CREATED’</td>\n</tr>\n<tr>\n<td>id</td>\n<td>The database ID of the item</td>\n</tr>\n<tr>\n<td>hashValue</td>\n<td>The value generated from the affected record. (See below for more information.)</td>\n</tr>\n<tr>\n<td>secret</td>\n<td>Secret that has been specified</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"what-is-the-hash-value\">What is the Hash Value?</h5>\n<p>The purpose of a hash value is to allow the user to view if the update has actually been made to the contact or not. Hash values are HEX strings that represent the contents of the affected record.  </p>\n<p>The hash value does not change if the notification is triggered on the same contact record without any actual changes happening to that specific contact. So, if you receive multiple notifications from one contact record without the hash value being update, you can safely ignore the second, third, fourth, etc. notification.  </p>\n<p>I.e. If a user saves a contact record within the TE UI without actually adjusting any of the contact’s information.  </p>\n<p>It is important to compare the hash value only to the most recent notification received. If a contact record has been modified but then reverts to its previous state, the last notification’s hash value would match the one from before the changes. </p>\n<hr />\n<h4 id=\"webhook-endpoints\">Webhook Endpoints</h4>\n<p>Endpoints for registering for webhooks in the TE system. </p>\n<p>All webhooks in the TE system subscribe to a set of 'actions'. An action comprises an 'entity' and a 'verb'. Subscribable actions can be fetched from the 'webhook-actions' endpoint. </p>\n<p>Each organization can have several webhooks, and each webhook can be registered to multiple actions. </p>\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>url</td>\n<td>No</td>\n<td>string</td>\n<td>url to which to send the webhook. Must be https.</td>\n</tr>\n<tr>\n<td>secret</td>\n<td>Yes</td>\n<td>string</td>\n<td>an additional secret to send in the body of the webhook.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h5 id=\"relationships\">Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>actions</td>\n<td>Yes</td>\n<td>User</td>\n<td>Action</td>\n<td>List of subscribed actions for this webhook. One-to-many relationship, so returned as an array.</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"special-postpatch-attributes\">Special POST/PATCH Attributes</h5>\n<p>These attributes are used to manipulate the contact but are neither contact attributes or relationships. These attributes will not appear in responses.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>remove_actions</td>\n<td>Yes</td>\n<td>User</td>\n<td>Action</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"568b08e9-9cd5-4f0a-94d5-315585edde88","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"09295f92-243d-47ef-82b7-8e81d08fa116","type":"text/javascript","exec":[""]}}],"_postman_id":"936e56d7-e12a-404e-85e1-5ea107bb6a4f"},{"name":"Schema Endpoints","item":[{"name":"Fetch Custom Field Schema","id":"1ea7cbf6-b5b8-43b8-a702-d8a6be2c55e6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{external_api_host}}/v1/schema/custom-fields","description":"<p>Fetch the schema of the custom fields defined for your organization.</p>\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>display_name</td>\n<td>No</td>\n<td>string</td>\n<td>Field name that will be displayed in the TE platform</td>\n</tr>\n<tr>\n<td>internal_created_at</td>\n<td>No</td>\n<td>string</td>\n<td>Date of creation of this custom field in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>internal_updated_at</td>\n<td>No</td>\n<td>string</td>\n<td>Date of last change to this custom field in TE systems. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>related_entity</td>\n<td>No</td>\n<td>relationship</td>\n<td>Contains two fields that specify the type of entity the custom field is tied to: entity_type (Possible values: loan, contact, account, user, entity) and entity_subtype, which can contain a custom string value</td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>system_name</td>\n<td>No</td>\n<td>string</td>\n<td>Field name that is used internally to identify the custom field</td>\n</tr>\n<tr>\n<td>data_type</td>\n<td>No</td>\n<td>string</td>\n<td>Custom field's data type (Possible values: text, datetime, date, boolean, integer, decimal)</td>\n</tr>\n<tr>\n<td>account_class</td>\n<td>No</td>\n<td>relationship</td>\n<td>Contains two fields that specify the account classification the custom field is tied to: class_name, which is a custom string, and class_type (Possible values: LOAN, ACCOUNT)</td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"filtering\">Filtering</h3>\n<p>Use the 'filter=attribute_name=x,attribute_name_2=y' query to return the list of custom field that meet the filter criteria. For example, to filter custom fields modified between Oct. 14, 2020 17:41:01 (UTC) and Oct. 15, 2020 17:41:09 (UTC), the following query could be used:</p>\n<p>/schema/custom-fields?filter=internal_updated_at_start=2017-10-14T17:41:01Z,internal_updated_at_end=2017-10-15T17:41:09Z</p>\n<p>The supported filter attributes are shown in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>internal_updated_at_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>internal_updated_at_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>internal_created_at_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>internal_created_at_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>system_name</td>\n<td>The internal name of the custom field</td>\n</tr>\n<tr>\n<td>related_entity_type</td>\n<td>The type of the related_entity</td>\n</tr>\n<tr>\n<td>account_class_name</td>\n<td>Name of the related account class</td>\n</tr>\n<tr>\n<td>account_class_type</td>\n<td>Type of the related account class</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["v1","schema","custom-fields"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1ea7cbf6-b5b8-43b8-a702-d8a6be2c55e6"},{"name":"Fetch Loan Participant Roles Schema","id":"87c4f245-16e0-4ab8-a8d3-c1c6d1d43de9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{external_api_host}}/v1/schema/participant-roles","description":"<p>Fetch the schema of the loan participant roles defined for your organization.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>display_name</td>\n<td>No</td>\n<td>string</td>\n<td>Role display name</td>\n</tr>\n<tr>\n<td>required</td>\n<td>No</td>\n<td>tinyint</td>\n<td>To describe the role is required</td>\n</tr>\n<tr>\n<td>system_name</td>\n<td>No</td>\n<td>string</td>\n<td>Role system name</td>\n</tr>\n<tr>\n<td>account_class</td>\n<td>No</td>\n<td>relationship</td>\n<td>Contains two fields that specify the account classification the custom field is tied to: class_name, which is a custom string, and class_type (Possible values: LOAN, ACCOUNT)</td>\n</tr>\n<tr>\n<td>role_type</td>\n<td>No</td>\n<td>relationship</td>\n<td>Contains three fields that specify the loan participant role type the custom field is tied to: discrete, rules_type_id and type_name</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"filtering\">Filtering</h3>\n<p>The supported filter attributes are show in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>system_name</td>\n<td>The system name for the role</td>\n</tr>\n<tr>\n<td>display_name</td>\n<td>The display name for the role</td>\n</tr>\n<tr>\n<td>required</td>\n<td>To describe if the role is required</td>\n</tr>\n<tr>\n<td>account_class_name</td>\n<td>The system name for the account classification</td>\n</tr>\n<tr>\n<td>account_class_type</td>\n<td>The type for the account classification</td>\n</tr>\n<tr>\n<td>role_type_name</td>\n<td>The name of the loan participant role type</td>\n</tr>\n<tr>\n<td>role_type_discrete</td>\n<td>To describe if the loan participant role type is discrete</td>\n</tr>\n<tr>\n<td>role_type_rules_type_id</td>\n<td>The id of the rules type as it relates to the the loan participant role type</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["v1","schema","participant-roles"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"87c4f245-16e0-4ab8-a8d3-c1c6d1d43de9"}],"id":"de8aabe8-61d7-465b-8aeb-828b62fa7492","description":"<p>Endpoints for viewing custom fields defined at the organization level.</p>\n<p>Required:</p>\n<ul>\n<li>In order to access these endpoints, you need to be an Organization Admin API user, as they return organization-wide data</li>\n<li>Scope: describeSchema</li>\n</ul>\n<p>NOTE: These endpoints are GET only</p>\n","_postman_id":"de8aabe8-61d7-465b-8aeb-828b62fa7492"},{"name":"ALM Leads (formerly Lead Opportunities)","item":[{"name":"Fetch Lead Opportunity","id":"acf116d9-5395-4809-a505-89af4e2eae94","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{external_api_host}}/v1/leads/{{lead_id}}","description":"<p>The <code>GET</code> endpoint returns details about the lead record, including the <code>lead_opportunity</code> details, any existing <code>lead_opportunity_offers</code>, and more.</p>\n<h3 id=\"attributes-unique-to-get\">Attributes unique to GET</h3>\n<h4 id=\"owner\">owner</h4>\n<p>Details about the current owner of the lead, including the following:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>attribute</strong></th>\n<th><strong>value</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>The user's e-mail address as stored in the Total Expert database</td>\n</tr>\n<tr>\n<td>external_id</td>\n<td>An assignable identifier of the user as represented in a third-party system</td>\n</tr>\n<tr>\n<td>id</td>\n<td>The user's internal Total Expert identifier</td>\n</tr>\n<tr>\n<td>username</td>\n<td>The user's internal Total Expert username</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"related_entities\">related_entities</h4>\n<p>Currently returns information about the contact record to which the lead is linked. <code>parent.id</code> represents the contact ID.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">\"related_entities\": [\n    {\n        \"relationship_type\": {\n            \"system_name\": \"Contact\"\n        },\n        \"parent\": [\n            {\n                \"id\": \"87987456\"\n            }\n        ]\n    }\n]\n\n</code></pre>\n<p>Example <code>GET</code> response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"title\": \"Mr.\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Smith\",\n    \"suffix\": \"Jr.\",\n    \"nickname\": \"Johnathon\",\n    \"email\": \"jsmith@gmail.com\",\n    \"address\": \"2744 Imaginary Ave\",\n    \"address_2\": \"Apartment 8\",\n    \"city\": \"Los Angeles\",\n    \"state\": \"CA\",\n    \"zip_code\": 90210,\n    \"phone_cell\": \"5555555555\",\n    \"phone_home\": \"2222222222\",\n    \"phone_office\": \"7777777777\",\n    \"ok_to_email\": 1,\n    \"referred_by\": \"Jane Smith\",\n    \"credit_score\": \"Excellent\",\n    \"source\": \"leadSourceName\",\n    \"assigned_to\": 50,\n    \"owner_id\": 50,\n    \"lead_opportunity\": {\n        \"property_value\": 350000,\n        \"property_county\": \"Alameda\",\n        \"property_zip\": 90010,\n        \"property_state\": \"CA\",\n        \"property_msa\": \"LA\",\n        \"loan_amount\": 325000,\n        \"loan_down_payment\": 25000,\n        \"loan_cash_out\": 0,\n        \"property_type\": \"Single Family\",\n        \"property_use\": \"Owner Occupied\",\n        \"loan_request_type\": \"Purchase\",\n        \"lead_price\": 50,\n        \"tracking_number\": \"123456\",\n        \"annual_income\": 120000,\n        \"first_time_buyer\": \"true\",\n        \"has_agent\": \"true\",\n        \"is_military\": \"false\",\n        \"self_credit_rating\": \"Good\",\n        \"bankruptcy\": \"fales\",\n        \"foreclosure\": \"false\",\n        \"working_with_agent\": \"true\",\n        \"found_home\": \"true\",\n        \"property_purchase_price\": 350000,\n        \"is_fha_eligible\": \"true\",\n        \"is_va_loan\": \"false\",\n        \"present_ltv\": 92.00,\n        \"proposed_ltv\": 92.00,\n        \"term\": \"30 year fixed\",\n        \"estimated_payment\": 1500,\n        \"apr\": 3.789,\n        \"market_value\": 355000,\n        \"rate_offer\": 3.625\n    },\n    \"lead_opportunity_offers\": [\n        {\n            \"offer_id\": 1,\n            \"offer_type\": \"Fixed\",\n            \"loan_program_name\": \"Conf 30 Yr Fixed\",\n            \"loan_amount\": 255000,\n            \"interest_rate\": 3.625,\n            \"term\": \"30 \",\n            \"points\": 0.75,\n            \"investor\": \"Total Expert(308)\",\n            \"lock_term\": 45,\n            \"monthly_payment\": 1367.34,\n            \"down_payment\": 295000,\n            \"apr\": 5.171\n        },\n        {\n            \"offer_id\": 2,\n            \"offer_type\": \"Fixed\",\n            \"loan_program_name\": \"Conf 15 Yr Fixed \",\n            \"loan_amount\": 255000,\n            \"interest_rate\": 4.625,\n            \"term\": \"180\",\n            \"points\": 0.75,\n            \"investor\": \"Total Expert(308)\",\n            \"lock_term\": 30,\n            \"monthly_payment\": 1067.34,\n            \"down_payment\": 295000.00,\n            \"apr\": 6.171\n        }\n    ],\n    \"custom\": [ \n                {\n                    \"field_name\": \"name\",\n                    \"value\": \"value\"\n                }\n    ],\n    \"owner\": {\n                \"email\": \"billfischer@example.com\",\n                \"external_id\": \"\",\n                \"id\": \"218923\",\n                \"username\": \"billfischer-example\"\n            },\n    \"related_entities\": [\n        {\n            \"relationship_type\": {\n                \"system_name\": \"Contact\"\n            },\n            \"parent\": [\n                {\n                    \"id\": \"87987456\"\n                }\n            ]\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"path":["v1","leads","{{lead_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"acf116d9-5395-4809-a505-89af4e2eae94"},{"name":"Create Lead Opportunity","id":"e8a78f12-5f00-4cb2-965c-956c6c37edec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"title\": \"Dr.\",\n    \"first_name\": \"Bill\",\n    \"last_name\": \"Nye\",\n    \"email\": \"the_science_guy@aol.com\",\n    \"address\": \"1234 Science Blvd\",\n    \"city\": \"Los Angeles\",\n    \"state\": \"CA\",\n    \"zip_code\": \"90210\",\n    \"phone_cell\": \"2134447777\",\n    \"phone_home\": \"2134447777\",\n    \"phone_office\": \"2134447777\",\n    \"ok_to_email\": true,\n    \"referred_by\": \"Albert Einstein\",\n    \"credit_score\": \"Excellent\",\n    \"source\": \"GoodLeads\",\n    \"owner\": {\n        \"id\": 1234,\n        \"external_id\": \"external-system-123\",\n        \"email\": \"test@example.com\",\n        \"username\": \"testtesterson-te\"\n    },\n    \"lead_opportunity\": {\n        \"property_value\": 850000,\n        \"property_county\": \"Alameda\",\n        \"property_zip\": \"90010\",\n        \"property_state\": \"CA\",\n        \"property_msa\": \"LA\",\n        \"loan_amount\": 850000,\n        \"loan_down_payment\": 25000.00,\n        \"loan_cash_out\": 0.00,\n        \"property_type\": \"Single Family\",\n        \"property_use\": \"Owner Occupied\",\n        \"loan_request_type\": \"Purchase\",\n        \"lead_price\": 50,\n        \"tracking_number\": \"123456\",\n        \"annual_income\": 250000,\n        \"first_time_buyer\": true,\n        \"has_agent\": true,\n        \"is_military\": false,\n        \"self_credit_rating\": \"Good\",\n        \"bankruptcy\": false,\n        \"foreclosure\": false,\n        \"working_with_agent\": true,\n        \"found_home\": true,\n        \"property_purchase_price\": 850000,\n        \"is_fha_eligible\": true,\n        \"present_ltv\": 92.00,\n        \"proposed_ltv\": 92.00,\n        \"term\": \"30 year fixed\",\n        \"estimated_payment\": 1500,\n        \"apr\": 5.789,\n        \"market_value\": 355000,\n        \"rate_offer\": 3.625\n    },\n    \"lead_opportunity_offers\": [\n        {\n            \"offer_id\": 1,\n            \"offer_type\": \"Fixed\",\n            \"loan_program_name\": \"Conf 30 Yr Fixed \",\n            \"loan_amount\": 855000.00\n        },\n        {\n            \"offer_id\": 2,\n            \"offer_type\": \"Fixed\",\n            \"loan_program_name\": \"Conf 15 Yr Fixed \",\n            \"loan_amount\": 855000.00\n        }\n    ],\n    \"custom\": [\n        {\n            \"field_name\": \"my_custom_field\", \n            \"value\": \"Super special value\"\n        }\n    ]\n}"},"url":"{{external_api_host}}/v1/leads","description":"<h3 id=\"leads-and-contacts\">Leads and Contacts</h3>\n<p>A <code>POST</code> request for a new lead wil also create a new contact record, but only if a matching contact is not found. A matching contact is one that meets this criteria:</p>\n<ul>\n<li>Has a first name identical to the request <code>first_name</code></li>\n<li>Has a last name identical tp the request <code>last_name</code></li>\n<li>Has an e-mail address <em>or</em> phone number field identical to those in the request</li>\n<li>If <code>owner_id</code> is <em><strong>not</strong></em> in the request, the contact meets the above matching criteria <em>and</em> is owned by the same organization</li>\n<li>If an <code>owner_id</code> <em><strong>is</strong></em> in the request, the contact meets the above matching criteria <em>and</em> is owned by the exact same user ID</li>\n</ul>\n<p>A successful response from will return the ID of the new lead, and the ID of either the new contact or the existing, matched contact:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"contact_id\": 144558,\n    \"lead_id\": 144559\n}\n\n</code></pre>\n<h3 id=\"required-fields\">Required Fields</h3>\n<p>One of the following combinations:</p>\n<ul>\n<li><code>first_name</code>, <code>last_name</code>, <code>source</code>, <code>email</code></li>\n<li><code>first_name</code>, <code>last_name</code>, <code>source</code>, <code>address</code>, <code>city</code>, <code>state</code>, <code>zip</code></li>\n<li><code>first_name</code>, <code>last_name</code>, <code>source</code>, <code>phone_home</code></li>\n<li><code>first_name</code>, <code>last_name</code>, <code>source</code>, <code>phone_cell</code></li>\n<li><code>first_name</code>, <code>last_name</code>, <code>source</code>, <code>phone_office</code></li>\n</ul>\n<p>Optional fields:</p>\n<ul>\n<li><code>owner_id</code></li>\n<li>All <code>lead_opportunity</code> fields,</li>\n<li>All <code>lead_opportunity_offers</code> fields</li>\n<li><code>custom</code> fields</li>\n</ul>\n<h3 id=\"lead-attributes\">Lead Attributes</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Data Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>tile</td>\n<td>string</td>\n<td>The contact's honorific/title, e.g. \"Doctor\"</td>\n</tr>\n<tr>\n<td>first_name</td>\n<td>string</td>\n<td>The contact's first name</td>\n</tr>\n<tr>\n<td>last_name</td>\n<td>string</td>\n<td>The contact's last name</td>\n</tr>\n<tr>\n<td>suffix</td>\n<td>string</td>\n<td>The contact's suffix, e.g. \"Jr.\"</td>\n</tr>\n<tr>\n<td>nickname</td>\n<td>string</td>\n<td>The contact's preferred name</td>\n</tr>\n<tr>\n<td>owner_id</td>\n<td>integer</td>\n<td>The Total Expert user ID that owns the contact/lead</td>\n</tr>\n<tr>\n<td>address</td>\n<td>string</td>\n<td>Street address portion of contact's current address.</td>\n</tr>\n<tr>\n<td>address_2</td>\n<td>string</td>\n<td>Line 2 portion of contact's current address.</td>\n</tr>\n<tr>\n<td>city</td>\n<td>string</td>\n<td>City portion of contact's current address.</td>\n</tr>\n<tr>\n<td>state</td>\n<td>string</td>\n<td>State portion of current contact's address. Preferred  <br />format: Two character state abbreviation, e.g. 'CA'</td>\n</tr>\n<tr>\n<td>zip_code</td>\n<td>string</td>\n<td>Zip code portion of contact's current address.  <br />Preferred format: 5 digit postal code, e.g. '90210'</td>\n</tr>\n<tr>\n<td>birthday</td>\n<td>string</td>\n<td>Contact's birthday, formatted as a date with 1970 as  <br />the year. Preferred format: '1970-MM-DD'</td>\n</tr>\n<tr>\n<td>creation_date</td>\n<td>string</td>\n<td>Date of creation of this contact. Preferred format:  <br />'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>last_contacted_date</td>\n<td>string</td>\n<td>Date/time of last interaction with contact. Preferred  <br />format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Contact's personal email address.</td>\n</tr>\n<tr>\n<td>email_work</td>\n<td>string</td>\n<td>Contact's work email address.</td>\n</tr>\n<tr>\n<td>phone_cell</td>\n<td>string</td>\n<td>Contact's cell phone number, preferred format:  <br />'(555)555-1234'</td>\n</tr>\n<tr>\n<td>phone_home</td>\n<td>string</td>\n<td>Contact's home phone number, preferred format:  <br />'(555)555-1234'</td>\n</tr>\n<tr>\n<td>phone_office</td>\n<td>string</td>\n<td>Contact's office phone number, preferred format:  <br />'(555)555-1234'</td>\n</tr>\n<tr>\n<td>ok_to_call</td>\n<td>boolean</td>\n<td>Indicator whether it is OK to call this contact.  <br />True or 1 - Yes  <br />False or 0 -No</td>\n</tr>\n<tr>\n<td>ok_to_email</td>\n<td>boolean</td>\n<td>Indicator whether it is OK to call this contact.  <br />True or 1 - Yes  <br />False or 0 -No</td>\n</tr>\n<tr>\n<td>ok_to_mail</td>\n<td>boolean</td>\n<td>Indicator whether it is OK to call this contact.  <br />True or 1 - Yes  <br />False or 0 -No</td>\n</tr>\n<tr>\n<td>referred_by</td>\n<td>string</td>\n<td>Name of person by whom this contact was referred.</td>\n</tr>\n<tr>\n<td>source</td>\n<td>string</td>\n<td>Source of the contact.</td>\n</tr>\n<tr>\n<td>credit_score</td>\n<td>string</td>\n<td>Total Expert credit rating of the lead.  <br />Available values:  <br />Excellent, Good, Fair, Poor, Very Poor.</td>\n</tr>\n<tr>\n<td>credit_score_date</td>\n<td>string</td>\n<td>Date/time of contact's last received credit score.  <br />Preferred format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"opportunity-attributes\">Opportunity Attributes</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Data Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>property_value</td>\n<td>integer</td>\n<td></td>\n</tr>\n<tr>\n<td>property_county</td>\n<td>string</td>\n<td>County which the property to be financed is  <br />located, e.g. Alameda</td>\n</tr>\n<tr>\n<td>property_zip</td>\n<td>string</td>\n<td>Postal Code of the property to be financed, e.g.  <br />90210</td>\n</tr>\n<tr>\n<td>property_state</td>\n<td>string</td>\n<td>State which the property is located. Preferred  <br />format is two character state abbreviation, e.g.  <br />'CA'</td>\n</tr>\n<tr>\n<td>property_msa</td>\n<td>string</td>\n<td>Metropolitan area which the property is located,  <br />e.g. 'Greater Los Angeles'</td>\n</tr>\n<tr>\n<td>loan_amount</td>\n<td>integer</td>\n<td>Estimated loan amount requested, e.g. 250000</td>\n</tr>\n<tr>\n<td>loan_down_payment</td>\n<td>integer</td>\n<td>Estimated down payment requested, e.g. 100000</td>\n</tr>\n<tr>\n<td>loan_cash_out</td>\n<td>integer</td>\n<td>Estimated additional cash out amount requested,  <br />e.g. 10000</td>\n</tr>\n<tr>\n<td>property_type</td>\n<td>string</td>\n<td>Type of property to be financed, e.g. 'Single  <br />Family Dettached'</td>\n</tr>\n<tr>\n<td>property_use</td>\n<td>string</td>\n<td>Occupancy of the property to be financed, e.g.  <br />'Owner Occupied'</td>\n</tr>\n<tr>\n<td>loan_request_type</td>\n<td>string</td>\n<td>Loan purpose, e.g. “Purchase’ or “Cash-out  <br />Refinance’</td>\n</tr>\n<tr>\n<td>lead_price</td>\n<td>string</td>\n<td>Amount charged by source to generate lead</td>\n</tr>\n<tr>\n<td>tracking_number</td>\n<td>string</td>\n<td>Unique identifier assigned by the source for the  <br />lead</td>\n</tr>\n<tr>\n<td>annual_income</td>\n<td>decimal</td>\n<td>Annual income of the lead.</td>\n</tr>\n<tr>\n<td>first_time_buyer</td>\n<td>boolean</td>\n<td>Indicator if lead is a first time home buyer. True or 1  <br />= Is a First Time Home Buyer</td>\n</tr>\n<tr>\n<td>has_agent</td>\n<td>boolean</td>\n<td>Indicator if lead is working with a real estate  <br />agent. True or 1 = Is working with an Agent</td>\n</tr>\n<tr>\n<td>is_military</td>\n<td>boolean</td>\n<td>Indicator if lead is active duty or a veteran. True or 1  <br />= is active duty or a veteran</td>\n</tr>\n<tr>\n<td>self_credit_rating</td>\n<td>string</td>\n<td>Estimated credit rating of contact. Preferred  <br />values: 'Excellent', 'Good', 'Fair', 'Poor', 'Very  <br />Poor'</td>\n</tr>\n<tr>\n<td>bankruptcy</td>\n<td>boolean</td>\n<td>Indicator if lead has had bankruptcy. True or 1 = has had  <br />bankruptcy</td>\n</tr>\n<tr>\n<td>foreclosure</td>\n<td>boolean</td>\n<td>Indicator if lead has had foreclosure. True or 1 = has had  <br />foreclosure</td>\n</tr>\n<tr>\n<td>found_home</td>\n<td>boolean</td>\n<td>Indicator if lead has located the property they  <br />intend to finance. True or 1 = They have located a  <br />home.</td>\n</tr>\n<tr>\n<td>property_purchase_price</td>\n<td>decimal</td>\n<td>Contracted purchase price of the property to be  <br />financed, e.g. 350000</td>\n</tr>\n<tr>\n<td>is_fha_eligible</td>\n<td>boolean</td>\n<td>Indicator if lead is eligible for FHA product. True or 1 = Is  <br />eligible for FHA product.</td>\n</tr>\n<tr>\n<td>is_va_loan</td>\n<td>boolean</td>\n<td>Indicator of the offer selected is VA eligible.  <br />True or 1 = VA Offer</td>\n</tr>\n<tr>\n<td>present_ltv</td>\n<td>decimal</td>\n<td>Current Loan To Value ratio of the property to be  <br />financed. Rounded to the nearest thousandth, e.g.  <br />71.123</td>\n</tr>\n<tr>\n<td>proposed_ltv</td>\n<td>decimal</td>\n<td>Requested Loan To Value ratio of the property to  <br />be financed. Rounded to the nearest thousandth,  <br />e.g. 74.123</td>\n</tr>\n<tr>\n<td>term</td>\n<td>string</td>\n<td>Requested or selected term of the offer, e.g. 30  <br />year fixed</td>\n</tr>\n<tr>\n<td>estimated_payment</td>\n<td>decimal</td>\n<td>Estimated payment of the selected offer, e.g.  <br />1234.55</td>\n</tr>\n<tr>\n<td>apr</td>\n<td>decimal</td>\n<td>Annual Percentage Rate of the selected offer.  <br />Rounded to the nearest thousandth, e.g. 3.625</td>\n</tr>\n<tr>\n<td>market_value</td>\n<td>decimal</td>\n<td>Market value of the property to be financed.  <br />Rounded to the nearest thousandth, e.g.  <br />350000.000</td>\n</tr>\n<tr>\n<td>rate_offer</td>\n<td>decimal</td>\n<td>Note Rate of the selected offer. Rounded to the  <br />nearest thousandth, e.g. 3.125</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"offers-attributes\">Offers Attributes</h3>\n<p><em>The following represents the attributes of one offer object. Offers can be passed in an array [ ].</em></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Data Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>offer_id</td>\n<td>integer</td>\n<td></td>\n</tr>\n<tr>\n<td>offer_type</td>\n<td>string</td>\n<td>Amortization type of the offer, ex. Fixed</td>\n</tr>\n<tr>\n<td>loan_program_name</td>\n<td>string</td>\n<td>Name of the loan program of the offer, ex. Conf 30 Yr  <br />Fixed</td>\n</tr>\n<tr>\n<td>loan_amount</td>\n<td>decimal</td>\n<td>Loan amount used to generate the offer, ex. 250000</td>\n</tr>\n<tr>\n<td>interest_rate</td>\n<td>decimal</td>\n<td>Interest rate of the offer, ex. 3.750</td>\n</tr>\n<tr>\n<td>term</td>\n<td>string</td>\n<td>Amortization term of the offer, ex. 30</td>\n</tr>\n<tr>\n<td>points</td>\n<td>decimal</td>\n<td>Price of the offer, ex. 1</td>\n</tr>\n<tr>\n<td>investor</td>\n<td>string</td>\n<td>Investor used to generate the offer, ex. Wells Fargo</td>\n</tr>\n<tr>\n<td>lock_term</td>\n<td>integer</td>\n<td>Lock period used to generate the offer, ex. 45</td>\n</tr>\n<tr>\n<td>monthly_payment</td>\n<td>decimal</td>\n<td>Monthly Principle and Interest payment of the offer</td>\n</tr>\n<tr>\n<td>down_payment</td>\n<td>decimal</td>\n<td>Down payment used to generate the offer</td>\n</tr>\n<tr>\n<td>apr</td>\n<td>decimal</td>\n<td>Annual Percentage Rate of the offer</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"custom-field-attributes\">Custom Field Attributes</h3>\n<p>The optional <code>custom</code> attribute, if specified, should contain one or more objects, each object representing one custom field name and its value. The custom fields should be wrapped in an array:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">\"custom\": [\n        {\n            \"field_name\": \"first_datetime\", \n            \"value\": \"07/21/2023 00:00:00\"\n        },\n        {\n            \"field_name\": \"date\", \n            \"value\": \"10/30/2023\"\n        }\n    ]\n\n</code></pre>\n<p>A custom field definition of type \"contact\" that matches the given <code>field_name</code> <strong>must already exist</strong> for the <code>POST</code> to succeed. A <code>POST</code> request will <strong>not</strong> create new, adhoc custom field definitions.</p>\n<h4 id=\"attributes-of-a-custom-field\">Attributes of a custom field</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Data Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>field_name</td>\n<td>string</td>\n<td>The system name of the custom field.</td>\n</tr>\n<tr>\n<td>value</td>\n<td><em>variable, according to definition</em></td>\n<td>A custom value matching the data type of the custom field definition.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["v1","leads"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"1115517a-8170-4394-aef5-ee2a00dc7e6c","name":"With Owner","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"owner_id\": 64,\n    \"title\": \"Dr.\",\n    \"first_name\": \"Bill\",\n    \"last_name\": \"Nye\",\n    \"email\": \"the_science_guy@aol.com\",\n    \"address\": \"1234 Science Blvd\",\n    \"city\": \"Los Angeles\",\n    \"state\": \"CA\",\n    \"zip_code\": \"90210\",\n    \"phone_cell\": \"2134447777\",\n    \"phone_home\": \"2134447777\",\n    \"phone_office\": \"2134447777\",\n    \"ok_to_email\": true,\n    \"referred_by\": \"Albert Einstein\",\n    \"credit_score\": \"Excellent\",\n    \"source\": \"LeadSource\",\n    \"owner\": {\n        \"id\": 1234,\n        \"external_id\": \"external-system-123\",\n        \"email\": \"test@example.com\",\n        \"username\": \"testtesterson-te\"\n    },\n    \"lead_opportunity\": {\n        \"property_value\": 850000,\n        \"property_county\": \"Alameda\",\n        \"property_zip\": \"90010\",\n        \"property_state\": \"CA\",\n        \"property_msa\": \"LA\",\n        \"loan_amount\": 850000,\n        \"loan_down_payment\": 25000.00,\n        \"loan_cash_out\": 0.00,\n        \"property_type\": \"Single Family\",\n        \"property_use\": \"Owner Occupied\",\n        \"loan_request_type\": \"Purchase\",\n        \"lead_price\": 50,\n        \"tracking_number\": \"123456\",\n        \"annual_income\": 250000,\n        \"first_time_buyer\": true,\n        \"has_agent\": true,\n        \"is_military\": false,\n        \"self_credit_rating\": \"Good\",\n        \"bankruptcy\": false,\n        \"foreclosure\": false,\n        \"working_with_agent\": true,\n        \"found_home\": true,\n        \"property_purchase_price\": 850000,\n        \"is_fha_eligible\": true,\n        \"present_ltv\": 92.00,\n        \"proposed_ltv\": 92.00,\n        \"term\": \"30 year fixed\",\n        \"estimated_payment\": 1500,\n        \"apr\": 5.789,\n        \"market_value\": 355000,\n        \"rate_offer\": 3.625\n    },\n    \"lead_opportunity_offers\": [\n        {\n            \"offer_id\": 1,\n            \"offer_type\": \"Fixed\",\n            \"loan_program_name\": \"Conf 30 Yr Fixed \",\n            \"loan_amount\": 855000.00\n        },\n        {\n            \"offer_id\": 2,\n            \"offer_type\": \"Fixed\",\n            \"loan_program_name\": \"Conf 15 Yr Fixed \",\n            \"loan_amount\": 855000.00\n        }\n    ],\n    \"custom\": [\n        {\n            \"field_name\": \"my_custom_field\", \n            \"value\": \"Super special value\"\n        }\n    ]\n}"},"url":"{{external_api_host}}/v1/leads"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"contact_id\": 58,\n    \"lead_id\": 61\n}"},{"id":"57178638-d06f-46b3-bb13-570e4eb24d75","name":"With Lead Source","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"title\": \"Dr.\",\n    \"first_name\": \"Bill\",\n    \"last_name\": \"Nye\",\n    \"email\": \"the_science_guy@aol.com\",\n    \"address\": \"1234 Science Blvd\",\n    \"city\": \"Los Angeles\",\n    \"state\": \"CA\",\n    \"zip_code\": \"90210\",\n    \"phone_cell\": \"2134447777\",\n    \"phone_home\": \"2134447777\",\n    \"phone_office\": \"2134447777\",\n    \"ok_to_email\": true,\n    \"referred_by\": \"Albert Einstein\",\n    \"credit_score\": \"Excellent\",\n    \"source\": \"GoodLeads\",\n    \"lead_opportunity\": {\n        \"property_value\": 850000,\n        \"property_county\": \"Alameda\",\n        \"property_zip\": \"90010\",\n        \"property_state\": \"CA\",\n        \"property_msa\": \"LA\",\n        \"loan_amount\": 850000,\n        \"loan_down_payment\": 25000.00,\n        \"loan_cash_out\": 0.00,\n        \"property_type\": \"Single Family\",\n        \"property_use\": \"Owner Occupied\",\n        \"loan_request_type\": \"Purchase\",\n        \"lead_price\": 50,\n        \"tracking_number\": \"123456\",\n        \"annual_income\": 250000,\n        \"first_time_buyer\": true,\n        \"has_agent\": true,\n        \"is_military\": false,\n        \"self_credit_rating\": \"Good\",\n        \"bankruptcy\": false,\n        \"foreclosure\": false,\n        \"working_with_agent\": true,\n        \"found_home\": true,\n        \"property_purchase_price\": 850000,\n        \"is_fha_eligible\": true,\n        \"present_ltv\": 92.00,\n        \"proposed_ltv\": 92.00,\n        \"term\": \"30 year fixed\",\n        \"estimated_payment\": 1500,\n        \"apr\": 5.789,\n        \"market_value\": 355000,\n        \"rate_offer\": 3.625\n    },\n    \"lead_opportunity_offers\": [\n        {\n            \"offer_id\": 1,\n            \"offer_type\": \"Fixed\",\n            \"loan_program_name\": \"Conf 30 Yr Fixed \",\n            \"loan_amount\": 855000.00\n        },\n        {\n            \"offer_id\": 2,\n            \"offer_type\": \"Fixed\",\n            \"loan_program_name\": \"Conf 15 Yr Fixed \",\n            \"loan_amount\": 855000.00\n        }\n    ],\n    \"custom\": [\n        {\n            \"field_name\": \"my_custom_field\", \n            \"value\": \"Super special value\"\n        }\n    ]\n}"},"url":"{{external_api_host}}/v1/leads"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"contact_id\": 58,\n    \"lead_id\": 61\n}"},{"id":"141fc0ef-92a3-43df-92a8-17869591fb32","name":"With Custom Fields","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"title\": \"Dr.\",\n    \"first_name\": \"Bill\",\n    \"last_name\": \"Nye\",\n    \"email\": \"the_science_guy@aol.com\",\n    \"address\": \"1234 Science Blvd\",\n    \"city\": \"Los Angeles\",\n    \"state\": \"CA\",\n    \"zip_code\": \"90210\",\n    \"phone_cell\": \"2134447777\",\n    \"phone_home\": \"2134447777\",\n    \"phone_office\": \"2134447777\",\n    \"ok_to_email\": true,\n    \"referred_by\": \"Albert Einstein\",\n    \"credit_score\": \"Excellent\",\n    \"source\": \"GoodLeads\",\n    \"lead_opportunity\": {\n        \"property_value\": 850000,\n        \"property_county\": \"Alameda\",\n        \"property_zip\": \"90010\",\n        \"property_state\": \"CA\",\n        \"property_msa\": \"LA\",\n        \"loan_amount\": 850000,\n        \"loan_down_payment\": 25000.00,\n        \"loan_cash_out\": 0.00,\n        \"property_type\": \"Single Family\",\n        \"property_use\": \"Owner Occupied\",\n        \"loan_request_type\": \"Purchase\",\n        \"lead_price\": 50,\n        \"tracking_number\": \"123456\",\n        \"annual_income\": 250000,\n        \"first_time_buyer\": true,\n        \"has_agent\": true,\n        \"is_military\": false,\n        \"self_credit_rating\": \"Good\",\n        \"bankruptcy\": false,\n        \"foreclosure\": false,\n        \"working_with_agent\": true,\n        \"found_home\": true,\n        \"property_purchase_price\": 850000,\n        \"is_fha_eligible\": true,\n        \"present_ltv\": 92.00,\n        \"proposed_ltv\": 92.00,\n        \"term\": \"30 year fixed\",\n        \"estimated_payment\": 1500,\n        \"apr\": 5.789,\n        \"market_value\": 355000,\n        \"rate_offer\": 3.625\n    },\n    \"lead_opportunity_offers\": [\n        {\n            \"offer_id\": 1,\n            \"offer_type\": \"Fixed\",\n            \"loan_program_name\": \"Conf 30 Yr Fixed \",\n            \"loan_amount\": 855000.00\n        },\n        {\n            \"offer_id\": 2,\n            \"offer_type\": \"Fixed\",\n            \"loan_program_name\": \"Conf 15 Yr Fixed \",\n            \"loan_amount\": 855000.00\n        }\n    ],\n    \"custom\": [\n        {\n            \"field_name\": \"text_field\", \n            \"value\": \"Super special value\"\n        },\n        {\n            \"field_name\": \"integer_field\", \n            \"value\": 5000\n        },\n                {\n            \"field_name\": \"decimal_field\", \n            \"value\": 349.99\n        },\n        {\n            \"field_name\": \"boolean_field\", \n            \"value\": true\n        },\n                {\n            \"field_name\": \"date_field\", \n            \"value\": \"04/30/1999\"\n        },\n        {\n            \"field_name\": \"datetime_field\", \n            \"value\": \"04/30/1999 15:10:11\"\n        }\n    ]\n}"},"url":"{{external_api_host}}/v1/leads"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"contact_id\": 58,\n    \"lead_id\": 61\n}"}],"_postman_id":"e8a78f12-5f00-4cb2-965c-956c6c37edec"},{"name":"Update Lead Opportunity","id":"8a85a5ee-a44e-434b-9fe4-87cfe522067a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"title\": \"Mr.\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Smith\",\n    \"suffix\": \"Jr.\",\n    \"nickname\": \"Johnathon\",\n    \"email\": \"jsmithtest@example.com\",\n    \"address\": \"1234 Fake St\",\n    \"address_2\": \"Apartment 8\",\n    \"city\": \"Los Angeles\",\n    \"state\": \"CA\",\n    \"zip_code\": \"90210\",\n    \"phone_cell\": \"5555555555\",\n    \"phone_home\": \"2222222222\",\n    \"phone_office\": \"7777777777\",\n    \"ok_to_email\": true,\n    \"referred_by\": \"Jane Smith\",\n    \"credit_score\": \"Excellent\",\n    \"source\": \"leadSourceName\",\n    \"assigned_to\": 50,\n    \"owner_id\": 50,\n    \"lead_opportunity\": {\n        \"property_value\": 350000,\n        \"property_county\": \"Alameda\",\n        \"property_zip\": \"90010\",\n        \"property_state\": \"CA\",\n        \"property_msa\": \"LA\",\n        \"loan_amount\": 325000,\n        \"loan_down_payment\": 25000,\n        \"loan_cash_out\": 0,\n        \"property_type\": \"Single Family\",\n        \"property_use\": \"Owner Occupied\",\n        \"loan_request_type\": \"Purchase\",\n        \"lead_price\": 50,\n        \"lead_stage\": 3,\n        \"tracking_number\": \"123456\",\n        \"annual_income\": 120000,\n        \"first_time_buyer\": true,\n        \"has_agent\": true,\n        \"is_military\": false,\n        \"self_credit_rating\": \"Good\",\n        \"assigned_credit_value\": 700,\n        \"bankruptcy\": false,\n        \"foreclosure\": false,\n        \"working_with_agent\": true,\n        \"found_home\": true,\n        \"property_purchase_price\": 350000,\n        \"is_fha_eligible\": true,\n        \"is_va_loan\": false,\n        \"present_ltv\": 92.01,\n        \"proposed_ltv\": 92.01,\n        \"term\": \"30 year fixed\",\n        \"estimated_payment\": 1500,\n        \"apr\": 3.789,\n        \"market_value\": 355000,\n        \"rate_offer\": 3.625,\n        \"contact_phone_extension\": \"55555\",\n        \"consumer_geo_phone_area_code\": \"55555\"\n    },\n    \"lead_opportunity_offers\": [\n        {\n            \"offer_id\": 1,\n            \"offer_type\": \"Fixed\",\n            \"loan_program_name\": \"Conf 30 Yr Fixed \",\n            \"loan_amount\": 255000.01,\n            \"interest_rate\": 3.625,\n            \"term\": \"30\",\n            \"points\": 0.75,\n            \"investor\": \"Total Expert(308)\",\n            \"lock_term\": 45,\n            \"monthly_payment\": 1367.34,\n            \"down_payment\": 295000.99,\n            \"apr\": 5.171\n        },\n        {\n            \"offer_id\": 2,\n            \"offer_type\": \"Fixed\",\n            \"loan_program_name\": \"Conf 15 Yr Fixed \",\n            \"loan_amount\": 255000.01,\n            \"interest_rate\": 4.625,\n            \"term\": \"180\",\n            \"points\": 0.75,\n            \"investor\": \"Total Expert\",\n            \"lock_term\": 30,\n            \"monthly_payment\": 1067.34,\n            \"down_payment\": 295000.01,\n            \"apr\": 6.171\n        }\n    ],\n    \"custom\": [\n        {\n            \"field_name\": \"my_custom_field\", \n            \"value\": \"Super special value\"\n        }\n    ]\n}\n"},"url":"{{external_api_host}}/v1/leads/{{lead_id}}","description":"<p>The <code>PATCH</code> request accepts any variant of the body specified below, allowing for partial modifications of the existing lead resource. Fields that are</p>\n<h3 id=\"data-types\">Data Types</h3>\n<p><strong>The</strong> <strong><code>PATCH</code></strong> <strong>is sensitive to data types, and will error if types do not align with the types in the request body below.</strong></p>\n<p>If the value of a given attribute does not match the type specified in <code>PATCH</code> validation, the request should fail and tell you why.</p>\n<h4 id=\"accepted-type-details\"><strong>Accepted type details:</strong></h4>\n<ul>\n<li>Integer values, real, positive values only</li>\n<li>String values must be wrapped in double quotation marks, as in <code>\"hello there\"</code></li>\n<li>Decimals can be decimal values or integer values</li>\n<li>Booleans must be <code>true</code>, <code>false</code>, <code>0</code>, or <code>1</code>. Strings <code>'true'</code> and <code>'false'</code> are NOT accepted.</li>\n</ul>\n<h3 id=\"updating-lead-stage\">Updating Lead Stage</h3>\n<p><code>lead_stage</code> can be updated with an integer, 1 through 5, represneting the following lifecycle stages of a lead:</p>\n<ol>\n<li>New Lead</li>\n<li>Contacted</li>\n<li>Application</li>\n<li>In Process</li>\n<li>Closed</li>\n</ol>\n<p>Other values can be updated concurrently with <code>lead_stage</code>.</p>\n<h3 id=\"updating-lead-opportunity-offers\">Updating Lead Opportunity Offers</h3>\n<p><code>offers</code> can also be updated, but for each desired offer update, the <code>offer_id</code> of the given offer must be included, along with at least one other offer attribute</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"lead_opportunity\": { \n        \"property_value\": 50000000\n    },\n    \"lead_opportunity_offers\": [\n        {\n            \"offer_id\": 1,\n            \"investor\": \"Duckberg Inc\"\n        },\n        {\n            \"offer_id\": 2,\n            \"investor\": \"Duckberg Inc\"\n        },\n    ]\n}\n\n</code></pre><h3 id=\"examples-of-partial-modification-requests\">Examples of Partial Modification Requests</h3>\n<p>As long as attributes are nested in their correct parent attribute, they will be considered valid for updating.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"lead_stage\": 2,\n}\n\n</code></pre><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"first_name\": \"Scrooge\",\n    \"lead_stage\": 2,\n}\n\n</code></pre><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"lead_opportunity\": { \n        \"property_value\": 50000000\n    },\n    \"lead_opportunity_offers\": [\n        {\n            \"offer_id\": 2,\n            \"investor\": \"Duckberg Inc\"\n        }\n    ]\n}\n\n</code></pre><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"first_name\": \"Scrooge\",\n    \"last_name\": \"McDuck\",\n    \"lead_opportunity\": { \n        \"property_value\": 50000000\n    },\n    \"lead_opportunity_offers\": [\n        {\n            \"offer_id\": 2,\n            \"investor\": \"Duckberg Inc\"\n        }\n    ]\n}\n\n</code></pre>","urlObject":{"path":["v1","leads","{{lead_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[{"id":"177cb296-2998-4977-942c-968b002ba9ea","name":"Partial Modification","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"first_name\": \"Scrooge\",\n    \"last_name\": \"McDuck\",\n    \"city\": \"Duckberg\",\n}"},"url":"{{external_api_host}}/v1/leads/{{lead_id}}"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Successfully updated lead.\"\n}"},{"id":"c0f5bfaa-b03f-40d0-9f44-8236f2b2b866","name":"Update Stage","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"lead_stage\": 2,\n}"},"url":"{{external_api_host}}/v1/leads/{{lead_id}}"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Successfully updated lead.\"\n}"},{"id":"2a1444e6-27f4-410c-b7e9-d2004c4b5430","name":"Update Offers","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"first_name\": \"Scrooge\",\n    \"last_name\": \"McDuck\",\n    \"lead_opportunity\": { \n        \"property_value\": 50000000\n    },\n    \"lead_opportunity_offers\": [\n        {\n            \"offer_id\": 2,\n            \"investor\": \"Duckberg Inc\"\n        }\n    ]\n}"},"url":"{{external_api_host}}/v1/leads/{{lead_id}}"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Successfully updated lead.\"\n}"}],"_postman_id":"8a85a5ee-a44e-434b-9fe4-87cfe522067a"}],"id":"deb7e9be-d797-4dfb-b02b-4f3c6519077e","description":"<p><strong>Important Note:</strong> As part of Total Expert’s new Lead Management feature, a new endpoint has been created. Because both the new endpoint (v1/lead-opportunities) and this existing (v1/leads) endpoint deal with “leads” in the platform, there is a conflict with the nomenclature used by both endpoints.</p>\n<p><em>This section of the documentation refers exclusively to the existing, older v1/leads endpoint designed for Advanced Lead Management (ALM).</em></p>\n<p><em>For information on the new v1/lead-opportunities endpoint, please see the “Lead Opportunities (New)” section.</em></p>\n<p><em>No functional changes were made to the endpoint.</em></p>\n<p><em>Unless and until further notice, users cannot utilize both endpoints concurrently.</em></p>\n<p>The Lead Opportunities endpoints allow lead providers to POST, GET, and PATCH lead and lead opportunity details, including offer details and custom fields.</p>\n<h4 id=\"authentication-and-authorization\">Authentication and Authorization</h4>\n<p>There are two means of authenticating for Lead Opportunity endpoints.</p>\n<ol>\n<li><p>The first is the typical bearer authentication flow, documented under the \"Authentication\" header above.</p>\n</li>\n<li><p>Alternatively, the Lead Opportunities endpoints support \"Simple Auth,\" which can be enabled by Total Expert. \"Simple Auth\" supports authentication via an <code>api_key</code> attribute/value within request bodies, or else sending a header of <code>api-key</code>. <em>Note the underscore and hypen differentiation, which is by design.</em></p>\n</li>\n</ol>\n<h4 id=\"relationships\">Relationships</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Settable Fields</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>owner</td>\n<td>Yes*</td>\n<td>User</td>\n<td>username, id, external_id, email</td>\n<td>Owning user of the lead. One to many relationship, so returned as an object. *Only available on POST - changing owner on patch is not currently supported</td>\n</tr>\n</tbody>\n</table>\n</div><p><em>Note: the use of the owner_id property is still supported, but deprecated in favor of this relationship.</em></p>\n<p><strong>Both means of authentication require the credentials to contain the</strong> <strong><code>leadOpportunityInteraction</code></strong> <strong>scope.</strong></p>\n<p><em>Optional</em>: <em>The</em> <code>_getUsers_</code> <em>scope is required to retrieve unique user IDs from the</em> <code>_v1/users_</code> <em>endpoint. User IDs are used to as</em> <code>_owner_id_</code> <em>in</em> <code>_POST_</code> <em>requests, should the request sender desire to assign a lead directly to a user.</em></p>\n","_postman_id":"deb7e9be-d797-4dfb-b02b-4f3c6519077e"},{"name":"Activity Endpoints","item":[{"name":"Fetch Activities","id":"4ac1ed2f-a8d2-4508-83a9-74b881223b4b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{external_api_host}}/v1/activity","urlObject":{"path":["v1","activity"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4ac1ed2f-a8d2-4508-83a9-74b881223b4b"},{"name":"Fetch Activity","id":"f280597a-efff-4518-a66f-fb364f673e2a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{external_api_host}}/v1/activity/{{activity_id}}","urlObject":{"path":["v1","activity","{{activity_id}}"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f280597a-efff-4518-a66f-fb364f673e2a"}],"id":"bff7e9af-f251-41a5-8938-ff89bcc95402","description":"<p>Endpoints for interacting with the activity resource.</p>\n<hr />\n<h5 id=\"attributes\">Attributes</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Generated identifier for activity.</td>\n</tr>\n<tr>\n<td>details</td>\n<td>No</td>\n<td>string</td>\n<td>Activity details</td>\n</tr>\n<tr>\n<td>owner_id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Owner id of the activity</td>\n</tr>\n<tr>\n<td>type</td>\n<td>No</td>\n<td>string</td>\n<td>Activity type</td>\n</tr>\n<tr>\n<td>title</td>\n<td>No</td>\n<td>string</td>\n<td>Activity title</td>\n</tr>\n<tr>\n<td>notes</td>\n<td>No</td>\n<td>text</td>\n<td>Activity notes</td>\n</tr>\n<tr>\n<td>note_id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Activity note id</td>\n</tr>\n<tr>\n<td>contact_id</td>\n<td>No</td>\n<td>numeric</td>\n<td>Contact id</td>\n</tr>\n<tr>\n<td>created_at</td>\n<td>No</td>\n<td>timestamp</td>\n<td>Date of the creation date for the activity. Format: 'YYYY-MM-DD HH:mm:ss'</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"relationships\">Relationships</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Relationship</th>\n<th>Assignable</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>owner</td>\n<td>No</td>\n<td>User</td>\n<td>Owning user of the activity.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"filtering\">Filtering</h3>\n<p>Use the 'filter=attribute_name=x,attribute_name_2=y' query to return the list of activities that meet the filter criteria. For example, to filter activities created between Oct. 14, 2017 17:41:01 (UTC) and Oct. 15, 2017 17:41:09 (UTC), the following query could be used:</p>\n<p>/activity?filter=internal_created_at_start=2017-10-14T17:41:01Z,internal_created_at_end=2017-10-15T17:41:09Z</p>\n<p>The supported filter attributes are shown in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>internal_created_at_start</td>\n<td>ISO-8601 formatted date. The start of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>internal_created_at_end</td>\n<td>ISO-8601 formatted date. The end of the time range of interest, inclusive.</td>\n</tr>\n<tr>\n<td>contact_id</td>\n<td>Activity's contact id</td>\n</tr>\n<tr>\n<td>type</td>\n<td>Activity's type</td>\n</tr>\n<tr>\n<td>owner_id</td>\n<td>Activity's owner id</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"bff7e9af-f251-41a5-8938-ff89bcc95402"},{"name":"Email APIs","item":[{"name":"Archive Email","item":[{"name":"Archive Email -  Encoded (id-{orgId}-{msgId})","id":"581a5272-b8f4-4127-94c1-84f4c9a490d6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/email-archive/id-42-9001?filter=user_id=12345","description":"<p>Retrieves archived email content using the <strong>encoded</strong> messageId format: <code>id-{organizationId}-{messageId}</code>.</p>\n<p>The organization ID embedded in the messageId is validated against the authenticated caller's organization. A mismatch returns <code>404</code> — not <code>403</code> — to avoid leaking whether a message exists.</p>\n<p><strong>Path parameter</strong>: <code>id-{orgId}-{msgId}</code> — replace <code>42</code> with the org ID and <code>9001</code> with the message ID.</p>\n<p><strong>Required filter</strong>: <code>user_id={userId}</code> — the user must belong to the caller's org.</p>\n","urlObject":{"path":["v1","email-archive","id-42-9001"],"host":["{{external_api_host}}"],"query":[{"description":{"content":"<p>Required. Comma-separated key=value pairs. Must include user_id. The user must belong to the caller's organization.</p>\n","type":"text/plain"},"key":"filter","value":"user_id=12345"}],"variable":[]}},"response":[{"id":"ea853154-38fb-4a6e-99b8-8fb12a0ae9e2","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":""},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"items\": {\n    \"file_name\": \"id-42-9001\",\n    \"content\": \"<html><body>Email content here</body></html>\"\n  },\n  \"links\": {\n    \"first\": 1,\n    \"last\": 1,\n    \"next\": null,\n    \"prev\": null\n  }\n}"}],"_postman_id":"581a5272-b8f4-4127-94c1-84f4c9a490d6"},{"name":"Archive Email  -  Raw numeric ({msgId})","id":"df633e17-9186-4538-be10-55ef9e893dbb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"token":"{{access_token}}"},"isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}"}],"url":"{{external_api_host}}/v1/email-archive/9001?filter=user_id=12345","description":"<p>Retrieves archived email content using a <strong>plain numeric</strong> messageId.</p>\n<p>The organization is inferred from the authenticated caller's token — no org ID is embedded in the messageId. The caller's org is validated against the message sender's org inside the DataManager.</p>\n<p><strong>Path parameter</strong>: plain integer string — replace <code>9001</code> with the message ID.</p>\n<p><strong>Required filter</strong>: <code>user_id={userId}</code> — the user must belong to the caller's org.</p>\n","urlObject":{"path":["v1","email-archive","9001"],"host":["{{external_api_host}}"],"query":[{"description":{"content":"<p>Required. Comma-separated key=value pairs. Must include user_id. The user must belong to the caller's organization.</p>\n","type":"text/plain"},"key":"filter","value":"user_id=12345"}],"variable":[]}},"response":[{"id":"20936dd6-04f7-4289-8a82-47af738e55f5","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":""},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"items\": {\n    \"file_name\": \"9001\",\n    \"content\": \"<html><body>Email content here</body></html>\"\n  },\n  \"links\": {\n    \"first\": 1,\n    \"last\": 1,\n    \"next\": null,\n    \"prev\": null\n  }\n}"}],"_postman_id":"df633e17-9186-4538-be10-55ef9e893dbb"}],"id":"ef91c933-1f5d-45be-a159-394b80dcc78a","description":"<p>Endpoints for retrieving archived email content.</p>\n<p>All requests require an OAuth2 Bearer token with the <strong>emailInteraction</strong> scope.</p>\n<h2 id=\"messageid-formats\">messageId Formats</h2>\n<p>Two formats are accepted for the <code>{messageId}</code> path parameter:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Format</th>\n<th>Example</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>id-{organizationId}-{messageId}</code></td>\n<td><code>id-42-9001</code></td>\n<td>Encoded. Org ID must match caller's org or a <code>404</code> is returned.</td>\n</tr>\n<tr>\n<td><code>{messageId}</code></td>\n<td><code>9001</code></td>\n<td>Raw numeric. Org is inferred from the caller's token.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"filter-parameter\">Filter Parameter</h2>\n<p>The <code>filter</code> query parameter accepts comma-separated <code>key=value</code> pairs.</p>\n<p>Required key: <code>user_id</code> — must be a TE user ID belonging to the caller's organization.</p>\n<p>Example: <code>filter=user_id=12345</code></p>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p><strong>Read-only endpoint</strong> — no <code>POST</code>, <code>PATCH</code>, or <code>DELETE</code> operations are supported.</p>\n</li>\n<li><p><strong><code>content</code></strong> <strong>is raw HTML</strong> — render it in a sandboxed context to avoid XSS exposure.</p>\n</li>\n<li><p><strong><code>404</code></strong> <strong>instead of</strong> <strong><code>403</code></strong> <strong>on org mismatch</strong> — when the org embedded in an encoded <code>messageId</code> does not match the caller's org, the API returns <code>404</code> (not <code>403</code>) intentionally, to avoid leaking whether a message exists.</p>\n</li>\n<li><p><strong>Raw numeric format has no early org check</strong> — for plain numeric <code>messageId</code>, the org is only validated inside the data layer by comparing the caller's org against the message sender's org fetched from the database. If they don't match, a <code>404</code> is returned.</p>\n</li>\n<li><p><strong><code>user_id</code></strong> <strong>must be in the caller's org</strong> — the <code>user_id</code> passed in the <code>filter</code> is verified against the <code>organization_users</code> table before any message lookup occurs.</p>\n</li>\n<li><p><strong>Caller must belong to an org</strong> — if the authenticated token has no associated organization, the request is rejected with <code>400</code>.</p>\n</li>\n</ul>\n<h2 id=\"response-attributes\">Response Attributes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>items.file_name</code></td>\n<td>string</td>\n<td>The <code>messageId</code> value passed in the request, returned as-is.</td>\n</tr>\n<tr>\n<td><code>items.content</code></td>\n<td>string</td>\n<td>The full HTML content of the archived email.</td>\n</tr>\n<tr>\n<td><code>links.first</code></td>\n<td>numeric</td>\n<td>Always <code>1</code> — pagination anchor.</td>\n</tr>\n<tr>\n<td><code>links.last</code></td>\n<td>numeric</td>\n<td>Always <code>1</code> — single result, no paging.</td>\n</tr>\n<tr>\n<td><code>links.next</code></td>\n<td>null</td>\n<td>Always <code>null</code> — no next page.</td>\n</tr>\n<tr>\n<td><code>links.prev</code></td>\n<td>null</td>\n<td>Always <code>null</code> — no previous page.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"error-responses\">Error Responses</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Trigger</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td><code>messageId</code> is missing from the path.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td><code>messageId</code> is not a plain integer and does not match the <code>id-{orgId}-{msgId}</code> pattern.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td><code>user_id</code> is missing or non-numeric in the <code>filter</code> query parameter.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td>Authenticated caller has no associated organization.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td><code>user_id</code> does not exist in the caller's organization.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td>Email archive file is missing or empty in storage.</td>\n</tr>\n<tr>\n<td><code>404 Not Found</code></td>\n<td>Encoded <code>messageId</code> contains an org ID that does not match the caller's org.</td>\n</tr>\n<tr>\n<td><code>404 Not Found</code></td>\n<td>No message found for the given ID, or message belongs to a different org.</td>\n</tr>\n<tr>\n<td><code>500 Internal Server Error</code></td>\n<td>Unexpected server-side failure retrieving the archive.</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"ef91c933-1f5d-45be-a159-394b80dcc78a"},{"name":"Email Template Render","item":[{"name":"Email Template Render - By template ID","id":"614c7bb0-e564-4067-9e97-d31ff5d8070f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":"{\n  \"id\": 101,\n  \"sender_id\": 12345,\n  \"recipient\": {\n    \"id\": 67890\n  },\n  \"loan_id\": 555,\n  \"comarketer_id\": 9999,\n  \"odc_push_result_id\": 77,\n  \"video\": {}\n}","options":{"raw":{"language":"json"}}},"url":"{{external_api_host}}/v1/email-templates/render","description":"<p>Renders a saved email template by its <code>id</code> with placeholders resolved for the given sender, recipient, and optional context.</p>\n<p>The template must belong to the caller's organization and be accessible to the sender.</p>\n<p><strong>Required</strong>: <code>id</code>, <code>sender_id</code></p>\n<p><strong>Optional</strong>: <code>recipient</code>, <code>loan_id</code>, <code>account_id</code>, <code>comarketer_id</code>, <code>odc_push_result_id</code>, <code>video</code>, <code>content.subject</code> (overrides template subject)</p>\n","urlObject":{"path":["v1","email-templates","render"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"614c7bb0-e564-4067-9e97-d31ff5d8070f"},{"name":"Email Template Render - By inline HTML","id":"6785baa2-9559-484c-a93a-d1eade591fbe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"raw","raw":"{\n  \"content\": {\n    \"html\": \"<p>Hello {{first_name}}, your rate is ready.</p>\",\n    \"subject\": \"Hi {{first_name}}, a message from {{sender_first_name}}\"\n  },\n  \"sender_id\": 12345,\n  \"recipient\": {\n    \"id\": 67890\n  }\n}","options":{"raw":{"language":"json"}}},"url":"{{external_api_host}}/v1/email-templates/render","description":"<p>Renders inline HTML with placeholders resolved for the given sender and optional recipient context. No saved template is required.</p>\n<p><strong>Required</strong>: <code>content.html</code>, <code>sender_id</code></p>\n<p><strong>Optional</strong>: <code>content.subject</code>, <code>recipient</code>, <code>loan_id</code>, <code>account_id</code>, <code>comarketer_id</code>, <code>odc_push_result_id</code>, <code>video</code></p>\n","urlObject":{"path":["v1","email-templates","render"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"6785baa2-9559-484c-a93a-d1eade591fbe"}],"id":"b6b27182-bbf0-4d8a-ac73-36880a645ab5","description":"<p>Endpoints for rendering email templates with variable substitution.</p>\n<p>All requests require an OAuth2 Bearer token with the <strong>emailInteraction</strong> scope.</p>\n<h2 id=\"overview\">Overview</h2>\n<p>Renders an email template (by template ID or inline HTML) with placeholders resolved for a given sender, recipient, and optional context (loan, account, comarketer, video, ODC push result).</p>\n<h2 id=\"request-body-fields\">Request Body Fields</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Required</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>id</code></td>\n<td>Yes*</td>\n<td>numeric</td>\n<td>Template ID to render. Must be a positive integer. *Either <code>id</code> or <code>content.html</code> must be provided.</td>\n</tr>\n<tr>\n<td><code>content.html</code></td>\n<td>Yes*</td>\n<td>string</td>\n<td>Inline HTML to render instead of a saved template. *Either <code>id</code> or <code>content.html</code> must be provided.</td>\n</tr>\n<tr>\n<td><code>content.subject</code></td>\n<td>No</td>\n<td>string</td>\n<td>Custom subject line. If omitted, falls back to the saved template's subject.</td>\n</tr>\n<tr>\n<td><code>sender_id</code></td>\n<td>Yes</td>\n<td>numeric</td>\n<td>TE user ID of the sender. Must belong to the caller's organization.</td>\n</tr>\n<tr>\n<td><code>recipient</code></td>\n<td>No</td>\n<td>object</td>\n<td>Contact to resolve placeholders for. See <strong>Recipient Object</strong> below.</td>\n</tr>\n<tr>\n<td><code>comarketer_id</code></td>\n<td>No</td>\n<td>numeric</td>\n<td>TE user ID of a comarketer. Must be a valid comarketer for the sender.</td>\n</tr>\n<tr>\n<td><code>loan_id</code></td>\n<td>No</td>\n<td>numeric</td>\n<td>Loan ID to use for loan placeholder resolution. Must belong to the caller's org. Mutually exclusive with <code>account_id</code>.</td>\n</tr>\n<tr>\n<td><code>account_id</code></td>\n<td>No</td>\n<td>numeric</td>\n<td>Account ID to use for product placeholder resolution. Must belong to the caller's org. Mutually exclusive with <code>loan_id</code>.</td>\n</tr>\n<tr>\n<td><code>odc_push_result_id</code></td>\n<td>No</td>\n<td>numeric</td>\n<td>ODC push result ID for ODC placeholder resolution.</td>\n</tr>\n<tr>\n<td><code>video</code></td>\n<td>No</td>\n<td>object</td>\n<td>Video metadata to inject into the template.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"recipient-object\">Recipient Object</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Required</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>id</code></td>\n<td>No</td>\n<td>numeric</td>\n<td>TE lead/contact ID. Must be a positive integer and belong to the caller's org.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response-attributes\">Response Attributes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>results[].recipient_id</code></td>\n<td>numeric</td>\n<td>null</td>\n</tr>\n<tr>\n<td><code>results[].rendered_html</code></td>\n<td>string</td>\n<td>Fully rendered HTML with all placeholders substituted.</td>\n</tr>\n<tr>\n<td><code>results[].rendered_subject</code></td>\n<td>string</td>\n<td>Fully rendered subject line. Empty string if no subject was provided.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"org-validation\">Org Validation</h2>\n<ul>\n<li><p><code>sender_id</code> must belong to the caller's organization.</p>\n</li>\n<li><p><code>loan_id</code> (if provided) is validated via the loan officer's org.</p>\n</li>\n<li><p><code>account_id</code> (if provided) is validated via the account manager's org.</p>\n</li>\n<li><p><code>recipient.id</code> (if provided) is validated via the lead owner's org.</p>\n</li>\n<li><p>Template <code>id</code> (if provided) must belong to the caller's org.</p>\n</li>\n</ul>\n<h2 id=\"error-responses\">Error Responses</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Trigger</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td>Neither <code>id</code> nor <code>content.html</code> is provided.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td><code>id</code> is not a positive integer.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td><code>sender_id</code> is missing or not a positive integer.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td><code>sender_id</code> does not exist or does not belong to the caller's org.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td><code>comarketer_id</code> is not a positive integer, or is not a valid comarketer for the sender.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td><code>loan_id</code> is not a positive integer, or does not belong to the caller's org.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td><code>account_id</code> is not a positive integer, or does not belong to the caller's org.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td>Both <code>loan_id</code> and <code>account_id</code> are provided (mutually exclusive).</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td><code>recipient</code> is not an object, or <code>recipient.id</code> is missing or not a positive integer.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td><code>recipient.id</code> does not belong to the caller's org.</td>\n</tr>\n<tr>\n<td><code>403 Forbidden</code></td>\n<td>Authenticated user has no user ID or organization context.</td>\n</tr>\n<tr>\n<td><code>404 Not Found</code></td>\n<td>Template <code>id</code> not found for the sender, or belongs to a different org.</td>\n</tr>\n<tr>\n<td><code>500 Internal Server Error</code></td>\n<td>Template render failed unexpectedly.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p><strong><code>id</code></strong> <strong>and</strong> <strong><code>content.html</code></strong> <strong>are mutually inclusive of at least one</strong> — if <code>id</code> is given, the saved template's HTML and subject are used as the base; <code>content.html</code> and <code>content.subject</code> override them if also provided.</p>\n</li>\n<li><p><strong><code>loan_id</code></strong> <strong>and</strong> <strong><code>account_id</code></strong> <strong>are mutually exclusive</strong> — providing both returns a <code>400</code>.</p>\n</li>\n<li><p><strong>Recipient resolves contact placeholders</strong> — if <code>recipient.id</code> is provided, placeholders for contact, journey contact, and opportunity offers are all populated.</p>\n</li>\n<li><p><strong>Template org check uses</strong> <strong><code>org_id</code></strong> <strong>on the email record</strong> — not just the sender relationship.</p>\n</li>\n</ul>\n","_postman_id":"b6b27182-bbf0-4d8a-ac73-36880a645ab5"},{"name":"Upload  Image","item":[{"name":"POST /user-images","id":"0cc8188f-9988-40bd-b96e-10d12622a2dc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"image/jpeg","description":"<p>MIME type of the image. Allowed: image/jpeg, image/png, image/gif.</p>\n"},{"key":"X-User-Id","value":"12345","description":"<p>Required. TE user ID to upload the image for. Must be an integer and belong to the caller's organization.</p>\n"},{"key":"Authorization","value":"Bearer {{access_token}}"}],"body":{"mode":"file","file":{"src":"/Users/amolp/Downloads/Photo.jpeg"}},"url":"{{external_api_host}}/v1/user-images","description":"<p>Uploads a user image as raw binary in the request body.</p>\n<p>The image is stored in S3 under the target user's marketing images path and a record is created in the database.</p>\n<p><strong>Headers required</strong>:</p>\n<ul>\n<li><code>Content-Type</code> — MIME type of the image (<code>image/jpeg</code>, <code>image/png</code>, <code>image/gif</code>)</li>\n<li><code>X-User-Id</code> — TE user ID of the target user. Must belong to the same org as the caller.</li>\n</ul>\n<p><strong>Body</strong>: raw binary bytes of the image file. Max 5 MB.</p>\n","urlObject":{"path":["v1","user-images"],"host":["{{external_api_host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"0cc8188f-9988-40bd-b96e-10d12622a2dc"}],"id":"b1f21aae-f3f9-4fda-9169-fda18e0012b4","description":"<p>Endpoints for uploading user images.</p>\n<p>All requests require an OAuth2 Bearer token with the <strong>emailInteraction</strong> scope.</p>\n<h2 id=\"request-format\">Request Format</h2>\n<p>The image is sent as <strong>raw binary</strong> in the request body. The <code>Content-Type</code> header determines the image format.</p>\n<h2 id=\"allowed-content-types\">Allowed Content Types</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Content-Type</th>\n<th>Extension</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>image/jpeg</code></td>\n<td><code>.jpg</code></td>\n</tr>\n<tr>\n<td><code>image/png</code></td>\n<td><code>.png</code></td>\n</tr>\n<tr>\n<td><code>image/gif</code></td>\n<td><code>.gif</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"headers\">Headers</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Authorization</code></td>\n<td>Yes</td>\n<td>Bearer token with <code>emailInteraction</code> scope.</td>\n</tr>\n<tr>\n<td><code>Content-Type</code></td>\n<td>Yes</td>\n<td>MIME type of the image. Must be <code>image/jpeg</code>, <code>image/png</code>, or <code>image/gif</code>.</td>\n</tr>\n<tr>\n<td><code>X-User-Id</code></td>\n<td>Yes</td>\n<td>TE user ID of the user to upload the image for. Must be an integer. Must belong to the same organization as the caller.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"org-validation\">Org Validation</h2>\n<p>The caller and the target user (<code>X-User-Id</code>) must belong to the same organization. If they differ, a <code>404</code> is returned.</p>\n<h2 id=\"file-constraints\">File Constraints</h2>\n<ul>\n<li><p>Maximum file size: <strong>5 MB</strong></p>\n</li>\n<li><p>MIME type must match the <code>Content-Type</code> header — mismatches are rejected with <code>422</code>.</p>\n</li>\n</ul>\n<h2 id=\"response-attributes\">Response Attributes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>id</code></td>\n<td>numeric</td>\n<td>Generated identifier for the uploaded image record.</td>\n</tr>\n<tr>\n<td><code>user_id</code></td>\n<td>numeric</td>\n<td>TE user ID the image belongs to.</td>\n</tr>\n<tr>\n<td><code>url</code></td>\n<td>string</td>\n<td>Public URL to access the uploaded image.</td>\n</tr>\n<tr>\n<td><code>filename</code></td>\n<td>string</td>\n<td>Generated filename used to store the image.</td>\n</tr>\n<tr>\n<td><code>created_on</code></td>\n<td>string</td>\n<td>Timestamp of upload. Format: <code>YYYY-MM-DD HH:mm:ss</code>.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"error-responses\">Error Responses</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Trigger</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td><code>Content-Type</code> header is missing or not one of the allowed types.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td><code>X-User-Id</code> header is missing.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td><code>X-User-Id</code> is not a valid integer.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td>Request body is empty.</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td>File size exceeds 5 MB.</td>\n</tr>\n<tr>\n<td><code>404 Not Found</code></td>\n<td>Target user does not exist or is inactive.</td>\n</tr>\n<tr>\n<td><code>404 Not Found</code></td>\n<td>Target user belongs to a different organization than the caller.</td>\n</tr>\n<tr>\n<td><code>422 Unprocessable Entity</code></td>\n<td>MIME type of the uploaded file does not match the <code>Content-Type</code> header.</td>\n</tr>\n<tr>\n<td><code>500 Internal Server Error</code></td>\n<td>Upload to S3 failed.</td>\n</tr>\n<tr>\n<td><code>500 Internal Server Error</code></td>\n<td>Database record creation failed after successful upload.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p><strong>Binary body only</strong> — the image must be sent as raw bytes in the request body, not as <code>multipart/form-data</code>.</p>\n</li>\n<li><p><strong><code>404</code></strong> <strong>on org mismatch</strong> — a <code>404</code> (not <code>403</code>) is returned when the target user belongs to a different org, to avoid leaking user existence.</p>\n</li>\n<li><p><strong>Filename is auto-generated</strong> — the original filename is not used; a random filename is generated server-side.</p>\n</li>\n<li><p><strong>Image is stored in S3</strong> — the returned <code>url</code> is a public link to the uploaded file under the user's marketing images path.</p>\n</li>\n</ul>\n","_postman_id":"b1f21aae-f3f9-4fda-9169-fda18e0012b4"}],"id":"35e3ba1a-2c86-41eb-b9c1-5283d9f7757b","_postman_id":"35e3ba1a-2c86-41eb-b9c1-5283d9f7757b","description":""}],"event":[{"listen":"prerequest","script":{"id":"6c37aef8-cb52-497c-9d99-6e441335ff72","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"a49376ad-a837-4fa8-9096-4d348c75180b","type":"text/javascript","exec":[""]}}]}