User To Company
The user to company resource.
Basehttps://rest.carbon.ms/userToCompany
GET
/userToCompanyList user to companys
Retrieve a paginated list of user to companys. Filter, order, and select columns with PostgREST query parameters.
Query parameters
selectstringComma-separated columns to return. Defaults to all.
orderstringColumn to sort by, e.g. `createdAt.desc`.
limitintegerMaximum rows to return.
offsetintegerRows to skip, for pagination.
GEThttps://rest.carbon.ms/userToCompany
curl --request GET \
--url 'https://rest.carbon.ms/userToCompany?select=*&limit=10' \
--header 'Authorization: Bearer <api-key>'Response
[
{
"userId": "xyz789",
"companyId": "xyz789",
"role": "string"
}
]GET
/userToCompanyRetrieve a user to company
Fetch a single user to company by filtering on `userId`.
Query parameters
userIdstringMatch on the user to company's `userId`, e.g. `eq.{id}`.
GEThttps://rest.carbon.ms/userToCompany
curl --request GET \
--url 'https://rest.carbon.ms/userToCompany?userId=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'Response
{
"userId": "xyz789",
"companyId": "xyz789",
"role": "string"
}POST
/userToCompanyCreate a user to company
Create a new user to company.
Body parameters
rolestringrequiredPOSThttps://rest.carbon.ms/userToCompany
curl --request POST \
--url https://rest.carbon.ms/userToCompany \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"role":"string"}'Response
{
"userId": "xyz789",
"companyId": "xyz789",
"role": "string"
}PATCH
/userToCompanyUpdate a user to company
Update an existing user to company, matched on `userId`.
Body parameters
rolestringrequiredPATCHhttps://rest.carbon.ms/userToCompany
curl --request PATCH \
--url 'https://rest.carbon.ms/userToCompany?userId=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"role":"string"}'Response
{
"userId": "xyz789",
"companyId": "xyz789",
"role": "string"
}DELETE
/userToCompanyDelete a user to company
Delete a user to company, matched on `userId`. Returns 204 No Content.
Query parameters
userIdstringThe `userId` of the user to company to delete, e.g. `eq.{id}`.
DELETEhttps://rest.carbon.ms/userToCompany
curl --request DELETE \
--url 'https://rest.carbon.ms/userToCompany?userId=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'204 No Content