# Account Registry

## **Getting Started with RapidSOS Account Registry**

The Account Registry API allows partners to store and manage Uniform Resource Identifiers(URIs) and associated data. This data can be used for your Emergency Workflow integration as well as accounting/invoicing purposes. 

This documentation provides detailed information about common use cases, relevant API endpoints, request and response structures, and error handling.

### **Managing your data**

There are 2 ways to manage data in the Account Registry: 
1. Tech Partner interacts directly with the API following the [Account Registry Open API spec](https://developer.rapidsos.com/tech_partners/default/account-registry-v-1-0-0-oas3-1)
2. Tech Partner *preloads* accounts with RapidSOS using the [Emergency Workflow API](https://developer.rapidsos.com/tech_partners/default/rapidsos-account-preloading-api-v-1-0-0), which can serve as a validation layer before inserting Account Registry data following the same requirements detailed in this documentation. 
    * ***Currently only available when using RapidSOS Monitoring services in the US*** 


> **Note**: In all use cases, your organization is fully responsible for maintaining records



Regardless of *how* you choose to manage the Account Registry, the requirements listed below are followed. 

## **Account Registry Requirements**
The Account Registry API provides different ways to upload, delete, and lookup URIs depending on the solution. 

**NOTE**: *The URI provided must match exactly what you are sending within your Emergency Workflow payload, if used.*

Below are the most common types of Account Registry Integrations. 

### **Node Count**
If your organization needs to report count of users with access to RapidSOS for billing purposes

Example requests and schemas can be found here: [POST /bulk_insert](/tech_partners/default/account-registry-v-1-0-0-oas3-1#/Bulk%20inserting%20URIs%20into%20the%20registry/post_bulk_insert)

### **Node & Product**
If your organization needs to report both count of users and specific product type offered through RapidSOS for billing purposes.

Example requests and schemas be found here: [POST /bulk_insert](/tech_partners/default/account-registry-v-1-0-0-oas3-1#/Bulk%20inserting%20URIs%20into%20the%20registry/post_bulk_insert)

#### **Standard Client Solutions**
*Also known as Product Type*. Can be used in other Registry Schemas such as:
* Commercial & Residential
* School Safety

| Solution | Account Registry Value |
| --- | --- |
| Data Connect | DC |
| Data Connect + Voice | DCV |
| Monitoring | M |
| Active Assailant | AA|
| Silent Panic | Silent_Panic |
| Anxious Moments | Anxious_Moments|
| Agent Chat | Agent Chat |

**Note**: *Additional values may be added as needed per integration*

### **Commercial & Residential**
If your organization is providing services to Commercial or Residential clients.

Example requests and schemas can be found here: [POST /bulk_insert](/tech_partners/default/account-registry-v-1-0-0-oas3-1#/Bulk%20inserting%20URIs%20into%20the%20registry/post_bulk_insert)

#### **Permit Number and Expiration**
Some jurisdictions require permit numbers to dispatch. 

If a residential client has an alarm, they should have their permit number available once they register the alarm with their jurisdiction. 

If your end user does not have this, they can contact their local city hall to register and provide this number. 

> **If there is a jurisdiction that requires permits to dispatch and a permit is not on file - dispatch may be denied per ordinance. RapidSOS does not keep a running list of which areas actively require permit numbers.**
> 
> **Best practice is to require residential end users to provide this prior to activating service.**


### **School Safety**

Example requests and schemas can be found here: [POST /bulk_insert](/tech_partners/default/account-registry-v-1-0-0-oas3-1#/Bulk%20inserting%20URIs%20into%20the%20registry/post_bulk_insert)


### **Puller**

If RapidSOS will be querying out to your database to pull information for display on the RapidSOS portal, custom schemas can be arranged. It is recommended to review the [Account Registry OpenAPI spec](https://developer.rapidsos.com/tech_partners/default/account-registry-v-1-0-0-oas3-1) for a general understanding of the API's capabilities*:

Example requests and schemas can be found here: [POST /bulk_insert](/tech_partners/default/account-registry-v-1-0-0-oas3-1#/Bulk%20inserting%20URIs%20into%20the%20registry/post_bulk_insert)

## **Testing the Account Registry**
In order to begin testing the Account Registry, follow the instructions on our [Getting Started](https://developer.rapidsos.com/tech_partners/default/getting-started) page. 

## **Best Practices**
* Automatically update end users within the RapidSOS Account Registry when they begin or terminate service.
* If you trigger an Emergency Workflow solution and are expected to manage the Account Registry, but do not insert the account beforehand --> RapidSOS will insert the record and append a `manually_added` boolean set to `true` 
    * RapidSOS *will not* deny the emergency service, unless explicitly specified in the contract.
    * Manually added records will be reconciled during the billing process with your RapidSOS Administrator
