{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"e9579cd8-6b6b-42fb-ad59-d98d63e17353","name":"Lawcus API","description":"Welcome to the Lawcus API Documentation. This documentation is the reference point for the users who want to create applications using the Lawcus API. You can integrate with the Lawcus API to create customized application as per your requirement.\n\n# Lawcus Overview\n\nLawcus is a legal practice management software that allows you to organize and manage various components of legal practice. You can use the features available in the Lawcus application to simplify the day-to-day workflows and business operations in your law firm.\n\nLawcus API gives you access to the core features available in the Lawcus application so that you can design and create an application that is best fitted to suit your organizational needs. In addition, you can access the Lawcus resources (matters, contacts, and leads) and perform various actions on them using the Lawcus API.\n\nLawcus API allows you to access the resources via multiple endpoints that can be used to access and manage data in Lawcus application. You can access these endpoints using the Lawcus API Server. The server has been installed in two different geographic regions. Depending on your requirements, you can access the Lawcus API via the following geographic regions:\n\n- USA (api.us.lawcus.com)\n- Europe (api.eu.lawcus.com)\n    \n\nEach endpoint defines an action that you can perform. For example, you can create a new matter using the [<i>https://api.us.lawcus.com/matters</i>](https://api.us.lawcus.com/matters) endpoint. Similarly, there are various other endpoints for each action in Lawcus. You can use these endpoints to interact with the Lawcus resources and create your system. Refer to the Lawcus API Documentation for further details on the API endpoints and their use.\n\n## Roles and Permissions\n\nLawcus uses role-based access control to allow or restrict access to critical information based on a users role. You can define roles and permissions for different users from the **Manage your organization** section in your Lawcus application.\n\nThere are two types of roles in the Lawcus application:\n\n- Default roles\n- Custom roles\n    \n\n### Default Roles\n\nThe Lawcus application supports the following default roles:\n\n**Admin**: The **Admin** role allows users to act as the ultimate owner of the application. Users in the admin role can create and manage new contacts and matters, access the financial information, and add new roles and new members.\n\n**Member**: The **Member** role allows users to create new matters and contacts and manage all the contacts and matters in the Lawcus application.\n\nThe following table summarizes the permissions for the admin and member roles.\n\n| Lawcus Resources | Admin | Member |\n| --- | --- | --- |\n| Account | Yes | No |\n| Invoice | Yes | No |\n| Reports | Yes | No |\n| CRM Reports | Yes | No |\n| Contacts | Yes | Yes |\n| Leads | Yes | Yes |\n| Matters | Yes | Yes |\n| Workflows | Yes | Yes |\n| Intake Forms | Yes | Yes |\n| Document Templates | Yes | Yes |\n| Team Activities | Yes | No |\n| Personal Activities | Yes | Yes |\n| Interactions | Yes | Yes |\n| Tasks | Yes | Yes |\n| User Management | Yes | No |\n\n### Custom roles\n\nIf the existing default roles do not suffice your organization needs, you can also define custom roles in the Lawcus application. The custom roles can have custom permission depending on your organization requirements. Only an admin user can add custom roles.\n\n---\n\n**NOTE**\n\n- The Lawcus API returns a **406 Error** if the user does not have the permission to access the Lawcus resources.\n    \n\n- Lawcus API endpoints accept and return the dates in the UTC time format only. Therefore, all dates should be in the _YYYY-MM-DD HH:mm:ss_ format.\n    \n\n---\n\n## Lawcus API Integration\n\nThe Lawcus API connects your application to the Lawcus application. To integrate the Lawcus API endpoints in your application, you must first register in Lawcus. You can contact the Lawcus Team to obtain your Lawcus application.\n\nOnce you are registered in Lawcus, you must contact the [Lawcus Team](https://desktop.postman.com/?desktopVersion=9.19.0&webVersion=9.21.2-ui-220603-1117&userId=15467115&teamId=1771794) to obtain your client ID and client secret key for API authentication. Then your application can request an access token from the Lawcus Authorization Server, extract the token from the response, and sends the token to the Lawcus API to fetch data from the server.\n\n# Authorization in the Lawcus API\n\nLawcus API uses Oauth2 to authenticate its clients and API requests. Oauth2 uses authentication tokens instead of passwords to authorize the API requests. Using the authentication token, you can make requests to fetch and modify the Lawcus data from your application.\n\nYou must follow the steps below to authenticate your application in Lawcus:\n\n## Step 1: Obtaining Oauth2 Credentials from Lawcus\n\nTo begin, you will need the OAuth2 credentials for your application. The OAuth2 credentials includes the **client ID** and **client secret key**.\n\nContact the [Lawcus Team](https://lawcus.com/contact-us) to obtain the credentials for Oauth authentication.\n\n## Step 2: Obtaining the Authorization Token\n\nAfter obtaining the Oauth2 credentials, follow the steps below to obtain the authentication token:\n\n|  | Description |\n| --- | --- |\n| client_id | Client ID. |\n| redirect_uri | Your application URL. |\n| response_type | Response type. The value of this parameter must be \"code\". |\n| state | State between the request and the callback. Optional parameter. |\n\n**Request URL:**\n\n```\nGET https://auth.lawcus.com/auth?response_type=code&state=&client_id=1234&scope=&redirect_uri=https://api-hostname/oauth\n\n ```\n\n**Grant Approved**:\n\nAfter the application is authenticated, the Lawcus API redirects you _redirect_uri_ along with the authorization code and the state of the request mentioned earlier.The authorization code is passed in the _code_ parameter in the url. You must use this code in the next step to obtain the authorization token.\n\n**Grant Approved Redirect URL:**\n\n```\n  https://your-application.com/oauth?code=fc70a440b1a911eb846a6140b7c6cb7a&state=xyz\n\n ```\n\n1. Obtain the access token required to authenticate your API requests. You must make a _POST_ request to the [<i>https://auth.lawcus.com/oauth/token</i>](https://auth.lawcus.com/oauth/token) url obtain the access token.\n    \n\n**Request URL:**\n\n```\n  https://auth.lawcus.com/oauth/token\n\n ```\n\n**Request Body Parameters:**\n\n| Parameter | Description |\n| --- | --- |\n| grant_type | Application grant type. The value of this parameter must be _authorization_code_. |\n| code | Authentication code. Value of the _code_ parameter obtained from step 1. |\n| redirect_uri | Your application URL. |\n| client_id | Client ID. |\n| client_secret | Client secret key. |\n\n**Request Body:**\n\n```\n {\n    \"code\": \"fc70a440b1a911eb846a6140b7c6cb7a\",\n    \"grant_type\": \"authorization_code\",\n    \"client_id\": \"1234\",\n    \"client_secret\": \"1234\",\n    \"redirect_uri\": \"https://your-application.com/oauth\"\n  }\n\n ```\n\n**Response Example:**\n\n```\n HTTP/1.1 200 OK\n {\n   \"access_token\":\"fd6cee60b1a911ebbebbf548c3991b60VZfd6cf170b1a911eb898b950834c3ffbf\",\n   \"refresh_token\":\"fd6cf1e0b1a911eb9f0f3b697f3cd8e6A63*@kjfd6cf240b1a911ebb59d7528e27c33d5\",\n   \"expires_in\":\"3660\",\n   \"region\":\"us\"\n }\n\n ```\n\n**Response Parameters:**\n\n| Parameter | Description |\n| --- | --- |\n| access_token | Access token for the API requests. |\n| refresh_token | Refresh token code required to generate a refresh token for the API requests. |\n| expires_in | Expiry time for the access token in seconds. |\n| region | Region of the API request. Value can be \"us\" for USA and \"eu\" or Europe. |\n\nYou can use the _access_token_ in each API request access data from Lawcus using the API.\n\nThe access token expires after the given time, you must make a _POST_ request to the [<i>https://auth.lawcus.com/oauth/token</i>](https://auth.lawcus.com/oauth/token) url with the following parameters to obtain a new access token:\n\n**Request Body Parameters:**\n\n| Parameter | Description |\n| --- | --- |\n| grant_type | Application grant type. The value of this parameter must be _refresh_token_. |\n| refresh_token | Refresh token code. Value of the _refresh_token_ parameter obtained from step 2. |\n| client_id | Client ID. |\n| client_secret | Client secret key. |\n\n**Request Body:**\n\n```\n {\n    \"grant_type\": \"refresh_token\",\n    \"client_id\": \"1234\",\n    \"client_secret\": \"1234\",\n    \"redirect_uri\": \"https://your-application.com/oauth\"\n  }\n\n ```\n\n**Response Example:**\n\n```\n  HTTP/1.1 200 OK\n {\n     \"access_token\": \"ede90e20b72f11eb8402cf457c1d45d2VZede910c0b72f11eb850b695ca8ee73a4\",\n     \"refresh_token\": \"ede91130b72f11eb98e4b570ce4f2ee4A63*@kjede91170b72f11eb9b73312727e4d8fc\",\n     \"expires_in\": \"3660\",\n     \"region\": \"us\"\n }\n\n ```\n\n**Response Parameters:**\n\n| Parameter | Description |\n| --- | --- |\n| access_token | Access token for the API requests. |\n| refresh_token | Refresh token code required to generate a refresh token for the API requests. |\n| expires_in | Expiry time for the access token in seconds. |\n| region | Region of the API request. Value can be \"us\" for USA and \"eu\" or Europe. |\n\n## Using the Authorization Token to access Lawcus APIs\n\nAfter obtaining the authorization token, you can use them to access the Lawcus APIs. You must pass the token in the request header in the following format:\n\n`Authorization: Oauth Bearer < access_token >`\n\nFor more information, you can watch the following demo video on how to obtain access token for Lawcus APIs using Postman:\n\n[Authorization in Lawcus using Postman](https://lawcus-assets.s3.amazonaws.com/video/lawcus.mp4)","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"15405515","team":1771794,"collectionId":"e9579cd8-6b6b-42fb-ad59-d98d63e17353","publishedId":"TzJrCKcK","public":true,"publicUrl":"https://docs.lawcus.com","privateUrl":"https://go.postman.co/documentation/15405515-e9579cd8-6b6b-42fb-ad59-d98d63e17353","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"3047ED"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.0","publishDate":"2021-05-24T17:53:08.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Production","id":"653b947b-3d86-448d-a883-0cdc144393aa","owner":"15405515","values":[{"key":"host","value":"https://api.us.lawcus.com","enabled":true},{"key":"frontend_host","value":"https://www.auth.lawcus.com","enabled":true}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/1b41123875b8aff44aa6b4aa1a27ff352157f1326850e51a0cc5ca9aa88925db","favicon":"https://res.cloudinary.com/postman/image/upload/v1631116815/team/yzpws19j82ldxzigirrz.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Production","value":"15405515-653b947b-3d86-448d-a883-0cdc144393aa"}],"canonicalUrl":"https://docs.lawcus.com/view/metadata/TzJrCKcK"}