> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.aurasos.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.aurasos.com/_mcp/server.

# Create fixed location

POST https://staging-panic.aura.services/panic-api/v2/predefinedLocations
Content-Type: application/json

Creates a Fixed Location that can later be used to create Fixed Location callouts. Payload fields retain the API's predefined-location naming.

Supply both `latitude` and `longitude` unless AURA has enabled address geocoding for your integration. When enabled, omit both keys and send a nonblank `formattedAddress`. Geocoding is a fallback only when coordinates are unavailable and does not guarantee the correct site location; verify the returned coordinates. See the Fixed Locations guide on docs.aurasos.com for details.

Send `installerIdentifier` to create the site against one of your installers; omit it to create it against your own customer source. Ownership is fixed at creation and cannot be changed afterwards, so a site is moved between installers by deleting it and creating it under the new owner.

If AURA has configured your account to assign unmatched installers to you, an `installerIdentifier` that matches none of your installers creates the site against your own customer source instead of being rejected. This suits monitoring platforms that send an installer or dealer value on every site while you hold the contract for the whole estate. The response then reports `installerIdentifier` as `null` with your own `customerSourceId`. Matching is exact, so a value that differs from a configured installer only in case or spacing also lands on your own customer source.

Callout-scoped tokens cannot use this endpoint. Use a server token.

Reference: https://docs.aurasos.com/api-reference/fixed-locations/create-fixed-location

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://staging-panic.aura.services` (Staging, default)
- `https://panic.aura.services` (Production)

## Request

### Body (application/json)

This endpoint expects a FixedLocationCreateRequest.

- `locationIdentifier` (string, required)
- `calloutLocationTypeId` (integer, optional)
- `customerId` (integer, optional)
- `externalReferenceId` (string, optional, nullable) — Optional stable fixed-location reference maintained by your integration. Supply it if you intend to reconcile or raise callouts by your own reference; omit it to identify the location by its AURA `id` alone.
- `installerIdentifier` (string, optional, nullable) — The installer that should own the new site, as an `installerIdentifier` returned by `GET /panic-api/v2/installers`. A value that matches none of them is rejected with 400, unless AURA has configured your account to assign unmatched installers to you, in which case the site is created against your own customer source. Omit it, or send `null`, to create the site against your own customer source. Ownership is fixed at creation: it cannot be changed later, so a site is moved between installers by deleting it and creating it under the new owner. An installer with no `installerIdentifier` of its own cannot be named here.
- `locationDescription` (string, optional)
- `locationAdditionalInformation` (string, optional)
- `formattedAddress` (string, optional) — Stored exactly as sent; only coordinates are derived during geocoding. Required and must be nonblank when both coordinate keys are omitted and address geocoding is enabled for your integration.
- `buildingName` (string, optional, nullable) — Optional name of the building at this fixed location.
- `entranceNote` (string, optional, nullable) — Instructions that help a responder find or use the correct entrance.
- `requiresInternalCheck` (boolean, optional, default: false) — Whether a responder must enter the premises to complete the site check. Defaults to `false` when omitted.
- `latitude` (string, optional) — Supply with `longitude`; omit both only when address geocoding is enabled and a nonblank `formattedAddress` is supplied.
- `longitude` (string, optional) — Supply with `latitude`; omit both only when address geocoding is enabled and a nonblank `formattedAddress` is supplied.
- `w3w` (string, optional)
- `duressCode` (string, optional) — Legacy field. New integrations should omit it.
- `pointOfContact` (list of FixedLocationPointOfContactCreate, optional) — Optional initial points of contact for the fixed location.

## Response

### 200

Successful.

- `id` (integer, optional)
- `customerId` (integer, optional, nullable)
- `customerSourceId` (integer, optional)
- `installerIdentifier` (string, optional, nullable) — The named installer that owns this site. `null` means either that the site belongs to your own customer source or that it belongs to an installer whose identifier has been cleared. Use `customerSourceId` when you need to distinguish those cases. Always `null` if you have no installers.
- `externalReferenceId` (string, optional, nullable) — Identifier maintained by the integration. It is returned and can be used for exact list filtering. New REST creates and updates reject a value already used by another live fixed location in your tree, but historical data and writes through other ingestion paths may still contain duplicates.
- `locationIdentifier` (string, optional) — A unique string you assign to identify the site.
- `locationDescription` (string, optional, nullable)
- `locationAdditionalInformation` (string, optional, nullable)
- `formattedAddress` (string, optional, nullable)
- `buildingName` (string, optional, nullable) — Optional name of the building at this fixed location.
- `entranceNote` (string, optional, nullable) — Instructions that help a responder find or use the correct entrance.
- `requiresInternalCheck` (boolean, optional) — Whether a responder must enter the premises to complete the site check.
- `latitude` (string, optional)
- `longitude` (string, optional)
- `w3w` (string, optional, nullable) — what3words address for the site.
- `calloutLocationTypeId` (integer, optional, nullable)
- `calloutLocationTypeValue` (string, optional, nullable)
- `calloutLocationTypeDescription` (string, optional, nullable)
- `duressCode` (string, optional, nullable) — Legacy field. New integrations should not rely on it.
- `medicalCoverage` (boolean, optional, nullable)
- `securityCoverage` (boolean, optional, nullable)
- `inCoverageLastCheckedAt` (datetime, optional, nullable)
- `createdAt` (datetime, optional)
- `updatedAt` (datetime, optional)
- `calloutLocationType.id` (integer, optional, nullable) — Literal top-level key whose name contains a dot (a serialization artifact), not a nested `calloutLocationType` object. Treat these `calloutLocationType.*` keys as opaque; they are null unless a callout location type is assigned.
- `calloutLocationType.value` (string, optional, nullable)
- `calloutLocationType.description` (string, optional, nullable)
- `calloutLocationType.addressType` (string, optional, nullable)
- `calloutLocationType.createdAt` (datetime, optional, nullable)
- `calloutLocationType.updatedAt` (datetime, optional, nullable)
- `calloutLocationType.locationCategory` (string, optional, nullable)
- `calloutLocationType.deprecatedAt` (datetime, optional, nullable)
- `pointOfContact` (list of FixedLocationPointOfContact, optional) — Fixed-location contacts. Returned by singular reads and by create and update operations. Deliberately omitted from the broad list response, because contact email addresses and mobile numbers are personal data; resolve an `id` from the list and read that fixed location singly when you need them.

## Errors

### 400 Bad Request Error

Returned when the body is missing required fields, including coordinates when address geocoding is not enabled and `formattedAddress` when it is; when the address cannot be matched or only partly matches; when `installerIdentifier` is empty or not a string; or when `installerIdentifier` is not one of your installers and your account does not assign unmatched installers to you. Nothing is created.

- `message` (string, optional)
- `errors` (ErrorResponseErrors, optional) — Error detail. May be a string, an array of strings, or an object (some routes return a serialized error object).

### 401 Unauthorized Error

Unauthorized.

- `message` (string, optional)
- `errors` (ErrorResponseErrors, optional) — Error detail. May be a string, an array of strings, or an object (some routes return a serialized error object).

### 409 Conflict Error

The supplied `externalReferenceId` is already used by a live fixed location belonging to you or to one of the installers visible to this credential. It must be unique across that scope because callouts resolve it across every source the credential can reach. Nothing is created.

- `message` (string, optional)
- `errors` (ErrorResponseErrors, optional) — Error detail. May be a string, an array of strings, or an object (some routes return a serialized error object).

### 429 Too Many Requests Error

Address lookups are limited to 500 per hour per integration. Requests that supply coordinates are not counted. Back off until the `RateLimit-Reset` window passes.

- `message` (string, optional)
- `errors` (ErrorResponseErrors, optional) — Error detail. May be a string, an array of strings, or an object (some routes return a serialized error object).

### 503 Service Unavailable Error

Address lookup is temporarily unavailable. Retry the request or supply both coordinates. Nothing is created.

- `message` (string, optional)
- `errors` (ErrorResponseErrors, optional) — Error detail. May be a string, an array of strings, or an object (some routes return a serialized error object).

## Types

### FixedLocationPointOfContactCreate

- `firstName` (string, required)
- `lastName` (string, optional, default: )
- `mobileNumber` (string, optional) — Required and at least 10 characters when `isPrimaryContact` is true.
- `email` (string, optional) — Required when `isIncidentReportSubscriber` is true.
- `isPrimaryContact` (boolean, optional, default: false) — At most one contact can be primary.
- `isIncidentReportSubscriber` (boolean, optional, default: false)

### FixedLocationPointOfContact

- `firstName` (string, required)
- `id` (integer, required)
- `lastName` (string, optional, default: )
- `mobileNumber` (string, optional) — Required and at least 10 characters when `isPrimaryContact` is true.
- `email` (string, optional) — Required when `isIncidentReportSubscriber` is true.
- `isPrimaryContact` (boolean, optional, default: false) — At most one contact can be primary.
- `isIncidentReportSubscriber` (boolean, optional, default: false)

### ErrorResponseErrors

Error detail. May be a string, an array of strings, or an object (some routes return a serialized error object).

- string
- list of string
- map from string to any

## Examples

### Success

**Request**

```json
{
  "locationIdentifier": "DOCS-LOC-1",
  "externalReferenceId": "DOCS-EXTERNAL-1",
  "latitude": "-26.2",
  "longitude": "28.2",
  "pointOfContact": [
    {
      "firstName": "Sam",
      "lastName": "Jansen",
      "mobileNumber": "+31612345678",
      "email": "sam@example.com",
      "isPrimaryContact": true,
      "isIncidentReportSubscriber": true
    }
  ]
}
```

**Response**

```json
{
  "id": 22,
  "customerId": 3,
  "customerSourceId": 35,
  "installerIdentifier": "skywalker",
  "externalReferenceId": "SHOP",
  "locationIdentifier": "must also be unique string 123",
  "locationDescription": "some description",
  "locationAdditionalInformation": "upstairs flat with big dog",
  "formattedAddress": "23 baker street",
  "buildingName": "Harbour Point",
  "entranceNote": "Enter through the side gate",
  "requiresInternalCheck": true,
  "latitude": "-27.45678",
  "longitude": "26.678819",
  "w3w": "panther.logbook.blue",
  "calloutLocationTypeId": 3,
  "calloutLocationTypeValue": "string",
  "calloutLocationTypeDescription": "string",
  "duressCode": "string",
  "medicalCoverage": true,
  "securityCoverage": true,
  "inCoverageLastCheckedAt": "2024-01-15T09:30:00Z",
  "createdAt": "2024-01-15T09:30:00Z",
  "updatedAt": "2024-01-15T09:30:00Z",
  "calloutLocationType.id": 1,
  "calloutLocationType.value": "string",
  "calloutLocationType.description": "string",
  "calloutLocationType.addressType": "string",
  "calloutLocationType.createdAt": "2024-01-15T09:30:00Z",
  "calloutLocationType.updatedAt": "2024-01-15T09:30:00Z",
  "calloutLocationType.locationCategory": "string",
  "calloutLocationType.deprecatedAt": "2024-01-15T09:30:00Z",
  "pointOfContact": [
    {
      "firstName": "string",
      "id": 1,
      "lastName": "",
      "mobileNumber": "+31612345678",
      "email": "string",
      "isPrimaryContact": false,
      "isIncidentReportSubscriber": false
    }
  ]
}
```

**SDK Code**

```python Success
import requests

url = "https://staging-panic.aura.services/panic-api/v2/predefinedLocations"

payload = {
    "locationIdentifier": "DOCS-LOC-1",
    "externalReferenceId": "DOCS-EXTERNAL-1",
    "latitude": "-26.2",
    "longitude": "28.2",
    "pointOfContact": [
        {
            "firstName": "Sam",
            "lastName": "Jansen",
            "mobileNumber": "+31612345678",
            "email": "sam@example.com",
            "isPrimaryContact": True,
            "isIncidentReportSubscriber": True
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Success
const url = 'https://staging-panic.aura.services/panic-api/v2/predefinedLocations';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"locationIdentifier":"DOCS-LOC-1","externalReferenceId":"DOCS-EXTERNAL-1","latitude":"-26.2","longitude":"28.2","pointOfContact":[{"firstName":"Sam","lastName":"Jansen","mobileNumber":"+31612345678","email":"sam@example.com","isPrimaryContact":true,"isIncidentReportSubscriber":true}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Success
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://staging-panic.aura.services/panic-api/v2/predefinedLocations"

	payload := strings.NewReader("{\n  \"locationIdentifier\": \"DOCS-LOC-1\",\n  \"externalReferenceId\": \"DOCS-EXTERNAL-1\",\n  \"latitude\": \"-26.2\",\n  \"longitude\": \"28.2\",\n  \"pointOfContact\": [\n    {\n      \"firstName\": \"Sam\",\n      \"lastName\": \"Jansen\",\n      \"mobileNumber\": \"+31612345678\",\n      \"email\": \"sam@example.com\",\n      \"isPrimaryContact\": true,\n      \"isIncidentReportSubscriber\": true\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Success
require 'uri'
require 'net/http'

url = URI("https://staging-panic.aura.services/panic-api/v2/predefinedLocations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"locationIdentifier\": \"DOCS-LOC-1\",\n  \"externalReferenceId\": \"DOCS-EXTERNAL-1\",\n  \"latitude\": \"-26.2\",\n  \"longitude\": \"28.2\",\n  \"pointOfContact\": [\n    {\n      \"firstName\": \"Sam\",\n      \"lastName\": \"Jansen\",\n      \"mobileNumber\": \"+31612345678\",\n      \"email\": \"sam@example.com\",\n      \"isPrimaryContact\": true,\n      \"isIncidentReportSubscriber\": true\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Success
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://staging-panic.aura.services/panic-api/v2/predefinedLocations")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"locationIdentifier\": \"DOCS-LOC-1\",\n  \"externalReferenceId\": \"DOCS-EXTERNAL-1\",\n  \"latitude\": \"-26.2\",\n  \"longitude\": \"28.2\",\n  \"pointOfContact\": [\n    {\n      \"firstName\": \"Sam\",\n      \"lastName\": \"Jansen\",\n      \"mobileNumber\": \"+31612345678\",\n      \"email\": \"sam@example.com\",\n      \"isPrimaryContact\": true,\n      \"isIncidentReportSubscriber\": true\n    }\n  ]\n}")
  .asString();
```

```php Success
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://staging-panic.aura.services/panic-api/v2/predefinedLocations', [
  'body' => '{
  "locationIdentifier": "DOCS-LOC-1",
  "externalReferenceId": "DOCS-EXTERNAL-1",
  "latitude": "-26.2",
  "longitude": "28.2",
  "pointOfContact": [
    {
      "firstName": "Sam",
      "lastName": "Jansen",
      "mobileNumber": "+31612345678",
      "email": "sam@example.com",
      "isPrimaryContact": true,
      "isIncidentReportSubscriber": true
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Success
using RestSharp;

var client = new RestClient("https://staging-panic.aura.services/panic-api/v2/predefinedLocations");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"locationIdentifier\": \"DOCS-LOC-1\",\n  \"externalReferenceId\": \"DOCS-EXTERNAL-1\",\n  \"latitude\": \"-26.2\",\n  \"longitude\": \"28.2\",\n  \"pointOfContact\": [\n    {\n      \"firstName\": \"Sam\",\n      \"lastName\": \"Jansen\",\n      \"mobileNumber\": \"+31612345678\",\n      \"email\": \"sam@example.com\",\n      \"isPrimaryContact\": true,\n      \"isIncidentReportSubscriber\": true\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Success
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "locationIdentifier": "DOCS-LOC-1",
  "externalReferenceId": "DOCS-EXTERNAL-1",
  "latitude": "-26.2",
  "longitude": "28.2",
  "pointOfContact": [
    [
      "firstName": "Sam",
      "lastName": "Jansen",
      "mobileNumber": "+31612345678",
      "email": "sam@example.com",
      "isPrimaryContact": true,
      "isIncidentReportSubscriber": true
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://staging-panic.aura.services/panic-api/v2/predefinedLocations")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Create against one of your installers

**Request**

```json
{
  "locationIdentifier": "DOCS-LOC-2",
  "externalReferenceId": "DOCS-EXTERNAL-2",
  "installerIdentifier": "skywalker",
  "latitude": "-26.2",
  "longitude": "28.2"
}
```

**Response**

```json
{
  "id": 22,
  "customerId": 3,
  "customerSourceId": 35,
  "installerIdentifier": "skywalker",
  "externalReferenceId": "SHOP",
  "locationIdentifier": "must also be unique string 123",
  "locationDescription": "some description",
  "locationAdditionalInformation": "upstairs flat with big dog",
  "formattedAddress": "23 baker street",
  "buildingName": "Harbour Point",
  "entranceNote": "Enter through the side gate",
  "requiresInternalCheck": true,
  "latitude": "-27.45678",
  "longitude": "26.678819",
  "w3w": "panther.logbook.blue",
  "calloutLocationTypeId": 3,
  "calloutLocationTypeValue": "string",
  "calloutLocationTypeDescription": "string",
  "duressCode": "string",
  "medicalCoverage": true,
  "securityCoverage": true,
  "inCoverageLastCheckedAt": "2024-01-15T09:30:00Z",
  "createdAt": "2024-01-15T09:30:00Z",
  "updatedAt": "2024-01-15T09:30:00Z",
  "calloutLocationType.id": 1,
  "calloutLocationType.value": "string",
  "calloutLocationType.description": "string",
  "calloutLocationType.addressType": "string",
  "calloutLocationType.createdAt": "2024-01-15T09:30:00Z",
  "calloutLocationType.updatedAt": "2024-01-15T09:30:00Z",
  "calloutLocationType.locationCategory": "string",
  "calloutLocationType.deprecatedAt": "2024-01-15T09:30:00Z",
  "pointOfContact": [
    {
      "firstName": "string",
      "id": 1,
      "lastName": "",
      "mobileNumber": "+31612345678",
      "email": "string",
      "isPrimaryContact": false,
      "isIncidentReportSubscriber": false
    }
  ]
}
```

**SDK Code**

```python Create against one of your installers
import requests

url = "https://staging-panic.aura.services/panic-api/v2/predefinedLocations"

payload = {
    "locationIdentifier": "DOCS-LOC-2",
    "externalReferenceId": "DOCS-EXTERNAL-2",
    "installerIdentifier": "skywalker",
    "latitude": "-26.2",
    "longitude": "28.2"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Create against one of your installers
const url = 'https://staging-panic.aura.services/panic-api/v2/predefinedLocations';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"locationIdentifier":"DOCS-LOC-2","externalReferenceId":"DOCS-EXTERNAL-2","installerIdentifier":"skywalker","latitude":"-26.2","longitude":"28.2"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Create against one of your installers
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://staging-panic.aura.services/panic-api/v2/predefinedLocations"

	payload := strings.NewReader("{\n  \"locationIdentifier\": \"DOCS-LOC-2\",\n  \"externalReferenceId\": \"DOCS-EXTERNAL-2\",\n  \"installerIdentifier\": \"skywalker\",\n  \"latitude\": \"-26.2\",\n  \"longitude\": \"28.2\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Create against one of your installers
require 'uri'
require 'net/http'

url = URI("https://staging-panic.aura.services/panic-api/v2/predefinedLocations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"locationIdentifier\": \"DOCS-LOC-2\",\n  \"externalReferenceId\": \"DOCS-EXTERNAL-2\",\n  \"installerIdentifier\": \"skywalker\",\n  \"latitude\": \"-26.2\",\n  \"longitude\": \"28.2\"\n}"

response = http.request(request)
puts response.read_body
```

```java Create against one of your installers
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://staging-panic.aura.services/panic-api/v2/predefinedLocations")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"locationIdentifier\": \"DOCS-LOC-2\",\n  \"externalReferenceId\": \"DOCS-EXTERNAL-2\",\n  \"installerIdentifier\": \"skywalker\",\n  \"latitude\": \"-26.2\",\n  \"longitude\": \"28.2\"\n}")
  .asString();
```

```php Create against one of your installers
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://staging-panic.aura.services/panic-api/v2/predefinedLocations', [
  'body' => '{
  "locationIdentifier": "DOCS-LOC-2",
  "externalReferenceId": "DOCS-EXTERNAL-2",
  "installerIdentifier": "skywalker",
  "latitude": "-26.2",
  "longitude": "28.2"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Create against one of your installers
using RestSharp;

var client = new RestClient("https://staging-panic.aura.services/panic-api/v2/predefinedLocations");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"locationIdentifier\": \"DOCS-LOC-2\",\n  \"externalReferenceId\": \"DOCS-EXTERNAL-2\",\n  \"installerIdentifier\": \"skywalker\",\n  \"latitude\": \"-26.2\",\n  \"longitude\": \"28.2\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create against one of your installers
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "locationIdentifier": "DOCS-LOC-2",
  "externalReferenceId": "DOCS-EXTERNAL-2",
  "installerIdentifier": "skywalker",
  "latitude": "-26.2",
  "longitude": "28.2"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://staging-panic.aura.services/panic-api/v2/predefinedLocations")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Create from an address (requires enablement)

**Request**

```json
{
  "locationIdentifier": "DOCS-LOC-3",
  "externalReferenceId": "DOCS-EXTERNAL-3",
  "formattedAddress": "14 Example Lane, Sampletown, South Africa"
}
```

**Response**

```json
{
  "id": 22,
  "customerId": 3,
  "customerSourceId": 35,
  "installerIdentifier": "skywalker",
  "externalReferenceId": "SHOP",
  "locationIdentifier": "must also be unique string 123",
  "locationDescription": "some description",
  "locationAdditionalInformation": "upstairs flat with big dog",
  "formattedAddress": "23 baker street",
  "buildingName": "Harbour Point",
  "entranceNote": "Enter through the side gate",
  "requiresInternalCheck": true,
  "latitude": "-27.45678",
  "longitude": "26.678819",
  "w3w": "panther.logbook.blue",
  "calloutLocationTypeId": 3,
  "calloutLocationTypeValue": "string",
  "calloutLocationTypeDescription": "string",
  "duressCode": "string",
  "medicalCoverage": true,
  "securityCoverage": true,
  "inCoverageLastCheckedAt": "2024-01-15T09:30:00Z",
  "createdAt": "2024-01-15T09:30:00Z",
  "updatedAt": "2024-01-15T09:30:00Z",
  "calloutLocationType.id": 1,
  "calloutLocationType.value": "string",
  "calloutLocationType.description": "string",
  "calloutLocationType.addressType": "string",
  "calloutLocationType.createdAt": "2024-01-15T09:30:00Z",
  "calloutLocationType.updatedAt": "2024-01-15T09:30:00Z",
  "calloutLocationType.locationCategory": "string",
  "calloutLocationType.deprecatedAt": "2024-01-15T09:30:00Z",
  "pointOfContact": [
    {
      "firstName": "string",
      "id": 1,
      "lastName": "",
      "mobileNumber": "+31612345678",
      "email": "string",
      "isPrimaryContact": false,
      "isIncidentReportSubscriber": false
    }
  ]
}
```

**SDK Code**

```python Create from an address (requires enablement)
import requests

url = "https://staging-panic.aura.services/panic-api/v2/predefinedLocations"

payload = {
    "locationIdentifier": "DOCS-LOC-3",
    "externalReferenceId": "DOCS-EXTERNAL-3",
    "formattedAddress": "14 Example Lane, Sampletown, South Africa"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Create from an address (requires enablement)
const url = 'https://staging-panic.aura.services/panic-api/v2/predefinedLocations';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"locationIdentifier":"DOCS-LOC-3","externalReferenceId":"DOCS-EXTERNAL-3","formattedAddress":"14 Example Lane, Sampletown, South Africa"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Create from an address (requires enablement)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://staging-panic.aura.services/panic-api/v2/predefinedLocations"

	payload := strings.NewReader("{\n  \"locationIdentifier\": \"DOCS-LOC-3\",\n  \"externalReferenceId\": \"DOCS-EXTERNAL-3\",\n  \"formattedAddress\": \"14 Example Lane, Sampletown, South Africa\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Create from an address (requires enablement)
require 'uri'
require 'net/http'

url = URI("https://staging-panic.aura.services/panic-api/v2/predefinedLocations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"locationIdentifier\": \"DOCS-LOC-3\",\n  \"externalReferenceId\": \"DOCS-EXTERNAL-3\",\n  \"formattedAddress\": \"14 Example Lane, Sampletown, South Africa\"\n}"

response = http.request(request)
puts response.read_body
```

```java Create from an address (requires enablement)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://staging-panic.aura.services/panic-api/v2/predefinedLocations")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"locationIdentifier\": \"DOCS-LOC-3\",\n  \"externalReferenceId\": \"DOCS-EXTERNAL-3\",\n  \"formattedAddress\": \"14 Example Lane, Sampletown, South Africa\"\n}")
  .asString();
```

```php Create from an address (requires enablement)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://staging-panic.aura.services/panic-api/v2/predefinedLocations', [
  'body' => '{
  "locationIdentifier": "DOCS-LOC-3",
  "externalReferenceId": "DOCS-EXTERNAL-3",
  "formattedAddress": "14 Example Lane, Sampletown, South Africa"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Create from an address (requires enablement)
using RestSharp;

var client = new RestClient("https://staging-panic.aura.services/panic-api/v2/predefinedLocations");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"locationIdentifier\": \"DOCS-LOC-3\",\n  \"externalReferenceId\": \"DOCS-EXTERNAL-3\",\n  \"formattedAddress\": \"14 Example Lane, Sampletown, South Africa\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create from an address (requires enablement)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "locationIdentifier": "DOCS-LOC-3",
  "externalReferenceId": "DOCS-EXTERNAL-3",
  "formattedAddress": "14 Example Lane, Sampletown, South Africa"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://staging-panic.aura.services/panic-api/v2/predefinedLocations")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```