> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mygigsters.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve worker

> This endpoint allows you to get details of a worker using their unique worker ID.

### Headers

**X-API-Version** `string` *required* (default: 1.2)

The API version to use. Supported versions are `1.1` and `1.2`.

### Path Parameters

**worker\_id** `string` *required*

The unique identifier of the worker.

### Response Body

| Field | Type | Description |
| - | - | - |
| `status` | number | Indicates the status code of the response. |
| `message` | string | A message related to the worker details request. |
| `worker`object | object | The worker object containing detailed information. |
| ↳`id` | string | Unique identifier for the worker. |
| ↳`full_name` | string | The full name of the worker. |
| ↳`email` | string | The email address of the worker. |
| ↳`phone` | string | The phone number of the worker. |
| ↳`abn` | string | The Australian Business Number of the worker. |
| ↳`bsb` | string | The BSB number of the worker (Australian bank accounts). |
| ↳`account_number` | string | The bank account number of the worker. |
| ↳`account_name` | string | The name associated with the bank account of the worker. |
| ↳`is_early_pay_enabled` | boolean | Indicates whether early pay is enabled for the worker. |
| ↳`early_pay_rates` | number | The early pay rate/percentage for the worker. Returned only when early pay is enabled. |

### Response Codes

| Code | Description |
| - | - |
| 200 | If the request is successful, the details of the worker are returned. |
| 400 | Bad Request. Invalid format or parameters. |
| 401 | Unauthorized. Missing or invalid credentials. |
| 404 | Not Found. The specified workerId does not exist. |
| 500 | Internal Server Error. |

```bash cURL theme={null}
curl -X GET https://qa-payments.mygigsters.com.au/api/v1/worker/afd629c6-8e3d-4701-b168-dec8608130a5/details \
  -u "YOUR_UUID:YOUR_SECRET" \
  -H "X-API-Version: 1.2" \
  -H "Content-Type: application/json"
```

```javascript Node.js theme={null}
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/worker/afd629c6-8e3d-4701-b168-dec8608130a5/details", {
  method: "GET",
  headers: {
    Authorization: "Basic " + Buffer.from("YOUR_UUID:YOUR_SECRET").toString("base64"),
    "X-API-Version": "1.2",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
```

```python Python theme={null}
import requests

response = requests.get(
    "https://qa-payments.mygigsters.com.au/api/v1/worker/afd629c6-8e3d-4701-b168-dec8608130a5/details",
    auth=("YOUR_UUID", "YOUR_SECRET"),
    headers={
        "X-API-Version": "1.2",
        "Content-Type": "application/json",
    },
)

print(response.json())
```

```ruby Ruby theme={null}
require "net/http"
require "json"
require "uri"

uri = URI("https://qa-payments.mygigsters.com.au/api/v1/worker/afd629c6-8e3d-4701-b168-dec8608130a5/details")
request = Net::HTTP::Get.new(uri)
request.basic_auth("YOUR_UUID", "YOUR_SECRET")
request["X-API-Version"] = "1.2"
request["Content-Type"] = "application/json"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end

puts JSON.parse(response.body)
```

```php PHP theme={null}
<?php

$ch = curl_init("https://qa-payments.mygigsters.com.au/api/v1/worker/afd629c6-8e3d-4701-b168-dec8608130a5/details");

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_USERPWD => "YOUR_UUID:YOUR_SECRET",
    CURLOPT_HTTPHEADER => [
        "X-API-Version: 1.2",
        "Content-Type: application/json",
    ],
]);

$response = curl_exec($ch);
curl_close($ch);

print_r(json_decode($response, true));
```

```java Java theme={null}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.Base64;

public class Example {
    public static void main(String[] args) throws Exception {
        String credentials = Base64.getEncoder()
            .encodeToString("YOUR_UUID:YOUR_SECRET".getBytes());

        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/worker/afd629c6-8e3d-4701-b168-dec8608130a5/details"))
            .header("Authorization", "Basic " + credentials)
            .header("X-API-Version", "1.2")
            .header("Content-Type", "application/json")
            .method("GET", HttpRequest.BodyPublishers.noBody())
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());

        System.out.println(response.body());
    }
}
```

```go Go theme={null}
package main

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

func main() {
	req, err := http.NewRequest("GET", "https://qa-payments.mygigsters.com.au/api/v1/worker/afd629c6-8e3d-4701-b168-dec8608130a5/details", nil)
	if err != nil {
		panic(err)
	}
	req.SetBasicAuth("YOUR_UUID", "YOUR_SECRET")
	req.Header.Set("X-API-Version", "1.2")
	req.Header.Set("Content-Type", "application/json")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	data, _ := io.ReadAll(res.Body)
	fmt.Println(string(data))
}
```

```csharp .NET theme={null}
using System.Net.Http.Headers;
using System.Text;

using var client = new HttpClient();

var request = new HttpRequestMessage(HttpMethod.Get, "https://qa-payments.mygigsters.com.au/api/v1/worker/afd629c6-8e3d-4701-b168-dec8608130a5/details");
request.Headers.Authorization = new AuthenticationHeaderValue(
    "Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes("YOUR_UUID:YOUR_SECRET")));
request.Headers.Add("X-API-Version", "1.2");

var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
```

```json 200 theme={null}
{
  "status": 200,
   "message": "Worker found",
  "worker": {
    "id": 15,
    "full_name": "Jane Smith",
    "email": "jane.smith@example.com",
    "phone": "9888888882",
    "abn": "12345678910",
    "bsb": "123456", // Applicable for Australian bank accounts
    "account_number": "7482742424",
    "account_name": "Jane Smith"
    "is_early_pay_enabled": true, // Optional, default is false
    "early_pay_rates": "3" // percentage, required if isEarlyPayEnabled is true
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.