cURL
curl -X PATCH "$EXSITED_BASE_URL/api/v4/labours/0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"labour": {
"description": "Certified electrician"
}
}'from exsited import build_client
client = build_client()
response = client.labours.update_labour(
"0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d",
{"labour": {"description": "Certified electrician"}},
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.labours.updateLabour('0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d', {
labour: {description: 'Certified electrician'},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->labours->updateLabour('0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d', [
'labour' => ['description' => 'Certified electrician'],
]);
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.Labour;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<Labour> response = client.labours().updateLabour(
"0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d",
Map.of("labour", Map.of("description", "Certified electrician")));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Labours.UpdateLabourAsync(
"0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d",
new Dictionary<string, object?>
{
["labour"] = new Dictionary<string, object?>
{
["description"] = "Certified electrician",
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.labours.updateLabour(
'0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d',
{
'labour': {'description': 'Certified electrician'},
},
);
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().UpdateLabour(context.Background(), "0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d", map[string]any{
"labour": map[string]any{"description": "Certified electrician"},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"labour": {
"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
}
}Labours
Update a labour
Updates a labour and returns it under labour.
PATCH
/
labours
/
{labour_uuid}
cURL
curl -X PATCH "$EXSITED_BASE_URL/api/v4/labours/0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"labour": {
"description": "Certified electrician"
}
}'from exsited import build_client
client = build_client()
response = client.labours.update_labour(
"0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d",
{"labour": {"description": "Certified electrician"}},
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.labours.updateLabour('0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d', {
labour: {description: 'Certified electrician'},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->labours->updateLabour('0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d', [
'labour' => ['description' => 'Certified electrician'],
]);
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.Labour;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<Labour> response = client.labours().updateLabour(
"0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d",
Map.of("labour", Map.of("description", "Certified electrician")));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Labours.UpdateLabourAsync(
"0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d",
new Dictionary<string, object?>
{
["labour"] = new Dictionary<string, object?>
{
["description"] = "Certified electrician",
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.labours.updateLabour(
'0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d',
{
'labour': {'description': 'Certified electrician'},
},
);
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().UpdateLabour(context.Background(), "0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d", map[string]any{
"labour": map[string]any{"description": "Certified electrician"},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"labour": {
"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
}
}Send the fields to change under
labour, such as description. The updated labour comes back under labour.
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. To send a raw JSON body instead of filling in fields, copy the cURL sample and edit its -d payload.Authorizations
An access token from POST /api/v4/oauth2/token. The SDKs get and renew it for you.
Path Parameters
The labour's id, as Create a labour and List labours return it. Despite the parameter name, pass the id.
Body
application/json
Show child attributes
Show child attributes
Response
200 - application/json
The updated labour, under labour.
Show child attributes
Show child attributes