Organization API (beta)

The Organization API is an optional extension of the Partner API. It enables partners to group multiple practices into a single organization and allows certain users to switch between practices from the same group. This setup is ideal for practices that are owned or managed by the same parent organization.

Basic Concepts

  • Every Practice is associated with one Organization. 
  • Multiple practices can belong to the same organization. 
  • When you create a new Practice, you can specify an OrganizationId. If no OrganizationId is specified, a new organization will be created automatically.
  • It's possible to move a Practice from one organization to another.

Jump to a Section

Authentication

Just like the Partner API, every HTTP request needs to contain your Partner API Key embedded in an authentication header named X-Auth-Key.

X-Auth-Key:xxxxxxxxxxxxxxxxxxxxxxxxx

In order to obtain your API key, reach out to your point of contact at IntakeQ.

Never expose your Partner API key in plain text (config files, source control) or use it on client side code that runs in the browser. The Partner API Key is extremely sensitive and should only be used on server-to-server requests. 

Base URL

All partner endpoints are located under the following URL: https://intakeq.com/api/partner/organizations/

An example of a typical API call would look like this:

[GET] https://intakeq.com/api/partner/organizations?id=123

List Organizations

Use this method to get a list of organizations for your environment.

[GET] https://intakeq.com/api/v1/partner/organizations

This method returns a JSON object representing an array of organizations.

[
    {
        Id: "43b471c0877aa6ec92556b041",    
        Name: "Healthcare Inc.",    
        ExternalId: "123",    
        DateCreated "yyyy-MM-ddThh:mm:ss.000Z"
    },
    ....
]

Get Organizations

Use this method to retrieve one organization by ID or External ID.

[GET] https://intakeq.com/api/v1/partner/organizations/[id]

This method returns a JSON object representing one organization.

{
    Id: "43b471c0877aa6ec92556b041",    
    Name: "Healthcare Inc.",    
    ExternalId: "123",    
    DateCreated "yyyy-MM-ddThh:mm:ss.000Z"
}

Create Organization

Use this method to create a new Organization.

[POST] https://intakeq.com/api/v1/partner/organizations

The body of the POST request should contain a JSON object in the following format:

{
    Name: "Healthcare Inc.",    
    ExternalId: "123", //optional
}

If an ExternalId is provided, you can later retrieve the organization by using the ExternalId.

A successful response to this method will return the same object with an additional Id field and a DateCreated field. It's a common practice to store the practice Id in your own database.

Response example:

{
    Id: "43b471c0877aa6ec92556b041",    
    Name: "Healthcare Inc.",    
    ExternalId: "123",    
    DateCreated "yyyy-MM-ddThh:mm:ss.000Z"
}

Update Organization

Use this method to update an Organization.

[PUT] https://intakeq.com/api/v1/partner/organizations

The body of the PUT request should contain a JSON object in the following format:

{
    Id: "43b471c0877aa6ec92556b041",
    Name: "Healthcare Inc.",    
    ExternalId: "1234", //optional
}

Either the Id or the ExternalId should be provided. If you are trying to update the ExternalId, the Id field is mandatory.

Response example:

{
    Id: "43b471c0877aa6ec92556b041",    
    Name: "Healthcare Inc.",    
    ExternalId: "1234",    
    DateCreated "yyyy-MM-ddThh:mm:ss.000Z"
}

Delete Organization

Use this method to delete an Organization.

[DELETE] https://intakeq.com/api/v1/partner/organizations/[id]

For the id parameter in the URL above, you can use the organization ID or External ID.

This method will fail if any practices belong to this organizaton. You should move practices to another organization before deleting one.

Move Practice

Use this method to move one practice from one organizaton to another.

[POST] https://intakeq.com/api/v1/partner/organizations/movePractice

The body of the POST request should contain a JSON object in the following format:

{
    OrganizationId: "43b471c0877aa6ec92556b041", //ID or ExternalId
    PracticeId: "123", //ID or ExternalPracticeId 
    DeleteOriginalOrganization: false
}

A successful operation will return the Practice object

Get User Access

Use this method to get the access information for an assistant in its organization.

[GET] https://intakeq.com/api/v1/partner/organizations/userAccess/[userId]

The userId parameter in the URL above should be an Assistant ID. ExternalAssistantId is not supported in this endpoint.

The response will contain a JSON object in the following format:

{
    UserId: "43b471c0877aa6ec92556b041", //The ID of the assistant
    PracticeIds: ["123", "456"], //The IDs of each practice this user can access  
    CanAccessAllPractices: true, //User can access all practices in org
}

Update User Access

Use this method to specify which practices an Assistant can access inside an organization.

[POST] https://intakeq.com/api/v1/partner/organizations/userAccess

The body of the POST request should contain a JSON object in the following format:

{
    UserId: "43b471c0877aa6ec92556b041", //The ID of the assistant
    PracticeIds: ["123", "456"], //The IDs of each practice this user can access  
    CanAccessAllPractices: true, //User can access all practices in org
}

Note: The PracticeIds field must contain at least one practice, unless the CanAccessAllPractices is set to true.

Still need help? Contact Us Contact Us