Download OpenAPI specification:Download
API documentation for OrganizationService default adapter.
{- "status": "ok",
- "packageInfo": {
- "gitCommitHash": "82fc145",
- "sdkVersion": "3.2.0",
- "serviceAdapterAPIVersion": "^3.5.0",
- "serviceName": "@basaldev/blocks-organization-service",
- "serviceVersion": "3.0.0"
}
}
Retrieve the organization list
This operation requires
- valid Authorization token has been specified
- Authorization token have super user permission
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$expand | string Expands and returns related data to a field. The expand parameter allows clients to request related resources in a single request. The expand parameter value is a comma-separated list of related resources to include in the response. The expand parameter supports the following fields:
| |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data |
{- "total": 100,
- "count": 100,
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "name": "アドム法律事務所",
- "typeId": "010",
- "description": "アドム法律事務所",
- "branchName": "世田谷本社",
- "pictureUrl": "xxxx.com/yyyyy",
- "postalCode": "1500000",
- "addressLine1": "東京都",
- "addressLine2": "世田谷区",
- "addressLine3": "松原2丁目",
- "certificateImageUri": "xxxx.com/yyyyy",
- "iconImageUri": "xxxx.com/yyyyy",
- "logoImageUri": "xxxx.com/yyyyy",
- "phoneNumber": "09011111111",
- "size": "100~200",
- "numberOfProjects": "100",
- "certifiedQualifications": [
- {
- "name": "notificationNumber",
- "value": "1212-x-12121-yyyy",
- "status": "valid"
}
], - "qualifications": [
- {
- "name": "notificationNumber",
- "value": "1212-x-12121-yyyy",
- "status": "valid"
}
], - "status": "normal",
- "auditStatus": "waiting_for_review",
- "reviewStats": {
- "averageRate": 4.3,
- "averageSubRates": {
- "quality": 4.9,
- "price": 3.23,
- "delivery": 4.1
}, - "totalCount": 34
}, - "ancestorIds": [
- "0123456789ab0123456789ab"
], - "ancestorNamePath": ",Parent,アドム法律事務所,",
- "childrenCount": 0,
- "depth": 1,
- "parentId": "0123456789ab0123456789ab",
- "customFields": {
- "twitter": "@AdamLaw"
}, - "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
]
}
Create an organization
This operation requires
- Authorization token has been specified
- Authorization token have super user permission or
- userId inside Authorization token equals the ownerId in the request body
- userId inside Authorization token has emailVerified
- userId inside Authorization token has typeId=010
name required | string (organizationName.field) <= 256 characters The organization's name. |
typeId required | string (organizationTypeId.field) Enum: "010" "011" Type code of the organization
|
ownerId required | string Owner of the organization (associated with user-service user.id field) If the user is a system admin, this field is optional |
parentId | string (objectId.field) ^[0-9a-z]{24}$ The parent organization ID. When this is null, the organization is a root organization. This can only be configured if the user is a system admin Organizations that have users cannot be made parents. |
description | string (organizationDescription.field) Detailed description of the organization. |
branchName | string (organizationBranchName.field) The specific branch this organization represents. |
pictureUrl | string <uri> (uri.field) A URI for a resource |
postalCode | string (organizationPostalCode.field) |
addressLine1 | string (organizationAddressLine1.field) |
addressLine2 | string (organizationAddressLine2.field) |
addressLine3 | string (organizationAddressLine3.field) |
certificateImageData | string (imageData.field) A Base64 string containing image data. |
iconImageData | string (imageData.field) A Base64 string containing image data. |
phoneNumber | string (organizationPhoneNumber.field) Contact number for the organization. |
size | string (organizationSize.field) Scope of the organization (employee count) |
numberOfProjects | string (organizationNumberOfProjects.field) |
url | string (organizationUrl.field) <= 256 characters The organization's website URL. |
Array of objects (qualification.field) Qualifications that need to be reviewed to change | |
Array of objects (qualification.field) Qualification that user can change without review | |
customFields | object (customFields.field) Custom fields added to the |
{- "name": "アドム法律事務所",
- "typeId": "010",
- "ownerId": "a123123",
- "parentId": "b012345",
- "description": "アドム法律事務所",
- "branchName": "世田谷本社",
- "pictureUrl": "string",
- "postalCode": "1500000",
- "addressLine1": "東京都",
- "phoneNumber": "09011111111",
- "size": "100~200",
- "numberOfProjects": "100",
- "certifiedQualifications": [
- {
- "name": "notificationNumber",
- "value": "1212-x-12121-yyyy",
- "status": "valid"
}
], - "qualifications": [
- {
- "name": "license",
- "value": "",
- "status": "valid"
}
], - "customFields": {
- "twitter": "@AdamLaw"
}
}
{- "id": "0123456789ab0123456789ab",
- "name": "アドム法律事務所",
- "typeId": "010",
- "description": "アドム法律事務所",
- "branchName": "世田谷本社",
- "pictureUrl": "xxxx.com/yyyyy",
- "postalCode": "1500000",
- "addressLine1": "東京都",
- "addressLine2": "世田谷区",
- "addressLine3": "松原2丁目",
- "certificateImageUri": "xxxx.com/yyyyy",
- "iconImageUri": "xxxx.com/yyyyy",
- "logoImageUri": "xxxx.com/yyyyy",
- "phoneNumber": "09011111111",
- "size": "100~200",
- "numberOfProjects": "100",
- "certifiedQualifications": [
- {
- "name": "notificationNumber",
- "value": "1212-x-12121-yyyy",
- "status": "valid"
}
], - "qualifications": [
- {
- "name": "notificationNumber",
- "value": "1212-x-12121-yyyy",
- "status": "valid"
}
], - "status": "normal",
- "auditStatus": "waiting_for_review",
- "reviewStats": {
- "averageRate": 4.3,
- "averageSubRates": {
- "quality": 4.9,
- "price": 3.23,
- "delivery": 4.1
}, - "totalCount": 34
}, - "ancestorIds": [
- "0123456789ab0123456789ab"
], - "ancestorNamePath": ",Parent,アドム法律事務所,",
- "childrenCount": 0,
- "depth": 1,
- "parentId": "0123456789ab0123456789ab",
- "customFields": {
- "twitter": "@AdamLaw"
}, - "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
Retrieve information of the organization with the matching organization ID.
This operation requires
- Authorization token is a valid token
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
$expand | string Expands and returns related data to a field. The expand parameter allows clients to request related resources in a single request. The expand parameter value is a comma-separated list of related resources to include in the response. The expand parameter supports the following fields:
|
{- "id": "0123456789ab0123456789ab",
- "name": "アドム法律事務所",
- "typeId": "010",
- "description": "アドム法律事務所",
- "branchName": "世田谷本社",
- "pictureUrl": "xxxx.com/yyyyy",
- "postalCode": "1500000",
- "addressLine1": "東京都",
- "addressLine2": "世田谷区",
- "addressLine3": "松原2丁目",
- "certificateImageUri": "xxxx.com/yyyyy",
- "iconImageUri": "xxxx.com/yyyyy",
- "logoImageUri": "xxxx.com/yyyyy",
- "phoneNumber": "09011111111",
- "size": "100~200",
- "numberOfProjects": "100",
- "certifiedQualifications": [
- {
- "name": "notificationNumber",
- "value": "1212-x-12121-yyyy",
- "status": "valid"
}
], - "qualifications": [
- {
- "name": "notificationNumber",
- "value": "1212-x-12121-yyyy",
- "status": "valid"
}
], - "status": "normal",
- "auditStatus": "waiting_for_review",
- "reviewStats": {
- "averageRate": 4.3,
- "averageSubRates": {
- "quality": 4.9,
- "price": 3.23,
- "delivery": 4.1
}, - "totalCount": 34
}, - "ancestorIds": [
- "0123456789ab0123456789ab"
], - "ancestorNamePath": ",Parent,アドム法律事務所,",
- "childrenCount": 0,
- "depth": 1,
- "parentId": "0123456789ab0123456789ab",
- "customFields": {
- "twitter": "@AdamLaw"
}, - "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
Update organization's information of given organization ID
This operation requires
- valid Authorization token has been specified
- Authorization token have super user permission or
- userId inside Authorization token has owner or admin role in the organization
- userId inside Authorization token has emailVerified
- if status / auditStatus is updated, then Authorization token has to have super user permission
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
parentId | string (objectId.field) ^[0-9a-z]{24}$ The parent organization ID. When this is null, the organization is a root organization. This can only be configured if the user is a system admin. Organizations that have users cannot be made parents. |
description | string (organizationDescription.field) Detailed description of the organization. |
pictureUrl | string <uri> (uri.field) A URI for a resource |
phoneNumber | string (organizationPhoneNumber.field) Contact number for the organization. |
size | string (organizationSize.field) Scope of the organization (employee count) |
numberOfProjects | string (organizationNumberOfProjects.field) |
Array of objects (Qualification) | |
iconImageData | string (imageData.field) A Base64 string containing image data. |
logoImageData | string (imageData.field) A Base64 string containing image data. |
url | string (organizationUrl.field) <= 256 characters The organization's website URL. |
customFields | object (customFields.field) Custom fields added to the |
{- "description": "アドム法律事務所",
- "branchName": "世田谷本社",
- "pictureUrl": "string",
- "postalCode": "1500000",
- "addressLine1": "東京都世田谷区松原2丁目",
- "phoneNumber": "09011111111",
- "size": "100~200",
- "numberOfProjects": "100",
- "customFields": {
- "twitter": "@AdamLaw"
}
}
{- "id": "0123456789ab0123456789ab",
- "name": "アドム法律事務所",
- "typeId": "010",
- "description": "アドム法律事務所",
- "branchName": "世田谷本社",
- "pictureUrl": "xxxx.com/yyyyy",
- "postalCode": "1500000",
- "addressLine1": "東京都",
- "addressLine2": "世田谷区",
- "addressLine3": "松原2丁目",
- "certificateImageUri": "xxxx.com/yyyyy",
- "iconImageUri": "xxxx.com/yyyyy",
- "logoImageUri": "xxxx.com/yyyyy",
- "phoneNumber": "09011111111",
- "size": "100~200",
- "numberOfProjects": "100",
- "certifiedQualifications": [
- {
- "name": "notificationNumber",
- "value": "1212-x-12121-yyyy",
- "status": "valid"
}
], - "qualifications": [
- {
- "name": "notificationNumber",
- "value": "1212-x-12121-yyyy",
- "status": "valid"
}
], - "status": "normal",
- "auditStatus": "waiting_for_review",
- "reviewStats": {
- "averageRate": 4.3,
- "averageSubRates": {
- "quality": 4.9,
- "price": 3.23,
- "delivery": 4.1
}, - "totalCount": 34
}, - "ancestorIds": [
- "0123456789ab0123456789ab"
], - "ancestorNamePath": ",Parent,アドム法律事務所,",
- "childrenCount": 0,
- "depth": 1,
- "parentId": "0123456789ab0123456789ab",
- "customFields": {
- "twitter": "@AdamLaw"
}, - "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
Delete organization of giving organization ID
This operation requires
- Authorization token has been specified
- Authorization token have super user permission or
- userId inside Authorization token has emailVerified
- userId inside Authorization token has owner role in the organization
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
{- "error": {
- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- {
- "code": "string",
- "target": "string",
- "message": "string"
}
]
}
}
Use this API to request some changes to organization information, for example:
This operation requires
- valid Authorization token has been specified
- Authorization token have super user permission or
- userId inside Authorization token have owner role in the organization
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
name | string (organizationName.field) <= 256 characters The organization's name. |
typeId | string (organizationTypeId.field) Enum: "010" "011" Type code of the organization
|
branchName | string (organizationBranchName.field) The specific branch this organization represents. |
postalCode | string (organizationPostalCode.field) |
addressLine1 | string (organizationAddressLine1.field) |
addressLine2 | string (organizationAddressLine2.field) |
addressLine3 | string (organizationAddressLine3.field) |
certificateImageData | string (imageData.field) A Base64 string containing image data. |
Array of objects (Qualification) Qualifications that need to be reviewed to change |
{- "name": "アドム法律事務所",
- "typeId": "010",
- "postalCode": "1510053",
- "branchName": "東京営業所",
- "addressLine1": "addressLine1",
- "certifiedQualifications": [
- {
- "name": "notificationNumber",
- "value": "1212-x-12121-yyyy",
- "status": "valid"
}
]
}
{- "error": {
- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- {
- "code": "string",
- "target": "string",
- "message": "string"
}
]
}
}
Get the change requests list of the organizations. Ordered by updated timestamp, desc
This operation requires
- valid Authorization token has been specified
- Authorization token have super user permission or
- userId inside Authorization token have owner role in the organization
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$orderBy | string Return sorted items based on property values. It can contain a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property. Examples:
| |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip |
{- "total": 100,
- "count": 100,
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "orgId": "0123456789ab0123456789ab",
- "userId": "0123456789ab0123456789ab",
- "name": "アドム法律事務所",
- "typeId": "010",
- "postalCode": "1500000",
- "branchName": "世田谷本社",
- "addressLine1": "東京都",
- "addressLine2": "世田谷区",
- "addressLine3": "松原2丁目",
- "certificateImageUri": "xxxx.com/yyyyy",
- "certifiedQualifications": [
- {
- "name": "notificationNumber",
- "value": "1212-x-12121-yyyy",
- "status": "valid"
}
]
}
]
}
Get users and their roles under the organization.
This operation requires
- valid Authorization token has been specified in request header
- Authorization token have super user permission or
- userId inside Authorization token has owner role in the organization
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
$top | integer number of object want to fetch |
$skip | integer number of object want to skip |
{- "total": 100,
- "count": 100,
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "role": "owner"
}
]
}
Specify a list of userIds and roles in the body.
If userIds exist then update the role. If userIds do not exist then add to the organization. Does not remove user roles.
This operation requires
- valid Authorization token has been specified in request header
- Authorization token have super user permission or
- userId inside Authorization token has owner role in the organization
This operation cannot be performed if an organization has a child organization.
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
id required | string (objectId.field) ^[0-9a-z]{24}$ A 24 character hexadecimal string value. |
role required | string (userRole.field) Enum: "owner" "admin" "member" "guest" Role of the user for this organization. Many apis are restricted to owner users only. |
[- {
- "id": "0123456789ab0123456789ab",
- "role": "owner"
}
]
{- "error": {
- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- {
- "code": "string",
- "target": "string",
- "message": "string"
}
]
}
}
Remove user's role of the organization
This operation requires
- valid Authorization token has been specified in request header
- Authorization token have super user permission or
- userId inside Authorization token has owner role in the organization
- user is not removing the last owner of the organization
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
userId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for a user |
{- "error": {
- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- {
- "code": "string",
- "target": "string",
- "message": "string"
}
]
}
}
Get user role in the organization
This operation requires
- valid Authorization token has been specified in request header
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
userId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for a user |
{- "role": "owner"
}
Get the organizations which a user is invited to.
This operation requires
- valid Authorization token has been specified
- Authorization token have super user permission or
- userId inside Authorization token equals the userId in the request path
userId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for a user |
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
roles | string roles of user in organization, comma separated | |||||||||||||||||||||||||||||||||
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$orderBy | string Return sorted items based on property values. It can contain a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property. Examples:
| |||||||||||||||||||||||||||||||||
$expand | string Expands and returns related data to a field. The expand parameter allows clients to request related resources in a single request. The expand parameter value is a comma-separated list of related resources to include in the response. The expand parameter supports the following fields:
| |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data |
{- "total": 100,
- "count": 100,
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "name": "アドム法律事務所",
- "typeId": "010",
- "description": "アドム法律事務所",
- "branchName": "世田谷本社",
- "pictureUrl": "xxxx.com/yyyyy",
- "postalCode": "1500000",
- "addressLine1": "東京都",
- "addressLine2": "世田谷区",
- "addressLine3": "松原2丁目",
- "certificateImageUri": "xxxx.com/yyyyy",
- "iconImageUri": "xxxx.com/yyyyy",
- "logoImageUri": "xxxx.com/yyyyy",
- "phoneNumber": "09011111111",
- "size": "100~200",
- "numberOfProjects": "100",
- "certifiedQualifications": [
- {
- "name": "notificationNumber",
- "value": "1212-x-12121-yyyy",
- "status": "valid"
}
], - "qualifications": [
- {
- "name": "notificationNumber",
- "value": "1212-x-12121-yyyy",
- "status": "valid"
}
], - "status": "normal",
- "auditStatus": "waiting_for_review",
- "reviewStats": {
- "averageRate": 4.3,
- "averageSubRates": {
- "quality": 4.9,
- "price": 3.23,
- "delivery": 4.1
}, - "totalCount": 34
}, - "ancestorIds": [
- "0123456789ab0123456789ab"
], - "ancestorNamePath": ",Parent,アドム法律事務所,",
- "childrenCount": 0,
- "depth": 1,
- "parentId": "0123456789ab0123456789ab",
- "customFields": {
- "twitter": "@AdamLaw"
}, - "createdAt": "2023-01-01T00:00:00.000Z",
- "updatedAt": "2023-01-01T00:00:00.000Z"
}
]
}
Create an organization attachment
This operation requires
- valid Authorization token has been specified in request header
- Authorization token have super user permission or
- userId inside Authorization token belongs to the organization
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
objectId required | string (objectId.field) ^[0-9a-z]{24}$ A 24 character hexadecimal string value. |
type required | string (attachmentType.field) The file type of the attachment |
[- {
- "objectId": "0123456789ab0123456789ab",
- "type": "jpg"
}
]
{- "id": "0123456789ab0123456789ab",
- "orgId": "0123456789ab0123456789ab",
- "ownerId": "0123456789ab0123456789ab",
- "ownerType": "organization",
- "isPublic": false,
- "type": "jpg",
- "url": "xxxx.com/yyyyy"
}
Get list of organization attachment
This operation requires
- valid Authorization token has been specified in request header
- Authorization token have super user permission or
- userId inside Authorization token belongs to the organization
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$orderBy | string Return sorted items based on property values. It can contain a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property. Examples:
| |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip |
{- "total": 100,
- "count": 100,
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "orgId": "0123456789ab0123456789ab",
- "ownerId": "0123456789ab0123456789ab",
- "ownerType": "organization",
- "isPublic": false,
- "type": "jpg",
- "url": "xxxx.com/yyyyy"
}
]
}
Get an organization attachment
This operation requires
- valid Authorization token has been specified in request header
- Authorization token have super user permission or
- userId inside Authorization token belongs to the organization
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
attachmentId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an attachment. |
{- "id": "0123456789ab0123456789ab",
- "orgId": "0123456789ab0123456789ab",
- "ownerId": "0123456789ab0123456789ab",
- "ownerType": "organization",
- "isPublic": false,
- "type": "jpg",
- "url": "xxxx.com/yyyyy"
}
Delete an organization attachment
This operation requires
- valid Authorization token has been specified in request header
- Authorization token have super user permission or
- userId inside Authorization token belongs to the organization
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
attachmentId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an attachment. |
{- "error": {
- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- {
- "code": "string",
- "target": "string",
- "message": "string"
}
]
}
}
Retrieves a list of attachment upload url. You need to specify a content length, and content type of the files you would like to upload After getting the upload url, you can upload the file to the url with PUT method, and the file will be uploaded to the cloud storage. After uploading the file, you need to call the create attachment api to create the attachment.
Note that the file you upload later must much the content length and content type you specified in the query.
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
contentLength required | number Example: contentLength=100000 The contentLength of the object to upload |
contentType required | string Example: contentType=image/png The contentType of the object to upload |
{- "id": "0123456789ab0123456789ab",
- "orgId": "0123456789ab0123456789ab",
- "ownerId": "0123456789ab0123456789ab",
- "ownerType": "organization",
- "isPublic": false,
- "type": "jpg",
- "url": "xxxx.com/yyyyy"
}
Check if user exist in the organization
This operation requires
- valid Authorization token has been specified in request header
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
userId required | string UserId |
{- "isUserInOrg": true
}
Follow a organization
This API is used to follow a organization. By passing the id in the body, the organization on the path will be followed.
Required
- followerId and followerType must be specified in the request body
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
followerId | string (objectId.field) ^[0-9a-z]{24}$ A 24 character hexadecimal string value. |
followerType | string (followerType.field) Enum: "organization" "user" The type of entity that is following |
{- "followerId": "0123456789ab0123456789ab",
- "followerType": "organization"
}
{- "error": {
- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- {
- "code": "string",
- "target": "string",
- "message": "string"
}
]
}
}
Unfollow a organization
This API is used to unfollow a organization. By passing the id in the body, the organization on the path will be unfollowed.
Required
- followerId and followerType must be specified in the request body
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
followerId | string (objectId.field) ^[0-9a-z]{24}$ A 24 character hexadecimal string value. |
followerType | string (followerType.field) Enum: "organization" "user" The type of entity that is following |
{- "followerId": "0123456789ab0123456789ab",
- "followerType": "organization"
}
{- "error": {
- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- {
- "code": "string",
- "target": "string",
- "message": "string"
}
]
}
}
Get organization follower list
Validations
- valid Authorization token have been specified in the request header
- Authorization token is super user token or a system internal token
orgId required | string^[0-9a-z]{24}$ Example: 0123456789ab0123456789ab A unique identifier for an organization. |
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$orderBy | string Return sorted items based on property values. It can contain a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property. Examples:
| |||||||||||||||||||||||||||||||||
type required | string Enum: "user" "organization" "product" Type of follower/follows to list |
{- "total": 100,
- "count": 100,
- "value": [
- {
- "followId": "0123456789ab0123456789ab",
- "followType": "organization",
- "followerId": "0123456789ab0123456789ab",
- "followerType": "organization"
}
]
}
Get the list of follow for organization by followerId
This API gets a list of organizations that are being followed by an entity.
For example, this can be used to fetch all organizations that are being followed by user
Validations
- valid Authorization token have been specified in the request header
Required
- followerId must be specified in the query
- type must be specified in the query
followerId required | string follower id can be userId | |||||||||||||||||||||||||||||||||
type required | string Enum: "user" "organization" "product" Type of follower/follows to list | |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$orderBy | string Return sorted items based on property values. It can contain a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property. Examples:
| |||||||||||||||||||||||||||||||||
type required | string Enum: "user" "organization" "product" Type of follower/follows to list |
{- "total": 100,
- "count": 100,
- "value": [
- {
- "followId": "0123456789ab0123456789ab",
- "followType": "organization",
- "followerId": "0123456789ab0123456789ab",
- "followerType": "organization"
}
]
}