QBOS REST API documentation (organization)

(return to Main Document)

Introduction

The organization API allows client applications to maintain organization data including any part of its demographic record sets.

Audience

This developer's guide is intended for software developers needing a technical reference for using the QBOS REST API. The information you find in this guide is written by software engineering, and is authoritative on how the API behaves.

Additional resources, information about this guide

Occasionally, we make a mistake in this documentation, or unknowingly break a feature that you depend on. If this has happened to you, we apologize! You can help us fix the issue by contacting us. We appreciate your help.

Getting Started

To place any request in QBOS API application from third party application you need to authenticate user account and set/calculate values for the following request headers: x-qbos-id, x-qbos-nonce, x-qbos-date-utc, x-qbos-hash-version, x-qbos-auth

See details in Authentication Documentation.

organization properties

Properties prefixed with '_' (underscore) are read-only properties. i.e. POST and PUT processing will ignore these properties.

Name Type Max length Numeric Required
For POST
Filterable Description

id

bigint

 

 

 

Required for GET(by id),PUT,DELETE

parent_id

bigint

 

yes

 

parent_type

nvarchar

50

 

yes

 

type

nvarchar

50

 

 

 

Value is "organization"

federalid

varchar

15

 

 

 

Nine digit number

name

nvarchar

80

 

yes

yes

create_date

varchar

10

 

 

 

language_id

int

 

 

 

0=Unknown, 1=English, 13=Spanish, 14=Dutch, 15=French, 16=German, 17=Greek, 18=Italian, 19=Japanese, 20=Korean, 21=Portuguese, 22=Russian, 23=Chinese-simp, 24=Chinese-trad, 25=British English, 26=El Salvador Spanish, 27=Hong Kong English

_example_utc_datetime

char

20

 

 

 

Read organization by id:

GET https:/.../v1/o/organization/{id}

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 404 - Not found or user does not have permission to access resources of this type.
  • 200 - OK

Response data: GET https:/.../v1/o/organization/945562
{ "linked" : {"address":[],"emailaddress":[],"phone":[]}, "parent_type" : "corporate", "type" : "organization", "parent_id" : 506764, "id" : 945562, "federalid" : "", "name" : "Compassionate Care Pharmacy", "create_date" : "2024-04-07", "language_id" : 0, "_example_utc_datetime" : "2024-05-03T19:01:04Z", "href" : "\/v1\/o\/organization\/945562" }

Create organization:

POST https:/.../v1/o/corporate/506764/organization

Request data [See properties]:

{"organization": [ { "parent_type" : "corporate", "parent_id" : 506764, "property_a" : "value-a", "property" : "See organization properties", "property_z" : "value-z" } ] }


Special Properties

The following special properties may be included in the POST of this object type in order to affect certain behaviors:
  • "subtype_data" : a comma-separated list of organization subtype attribute (any combination of subtype ids or names) to be assigned to the new organization record.
    Example: "subtype_data" : "122,176,Chaplain"


  • "parent_links" : a comma-separated list of pairs of relation tags (made up of "REL_" followed by a relationship id) and corresponding parent object ids. The new organization record will be linked up to the various parent objects via the respective parent link relation..
    Example: "parent_links" : "REL_1492=3829,REL_1502=672832"


  • "child_links" : a comma-separated list of pairs of relation tags (made up of "REL_" followed by a relationship id) and corresponding child object ids. The new organization record will be linked as a parent to the various child objects via the respective child link relation..
    Example: "child_links" : "REL_1492=3829,REL_1502=672832"

Response codes:

Update organization:

PUT https:/.../v1/o/organization/{id}

Request data [See properties]:

{"organization": [ { "id" : 945562, "property_a" : "value-a", "property" : "See organization properties", "property_z" : "value-z" } ] }

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 200 - OK Content returned [See response data]
  • 204 - OK No content
  • 404 - Not found

Delete organization:

DELETE https:/.../v1/o/organization/{id}

The "id" in JSON payload is required to match the {id} in the URI to ensure that deletion requests are intended and safe

{"organization": [{"id":945562}]}

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 204 - OK
  • 404 - Not found

Response data:
{}