CompanyMemberships
Enable/Disable company membership
Changed onEnable 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
- Base URLhttps://marketplace.appdirect.com/api
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
companyUuidstring required
Unique identifier of company in the API request
userUuidstring required
Unique identifier of user in the API request
Request body
Example request
{
"enabled": true
}Response
Success
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
- breaking