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.
CRM / Posting Engine Request Pack
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.
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.
Every direct post must include the partner API key in the request header.
X-Api-Key: YOUR_API_KEY
GET https://partners.dipetrillolaw.com/api/leads/casetypes
POST https://partners.dipetrillolaw.com/api/leads
Accepted content types:
application/jsonapplication/xmltext/xmlapplication/x-www-form-urlencodedmultipart/form-dataRequired fields: name, email, phone, caseTypeId
Optional fields: message, sourceType, sourceUrl
For direct CRM or posting engine submissions, use sourceType = 3.
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"
}
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>
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
GET https://partners.dipetrillolaw.com/api/leads/casetypes
Accept: application/json
[
{ "id": 1, "name": "Auto Accident", "practiceArea": 0 }
]
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.
GET https://partners.dipetrillolaw.com/api/leads/casetypes before posting so you submit a valid caseTypeId.leadId so you can reconcile the post later if needed.