Skip to content
Pile
Esc
↑↓navigate↵open⌘Jpreview

Create customer building scorecard

Score a building/landlord lead from PLUTO / ACRIS / HPD attributes. Pass attrs to score what you have; leave fetchFromPluto on (default) to backfill missing attributes from NYC Open Data PLUTO + HPD registrations first. Writes score/tier/XRF eligibility onto the customer and a building_scorecard memory fact.

POST/workspaces/{organizationId}/customers/{id}/building-scorecard
Authorization
AuthorizationBearer token · headerrequired

Workspace API key (Authorization: Bearer <key>). Issue keys under Settings → Developer or POST /workspaces/{organizationId}/tokens.

Path parameters
organizationIdstringrequired
idstringrequired
Request body
application/json
attrsobject
Show properties
bblstring | null
binstring | null
addressstring | null
boroughstring | null
zipcodestring | null
unitsResnumber | null
unitsTotalnumber | null
buildingSqftnumber | null
assessedTotalDollarsnumber | null
yearBuiltnumber | null
lastSalePriceDollarsnumber | null
lastSaleDatestring | null
hpdRegistrationIdstring | null
hpdManagingAgentstring | null
hpdOwnerNamestring | null
openViolationsCountnumber | null
fetchFromPlutoboolean
Responses
200

Building scorecard breakdown applied to the customer

customerIdstringrequired
attributesobjectrequired
Show properties
bblstring | null
binstring | null
addressstring | null
boroughstring | null
zipcodestring | null
unitsResnumber | null
unitsTotalnumber | null
buildingSqftnumber | null
assessedTotalDollarsnumber | null
yearBuiltnumber | null
lastSalePriceDollarsnumber | null
lastSaleDatestring | null
hpdRegistrationIdstring | null
hpdManagingAgentstring | null
hpdOwnerNamestring | null
openViolationsCountnumber | null
breakdownobjectrequired
Show properties
scorenumberrequired
tierstringrequired
Allowed:ABCD
xrfLeadPaintEligiblebooleanrequired
portfolioScalestringrequired
Allowed:large_multifamilymid_multifamilysmall_multifamilysingle_or_commercial
whyNowstringrequired
factorsobject[]required
Show properties
Array of object
keystringrequired
labelstringrequired
pointsnumberrequired
detailstringrequired
404

Customer not found

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://pile.nyc/workspaces/string/customers/string/building-scorecard' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "attrs": {
    "bbl": "string",
    "bin": "string",
    "address": "string",
    "borough": "string",
    "zipcode": "string",
    "unitsRes": 0,
    "unitsTotal": 0,
    "buildingSqft": 0,
    "assessedTotalDollars": 0,
    "yearBuilt": 0,
    "lastSalePriceDollars": 0,
    "lastSaleDate": "string",
    "hpdRegistrationId": "string",
    "hpdManagingAgent": "string",
    "hpdOwnerName": "string",
    "openViolationsCount": 0
  },
  "fetchFromPluto": true
}'
Response
{
  "customerId": "string",
  "attributes": {
    "bbl": "string",
    "bin": "string",
    "address": "string",
    "borough": "string",
    "zipcode": "string",
    "unitsRes": 0,
    "unitsTotal": 0,
    "buildingSqft": 0,
    "assessedTotalDollars": 0,
    "yearBuilt": 0,
    "lastSalePriceDollars": 0,
    "lastSaleDate": "string",
    "hpdRegistrationId": "string",
    "hpdManagingAgent": "string",
    "hpdOwnerName": "string",
    "openViolationsCount": 0
  },
  "breakdown": {
    "score": 0,
    "tier": "A",
    "xrfLeadPaintEligible": true,
    "portfolioScale": "large_multifamily",
    "whyNow": "string",
    "factors": [
      {
        "key": "string",
        "label": "string",
        "points": 0,
        "detail": "string"
      }
    ]
  }
}

Was this page helpful?