curl --request POST \
--url https://api.stage.origin.one/api/v2/clinics/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.stage.origin.one/api/v2/clinics/search', 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/clinics/search"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": [
{
"address": {
"city": "Seattle",
"country": "US",
"line1": "123 Main St",
"line2": "Suite 400",
"object": "address",
"postalCode": "98101",
"state": "WA"
},
"id": "42",
"name": "Austin Downtown Clinic",
"object": "clinic",
"phone": "+1-512-555-0100",
"coordinates": {
"lat": 30.2672,
"long": -97.7431
},
"isActive": true,
"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/clinics/42",
"distance": {
"miles": 1.8
}
}
],
"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
}Search clinics
Returns active clinics owned by the API token’s tenant within radiusMiles of the given coordinates or address, nearest first. An address without line1 matches clinics in its state and postal code instead, ordered by name. Filterable by service and location. Requires the clinic.search scope.
curl --request POST \
--url https://api.stage.origin.one/api/v2/clinics/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.stage.origin.one/api/v2/clinics/search', 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/clinics/search"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": [
{
"address": {
"city": "Seattle",
"country": "US",
"line1": "123 Main St",
"line2": "Suite 400",
"object": "address",
"postalCode": "98101",
"state": "WA"
},
"id": "42",
"name": "Austin Downtown Clinic",
"object": "clinic",
"phone": "+1-512-555-0100",
"coordinates": {
"lat": 30.2672,
"long": -97.7431
},
"isActive": true,
"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/clinics/42",
"distance": {
"miles": 1.8
}
}
],
"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>.
Body
Number of items per page (max 20).
1 <= x <= 2010
Page of results to return (1-based).
1 <= x <= 100001
Search origin as a postal address; send this or coordinates, not both. Without line1, matches clinics in the same state and postal code, ordered by name, and radiusMiles does not apply.
Show child attributes
Show child attributes
Search origin as a point; send this or address, not both.
Show child attributes
Show child attributes
Only clinics assigned to this location. A location outside the API token’s access returns an empty page.
"123"
Search radius from the origin, in miles (max 150).
1 <= x <= 15025
Only clinics that offer every one of these services.
1Unique identifier of a service.