CompanyMemberships

Enable/Disable company membership

Changed on

Enable or disable marketplace user's company membership.

This only changes the user company membership's enabled status; all other attributes are ignored.

patch/account/v2/companies/{companyUuid}/memberships/{userUuid}

Request

Path parameters

companyUuidstring required

Unique identifier of company in the API request

userUuidstring required

Unique identifier of user in the API request

Request body

enabledboolean

Indicates whether membership is enabled

Example request

{
  "enabled": true
}

Response

Success

enabledboolean

Is this membership enabled

lastUsedboolean

Is this company membership last used by user accessing the UI

metadataobject
positionstring nullable

User position (also referred to as "Title" in UI User Settings

rolesstring[]

Roles for this membership. One or more of the following: 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). For user roles (not associated with membership), see UserAccountV2.

Example response

{
  "content": [
    {
      "company": {
        "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": [
          {
            "href": "http://appdirect/api/account/v2/companies/97e573e2-1d11-4df4-8071-da1006509493",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/companies/97e573e2-1d11-4df4-8071-da1006509493/memberships",
            "rel": "memberships"
          }
        ],
        "name": "Company 1040203757",
        "phoneNumber": "9259221234",
        "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
        "uuid": "97e573e2-1d11-4df4-8071-da1006509493",
        "vendor": false
      },
      "enabled": true,
      "lastUsed": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/97e573e2-1d11-4df4-8071-da1006509493/memberships/dcf7b936-c01f-4c98-b349-dae4769ff754",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/users/dcf7b936-c01f-4c98-b349-dae4769ff754",
          "rel": "user"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/97e573e2-1d11-4df4-8071-da1006509493",
          "rel": "company"
        }
      ],
      "position": "Business Analyst",
      "mosiUser": {
        "username": "adazuretest@sdasd21321.onmicrosoft.com"
      },
      "metadata": {
        "mosi_username": "adazuretest@sdasd21321.onmicrosoft.com"
      },
      "roles": [
        "ROLE_BILLING_ADMIN",
        "ROLE_SYS_ADMIN"
      ],
      "user": {
        "activated": true,
        "allowLogin": true,
        "boostUser": {
          "apsUid": "murnu8w"
        },
        "email": "jane.lee@company1151609035.com",
        "firstName": "Jane",
        "lastName": "Lee",
        "ldapId": "1",
        "currency": null,
        "customAttributes": [
          {
            "attributeType": "TEXT",
            "hint": "commission_hint",
            "label": "Commission_Payout_ID",
            "name": "C5125859",
            "value": "value"
          }
        ],
        "links": [
          {
            "href": "http://appdirect/api/account/v2/users/dcf7b936-c01f-4c98-b349-dae4769ff754",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/users/dcf7b936-c01f-4c98-b349-dae4769ff754/memberships",
            "rel": "memberships"
          }
        ],
        "metadata": {
          "apsUid": "murnu8w"
        },
        "picture": "http://appdirect/profilePics/img2147417701652580695.png?184b58e358f087154d94329f9000b28a",
        "roles": [
          "ROLE_USER"
        ],
        "userName": "jane.lee",
        "uuid": "dcf7b936-c01f-4c98-b349-dae4769ff754"
      }
    }
  ],
  "links": []
}

Changes

    • breaking

      the request's body type changed from no type to object

    • breaking

      removed the media type */* for the response with the status

    • info

      added the new optional request property

    • info

      added the non-success response with the status