AppDirect User API

The User API from AppDirect — 9 operation(s) for user.

OpenAPI Specification

appdirect-user-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: The Companies API allows developers to manage marketplace companies and their user memberships.
  title: Companies AI Embed User API
  license:
    name: Apache License, Version 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0
  version: v296.0-SNAPSHOT
servers:
- url: https://marketplace.appdirect.com/api
- url: https://virtserver.swaggerhub.com
tags:
- name: User
  x-displayName: Users
paths:
  /account/v2/users:
    get:
      description: Retrieves all marketplace users
      tags:
      - User
      summary: List all users
      operationId: resource_User_readAllUsers_GET
      x-appdirect-required-scopes:
        ROLE_SALES_SUPPORT:
        - Allows access as a Sales Support agent for the marketplace.
        ROLE_CHANNEL_SUPPORT:
        - Allows access as a Customer Support agent for the marketplace.
        ROLE_CHANNEL_ADMIN:
        - Allows access as a Marketplace Manager for the marketplace.
        ROLE_CORPORATE_ADMIN:
        - Allows access as a Network Manager for the marketplace.
        ROLE_PARTNER_READ:
        - Allows access to read all marketplace data.
      parameters:
      - description: First or last name of user
        name: name
        in: query
        schema:
          type: string
      - description: Email address of user
        name: email
        in: query
        schema:
          type: string
      - description: External ID of user
        name: externalId
        in: query
        schema:
          type: string
      - description: User name of user
        name: username
        in: query
        schema:
          type: string
      - description: 'If specified, returns only users with the specified role, one of the following values: ROLE_CHANNEL_ADMIN (Marketplace Manager), ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer)'
        name: companyMembershipRole
        in: query
        schema:
          type: string
      - description: Accepts a notIn filter in the form of ?custom.customAttributeName=notIn(customAttributeValue1, customAttributeValue2, customAttributeValueN...) that excludes users with matching values. Before you can use the filter, you must first create "Text" type user custom attributes in the user interface. You can then specify the custom attribute name and values as customAttributeName and customAttributeValueN. See https://help.appdirect.com/appmarket/Default.htm#MarketplaceManager/MM-Setgscustui-create-attribs.html.
        name: custom.customAttributeName
        in: query
        schema:
          type: string
      - description: The date on which the user was last modified, in UNIX Epoch milliseconds
        name: lastModified
        in: query
        schema:
          type: number
      - description: Zero-based page index
        name: page
        in: query
        schema:
          type: integer
          default: 0
      - description: Number of results per page to return
        name: size
        in: query
        schema:
          type: integer
          default: 50
      - description: The property to sort by
        name: sortField
        in: query
        schema:
          type: string
          enum:
          - DATE
          - FIRST_NAME
          - LAST_NAME
          default: DATE
      - description: Ordering type
        name: sortOrder
        in: query
        schema:
          type: string
          enum:
          - ASC
          - DESC
          default: ASC
      - description: Optional. Default is true. When set to true, user custom attributes are included in the API response. When set to false, user custom attributes are not included.
        name: includeCustomAttributes
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                response:
                  value:
                    links: []
                    content:
                    - uuid: 2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1
                      email: john.lee@company0093957321.com
                      userName: john.lee
                      firstName: John
                      lastName: Lee
                      picture: http://appdirect/profilePics/img6839249962619189663.png?32339267f9f00643fd18373adf580743
                      activated: true
                      allowLogin: true
                      ldapId: '1'
                      boostUser: null
                      creationDate: 1398896238000
                      externalId: b34974b2-f5d6-4326-9859-5247dc42ee60
                      idpUuid: 1d37bace-f4cf-11e6-af80-22000a9513f7
                      locale: en_US
                      lastSuccessfulLogin: 1543268078000
                      openId: http://appdirect/openid/id/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1
                      roles:
                      - ROLE_USER
                      currency: USD
                      customAttributes:
                      - name: C5125859
                        attributeType: TEXT
                        label: Commission_Payout_ID
                        hint: commission_hint
                        value: t1
                      - name: allow_credit_card
                        attributeType: MULTISELECT
                        label: Allow Credit Card
                        hint: Allows credit card payments and enables credit card fields
                        valueKeys: []
                      - name: C5457097
                        attributeType: TEXT
                        label: C5457097
                        hint: ''
                        value: abcd
                      metadata:
                        apsUid: null
                      links:
                      - rel: self
                        href: http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1
                      - rel: memberships
                        href: http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/memberships
                    - uuid: 8db1c051-73a6-4ff8-a0ce-bc1d80d0f156
                      email: jane.lee@company1151609035.com
                      userName: jane.lee
                      firstName: Jane
                      lastName: Lee
                      picture: null
                      activated: true
                      allowLogin: true
                      ldapId: null
                      boostUser: null
                      creationDate: 1498080462000
                      externalId: 47ac42db-162e-11e7-af80-22000a9513f7
                      locale: en_US
                      lastSuccessfulLogin: 1542820131000
                      openId: http://appdirect/openid/id/8db1c051-73a6-4ff8-a0ce-bc1d80d0f156
                      roles:
                      - ROLE_USER
                      currency: USD
                      customAttributes: []
                      metadata:
                        apsUid: null
                      links:
                      - rel: self
                        href: http://appdirect/api/account/v2/users/8db1c051-73a6-4ff8-a0ce-bc1d80d0f156
                      - rel: memberships
                        href: http://appdirect/api/account/v2/users/8db1c051-73a6-4ff8-a0ce-bc1d80d0f156/memberships
                    page:
                      size: 50
                      totalElements: 2
                      totalPages: 1
                      number: 0
        '401':
          description: Unauthorized
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request GET \\\n  --url 'https://marketplace.appdirect.com/api/account/v2/users?name=SOME_STRING_VALUE&email=SOME_STRING_VALUE&externalId=SOME_STRING_VALUE&username=SOME_STRING_VALUE&companyMembershipRole=SOME_STRING_VALUE&custom.customAttributeName=SOME_STRING_VALUE&lastModified=SOME_NUMBER_VALUE&page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&includeCustomAttributes=SOME_BOOLEAN_VALUE'"
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://marketplace.appdirect.com/api/account/v2/users',\n  qs: {\n    name: 'SOME_STRING_VALUE',\n    email: 'SOME_STRING_VALUE',\n    externalId: 'SOME_STRING_VALUE',\n    username: 'SOME_STRING_VALUE',\n    companyMembershipRole: 'SOME_STRING_VALUE',\n    'custom.customAttributeName': 'SOME_STRING_VALUE',\n    lastModified: 'SOME_NUMBER_VALUE',\n    page: 'SOME_INTEGER_VALUE',\n    size: 'SOME_INTEGER_VALUE',\n    sortField: 'SOME_STRING_VALUE',\n    sortOrder: 'SOME_STRING_VALUE',\n    includeCustomAttributes: 'SOME_BOOLEAN_VALUE'\n  }\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Java + Okhttp
        source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://marketplace.appdirect.com/api/account/v2/users?name=SOME_STRING_VALUE&email=SOME_STRING_VALUE&externalId=SOME_STRING_VALUE&username=SOME_STRING_VALUE&companyMembershipRole=SOME_STRING_VALUE&custom.customAttributeName=SOME_STRING_VALUE&lastModified=SOME_NUMBER_VALUE&page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&includeCustomAttributes=SOME_BOOLEAN_VALUE\")\n  .get()\n  .build();\n\nResponse response = client.newCall(request).execute();"
  /account/v2/inactiveUsers/{activationToken}:
    patch:
      description: Activate a marketplace user using its associated activation token.
      tags:
      - User
      summary: Activate a user
      operationId: resource_User_updateInactiveUser_PATCH
      x-appdirect-required-scopes:
        ROLE_USER:
        - Allows access to an user who possesses an activation token.
      parameters:
      - description: User's activation token, typically received via invitation emails
        name: activationToken
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InactiveUserAccountV2'
        description: User activation information
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                response:
                  value:
                    email: alex.gonsalez@company2438285395.com
                    password: ''
                    activated: true
                    termsOfService: true
                    privacyPolicy: true
        '401':
          description: Unauthorized
        '404':
          description: Token not found
          content:
            application/json:
              examples:
                response:
                  value:
                    code: '404'
                    message: Token not found
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request PATCH \\\n  --url https://marketplace.appdirect.com/api/account/v2/inactiveUsers/%7BactivationToken%7D \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"alex.gonsalez@company2438285395.com\",\"password\":\"some-password\",\"activated\":true,\"termsOfService\":true,\"privacyPolicy\":true}'"
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'PATCH',\n  url: 'https://marketplace.appdirect.com/api/account/v2/inactiveUsers/%7BactivationToken%7D',\n  headers: {'content-type': 'application/json'},\n  body: {\n    email: 'alex.gonsalez@company2438285395.com',\n    password: 'some-password',\n    activated: true,\n    termsOfService: true,\n    privacyPolicy: true\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Java + Okhttp
        source: "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"email\\\":\\\"alex.gonsalez@company2438285395.com\\\",\\\"password\\\":\\\"some-password\\\",\\\"activated\\\":true,\\\"termsOfService\\\":true,\\\"privacyPolicy\\\":true}\");\nRequest request = new Request.Builder()\n  .url(\"https://marketplace.appdirect.com/api/account/v2/inactiveUsers/%7BactivationToken%7D\")\n  .patch(body)\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"
  /account/v2/users/{userUuid}:
    get:
      description: Retrieves a marketplace user by ID or external ID. If you use the ID, you can omit a prefix or use 'id:' as the prefix. If you use the external ID, you must always specify the 'externalId:' prefix.
      tags:
      - User
      summary: Read a user
      operationId: resource_User_readUser_GET
      x-appdirect-required-scopes:
        ROLE_PARTNER_READ:
        - Allows access to read all marketplace data.
        ROLE_CORPORATE_ADMIN:
        - Allows access as a Network Manager for the marketplace.
        ROLE_CHANNEL_ADMIN:
        - Allows access as a Marketplace Manager for the marketplace.
        ROLE_CHANNEL_SUPPORT:
        - Allows access as a Customer Support agent for the marketplace.
        ROLE_SALES_SUPPORT:
        - Allows access as a Sales Support agent for the marketplace.
        ROLE_USER:
        - Allows access to read any company user.
        ROLE_SYS_ADMIN:
        - Allows access as a Company Admin for the company.
      parameters:
      - description: Unique identifier (ID or external ID) of the user
        name: userUuid
        in: path
        required: true
        schema:
          type: string
      - description: Optional. Default is true. When set to true, user custom attributes are included in the API response. When set to false, user custom attributes are not included.
        name: includeCustomAttributes
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                response:
                  value:
                    uuid: 2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1
                    email: jane.lee@company1151609035.com
                    userName: jane.lee
                    firstName: Jane
                    lastName: Lee
                    picture: http://appdirect/profilePics/img6839249962619189663.png?32339267f9f00643fd18373adf580743
                    activated: true
                    allowLogin: true
                    ldapId: '1'
                    boostUser: null
                    creationDate: 1398896238000
                    externalId: 0e149998-6c1a-4c82-90ed-57468a394447
                    idpUuid: 1d37bace-f4cf-11e6-af80-22000a9513f7
                    locale: en_US
                    lastSuccessfulLogin: 1543528191000
                    openId: http://appdirect/openid/id/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1
                    roles:
                    - ROLE_USER
                    currency: USD
                    customAttributes:
                    - name: C5125859
                      attributeType: TEXT
                      label: Commission_Payout_ID
                      hint: commission_hint
                      value: t1
                    - name: allow_credit_card
                      attributeType: MULTISELECT
                      label: Allow Credit Card
                      hint: Allows credit card payments and enables credit card fields
                      valueKeys: []
                    - name: C5457097
                      attributeType: TEXT
                      label: C5457097
                      hint: ''
                      value: abcd
                    metadata:
                      apsUid: null
                    links:
                    - rel: self
                      href: http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1
                    - rel: memberships
                      href: http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/memberships
        '401':
          description: Unauthorized
        '404':
          description: User not found
          content:
            application/json:
              examples:
                response:
                  value:
                  - code: Not Found
                    message: User with UUID=4c8aad2f-288f-41eb-8467-fa7e52bc4fac not found.
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request GET \\\n  --url 'https://marketplace.appdirect.com/api/account/v2/users/%7BuserUuid%7D?includeCustomAttributes=SOME_BOOLEAN_VALUE'"
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://marketplace.appdirect.com/api/account/v2/users/%7BuserUuid%7D',\n  qs: {includeCustomAttributes: 'SOME_BOOLEAN_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Java + Okhttp
        source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://marketplace.appdirect.com/api/account/v2/users/%7BuserUuid%7D?includeCustomAttributes=SOME_BOOLEAN_VALUE\")\n  .get()\n  .build();\n\nResponse response = client.newCall(request).execute();"
    put:
      description: Updates a marketplace user
      tags:
      - User
      summary: Update a user
      operationId: resource_User_updateUser_PUT
      x-appdirect-required-scopes:
        ROLE_PARTNER:
        - Allows access to read and write all marketplace data.
        ROLE_CORPORATE_ADMIN:
        - Allows access as a Network Manager for the marketplace.
        ROLE_CHANNEL_ADMIN:
        - Allows access as a Marketplace Manager for the marketplace.
        ROLE_SALES_SUPPORT:
        - Allows access as a Sales Support agent for the marketplace.
        ROLE_CHANNEL_SUPPORT:
        - Allows access as a Customer Support agent for the marketplace.
        ROLE_SYS_ADMIN:
        - Allows access as a Company Admin for the company.
      parameters:
      - description: Unique identifier of the user assigned by the AppDirect platform
        name: userUuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserAccountV2'
        description: Specified updates to user information
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                response:
                  value:
                    uuid: 2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1
                    email: jane.lee@company1151609035.com
                    userName: jane.lee
                    firstName: Jane
                    lastName: Lee
                    picture: http://appdirect/profilePics/img6839249962619189663.png?32339267f9f00643fd18373adf580743
                    activated: true
                    allowLogin: true
                    ldapId: '1'
                    boostUser:
                      apsUid: murnu8w
                    creationDate: 1398896238000
                    externalId: b34974b2-f5d6-4326-9859-5247dc42ee60
                    idpUuid: 1d37bace-f4cf-11e6-af80-22000a9513f7
                    locale: en_US
                    lastSuccessfulLogin: 1543528191000
                    openId: http://appdirect/openid/id/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1
                    roles:
                    - ROLE_CORPORATE_ADMIN
                    - ROLE_USER
                    currency: USD
                    customAttributes:
                    - name: C5125859
                      attributeType: TEXT
                      label: Commission_Payout_ID
                      hint: commission_hint
                      value: t1
                    - name: allow_credit_card
                      attributeType: MULTISELECT
                      label: Allow Credit Card
                      hint: Allows credit card payments and enables credit card fields
                      valueKeys: []
                    - name: C5457097
                      attributeType: TEXT
                      label: C5457097
                      hint: ''
                      value: abcd
                    metadata:
                      apsUid: murnu8w
                    links:
                    - rel: self
                      href: http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1
                    - rel: memberships
                      href: http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/memberships
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: User not found
          content:
            application/json:
              examples:
                response:
                  value:
                  - code: Not Found
                    message: User with UUID=4c8aad2f-288f-41eb-8467-fa7e52bc4fac not found.
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request PUT \\\n  --url https://marketplace.appdirect.com/api/account/v2/users/%7BuserUuid%7D \\\n  --header 'content-type: application/json' \\\n  --data '{\"firstName\":\"Jane\",\"lastName\":\"Lee\",\"currency\":\"USD\",\"externalId\":\"b34974b2-f5d6-4326-9859-5247dc42ee60\",\"locale\":\"en_US\",\"ldapId\":\"1\",\"boostUser\":{\"apsUid\":\"murnu8w\"},\"roles\":[\"ROLE_CORPORATE_ADMIN\"]}'"
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://marketplace.appdirect.com/api/account/v2/users/%7BuserUuid%7D',\n  headers: {'content-type': 'application/json'},\n  body: {\n    firstName: 'Jane',\n    lastName: 'Lee',\n    currency: 'USD',\n    externalId: 'b34974b2-f5d6-4326-9859-5247dc42ee60',\n    locale: 'en_US',\n    ldapId: '1',\n    boostUser: {apsUid: 'murnu8w'},\n    roles: ['ROLE_CORPORATE_ADMIN']\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Java + Okhttp
        source: "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"firstName\\\":\\\"Jane\\\",\\\"lastName\\\":\\\"Lee\\\",\\\"currency\\\":\\\"USD\\\",\\\"externalId\\\":\\\"b34974b2-f5d6-4326-9859-5247dc42ee60\\\",\\\"locale\\\":\\\"en_US\\\",\\\"ldapId\\\":\\\"1\\\",\\\"boostUser\\\":{\\\"apsUid\\\":\\\"murnu8w\\\"},\\\"roles\\\":[\\\"ROLE_CORPORATE_ADMIN\\\"]}\");\nRequest request = new Request.Builder()\n  .url(\"https://marketplace.appdirect.com/api/account/v2/users/%7BuserUuid%7D\")\n  .put(body)\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"
    patch:
      description: Update ('patch') one or more fields in the user details. This only adds or updates the values for the properties that you include in the call; all other properties, and data already saved for them, are ignored
      tags:
      - User
      summary: Patch a user
      operationId: resource_User_updateUser_PATCH
      x-appdirect-required-scopes:
        ROLE_PARTNER:
        - Allows access to read and write all marketplace data.
        ROLE_CORPORATE_ADMIN:
        - Allows access as a Network Manager for the marketplace.
        ROLE_CHANNEL_ADMIN:
        - Allows access as a Marketplace Manager for the marketplace.
        ROLE_USER:
        - 'Allows access as a User for the marketplace.This permission allows a user to modify the following fields for their own user account: firstName, lastName, locale, and currency'
        ROLE_SALES_SUPPORT:
        - Allows access as a Sales Support agent for the marketplace.
        ROLE_CHANNEL_SUPPORT:
        - Allows access as a Customer Support agent for the marketplace.
        ROLE_SYS_ADMIN:
        - Allows access as a Company Admin for the company.
      parameters:
      - description: Unique identifier of the user assigned by the AppDirect platform
        name: userUuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchUserAccountV2'
        description: Specified updates to user information
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                response:
                  value:
                    uuid: 2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1
                    email: jane.lee@company1151609035.com
                    userName: jane.lee
                    firstName: Jane
                    lastName: Lee
                    picture: http://appdirect/profilePics/img6839249962619189663.png?32339267f9f00643fd18373adf580743
                    activated: true
                    allowLogin: true
                    ldapId: '1'
                    boostUser:
                      apsUid: murnu8w
                    creationDate: 1398896238000
                    externalId: b34974b2-f5d6-4326-9859-5247dc42ee60
                    idpUuid: 1d37bace-f4cf-11e6-af80-22000a9513f7
                    locale: en_US
                    lastSuccessfulLogin: 1543528191000
                    openId: http://appdirect/openid/id/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1
                    roles:
                    - ROLE_CORPORATE_ADMIN
                    - ROLE_USER
                    currency: USD
                    customAttributes:
                    - name: C5125859
                      attributeType: TEXT
                      label: Commission_Payout_ID
                      hint: commission_hint
                      value: t1
                    - name: allow_credit_card
                      attributeType: MULTISELECT
                      label: Allow Credit Card
                      hint: Allows credit card payments and enables credit card fields
                      valueKeys: []
                    - name: C5457097
                      attributeType: TEXT
                      label: C5457097
                      hint: ''
                      value: abcd
                    metadata:
                      apsUid: murnu8w
                    links:
                    - rel: self
                      href: http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1
                    - rel: memberships
                      href: http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/memberships
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: User not found
          content:
            application/json:
              examples:
                response:
                  value:
                  - code: Not Found
                    message: User with UUID=4c8aad2f-288f-41eb-8467-fa7e52bc4fac not found.
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request PATCH \\\n  --url https://marketplace.appdirect.com/api/account/v2/users/%7BuserUuid%7D \\\n  --header 'content-type: application/json' \\\n  --data '{\"firstName\":\"Jane\",\"lastName\":\"Lee\",\"currency\":\"USD\",\"externalId\":\"b34974b2-f5d6-4326-9859-5247dc42ee60\",\"locale\":\"en_US\",\"ldapId\":\"1\",\"boostUser\":{\"apsUid\":\"murnu8w\"},\"roles\":[\"ROLE_CORPORATE_ADMIN\"],\"idpUuid\":\"c412543-1233-6547-9809-0647dc42ee51\"}'"
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'PATCH',\n  url: 'https://marketplace.appdirect.com/api/account/v2/users/%7BuserUuid%7D',\n  headers: {'content-type': 'application/json'},\n  body: {\n    firstName: 'Jane',\n    lastName: 'Lee',\n    currency: 'USD',\n    externalId: 'b34974b2-f5d6-4326-9859-5247dc42ee60',\n    locale: 'en_US',\n    ldapId: '1',\n    boostUser: {apsUid: 'murnu8w'},\n    roles: ['ROLE_CORPORATE_ADMIN'],\n    idpUuid: 'c412543-1233-6547-9809-0647dc42ee51'\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Java + Okhttp
        source: "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"firstName\\\":\\\"Jane\\\",\\\"lastName\\\":\\\"Lee\\\",\\\"currency\\\":\\\"USD\\\",\\\"externalId\\\":\\\"b34974b2-f5d6-4326-9859-5247dc42ee60\\\",\\\"locale\\\":\\\"en_US\\\",\\\"ldapId\\\":\\\"1\\\",\\\"boostUser\\\":{\\\"apsUid\\\":\\\"murnu8w\\\"},\\\"roles\\\":[\\\"ROLE_CORPORATE_ADMIN\\\"],\\\"idpUuid\\\":\\\"c412543-1233-6547-9809-0647dc42ee51\\\"}\");\nRequest request = new Request.Builder()\n  .url(\"https://marketplace.appdirect.com/api/account/v2/users/%7BuserUuid%7D\")\n  .patch(body)\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"
  /account/v2/users/{userUuid}/rssrCompanyAssociations:
    get:
      description: Reads a reseller user's company associations
      tags:
      - User
      summary: Read reseller user company associations
      operationId: resource_User_readResellerUser_GET
      x-appdirect-required-scopes:
        ROLE_PARTNER_READ:
        - Allows access to read all marketplace data.
        ROLE_CORPORATE_ADMIN:
        - Allows access as a Network Manager for the marketplace.
        ROLE_CHANNEL_ADMIN:
        - Allows access as a Marketplace Manager for the marketplace.
        ROLE_CHANNEL_SUPPORT:
        - Allows access as a Customer Support agent for the marketplace.
        ROLE_SALES_SUPPORT:
        - Allows access as a Sales Support agent for the marketplace.
        ROLE_USER:
        - Allows access to read any company user.
      parameters:
      - description: Unique identifier of the user
        name: userUuid
        in: path
        required: true
        schema:
          type: string
      - description: Zero-based page index
        name: page
        in: query
        schema:
          type: integer
          default: 0
      - description: Number of results per page to return
        name: size
        in: query
        schema:
          type: integer
          default: 50
      - description: The property to sort by
        name: sortField
        in: query
        schema:
          type: string
          enum:
          - DATE
          default: DATE
      - description: Ordering type
        name: sortOrder
        in: query
        schema:
          type: string
          enum:
          - ASC
          - DESC
          default: ASC
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                response:
                  value:
                    links: []
                    content:
                    - uuid: a3f385be-e10b-444e-99d1-95cd7d4c1f5a
                      name: Matt & Co
                      enabled: true
                      address:
                        street1: Harris Place NW
                        street2: '907'
                        city: Calgary
                        state: AB
                        zip: T3B2V4
                        country: Canada
                      companySize: SMALL
                      customAttributes: []
                      creationDate: 1457416568000
                      industry: Finance
                      salesAgent:
                        rel: salesRepLink
                        href: http://appdirect/api/account/v2/users/a3f385be-e10b-444e-99d1-95cd7d4c1f5a
                      emailAddress: jane.lee@compan

# --- truncated at 32 KB (83 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/appdirect/refs/heads/main/openapi/appdirect-user-api-openapi.yml