createEnrollment
Create a new enrollment with the provided applicant information. Returns the enrollment ID on success, or validation errors on failure.
Mutation Signature
mutation { createEnrollment(input: CreateEnrollmentInput!): CreateEnrollmentResponse!}Example Request
mutation CreateEnrollment($input: CreateEnrollmentInput!) { createEnrollment(input: $input) { # Add fields you want to retrieve }}Example Variables:
{ "input": { "ogId": "0195e1d8-7f3a-7000-8000-000000000001", "leadId": "lead-67890", "planDetails": { "income": { "gross": 5000, "business": 0, "pension": 0, "otherIncome": 200 }, "expenses": { "housing": 1500, "transportation": 400, "personal": 150, "health": 200, "groceries": 500, "misc": 100, "dependents": 0, "loans": 300, "tax": 500, "involuntary": 100, "insurance": 150, "court": 0, "charitableContributions": 50 }, "details": { "jobClassification": "W_2" } }, "contactInfo": { "language": "1", "notes": [ { "content": "Client prefers communication via email" } ] } }}Open in Apollo Studio Explorer →
Click the link above to open this mutation in Apollo Studio Explorer with the query pre-filled. You’ll need to authenticate with your sandbox credentials.
Example Response
{ "data": { "createEnrollment": { "data": { "enrollmentId": "enroll-abc123xyz" }, "errors": null } }}Arguments
| Argument | Type | Description |
|---|---|---|
input | CreateEnrollmentInput! | Input for creating a new enrollment. |
Input Types
CreateEnrollmentInput
Input for creating a new enrollment.
Required Fields:
| Field | Type | Description |
|---|---|---|
ogId | String! | Offer generation ID from the offer-generation-service |
leadId | String! | The leadId also known as the Third-party identifier (can contain non-numeric characters) |
planDetails | PlanDetailsInput! | Income and expense details required for enrollment plan creation |
Optional Fields:
| Field | Type | Description |
|---|---|---|
contactInfo | ContactInfoInput | Contact information for the enrollment (optional) |
ContactInfoInput
Input for contact information. Note: Main applicant and co-applicant PII fields are sourced from UW data.
Optional Fields:
| Field | Type | Description |
|---|---|---|
language | String | Preferred language: 1 for English, 2 for Spanish (optional, defaults to English) |
customFields | [CustomFieldInput] | Custom fields for additional data (optional) |
budgetFields | [BudgetFieldInput] | Budget fields for income/expense data (optional) |
documents | [DocumentInput] | Associated documents (optional) |
notes | [NoteInput] | Notes associated with the contact (optional) |
CustomFieldInput
Input for custom field data
Required Fields:
| Field | Type | Description |
|---|---|---|
fieldId | String! | Unique identifier for the custom field |
value | String! | Value of the custom field (serialized as JSON string if complex) |
Optional Fields:
| Field | Type | Description |
|---|---|---|
label | String | Label of the custom field |
type | String | Type of the custom field |
BudgetFieldInput
Input for budget field data
Required Fields:
| Field | Type | Description |
|---|---|---|
fieldId | String! | Unique identifier for the budget field |
Optional Fields:
| Field | Type | Description |
|---|---|---|
type | String | Type of the budget field |
value | String | Value of the budget field |
DocumentInput
Input for document information
Required Fields:
| Field | Type | Description |
|---|---|---|
fileName | String! | Name of the file |
fileUrl | String! | URL where the file is stored |
description | String! | Description of the document |
docType | String! | Type of document (e.g., ID, proof of income) |
contentType | String! | MIME content type (e.g., application/pdf, image/jpeg) |
Optional Fields:
| Field | Type | Description |
|---|---|---|
associatedDebtId | String | Associated debt ID if document relates to a specific debt (optional) |
metadata | String | Additional metadata as JSON string (optional) |
NoteInput
Input for note information
Required Fields:
| Field | Type | Description |
|---|---|---|
content | String! | Content of the note |
PlanDetailsInput
Income, expense, and additional details required for enrollment plan creation.
Required Fields:
| Field | Type | Description |
|---|---|---|
income | IncomeInput! | Income fields for budget |
expenses | ExpensesInput! | Expense fields for budget |
details | DetailsInput! | Additional details including job classification |
IncomeInput
Income fields for budget. All fields are required and represent monthly dollar amounts.
Required Fields:
| Field | Type | Description |
|---|---|---|
gross | Float! | Monthly Combined Gross Household Income |
business | Float! | Business Net Income |
pension | Float! | Retirement Pension |
otherIncome | Float! | Other Income (Including alimony, child support etc.) |
ExpensesInput
Expense fields for budget. All fields are required and represent monthly dollar amounts.
Required Fields:
| Field | Type | Description |
|---|---|---|
housing | Float! | Housing & Utilities (Rent / Mortgage) |
transportation | Float! | Transportation (Auto Expense/Gas/Maintenance) |
personal | Float! | Clothing and Personal Care |
health | Float! | Health Care |
groceries | Float! | Groceries / Dining |
misc | Float! | Miscellaneous |
dependents | Float! | Child/Elder Care |
loans | Float! | Other Loans / Secured Debts |
tax | Float! | Income Tax Payroll Deductions (Monthly) |
involuntary | Float! | Involuntary Deductions (Mandatory payroll deductions like retirement plans, union dues, etc.) |
insurance | Float! | Insurance Payments & HSA (Term life, disability, and HSA payments) |
court | Float! | Court-Ordered Payments (Alimony, child support, settlements, tax debts) |
charitableContributions | Float! | Charitable Contributions |
DetailsInput
Additional details required for enrollment plan creation.
Required Fields:
| Field | Type | Description |
|---|---|---|
jobClassification | JobClassification! | Employee classification (W-2, 1099, or Fixed Income) - Required |
Response Type
Returns: CreateEnrollmentResponse!
CreateEnrollmentResponse
Response type for createEnrollment mutation
| Field | Type | Description |
|---|---|---|
data | Enrollment | Enrollment data on success |
errors | [EnrollmentError] | List of validation or processing errors |
Enrollment
Enrollment entity representing a created enrollment
| Field | Type | Description |
|---|---|---|
enrollmentId | String! | Unique enrollment identifier |
EnrollmentError
Error type for enrollment operations
| Field | Type | Description |
|---|---|---|
message | String | Error message describing the issue |
Additional Enums
JobClassification
Employee classification type for job classification field
| Value | Description |
|---|---|
W_2 | TBD |
W_1099 | TBD |
FIXED_INCOME | TBD |
Error Types
The response may include the following error types:
EnrollmentError
Error type for enrollment operations
| Field | Type | Description |
|---|---|---|
message | String | Error message describing the issue |
Error Details
Input Validation Errors
| Error Code | Description | Resolution |
|---|---|---|
MISSING_OG_ID | The ogId field is required | Provide a valid ogId from the offer-generation-service |
MISSING_TP_ID | The leadId field is required | Provide the lead ID from your internal system |
INVALID_OG_ID | The ogId must be a valid UUID format | Ensure ogId is the valid UUID returned from createOffer |
Data Validation Errors
| Error Code | Description | Resolution |
|---|---|---|
MISSING_DATA: {field} | Required field is missing from underwriting data | Ensure the underwriting result has all required applicant data |
Service Errors
| Error Code | Description | Resolution |
|---|---|---|
OFFER_NOT_FOUND | The specified offer could not be found | Verify the ogId exists and the offer was successfully created |
INTERNAL_SERVER_ERROR | An unexpected server error occurred | Retry the request; contact support if the issue persists |