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

# Upsert Callback

PUT https://api.paylocity.com/apiHub/performanceManagement/v1/companies/{companyId}/assessmentOrders/callback
Content-Type: application/json

All assessment API endpoints are restricted to assessment providers that have signed a Paylocity technology partnership agreement. Please reach out to [Techpartnerships@paylocity.com](mailto:Techpartnerships@paylocity.com) if you would like to discuss partnership opportunities.

**Summary Description**

This endpoint is used to configure callback URLs for assessment order notifications for the Partner.

**Use Cases**

* Customizable Endpoints: The Partner would use this to provide a general endpoint for all Paylocity clients by specifying b6001.
* Notification Management: The Partner would use this endpoint to receive notifications about new orders, errors, and job creation events.

Reference: https://paylocity.ferndocs.com/recruiting/api-reference/paylocity-ap-is/assessments-callback/upsert-callback

## Authentication

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

## Request

### Path parameters

- `companyId` (string, required)

### Headers

- `testMode` (string, optional) — If true all responses are mocked and generated randomly.
- `Accept` (string, optional)

## Response

### 200

Successful response

## Examples

**Request**

```json
{
  "callbackDetails": {
    "successCallbackUrl": "<string>",
    "errorCallbackUrl": "<string>",
    "jobCreationCallbackUrl": "<string>"
  },
  "callerDetails": {
    "callerName": "<string>",
    "key_0": {}
  },
  "apiKey": "<string>",
  "orderLevel": "Assessment"
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://api.paylocity.com/apiHub/performanceManagement/v1/companies/companyId/assessmentOrders/callback"

payload = {
    "callbackDetails": {
        "successCallbackUrl": "<string>",
        "errorCallbackUrl": "<string>",
        "jobCreationCallbackUrl": "<string>"
    },
    "callerDetails": {
        "callerName": "<string>",
        "key_0": {}
    },
    "apiKey": "<string>",
    "orderLevel": "Assessment"
}
headers = {
    "testMode": "<boolean>",
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.paylocity.com/apiHub/performanceManagement/v1/companies/companyId/assessmentOrders/callback';
const options = {
  method: 'PUT',
  headers: {
    testMode: '<boolean>',
    Accept: 'application/json',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"callbackDetails":{"successCallbackUrl":"<string>","errorCallbackUrl":"<string>","jobCreationCallbackUrl":"<string>"},"callerDetails":{"callerName":"<string>","key_0":{}},"apiKey":"<string>","orderLevel":"Assessment"}'
};

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

```go
package main

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

func main() {

	url := "https://api.paylocity.com/apiHub/performanceManagement/v1/companies/companyId/assessmentOrders/callback"

	payload := strings.NewReader("{\n  \"callbackDetails\": {\n    \"successCallbackUrl\": \"<string>\",\n    \"errorCallbackUrl\": \"<string>\",\n    \"jobCreationCallbackUrl\": \"<string>\"\n  },\n  \"callerDetails\": {\n    \"callerName\": \"<string>\",\n    \"key_0\": {}\n  },\n  \"apiKey\": \"<string>\",\n  \"orderLevel\": \"Assessment\"\n}")

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

	req.Header.Add("testMode", "<boolean>")
	req.Header.Add("Accept", "application/json")
	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
require 'uri'
require 'net/http'

url = URI("https://api.paylocity.com/apiHub/performanceManagement/v1/companies/companyId/assessmentOrders/callback")

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

request = Net::HTTP::Put.new(url)
request["testMode"] = '<boolean>'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"callbackDetails\": {\n    \"successCallbackUrl\": \"<string>\",\n    \"errorCallbackUrl\": \"<string>\",\n    \"jobCreationCallbackUrl\": \"<string>\"\n  },\n  \"callerDetails\": {\n    \"callerName\": \"<string>\",\n    \"key_0\": {}\n  },\n  \"apiKey\": \"<string>\",\n  \"orderLevel\": \"Assessment\"\n}"

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

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

HttpResponse<String> response = Unirest.put("https://api.paylocity.com/apiHub/performanceManagement/v1/companies/companyId/assessmentOrders/callback")
  .header("testMode", "<boolean>")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"callbackDetails\": {\n    \"successCallbackUrl\": \"<string>\",\n    \"errorCallbackUrl\": \"<string>\",\n    \"jobCreationCallbackUrl\": \"<string>\"\n  },\n  \"callerDetails\": {\n    \"callerName\": \"<string>\",\n    \"key_0\": {}\n  },\n  \"apiKey\": \"<string>\",\n  \"orderLevel\": \"Assessment\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.paylocity.com/apiHub/performanceManagement/v1/companies/companyId/assessmentOrders/callback', [
  'body' => '{
  "callbackDetails": {
    "successCallbackUrl": "<string>",
    "errorCallbackUrl": "<string>",
    "jobCreationCallbackUrl": "<string>"
  },
  "callerDetails": {
    "callerName": "<string>",
    "key_0": {}
  },
  "apiKey": "<string>",
  "orderLevel": "Assessment"
}',
  'headers' => [
    'Accept' => 'application/json',
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'testMode' => '<boolean>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.paylocity.com/apiHub/performanceManagement/v1/companies/companyId/assessmentOrders/callback");
var request = new RestRequest(Method.PUT);
request.AddHeader("testMode", "<boolean>");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"callbackDetails\": {\n    \"successCallbackUrl\": \"<string>\",\n    \"errorCallbackUrl\": \"<string>\",\n    \"jobCreationCallbackUrl\": \"<string>\"\n  },\n  \"callerDetails\": {\n    \"callerName\": \"<string>\",\n    \"key_0\": {}\n  },\n  \"apiKey\": \"<string>\",\n  \"orderLevel\": \"Assessment\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "testMode": "<boolean>",
  "Accept": "application/json",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "callbackDetails": [
    "successCallbackUrl": "<string>",
    "errorCallbackUrl": "<string>",
    "jobCreationCallbackUrl": "<string>"
  ],
  "callerDetails": [
    "callerName": "<string>",
    "key_0": []
  ],
  "apiKey": "<string>",
  "orderLevel": "Assessment"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.paylocity.com/apiHub/performanceManagement/v1/companies/companyId/assessmentOrders/callback")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```