curl --request DELETE \
--url https://service.incaseof.law/openapi/documents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://service.incaseof.law/openapi/documents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://service.incaseof.law/openapi/documents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://service.incaseof.law/openapi/documents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://service.incaseof.law/openapi/documents/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://service.incaseof.law/openapi/documents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://service.incaseof.law/openapi/documents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Document deleted successfully",
"data": {
"retained": true
}
}{
"success": false,
"error": "Unauthorized",
"message": "Invalid API token. Please check your token or request a new one."
}{
"success": false,
"error": "Forbidden",
"message": "This customer does not belong to your partner account."
}{
"success": false,
"message": "Claim not found"
}{
"success": false,
"error": "Too Many Requests",
"message": "Rate limit exceeded. Your limit is 1000 requests per hour. Please try again later.",
"details": {
"limit": 1000,
"window": "1 hour",
"resets_at": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"message": "Internal server error"
}Delete document
Delete a document that was uploaded through the API. Documents added by the creditor or by incaseof.law cannot
be deleted through the API (403).
A document the incaseof.law team has released to the debtor at any time, or that belongs to a claim taken to
court — the creditor approved the court step, or a filing was recorded after the document was uploaded — is not
erased: it disappears from the API and from every portal but is kept for the incaseof.law team
(data.retained: true). Any other document is deleted permanently (data.retained: false).
Either way, an invoice of the claim that was created from this document is deleted with it — unless a collection letter or an installment agreement of the claim is in force, the claim is closed or went to court, or it is the claim’s last invoice; then the invoice stays and the claim’s activity log says why.
curl --request DELETE \
--url https://service.incaseof.law/openapi/documents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://service.incaseof.law/openapi/documents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://service.incaseof.law/openapi/documents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://service.incaseof.law/openapi/documents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://service.incaseof.law/openapi/documents/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://service.incaseof.law/openapi/documents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://service.incaseof.law/openapi/documents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Document deleted successfully",
"data": {
"retained": true
}
}{
"success": false,
"error": "Unauthorized",
"message": "Invalid API token. Please check your token or request a new one."
}{
"success": false,
"error": "Forbidden",
"message": "This customer does not belong to your partner account."
}{
"success": false,
"message": "Claim not found"
}{
"success": false,
"error": "Too Many Requests",
"message": "Rate limit exceeded. Your limit is 1000 requests per hour. Please try again later.",
"details": {
"limit": 1000,
"window": "1 hour",
"resets_at": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"message": "Internal server error"
}