Delete
Delete
Use this endpoint to delete any in-progress W2G returns created in TaxBandits. When deleting, provide unique identifiers such as SubmissionId
, RecordId
, etc. If only the SubmissionId
is provided, all returns associated with that ID will be deleted.
Note: In the Live environment, returns with a Transmitted or Accepted status cannot be deleted. However, in the Sandbox environment, you can delete returns regardless of their status (Transmitted, Rejected, or Accepted).
DELETE FormW2G/Delete
Request Params
Field | Type | Description |
---|---|---|
SubmissionId | Guid | Unique identifier of a submission |
RecordIds | Guid[] | An unique identifier generated by TaxBandits when a W2-G return is created. Mention the W2-G return's Record ID that you want to delete. |
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 |
Form1099Records | object | Pulls the Form W2-G records with Success and Error statuses |
SuccessRecords | object[] | It will show the detailed information about the success status of Form W2-G Records |
SequenceId | string | A unique number is given by an inbound application to identify failed records |
RecordId | Guid | Unique identifier of a record |
Status | string | Returns the status of the records. |
StatusTs | string | Date and time of return deleted. |
ErrorRecords | object[] | It will show the detailed information about the error status of Form W2-G Records. |
SequenceId | string | A unique number given by an inbound application to identify failed records |
RecordId | Guid | Unique identifier of a record |
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 |
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 |
Request Params
"FormW2G/Delete?SubmissionId=9d71ae45-df5f-49f7-86f8-e88f54132fa1&RecordIds=15c3caa6-8402-4548-8713-4fcdd2f7d42d"
Response JSON
- 200
- 400
- 404
- 401
Success Response - This is a sample response for successful API requests.
{
"StatusCode": 200,
"StatusName": "Ok",
"StatusMessage": "Successful API call",
"SubmissionId": "9d71ae45-df5f-49f7-86f8-e88f54132fa1",
"Form1099Records": {
"SuccessRecords": [
{
"SequenceId": "1",
"RecordId": "15c3caa6-8402-4548-8713-4fcdd2f7d42d",
"Status": "DELETED",
"StatusTs": "2021-08-05 06:26:16 -04:00"
},
{
"SequenceId": "2",
"RecordId": "eb39714e-f653-4c4d-a53c-07f24f9a9dj5",
"Status": "DELETED",
"StatusTs": "2021-08-05 06:26:16 -04:00"
}
],
"ErrorRecords": null
},
"Errors": null
}
Bad Request Response - You'll get the below response when your API requests contain any validation errors.
{
"StatusCode": 400,
"StatusName": "BadRequest",
"StatusMessage": "Validation error has occurred",
"SubmissionId": null,
"Form1099Records": null,
"Info": null,
"Errors": [
{
"Id": "F68-100024",
"Name": "SubmissionId",
"Message": "SubmissionId is required"
}
]
}
Not Found Response - You'll get the below response if your API request contains a record that's not found in our database.
{
"StatusCode": 404,
"StatusName": "NotFound",
"StatusMessage": "The resource you have specified cannot be found",
"SubmissionId": "4c74d0ed-fdd3-40eb-964f-c6021a8a8123",
"Form1099Records": null,
"Info": null,
"Errors": [
{
"Id": "F68-100029",
"Name": "SubmissionId",
"Message": "SubmissionId is invalid"
}
]
}
Unauthorized Response - You'll get the below response when your API requests don't contain valid authentication credentials.
{
"StatusCode": 401,
"StatusName": "Unauthorized",
"StatusMessage": "Invalid authorization credentials",
"Errors": [
{
"Id": "AUTH-100018",
"Name": "Authorization",
"Message": "JWT EXPIRED"
}
]
}