Create a Location

post/locations/v1beta1/locations

Create a location and store its associated information.

SecurityBearer
Request
Request Body schema: application/json
required

Location Information

required
Array of objects (server.CreateAddressNBRequest)
required
Array of objects (server.CreateContactsNBRequest)
description
string

Optionally, provide a long description of the location.

expiredAt
string

Date the location expired.

name
required
string <= 100 characters

Provide a descriptive name for the location.

locationType
string (db.LocationType)

Type of location.

Value: "building"
validated
boolean
Default: true

Boolean confirming if the location has been validated or not.

validatedAt
string

The date the location was validated in the format mm-dd-yyyy.

validatedByEmail
string

Email address of the workspace user that validated the location.

validatedByName
string

The name of the the workspace user that validated the location.

validationCycle
string (db.ValidationCycle)

An integer in months that defines how long the location remains validated.

Enum: "" "6" "12" "18"
validationExpired
boolean
Default: false

A Boolean confirming if the location validation has expired or not.

Responses
200

OK

400

Bad request

404

Not found

500

Internal server error

Request samples
application/json
{
  • "addresses": [
    ],
  • "contacts": [
    ],
  • "description": "string",
  • "expiredAt": "string",
  • "name": "string",
  • "locationType": "building",
  • "validated": true,
  • "validatedAt": "string",
  • "validatedByEmail": "string",
  • "validatedByName": "string",
  • "validationCycle": "",
  • "validationExpired": false
}
Response samples
application/json
{
  • "addresses": [
    ],
  • "contacts": [
    ],
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "locationType": "building",
  • "createdAt": "string",
  • "description": "string",
  • "expiredAt": "string",
  • "generation": 0,
  • "type": "locations/external-service",
  • "updatedAt": "string",
  • "validated": true,
  • "validatedAt": "string",
  • "validatedByEmail": "string",
  • "validatedByName": "string",
  • "validationCycle": "",
  • "validationExpired": false
}