> 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.

# Set your outcome for an applicant at one location

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

Records your own decision about an applicant at **one** location:

| `outcome` | Use it when | Resulting `status` |
|---|---|---|
| `withdrawn` | The applicant pulled out of this location. | `rejected` |
| `not_hired` | The office decided not to hire them for this location. | `rejected` |
| `hired` | The office hired them for this location. | `hired` |

Only these final outcomes can be set. Screening and review steps are
run by CONFIRM and can't be set from outside.

**One location at a time.** Name the location with the `location_ref`
query parameter. The applicant's applications at other locations are
not touched. There is no `DELETE`: to take an applicant off one
location, set `withdrawn` (their choice) or `not_hired` (the office's
choice).

**No messages to the applicant.** CONFIRM sends the applicant nothing
about an outcome you set; you made the decision and own that
conversation.

**You get your own change back as a webhook.** When the outcome changes
the applicant's status at that location, CONFIRM fires
`candidate.status_changed` (`rejected` or `hired`) to the applicant's
callback URL, like any other status change. Expect it and deduplicate
it against the change you just made.

**Idempotent.** Setting the outcome the application already has returns
`200` with `changed: false` and fires nothing. A different outcome
replaces the earlier one. Switching between `withdrawn` and `not_hired`
updates the recorded reason and returns `changed: true`, but the status
stays `rejected`, so no new `candidate.status_changed` fires.

**Do-not-contact is final.** An applicant CONFIRM has marked
do-not-contact can't take an outcome: `409 outcome_conflict`.


Reference: https://docs.confirm.global/partner-api/candidates/set-candidate-outcome

## 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

- `external_ref` (string, required) — Your applicant identifier (the `external_ref` you sent to `POST /candidates`).

### Query parameters

- `location_ref` (string, required) — The location the outcome applies to (its `external_ref`).
- `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.

- `outcome` (enum, required) — Your decision for this applicant at this location.
  - Allowed values: `withdrawn`, `not_hired`, `hired`
- `reason` (string, optional) — Optional free text, kept with the change in CONFIRM's history for this application. For `withdrawn` and `not_hired` it is recorded as the reason the applicant is no longer progressing.

## Response

### 200

The outcome is recorded (or was already in place: `changed` is false).

- `candidate_id` (string, required)
- `application_id` (string, required) — The application at `location_ref`.
- `external_ref` (string, required)
- `location_ref` (string, required)
- `outcome` (enum, required) — The outcome you sent, echoed back.
  - Allowed values: `withdrawn`, `not_hired`, `hired`
- `changed` (boolean, required) — False when the application already had this outcome and nothing changed.
- `status` (enum, optional, nullable) — The applicant's coarse status at this location after the change.
  - Allowed values: `screening`, `review`, `interview`, `hired`, `rejected`

## Errors

### 400 Bad Request Error

`invalid_request`: the `location_ref` query parameter is missing, or the body failed validation (an unknown `outcome`, or a `reason` over 1000 characters). `details` lists each problem.

- `error` (ErrorError, required)

### 401 Unauthorized Error

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

- `error` (ErrorError, required)

### 404 Not Found Error

| `code` | Meaning | |---|---| | `unknown_location_ref` | No location with that `location_ref`. | | `unknown_organization_ref` | `organization_ref` is not one of your registries. | | `unknown_candidate_ref` | No applicant with that `external_ref` in the location's registry. | | `no_application_at_location` | The applicant has no application at that location. |

- `error` (ErrorError, required)

### 409 Conflict Error

The applicant can't take that outcome in their current state, for example because CONFIRM marked them do-not-contact (`outcome_conflict`), or the location ref exists in more than one of your registries and no `organization_ref` said which (`ambiguous_location_ref`).

- `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

### 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

### withdrawn

**Response**

```json
{
  "candidate_id": "9f4c2e81-6d3a-4b7e-a1c2-8e5f0d743b16",
  "application_id": "51c0a7de-2f18-4a3e-96b7-1d0c8b2e4a77",
  "external_ref": "cl_app_84321",
  "location_ref": "cl_loc_88213",
  "outcome": "withdrawn",
  "changed": true,
  "status": "rejected"
}
```

**SDK Code**

```python withdrawn
import requests

url = "https://api.confirm.global/partner/v1/candidates/cl_app_84321"

querystring = {"location_ref":"cl_loc_88213","organization_ref":"cl_biz_4471"}

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript withdrawn
const url = 'https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471';
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};

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

```go withdrawn
package main

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

func main() {

	url := "https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471"

	req, _ := http.NewRequest("PATCH", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

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

url = URI("https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=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>'

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

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

HttpResponse<String> response = Unirest.patch("https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp withdrawn
using RestSharp;

var client = new RestClient("https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift withdrawn
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers

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()
```

### hired

**Response**

```json
{
  "candidate_id": "9f4c2e81-6d3a-4b7e-a1c2-8e5f0d743b16",
  "application_id": "51c0a7de-2f18-4a3e-96b7-1d0c8b2e4a77",
  "external_ref": "cl_app_84321",
  "location_ref": "cl_loc_88213",
  "outcome": "hired",
  "changed": true,
  "status": "hired"
}
```

**SDK Code**

```python hired
import requests

url = "https://api.confirm.global/partner/v1/candidates/cl_app_84321"

querystring = {"location_ref":"cl_loc_88213","organization_ref":"cl_biz_4471"}

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript hired
const url = 'https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471';
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};

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

```go hired
package main

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

func main() {

	url := "https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471"

	req, _ := http.NewRequest("PATCH", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

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

url = URI("https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=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>'

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

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

HttpResponse<String> response = Unirest.patch("https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp hired
using RestSharp;

var client = new RestClient("https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift hired
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers

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()
```

### The applicant withdrew from this location

**Request**

```json
{
  "outcome": "withdrawn",
  "reason": "Accepted a position closer to home."
}
```

**Response**

```json
{
  "candidate_id": "9f4c2e81-6d3a-4b7e-a1c2-8e5f0d743b16",
  "application_id": "51c0a7de-2f18-4a3e-96b7-1d0c8b2e4a77",
  "external_ref": "cl_app_84321",
  "location_ref": "cl_loc_88213",
  "outcome": "withdrawn",
  "changed": true,
  "status": "rejected"
}
```

**SDK Code**

```python The applicant withdrew from this location
import requests

url = "https://api.confirm.global/partner/v1/candidates/cl_app_84321"

querystring = {"location_ref":"cl_loc_88213","organization_ref":"cl_biz_4471"}

payload = {
    "outcome": "withdrawn",
    "reason": "Accepted a position closer to home."
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript The applicant withdrew from this location
const url = 'https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"outcome":"withdrawn","reason":"Accepted a position closer to home."}'
};

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

```go The applicant withdrew from this location
package main

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

func main() {

	url := "https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471"

	payload := strings.NewReader("{\n  \"outcome\": \"withdrawn\",\n  \"reason\": \"Accepted a position closer to home.\"\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 The applicant withdrew from this location
require 'uri'
require 'net/http'

url = URI("https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=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  \"outcome\": \"withdrawn\",\n  \"reason\": \"Accepted a position closer to home.\"\n}"

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

```java The applicant withdrew from this location
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"outcome\": \"withdrawn\",\n  \"reason\": \"Accepted a position closer to home.\"\n}")
  .asString();
```

```php The applicant withdrew from this location
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471', [
  'body' => '{
  "outcome": "withdrawn",
  "reason": "Accepted a position closer to home."
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp The applicant withdrew from this location
using RestSharp;

var client = new RestClient("https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=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  \"outcome\": \"withdrawn\",\n  \"reason\": \"Accepted a position closer to home.\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift The applicant withdrew from this location
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "outcome": "withdrawn",
  "reason": "Accepted a position closer to home."
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=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()
```

### Hired at this location

**Request**

```json
{
  "outcome": "hired"
}
```

**Response**

```json
{
  "candidate_id": "9f4c2e81-6d3a-4b7e-a1c2-8e5f0d743b16",
  "application_id": "51c0a7de-2f18-4a3e-96b7-1d0c8b2e4a77",
  "external_ref": "cl_app_84321",
  "location_ref": "cl_loc_88213",
  "outcome": "withdrawn",
  "changed": true,
  "status": "rejected"
}
```

**SDK Code**

```python Hired at this location
import requests

url = "https://api.confirm.global/partner/v1/candidates/cl_app_84321"

querystring = {"location_ref":"cl_loc_88213","organization_ref":"cl_biz_4471"}

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

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

print(response.json())
```

```javascript Hired at this location
const url = 'https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"outcome":"hired"}'
};

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

```go Hired at this location
package main

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

func main() {

	url := "https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=cl_loc_88213&organization_ref=cl_biz_4471"

	payload := strings.NewReader("{\n  \"outcome\": \"hired\"\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 Hired at this location
require 'uri'
require 'net/http'

url = URI("https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=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  \"outcome\": \"hired\"\n}"

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

```java Hired at this location
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

```php Hired at this location
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Hired at this location
using RestSharp;

var client = new RestClient("https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=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  \"outcome\": \"hired\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Hired at this location
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.confirm.global/partner/v1/candidates/cl_app_84321?location_ref=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()
```