This endpoint allows users to create a new tenant. Upon successful creation of a tenant, several related endpoints for managing locations under that tenant are available.
Once a tenant is created, the following endpoints can be utilized to manage locations associated with that tenant:
-
List Locations
-
GET {{url}}/tenants/{tenant_id}/locations
-
Description: Retrieves a list of all locations associated with the specified tenant.
-
Create Location
-
POST {{url}}/tenants/{tenant_id}/locations
-
Description: Creates a new location for the specified tenant.
-
Get Single Location
-
GET {{url}}/tenants/{tenant_id}/locations/{id}
-
Description: Retrieves details of a specific location associated with the specified tenant.
-
Update Location
-
PUT {{url}}/tenants/{tenant_id}/locations/{id}
-
Description: Updates the details of a specific location associated with the specified tenant.
-
Delete Location
-
DELETE {{url}}/tenants/{tenant_id}/locations/{id}
-
Description: Deletes a specific location associated with the specified tenant.
Request Body
The request body for creating a tenant should include the necessary parameters to define the tenant’s details. The parameters are as follows:
-
name (string): The name of the tenant.
-
display_name (string, optional): A display name for the tenant.
-
description (string, optional): A description of the tenant.
Response
Upon successful creation of a tenant, the response will confirm the creation and may include details of the newly created tenant. The response structure is as follows:
-
data (array): An array containing the tenant information.
-
type (string): The type of resource.
-
id (string): The unique identifier of the tenant.
-
attributes (object): An object containing the tenant’s attributes.
-
name (string): The name of the tenant.
-
display_name (string, optional): The display name of the tenant.
-
description (string, optional): The description of the tenant.
-
relationships (object): An object detailing the relationships associated with the tenant.
-
created_by (object): Information about the user who created the tenant.
-
user (array): An array containing user details.
-
type (string): The type of user.
-
id (string): The unique identifier of the user.
-
attributes (object): An object containing user attributes.
-
first_name (string): The first name of the user.
-
last_name (string): The last name of the user.
-
email (string): The email of the user.
-
created_at (string): The timestamp when the tenant was created.
-
updated_by (object): Information about the user who last updated the tenant.
-
user (array): An array containing user details.
-
type (string): The type of user.
-
id (string): The unique identifier of the user.
-
attributes (object): An object containing user attributes.
-
first_name (string): The first name of the user.
-
last_name (string): The last name of the user.
-
email (string): The email of the user.
-
updated_at (string): The timestamp when the tenant was last updated.
-
locations (array): An array containing the locations associated with the tenant.
-
type (string): The type of location.
-
id (string): The unique identifier of the location.
-
attributes (object): An object containing location attributes.
-
name (string): The name of the location.
-
display_name (string, optional): The display name of the location.
-
description (string, optional): The description of the location.
-
address1 (string, optional): The first address line.
-
address2 (string, optional): The second address line.
-
city (string, optional): The city of the location.
-
state (string, optional): The state of the location.
-
zipcode (string, optional): The postal code of the location.
-
country (string, optional): The country of the location.
-
phone (string, optional): The phone number of the location.
-
website (string, optional): The website of the location.
-
relationships (object): An object detailing the relationships associated with the location.
-
created_by (object): Information about the user who created the location.
- user (array): An array containing user details.
-
updated_by (object): Information about the user who last updated the location.
- user (array): An array containing user details.
This endpoint is essential for setting up a new tenant and managing its locations effectively.
This endpoint allows users to create a new tenant. Upon successful creation of a tenant, several related endpoints for managing locations under that tenant are available.
Once a tenant is created, the following endpoints can be utilized to manage locations associated with that tenant:
- List Locations
-
GET {{url}}/tenants/{tenant_id}/locations
-
Description: Retrieves a list of all locations associated with the specified tenant.
- Create Location
-
POST {{url}}/tenants/{tenant_id}/locations
-
Description: Creates a new location for the specified tenant.
- Get Single Location
-
GET {{url}}/tenants/{tenant_id}/locations/{id}
-
Description: Retrieves details of a specific location associated with the specified tenant.
- Update Location
-
PUT {{url}}/tenants/{tenant_id}/locations/{id}
-
Description: Updates the details of a specific location associated with the specified tenant.
- Delete Location
-
DELETE {{url}}/tenants/{tenant_id}/locations/{id}
-
Description: Deletes a specific location associated with the specified tenant.
Request Body
The request body for creating a tenant should include the necessary parameters to define the tenant’s details.
Response
Upon successful creation of a tenant, the response will confirm the creation and may include details of the newly created tenant.
This endpoint is essential for setting up a new tenant and managing its locations effectively.