// Encode the array into a JSON string
$jsonData = json_encode($data);
// Set your username and password
$username = 'hubtest';
$password = 'hubpass';
// Initialize cURL
$ch = curl_init();
// Set the URL to which the request will be sent
$url = 'https://jen.loyalpuppy.com/dofunctions.php';
// Set cURL options
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
// Attach JSON data to the request
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData);
// Set the headers, including Authorization
$headers = [
'Content-Type: application/json',
'Authorization: Basic ' . base64_encode("$username:$password") // Basic auth encoded in base64
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
// Execute the request
$response = curl_exec($ch);
$data = [
"Function" => "PING"
];When you GETEVENTS (Poll JEN For Various Events Waiting For You To Pick Up), You Will Receive JSON Back With An "etype" Field. This Is The Event Code.
Event Codes Can Be:
| Code | Event Type | Fields (in jstext) |
|---|---|---|
| 1 | NEW JOB | See Below For NEWCASE Post Requirements |
| 2 | JOB COMPLETED | YourJobID, YourCaseID, Recipient, YourRecipientID, DateCompleted, TimeCompleted, ServiceType, LongServiceType, JENServiceType, PersonLeftWith, PersonLeftWithTitle, Sex, Skin, Hair, Age, Height, Weight, Other, Married, Military, PropertyType, ServiceComments, Address1, Address2, City, State, Zip, DateMailed, Certified, CertifiedReceiptNum, YourAddressID, SubServerName, SubServerLicence, IsServed
Photos[] (optional):
PhotoID, Filename, ExifLatitude, ExifLongitude, ExifTime, GPSDate, GPSTime, Address1, Address2, City, State, Zip, Notes, DownloadLink
Photos array included when completion has associated photos from the process server's mobile app. Each photo includes GPS/EXIF metadata and a download link.
View Sample JSON{
"YourJobID": "JOB-5678",
"YourCaseID": "CASE-2024-001",
"Recipient": "John Doe",
"YourRecipientID": "R001",
"DateCompleted": "2024-12-03",
"TimeCompleted": "14:30",
"ServiceType": "PS",
"LongServiceType": "Personal Service",
"PersonLeftWith": "John Doe",
"PersonLeftWithTitle": "Defendant",
"Sex": "Male",
"Skin": "Light",
"Hair": "Brown",
"Age": "45",
"Height": "5'10",
"Weight": "180",
"Other": "",
"Married": "YES",
"Military": "NO",
"PropertyType": "Single Family Home",
"ServiceComments": "Served at front door",
"Address1": "123 Main Street",
"Address2": "Apt 4B",
"City": "Miami",
"State": "FL",
"Zip": "33101",
"DateMailed": "",
"Certified": "0",
"CertifiedReceiptNum": "",
"YourAddressID": "Addr001",
"SubServerName": "Mike Smith",
"SubServerLicence": "PS-12345",
"IsServed": "1",
"Photos": [
{
"PhotoID": "67890",
"Filename": "completion_photo1.jpg",
"ExifLatitude": "25.7617",
"ExifLongitude": "-80.1918",
"ExifTime": "14:30:22",
"GPSDate": "2024-12-03",
"GPSTime": "14:30:22",
"Address1": "123 Main Street",
"Address2": "Apt 4B",
"City": "Miami",
"State": "FL",
"Zip": "33101",
"Notes": "Proof of service photo",
"DownloadLink": "https://example.com/viewphotodirect.php?ownerid=27&token=abc123&id=67890"
}
]
}
|
| 3 | DOCUMENT SCANNED | YourCaseID, YourJobID, YourRecipientID, CaseNo, DocType, ScanID, Filename, DownloadLink |
| 4 | ATTEMPT | YourCaseID, YourJobID, Dt, Tm, Address1, Address2, City, State, Zip, Note
Photos[] (optional):
PhotoID, Filename, ExifLatitude, ExifLongitude, ExifTime, GPSDate, GPSTime, Address1, Address2, City, State, Zip, Notes, DownloadLink
Photos array included when attempt has associated photos. Each photo has its own address/notes from the photo metadata.
View Sample JSON{
"YourCaseID": "CASE-2024-001",
"YourJobID": "JOB-5678",
"Dt": "2024-12-03",
"Tm": "14:30",
"Address1": "123 Main Street",
"Address2": "Apt 4B",
"City": "Miami",
"State": "FL",
"Zip": "33101",
"Note": "No answer at door. Left door hanger.",
"Photos": [
{
"PhotoID": "12345",
"Filename": "attempt_photo1.jpg",
"ExifLatitude": "25.7617",
"ExifLongitude": "-80.1918",
"ExifTime": "14:30:22",
"GPSDate": "2024-12-03",
"GPSTime": "14:30:22",
"Address1": "123 Main Street",
"Address2": "Apt 4B",
"City": "Miami",
"State": "FL",
"Zip": "33101",
"Notes": "Front door photo",
"DownloadLink": "https://example.com/viewphotodirect.php?ownerid=27&token=abc123&id=12345"
}
]
}
|
| 6 | INVOICE |
InvoiceNum, InvoiceDate, InvoiceTotal
Jobs[]:
Recipient, YourRecipientID, YourCaseID, YourJobID
Items[]:
ItemName, ClientChargeCode, Amount, TaxAmount, TotalAmount, DateItemAdded
|
| 7 | OTHER NOTE | YourCaseID, YourJobID, YourRecipientID, Recipient, Dt, Tm, Note |
| 11 | CASE LEVEL NOTE | YourCaseID, Note |
| 12 | CASE FILING EVENT | YourCaseID, CaseNo, DateFiled, CourtNumber, Judge, CaseManagementDate, CaseManagementTime
Defendants[]:
YourJobID, YourDefendantID, Defendant, HearingDate, HearingTime, Department
Sent when a case has been filed with the court. Each defendant entry corresponds to a job. CaseManagementDate format: YYYY-MM-DD. CaseManagementTime format: HH:MM (24-hour clock, e.g., 13:00 = 1pm).
View Sample JSON{
"YourCaseID": "CASE-2024-001",
"CaseNo": "2024-CV-12345",
"DateFiled": "2024-12-15",
"CourtNumber": "11",
"Judge": "Wapner",
"CaseManagementDate": "2025-02-20",
"CaseManagementTime": "14:00",
"Defendants": [
{
"YourJobID": "JOB-001",
"YourDefendantID": "DEF-001",
"Defendant": "John Doe",
"HearingDate": "2025-01-15",
"HearingTime": "09:00",
"Department": "Room 101"
},
{
"YourJobID": "JOB-002",
"YourDefendantID": "DEF-002",
"Defendant": "Jane Doe",
"HearingDate": "2025-01-15",
"HearingTime": "09:30",
"Department": ""
}
]
}
|
| 13 | DEFID REQUEST | YourCaseID, OurJobID, Recipient, Address1, Address2, City, State, Zip |
| 14 | DEFID RESPONSE | You send in: RASCaseID, ServerJobID, NewRecipientID, Recipient$data = [
"Function" => "DEFID RESPONSE",
"Receiver" => "DEF",
"Case" => [
"RASCaseID" => "12345",
"ServerJobID" => "12345444",
"NewRecipientID" => "DEF 008",
"Recipient" => "JANE DOE"
]
] |
| 15 | INCOMING CASE LEVEL DOCUMENT | You send in your caseID that you sent when you sent the jobs and attachment array$data = [
"Function" => "INCOMING_CASE_LEVEL_DOCUMENT",
"CaseIdentifier" => "20-02977XXR_602559",
"Attachments" => [
"DocRefNumber" => "20-02977XXR",
"DocSubRefNumber" => "A48BC3DDX-8883-4992-B4D8-7B4F1GGG5E4E",
"DocumentDate" => "2025-10-01",
"DocumentType" => "ComplaintPackadgeExecuted",
"FileExtension" => "pdf",
"FileBase64Data" => "JVBERi0xLjQKJcfs..."
]
] |
$data = [
"Function" => "GETEVENTS"
];
Encode this into a JSON string and send it to the server: {"Function":"GETEVENTS"}
Description: This is the internal ID of the Event.
Example: 5357546
Description: The identifier or code for the sending party.
Example: "TEST"
Description: The identifier or code for the receiving party.
Example: "YOU"
Description: The Event Code for this Event. See Above For List Of Event Codes.
Example: 7
Description: This is a TransactionID. You will need this then you call REMOVETRANS later to tell JEN that you have fetched this event and not to show it again.
Example: 20250507075622681b1226ec43d346726488
Description: This is JSON of the Event (It has extra slashes because it is JSON inside of JSON).
Example: {\"id\":\"5\",\"etype\":\"7\",\"sender\":\"TEST\",\"receiver\":\"YOU\",\"jstext\":\"{\\\"YourCaseID\\\":\\\"67890\\\",\\\"YourJobID\\\":\\\"B002\\\",\\\"YourRecipientID\\\":\\\"R002\\\",\\\"Recipient\\\":\\\"Another Recipient\\\",\\\"Note\\\":\\\"Job Accepted and Imported\\\"}\"}
Fields:
$data = [
"Function" => "REMOVETRANS",
"TransIDs" => [
"20250507075622681b1226ec43d346726777",
"20250507075622681b1226ec43d346726488"
]
];
Encode this into a JSON string and send it to the server: {"Function": "REMOVETRANS","TransIDs": ["20250507075622681b1226ec43d346726777","20250507075622681b1226ec43d346726488"]}
OK, TransID: 20250507075622681b1226ec43d346726777 marked as done OK, TransID: 20250507075622681b1226ec43d346726488 marked as done
$data = [
"Function" => "NEWCASE",
"Receiver" => "DEF",
"Case" => [
"YourCaseID" => "12345",
"LawFirmName" => "Test Law Firm, P.A.",
"LawFirmAddress" => "123 Test Law Firm Lane",
"LawFirmAddress2" => "Suite 234",
"LawFirmCity" => "Miami",
"LawFirmState" => "FL",
"LawFirmZip" => "33030",
"LawFirmPhone" => "305.555.1212",
"LawFirmEmail" => "test@ttttr.com",
"AttorneyName" => "John Holmes",
"AttorneyBarNum" => "999999",
"CaseLevelLawFirmFileNum" => "TEST-001CASE",
"CourtName" => "Supreme Court",
"CourtAddress" => "123 Main St",
"CourtAddress2" => "Suite 200",
"CourtCity" => "Anytown",
"CourtState" => "CA",
"CourtZip" => "90210",
"CourtCounty" => "Los Angeles",
"PlaintiffCaption" => "Test Plaintiff, Test Plaintiffs Bank and XYZ Lending Corporation As Successor Of XZZ Corporation",
"PlaintiffRole" => "Claimant(s)",
"DefendantCaption" => "Test Defendant, Test Defenants Unknown Spouse, John Doe and Jane Doe",
"DefendantRole" => "Respondent(s)",
"CourtCaseNo" => "987654321",
"DateFiled" => "2023-09-19",
"RequestorName" => "Law Firm",
"RequestorEmail" => "lawfirm@example.com",
"Jobs" => [
[
"Job" => [
"YourJobID" => "A001",
"YourRecipientID" => "R001",
"Recipient" => "Recipient Name",
"RecipientRole" => "Defendant",
"Action" => "Serve And File",
"Priority" => "Routine",
"DueDate" => "2023-10-10",
"HearingDate" => "2024-02-03",
"HearingTime" => "14:15",
"JaxNum" => "123456",
"DocumentString" => "Summons; Complaint; Exhibits",
"Instructions" => "Specific job instructions",
"JobType" => "Service of Process - Routine",
"Documents" => [
[
"DocumentID" => "D001",
"DocumentType" => "Service Documents",
"DocumentFileName" => "Document1.pdf",
"DocumentURL" => "https://rocketserve.app/viewscandoc.php?job=11617473&owner=27&token={AADF1EE0-5F44-8158-20B7-E562D414F371}&scanid=8966245",
"UseBase64" => "1",
"Base64Data" => "JVBERi0xLjQKJcfs..."
],
[
"DocumentID" => "D002",
"DocumentType" => "Service Documents",
"DocumentFileName" => "Document2.pdf",
"DocumentURL" => "https://rocketserve.app/viewscandoc.php?job=11617473&owner=27&token={AADF1EE0-5F44-8158-20B7-E562D414F371}&scanid=8966192",
"UseBase64" => "1",
"Base64Data" => "JVBERi0xLjQKJcfs..."
]
],
"Addresses" => [
[
"Address" => [
"YourAddrID" => "Addr001",
"Address" => "456 Elm St",
"Address2" => "Apt 3B",
"City" => "Othertown",
"State" => "NY",
"Zip" => "10001"
]
],
[
"Address" => [
"YourAddrID" => "Addr002",
"Address" => "789 Pine St",
"Address2" => "",
"City" => "Sometown",
"State" => "FL",
"Zip" => "33101"
]
]
]
]
]
]
]
Description: Specifies the function or action being requested.
Example: "NEWCASE"
Constraints: Must be a valid function keyword
Description: The identifier or code for the receiving party.
Example: "DEF"
Constraints: Must be a predefined code for the receiving party.
Description: Contains details of the legal case.
YYYY-MM-DD. Description: A list of jobs associated with this case.
YYYY-MM-DD. YYYY-MM-DD. HH:MM (24 hr).