×

Form Creation API

Creates a Form 7004 draft record after validating filer, form, and IRS payment details. This operation only persists to the database (no external IRS calls at this stage).
Endpoint:
HTTP
POST /api/forms/create
Description: Creates a new Form 7004 record with filer details, form details, and IRS payment details. Performs validation before saving.
Request Body
JSON
{
  "filerDetails": {
    "userKey": "{{userKey}}",
    "taxId": "789456123",
    "businessName": "ggggg",
    "address1": "123 Main Street",
    "address2": "Suite 100, Building A",
    "city": "New York",
    "state": "NY",
    "zip": "10001",
    "country": "US",
    "phone": "555-123-4567",
    "email": "[email protected]",
    "filingType": "S",
    "addressType": "N"
  },
  "form7004Details": {
    "taxYear": "2025",
    "businessType": "Corporations",
    "extensionForm": "1120",
    "isForeignCorporationNoUSOffice": true,
    "isCommonParentConsolidatedReturn": true,
    "qualifiesUnderRegulation16081_5": true,
    "is5Month": false,
    "calendarYear": false,
    "startPeriod": "2023-01-01T00:00:00Z",
    "endPeriod": "2023-12-31T23:59:59Z",
    "isInitialRet": true,
    "isFinalRet": true,
    "isChangeInAccPeriod": true,
    "isConsolidatedRet": true,
    "isOther": true,
    "businessOwesTaxes": true,
    "businessDoesNotOweTaxes": false,
    "totalTaxLiability": 50000,
    "totalPaymentMade": 30000,
    "balanceDue": 20000
  },
  "irsPaymentDetails": {
    "routingNo": "",
    "accountNo": "",
    "accountType": "",
    "withdrawalDate": "",
    "accountHolderPhone": "",
    "paymentType": "EFTPS"
  }
}
Validation Points (from Zod Schemas)
·       FilerDetailsSchema → Validates filer info (taxId, businessName, address, etc.)
·       Form7004DetailsSchema → Validates form details (tax year, extension form, periods, tax liability)
·       IRSPaymentDetailsSchema → Validates payment details (routing/account info if EFW, minimal if EFTPS)
Responses
JSON
// Validation Failure
{
  "Status": false,
  "Message": "Validation failed",
  "ErrorMessage": "filerDetails.taxId: Tax ID is required"
}
// Success
{
  "Status": true,
  "FormKey": "GUID",
  "FilerKey": "GUID",
  "UserKey": "GUID",
  "Message": "Form details created successfully (DB only - no external calls)"
}