Files

Delete a file

Delete a file by id

DELETE
/v1/files/{id}
x-api-key
<token>

API Key for authentication

In: header

Path Parameters

idrequired
string

Response Body

curl -X DELETE "https://api.scan-documents.com/v1/files/string"
fetch("https://api.scan-documents.com/v1/files/string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://api.scan-documents.com/v1/files/string"

  req, _ := http.NewRequest("DELETE", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://api.scan-documents.com/v1/files/string"

response = requests.request("DELETE", url)

print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;

HttpClient client = HttpClient.newBuilder()
  .connectTimeout(Duration.ofSeconds(10))
  .build();

HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
  .uri(URI.create("https://api.scan-documents.com/v1/files/string"))
  .DELETE()
  .build();

try {
  HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
  System.out.println("Status code: " + response.statusCode());
  System.out.println("Response body: " + response.body());
} catch (Exception e) {
  e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;

var client = new HttpClient();
var response = await client.DeleteAsync("https://api.scan-documents.com/v1/files/string");
var responseBody = await response.Content.ReadAsStringAsync();
Empty
{
  "type": "https://scan-documents.com/docs/errors/not-found",
  "title": "Not Found",
  "status": 404,
  "message": "{resource} with id {id} not found."
}
{
  "type": "https://scan-documents.com/docs/errors/validation-error",
  "title": "Validation Error",
  "status": 422,
  "errors": {
    "{field}": [
      "{error}."
    ]
  }
}
{
  "type": "https://scan-documents.com/docs/errors/rate-limit-error",
  "title": "Rate Limit Exceeded",
  "status": 429,
  "message": "Rate limit exceeded. Please try again later or contact support."
}
{
  "type": "https://scan-documents.com/docs/errors/internal-error",
  "title": "An unexpected error occurred. Contact support if the problem persists.",
  "status": 500,
  "message": "An unexpected error occurred. Contact support if the problem persists."
}