AppDirect Companies / Marketplace API

OAuth 2.0 REST API to manage marketplace companies, user memberships, subscriptions and assignments, invoices, and metered usage billing across an AppDirect marketplace.

OpenAPI Specification

appdirect-companies-openapi-original.yml Raw ↑
openapi: 3.0.0
info:
  description: >-
    The Companies API allows developers to manage marketplace companies and
    their user memberships.
  title: Companies
  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: Bundle
    x-displayName: Bundles
  - name: checkoutItemDetails
    description: Retrieves product details such as branding, pricing, and so on.
    x-displayName: Checkout Items
  - name: Companies
    x-displayName: Companies
  - name: AppResellerAccount
    x-displayName: Companies (Reseller)
  - name: AppResellerCompanyAssociation
    x-displayName: Company Association
  - name: CompanyMemberships
    x-displayName: Company Memberships
  - name: InboundEvents
    x-displayName: Content Events
  - name: CurrencyExchangeRate
    x-displayName: Currency Exchange Rate
  - description: |-
      API endpoint to manage notification templates (email and sms) that are
      used to communicate with users on the marketplace when a event
      occurs on the marketplace that requires a notification to users.
    name: CustomerNotification
    x-displayName: Customer Notifications
  - description: |-
      API endpoint to manage default notification templates (email and sms)
      When a partner have not customized a notification template, the default
      template will be used to send notification to users if it exists for the
      required notification template type and required locale.
    name: DefaultNotificationTemplateApi
    x-displayName: Default Notification Template Api
  - name: Discount
    x-displayName: Discounts
  - name: Domains
    x-displayName: Domains
  - name: Edition
    x-displayName: Editions
  - name: Event
    x-displayName: Events
  - name: Group
    x-displayName: Groups
  - name: Invitation
    x-displayName: Invitations
  - name: Invoice
    x-displayName: Invoices
  - name: AppResellerLeads
    x-displayName: Leads v2
  - name: Marketplace Product Settings
    x-displayName: Marketplace Product Settings
  - name: Integration
    x-displayName: Metered Usage
  - name: MyApps
    x-displayName: MyApps
  - name: Navigation
    x-displayName: Navigation
  - name: AppResellerOpportunities
    x-displayName: Opportunities
  - name: PaymentInstrument
    x-displayName: Payment Instruments
  - name: Payment Methods
    x-displayName: Payment Methods
  - name: AppResellerPaymentMethod
    x-displayName: Payment Methods (Reseller)
  - name: PaymentPlan
    x-displayName: Payment Plans
  - name: Payment
    x-displayName: Payments v1
  - name: Payments v2
    x-displayName: Payments v2
  - name: Answer
    x-displayName: Product Answers
  - name: Comment
    x-displayName: Product Comments
  - name: ProductContext
    x-displayName: Product Context
  - name: Product Management API
    x-displayName: Product Management API
  - name: Question
    x-displayName: Product Questions
  - name: Review
    x-displayName: Product Reviews
  - name: DataUploader
    x-displayName: Product Uploader
  - name: Product
    x-displayName: Products
  - name: PurchaseOrder
    x-displayName: Purchase Orders
  - name: AppResellerOrder
    x-displayName: Purchase Orders (Reseller)
  - name: AppResellerQuoteVersion
    x-displayName: Quote Versions
  - name: Reconciliation
    x-displayName: Reconciliation
  - name: AppResellerReconciliation
    x-displayName: Reconciliation (Reseller)
  - name: Reporting
    x-displayName: Reports v1
  - name: Reporting V2
    x-displayName: Reports V2
  - name: AppResellerCatalog
    x-displayName: Reseller Catalog
  - name: Search
    x-displayName: Search
  - name: SegmentFolders
    x-displayName: Segment Folders
  - name: Settings
    x-displayName: Settings
  - name: ShoppingCart
    description: Operations related to shopping carts
    x-displayName: ShoppingCart
  - name: SubscriptionAssignments
    x-displayName: Subscription Assignments
  - name: AppResellerAssignment
    x-displayName: Subscription Assignments (Reseller)
  - name: Subscriptions
    x-displayName: Subscriptions
  - name: AppResellerSubscription
    x-displayName: Subscriptions (Reseller)
  - name: Sync
    x-displayName: Sync
  - name: UserAccounts
    x-displayName: User Accounts
  - name: User
    x-displayName: Users
paths:
  /account/v2/companies/{companyUuid}/activities:
    get:
      description: >-
        Retrieve company or user activities.


        The displayType parameter dictates whether activities for the given user
        or activities for the whole company are returned.
      tags:
        - Companies
      summary: Read activities
      operationId: resource_Company_readCompanyActivities_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: Scope
          name: displayType
          in: query
          schema:
            type: string
            enum:
              - EVERYONE
              - ONLY_ME
            default: ONLY_ME
        - description: Zero-based page index
          name: page
          in: query
          schema:
            type: integer
            default: 0
        - description: The size of the page to be returned
          name: size
          in: query
          schema:
            type: integer
            default: 12
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                response:
                  value:
                    links: []
                    content:
                      - verb: COMPANY_ACTIVATED
                        timestamp:
                          - 2016
                          - 12
                          - 2
                          - 17
                          - 25
                          - 56
                          - 414
                        object:
                          id: 26
                          uuid: 222cf5ff-7795-4ece-b612-83ef6b72bb30
                          name: Company 6032459369
                          externalId: null
                          companyLinkMasked: false
                          type: COMPANY
                        subject:
                          id: 30
                          uuid: 8487f55b-05be-4c0e-97d8-021e5ca4008b
                          name: Susan Doe
                          email: susan.doe@company5087848592.com
                          externalId: null
                          activated: true
                          deleted: false
                          userRemovedFromCompanyObject: false
                          userRemovedFromCompanyTarget: false
                          personalInfoMasked: false
                          profileLinkMasked: false
                          type: USER
                        target:
                          id: 194379
                          uuid: a0504b87-f21f-40fe-9de1-e8479776a26f
                          name: Matts Company
                          externalId: null
                          companyLinkMasked: false
                          type: COMPANY
                        actor:
                          id: 1344
                          uuid: 966216bb-bb4e-4766-8849-fd72eead20ce
                          name: C2801919_first last
                          email: c2801919@appdirect.com
                          externalId: null
                          activated: false
                          deleted: false
                          userRemovedFromCompanyObject: false
                          userRemovedFromCompanyTarget: false
                          personalInfoMasked: false
                          profileLinkMasked: false
                          roleChanges: null
                          type: USER
                        context:
                          description: Documentation Center 283
                          header: Documentation Center 283
                          imageUrl: >-
                            https://d33na3ni6eqf5j.cloudfront.net/importable_app_resources/81858cea-627f-45ee-8906-67d5a23dd3bf/list.png?b5960593b97c0fdd95bc9b81c08e70bb
                        origin: MARKETPLACE
                        links: []
                      - verb: USER_JOINED
                        timestamp:
                          - 2016
                          - 12
                          - 2
                          - 17
                          - 25
                          - 56
                          - 401
                        object:
                          id: 26
                          uuid: 222cf5ff-7795-4ece-b612-83ef6b72bb30
                          name: Company 6032459369
                          externalId: null
                          companyLinkMasked: false
                          type: COMPANY
                        subject:
                          id: 30
                          uuid: 8487f55b-05be-4c0e-97d8-021e5ca4008b
                          name: Susan Doe
                          email: susan.doe@company5087848592.com
                          externalId: null
                          activated: true
                          deleted: false
                          userRemovedFromCompanyObject: false
                          userRemovedFromCompanyTarget: false
                          personalInfoMasked: false
                          profileLinkMasked: false
                          type: USER
                        target:
                          id: 149379
                          uuid: 70904b87-a2bf-40fe-9de1-e8479776a26f
                          name: Global Company
                          externalId: null
                          companyLinkMasked: false
                          type: COMPANY
                        actor:
                          id: 1434
                          uuid: ac6216bb-bb4e-4766-8849-fd72eead20ce
                          name: Adam Smith
                          email: c3945627346@appdirect.com
                          externalId: null
                          activated: false
                          deleted: false
                          userRemovedFromCompanyObject: false
                          userRemovedFromCompanyTarget: false
                          personalInfoMasked: false
                          profileLinkMasked: false
                          roleChanges: null
                          type: USER
                        context:
                          description: Documentation Center 283
                          header: Documentation Center 283
                          imageUrl: >-
                            https://d33na3ni6eqf5j.cloudfront.net/importable_app_resources/81858cea-627f-45ee-8906-67d5a23dd3bf/list.png?b5960593b97c0fdd95bc9b81c08e70bb
                        origin: null
                        links: []
                    page:
                      size: 2
                      totalElements: 2
                      totalPages: 1
                      number: 0
        '401':
          description: Unauthorized
        '404':
          description: Company not found
      x-codeSamples:
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url 'https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/activities?displayType=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE'
        - lang: Node + Request
          source: |
            const request = require('request');

            const options = {
              method: 'GET',
              url: 'https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/activities',
              qs: {
                displayType: 'SOME_STRING_VALUE',
                page: 'SOME_INTEGER_VALUE',
                size: 'SOME_INTEGER_VALUE'
              }
            };

            request(options, function (error, response, body) {
              if (error) throw new Error(error);

              console.log(body);
            });
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/activities?displayType=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE")
              .get()
              .build();

            Response response = client.newCall(request).execute();
  /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 \
              --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');

            const options = {
              method: 'GET',
              url: 'https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D',
              qs: {
                includeCompanies: 'SOME_BOOLEAN_VALUE',
                includeUserCustomAttributes: 'SOME_BOOLEAN_VALUE'
              }
            };

            request(options, function (error, response, body) {
              if (error) throw new Error(error);

              console.log(body);
            });
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D?includeCompanies=SOME_BOOLEAN_VALUE&includeUserCustomAttributes=SOME_BOOLEAN_VALUE")
              .get()
              .build();

            Response 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 \
              --url https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D \
              --header 'content-type: application/json' \
              --data '{"enabled":true,"roles":["ROLE_BILLING_ADMIN","ROLE_DEVELOPER","ROLE_SYS_ADMIN"]}'
        - lang: Node + Request
          source: |
            const request = require('request');

            const options = {
              method: 'PUT',
              url: 'https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D',
              headers: {'content-type': 'application/json'},
              body: {
                enabled: true,
                roles: ['ROLE_BILLING_ADMIN', 'ROLE_DEVELOPER', 'ROLE_SYS_ADMIN']
              },
              json: true
            };

            request(options, function (error, response, body) {
              if (error) throw new Error(error);

              console.log(body);
            });
        - lang: Java + Okhttp
          source: >-
            OkHttpClient client = new OkHttpClient();


            MediaType mediaType = MediaType.parse("application/json");

            RequestBody body = RequestBody.create(mediaType,
            "{\"enabled\":true,\"roles\":[\"ROLE_BILLING_ADMIN\",\"ROLE_DEVELOPER\",\"ROLE_SYS_ADMIN\"]}");

            Request request = new Request.Builder()
              .url("https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D")
              .put(body)
              .addHeader("content-type", "application/json")
              .build();

            Response 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 \
              --url https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D
        - lang: Node + Request
          source: |
            const request = require('request');

            const options = {
              method: 'DELETE',
              url: 'https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D'
            };

            request(options, function (error, response, body) {
              if (error) throw new Error(error);

              console.log(body);
            });
        - lang: Java + Okhttp
          source: |-
            OkHttpClient client = new OkHttpClient();

            Request request = new Request.Builder()
              .url("https://marketplace.appdirect.com/api/account/v2/companies/%7BcompanyUuid%7D/memberships/%7BuserUuid%7D")
              .delete(null)
              .build();

            Response 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:
   

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