Process File Received

post

/rest/filereceived

Accepts JSON/XML, validates fileId and companyGuid from payload, authorizes by fileId, and processes through FileReceivedExecutor.

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 support creation of FileReceived web service in JSON and XML format.

Example cURL Command in JSON format.

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

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

Example Request Body in JSON format

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

{
  "fileReceived": {
    "fileId": "NTT",
    "companyGuid": "7204C2FE-13B1-4A48-8CDA-DE8386C60EF9",
    "NewClient": {
      "FirstName": "John-soappoc",
      "LastName": "Doe-soappoc",
      "SSN": "123456789",
      "TypeCode": "02",
      "Fields": {
        "Field": [
          {
            "Name": "DateOfBirth",
            "TypeCode": "01",
            "Value": "1980-01-15"
          },
          {
            "Name": "Sex",
            "TypeCode": "02",
            "Value": "01"
          },
          {
            "Name": "MaritalStatus",
            "TypeCode": "02",
            "Value": "01"
          }
        ]
      },
      "MultiFields": {
        "Field": [
          {
            "Name": "NationalIDSource",
            "TypeCode": "02",
            "Index": "0",
            "Value": "01"
          },
          {
            "Name": "ClientID",
            "TypeCode": "02",
            "Index": "0",
            "Value": "00123"
          }
        ]
      }
    }
  }
}

Example Response Body in JSON format

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

{
  "status": "SUCCESS",
  "message": "File received and processed successfully.",
  "fileReceived": {
    "fileId": "NTT",
    "companyGuid": "7204C2FE-13B1-4A48-8CDA-DE8386C60EF9",
    "entityType": "NewClient",
    "result": {
      "clientGuid": "A1B2C3D4-E5F6-47A8-9B10-112233445566",
      "clientNumber": "C00012345",
      "firstName": "John-soappoc",
      "lastName": "Doe-soappoc",
      "ssn": "123456789",
      "typeCode": "02",
      "fieldsProcessed": 3,
      "multiFieldsProcessed": 2
    }
  }
}

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 \
     "http://server:port/PASJava/rest/fileReceived"

Example Request Body in XML Format

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

<fileReceived>
  <fileId>NTT</fileId>
  <companyGuid>7204C2FE-13B1-4A48-8CDA-DE8386C60EF9</companyGuid>
  <NewClient>
    <FirstName>John-soappoc</FirstName>
    <LastName>Doe-soappoc</LastName>
    <SSN>123456789</SSN>
    <TypeCode>02</TypeCode>
    <Fields>
      <Field>
        <Name>DateOfBirth</Name>
        <TypeCode>01</TypeCode>
        <Value>1980-01-15</Value>
      </Field>
      <Field>
        <Name>Sex</Name>
        <TypeCode>02</TypeCode>
        <Value>01</Value>
      </Field>
      <Field>
        <Name>MaritalStatus</Name>
        <TypeCode>02</TypeCode>
        <Value>01</Value>
      </Field>
    </Fields>
    <MultiFields>
      <Field>
        <Name>NationalIDSource</Name>
        <TypeCode>02</TypeCode>
        <Index>0</Index>
        <Value>01</Value>
      </Field>
      <Field>
        <Name>ClientID</Name>
        <TypeCode>02</TypeCode>
        <Index>0</Index>
        <Value>00123</Value>
      </Field>
    </MultiFields>
  </NewClient>
</fileReceived>

Example Response Body in XML Format

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

<response>
  <status>SUCCESS</status>
  <message>File received and processed successfully.</message>
  <fileReceived>
    <fileId>NTT</fileId>
    <companyGuid>7204C2FE-13B1-4A48-8CDA-DE8386C60EF9</companyGuid>
    <NewClient>
      <ClientGuid>A1B2C3D4-E5F6-47A8-9B10-112233445566</ClientGuid>
      <ClientNumber>C00012345</ClientNumber>
      <FirstName>John-soappoc</FirstName>
      <LastName>Doe-soappoc</LastName>
      <SSN>123456789</SSN>
      <TypeCode>02</TypeCode>
      <Result>Processed</Result>
    </NewClient>
  </fileReceived>
</response>
Back to Top