Skip to content

Delete invoice, that is in draft state only.

DELETE https://api.leapa.co/v2/invoices/{invoice_id}

This endpoint needs your API key

Send it as a bearer token in the Authorization header. A request without one is answered with 401. See Authentication for where to find your key and how to keep it secret.

Request

curl -X DELETE "https://api.leapa.co/v2/invoices/inv_7c1f9a2b48" \
  -H "Authorization: Bearer $LEAPA_API_KEY" \
  -H "Accept: application/json"

Response

OK

{
  "id": "obj_5f21c8a40b",
  "object": "string",
  "deleted": false
}

Path parameters

Values that go into the URL itself.

  • invoice_idstringrequired
    Example:inv_7c1f9a2b48

Response

application/json
  • idstring

    Invoice ID

  • objectstring

    The object name

  • deletedboolean

    Flag indicating that the invoice is delete.

Status codes

  • 200OK
  • 400Bad request
  • 401Unauthorized
  • 402Payment required
  • 403Forbidden
  • 404Not found
  • 428Precondition required
  • 500Server error

Request

curl -X DELETE "https://api.leapa.co/v2/invoices/inv_7c1f9a2b48" \
  -H "Authorization: Bearer $LEAPA_API_KEY" \
  -H "Accept: application/json"

Response

OK

{
  "id": "obj_5f21c8a40b",
  "object": "string",
  "deleted": false
}