{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"a8bb8a82-8031-4417-8fe4-20fdd9f277af","name":"GrowPath External API V2.0","description":"# Quickstart\n\nOutside integrators may use this API to perform a variety of tasks within GrowPath. This guide will not go into the details about all the integrations, but instead will cover one of the most common use-cases: Creating an intake in the system based on a contact information form, with addition custom fields.\n\nTo begin with, this API, v2 of our external API, a REST API with JSON requests and responses. For GET requests, we do not use JSON, but instead use parameter encoding, where some of the parameters may be JSON, but not necessarily all. Each request should have the correct headers set for sending and accepting json, and each request should be accompanied by the correct `Authorization` header using a bearer token with the API token generated from the GrowPath API Admin pages. You can request this token from the firm admin.\n\n### Authentication Process\n\nTo be able to use the API V2 endpoints, you first need to authenticate using a bearer token, which you can get in Firm Admin menu, clicking on one of the options highlighted below:\n\n<img src=\"https://content.pstmn.io/dbc1e5f8-65e4-4db3-94b3-28454547f6a9/VTJOeVpXVnVjMmh2ZENBeU1ESTBMVEF5TFRJeElHRjBJREV4TGpVNUxqSTM0b0N2UVUwdWNHNW4ucG5n\">\n\nIf you are not able to see the `API Management` , you need to enable the `api_management__manage`  \npermission for your current role:\n\n<img src=\"https://content.pstmn.io/1d847942-2297-48fc-8159-83f8cc6820ba/YVcxaFoyVXVjRzVuLnBuZw==\">\n\nOnce you are allowed to browse to `API Management` page, you will see something like the screenshot below. There, you will be able to create `New API Key`s or `Edit` existing ones (buttons hightlighted in red). Once, you've created an API Key, you can copy it using the button highlighted in blue.\n\n<img src=\"https://content.pstmn.io/4f253d00-30e9-4c01-ae6c-561948cbd9b6/VlRKT2VWcFhWblZqTW1oMlpFTkJlVTFFU1RCTVZFRjVURlJKZUVsSFJqQkpSRVY1VEdwQk0weHFTWG8wYjBOMlZVVXdkV05ITlc0dWNHNW4ucG5n\">\n\nOnce you have obtained the API Key from GrowPath, you need to add it to your API V2 collection as follows:\n\n- First:\n    - Go to `Collections`\n    - Click on `Growpath External API V2.0`\n    - Click on the `Authorization` tab\n    - Make sure the `Type` and `Token` fields are set as follows:\n\n<img src=\"https://content.pstmn.io/b07a3ddb-d686-439c-ac6c-7c4f0efe8d67/VTJOeVpXVnVjMmh2ZENBeU1ESTBMVEF5TFRJeElHRjBJREV1TURBdU5UbmlnSzlRVFM1d2JtYz0ucG5n\">\n\n- Second:\n    - Go to `Collections`\n    - Then click on `Growpath External API V2.0`\n    - Click on the `Variables` tab\n    - Make sure you have the variables set up as in the screenshot\n\n<img src=\"https://content.pstmn.io/a69d8351-7034-490d-b1f2-f3e94b81707f/VlRKT2VWcFhWblZqTW1oMlpFTkJlVTFFU1RCTVZFRjVURlJKZUVsSFJqQkpSRVY1VEdwUmVreHFUVFUwYjBOMlZVVXdkV05ITlc0dWNHNW4ucG5n\">\n\n- Third\n    \n\nIf you ar using a postman `Environment` to test the API, e.g. I'm using an environment I named `local`:\n\n<img src=\"https://content.pstmn.io/5c6d26e5-e794-4fb9-a54c-6053c3d17ff9/VTJOeVpXVnVjMmh2ZENBeU1ESTBMVEF5TFRJeElHRjBJREV1TURjdU16VGlnSzlRVFM1d2JtYz0ucG5n\">\n\nIn that case, you need to make sure your collection variables are not set in your environment variables. But, if the variables are set in the environment, you might want them to have the same values you specified above:\n\n<img src=\"https://content.pstmn.io/e3bf4abc-208b-4b45-bd0f-1035f16b0b53/VlRKT2VWcFhWblZqTW1oMlpFTkJlVTFFU1RCTVZFRjVURlJKZUVsSFJqQkpSRVYxVFZSbmRVMXFhbWxuU3psUlZGTTFkMkp0WXowdWNHNW4ucG5n\">\n\n##### Testing Authentication on an endpoint\n\nTo test our token is valid and works, let's try making a request on the Matter Type Index endpoint:\n\n<img src=\"https://content.pstmn.io/36fd95d5-2f88-4719-b90a-d01643b27a54/VTJOeVpXVnVjMmh2ZENBeU1ESTBMVEF5TFRJeElHRjBJREV1TWprdU1EZmlnSzlRVFM1d2JtYz0ucG5n\">\n\nAnd this would be the same request, but using CURL:\n\n``` bash\ncurl --location --globoff 'https://customer.growpath.com/api/v2/matter_types' \\\n  --header 'Authorization: Bearer REPLACE_WITH_YOUR_TOKEN'\n\n ```\n\n### API Structure\n\nThe basic structure of the API is that there are multiple endpoints representing the different types of models that exist within the system. Most models support read, create, and update operations. In addition, many of these endpoints support bulk operations (upsert and delete). For the use case described above, the relevant models are:\n\n- `Entity - Person`: This would be the person filling out the intake form. Usually, you'd associate First Name, Last Name, Phone Number, Email with this model\n- `Matter`: This is a representation of the actual intake itself. This will include things like the date of incidence, intake type, and current status. When creating an intake, you must specify several things, including the claimant id (which would be the person id you get back when you create a person via the API), case type (which needs to be an `intake` case type either from the firm admin or from the `Matter Type` endpoint), and the case status (which needs to be one of the matter statuses listed for the given case _type_, and usually corresponds to what phase the intake is in).\n- `Questionnaires` and `Answers`: These are the endpoints used to collect information about what questionnaires are available in the system, what questions they have (of what types) and allows API users to upload `Answers` to those questions. For the basic use case, you'd most likely be wanting to submit just one or two question answers when finishing the intake submission\n- `Matter Involvements`: This is a way to attach additional entities to an intake, but for the basic use case, you only need to worry about attaching a single person to the intake: the claimant.\n    \n\nNow that the basic models are out of the way, here would be a simple example of creating an intake with one or two questions answered using curl:\n\n- Assume that you collected several ids already, either from the relevant API endpoints, or from the firm admin. These could be collected on the fly when you make your request, or set as configuration values, as the IDs of these items shouldn't change unless the firm admin wants to use different matter types/statuses/etc\n- Matter Type:\n    - Name: Test Type\n    - Id: 5\n    - This matter type must be `for_intake: true` if you're trying to create intakes\n- Matter Status:\n    - Name: New\n    - Id: 9\n- Race:\n    - Name: Asian\n    - Id: 13\n- Email Address Type:\n    - Name: Work\n    - Id: 18\n- Phone Type:\n    - Name: Mobile\n    - Id: 21\n- Mailing Address Type:\n    - Name: Home\n    - Id: 81\n- Involvement Type:\n    - Name: Claimant\n    - Id: 98\n\n``` bash\ncurl --location --request POST 'https://sandbox.growpath-staging.com/api/v2/entities/person' \\\n--header 'Authorization: Bearer TOKEN' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"entity\": {\n        \"first_name\": \"Bob\",\n        \"last_name\": \"Hope\",\n        \"middle_name\": \"Johnny\",\n        \"race_id\": 13,\n        \"email_addresses\": [\n          \"name\": \"bobby@test.com\",\n          \"email_address_type_id\": 18\n        ]\n    }\n}'\n\n ```\n\nIn the JSON response, you'll get back the resulting entity id. You'll need to save this for the next step. Assume the ID we got back was `62`. Next, we would create the actual intake\n\n``` bash\ncurl --location --request POST 'https://sandbox.growpath-staging.com/api/v2/matters' \\\n--header 'Authorization: Bearer TOKEN' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"matter\": {\n        \"case_type_id\": 5,\n        \"claimant_id\": 62,\n        \"case_status_id\": 9,\n        \"case_date_of_incident\": \"01/01/2023\"\n    }\n}'\n\n ```\n\nThis step will also return the intake/matter id. You'll need to use this in other steps as well, so ensure that you save it, Let's assume it was `100356`. We'll need to add the claimant as an involvement to this matter as well:\n\n``` bash\ncurl --location --request POST 'https://sandbox.growpath-staging.com/api/v2/matters/100356/matter_involvements' \\\n--header 'Authorization: Bearer TOKEN' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"matter_involvement\": {\n        \"matter_id\": 100356,\n        \"involvee_id\": 62,\n        \"adversarial\": false,\n        \"party_involvement_type_ids\": [\n          98\n        ]\n    }\n}'\n\n ```\n\nNote the matter id in the URL as well as the body of the JSON object. You'll get an ID back from this, but for the simple use case, you may ignore it. At this point, the intake is created with the basic claimant information you supplied. In many cases, clients may want to attach additional information to the intake. One example may be the cost of their vehicle. This is usually implemented as custom Question on the matter, associated to a customer questionnaire. You can query the available questionnaires via the Questionnaires endpoint, but let's assume you've already located the custom question id in the questionnaire applicable to the matter:\n\n- Question:\n    - Name: Customer Reported Vehicle Cost\n    - Id: 347\n\nThere are different types of custom questions, some of which have a list of predefined options you can select. These are available with the Questionnaire API as well, but let's assume the customer entered `$10,000` as the answer to that field.\n\n``` bash\ncurl --location --request POST 'https://sandbox.growpath-staging.com/api/v2/answers/bulk_upsert' \\\n--header 'Authorization: Bearer TOKEN' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"answer\": {\n        \"upsert\": [\n            {\n                 \"question_id\": 347,\n                 \"matter_id\": 100356,\n                 \"value\": \"$10,000\"\n            }\n        ]\n    }\n}'\n\n ```\n\nOnce this is complete, the intake should be visible in the GrowPath search, with the correct claimant information and additional fields.\n\n### Base Field Types\n\n``` typescript\n//// Base types\n// Date strings should follow the format \"MM/DD/YYYY\"\ntype DateValue = String\n// A string with either true or false\ntype BoolValue = \"true\" | \"false\"\n// Phone number without leading +1 or other characters. Ex: \"9128922260\"\ntype PhoneValue = String\n// RecordIds are usually references to other models within GrowPath.\n// You'll often need to query other endpoints to get a list of valid options\ntype RecordId = Integer\n// This is a reference to a record via the record's name (instead of the ID).\n// In some cases, the intake API will create the corresponding record for you.\n// In other cases, you may need to check a different api endpoint for a list of valid options\ntype RecordName = String\n\n ```\n\n**Note:** For fields of type `RecordId` and `RecordName`, there are endpoints in the API to fetch records, so the API user will be able to provide valid ids for these fields. See the `RecordIds and RecordNames Endpoints` section within the description for each Create/Update endpoint.\n\n### **Pagination**\n\nThe API supports pagination, allowing clients to retrieve large sets of data in manageable chunks.\n\nThe API pagination divides the results into \"pages,\" each containing a fixed number of items. Clients can request specific numbers or items in the pages by specifying the `per_page` parameter in the request.\n\n- `per_page`: This parameter specifies the number of items you wish to receive on each page.\n    \n\nIf the `per_page` parameter is not provided, the API will default the number of items per page to 10.\n\n``` bash\ncurl --location -g 'https://customer.growpath.com/api/v2/email_address_types?per_page=8'\n\n ```","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"22857671","team":3885635,"collectionId":"a8bb8a82-8031-4417-8fe4-20fdd9f277af","publishedId":"2s935iv6p5","public":true,"publicUrl":"https://documenter-api.postman.tech/view/22857671/2s935iv6p5","privateUrl":"https://go.postman.co/documentation/22857671-a8bb8a82-8031-4417-8fe4-20fdd9f277af","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-single-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.12.8","publishDate":"2024-02-22T21:17:57.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"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/354c3a81cab908ea29accb8299f8a16924860ab2be9c902434dea0bb7a8a78d4","favicon":""},"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"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2s935iv6p5"}