cURL
curl -X GET "$EXSITED_BASE_URL/api/v4/labours?limit=20" \
-H "Authorization: Bearer $ACCESS_TOKEN"from exsited import build_client
client = build_client()
response = client.labours.get_labours({"limit": 20})
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.labours.getLabours({limit: 20});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->labours->getLabours(['limit' => 20]);
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.labours.labours_dto.LaboursDto.LabourList;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<LabourList> response = client.labours().getLabours(Map.of("limit", 20));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Labours.GetLaboursAsync(new Dictionary<string, object?> { ["limit"] = 20 });
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.labours.getLabours(queryParams: {'limit': 20});
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Labours().GetLabours(context.Background(), map[string]any{"limit": 20}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"data": [
{
"activity_logs": "<array>",
"code": "<string>",
"created_by": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"created_on": "<string>",
"custom_form": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"description": "<string>",
"display_name": "<string>",
"email_address": "<string>",
"href": "<string>",
"id": "<string>",
"image_name": null,
"labour_availability": "<array>",
"labour_contacts": [
{
"address_line_1": "<string>",
"address_line_2": "<string>",
"address_line_3": "<string>",
"address_line_4": "<string>",
"address_line_5": "<string>",
"city": "<string>",
"contact_type": "<string>",
"country": "<string>",
"designation": "<string>",
"email_address": "<string>",
"fax": {
"area_code": "<string>",
"country_code": "<string>",
"do_not_call": true,
"full": "<string>",
"number": "<string>"
},
"first_name": "<string>",
"id": "<string>",
"last_name": "<string>",
"middle_name": null,
"mobile": {
"area_code": "<string>",
"country_code": "<string>",
"do_not_call": true,
"full": "<string>",
"number": "<string>"
},
"object": "<string>",
"phone": {
"area_code": "<string>",
"country_code": "<string>",
"do_not_call": true,
"full": "<string>",
"number": "<string>"
},
"post_code": "<string>",
"receive_email": true,
"salutation": "<string>",
"state": "<string>",
"status": "<string>"
}
],
"labour_custom_availability": [
{
"available": true,
"end_time": "<string>",
"id": "<string>",
"object": "<string>",
"preferred_day": "<string>",
"start_time": "<string>"
}
],
"labour_profile": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"last_updated_by": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"last_updated_on": "<string>",
"name": "<string>",
"object": "<string>",
"status": "<string>",
"use_custom_availability": true,
"version": 123
}
],
"object": "<string>",
"pagination": {
"limit": 123,
"has_more": true,
"next_cursor": "<string>",
"prev_cursor": "<string>",
"links": {
"next": "<string>",
"prev": "<string>"
}
},
"url": "<string>"
}Labours
List labours
Lists labours, one page at a time.
GET
/
labours
cURL
curl -X GET "$EXSITED_BASE_URL/api/v4/labours?limit=20" \
-H "Authorization: Bearer $ACCESS_TOKEN"from exsited import build_client
client = build_client()
response = client.labours.get_labours({"limit": 20})
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.labours.getLabours({limit: 20});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->labours->getLabours(['limit' => 20]);
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.labours.labours_dto.LaboursDto.LabourList;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<LabourList> response = client.labours().getLabours(Map.of("limit", 20));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Labours.GetLaboursAsync(new Dictionary<string, object?> { ["limit"] = 20 });
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.labours.getLabours(queryParams: {'limit': 20});
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Labours().GetLabours(context.Background(), map[string]any{"limit": 20}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"data": [
{
"activity_logs": "<array>",
"code": "<string>",
"created_by": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"created_on": "<string>",
"custom_form": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"description": "<string>",
"display_name": "<string>",
"email_address": "<string>",
"href": "<string>",
"id": "<string>",
"image_name": null,
"labour_availability": "<array>",
"labour_contacts": [
{
"address_line_1": "<string>",
"address_line_2": "<string>",
"address_line_3": "<string>",
"address_line_4": "<string>",
"address_line_5": "<string>",
"city": "<string>",
"contact_type": "<string>",
"country": "<string>",
"designation": "<string>",
"email_address": "<string>",
"fax": {
"area_code": "<string>",
"country_code": "<string>",
"do_not_call": true,
"full": "<string>",
"number": "<string>"
},
"first_name": "<string>",
"id": "<string>",
"last_name": "<string>",
"middle_name": null,
"mobile": {
"area_code": "<string>",
"country_code": "<string>",
"do_not_call": true,
"full": "<string>",
"number": "<string>"
},
"object": "<string>",
"phone": {
"area_code": "<string>",
"country_code": "<string>",
"do_not_call": true,
"full": "<string>",
"number": "<string>"
},
"post_code": "<string>",
"receive_email": true,
"salutation": "<string>",
"state": "<string>",
"status": "<string>"
}
],
"labour_custom_availability": [
{
"available": true,
"end_time": "<string>",
"id": "<string>",
"object": "<string>",
"preferred_day": "<string>",
"start_time": "<string>"
}
],
"labour_profile": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"last_updated_by": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"last_updated_on": "<string>",
"name": "<string>",
"object": "<string>",
"status": "<string>",
"use_custom_availability": true,
"version": 123
}
],
"object": "<string>",
"pagination": {
"limit": 123,
"has_more": true,
"next_cursor": "<string>",
"prev_cursor": "<string>",
"links": {
"next": "<string>",
"prev": "<string>"
}
},
"url": "<string>"
}Returns one page of labours under
data, with pagination for the next page. Each labour carries its id, code, name, status, labour_profile, labour_contacts and availability. Any other field of the record filters the listing as filter_<field> or filter_<field>_<operator>.
The SDK samples get their client from credentials your app registers once when it starts, as shown in Authentication. To try the call here, click Try it, set
host to your Exsited API host name and paste an access token from Get an access token.Authorizations
An access token from POST /api/v4/oauth2/token. The SDKs get and renew it for you.
Query Parameters
How many records to return on one page.
Example:
20
The next_cursor of the previous page, to fetch the page after it.
The field to sort by; prefix it with - for descending order, such as -created_on.
Example:
"-created_on"