AppDirect CompanyMemberships API

The CompanyMemberships API from AppDirect — 11 operation(s) for companymemberships.

OpenAPI Specification

appdirect-companymemberships-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 CompanyMemberships 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: CompanyMemberships
  x-displayName: Company Memberships
paths:
  /account/v2/companies/{companyUuid}/memberships/{userUuid}:
    get:
      description: Retrieve a marketplace user's company membership information.
      tags:
      - CompanyMemberships
      summary: Read company membership
      operationId: resource_Company_readCompanyMembership_GET
      x-appdirect-required-scopes:
        ROLE_USER:
        - Allows access as an end user in the company
        ROLE_RESELLER:
        - Allows access as a Reseller for the company.
        ROLE_RESELLER_MANAGER:
        - Allows access as a Reseller Manager for the marketplace. Only memberships with the Reseller role or that are linked to Reseller companies can be retrieved.
        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: Unique identifier of company in the API request
        name: companyUuid
        in: path
        required: true
        schema:
          type: string
      - description: Unique identifier of user in the API request
        name: userUuid
        in: path
        required: true
        schema:
          type: string
      - description: Optional. Default is true. When set to true, companies will be included in the API response. When set to false, companies will not be included.
        name: includeCompanies
        required: false
        in: query
        schema:
          type: boolean
      - description: Optional. Default is true. When set to true, user custom attributes will be included in the API response. When set to false, user custom attributes will not be included.
        name: includeUserCustomAttributes
        required: false
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                response:
                  value:
                    user:
                      uuid: 6de203c1-a583-455a-ba95-3797edc262d0
                      email: jude.simpson@company5833088198.com
                      userName: jude.simpson
                      firstName: Jude
                      lastName: Simpson
                      picture: http://appdirect/profilePics/img2147417701652580695.png?184b58e358f087154d94329f9000b28a
                      activated: true
                      allowLogin: true
                      ldapId: '1'
                      boostUser:
                        apsUid: murnu8w
                      currency: null
                      customAttributes:
                      - attributeType: TEXT
                        hint: commission_hint
                        label: Commission_Payout_ID
                        name: C5125859
                        value: value
                      roles:
                      - ROLE_USER
                      metadata:
                        apsUid: murnu8w
                      links:
                      - rel: self
                        href: http://appdirect/api/account/v2/users/6de203c1-a583-455a-ba95-3797edc262d0
                      - rel: memberships
                        href: http://appdirect/api/account/v2/users/6de203c1-a583-455a-ba95-3797edc262d0/memberships
                    company:
                      uuid: 4be3ce24-a702-46b9-a789-f15ce822a9ef
                      name: Company 5261852235
                      picture: http://localhost:8080/profilePics/http://cdn/company.png
                      vendor: true
                      reseller: true
                      phoneNumber: '9259221234'
                      defaultRole: DEVELOPER
                      enabled: true
                      customAttributes:
                      - name: Geographic Region
                        attributeType: TEXT
                        label: Geographic Region
                        hint: US West, US Central, or US East
                        value: US
                      - name: Company Details
                        attributeType: MULTISELECT
                        label: Label Names
                        hint: ''
                        valueKeys:
                        - great option
                      links:
                      - rel: self
                        href: http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef
                      - rel: memberships
                        href: http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef/memberships
                    enabled: true
                    lastUsed: false
                    roles:
                    - ROLE_BILLING_ADMIN
                    - ROLE_SYS_ADMIN
                    position: Business Analyst
                    mosiUser:
                      username: adazuretest@sdasd21321.onmicrosoft.com
                    metadata:
                      mosi_username: adazuretest@sdasd21321.onmicrosoft.com
                    links:
                    - rel: self
                      href: http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef/memberships/6de203c1-a583-455a-ba95-3797edc262d0
                    - rel: user
                      href: http://appdirect/api/account/v2/users/6de203c1-a583-455a-ba95-3797edc262d0
                    - rel: company
                      href: http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef
        '401':
          description: Unauthorized
        '404':
          description: Company/User/Membership not found
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request GET \\\n  --url 'https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D?includeCompanies=SOME_BOOLEAN_VALUE&includeUserCustomAttributes=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/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D',\n  qs: {\n    includeCompanies: 'SOME_BOOLEAN_VALUE',\n    includeUserCustomAttributes: '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/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D?includeCompanies=SOME_BOOLEAN_VALUE&includeUserCustomAttributes=SOME_BOOLEAN_VALUE\")\n  .get()\n  .build();\n\nResponse response = client.newCall(request).execute();"
    put:
      description: 'Update a marketplace user''s company membership.


        Updates the following roles based on the provided user company membership data: Product Support, Sales Support, Reseller Manager, Customer Support, Reseller, Billing Admin, Company Admin, Developer.

        This also enables/disables the membership based on provided user company membership data.


        **Note: You cannot set the Marketplace Manager role through the API.**'
      tags:
      - CompanyMemberships
      summary: Update company membership
      operationId: resource_Company_updateCompanyMembership_PUT
      x-appdirect-required-scopes:
        ROLE_SYS_ADMIN:
        - Allows access as a Company Admin for the company.
        ROLE_RESELLER:
        - Allows access as a Reseller for the company.
        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:
        - Allows access to read and write all marketplace data.
      parameters:
      - description: Unique identifier of company in the API request
        name: companyUuid
        in: path
        required: true
        schema:
          type: string
      - description: Unique identifier of user in the API request
        name: userUuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserCompanyMembershipAccountV2'
        description: Update User company membership data
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                response:
                  value:
                    user:
                      uuid: a38ef2d2-cdad-483c-ba86-fa6186d12263
                      email: guy.smith24@yopmail.com
                      userName: guy.smith24@yopmail.com
                      firstName: Guy
                      lastName: Smith
                      picture: null
                      activated: true
                      allowLogin: true
                      ldapId: null
                      boostUser:
                        apsUid: murnu8w
                      roles:
                      - ROLE_USER
                      currency: null
                      customAttributes: []
                      metadata:
                        apsUid: murnu8w
                      links:
                      - rel: self
                        href: http://localhost:8080/api/account/v2/users/a38ef2d2-cdad-483c-ba86-fa6186d12263
                      - rel: memberships
                        href: http://localhost:8080/api/account/v2/users/a38ef2d2-cdad-483c-ba86-fa6186d12263/memberships
                    company:
                      uuid: 6b4bd452-895d-4098-aa56-e6046b238e0f
                      name: Appdirect
                      picture: null
                      vendor: true
                      reseller: true
                      phoneNumber: '9259221234'
                      defaultRole: DEVELOPER
                      enabled: true
                      customAttributes:
                      - name: Geographic Region
                        attributeType: TEXT
                        label: email
                        hint: US West, US Central, or US East
                        value: US1
                      links:
                      - rel: self
                        href: http://localhost:8080/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f
                      - rel: memberships
                        href: http://localhost:8080/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships
                    enabled: true
                    lastUsed: false
                    roles:
                    - ROLE_BILLING_ADMIN
                    - ROLE_DEVELOPER
                    - ROLE_SYS_ADMIN
                    - ROLE_CHANNEL_ADMIN
                    - ROLE_CHANNEL_PRODUCT_SUPPORT
                    - ROLE_CHANNEL_SUPPORT
                    - ROLE_SALES_SUPPORT
                    - ROLE_RESELLER
                    - ROLE_RESELLER_MANAGER
                    position: null
                    mosiUser: null
                    metadata:
                      mosi_username: null
                    links:
                    - rel: self
                      href: http://localhost:8080/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships/a38ef2d2-cdad-483c-ba86-fa6186d12263
                    - rel: user
                      href: http://localhost:8080/api/account/v2/users/a38ef2d2-cdad-483c-ba86-fa6186d12263
                    - rel: company
                      href: http://localhost:8080/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f
        '401':
          description: Unauthorized
        '404':
          description: Company/User/Membership not found
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request PUT \\\n  --url https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D \\\n  --header 'content-type: application/json' \\\n  --data '{\"enabled\":true,\"roles\":[\"ROLE_BILLING_ADMIN\",\"ROLE_DEVELOPER\",\"ROLE_SYS_ADMIN\"]}'"
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D',\n  headers: {'content-type': 'application/json'},\n  body: {\n    enabled: true,\n    roles: ['ROLE_BILLING_ADMIN', 'ROLE_DEVELOPER', 'ROLE_SYS_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, \"{\\\"enabled\\\":true,\\\"roles\\\":[\\\"ROLE_BILLING_ADMIN\\\",\\\"ROLE_DEVELOPER\\\",\\\"ROLE_SYS_ADMIN\\\"]}\");\nRequest request = new Request.Builder()\n  .url(\"https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D\")\n  .put(body)\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"
    delete:
      description: 'Delete a marketplace user''s company membership.


        If this is the only company the user was member of, user is marked as deleted.

        A user that has active entitlements, owns products or is externally managed can''t be deleted.'
      tags:
      - CompanyMemberships
      summary: Delete company membership
      operationId: resource_Company_deleteCompanyMembership_DELETE
      x-appdirect-required-scopes:
        ROLE_SYS_ADMIN:
        - Allows access as a Company Admin for the company.
        ROLE_RESELLER:
        - Allows access as a Reseller for the company.
        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:
        - Allows access to read and write all marketplace data.
      parameters:
      - description: Unique identifier of company in the API request
        name: companyUuid
        in: path
        required: true
        schema:
          type: string
      - description: Unique identifier of user in the API request
        name: userUuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Success
        '401':
          description: Unauthorized
        '404':
          description: Company/User/Membership not found
        '409':
          description: Active subscriptions found
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request DELETE \\\n  --url https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D"
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D'\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/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D\")\n  .delete(null)\n  .build();\n\nResponse response = client.newCall(request).execute();"
    patch:
      description: 'Enable or disable marketplace user''s company membership.


        This only changes the user company membership''s enabled status; all other attributes are ignored.'
      tags:
      - CompanyMemberships
      summary: Enable/Disable company membership
      operationId: resource_Company_partialUpdateCompanyMembership_PATCH
      x-appdirect-required-scopes:
        ROLE_SYS_ADMIN:
        - Allows access as a Company Admin for the company.
        ROLE_RESELLER:
        - Allows access as a Reseller for the company.
        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:
        - Allows access to read and write all marketplace data.
      parameters:
      - description: Unique identifier of company in the API request
        name: companyUuid
        in: path
        required: true
        schema:
          type: string
      - description: Unique identifier of user in the API request
        name: userUuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchUserCompanyMembershipAccountV2'
        description: User company membership data
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                response:
                  value:
                    user:
                      uuid: 9cc60e5e-5a46-4efb-9d53-afc6ee0586cd
                      email: susan.gonsalez@company4486527851.com
                      userName: susan.gonsalez
                      firstName: Susan
                      lastName: Gonsalez
                      picture: null
                      activated: true
                      allowLogin: true
                      ldapId: null
                      boostUser: null
                      roles:
                      - ROLE_USER
                      metadata:
                        apsUid: null
                      links:
                      - rel: self
                        href: http://appdirect/api/account/v2/users/9cc60e5e-5a46-4efb-9d53-afc6ee0586cd
                      - rel: memberships
                        href: http://appdirect/api/account/v2/users/9cc60e5e-5a46-4efb-9d53-afc6ee0586cd/memberships
                    company:
                      uuid: 88542fbc-f801-4588-9525-e615146889f7
                      name: Company 1079194187
                      picture: http://localhost:8080/profilePics/http://cdn/company.png
                      vendor: false
                      phoneNumber: '9259221234'
                      defaultRole: USER
                      enabled: true
                      links:
                      - rel: self
                        href: http://appdirect/api/account/v2/companies/88542fbc-f801-4588-9525-e615146889f7
                      - rel: memberships
                        href: http://appdirect/api/account/v2/companies/88542fbc-f801-4588-9525-e615146889f7/memberships
                    enabled: true
                    lastUsed: false
                    roles:
                    - ROLE_BILLING_ADMIN
                    - ROLE_SYS_ADMIN
                    position: null
                    mosiUser: null
                    metadata:
                      mosi_username: null
                    links:
                    - rel: self
                      href: http://appdirect/api/account/v2/companies/88542fbc-f801-4588-9525-e615146889f7/memberships/9cc60e5e-5a46-4efb-9d53-afc6ee0586cd
                    - rel: user
                      href: http://appdirect/api/account/v2/users/9cc60e5e-5a46-4efb-9d53-afc6ee0586cd
                    - rel: company
                      href: http://appdirect/api/account/v2/companies/88542fbc-f801-4588-9525-e615146889f7
        '401':
          description: Unauthorized
        '404':
          description: Company/User/Membership not found
        '409':
          description: Active subscriptions found
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request PATCH \\\n  --url https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D \\\n  --header 'content-type: application/json' \\\n  --data '{\"enabled\":true}'"
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'PATCH',\n  url: 'https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D',\n  headers: {'content-type': 'application/json'},\n  body: {enabled: true},\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, \"{\\\"enabled\\\":true}\");\nRequest request = new Request.Builder()\n  .url(\"https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D\")\n  .patch(body)\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"
  /account/v2/companies/{companyUuid}/memberships/active:
    post:
      description: 'Create a marketplace user with membership in the given company.


        The created user is active, and is associated with the specified company (membership).

        User is set with a temporary password; the password is emailed to the recipients specified in the request body.


        The domain part of the user''s email address must match one of the verified domains associated with the company the user will be created in.


        **Note: You cannot set the Marketplace Manager role through the API.**'
      tags:
      - CompanyMemberships
      summary: Create company membership (Add User)
      operationId: resource_Company_createActiveUser_POST
      x-appdirect-required-scopes:
        ROLE_SYS_ADMIN:
        - Allows access as a Company Admin for the company.
        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:
        - Allows access to read and write all marketplace data.
      parameters:
      - description: Unique identifier of company in the API request
        name: companyUuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActiveUserCreationAccountV2'
        description: User creation data
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                response:
                  value:
                    user:
                      uuid: e16171eb-d89c-4842-9550-2f9cf3ef4cee
                      email: guy.smith@company9411805586.com
                      userName: guy.smith@company9411805586.com
                      firstName: Guy
                      lastName: Smith
                      picture: null
                      activated: true
                      allowLogin: true
                      ldapId: null
                      boostUser: null
                      roles:
                      - ROLE_USER
                      currency: null
                      customAttributes: []
                      metadata:
                        apsUid: null
                      links:
                      - rel: self
                        href: http://appdirect/api/account/v2/users/e16171eb-d89c-4842-9550-2f9cf3ef4cee
                      - rel: memberships
                        href: http://appdirect/api/account/v2/users/e16171eb-d89c-4842-9550-2f9cf3ef4cee/memberships
                    company:
                      uuid: ece062bd-0c74-4d44-996c-743c3e71f8e1
                      name: Company 4492834930
                      picture: http://localhost:8080/profilePics/http://cdn/company.png
                      vendor: false
                      reseller: true
                      phoneNumber: '9259221234'
                      defaultRole: USER
                      enabled: true
                      customAttributes:
                      - name: Geographic Region
                        attributeType: TEXT
                        label: Geographic Region
                        hint: US West, US Central, or US East
                        value: US
                      - name: Company Details
                        attributeType: MULTISELECT
                        label: Label Names
                        hint: ''
                        valueKeys:
                        - great option
                      links:
                      - rel: self
                        href: http://appdirect/api/account/v2/companies/ece062bd-0c74-4d44-996c-743c3e71f8e1
                      - rel: memberships
                        href: http://appdirect/api/account/v2/companies/ece062bd-0c74-4d44-996c-743c3e71f8e1/memberships
                    enabled: true
                    lastUsed: false
                    roles:
                    - ROLE_USER
                    position: null
                    mosiUser: null
                    metadata:
                      mosi_username: null
                    links:
                    - rel: self
                      href: http://appdirect/api/account/v2/companies/ece062bd-0c74-4d44-996c-743c3e71f8e1/memberships/e16171eb-d89c-4842-9550-2f9cf3ef4cee
                    - rel: user
                      href: http://appdirect/api/account/v2/users/e16171eb-d89c-4842-9550-2f9cf3ef4cee
                    - rel: company
                      href: http://appdirect/api/account/v2/companies/ece062bd-0c74-4d44-996c-743c3e71f8e1
        '401':
          description: Unauthorized
        '404':
          description: Company not found
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request POST \\\n  --url https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/active \\\n  --header 'content-type: application/json' \\\n  --data '{\"user\":{\"email\":\"guy.smith@company9411805586.com\",\"firstName\":\"Guy\",\"lastName\":\"Smith\",\"roles\":[\"ROLE_DEVELOPER\"]},\"temporaryPassword\":\"Temporary Password\",\"recipientEmails\":[\"manager@company9411805586.com\",\"itteam@company9411805586.com\"]}'"
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/active',\n  headers: {'content-type': 'application/json'},\n  body: {\n    user: {\n      email: 'guy.smith@company9411805586.com',\n      firstName: 'Guy',\n      lastName: 'Smith',\n      roles: ['ROLE_DEVELOPER']\n    },\n    temporaryPassword: 'Temporary Password',\n    recipientEmails: ['manager@company9411805586.com', 'itteam@company9411805586.com']\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, \"{\\\"user\\\":{\\\"email\\\":\\\"guy.smith@company9411805586.com\\\",\\\"firstName\\\":\\\"Guy\\\",\\\"lastName\\\":\\\"Smith\\\",\\\"roles\\\":[\\\"ROLE_DEVELOPER\\\"]},\\\"temporaryPassword\\\":\\\"Temporary Password\\\",\\\"recipientEmails\\\":[\\\"manager@company9411805586.com\\\",\\\"itteam@company9411805586.com\\\"]}\");\nRequest request = new Request.Builder()\n  .url(\"https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/active\")\n  .post(body)\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"
  /account/v2/companies/{companyUuid}/memberships:
    get:
      description: List a marketplace company's user memberships.
      tags:
      - CompanyMemberships
      summary: List company memberships
      operationId: resource_Company_readCompanyMemberships_GET
      x-appdirect-required-scopes:
        ROLE_USER:
        - Allows access as an end user in the company.
        ROLE_RESELLER:
        - Allows access as a Reseller for the company.
        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: Unique identifier of company in the API request
        name: companyUuid
        in: path
        required: true
        schema:
          type: string
      - description: If specified, returns only memberships associated with users having the specified active status
        name: active
        in: query
        schema:
          type: boolean
      - description: If specified, returns only memberships with the specified enabled status
        name: enabled
        in: query
        schema:
          type: boolean
      - description: If specified, returns only memberships with the specified role enabled
        name: roleName
        in: query
        schema:
          type: string
      - description: If specified, returns only memberships that are a part of the specified group
        name: groupUuid
        in: query
        schema:
          type: string
      - description: Zero-based page index
        name: page
        in: query
        schema:
          type: integer
          default: 0
      - description: Search term used to search on different fields of a membership
        name: searchText
        in: query
        schema:
          type: string
      - description: The size of the page to be returned
        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, companies will be included in the API response. When set to false, companies will not be included.
        name: includeCompanies
        required: false
        in: query
        schema:
          type: boolean
     

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