Listing Service Packages
List service packages belonging to your workspace.
The list service package endpoint allows you to retrieve a paginated list of the service packages in your workspace. We also support filtering by id and time ranges.
Endpoint
Method | Url |
---|---|
GET | /v1.0/service-packages |
Request Parameters
The filter string. See the Filtering section for details on member filtering. Additionally, check the filtering documentation for more information.
The page size for search result pagination. If not provided, the service will default to 50 items.
The page to fetch. If any, this would be the next_page_token
value returned from the previous request.
Sample Request
Copied1curl -X GET 'https://api.worklayer.com/v1.0/service-packages' \2-H 'Authorization: Bearer {token}'
Response
The service packages belonging to that workspace. See the service package reference page.
The pagination token to retrieve the next page of results. If the value is ""
, it means no further results for the request.
Sample Response
Copied1{2 "data": [3 {4 "id": "21e42d52-4145-465e-94bd-322c13bbe5fa",5 "name": "1040 Tier 1",6 "type": "PERSONAL",7 "description": "Service Package Description",8 "create_time": "2022-08-23T13:54:27.612477Z",9 "modified_time": "2022-08-23T13:54:27.612477Z",10 "required_questions": []11 },12 {13 "id": "82c9366f-a34b-4315-a2a8-d88c3757d289",14 "name": "1065 Business Return Services",15 "type": "BUSINESS",16 "description": "Service Package Description",17 "create_time": "2022-08-23T13:54:27.612477Z",18 "modified_time": "2022-08-23T13:54:27.612477Z",19 "required_questions": []20 }21 ],22 "next_page_token": "NDlmYmRlZjgtNThmNC00OTViLWI0ODItNDY5MzI2YzExOTA5LFBhY2thZ2UrVGVzdGluZytRdWVzdGlvbitUeXBlcw"23}
Filtering
The following fields are supported:
Field | Comparators | Description | Example |
---|---|---|---|
id | = | The id of a service package. | id = "21e42d52-4145-465e-94bd-322c13bbe5fa" |
create_time | = , != , > , >= , < , <= | The creation time of a service package. | create_time >= "2022-01-01T12:00:00Z" |
modified_time | = , != , > , >= , < , <= | The modified time of a service package. | modified_time =< "2022-12-31T23:59:59Z" |
AND
and OR
are allowed when combining filters.
Sample Request with Filters
Copied1curl -X GET 'https://api.worklayer.com/v1.0/service-packages?filter=id="21e42d52-4145-465e-94bd-322c13bbe5fa" OR id="82c9366f-a34b-4315-a2a8-d88c3757d289" \2-H 'Authorization: Bearer {token}'
Errors
Forbidden
: API Client cannot list service packages.Unauthorized
: API Client does not have valid credentials.BadRequest
: Either the filter provided is in an incorrect format, or there was a malformed request.