// 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);
Every call is a POST to the same address with a "Function" field. These are the functions available:
| Function | What It Does | Receiver Required? |
|---|---|---|
PING | Test your login and connection. | No |
NEWCASE | Send a case with one or more new jobs (and their service documents). Creates Event Code 1. Details | Yes |
POSTBACKS | Send one or more events (Job Completed, Document Scanned, Attempt, Invoice, Other Note, etc.) about jobs you were sent. Details | Yes, on each event |
INCOMING_CASE_LEVEL_DOCUMENT | Send a document (base64) for a case you already sent. Creates Event Code 15. Details | Yes |
DEFID RESPONSE | Answer a DEFID REQUEST. Creates Event Code 14. See Event Code 14 below. | Yes |
GETEVENTS | Pick up events waiting for you (up to 100 per call). Details | No |
REMOVETRANS | Mark events you have picked up as done so they are not sent again. Details | No |
GETJENUSER | Look up another JEN user's name and address by their JEN code. Details | No |
Which function sends which Event Code:
| Event Code | Event Type | Send It With |
|---|---|---|
| 1 | NEW JOB | NEWCASE |
| 2 | JOB COMPLETED | POSTBACKS with "etype": 2 |
| 3 | DOCUMENT SCANNED | POSTBACKS with "etype": 3 |
| 4 | ATTEMPT | POSTBACKS with "etype": 4 |
| 6 | INVOICE | POSTBACKS with "etype": 6 |
| 7 | OTHER NOTE | POSTBACKS with "etype": 7 |
| 11 | CASE LEVEL NOTE | POSTBACKS with "etype": 11 |
| 12 | CASE FILING EVENT | POSTBACKS with "etype": 12 |
| 14 | DEFID RESPONSE | DEFID RESPONSE |
| 15 | INCOMING CASE LEVEL DOCUMENT | INCOMING_CASE_LEVEL_DOCUMENT |
| 16 | LAST DEFENDANT COMPLETED | POSTBACKS with "etype": 16 |
TESTA as the Receiver for test transactions. Do not send test transactions to your own JEN code or to a live receiver. $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, CalendarNumber, 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",
"CalendarNumber": "5",
"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. Send it with the INCOMING_CASE_LEVEL_DOCUMENT function. Receiver is MANDATORY (the JEN code you sent the case to). Response: OK, TransID: ...$data = [
"Function" => "INCOMING_CASE_LEVEL_DOCUMENT",
"Receiver" => "TESTA",
"CaseIdentifier" => "20-02977XXR_602559",
"Attachments" => [
"DocRefNumber" => "20-02977XXR",
"DocSubRefNumber" => "A48BC3DDX-8883-4992-B4D8-7B4F1GGG5E4E",
"DocumentDate" => "2025-10-01",
"DocumentType" => "ComplaintPackadgeExecuted",
"FileExtension" => "pdf",
"FileBase64Data" => "JVBERi0xLjQKJcfs..."
]
] |
| 16 | LAST DEFENDANT COMPLETED | YourCaseID, YourRecipientID, YourJobID, CaseNo, ClientFileNum, OurCaseID, DateLastDefCompleted, LastDefendantName
Case-level event sent once per case when the process server marks the last defendant on the case as completed. YourRecipientID / YourJobID / LastDefendantName identify that final defendant. DateLastDefCompleted format: YYYY-MM-DD. Fired at most once per case by the sender.
View Sample JSON{
"YourCaseID": "26-27483IL_1466160",
"YourRecipientID": "270289",
"YourJobID": "26-27483IL",
"CaseNo": "2026FC27",
"ClientFileNum": "26-27483IL",
"OurCaseID": 1363,
"DateLastDefCompleted": "2026-09-23",
"LastDefendantName": "Secretary of Housing and Urban Development"
}
|
Use POSTBACKS to send events about jobs you were sent: Job Completed (2), Document Scanned (3), Attempt (4), Invoice (6), Other Note (7), Case Level Note (11), Case Filing Event (12) and Last Defendant Completed (16). You can send one event or many in a single call, and they can be different event types.
Each item in PostBacks has these fields:
YourCaseID, YourJobID and YourRecipientID inside jstext are the IDs the receiver sent you in NEWCASE, so they can match the event to their job.
$data = [
"Function" => "POSTBACKS",
"PostBacks" => [
[
"id" => "1001",
"etype" => 4,
"sender" => "YOURCODE",
"receiver" => "TESTA",
"jstext" => json_encode([
"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."
])
],
[
"id" => "1002",
"etype" => 7,
"sender" => "YOURCODE",
"receiver" => "TESTA",
"jstext" => json_encode([
"YourCaseID" => "CASE-2024-001",
"YourJobID" => "JOB-5678",
"YourRecipientID" => "R001",
"Recipient" => "John Doe",
"Dt" => "2024-12-03",
"Tm" => "15:10",
"Note" => "Job Accepted and Imported"
])
],
[
"id" => "1003",
"etype" => 3,
"sender" => "YOURCODE",
"receiver" => "TESTA",
"jstext" => json_encode([
"YourCaseID" => "CASE-2024-001",
"YourJobID" => "JOB-5678",
"YourRecipientID" => "R001",
"CaseNo" => "2024-CV-12345",
"DocType" => "Affidavit of Service",
"ScanID" => "58099",
"Filename" => "affidavit_JOB-5678.pdf",
"DownloadLink" => "https://example.com/viewdocument.php?id=58099&token=abc123"
])
]
]
];
Encoded as a JSON string, that is:
{"Function":"POSTBACKS","PostBacks":[
{"id":"1001","etype":4,"sender":"YOURCODE","receiver":"TESTA","jstext":"{\"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.\"}"},
{"id":"1002","etype":7,"sender":"YOURCODE","receiver":"TESTA","jstext":"{\"YourCaseID\":\"CASE-2024-001\",\"YourJobID\":\"JOB-5678\",\"YourRecipientID\":\"R001\",\"Recipient\":\"John Doe\",\"Dt\":\"2024-12-03\",\"Tm\":\"15:10\",\"Note\":\"Job Accepted and Imported\"}"},
{"id":"1003","etype":3,"sender":"YOURCODE","receiver":"TESTA","jstext":"{\"YourCaseID\":\"CASE-2024-001\",\"YourJobID\":\"JOB-5678\",\"YourRecipientID\":\"R001\",\"CaseNo\":\"2024-CV-12345\",\"DocType\":\"Affidavit of Service\",\"ScanID\":\"58099\",\"Filename\":\"affidavit_JOB-5678.pdf\",\"DownloadLink\":\"https://example.com/viewdocument.php?id=58099&token=abc123\"}"}
]}
[{"id":"1001","result":"OK","transid":"20250507074040681b0e781476f198560565"},
{"id":"1002","result":"OK","transid":"20250507074040681b0e781476f198560571"},
{"id":"1003","result":"OK","transid":"20250507074040681b0e781476f198560588"}]
Only treat an event as delivered when its result is OK. Anything else (e.g. ERROR, Failed to insert) should be retried.
jstext as a Photos array (see the Sample JSON for those Event Codes above). There is no separate photo function.
$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" => "GETJENUSER",
"JENCode" => "TESTA"
];
Encode this into a JSON string and send it to the server: {"Function":"GETJENUSER","JENCode":"TESTA"}
[{"ID":9,"JENCode":"TESTA","IsLawFirm":0,"AgencyName":"Your Agency Name, Inc.","Address1":"...","Address2":"","City":"Conroe","State":"TX","Zip":"...","Phone":"...","Email":"..."}]
If the code does not exist you will get: No user found: CODE
$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",
"JobLevelLawFirmFileNum" => "TEST-001-A001",
"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). CaseLevelLawFirmFileNum.