FDX REST API
/tax-forms/{taxFormId} GET
| Attribute | Value |
|---|---|
| Summary | Retrieve tax form |
| Description | Get the form image or TaxStatement as json for a single tax document for the customer. Use [HTTP Accept request-header](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html) to specify desired content types. See `AcceptHeader` definition for typical values |
| Operation Id | getTaxForm |
Request Parameters
| Parameter | Required? | Location | Type | Description |
|---|---|---|---|---|
| taxFormId | required | path | Identifier | The unique ID for this tax form or tax statement |
| Authorization | required | header | string | The [Authorization HTTP request header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization) provides credentials to allow access to a protected resources |
| x-fapi-interaction-id | required | header | FapiInteractionId | Unique identifier for this interaction |
| FDX-API-Actor-Type | optional | header | ActorType | Identifies whether the customer is present (USER) or it is a BATCH operation |
| FDX-API-Data-Provider-Id | optional | header | Identifier | ID for the financial institution responding to the request |
| Accept | required | header | string | Use the [Accept HTTP request header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept) to indicate one or more content types to request for the search result response. Use `application/json` to request data, `application/pdf`, `application/zip` or `image/*` MIME-types to request images. In comma-separated array format using values typically from './fdxapi.components.yaml#/components/schemas/ContentTypes' enumeration. Use in combination with TaxDataTypeQuery parameter to request `application/json` responses in 'JSON' or 'BASE64_PDF' format for tax form data |
| taxDataType | optional | query | TaxDataType | Use taxDataType to request `application/json` tax form data response in 'JSON' or 'BASE64_PDF' format. Omit if either format is acceptable. Used in combination with AcceptHeader requesting `application/json` response |
Response
| Response Code | Response Type | Description |
|---|---|---|
| 200 | application/pdf or application/zip or image/gif or image/jpeg or image/tiff or image/png or application/json of TaxStatement | The document image or TaxStatement as json for a single tax document for the customer. A single document can include multiple IRS tax forms and/or other reporting statements as delivered by providers |
| 206 | application/json of TaxStatement | Partial Content success retrieving a customer tax document, some errors are being returned |
| 400 | application/json of Error | Account ID is required for searching or validating authorization |
| 404 | application/json of Error | Tax Form for provided Tax Form ID was not found |
| 406 | application/json of Error | Content Type not Supported |
| 409 | application/json of Error | Tax forms are not currently available for this account or this year |
| 500 | application/json of Error | Catch-all exception where request was not processed due to an internal outage/issue. Consider other more specific errors before using this error |
| 501 | application/json of Error | Error when FdxVersion in Header is not one of those implemented at backend |
| 503 | application/json of Error | System is down for maintenance |
Example Request
GET /fdx/v4/tax-forms/305130001 HTTP/1.1 Accept: application/json Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJjbGkiOiJ0YXhjbGkiLCJ1c2VyIjoiODEyMzQ1Njc4NSIsInBhc3MiOiIzMDUxMzAwMDEiLCJpYXQiOjE2MTI5MTI4NTksImV4cCI6MTYxMjkxNjQ1OX0.yreKZ3XYK-tg0gRMlWGkMdCNr8aywp5yzDKSpxfGTMo User-Agent: Jersey/2.29 (HttpUrlConnection 1.8.0_252) Host: api.taxdocserver.com Connection: keep-alive
Example Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Cloud-Trace-Context: 484c9b968a4fe6f55679f9585b67e5a1;o=1
Date: Tue, 09 Feb 2021 23:21:03 GMT
Server: Google Frontend
Content-Length: 984
Connection: keep-alive
[ {
"tax1099G" : {
"taxYear" : 2020,
"taxFormId" : "305130001",
"payerNameAddress" : {
"line1" : "12020 Sunrise Valley Dr",
"city" : "Prescott",
"state" : "VA",
"postalCode" : "20191",
"name1" : "Tax Doc Issuer"
},
"payerTin" : "12-3456789",
"recipientTin" : "XXX-XX-1234",
"recipientNameAddress" : {
"line1" : "1 Main St",
"city" : "Melrose",
"state" : "NY",
"postalCode" : "12121",
"name1" : "Kris Q. Public"
},
"accountNumber" : "123-1234567",
"unemploymentCompensation" : 1000.0,
"taxRefund" : 2000.0,
"refundYear" : 2019,
"federalTaxWithheld" : 400.0,
"rtaaPayments" : 500.0,
"grants" : 600.0,
"agriculturePayments" : 700.0,
"businessIncome" : true,
"marketGain" : 900.0,
"stateTaxWithholding" : [ {
"stateTaxWithheld" : 110.0,
"state" : "CA",
"stateTaxId" : "123-12345",
"stateIncome" : 1100.0
} ]
}
} ]