Description
The Retrieve Cases by Reference ID can retrieve all Hi Marley Cases associate with a reference Id (e.g. claim number for Claim Case Types, policy number for Policy Case Types, etc).
| Service Name | Retrieve Cases by Reference ID |
| Service Type | REST |
| Method | POST |
| UAT (Sandbox) URL | https://integration.uat.marley.ai/api/case/query |
| Production URL | https://integration.himarley.io/api/case/query |
| Technical Documentation | View technical documentation with sample request and response payloads hosted on Postman. |
API Request
Request Example
https://integration.uat.marley.ai/api/case/query
{
"referenceId": "claimNumber1023"
}
Request Body Breakdown
| Property | Description | Type | Required | Example |
| referenceId | The Reference ID associated with the Hi Marley Case. | string | true | "referenceId": "claimNumber1023" |
Optional Query Parameter partialMatch
https://integration.uat.marley.ai/api/case/query?partialMatch=true
- The optional partialMatch query param allows for increased flexibility on querying cases by referenceId's.
- When set to false (default), the endpoint will only return cases whose referenceId exactly matches the provided value.
- When set to true, the endpoint will return all cases whose referenceId contains the provided value as a substring, enabling partial or fuzzy matches.
Example:
https://integration.uat.marley.ai/api/case/query?partialMatch=false
{
"referenceId": "12345"
}- This query will only return cases where referenceId = 12345
https://integration.uat.marley.ai/api/case/query?partialMatch=true
{
"referenceId": "12345"
}- This query returns all cases that include 12345 as a substring, such as 0123456, AUTO12345, or 1-12345
Response Payload Example
{
"cases": [
{CASE OBJECT},
{
"caseData": {
"id": "2d434920-d816-4b9b-b2e1-b7772efaf374",
"archived": false,
"claimNumber": "claimNumber1023",
"dateOfLoss": "2023-04-01T08:33:39.048Z",
"policyNumber": "Vc93rw213872",
"brand": "Lovable Insurance"
},
"state": "open",
"caseType": "claim",
"customer": {
"id": "e318c055-5f42-4e8b-b262-bb275428b0e6",
"first": "Jean-Luc",
"last": "Picard",
"email": "captain@ncc1701d.org",
"mobile": "+15553431701",
"role": "enduser",
"optStatus": true,
"optStatusDetail": "OPTED_IN"
},
"primaryContact": {
"id": "5a3af0ad-9d72-4a16-872e-e262a330b9a7",
"first": "Steven",
"last": "Colon",
"email": "steven.colon@himarley.com",
"role": "operator"
},
"createTime": "2023-03-31T13:19:00.519Z",
"creationSource": "PublicApi",
"referenceId": "claimNumber1023",
"privacy": "public",
"marleyNumber": "+18126498271",
"languagePreference": "en",
"secondaryOperators": []
}
],
"pagination": {
"count": 2,
"currentPage": "/api/case/query?pageSize=10&page=1",
"totalPages": 1,
"pageSize": 10,
"nextPage": null,
"prevPage": null
}
}
Response Fields Breakdown
Property |
Element |
Description |
Type |
Required |
Example |
caseData |
id |
The case identifier for the Hi Marley Case. |
string |
true |
"id": "364ef9bb-fae5-4e2a-a746-cdca465a9c00" |
archived |
Indicates if case is closed. |
string |
true |
"archived": false |
|
claimNumber |
Fields associated to claim/policy record. |
string |
true (only claim caseType) |
"claimNumber": "0002383632" |
|
dateOfLoss |
string |
false |
"dateOfLoss": "2022-05-25T16:00:00.000Z" |
||
policyNumber |
string |
true (only policy caseType) |
|
||
deductible |
string |
false |
|
||
brand |
Subsidiary/Underwriter associated with case |
string |
true (only if brands are in-use) |
"brand": "TestBrand1" |
|
state |
|
The current status of the case state.
|
enum |
true |
"state": "open" |
caseType |
|
The type of Hi Marley Case.
|
enum |
true |
"caseType": "claim" |
customer |
id |
The identifier generated and assigned to the customer. |
string |
true |
"id": "3c2ea77a-5f3f-4260-8f46-5706d2ad7a28" |
first |
The customers given name. |
string |
true |
"first": "Chili" |
|
last |
The last name of the person assigned to the Hi Marley case. |
string |
true |
"last": "Palmer" |
|
The customers email address. |
string |
false |
"email": "chili.palmer@email.com" |
||
mobile |
The customers mobile number. |
string |
true |
"mobile": "+12032331100" |
|
role |
The customers role. Always set to enduser. |
enum |
true |
"role": "enduser" |
|
optStatus |
The current opt status for the customer. |
boolean |
true |
"optStatus": true |
|
optStatusDetail |
Description of the current opt status for the customer. |
string |
true |
"optStatusDetail": "OPTED_IN" |
|
|
id |
The identifier of the person assigned to the Hi Marley case. |
string |
false |
"id": "18576b89-cd47-4dae-82d0-35ac08ec6387" |
first |
The first name of the person assigned to the Hi Marley case. |
string |
false |
"first": "Joe" |
|
last |
The last name of the person assigned to the Hi Marley case. |
string |
false |
"last": "Loop" |
|
The email of the person assigned to the Hi Marley case. |
string |
false |
"email": "joe.loop@insuranceco.com" |
||
role |
The role of the person assigned to the Hi Marley case. |
string |
false |
"role": "operator" |
|
createTime |
|
The time of the case creation. |
smalldatetime |
true |
"createTime": "2022-05-26T12:24:45.562Z" |
referenceId |
|
The case reference identifier for the Hi Marley Case. |
string |
true |
"referenceId": "0002383632" |
privacy |
|
The case privacy status.
|
enum |
true |
"privacy": "public" |
marleyNumber |
|
The assigned phone number from an organization pool used to conduct messaging for the current case. |
string |
true |
"marleyNumber": "+13185945299" |
languagePreference |
|
The preferred language for the current Hi Marley case. |
enum |
true |
"languagePreference": "en" |
|
secondaryOperators (array) |
id |
The identifier of the person assigned to the Hi Marley case. |
string |
false |
"id": "48e2ebc5-6055-4028-b384-66f03caba5th" |
first |
The first name of the person assigned to the Hi Marley case. |
string |
false |
"first": "Linda" |
|
last |
The last name of the person assigned to the Hi Marley case. |
string |
false |
"last": "Moon" |
|
The email of the person assigned to the Hi Marley case. |
string |
false |
"email": "Linda.moon@insuranceco.com" |
||
role |
The role of the person assigned to the Hi Marley case. |
enum |
false |
"role": "operator" |
|
pagination |
count |
Number of participants returned |
number |
true |
"count": 3 |
currentPage |
Indicates path of the current page returned |
string |
true |
"currentPage" : "/case/11b2df09-9b5f-471c-8b32-c16b30e08a08/participants?pageSize=10&page=1" |
|
totalPages |
Indicates number of pages returned |
number |
true |
"totalPages": 1 |
|
pageSize |
Max amount of participants that can be displayed on this response (always 10) |
number |
true |
"pageSize": 10 |
|
nextPage |
Indicates if more participants can be returned on the next page |
string |
true |
"nextPage": null |
|
prevPage |
Indicates if more participants can be returned on the previous page |
string |
true |
"prevPage" |
Common Errors to Handle
- [404] Case Not Found -More Details
Comments
0 comments
Please sign in to leave a comment.