For the complete documentation index, see llms.txt. This page is also available as Markdown.

Sub Materials

Get sub-materials

get
/sub-materials/

This api is used to retrieve all sub materials from WorkorderApp. Each material record can contain the following data:

Parameter
Required
Type (size)

id

Y

Int (11)

parent_material_code

Y

Varchar (255)

sub_material_code

Y

Varchar(255)

sub_fixed_amount

Yes, when sub_type equals 'sub_fixed_amount'

Decimal

sub_calculation_amount

Yes, when sub_type equals 'sub_calculation_amount'

Decimal

sub_type

Y

Varchar (50) Can be: - sub_fixed_amount - sub_calculation_amount

visible

Y

Boolean

billable

Y

Boolean

created_at

N (read only)

Timestamp

updated_at

N (read only)

Timestamp

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
tokenstringOptionalExample: {{client_token}}
software_tokenstringOptionalExample: {{software_token}}
Responses
200

Response_200

No content

get/sub-materials/
GET /sub-materials/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Response_200

No content

Add sub-materials

post
/sub-materials/

This api is used to sync materials with WorkorderApp. Each material record can contain the following data:

Parameter
Required
Type (size)

parent_material_code

Y

Varchar (255)

sub_material_code

Y

Varchar(255)

sub_fixed_amount

Yes, when sub_type equals 'sub_fixed_amount'

Decimal

sub_calculation_amount

Yes, when sub_type equals 'sub_calculation_amount'

Decimal

sub_type

Y

Varchar (50) Can be: - sub_fixed_amount - sub_calculation_amount

visible

Y

Boolean

billable

Y

Boolean

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
tokenstringOptionalExample: {{client_token}}
software_tokenstringOptionalExample: {{software_token}}
Responses
200

Response_200

No content

post/sub-materials/
POST /sub-materials/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Response_200

No content

Delete sub-materials

delete
/sub-materials/

This api is used to sync materials with WorkorderApp. Each material record can contain the following data:

Parameter
Required
Type (size)

id

Y

int (11)

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
tokenstringOptionalExample: {{client_token}}
software_tokenstringOptionalExample: {{software_token}}
Responses
200

Response_200

No content

delete/sub-materials/
DELETE /sub-materials/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Response_200

No content

Last updated

Was this helpful?