Field Name | Unique? | Validation |
---|---|---|
name | ^[a-zA-Z0-9_. ]+$ | |
slug | ✔ | ^[a-z0-9_-]+$ |
contact_number | ^.+$ | |
contact_email | ^.+$ | |
address | ^.+$ | |
lat | ||
long | ||
description | ||
url | ||
vehicle_cost | ||
vehicle_cost_type | ||
currency | ||
order_booking_results_by | ||
booking_tolerance |
Resource | 1-to-1 | 1-to-many | many-to-1 | many-to-many |
---|---|---|---|---|
user | ✔ | |||
branch | ✔ | |||
cost-centre | ✔ |
Retrieves a list of active companies. If the user has either admin or keaz permissions, all active companies are returned. Otherwise, only companies of which the user is a member are returned.
Returns a single company hash.
Operation: GET /company/1
Intent: get information for company 1
Status: 200 OK
Response body: { COMPANY HASH }
Create a new company resource. The user which creates the company will become associated to it.
Update a company resource.
Deletes a company resource.
Checks the membership of a user within a company. The response status code indicates the result of this check. If the user is a member of the company, a 200 OK status is returned, otherwise a 404 Not Found will be raised.
Operation: GET /company/1/user/2
Intent: is user 2 a member of company 1
Status: 404 Not Found
Add a user to a company.
Delete a user from a company.
Check the membership of a branch within a company.
Add a branch to a company.
Remove a branch from a company.
Gets a single asset for the company - the asset with a tag of TAG.
Returns all assets for a company.
Adds an asset to a company.
Return a list of the company’s bookings.
Return one email template from the company.
Return all email templates that belong to the company.
Add new email template for the company.