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

# Update or close a location

PATCH https://api.confirm.global/partner/v1/locations/{ref}
Content-Type: application/json

Updates a location's title, description, address, or pay, or closes it
to new applicants with `status: closed`. Omitted fields are unchanged;
closing a location leaves existing candidates and their in-flight
screenings untouched.

**Pay.** `pay` replaces the stored pay rate as a whole: a key you leave
out is cleared, not kept. `pay: null` clears the pay rate; leaving `pay`
out leaves it alone. A location with no pay after the update answers
with the no-pay warning in `warnings`.

**Closing.** While a location is closed, `POST /candidates` to it returns
`409 location_closed` for new applicants. An applicant you sent before
closing still returns `200` with `deduped: true`, so replaying a retry
queue is safe. Set `status: active` to accept applicants again. Closing
and reopening don't touch the address or coordinates, so distance
screening resumes as it was.

**Address.** `address` replaces the stored address as a whole: a field
you leave out is cleared, not kept. Send the full address every time.
The location is re-geocoded, and the previous coordinates are cleared
first so a stale fix can never outlive the address it came from. An
address without a street still geocodes, to the centre of the city or
ZIP, and the response carries a warning saying so.

**`geocoded`** always reflects the location's coordinates after the
update, including on updates that don't change the address.

**Same ref in several registries.** Location refs only need to be unique
within a registry. If you use the same ref in more than one, pass
`organization_ref` to say which; without it the request returns
`409 ambiguous_location_ref`.


Reference: https://docs.confirm.global/partner-api/locations/update-location

## Authentication

- `Authorization` header (bearer token, required) — Partner API key sent as `Authorization: Bearer cfk_...`. Keys are partner-level — one key reaches every registry linked to your partner account and nothing else. CONFIRM issues and revokes them; a key is shown exactly once at creation because only its hash is stored, and revocation takes effect on the next request. Develop against the sandbox base URL with a sandbox key, where telephony is restricted to an allowlist you provide.

## Request

### Path parameters

- `ref` (string, required) — Your location identifier (`external_ref`).

### Query parameters

- `organization_ref` (string, optional) — The registry the location belongs to. Only required when the same location ref exists in more than one of your registries.

### Body (application/json)

This endpoint expects an object.

- `title` (string, optional) — Replaces the title, stored exactly as you send it. No "Caregiver — " prefix is added; to keep that style, send the whole title, e.g. `"Caregiver — Denver North"`.
- `description` (string, optional)
- `employment_type` (string, optional)
- `address` (StreetAddress, optional) — Replaces the stored address as a whole. Fields left out are cleared.
- `status` (enum, optional) — Set `closed` to stop accepting new applicants at this location (`POST /candidates` returns `409 location_closed`), and `active` to reopen it.
  - Allowed values: `active`, `closed`
- `pay` (LocationPayInput, optional, nullable) — Replaces the location's pay rate as a whole (keys left out are cleared). `null` clears the pay rate; omit the field to leave it unchanged.

## Response

### 200

The updated location.

- `location_id` (string, required) — CONFIRM's identifier for the location's job.
- `external_ref` (string, required) — Your location identifier, echoed back. Pass it as `location_ref` when ingesting applicants.
- `title` (string, required)
- `status` (enum, required)
  - Allowed values: `active`, `closed`
- `organization_ref` (string, optional) — The registry this location belongs to.
- `geocoded` (boolean, optional) — True when the location has coordinates. False means distance screening is inactive for this location — check `warnings`. An address without a street geocodes to the centre of the city or ZIP; `warnings` says so when that happens.
- `address` (string, optional, nullable) — The stored single-line address.
- `created` (boolean, optional) — False when the location already existed and this call was a no-op.
- `pay` (LocationPay, optional, nullable) — The location's pay rate, or `null` when it has none. With `null`, `warnings` includes "No pay rate set — the pay question will be skipped on screening calls for this location."
- `warnings` (list of string, optional)

## Errors

### 400 Bad Request Error

Invalid request (`error.type: invalid_request_error`, `code: invalid_request`) — missing or malformed fields. `details` lists each offending field.

- `error` (ErrorError, required)

### 401 Unauthorized Error

Missing, malformed, or revoked API key (`error.type: authentication_error`).

- `error` (ErrorError, required)

### 404 Not Found Error

No location is registered with that ref (`unknown_location_ref`), or `organization_ref` is not one of your registries (`unknown_organization_ref`).

- `error` (ErrorError, required)

### 409 Conflict Error

The location ref exists in more than one of your registries and no `organization_ref` said which (`ambiguous_location_ref`). The error lists the matching `organization_refs`.

- `error` (ErrorError, required)

### 429 Too Many Requests Error

Rate limit exceeded (`error.type: rate_limit_error`). Design target: 600 requests/min per key, burst 100/10s. Honor the `Retry-After` header.

- `error` (ErrorError, required)

## Types

### StreetAddress

A real street address. Distance screening measures a candidate's commute against it, so the more complete it is, the better location fit works.

- `street` (string, optional)
- `city` (string, optional)
- `state` (string, optional) — State or region.
- `postal_code` (string, optional)
- `country` (string, optional)

### LocationPayInput

The location's pay rate, as you send it. Every key is optional, but: - include at least one of `min`, `max` or `text`; - `period` is required when `min` or `max` is given; - `min` may not be greater than `max`. Breaking a rule is a `400 invalid_request`. The screening call uses the pay rate to answer the pay question; a location without one skips it.

- `min` (double, optional) — Lowest pay, per `period`.
- `max` (double, optional) — Highest pay, per `period`.
- `period` (enum, optional) — What `min` and `max` are quoted per.
  - Allowed values: `hourly`, `yearly`
- `text` (string, optional) — Free-text pay description, for pay that isn't a simple range (for example "$18/hr + $2 weekend differential"). Trimmed; an empty string counts as not sent.

### LocationPay

A location's stored pay rate. Every key is present; values that weren't set are `null`. `period` is `null` unless `min` or `max` is set.

- `min` (double, optional, nullable)
- `max` (double, optional, nullable)
- `period` (enum, optional, nullable)
  - Allowed values: `hourly`, `yearly`
- `text` (string, optional, nullable)

### ErrorError

- `type` (enum, required) — Broad error category.
  - Allowed values: `authentication_error`, `invalid_request_error`, `not_found_error`, `conflict_error`, `rate_limit_error`, `api_error`
- `code` (string, required) — Machine-readable error code, e.g. `invalid_request`, `unknown_location_ref` or `wrong_environment`. Branch on this; the strings are contract.
- `message` (string, required) — Human-readable explanation.
- `request_id` (string, required) — Identifier for this request — the same value as the response's `X-Request-Id` header. Include it when contacting CONFIRM support.
- `details` (list of ErrorErrorDetailsItems, optional) — Present on `invalid_request` (400): one entry per field that failed validation.
- `location_ref` (string, optional) — Present on `unknown_location_ref` (404) — the reference that wasn't found.
- `organization_ref` (string, optional) — Present on `unknown_organization_ref` (404) — the reference that wasn't found — and on `email_has_account` (409) — the registry the invitation was for.
- `external_ref` (string, optional) — Present on workspace-teardown refusals (403) — the workspace you asked to delete — and on applicant errors (`unknown_candidate_ref`, `no_application_at_location`, `outcome_conflict`) — the applicant ref.
- `organization_refs` (list of string, optional) — Present on `ambiguous_location_ref` (409) — the registries the ref exists in.
- `locations` (list of ErrorErrorLocationsItems, optional) — Present on `location_refs_span_organizations` (400) — each ref you sent with the registry it belongs to.

### ErrorErrorDetailsItems

- `field` (string, required) — Dotted path to the offending field, e.g. `address.postal_code`.
- `message` (string, required) — Why that field was rejected.

### ErrorErrorLocationsItems

- `location_ref` (string, optional)
- `organization_ref` (string, optional, nullable)

## Examples

### Set an hourly pay range

**Request**

```json
{
  "pay": {
    "min": 18,
    "max": 22,
    "period": "hourly"
  }
}
```

**Response**

```json
{
  "location_id": "string",
  "external_ref": "cl_loc_88213",
  "title": "Certified Nursing Assistant — Clearwater",
  "status": "active",
  "organization_ref": "cl_biz_4471",
  "geocoded": true,
  "address": "string",
  "created": true,
  "pay": {
    "min": 17,
    "max": 21,
    "period": "hourly",
    "text": null
  },
  "warnings": [
    "string"
  ]
}
```

**SDK Code**

```python Set an hourly pay range
import requests

url = "https://api.confirm.global/partner/v1/locations/cl_loc_88213"

querystring = {"organization_ref":"cl_biz_4471"}

payload = { "pay": {
        "min": 18,
        "max": 22,
        "period": "hourly"
    } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```javascript Set an hourly pay range
const url = 'https://api.confirm.global/partner/v1/locations/cl_loc_88213?organization_ref=cl_biz_4471';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"pay":{"min":18,"max":22,"period":"hourly"}}'
};

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

```go Set an hourly pay range
package main

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

func main() {

	url := "https://api.confirm.global/partner/v1/locations/cl_loc_88213?organization_ref=cl_biz_4471"

	payload := strings.NewReader("{\n  \"pay\": {\n    \"min\": 18,\n    \"max\": 22,\n    \"period\": \"hourly\"\n  }\n}")

	req, _ := http.NewRequest("PATCH", 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 Set an hourly pay range
require 'uri'
require 'net/http'

url = URI("https://api.confirm.global/partner/v1/locations/cl_loc_88213?organization_ref=cl_biz_4471")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"pay\": {\n    \"min\": 18,\n    \"max\": 22,\n    \"period\": \"hourly\"\n  }\n}"

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

```java Set an hourly pay range
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.confirm.global/partner/v1/locations/cl_loc_88213?organization_ref=cl_biz_4471")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"pay\": {\n    \"min\": 18,\n    \"max\": 22,\n    \"period\": \"hourly\"\n  }\n}")
  .asString();
```

```php Set an hourly pay range
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.confirm.global/partner/v1/locations/cl_loc_88213?organization_ref=cl_biz_4471', [
  'body' => '{
  "pay": {
    "min": 18,
    "max": 22,
    "period": "hourly"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Set an hourly pay range
using RestSharp;

var client = new RestClient("https://api.confirm.global/partner/v1/locations/cl_loc_88213?organization_ref=cl_biz_4471");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"pay\": {\n    \"min\": 18,\n    \"max\": 22,\n    \"period\": \"hourly\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Set an hourly pay range
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["pay": [
    "min": 18,
    "max": 22,
    "period": "hourly"
  ]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.confirm.global/partner/v1/locations/cl_loc_88213?organization_ref=cl_biz_4471")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
```

### Clear the pay rate

**Request**

```json
{
  "pay": null
}
```

**Response**

```json
{
  "location_id": "string",
  "external_ref": "cl_loc_88213",
  "title": "Certified Nursing Assistant — Clearwater",
  "status": "active",
  "organization_ref": "cl_biz_4471",
  "geocoded": true,
  "address": "string",
  "created": true,
  "pay": {
    "min": 17,
    "max": 21,
    "period": "hourly",
    "text": null
  },
  "warnings": [
    "string"
  ]
}
```

**SDK Code**

```python Clear the pay rate
import requests

url = "https://api.confirm.global/partner/v1/locations/cl_loc_88213"

querystring = {"organization_ref":"cl_biz_4471"}

payload = { "pay": None }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```javascript Clear the pay rate
const url = 'https://api.confirm.global/partner/v1/locations/cl_loc_88213?organization_ref=cl_biz_4471';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"pay":null}'
};

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

```go Clear the pay rate
package main

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

func main() {

	url := "https://api.confirm.global/partner/v1/locations/cl_loc_88213?organization_ref=cl_biz_4471"

	payload := strings.NewReader("{\n  \"pay\": null\n}")

	req, _ := http.NewRequest("PATCH", 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 Clear the pay rate
require 'uri'
require 'net/http'

url = URI("https://api.confirm.global/partner/v1/locations/cl_loc_88213?organization_ref=cl_biz_4471")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"pay\": null\n}"

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

```java Clear the pay rate
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.confirm.global/partner/v1/locations/cl_loc_88213?organization_ref=cl_biz_4471")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"pay\": null\n}")
  .asString();
```

```php Clear the pay rate
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.confirm.global/partner/v1/locations/cl_loc_88213?organization_ref=cl_biz_4471', [
  'body' => '{
  "pay": null
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Clear the pay rate
using RestSharp;

var client = new RestClient("https://api.confirm.global/partner/v1/locations/cl_loc_88213?organization_ref=cl_biz_4471");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"pay\": null\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Clear the pay rate
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["pay": ] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.confirm.global/partner/v1/locations/cl_loc_88213?organization_ref=cl_biz_4471")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
```