POST /clients

Create a Client

This endpoint allows you to create a Client.

A Client can be associated to one or more buildings.

Operation ID: createClient
lock This endpoint requires a Bearer token in the Authorization header.

Request Body

Content-Type: application/json · Required fields: name

name string required

Client name

Example: John Doe

code string | null

Client code

Example: CH0001

nif string | null

NIF/ VAT number of the Client

Example: 123456789

address string | null

Address of the Client

Example: abc

post_code string | null

Postal Code of the Client

Example: 1234-567

city string | null

City of the Client

Example: Lisbon

latitude number | null

Latitude of the Client

Example: -8.189341

longitude number | null

Longitude of the Client

Example: 5.1893312

observations string | null

Additional information

Example: abc

country string | null

Country of the Client. The value of this field must be compliant with the `ISO 3166-1 Alpha 2` standard, for country codes.

Example: PT

create_building boolean | null

Indicates if it should create a new building for the Client

Example:

local_id integer | null

Indicates the ID of the Building to replicate information from, when the 'create_building' field is set to true (Optional).

Example: 123

contacts array<integer>

A list of Contact IDs to associate with this Client.

operators array<integer>

A list of Operator IDs to associate with this Client.

Responses

data object

Client model structure details

id string required read-only

ID of the Client

Example: 123

type string required read-only

Model type

client

Example: client

attributes object required
client_id integer

ID of the Client

Example: 123

client_uuid string (uuid)

UUID of the Client

Example: e632afe8-a1bf-4702-b5bd-b1163861ba51

name string

Client Name

Example: John Doe

code string | null

Client Code

Example: JD

nif string | null

NIF/ VAT Number of the Client

Example: 1234566789

postal_code string | null

Postal Code of the Client

Example: 1234-567

city string | null

City of the Client

Example: Lisbon

observations string | null

Additional information

Example: abc

address string | null

Address of the Client

Example: abc

country string | null

Country of the Client

Example: PT

created_at string (date-time) read-only

The datetime of the creation of the Client

Example: 2020-12-03T12:45:00

updated_at string (date-time) read-only

The datetime of the last update of the Client

Example: 2020-12-03T12:45:00

has_handshake boolean

Indicates if this Client is "connected" to work on Infraspeak Network.

Example: 1

my_company boolean

Indicates whether it is the entity's default client

Example: 1

relationships object

The relationships of the Client (Only present when expanded in the request)

buildings object

The Buildings associated to the Client

contacts object

The Contacts associated to the Client

files object

The Files associated to the Client

profilePicture object

The profile picture of the the Client

operators object

The Operators associated to the Client

handshake object

The Handshake associated to the Client

status string
error
error object
properties object

Only present when related to property validation error

dev_message string

Example: Property validation error. Check the "properties" section in the response.

http_code integer
400
message string

Example: Property validation error.

more_info string
status string
error
error object
http_code integer
401
message string

Example: Authentication token invalid.

more_info string
status string
error
error object
http_code integer
429
message string

Example: Too Many Requests.

more_info string
status string
error
error object
http_code integer
500
message string

Example: An error has occurred during the request.

more_info string