Delete
Delete
This endpoint can be used to delete in-progress Form W-2 returns created in TaxBandits.
Key Points:
- Provide a unique identifier, such as
SubmissionIdorRecordId, to specify which return(s) to delete. - If only the
SubmissionIdis provided, all returns associated with that submission will be deleted. - In the Live environment, returns with a Transmitted or Accepted status cannot be deleted. In the Sandbox environment, returns can be deleted regardless of status (Transmitted, Rejected, or Accepted).
DELETE formw2/delete Request Body
| Field | Type | Description |
|---|---|---|
| SubmissionId | Guid | A unique identifier of a submission. |
| RecordIds | Guid[] | A unique identifier generated by TaxBandits when a return is created. Mention the return's RecordId that you want to delete. |
Response Body
| Field | Type | Description |
|---|---|---|
| SubmissionId | Guid | A Unique identifier of a submission. |
| FormW2Records | object | Pulls the Form records with Success and Error statuses. |
| SuccessRecords | object[] | It will show the detailed information about the success status of the Form Records. |
| SequenceId | string | A unique number given by an inbound application to identify failed records. |
| FormType | string | Denotes the type of the form. |
| RecordId | Guid | A 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 the Form Records. |
| SequenceId | string | A unique number given by an inbound application to identify failed records. |
| RecordId | Guid | A 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 ID. |
| Name | string | Name of the validation error. |
| Message | string | Description of the validation error. |
Payload

Go Lang
Node.js
Python
.NET C#

Ruby
Java

cURL
Request Params
| Sample | Description | Action |
|---|---|---|
| Sample 1 | Query Params - Delete Form W2 returns using SubmissionId and RecordIds. |
Sample 1
formw2/delete?submissionId=9d71ae45-df5f-49f7-86f8-e88f54132fa1&recordIds=01132f6d-ef4a-4014-817e-94a5a19bd52b,eb39714e-f653-4c4d-a53c-07f24f9a9dj5
Response JSON
| Response | Description | Action |
|---|---|---|
| 200 | Success Response - This is a sample response for successful API requests. |
Response: 200
{
"SubmissionId": "9d71ae45-df5f-49f7-86f8-e88f54132fa1",
"FormW2Records": {
"SuccessRecords": [
{
"SequenceId": "1",
"FormType": "FormW2",
"RecordId": "15c3caa6-8402-4548-8713-4fcdd2f7d42d",
"Status": "DELETED",
"StatusTs": "2025-08-05 06:26:16 -04:00"
},
{
"SequenceId": "2",
"FormType": "FormW2",
"RecordId": "eb39714e-f653-4c4d-a53c-07f24f9a9dj5",
"Status": "DELETED",
"StatusTs": "2025-08-05 06:26:16 -04:00"
}
],
"ErrorRecords": null
},
"Errors": null
}
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "<APIURL>/v2.0.0/FormW2/delete?submissionId=9d71ae45-df5f-49f7-86f8-e88f54132fa1&recordIds=01132f6d-ef4a-4014-817e-94a5a19bd52b%2Ceb39714e-f653-4c4d-a53c-07f24f9a9dj5"
method := "DELETE"
client := &http.Client{}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "<ACCESS_TOKEN>")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
const axios = require('axios');
let data = '';
let config = {
method: 'delete',
maxBodyLength: Infinity,
url: '<APIURL>/v2.0.0/Formw2/delete?submissionId=9d71ae45-df5f-49f7-86f8-e88f54132fa1&recordIds=01132f6d-ef4a-4014-817e-94a5a19bd52b,eb39714e-f653-4c4d-a53c-07f24f9a9dj5',
headers: {
'Content-Type': 'application/json',
'Authorization': '<ACCESS_TOKEN>'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import http.client
import json
conn = http.client.HTTPSConnection("<APIURL>")
payload = ''
headers = {
'Content-Type': 'application/json',
'Authorization': '<ACCESS_TOKEN>'
}
conn.request("DELETE", "/v2.0.0/Formw2/delete?submissionId=9d71ae45-df5f-49f7-86f8-e88f54132fa1&recordIds=01132f6d-ef4a-4014-817e-94a5a19bd52b,eb39714e-f653-4c4d-a53c-07f24f9a9dj5", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Delete, "<APIURL>/v2.0.0/Formw2/delete?submissionId=9d71ae45-df5f-49f7-86f8-e88f54132fa1&recordIds=01132f6d-ef4a-4014-817e-94a5a19bd52b,eb39714e-f653-4c4d-a53c-07f24f9a9dj5");
request.Headers.Add("Authorization", "<ACCESS_TOKEN>");
var content = new StringContent("", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
require "uri"
require "json"
require "net/http"
url = URI("<APIURL>/v2.0.0/Formw2/delete?submissionId=9d71ae45-df5f-49f7-86f8-e88f54132fa1&recordIds=01132f6d-ef4a-4014-817e-94a5a19bd52b,eb39714e-f653-4c4d-a53c-07f24f9a9dj5")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "<ACCESS_TOKEN>"
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("<APIURL>/v2.0.0/Formw2/delete?submissionId=9d71ae45-df5f-49f7-86f8-e88f54132fa1&recordIds=01132f6d-ef4a-4014-817e-94a5a19bd52b,eb39714e-f653-4c4d-a53c-07f24f9a9dj5")
.method("DELETE", body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "<ACCESS_TOKEN>")
.build();
Response response = client.newCall(request).execute();
curl --location --request DELETE '<APIURL>/v2.0.0/Formw2/delete?submissionId=9d71ae45-df5f-49f7-86f8-e88f54132fa1&recordIds=01132f6d-ef4a-4014-817e-94a5a19bd52b%2Ceb39714e-f653-4c4d-a53c-07f24f9a9dj5' --header 'Content-Type: application/json' --header 'Authorization: <ACCESS_TOKEN>' --data ''