-
Notifications
You must be signed in to change notification settings - Fork 8
Editable Company
Michael Rybintsev edited this page Aug 8, 2019
·
11 revisions
The Editable Company is a representation of Companies within Huddle that shows what properties can be edited and allows them to be updated.
A GET to this endpoint shows which properties are editable and provides a template for the PUT. The link for this can be found by retrieving the Company.
GET /people/companies/123/edit HTTP/1.1
Accept: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty
HTTP/1.1 200 OK
Content-Type: application/xml
<company>
<name>Huddle</name>
</company>
GET /people/companies/123/edit HTTP/1.1
Accept: application/vnd.huddle.data+json
Authorization: OAuth2 frootymcnooty/vonbootycherooty
HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+json
{
"name" : "Huddle"
}
Case | Response |
---|---|
401 Unauthorized | Invalid authorization token |
403 Forbidden | Actor is not Company Manager or Admin |
404 Not Found | Company does not exist |
A PUT to this endpoint will update the Company to the specified properties.
In this example we are updating the name of Company 123 to Huddle.
PUT /people/companies/123/edit HTTP/1.1
Accept: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty
<company>
<name>Huddle</name>
</company>
HTTP/1.1 200 OK
Content-Type: application/xml
<company>
<name>Huddle</name>
</company>
PUT /people/companies/123/edit HTTP/1.1
Accept: application/vnd.huddle.data+json
Content-Type: application/vnd.huddle.data+json
Authorization: OAuth2 frootymcnooty/vonbootycherooty
{
"name": "Huddle"
}
HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+json
{
"name" : "Huddle"
}
Case | Response |
---|---|
400 Bad Request | Name is not there or over 255 characters |
401 Unauthorized | Invalid authorization token |
403 Forbidden | Actor is not Company Manager or Admin |
404 Not Found | Company does not exist |
409 Conflict | Name is already in use |
- Basic concepts
-
Resources
- Actor
- Approvals
- BulkProcess
- Calendar
- Membership
- Company
- Document
- Document library settings
- Folder
- Paged Folder
- Pins
- Integrations
- Form
- Friends
- Invitation
- Link
- Document Lock
- Folder Lock
- Localisation
- MemberAutocomplete
- Notifications
- Offline item
- PeopleBulkProcess
- Permissions
- Presence
- PublishedDocuments
- Recents
- Recommendations
- Recycle Bin
- Search
- Share
- Tasks (Todos), File Requests, Approvals
- Tasks on Documents
- Actions
- UserApprovals
- User
- VersionHistory
- Workspace
- Workspaces
- SamlPartners
- Logout
- Impersonation
- Administration
- WebHooks