curl --request GET \
--url https://api.stage.origin.one/api/v2/packages/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.stage.origin.one/api/v2/packages/{id}', 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/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"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"
}{
"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
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}Get a package
Returns an active package assigned to a company linked to the API token or to one of its locations. Returns 404 for any failure — does not reveal whether the package exists. Requires the package.read scope.
curl --request GET \
--url https://api.stage.origin.one/api/v2/packages/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.stage.origin.one/api/v2/packages/{id}', 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/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"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"
}{
"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
}{
"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>.
Path Parameters
Unique identifier of the resource.
"123"
Response
Success.
Unique identifier of the package.
"789"
Package name.
"DOT Pre-Employment Drug Test"
Object type; always package.
package "package"
Locations that offer the package, under companies linked to the API token: those it is assigned to, and those that inherit it from their company.
["456"]
Services the package includes, ordered by name.
Show child attributes
Show child attributes
Canonical path of this resource, relative to the API origin.
"/api/v2/packages/789"