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

# List Occupations

GET https://stg-api.sqril.io/listOccupations

Returns ISCO-08 occupation codes and/or legacy OCC1–OCC11 codes for use in `registerCustomer` / `updateCustomer` `occupation`.

**Authentication:**

* **REQUIRED**: Basic Auth only.

**Query Parameters:**

* `format` (optional): `isco` (default), `legacy`, or `all`.
* `level` (optional): Integer 1–4. Filters ISCO entries by hierarchy level. Ignored when `format=legacy`.

**Response (`format=isco`):**

* `occupations`: Array of `{ code, level, title, legacy_occ }`
* `format`, `count`, and `level` (when provided)

**Response (`format=legacy`):**

* `occupations`: Array of `{ code, title, isco_code }`
* `format`, `count`

**Response (`format=all`):**

* `isco` and `legacy` arrays, plus `count` object and optional `level`

**Notes:**

* Prefer ISCO-08 codes for new integrations. Legacy OCC1–OCC11 remain accepted for backward compatibility.
* Use returned `code` values as the `occupation` field on customer APIs.

Reference: https://docs.sqril.io/sqril-saa-s-api/payout-endpoints/list-occupations

## Authentication

- `Authorization` header (basic auth, required) — Basic Auth: base64(client_id:client_secret)

## Request

### Query parameters

- `format` (enum, optional, default: isco) — Optional: isco (default), legacy, or all
  - Allowed values: `isco`, `legacy`, `all`
- `level` (integer, optional) — Optional: Filter ISCO entries by hierarchy level (1–4). Ignored for format=legacy.

## Response

### 200

OK

- `occupations` (list of map from string to any, required)
- `format` (enum, required)
  - Allowed values: `isco`, `legacy`, `all`
- `count` (integer, required)
- `level` (integer, optional)

## Examples

### Success - 200 OK (ISCO)

**Response**

```json
{
  "occupations": [
    {
      "code": "1",
      "level": 1,
      "title": "Managers",
      "legacy_occ": "OCC1"
    },
    {
      "code": "2",
      "level": 1,
      "title": "Professionals",
      "legacy_occ": "OCC9"
    }
  ],
  "format": "isco",
  "count": 2,
  "level": 1
}
```

**SDK Code**

```python Success - 200 OK (ISCO)
import requests

url = "https://stg-api.sqril.io/listOccupations"

querystring = {"format":"isco"}

response = requests.get(url, params=querystring, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Success - 200 OK (ISCO)
const url = 'https://stg-api.sqril.io/listOccupations?format=isco';
const credentials = btoa("<username>:<password>");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

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

```go Success - 200 OK (ISCO)
package main

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

func main() {

	url := "https://stg-api.sqril.io/listOccupations?format=isco"

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

	req.SetBasicAuth("<username>", "<password>")

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

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

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

}
```

```ruby Success - 200 OK (ISCO)
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/listOccupations?format=isco")

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

request = Net::HTTP::Get.new(url)
request.basic_auth("<username>", "<password>")

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

```java Success - 200 OK (ISCO)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://stg-api.sqril.io/listOccupations?format=isco")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Success - 200 OK (ISCO)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://stg-api.sqril.io/listOccupations?format=isco', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

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

```csharp Success - 200 OK (ISCO)
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/listOccupations?format=isco");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```

```swift Success - 200 OK (ISCO)
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/listOccupations?format=isco")! 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()
```

### Success - 200 OK (legacy)

**Response**

```json
{
  "occupations": [
    {
      "code": "OCC1",
      "title": "C-Suite executive / Board member",
      "isco_code": "1120"
    },
    {
      "code": "OCC9",
      "title": "Professional",
      "isco_code": "2"
    },
    {
      "code": "OCC11",
      "title": "Student",
      "isco_code": "9629"
    }
  ],
  "format": "legacy",
  "count": 11
}
```

**SDK Code**

```python Success - 200 OK (legacy)
import requests

url = "https://stg-api.sqril.io/listOccupations"

querystring = {"format":"isco"}

response = requests.get(url, params=querystring, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Success - 200 OK (legacy)
const url = 'https://stg-api.sqril.io/listOccupations?format=isco';
const credentials = btoa("<username>:<password>");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

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

```go Success - 200 OK (legacy)
package main

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

func main() {

	url := "https://stg-api.sqril.io/listOccupations?format=isco"

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

	req.SetBasicAuth("<username>", "<password>")

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

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

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

}
```

```ruby Success - 200 OK (legacy)
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/listOccupations?format=isco")

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

request = Net::HTTP::Get.new(url)
request.basic_auth("<username>", "<password>")

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

```java Success - 200 OK (legacy)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://stg-api.sqril.io/listOccupations?format=isco")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Success - 200 OK (legacy)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://stg-api.sqril.io/listOccupations?format=isco', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

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

```csharp Success - 200 OK (legacy)
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/listOccupations?format=isco");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```

```swift Success - 200 OK (legacy)
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/listOccupations?format=isco")! 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()
```