Using Postman with the MerusCase API

Below are the steps on how to set up Postman, how to query for info, and how to add or update new information to your firm through the API. For additional questions or help please contact [email protected].

Warning

We are not an affliliate of Postman, and are just providing an example of us for one of the most common softwares used in the interaction with our API. Use at your own risk!

The MerusCase philosophy centers around having one unified, centralized system to manage a firm’s needs in everything across documents, emailing, calendaring, billing, and more.

Initial Setup

  1. Download Postman for your appropriate OS (operating system) from this link here.

  2. Open Postman and you’ll be greeted with a few items, we’ve highlighted the most relevant parts.

  1. Fill out your HTTP request method (GET, POST, PATCH, PUT, DELETE, etc).

  2. Fill out your request URL field. Every MerusCase API call will begin with ‘https://api.meruscaes.com/’ followed by the path endpoint.

  3. Complete the settings for your request parameters, authorization, headers, body, etc.

Once you have Postman installed, please navigate to the ‘Authorization’ tab located in Section 3 of our screenshot above and refer to the next section below.

Which authentication type do I use?

To be able to make requests in Postman, you must first enter in authorization credentials or a token (depending on the auth method) to access your firm’s data. MerusCase supports the Basic Auth, Bearer Token, and OAuth2.0 authentication options in Postman.

Please refer to the table below for which method you should use.

Basic Auth Bearer Token / OAuth 2.0
Has access to a MerusCase account Does not have access to a MerusCase account
The API is used for scripting and debugging purposes App is registered through the Merus API
App does not ask for or collect MerusCase credential Single app or firm developers
  MerusCase vendors and partners

Getting Authentication

  1. In Postman, select the ‘Authorization’ tab under the request URL field and click on the ‘Type’ drop down menu.

  2. Please refer below for steps for each supported auth method.

Basic Authorization

  1. In Postman, select the ‘Authorization’ tab under the request URL field, and click on the ‘Type’ drop down menu.

  2. Select ‘Basic Authorization’ and then two fields will appear on the right-hand side asking for a username and password.

  3. Enter in your MerusCase username and password.

  4. You’re good to go! Feel free to navigate between other tabs such as the ‘Params,’ ‘Body,’ ‘Headers,’ etc.

Bearer Token / OAuth 2.0

  1. Please refer to here on how to set up your app and to receive your bearer token.

  2. Once you receive your bearer token, navigate to Postman, select the ‘Authorization’ tab under the request URL field, and click on the ‘Type’ drop down menu.

  3. Select either ‘Bearer Token’ or ‘OAuth 2.0’ from the drop down menu and a field will appear on the right-hand side asking for a token.

  4. Paste your token into that field.

  5. You’re good to go! Feel free to navigate between other tabs such as the ‘Params,’ ‘Body,’ ‘Headers,’ etc.

Using the GET request with the MerusCase API

The best use of the GET request is to pull activity, case file, case ledger, contact, event, etc. information through the MerusCase API, see below for information on how.

Initial Setup

In this example, we’ll be taking a known case_file_id from a single case in our firm and getting all the information for it such as the case type, case status, branch office attached, party info, etc. using the endpoint described here.

  1. The HTTP method is set to GET to retrieve data and information from the API for the specified case.

  2. This is my request URL, using the base url of ‘https://api.meruscase.com/’ and the path ‘caseFiles/view/:case_file_id’ retrieved from the link above.

Notice that ‘:case_file_id’ has a colon at the beginning, making it into a path variable.

  1. Select the ‘Params’ tab in Postman and enter in the parameters and values following the link as described above.

For this specific GET request, we only need the case_file_id which we’ve filled under the ‘Keys’ and ‘Value’ fields of the the ‘Path Variables’ section.

Sending the GET request and receiving a response

When sending a request to our API in Postman, you should receive a response in the ‘body’ section below. The response at the very least includes the ID of your requested item but sometimes there may be more response items depending on the API call, seen above.

  1. Click ‘send’ to send your GET request.

  2. Observe a ‘200 OK’ status to verify that the request was successful.

  3. Observe at the bottom of Postman that an ID was returned successfully, in this case the ID of our specified case as well as additional case info such as the ‘case_type_id’ and ‘case_status_id.’ These values are linked to specific types and labels. For example: “case_type_id”: “1” has the value of ‘1,’ which is linked to the Workers’ Compensation case type, making this case a workers’ comp case.

These systemwide values can be referenced here.

Using the POST request with the MerusCase API

The best use of the POST request is when you want to add activities, case ledgers, activity types, events, etc to cases within your firm through the API, see below for information on how.

Initial Setup

In this example, we’ll be adding an activity to a case in our firm using the API following the endpoints and parameters as described here.

  1. The HTTP method is changed to POST so that we can send the data through the API to log an activity in the specified case.

  2. This is my request URL, using the base url of ‘https://api.meruscase.com/’ and the path ‘activities/add’ retrieved from the link above.

  3. Select the ‘Body’ tab in Postman and select ‘form-data’ as the data type. Enter in the parameters and values following the link as described above.

The values for ‘data[Activity][activity_type_id][]’ was retrieved from our list of systemwide values, which can be referenced here.

Sending the POST request and receiving a response

When sending a request to our API, you should receive a response in the body of postman just as you did for the GET request above.

  1. Click ‘send’ to send your POST request.

  2. Observe a ‘200 OK’ status to verify that the request was successful.

  3. Observe at the bottom of Postman that an ID was returned successfully, in this case the ID of our new activity generated in our firm’s case.

Viewing the POST request in MerusCase

Our activity was successfully added through the API!

The activity was created in the correct case as set by the ‘[case_file_id]’ parameter and has the activity type of ‘Note’ and description ‘Hello from Postman!’ set by the ‘[activity_type_id]’ and ‘[activity]’ parameters.

Additional API Endpoints

For more information on API points with the MerusCase system see our Endpoints documentation and API Example Calls. For further assistance or questions reach out to [email protected].