fillPdf​/{formId} (GET)

A GET method request to the fillpdf endpoint will return information for a given form, all the fields that can be expected, in addition to each field’s validation regular expressions. It also returns the tax parameters schema for the requested form.

SPF-API supports form versioning through a query parameter. You can collect all the details of a form and its version by including the formVersion query parameter. This is an optional query param and if not included will provide the latest form version.

🚧

Form Versioning Syntax Example

fillPdf/{{formId}}?formVersion={{formVersion}}

Sample Response

{ 
  "id": "W4101", 
  "locality": "FEDERAL", 
  "name": "W-4", 
  "title": "Employee's Withholding Certificate", 
  "formType": "Resident", 
  "initialQuestionSetId": "QS1", 
  "effectiveDate": "2020-01-01", 
  "formVersion": "1.20.0", 
  "formFields": { 
    "formId": "W4101", 
    "formVersion": "1.20.0", 
    "employee": { 
      "firstName": "^[A-Za-z.\\'\\- \\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF]{1,}$", 
      ... 
    }, 
    "employer": { 
      "name": "^(.*)$", 
      "federalEIN": "^[0-9]{2}[-]?[0-9]{7}$|^[0-9]{9}$", 
      ... 
    }, 
    "fields": { 
      "otherAdjustmentsSurvey": "^(true|false)$", 
      "interestAndDividends": "^[+-]?[0-9]{1,3}(?:,?[0-9]{3})*(?:\\.[0-9]{2})?$", 
      ... 
    }, 
    "signForm": "PREVIEW" 
  }, 
  "blankFormImages": [
    "https://spfcdn-test.symmetry.com/images/W4101/2021.1.0/w4101_1.png",
    "https://spfcdn-test.symmetry.com/images/W4101/2021.1.0/w4101_2.png",
    "https://spfcdn-test.symmetry.com/images/W4101/2021.1.0/w4101_3.png",
    "https://spfcdn-test.symmetry.com/images/W4101/2021.1.0/w4101_4.png"
    ],
  "taxParameters": [ 
    { 
      "id": "FED.dependentsAmt", 
      "valueType": "dollarAmount", 
      "description": "Amount under the dependents credit claimed by employee" 
    }, 
    ... 
  ] 
}

Above is an example of an object returned by the fillPdf​/{formId} (GET) endpoint.

It is important to note the taxParameters object consists of all the values that will be needed for a payroll system to properly calculate payroll taxes.

Form Deprecation

{
    "id": "W4101",
    "notice": {
        "type": "DEPRECATION",
        "message": "Form has been deprecated, current form version: 2021.1.0"
    }

We always recommend passing in a form version as a query param as the best practice when using the SPF-API. This way when hitting the /fillPdf GET endpoint we can alert a user when a form is deprecated. Above is a code snippet of part of the response we will return when an older form version is passed in as a query param.


Jump to top