Delete invoice
/documents/invoices/{id}Costs 2 rate-limit points · Rate limits
Moves an invoice to the trash, as the Invoices page does: it leaves the lists, keeps its number and PDF, and can be restored. Nothing is deleted permanently and Shopify is not touched.
Reversible with POST /documents/invoices/:id/restore. Trashed invoices are still returned by GET /documents/invoices?link=trashed. Trashing does not free the invoice number: opening the order shows the same invoice again. To free a number taken by mistake, use DELETE /documents/invoices/:id/permanent.
Also searched astrash invoicedelete invoiceremove invoicemove invoice to trashhide invoicediscard invoice
Path parameters
idstringRequired
Returns
idintegerExample:980190991trashedbooleanExample:true
Errors
Missing or unknown X-Auth-Token, or the shop uninstalled the app.
v3_required: the shop still runs the previous dashboard. paid_plan_required: API access needs a paid plan.
The resource does not exist for this shop, or no action is registered at this path.
The request failed validation. Nothing was saved.
Rate limited: cost-weighted per key (reads cost less than writes). Wait Retry-After seconds; see X-RateLimit-* headers.
Every error has the same shape: see Errors.
curl -X DELETE "https://app.invoicefalcon.com/api/v3/external/documents/invoices/980191059" \
-H "X-Auth-Token: $INVOICE_FALCON_API_KEY"const res = await fetch("https://app.invoicefalcon.com/api/v3/external/documents/invoices/980191059", {
method: "DELETE",
headers: {
"X-Auth-Token": process.env.INVOICE_FALCON_API_KEY,
},
});
const data = await res.json();import os
import requests
res = requests.delete(
"https://app.invoicefalcon.com/api/v3/external/documents/invoices/980191059",
headers={"X-Auth-Token": os.environ["INVOICE_FALCON_API_KEY"]},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.invoicefalcon.com/api/v3/external/documents/invoices/980191059")
req = Net::HTTP::Delete.new(uri, "X-Auth-Token" => ENV["INVOICE_FALCON_API_KEY"])
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body){
"id": 980190991,
"trashed": true
}{
"errors": [
"Invalid API key"
],
"code": "unauthorized"
}{
"errors": [
"API access requires a paid plan"
],
"code": "paid_plan_required"
}{
"errors": [
"Resource not found"
],
"code": "not_found"
}{
"errors": [
"id is missing"
]
}{
"errors": [
"Rate limit exceeded"
],
"code": "rate_limited"
}