Skip to content

WorkGroupSupplier

A WorkGroupSupplier represents the assignment of a supplier to a work group. Links a Unit (supplier) to a WorkGroup.

Use this API to:

  • Assign suppliers to a job role, work phase, or homogeneous group
  • Find all suppliers in a work group (filter by work_group_id)
  • Find all work groups a supplier belongs to (filter by unit_id)

Supports historicization.

Version
2.0.0
OpenAPI version
3.0.0

Security scheme type: oauth2

Flow type: password

Token URL: https://auth.4hse.com/realms/4hse/protocol/openid-connect/token

Security scheme type: apiKey

Query parameter name: access-token

POST
/v2/work-group-supplier/index

Returns a paginated list of supplier-work group assignments.

Most useful filters:

  • work_group_id: all suppliers in a specific work group
  • unit_id: all work groups a supplier belongs to

Parameters for searching

object
filter
object
work_group_supplier_id
string format: uuid
work_group_id
string format: uuid
unit_id
string format: uuid
code

Supplier code.

string
name

Supplier name.

string
created_at

Creation timestamp.

integer
updated_at

Last modification timestamp.

integer
work_group_code
string
work_group_name
string
work_group_type
string
Allowed values: WORK_PLACE HGROUP JOB
work_group_description
string
nullable
office_name
string
office_code
string
project_name
string
project_type
string
Allowed values: safety template
owned_active

Whether this assignment is currently active.

boolean
nullable
parent_active

Whether the parent entities are currently active.

boolean
nullable
per-page
integer
default: 100 >= 1
page
integer
default: 1 >= 1
sort
string
Allowed values: name code work_group_name work_group_code
history

If true, includes historicized entries.

boolean
Example
{
"filter": {
"work_group_id": "3a4b5c6d-7e8f-9012-abcd-ef3456789012"
},
"per-page": 20,
"page": 1,
"sort": "name"
}

List of supplier-work group assignments

Array<object>
object
work_group_supplier_id
string format: uuid
work_group_id
string format: uuid
unit_id
string format: uuid
code

Supplier code.

string
name

Supplier name.

string
created_at

Creation timestamp.

integer
updated_at

Last modification timestamp.

integer
work_group_code
string
work_group_name
string
work_group_type
string
Allowed values: WORK_PLACE HGROUP JOB
work_group_description
string
nullable
office_name
string
office_code
string
project_name
string
project_type
string
Allowed values: safety template
owned_active

Whether this assignment is currently active.

boolean
nullable
parent_active

Whether the parent entities are currently active.

boolean
nullable
X-Pagination-Current-Page
integer

Current page

X-Pagination-Page-Count
integer

Total number of pages

X-Pagination-Per-Page
integer

Number of items per page

X-Pagination-Total-Count
integer

Total number of items

POST
/v2/work-group-supplier/create

Assigns a supplier to a work group.

Requires work_group_id and unit_id. The work_group_supplier_id is auto-generated if not provided.

Assignment to create

object
work_group_supplier_id

Unique identifier. Auto-generated if not provided.

string format: uuid
work_group_id
required

The work group. Pass the work_group_id from the WorkGroup API.

string format: uuid
unit_id
required

The supplier. Pass the unit_id from the Unit API.

string format: uuid

Supplier assigned to work group successfully

object
work_group_supplier_id

Unique identifier. Auto-generated if not provided.

string format: uuid
work_group_id
required

The work group. Pass the work_group_id from the WorkGroup API.

string format: uuid
unit_id
required

The supplier. Pass the unit_id from the Unit API.

string format: uuid
GET
/v2/work-group-supplier/view/{id}

Retrieves a single assignment by its ID.

id
required
string format: uuid

The work_group_supplier_id to retrieve.

Assignment found

object
work_group_supplier_id
string format: uuid
work_group_id
string format: uuid
unit_id
string format: uuid
code

Supplier code.

string
name

Supplier name.

string
created_at

Creation timestamp.

integer
updated_at

Last modification timestamp.

integer
work_group_code
string
work_group_name
string
work_group_type
string
Allowed values: WORK_PLACE HGROUP JOB
work_group_description
string
nullable
office_name
string
office_code
string
project_name
string
project_type
string
Allowed values: safety template
owned_active

Whether this assignment is currently active.

boolean
nullable
parent_active

Whether the parent entities are currently active.

boolean
nullable

Assignment not found

PUT
/v2/work-group-supplier/update/{id}

Updates an existing assignment.

id
required
string format: uuid

The work_group_supplier_id to update.

Fields to update

object
work_group_supplier_id

Unique identifier. Auto-generated if not provided.

string format: uuid
work_group_id
required

The work group. Pass the work_group_id from the WorkGroup API.

string format: uuid
unit_id
required

The supplier. Pass the unit_id from the Unit API.

string format: uuid

Assignment updated successfully

object
work_group_supplier_id

Unique identifier. Auto-generated if not provided.

string format: uuid
work_group_id
required

The work group. Pass the work_group_id from the WorkGroup API.

string format: uuid
unit_id
required

The supplier. Pass the unit_id from the Unit API.

string format: uuid

Assignment not found

DELETE
/v2/work-group-supplier/delete/{id}

Deletes a supplier-work group assignment.

If force=false (default), the response lists child entities. If force=true, the assignment is deleted.

id
required
string format: uuid

The work_group_supplier_id to delete.

force
boolean

If true, deletes the assignment.

Assignment deleted successfully

Preview of entities that would be deleted (returned when force=false)