List packages
curl --request GET \
--url https://api.stage.origin.one/api/v2/packages \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.stage.origin.one/api/v2/packages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stage.origin.one/api/v2/packages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "789",
"name": "DOT Pre-Employment Drug Test",
"object": "package",
"locationIds": [
"456"
],
"services": [
{
"id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"name": "5 Panel Urine Drug Screen",
"object": "service",
"type": "labBasedToxicology",
"url": "/api/v2/services/a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11"
}
],
"url": "/api/v2/packages/789"
}
],
"limit": 10,
"page": 1,
"total": 1
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}Packages
List packages
Returns the active packages assigned to the companies linked to the API token or to their locations, ordered by name. Filterable by name and location. Requires the package.list scope.
GET
/
api
/
v2
/
packages
List packages
curl --request GET \
--url https://api.stage.origin.one/api/v2/packages \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.stage.origin.one/api/v2/packages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stage.origin.one/api/v2/packages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "789",
"name": "DOT Pre-Employment Drug Test",
"object": "package",
"locationIds": [
"456"
],
"services": [
{
"id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"name": "5 Panel Urine Drug Screen",
"object": "service",
"type": "labBasedToxicology",
"url": "/api/v2/services/a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11"
}
],
"url": "/api/v2/packages/789"
}
],
"limit": 10,
"page": 1,
"total": 1
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}Authorizations
Origin One API token. Pass it in the Authorization header: Authorization: Bearer <token>.
Query Parameters
Number of items per page (max 20).
Required range:
1 <= x <= 20Example:
10
Page of results to return (1-based).
Required range:
1 <= x <= 10000Example:
1
Filter to the packages a location offers: its own, or its company’s when it has none of its own. A location that is inactive, deleted, or not under a company linked to the API token returns an empty page.
Example:
"456"
Filter by package name (case-insensitive partial match).
Required string length:
1 - 255Example:
"pre-employment"