GET /api/case/actions/download/{caseId}?messageId=
The Hi Marley REST API offers an endpoint to download any Hi Marley case transcript from your organization as either a JSON payload or PDF Transcript. This endpoint also has the ability to pull single messages based on their messageId.
View technical documentation with sample request and response payloads hosted on Postman.
Table of Contents
- Download Case Transcript API Flow
- JSON Case Transcript Response Breakdown
- Examples
- Common Errors to Handle
Download Case Transcript API Flow
Below are the steps the Hi Marley system takes when receiving an API request to create a case.
- Validates the caseId exists in Hi Marley.
- Generate Transcript and a short-lived AWS link.
- Responds with 302 Status Code with the AWS link to the transcript within the location header.
Required Fields
- Hi Marley CaseId (Path Parameter): UUID of Hi Marley case.
Optional Fields
- Accept (Header): Indicate type of API response that is expected.
- application/json: Transcript received as JSON Payload.
- application/pdf: Transcript received as PDF file.
- Message Id (Query Parameter): UUID of a specific message from the case that is being downloaded.
Example URL
https://integration.himarley.io/api/case/actions/download/88eac1d7-1245-4840-a9232-37vb28a71094
JSON Case Transcript Response Breakdown
API Examples
Download PDF Transcript
Request
URLhttps://integration.himarley.io/api/case/actions/download/88eac1d7-1245-4840-a9232-37vb28a71094
Headers
Accept: application/pdf
Response
HTTP/1.1 302
Content-Type: application/json
Content-Length: 0
Connection: keep-alive
Date: Thu, 19 Jan 2023 14:56:39 GMT
x-amzn-RequestId: 9be4d417c-f205-48dd-3248ea8-fa623215ba0862ed
x-amz-apigw-id: e_sGEHxsrw232oAMFiTA=
Location: <AWS Link to Transcript>
X-Amzn-Trace-Id: Root=1-63c95a26-4b2ace1c244266e33d379bcd
X-Cache: Miss from cloudfront
Via: 1.1 acb31c1e922360be31edf0371abdc7a3a4.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: EWR54F3-P1
X-Amz-Cf-Id: Ft_9ldXxVfjlfadwEJ4dlVA1248muGBajw_uR7a40IR2ntgz951213oTtwvAQ==
Download JSON Transcript
Request
URL
https://integration.himarley.io/api/case/actions/download/ba20212c-ea0c-4a1d-b73e-7ddf9f6595c3
Headers
Accept: application/json
Response
{
"caseData": {
"id": "ba20212c-ea0c-4a1d-b73e-7ddf9f6595c3",
"archived": false,
"claimNumber": "000-00-000203",
"dateOfLoss": "2023-01-16T00:01:00.000Z",
"policyNumber": "54-123456"
},
"state": "open",
"caseType": "claim",
"customer": {
"id": "4dffff-8e07-40fb-awew308-b41f44bb64e7",
"first": "Jean-Luc",
"last": "Picard",
"email": "",
"mobile": "+15553431701",
"role": "enduser",
"optStatus": true,
"optStatusDetail": "OPTED_IN"
},
"primaryContact": {
"id": "ddabde-1ad2-4cb4-970c-315f6aab7",
"first": "Steven",
"last": "Colon",
"email": "steven.j.colon@loveableinsurance.marley",
"mobile": "15555559213",
"role": "operator"
},
"createTime": "2023-01-31T16:23:19.705Z",
"creationSource": "PublicApi",
"referenceId": "000-00-000203",
"privacy": "public",
"marleyNumber": "+12018624699",
"languagePreference": "en"
"messages": [
{
"id": "98b71187-3119-4e39-89db-9e8744f031c3",
"type": "text",
"formatting": "ai",
"data": "Hi Jean-Luc, thanks for reporting your claim #000-00-000203. Your representative's name is Steven Colon.",
"channelSource": "ai",
"createdAt": "2023-01-31T16:23:19.809Z",
"dateFormatted": "01-31-2023",
"timeFormatted": "11:23:19 AM EST"
},
{
"id": "c017f03c-1c84-4f96-b19d-45a1676a8121",
"type": "text",
"formatting": "standard",
"data": "Hi",
"channelSource": "mobile",
"author": {
"_id": "4d66ffff-8e07-40fb-a308-b41f44bb64e7",
"role": "enduser",
"profile": {
"firstName": "Jean-Luc",
"lastName": "Picard"
}
},
"createdAt": "2023-01-31T16:24:09.156Z",
"dateFormatted": "01-31-2023",
"timeFormatted": "11:24:09 AM EST"
}
]
}
Download Single Message JSON
Retrieve the message data for a single message based on the messageId.
Request
URLhttps://integration.himarley.io/api/case/actions/download/ba20212c-ea0c-4a1d-b73e-7ddf9f6595c3?messageId=3994432e-6fe4-400f-b858-b5c436d65b82
Headers
Accept: application/json
Response
HTTP/1.1 200 Content-Type: application/json
Content-Length: 1308
Date: Thu, 02 Feb 2023 06:39:22 GMT
x-amzn-RequestId: 57ef6155-5b37-4213-a295-fd09d3213a69
{
"caseData": {
"id": "ba20212c-ea0c-4a1d-b73e-7ddf9f6595c3",
"archived": false,
"claimNumber": "000-00-000203",
"dateOfLoss": "2023-01-16T00:01:00.000Z",
"policyNumber": "54-123456"
},
"state": "open",
"caseType": "claim",
"customer": {
"id": "4d66fff-8e07-40fb-a08-b414e7",
"first": "Jean-Luc",
"last": "Picard",
"email": "",
"mobile": "+15553431701",
"role": "enduser",
"optStatus": true,
"optStatusDetail": "OPTED_IN"
},
"primaryContact": {
"id": "1ad2-4cb4-970c-315730f6aab7",
"first": "Steven",
"last": "Colon",
"email": "steven.j.colon@loveableinsurance.marley",
"mobile": "15555559213",
"role": "operator"
},
"createTime": "2023-01-31T16:23:19.705Z",
"creationSource": "PublicApi",
"referenceId": "000-00-000203",
"privacy": "public",
"marleyNumber": "+12018624699",
"languagePreference": "en",
"messages": [
{
"id": "3994432e-6fe4-400f-b858-b5c436d65b82",
"type": "text",
"formatting": "ai",
"data": "Hi Jean-Luc, thanks for reporting your claim #000-00-000203. Your representative's name is Steven Colon.",
"channelSource": "ai",
"createdAt": "2023-01-31T16:23:19.809Z",
"dateFormatted": "01-31-2023",
"timeFormatted": "11:23:19 AM EST"
}
]
}
Common Errors to Handle
Case Not Found
Description
The Case ID is not found for your organization in Hi Marley.
Example
{
"errors": [
{
"code": "CaseNotFound",
"category": "NotFound",
"retryable": false,
"status": 404,
"detail": "No case found for caseId 222 for your organization",
"path": "/case/actions/download/{caseId}",
"method": "GET",
"requestId": String-UUID
}
]
}
Blank Message Array
Description
The message array does not have any messages caused by the messageId provided not existing within this case.
Possible Resolution
- Retry API call with corrected CaseId or MessageId.
Comments
0 comments
Please sign in to leave a comment.