Total Expert User Endpoints API

The User Endpoints API from Total Expert — 9 operation(s) for user endpoints.

OpenAPI Specification

total-expert-user-endpoints-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Total Expert Public Account Endpoints User Endpoints API
  version: v1
  description: "The Total Expert REST API allows you to programmatically create, retrieve, update, and delete information through various endpoints.\n\nDocumentation Layout\n\nEach section of this documentation describes a collection of related endpoints that affect a given resource.\n\nWhere 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.\n\nNOTE: 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.\n\nAuthentication in the TE API\n\nInteraction with the TE API is protected with OAuth 2.0. A client ID/secret pair is required to use the API.\n\nThe 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.\n\nNOTE: See the 'Authentication' endpoint collection for more information. See the 'Heartbeats' endpoint collection for more information on how to test your authentication.\n\nEndpoint Standards\n\nEach endpoint provides interaction with two aspects of an entity:\n\n'Attributes' - Attributes of the entity itself. Includes things like first name, phone number, or birthday of the contact.\nE.g. A 'Contact'\n\n'Relationships' - Describe a relationship between that entity and another entity.\nE.g. A contact that has an owner in the TE System OR a set of contact groups (separate entities with their own endpoint).\n\nAttributes\n\nEach 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.\n\nData Types\n\nEach attribute has a type. There are four data types in the TE API - Numeric, String, Boolean, and Date.\n\nData Types\n\nType\nDescription\n\nNumeric\nInteger or floating point numbers. Supplied with no surrounding quotes. e.g. { \"loan_rate\":4.5 }\n\nString\nString of characters - supplied surrounded with quotes. e.g. { \"first_name\":\"Clark\" }\n\nBoolean\nTruth value - supplied in one of two ways - see Boolean (String) and Boolean (Numeric) for details\n\nBoolean (String)\nTruth value - supplied as the word \"True\" or \"False\", surrounded by quotes. e.g. { \"first_time_buyer\":\"True\" }\n\nBoolean (Numeric)\nTruth value - supplied as the number 1 or 0, not surrounded by quotes. e.g. { \"first_time_buyer\":0 }\n\nDate\nA 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\".\n\nPhone Numbers\n\nPhone 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.\n\nAll 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.\n\nUniqueness in the TE API\n\nEach 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.\n\nRelationships\n\nRelationships in the TE API are very flexible.\n\n'GET'ing\n\nWhen 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.\n\nPOST and PATCH Requests\n\nWhen setting a relationship (by POST or PATCH), the target entity is specified using one or more attributes that uniquely identify the entity.\n\nThe 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:\n\n{\n  \"group_name\": \"Hot Leads\",\n  \"owner\":{\"username\": \"alfred\"}\n  }\n  OR\n\n{\n  \"group_name\": \"Hot Leads\",\n  \"owner\":{\"id\": \"123589\"}\n  }\n\nIn 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.\n\nInteracting with the API\n\nAdmin Calls vs User Calls\n\nYou'll notice that many sections of the documentation have samples for POSTs and GETs that are labeled \"As Admin\" or \"As User\".\nWhen 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.\n\n'GET'ing\n\nThere 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.\n\nGetting Individual Entities\n\nIndividual 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).\n\nGetting Multiple Entities (Paging)\n\nPaging 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&page[number]=6' will return items 501-600.\n\nPaging Links\n\nThe 'links' attribute on a page object will have four attributes, specifying metadata about the number of entities available to page.\n\n'first' will be the page number of the first page of entities (always '1').\n\n'last' will be the page number of the last page of entities.\n\n'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.\n\n'prev' will be the page number of the page immediately preceding the current one. 'prev' may be null if there are no preceding pages.\n\n'POST'ing\n\nEntities can be created in the TE system by POSTing to paging endpoints. E.g. sending a POST to '/contacts' will create a contact.\n\nDeduplication\n\nWhen 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.\n\n'PATCH'ing\n\nEntities 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'.\n\n'DELETE'ing\n\nEntities can be deleted only by TE ID. Send a DELETE request to the appropriate individual entity endpoint to delete it.\n\nReturn Codes\n\nWhere applicable, the API will respond with an HTTP status code that indicates what happened during the request. Possible values include:\n\nHTTP CODES\n\nStatus Code\nGeneral Description\n\n200 SUCCESS\nThe operation completed successfully. See the response body for details (if applicable).\n\n201 CREATED\nThe object was created successfully. See the response body for details (if applicable).\n\n400 BAD REQUEST\nThe JSON supplied to the API was malformed and unparseable.\n\n401 UNAUTHORIZED\nThe request's credentials are invalid. This could mean your token has expired and should be renewed. See the response body for details.\n\n403 FORBIDDEN\nAn attempt was made to access a resource for which you do not have permission\n\n405 METHOD NOT ALLOWED\nAn attempt was made to interact with an endpoint in an unsupported manner, e.g. sending a POST to '/contacts/1'\n\n415 UNSUPPORTED MEDIA TYPE\nThe API endpoints expect a content type of 'media/json'\n\n422 UNPROCESSABLE ENTITY\nThe 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.\n\n418 I'M A TEAPOT\nThe API is a teapot (See the 'Heartbeat' section for details).\n\n503 SERVICE UNAVAILABLE\nThe API is unavailable. Please try your request again later. If this message persists, please contact Technical Support"
  contact:
    url: https://developer.totalexpert.net
servers:
- url: https://public.totalexpert.net
  description: Total Expert external API — production
- url: https://public.vt.totalexpert.net
  description: Total Expert external API — development/sandbox domain (isolated from live data; per the Vendor OAuth Integration Guide)
security:
- oauth2: []
tags:
- name: User Endpoints
paths:
  /v1/users/{user_id}:
    get:
      operationId: fetchUser
      summary: Fetch User
      description: Fetch a specific user by ID.
      tags:
      - User Endpoints
      responses:
        '200':
          description: Success. See the Total Expert Public API documentation for the response shape.
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
    patch:
      operationId: updateUser
      summary: Update User
      description: Update a user
      tags:
      - User Endpoints
      responses:
        '200':
          description: Success. See the Total Expert Public API documentation for the response shape.
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            example:
              info:
                job_title: Manager
              settings_marketing:
                weekly_spend_threshold: '400'
              licenses:
              - license_name: MN
                content: LIC 12345
              remove_licenses:
              - license_name: IA
                content: LIC 54321
              disclaimers:
              - disclaimer_name: Flyer Disclaimer
                content: Subject to change
                type:
                  name: Print Disclaimer
              remove_disclaimers:
              - disclaimer_name: New Customer Email Disclaimer
                content: Subject to change
                type:
                  name: Email Disclaimer
              teams:
              - team_name: Fred's Team
                managers:
                - username: freddy
              remove_teams:
              - team_name: Alice Sunny's Team
                managers:
                - username: alice
  /v1/users:
    get:
      operationId: fetchUsers
      summary: Fetch Users
      description: Fetch a page of users. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.
      tags:
      - User Endpoints
      responses:
        '200':
          description: Success. See the Total Expert Public API documentation for the response shape.
      parameters:
      - name: page[number]
        in: query
        required: false
        schema:
          type: string
        example: '1'
      - name: page[size]
        in: query
        required: false
        schema:
          type: string
        example: '10'
    post:
      operationId: createUsers
      summary: Create Users
      description: 'Create a user.


        Required Attributes:


        email


        type


        Required Relationships:


        info


        role'
      tags:
      - User Endpoints
      responses:
        '200':
          description: Success. See the Total Expert Public API documentation for the response shape.
      requestBody:
        content:
          application/json:
            example:
              email: fred@example.com
              status: 0
              type: Lender
              role:
                role_name: Real Estate Lender
              info:
                job_title: Real Estate Loan Officer
                first_name: Fred
                last_name: Smith
                company: Big Lender
                website: http://biglender.com/freddy
                testimonial_url: http://biglender.com/freddy/testimonials
                phone_cell: 612-100-200
                phone_fax: 612-300-400
                phone_office: 612-500-600
                address: 123 Main St.
                address_2: Suite 1
                city: Eden Prairie
                state: MN
                zip_code: '55346'
                cost_center: '18'
                timezone_name: America/Chicago
                location_id: '1'
              settings_marketing:
                agent_bio: Freddy is a loan officer
                application_url: apply.biglender.com
                disclaimer: Freddy disclaimer text
                icon_one_img_url: https://totalexpert.com/icon1.jpg
                icon_two_img_url: https://totalexpert.com/icon2.jpg
                icon_three_img_url: https://totalexpert.com/icon3.jpg
                logo_img_url: https://totalexpert.com/freddy_logo.jpg
                license_title: Bonafide loan officer
                profile_img_url: https://totalexpert.com/freddy_profile.jpg
                short_name: FreddyS
                social_facebook: freddy.facebook.com
                social_twitter: freddy.twitter.com
                social_google: freddy.google.com
                social_linkedin: freddy.linkedin.com
                daily_spend_threshold: '200'
                user_quote: Changing the world, one close at a time
                weekly_spend_threshold: '800'
                wistia_id: XYZ
              expenditure_approver:
                username: cadence
              licenses:
              - license_name: MN
                content: LIC 12345
              - license_name: IA
                content: LIC 54321
              disclaimers:
              - disclaimer_name: Flyer Disclaimer
                content: Subject to change
                type:
                  name: Print Disclaimer
              - disclaimer_name: New Customer Email Disclaimer
                content: Subject to change
                type:
                  name: Email Disclaimer
              teams:
              - team_name: Alice Sunny Team
                managers:
                - username: alice
              - team_name: Regional Team - West
                managers:
                - username: grant
                - username: dominic
  /v1/user-roles:
    get:
      operationId: fetchUserRoles
      summary: Fetch User Roles
      description: Fetch a page of user roles. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.
      tags:
      - User Endpoints
      responses:
        '200':
          description: Success. See the Total Expert Public API documentation for the response shape.
      parameters:
      - name: page[number]
        in: query
        required: false
        schema:
          type: string
        example: '1'
      - name: page[size]
        in: query
        required: false
        schema:
          type: string
        example: '10'
  /v1/user-roles/{user_role_id}:
    get:
      operationId: fetchUserRole
      summary: Fetch User Role
      description: Fetch a specific user role specified by ID.
      tags:
      - User Endpoints
      responses:
        '200':
          description: Success. See the Total Expert Public API documentation for the response shape.
      parameters:
      - name: user_role_id
        in: path
        required: true
        schema:
          type: string
  /v1/role-permissions/{role_id}:
    get:
      operationId: fetchPermissionsForUserRole
      summary: Fetch Permissions for User Role
      description: ''
      tags:
      - User Endpoints
      responses:
        '200':
          description: Success. See the Total Expert Public API documentation for the response shape.
      parameters:
      - name: role_id
        in: path
        required: true
        schema:
          type: string
  /v1/teams/{team_id}:
    get:
      operationId: fetchTeam
      summary: Fetch Team
      description: Fetch a team by ID.
      tags:
      - User Endpoints
      responses:
        '200':
          description: Success. See the Total Expert Public API documentation for the response shape.
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: string
    patch:
      operationId: updateTeam
      summary: Update Team
      description: Update an existing team by ID.
      tags:
      - User Endpoints
      responses:
        '200':
          description: Success. See the Total Expert Public API documentation for the response shape.
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            example:
              remove_managers:
              - username: rickyg
    delete:
      operationId: deleteTeam
      summary: Delete Team
      description: Deletes a team by ID.
      tags:
      - User Endpoints
      responses:
        '200':
          description: Success. See the Total Expert Public API documentation for the response shape.
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: string
  /v1/teams:
    get:
      operationId: fetchTeams
      summary: Fetch Teams
      description: Fetch a page of teams. Specify page size and page number via the '?page[size]' and '?page[number]' GET parameters.
      tags:
      - User Endpoints
      responses:
        '200':
          description: Success. See the Total Expert Public API documentation for the response shape.
      parameters:
      - name: page[number]
        in: query
        required: false
        schema:
          type: string
        example: '1'
      - name: page[size]
        in: query
        required: false
        schema:
          type: string
        example: '10'
    post:
      operationId: createTeam
      summary: Create Team
      description: 'Create a Team.


        Required Attributes:


        team_name'
      tags:
      - User Endpoints
      responses:
        '200':
          description: Success. See the Total Expert Public API documentation for the response shape.
      requestBody:
        content:
          application/json:
            example:
              team_name: Harry N's Team
              managers:
              - username: harryn
              - username: rickyg
  /v1/permissions:
    get:
      operationId: fetchPermissions
      summary: Fetch Permissions
      description: ''
      tags:
      - User Endpoints
      responses:
        '200':
          description: Success. See the Total Expert Public API documentation for the response shape.
      parameters:
      - name: page[number]
        in: query
        required: false
        schema:
          type: string
        example: '1'
      - name: page[size]
        in: query
        required: false
        schema:
          type: string
        example: '10'
  /v1/permissions/{permission_id}:
    get:
      operationId: fetchPermission
      summary: Fetch Permission
      description: ''
      tags:
      - User Endpoints
      responses:
        '200':
          description: Success. See the Total Expert Public API documentation for the response shape.
      parameters:
      - name: permission_id
        in: path
        required: true
        schema:
          type: string
components:
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth 2.0. Obtain a token from POST /v1/token using HTTP Basic (client_id:client_secret base64-encoded) plus a grant_type body. Access tokens are bearer tokens, expires_in 3600.
      flows:
        clientCredentials:
          tokenUrl: https://public.totalexpert.net/v1/token
          scopes:
            crm: Documented example scope (Vendor OAuth Integration Guide authorize example)
            leadInteraction: Lead interaction access (documented in the collection token examples)
            loanInteraction: Loan interaction access (documented in the collection token examples)
            leadSurveyInteraction: Lead survey interaction access (documented example in the Vendor OAuth Integration Guide)
            postLeads: Post leads access (documented example in the Vendor OAuth Integration Guide)
        authorizationCode:
          authorizationUrl: https://public.totalexpert.net/v1/authorize
          tokenUrl: https://public.totalexpert.net/v1/token
          refreshUrl: https://public.totalexpert.net/v1/token
          scopes:
            crm: Documented example scope (Vendor OAuth Integration Guide authorize example)
            leadInteraction: Lead interaction access (documented in the collection token examples)
            loanInteraction: Loan interaction access (documented in the collection token examples)
            leadSurveyInteraction: Lead survey interaction access (documented example in the Vendor OAuth Integration Guide)
            postLeads: Post leads access (documented example in the Vendor OAuth Integration Guide)
externalDocs:
  description: Total Expert Public API documentation (Postman)
  url: https://documenter.getpostman.com/view/1929166/total-expert-public-api/6Z2RYyU