Process Policy

post

/rest/processpolicy

Accepts JSON/XML, requires companyGuid and non-empty parameters containing PolicyNumber, then executes policy processing.

Request

Header Parameters
Back to Top

Response

200 Response

Processed successfully.

400 Response

Invalid payload / missing required fields.

401 Response

Authentication failed.

403 Response

Authorization failed.

500 Response

Internal processing error.
Back to Top

Examples

This example describes how to create the capabilities of process policy web service in both JSON and XML format.

Example cURL Command in JSON format

Use the following cURL command to submit a response on the REST resource:

curl -X POST \ 
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -u username:password \
     "http://server:port/PASJava/rest/processPolicy" \
     -d '{"Use this placeholder to plug-in the example request body given below"}'

Example Response Body in JSON format

TThe following shows an example of the request body in JSON format:

{
  "processPolicy": {
    "companyGuid": "7204C2FE-13B1-4A48-8CDA-DE8386C60EF9",
    "parameters": [
      {
        "NAME": "PolicyNumber",
        "value": "FPP695586121"
      }
    ]
  }
}

Example Response Body in JSON format

The following shows an example of the response body in JSON format:

{
  "status": "SUCCESS",
  "message": "ProcessPolicy request completed successfully.",
  "processPolicy": {
    "companyGuid": "7204C2FE-13B1-4A48-8CDA-DE8386C60EF9",
    "parameters": [
      {
        "NAME": "PolicyNumber",
        "value": "FPP695586121"
      }
    ],
    "result": {
      "policyNumber": "FPP695586121",
      "processStatus": "Processed",
      "pendingActivitiesProcessed": true
    }
  }
}

Example cURL Command in XML format

Use the following cURL command to submit a request on the REST resource:

curl -X POST \
     -H "Accept: application/xml" \
     -H "Content-Type: application/xml" \
     -u username:password \
     -d '<processPolicy>
           <companyGuid>7204C2FE-13B1-4A48-8CDA-DE8386C60EF9</companyGuid>
           <parameters>
             <parameter>
               <NAME>PolicyNumber</NAME>
               <value>FPP695586121</value>
             </parameter>
           </parameters>
         </processPolicy>' \
     "http://server:port/PASJava/rest/processPolicy"

Example Request Body in XML Format

The following shows an example of the request body in XML format:

<processPolicy>
  <companyGuid>7204C2FE-13B1-4A48-8CDA-DE8386C60EF9</companyGuid>
  <parameters>
    <parameter>
      <NAME>PolicyNumber</NAME>
      <value>FPP695586121</value>
    </parameter>
  </parameters>
</processPolicy>

Example Response Body in XML Format

The following shows an example of the response body in XML format:

<response>
  <status>SUCCESS</status>
  <message>ProcessPolicy request completed successfully.</message>
  <processPolicy>
    <companyGuid>7204C2FE-13B1-4A48-8CDA-DE8386C60EF9</companyGuid>
    <parameters>
      <parameter>
        <NAME>PolicyNumber</NAME>
        <value>FPP695586121</value>
      </parameter>
    </parameters>
    <result>
      <policyNumber>FPP695586121</policyNumber>
      <processStatus>Processed</processStatus>
      <pendingActivitiesProcessed>true</pendingActivitiesProcessed>
    </result>
  </processPolicy>
</response>
Back to Top