GetPdf
GetPdf
This endpoint can be used to retrieve the PDF copies of the completed Form W2G correction. You can request the PDFs using any of the following:
- SubmissionId only – To generate PDFs for all records under the submission.
- SubmissionId with RecordIds – To generate PDFs for specific recipient records.
How it works
- Once the request is processed successfully, a webhook will be triggered containing the download link(s).
- The files are not encrypted and can be downloaded directly. For security, the download link will expire in 24 hours after Webhook delivery.
GET FormW2GCorrection/GetPDF Request Params
| Field | Type | Description |
|---|---|---|
| SubmissionId | Guid | Unique identifier of a submission |
| RecordIds | Guid[] | Optional Unique identifier of a records. |
| TINMaskType | string | Optional Choose the masking type of your Recipient's TIN on the W-2G PDF. MASKED - The Recipient's TIN will be masked in the PDF. Only the last 4 digits of the TIN can beread.UNMASKED - The Recipient's TIN will not be masked in the PDF. To protect the PII information of the Recipient, thePDF with Unmasked TIN is password protected. Use the Recipient's TIN (password) to open the protected file.BOTH - TwoPDFs will be delivered for each Recipient.One with Masked TIN and the other with Unmasked TIN. The PDF with Unmasked TINwill be password protected.Allowed values"MASKED", "UNMASKED", "BOTH" |
Response Body
| Field | Type | Description |
|---|---|---|
| StatusCode | number | Returns the HTTP status codes like 200,300 etc. |
| StatusName | string | Name of the status code |
| StatusMessage | string | Detailed status message |
| SubmissionId | Guid | Unique identifier of a submission |
| FormW2GRecords | object[] | Collection of Form W-2G correction records for which the PDF will be successfully delivered |
| RecordId | Guid | Unique identifier of a record |
| Message | string | Provides additional information regarding the PDF delivery. |
| 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 |
| Type | string | Type of validation error |
Request Params
"FormW2GCorrection/GetPDF?SubmissionId=94677293-8ecf-443b-8a76-8b8d192b2cb1&RecordIds=97c9ba31-c244-4aeb-addc-f1b53be373fc&TINMASKTYPE=UNMASKED"
Response Json
Success Response - This is a sample response for successful API requests.
{
"StatusCode": 200,
"StatusName": "Ok",
"StatusMessage": "Successful API call",
"SubmissionId": "94677293-8ecf-443b-8a76-8b8d192b2cb1",
"FormW2GRecords": [
{
"RecordId": "97c9ba31-c244-4aeb-addc-f1b53be373fc",
"Message": "We've successfully received your request to generate PDF. You will be notified with the URL to download the PDF."
}
],
"Errors": null
}