> This page is for API, version 2026-01-01 (Stable) (default).
> For other versions, use one of these documentation indexes:
> - 2026-01-01 (Stable) (default): https://developer.deel.com/api/stable/llms.txt

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

# Retrieve the Global Payroll worker creation schema

GET https://api.letsdeel.com/rest/gp/workers/creation-schema

Returns the fields POST /rest/gp/workers accepts, with whether each is required, its permitted values and its validation rules. Pass country, or legal_entity_id and payroll_group_id, to get the rules that apply to that case: contract_state and its provinces, work_location for US entities, postal code format, allowed currencies and the employee_number requirement of a Payroll Connect group. Build the form from this response and the create will not reject it.

 **Token scopes**: `contracts:read`

 **Beta**: this version requires the `X-Beta: true` request header and its contract may change before it is promoted to stable. It is scheduled to become stable on 2027-01-12.

Reference: https://developer.deel.com/api/reference/endpoints/global-payroll/retrieve-gp-worker-creation-schema-v-2026-10-01

## Authentication

- `Authorization` header (bearer token, required) — ## Authentication The Deel API uses bearer tokens to authenticate requests. All API calls must be made over HTTPS — calls over plain HTTP or without authentication will fail. ```curl curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \ -H 'Authorization: Bearer YOUR-TOKEN-HERE' ``` [Learn more about authentication](/api/authentication)
- `Authorization` header (bearer token, required) — Standard OAuth2 security scheme based on https://swagger.io/docs/specification/authentication/

## Servers

- `https://api.letsdeel.com/rest` (Production, default)
- `https://api-staging.letsdeel.com/rest` (Demo)

## Request

### Query parameters

- `country` (string, optional) — ISO 3166-1 alpha-2 country of the legal entity. Adds the country rules. Must match the legal entity when legal_entity_id is also given.
- `legal_entity_id` (string, optional) — Legal entity of your organization. Its country is used and the currencies it may pay in are returned.
- `payroll_group_id` (string, optional) — Payroll group of the legal entity. When it is a Payroll Connect (Soft GP) group, employee_number is reported as required. Requires legal_entity_id.

### Headers

- `X-Beta` (enum, required, default: true) — Opts in to the beta version of this endpoint. Must be `true`.
  - Allowed values: `true`

## Response

### 200

The fields the create endpoint accepts for the given context.

- `data` (list of GpWorkersCreationSchemaGetResponsesContentApplicationJsonSchemaDataItems, required) — Fields accepted by POST /rest/gp/workers. A field absent from the list is not accepted for the given country.

## Errors

### 400 Bad Request Error

Bad request. Codes: validation_error (a query parameter is invalid, or country does not match the legal entity country).

- `errors` (list of GpWorkersCreationSchemaGetResponsesContentApplicationJsonSchemaErrorsItems, required)

### 401 Unauthorized Error

The authentication is missing or is invalid.

- `errors` (list of GpWorkersCreationSchemaGetResponsesContentApplicationJsonSchemaErrorsItems, required)

### 403 Forbidden Error

The token does not grant the contracts:read scope.

- `errors` (list of GpWorkersCreationSchemaGetResponsesContentApplicationJsonSchemaErrorsItems, required)

### 404 Not Found Error

The legal entity does not exist or does not belong to your organization.

- `errors` (list of GpWorkersCreationSchemaGetResponsesContentApplicationJsonSchemaErrorsItems, required)

### 500 Internal Server Error

An unexpected error occurred.

- `errors` (list of GpWorkersCreationSchemaGetResponsesContentApplicationJsonSchemaErrorsItems, required)

## Types

### GpWorkersCreationSchemaGetResponsesContentApplicationJsonSchemaDataItems

- `key` (string, required) — Field to send, exactly as the create endpoint accepts it. Dotted for nested objects.
- `type` (enum, required) — Transport type of the field.
  - Allowed values: `string`, `number`, `boolean`, `object`, `array`
- `is_required` (boolean, required) — Whether the field must be provided for the given country, legal entity and payroll group.
- `default` (any, optional) — Value applied when the field is omitted.
- `validation` (list of GpWorkersCreationSchemaGetResponsesContentApplicationJsonSchemaDataItemsValidationItems, optional) — Constraints applied to the value.
- `is_nullable` (boolean, optional) — Whether null is an accepted value.
- `dependencies` (list of GpWorkersCreationSchemaGetResponsesContentApplicationJsonSchemaDataItemsDependenciesItems, optional) — Other fields this field is conditional on.
- `values_allowed` (list of any, optional) — Permitted values, when the field is restricted to a fixed set. For contract_state these are the provinces of the country.

### GpWorkersCreationSchemaGetResponsesContentApplicationJsonSchemaErrorsItems

- `code` (string, required) — Machine-readable error code.
- `message` (string, required) — Human-readable explanation of the error.
- `field` (string, optional) — Path of the request field the error refers to, when the error is caused by a single field.
- `details` (GpWorkersCreationSchemaGetResponsesContentApplicationJsonSchemaErrorsItemsDetails, optional) — Extra machine-readable context. Conflict errors carry the worker_id and contract_id of the existing record; currency_not_allowed carries allowed_currencies.

### GpWorkersCreationSchemaGetResponsesContentApplicationJsonSchemaDataItemsValidationItems

- `type` (string, required) — Constraint name, e.g. pattern, max, length, format, not_allowed.
- `field` (string, optional) — Field this constraint is relative to, when the bound references another field.
- `value` (any, optional) — Constraint argument, when the constraint is a literal.
- `message` (string, optional) — Error message the create endpoint returns when the constraint fails.

### GpWorkersCreationSchemaGetResponsesContentApplicationJsonSchemaDataItemsDependenciesItems

- `field` (string, required) — Field this one depends on.
- `equals` (list of any, optional) — Values of the referenced field that trigger the condition.

### GpWorkersCreationSchemaGetResponsesContentApplicationJsonSchemaErrorsItemsDetails

Extra machine-readable context. Conflict errors carry the worker_id and contract_id of the existing record; currency_not_allowed carries allowed_currencies.

- `worker_id` (string, optional, nullable) — Id of the existing worker the request conflicts with.
- `contract_id` (string, optional, nullable) — Id of the existing contract the request conflicts with.
- `allowed_currencies` (list of string, optional) — Currencies the legal entity may pay in, when the requested currency is not allowed.

## Examples

**Response**

```json
{
  "data": [
    {
      "key": "legal_entity_id",
      "type": "string",
      "is_required": true,
      "validation": [
        {
          "type": "guid"
        }
      ]
    },
    {
      "key": "contract_state",
      "type": "string",
      "is_required": true,
      "values_allowed": [
        null,
        null,
        null,
        null
      ]
    },
    {
      "key": "home_address.zip",
      "type": "string",
      "is_required": true,
      "validation": [
        {
          "type": "pattern",
          "value": null
        }
      ]
    },
    {
      "key": "fte_percentage",
      "type": "number",
      "is_required": false,
      "dependencies": [
        {
          "field": "employment_type",
          "equals": [
            null
          ]
        }
      ]
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.letsdeel.com/rest/gp/workers/creation-schema"

querystring = {"country":"CA","legal_entity_id":"b4f1a6c2-5d3e-4f8a-9c21-7e0d6a3b1f55","payroll_group_id":"pg_2f9c1e7a"}

headers = {
    "X-Beta": "true",
    "Authorization": "Bearer <token>"
}

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

print(response.json())
```

```javascript
const url = 'https://api.letsdeel.com/rest/gp/workers/creation-schema?country=CA&legal_entity_id=b4f1a6c2-5d3e-4f8a-9c21-7e0d6a3b1f55&payroll_group_id=pg_2f9c1e7a';
const options = {method: 'GET', headers: {'X-Beta': 'true', Authorization: 'Bearer <token>'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.letsdeel.com/rest/gp/workers/creation-schema?country=CA&legal_entity_id=b4f1a6c2-5d3e-4f8a-9c21-7e0d6a3b1f55&payroll_group_id=pg_2f9c1e7a"

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

	req.Header.Add("X-Beta", "true")
	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
require 'uri'
require 'net/http'

url = URI("https://api.letsdeel.com/rest/gp/workers/creation-schema?country=CA&legal_entity_id=b4f1a6c2-5d3e-4f8a-9c21-7e0d6a3b1f55&payroll_group_id=pg_2f9c1e7a")

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

request = Net::HTTP::Get.new(url)
request["X-Beta"] = 'true'
request["Authorization"] = 'Bearer <token>'

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.get("https://api.letsdeel.com/rest/gp/workers/creation-schema?country=CA&legal_entity_id=b4f1a6c2-5d3e-4f8a-9c21-7e0d6a3b1f55&payroll_group_id=pg_2f9c1e7a")
  .header("X-Beta", "true")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.letsdeel.com/rest/gp/workers/creation-schema?country=CA&legal_entity_id=b4f1a6c2-5d3e-4f8a-9c21-7e0d6a3b1f55&payroll_group_id=pg_2f9c1e7a', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'X-Beta' => 'true',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/gp/workers/creation-schema?country=CA&legal_entity_id=b4f1a6c2-5d3e-4f8a-9c21-7e0d6a3b1f55&payroll_group_id=pg_2f9c1e7a");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Beta", "true");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Beta": "true",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.letsdeel.com/rest/gp/workers/creation-schema?country=CA&legal_entity_id=b4f1a6c2-5d3e-4f8a-9c21-7e0d6a3b1f55&payroll_group_id=pg_2f9c1e7a")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```