cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/labours/0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d/cancel" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'from exsited import build_client
client = build_client()
response = client.labours.cancel_labour("0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d", {})
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.labours.cancelLabour('0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d', {});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->labours->cancelLabour('0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d', '{}');
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().cancelLabour(
"0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d",
Map.of());
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Labours.CancelLabourAsync(
"0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d",
new Dictionary<string, object?>());
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.labours.cancelLabour(
'0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d',
{},
);
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().CancelLabour(context.Background(), "0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d", map[string]any{}, 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
Cancel a labour
Makes a labour inactive and returns it under labour.
POST
/
labours
/
{labour_id}
/
cancel
cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/labours/0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d/cancel" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'from exsited import build_client
client = build_client()
response = client.labours.cancel_labour("0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d", {})
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.labours.cancelLabour('0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d', {});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->labours->cancelLabour('0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d', '{}');
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().cancelLabour(
"0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d",
Map.of());
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Labours.CancelLabourAsync(
"0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d",
new Dictionary<string, object?>());
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.labours.cancelLabour(
'0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d',
{},
);
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().CancelLabour(context.Background(), "0b6f3d2a-8c4e-4f1a-9d7b-2e5c8a1f3b6d", map[string]any{}, 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 an empty JSON object as the body. The labour’s
status becomes inactive, and the labour comes back under labour. Use reactivate to make it active again.
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, the same value the update and the read take.
Body
application/json
An empty object.
Response
200 - application/json
The labour, under labour.
Show child attributes
Show child attributes