CRM / Posting Engine Request Pack

Direct Post Guide For Vendors, CRMs, And Lead Routers

Use this handoff when your CRM, posting engine, or vendor platform can post directly to the DiPetrillo Law partner API. The live request examples below use the production partner host, and the implementation notes show where an affiliate site root would be used in tools such as the WordPress starter.

Site Root

Affiliate Site URL Example

When a setup screen asks for the Affiliate Site URL, enter only the site root, such as https://example.com. Do not append endpoint paths there.

Authentication

Required Header

Every direct post must include the partner API key in the request header.

X-Api-Key: YOUR_API_KEY
Production Endpoints

Base API URLs

Case type lookup GET https://partners.dipetrillolaw.com/api/leads/casetypes
Lead submission POST https://partners.dipetrillolaw.com/api/leads
Request Rules

Supported Content Types And Fields

Accepted content types:

  • application/json
  • application/xml
  • text/xml
  • application/x-www-form-urlencoded
  • multipart/form-data

Required fields: name, email, phone, caseTypeId

Optional fields: message, sourceType, sourceUrl

For direct CRM or posting engine submissions, use sourceType = 3.

JSON

JSON Example

POST https://partners.dipetrillolaw.com/api/leads
Content-Type: application/json
Accept: application/json
X-Api-Key: YOUR_API_KEY

{
  "name": "John Doe",
  "email": "john@example.com",
  "phone": "555-123-4567",
  "caseTypeId": 1,
  "message": "I was rear-ended at a red light on Sample Road.",
  "sourceType": 3,
  "sourceUrl": "https://partner-site.example/auto-accident"
}

Successful response:

HTTP 201 Created

{
  "leadId": 42,
  "status": "Pending"
}
XML

XML Example

POST https://partners.dipetrillolaw.com/api/leads
Content-Type: application/xml
Accept: application/xml
X-Api-Key: YOUR_API_KEY

<Lead>
  <Name>John Doe</Name>
  <Email>john@example.com</Email>
  <Phone>555-123-4567</Phone>
  <CaseTypeId>1</CaseTypeId>
  <Message>I was rear-ended at a red light on Sample Road.</Message>
  <SourceType>3</SourceType>
  <SourceUrl>https://partner-site.example/auto-accident</SourceUrl>
</Lead>

Successful response:

HTTP 201 Created

<LeadPostResultDto>
  <LeadId>42</LeadId>
  <Status>Pending</Status>
</LeadPostResultDto>
Form Post

Form-Encoded Example

POST https://partners.dipetrillolaw.com/api/leads
Content-Type: application/x-www-form-urlencoded
Accept: application/json
X-Api-Key: YOUR_API_KEY

name=John Doe
email=john@example.com
phone=555-123-4567
caseTypeId=1
message=I was rear-ended at a red light on Sample Road.
sourceType=3
sourceUrl=https://partner-site.example/auto-accident
Lookup First

Case Type Lookup Example

GET https://partners.dipetrillolaw.com/api/leads/casetypes
Accept: application/json

[
  { "id": 1, "name": "Auto Accident", "practiceArea": 0 }
]
Operations

Common Errors And Best Practices

400 Bad Request: Missing required fields, invalid email or phone, or invalid caseTypeId.

401 Unauthorized: Missing or invalid X-Api-Key, or an inactive account.

403 Forbidden: Browser-based requests from a non-approved origin.

415 Unsupported Media Type: Content type is not one of the supported formats.

  • Call GET https://partners.dipetrillolaw.com/api/leads/casetypes before posting so you submit a valid caseTypeId.
  • Keep the API key in the vendor's secret store, header configuration, or server-side connector.
  • Save the returned leadId so you can reconcile the post later if needed.