RequestDraftPdfUrl
The response of the API request will return the Draft PDF for review purpose.This method can be used to retrieve PDF for a single record/form.
The PDF will be returned in the response for the Forms that are not yet Transmitted in TaxBandits.
This method will only provide the Copy A of the Form W2C and it will have a watermark "For Review only" on it.
How does it work?
-
The first step is to call the Auth method to get the access token. This access token must be supplied in the request header as the 'Bearer' token. Refer to OAuth 2.0 Authentication for more information on JWT authentication and how to integrate with the subsequent requests.
-
The second step is to call the Create endpoint FormW2C/Create to create a return in TaxBandits. Store the RecordId of the W2C form that is generated by TaxBandits and returned in the Response.
-
Next, call the [POST] FormW2C/RequestDraftPdfUrl endpoint. You will need to supply the following parameters:
-
Access Token in the header as Bearer Token (Generated using TaxBandits OAuth Authentication API)
-
Form reference (RecordId) - Specify the RecordId for the form you need the Draft PDF form. If you do not have the RecordId, then you request the PDF using the following parameters
- Business Reference - Use the business reference PayerRef or Businessid or TIN
- Employee Reference - Use the employee reference PayeeRef or EmployeeId or TIN
- Tax Year - Tax year of the form you are requesting the PDF for.
-
POST FormW2C/RequestDraftPdfUrl
Request Body
Field | Type | Description |
---|---|---|
RecordId | Guid | Optional Specify the RecordId of the return |
TINMaskType | string | Optional TIN Mask type on the TIN printed on the PDFAllowed values"MASKED", "UNMASKED" |
TaxYear | string | Optional Tax Year of the return. Specify only if you do not have the RecordId |
Business | object | Optional Collects the Business identifier TIN or TBS Business Id or PayerRef. This object information is required only if you do not have the RecordId |
BusinessId | Guid | Optional TaxBandits Unique Business Identifier. This ID is generated by TaxBandits after you create a business in your account using the Business endpoint. |
PayerRef | string | Optional Unique payer identifier assigned by the client. Size Range: 1 to 50 |
EIN | string | Optional Employer Identification Number. Use this as an alternative for BusinessId or PayerRef. Size Range: 9 to 11 |
Employee | object | Optional Collects the employee's unique identifier. This object information is required only if you do not have the RecordId |
EmployeeId | Guid | Optional Unique Employee Identifier generated by TaxBandits |
SSN | string | Optional Social Security Number. Use this as an alternative for EmployeeIds. Size Range: 9 to 11 |
Request JSON
- Sample 1
- Sample 2
With just the RecordId
{
"TaxYear": null,
"RecordId": "cf0a188b-6661-4b57-b04b-ba9ead52a16e",
"TINMaskType":"Masked",
"Business": null,
"Employee": null
}
With No RecordId
{
"TaxYear": "2021",
"RecordId": null,
"TINMaskType":"Unmasked",
"Business": {
"BusinessId": "94B6214D-8DCA-490C-8FC3-602840B439B5",
"PayerRef": null,
"EIN": null
},
"Employee": {
"EmployeeId": "6DDFFB5A-565F-402D-8602-7ECD917CEC04",
"SSN": null
}
}
Response Body
Field | Type | Description |
---|---|---|
RecordId | Guid | Unique identifier of the record |
EmployeeId | Guid | Unique Employee Identifier generated by TaxBandits |
DraftPdfUrl | string | URL of the Draft PDF |
DraftPdfPath | string | Storage path of the draft PDF |
Errors | object[] | Shows detailed error information |
Id | string | Returns the validation error code |
Name | string | Name of the validation error |
Message | string | Description of the validation error |
Response JSON
- Response 1
- Response 2
{
"RecordId": "5ce0a501-ddcd-4b23-af7c-c836bc434bda",
"RecipientId": "ba15c63a-e191-4dbc-9156-457f0980052e",
"PayeeRef": null,
"DraftPdfUrl": "https://expressirsforms.s3.us-east-1.amazonaws.com/pdfs/c2d66a8c-3cf3-4dbc-9095-38b92fc58866/0927361d-25ec-47d5-9c37-7a239ec6a2fa/1099/19455581/d/copy_tbs_wm_1up_9455960000.pdf",
"DraftPdfPath": "pdfs/c2d66a8c-3cf3-4dbc-9095-38b92fc58866/0927361d-25ec-47d5-9c37-7a239ec6a2fa/1099/19455581/d/copy_tbs_wm_1up_9455960000.pdf",
"Error": null
}
{
"RecordId": "5ce0a501-ddcd-4b23-af7c-c836bc434bda",
"RecipientId": "ba15c63a-e191-4dbc-9156-457f0980052e",
"PayeeRef": null,
"DraftPdfUrl": "https://expressirsforms.s3.us-east-1.amazonaws.com/pdfs/c2d66a8c-3cf3-4dbc-9095-38b92fc58866/0927361d-25ec-47d5-9c37-7a239ec6a2fa/1099/19455581/d/copy_tbs_wm_1up_9455960000.pdf",
"DraftPdfPath": "pdfs/c2d66a8c-3cf3-4dbc-9095-38b92fc58866/0927361d-25ec-47d5-9c37-7a239ec6a2fa/1099/19455581/d/copy_tbs_wm_1up_9455960000.pdf",
"Error": null
}
PDF Security
The PDFs contain PII (Personally Identifiable Information) data of the recipients. To make sure that the PII data involved is completely secured, TaxBandits has added additional security to the form PDFs.
The PDF links you get in the Response are encrypted, and you will have to decrypt them before downloading.
Refer to this link for the steps to decrypt PDF with Sample codes.