# Person -Property Ownership

Source: https://docs.pitchpointsolutions.com/developer_guides/orders/ForeclosureInvestigation/

**Stable**
# Person -Property Ownership Ordering Guide

## Overview
Your system is ordering a `Person -Property Ownership` (aka `ForeclosureInvestigation`).

> **Before Starting:** Get the URL from your Pitchpoint Account Representative of where you should be submitting your orders to.

### Step 1: Authenticate and Receive Tokens
Refer to the [Authentication Guide](https://docs.pitchpointsolutions.com/developer_guides/authentication/access_token/) for detailed steps on authentication and token retrieval.

### Step 2: Place an order

This request submits the order details.

Include the access token in the `Authorization` header following the `Bearer` keyword. Replace `your_access_token_here` with the actual token you obtained during the authentication process.

> **API Reference:** For further explanation of required mandatory fields and their meanings, refer to [Person -Property Ownership API Reference](https://docs.pitchpointsolutions.com/api/order/order_foreclosureinvestigation)

#### Example request
The following example orders a Person -Property Ownership report.

```bash
curl -X POST https://api.pointservices.com/riskinsight-services-ws/resources/v1/sami/ForeclosureInvestigation/PDF-001 \
-H "Authorization: Bearer your_access_token_here" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
  "CorrelationID" : "request-1",
  "Terms" : {
    "Term" : [ {
      "Person" : {
        "FirstName" : "Daffy",
        "LastName" : "Duckerson",
        "SSN" : "123121234",
        "DOB" : "12/17/1976"
      }
    } ]
  }
}'
```

#### Example response

```json
{
  "TransactionID" : "0000000000011038341",
  "CorrelationID" : "request-1",
  "Terms" : {
    "Term" : [ {
      "Person" : {
        "FirstName" : "Daffy",
        "LastName" : "Duckerson",
        "SSN" : "123121234",
        "DOB" : "12/17/1976"
      }
    } ]
  },
  "Attachments" : {
    "Attachment" : [ {
      "Properties": null,
      "Extension": {
        "any": "<ForeclosureInvestigationReport xmlns=\"\"><Input><Name><FirstName>Daffy</FirstName><LastName>Duckerson</LastName></Name><SSN>123121234</SSN></Input><Errors><Error><Message>The Social Security Number supplied is incorrect. Please verify and resubmit your order.</Message></Error></Errors></ForeclosureInvestigationReport>"
      },
      "Document": null,
      "Classifier": null,
      "ContentDisposition": null,
      "ContentType": "text/xml"
    } ]
  },
  "Messages" : {
    "Message" : [ {
      "Category" : "Info",
      "Code" : "I001",
      "Description" : "Success"
    } ]
  },
  "Status" : {
    "Code" : "S001",
    "Description" : "Serviceable"
  },
  "Ref" : "https://api.pointservices.com/riskinsight-services-ws/resources/v1/sami/0000000000011038341"
}
```

After submitting, you may have to wait a few minutes for the request to finish processing.  When the request has returned, the
results of the submission will be in the `Messages.Message.Code` section.  A `Status.Code` of `S001` indicates that the
order was a billable transaction.  

You can use the url provided in the `Ref` field to retrieve the order results again.

## Other Examples

### Missing Input Data
`SSN` is missing.

```bash
curl -X POST https://api.pointservices.com/riskinsight-services-ws/resources/v1/sami/ForeclosureInvestigation/PDF-001 \
-H "Authorization: Bearer your_access_token_here" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
  "CorrelationID" : "ssn_dob_missing",
  "Terms" : {
    "Term" : [ {
      "Person" : {
        "FirstName" : "Daffy",
        "LastName" : "Duckerson",
        "SSN" : "",
        "DOB" : ""
      }
    } ]
  }
}'
```

#### Example Response

In this response, we see that `Messages.Message.Category = Fault` so we know that the submission of this order failed.
Check the `Messages.Message.Description` for more details on how to correct.

```json
{
  "TransactionID": "0000000000013284406",
  "CorrelationID": "ssn_dob_missing",
  "Meta": null,
  "Preferences": null,
  "Terms": {
    "Term": [
      {
        "Person": {
          "FirstName": "Daffy",
          "LastName": "Duckerson",
          "SSN": "",
          "DOB": "12/17/1976"
        }
      }
    ]
  },
  "Attachments": null,
  "Messages": {
    "Message": [
      {
        "Category": "Fault",
        "Code": "E004",
        "Description": "/Inputs[1]/Input[1]/Loan[1]/Borrower[1]/TaxIdentification[1]/TaxIdentificationNumber is required."
      }
    ]
  },
  "Status": {
    "Code": "U001",
    "Description": "Unserviceable"
  },
  "Ref": "https://api.pointservices.com/riskinsight-services-ws/resources/v1/sami/0000000000013284406"
}
```
