/workorder/{workOrderId}/items v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Base URLs:
Work Orders
getWorkOrderIdItems
Code samples
const headers = {
Accept: "application/json",
Authorization: {
type: "string",
},
};
fetch("https://goldleaf.app/api/v1/workorder/{workOrderId}/items", {
method: "GET",
headers: headers,
})
.then(function (res) {
return res.json();
})
.then(function (body) {
console.log(body);
});
GET /workorder/{workOrderId}/items
Retrieve all line items for a specific work order with pagination support
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | true | Bearer token for authorization |
| workOrderId | path | string | true | Work order ID (MongoDB ObjectId) |
| page | query | integer | false | Page number for pagination |
| limit | query | integer | false | Number of items per page |
Example responses
200 Response
{
"type": "object",
"properties": {
"items": {
"type": "array",
"description": "List of item objects",
"items": {
"type": "object"
}
},
"total": {
"type": "integer",
"example": 0
},
"page": {
"type": "integer",
"example": 1
}
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | List of work order line items | Inline |
Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » items | [object] | false | none | List of item objects |
| » total | integer | false | none | none |
| » page | integer | false | none | none |
