Delete a number series
curl --request DELETE \
--url https://api.finseed.es/v1/number_series/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.finseed.es/v1/number_series/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.finseed.es/v1/number_series/{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://api.finseed.es/v1/number_series/{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://api.finseed.es/v1/number_series/{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://api.finseed.es/v1/number_series/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.finseed.es/v1/number_series/{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{
"id": "ns_clx123abc456",
"deleted": true
}{
"code": "unauthorized",
"detail": "Authentication failed. Send your API key as a bearer token in the `Authorization` header. Keys are scoped to one environment, so a test key cannot read live data and vice versa.",
"errors": [],
"doc_url": "https://www.finseed.es/docs/api-reference/errors#unauthorized"
}{
"code": "number_series_not_found",
"detail": "No number series matches that identifier in this environment. Note that test and live keys see different number series.",
"errors": [],
"doc_url": "https://www.finseed.es/docs/api-reference/errors#number_series_not_found"
}{
"code": "number_series_in_use",
"detail": "This number series cannot be deleted because invoices or integrations reference it. A series is immutable once created: to change how invoices are numbered, create a new series and issue on that one instead.",
"errors": [],
"doc_url": "https://www.finseed.es/docs/api-reference/errors#number_series_in_use"
}{
"code": "internal_error",
"detail": "Something went wrong on our side. The request did not complete and can be retried safely.",
"errors": [],
"doc_url": "https://www.finseed.es/docs/api-reference/errors#internal_error"
}Number Series
Delete a number series
Deletes a number series that no invoice or integration references. A series that has issued invoices, or that an integration is configured to use, cannot be deleted and the request fails with number_series_in_use.
DELETE
/
v1
/
number_series
/
{id}
Delete a number series
curl --request DELETE \
--url https://api.finseed.es/v1/number_series/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.finseed.es/v1/number_series/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.finseed.es/v1/number_series/{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://api.finseed.es/v1/number_series/{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://api.finseed.es/v1/number_series/{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://api.finseed.es/v1/number_series/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.finseed.es/v1/number_series/{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{
"id": "ns_clx123abc456",
"deleted": true
}{
"code": "unauthorized",
"detail": "Authentication failed. Send your API key as a bearer token in the `Authorization` header. Keys are scoped to one environment, so a test key cannot read live data and vice versa.",
"errors": [],
"doc_url": "https://www.finseed.es/docs/api-reference/errors#unauthorized"
}{
"code": "number_series_not_found",
"detail": "No number series matches that identifier in this environment. Note that test and live keys see different number series.",
"errors": [],
"doc_url": "https://www.finseed.es/docs/api-reference/errors#number_series_not_found"
}{
"code": "number_series_in_use",
"detail": "This number series cannot be deleted because invoices or integrations reference it. A series is immutable once created: to change how invoices are numbered, create a new series and issue on that one instead.",
"errors": [],
"doc_url": "https://www.finseed.es/docs/api-reference/errors#number_series_in_use"
}{
"code": "internal_error",
"detail": "Something went wrong on our side. The request did not complete and can be retried safely.",
"errors": [],
"doc_url": "https://www.finseed.es/docs/api-reference/errors#internal_error"
}Autorizaciones
API key sent as a bearer token in the Authorization header.
Parámetros de ruta
Opaque number series identifier — the id from a list row.
¿Esta página le ayudó?
⌘I