Creating service requests
To create a service request, use the following endpoint:
- POST
/claims/{claimId}/service-requests
Once a service request has been created, its Progress field is set to Draft.
Minimum creation criteria
At a minimum, a service request must specify:
- The service request kind, such as Service Only or Unmanaged (in the
kindfield) - The vendor (in the
specialistfield) - A service instruction (in the
instructionfield), which at a minimum must contain:- The customer (in the
customerfield) - The location where the service is being performed (in the
serviceAddressfield) - The set of services being performed (in the
servicesarray)
- The customer (in the
- A requested quote completion date, if the service request is Quote Only or Quote and Service
- A requested service completion date, if the service request is Service Only
Additional details on each required field
A service request must specify the service request kind. This is specified in the
kind field, and it must be set to a typecode from the
ServiceRequestKind typelist, such as:
quoteonlyquoteandserviceserviceonlyunmanaged
A service request must specify the vendor. This is specified in the
specialist field.
- You can specify an existing ClaimContact by listing the
idfield and setting it to the ClaimContact ID. - You can create a new ClaimContact by listing the
refidfield and specifying a new ClaimContact in theincludedsection.
A service request must include a service instruction. This is specified in the
instruction field. At a minimum, a service instruction must have a
customer, a location where the service is being performed, and a set of services.
The customer is specified in the customer field. This must be a
reference to an existing or new ClaimContact. You can specify the ClaimContact:
- By
id(if it already exists in ClaimCenter) - By
policySystemId(if it exists in the Policy Administration System) - By
refid(if it does not yet exist and is being created in the POST'sincludedsection.)
The location where the service is being performed is specified in the
serviceAddress field. You can specify the address:
- By
id(if it already exists in ClaimCenter) - Inline (if it does not already exist in ClaimCenter)
The set of services being performed is specified in the services
array. Each entry in this array specifies the service's code. The codes come from the
vendorservicetree.xml file, which you can access through Studio. Each
service must be a leaf-level service in the service tree. Also, each service must be
compatible with the service request kind. Service compatibility is defined in the
vendorservicedetails.xml file, which you can also access through
Studio.
If the service request's kind is quoteonly or
quoteandservice, you must also specify a requested quote completion
date in the requestedQuoteCompletionDate.
If the service request's kind is serviceonly, you must also specify a
requested service completion date in the
requestedServiceCompletionDate.
Sample Service Only service request
The following payload shows an example of a minimal Service Only service request for claim 235-53-365889 in the sample data (whose ID is cc:33). The service request will be performed by Joe's Auto Body Shop (ClaimContact cc:16) at 1313 Mockingbird Lane in Arcadia, California, for Robert Farley (ClaimContact cc:13). There is one service to be performed: Salvage (autoothersalvage). The service is requested to be completed by March 3, 2021.
Command
POST http://localhost:8080/cc/rest/claim/v1/claims/demo_sample:20/service-requests
Request body
{
"data": {
"attributes": {
"kind": {
"code": "serviceonly"
},
"specialist": {
"id": "cc:16"
},
"instruction": {
"customer": {
"id": "cc:13"
},
"serviceAddress": {
"addressLine1": "1313 Mockingbird Lane",
"city": "Arcadia",
"country": "US",
"postalCode": "91006",
"state": {
"code": "CA",
"name": "California"
}
},
"services": [
{
"code": "autoothersalvage"
}
]
},
"requestedServiceCompletionDate": "2021-03-19"
}
}
}
Sample Unmanaged service request
The following payload shows an example of a minimal Unmanaged service request for claim 235-53-365889 in the sample data (whose ID is cc:33). The service request will be performed by Joe's Auto Body Shop (ClaimContact cc:16) at 1313 Mockingbird Lane in Arcadia, California, for Robert Farley (ClaimContact cc:13). There is one service to be performed: Towing (autoothertowing).
POST http://localhost:8080/cc/rest/claim/v1/claims/demo_sample:20/service-requests
{
"data": {
"attributes": {
"kind": {
"code": "unmanaged"
},
"specialist": {
"id": "cc:16"
},
"instruction": {
"customer": {
"id": "cc:13"
},
"serviceAddress": {
"addressLine1": "1313 Mockingbird Lane",
"city": "Arcadia",
"country": "US",
"postalCode": "91006",
"state": {
"code": "CA",
"name": "California"
}
},
"services": [
{
"code": "autoothertowing"
}
]
}
}
}
}