Skip to content
Hydda One API
Esc
↑↓navigate↵open⌘Jpreview

List deleted invoices you may still hold

Poll this to learn about invoices an operator deleted after you attached your reference to them. Discard your own copy of each, such as a draft in your ERP, then report it discarded. An item stays on the queue until you do. Report a whole page in one request with POST /v1/billing/batch/report-discarded. Refused with 400 when the organization has no invoicing integration that handles sending.

GET/v1/billing/withdrawal-queue
Authorization
AuthorizationOAuth2 access token · headerrequired

An access token for an Application, from the client_credentials grant. An integration of your own uses the same grant. A connector from Hydda gets its token from the installation-token grant instead. Send it as Authorization: Bearer <token>.

Query parameters
limitinteger

The most items to return, from 1 to 200. Defaults to 50.

max 200
Responses
200

The deleted invoices to discard.

itemsobject[]required

Up to limit deleted invoices, oldest first. Empty when there is nothing to discard.

Show properties
Array of object
invoiceIdstring<uuid>required

The id of the deleted invoice. Report the discard by it.

invoiceNumberintegerrequired

Hydda One's own number for the deleted invoice.

max 9007199254740991
documentKindstringrequired

Whether the document is an invoice or a credit note. A credit note names the invoice it credits.

Allowed:invoicecredit-note
businessContextIdstring<uuid> | nullrequired

The business context that owned the contract the invoice billed. Null when unknown.

externalReferencestringrequired

Your own id for the invoice in your system, 1 to 200 characters and unique in the organization. Payments can be reported by it in place of Hydda One's id.

min length 1 · max length 200
withdrawnAtstring<date-time>required

When the invoice was deleted, as an ISO 8601 timestamp in UTC.

400

The request is not valid, or a business rule refused it. code names the rule.

typestringrequired

Always about:blank.

titlestringrequired

The HTTP status phrase, for example Not Found.

statusintegerrequired

The HTTP status code.

min -9007199254740991 · max 9007199254740991
detailstring

What went wrong, for a person to read. Do not parse it.

codestring

Names the rule that refused the request, when the failure has one. Match on this, not on detail.

Allowed:VALIDATION_FAILEDBILLING_INTEGRATION_NOT_CONFIGURED
parametersobject

Values the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.

issuesobject[]

With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.

401

The access token is missing, expired or not valid.

typestringrequired

Always about:blank.

titlestringrequired

The HTTP status phrase, for example Not Found.

statusintegerrequired

The HTTP status code.

min -9007199254740991 · max 9007199254740991
detailstring

What went wrong, for a person to read. Do not parse it.

codestring

Names the rule that refused the request. Match on this, not on detail.

parametersobject

Values the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.

issuesobject[]

With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.

403

The token does not allow this request.

typestringrequired

Always about:blank.

titlestringrequired

The HTTP status phrase, for example Not Found.

statusintegerrequired

The HTTP status code.

min -9007199254740991 · max 9007199254740991
detailstring

What went wrong, for a person to read. Do not parse it.

codestring

Names the rule that refused the request. Match on this, not on detail.

parametersobject

Values the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.

issuesobject[]

With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.

Request
curl -X GET 'https://api.hydda.one/v1/billing/withdrawal-queue' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "items": [
    {
      "invoiceId": "4f163819-178d-470c-a246-d6768476a6ec",
      "invoiceNumber": 1,
      "documentKind": "invoice",
      "businessContextId": "58db1938-ac0d-4a94-a386-d1ba9846f5b8",
      "externalReference": "string",
      "withdrawnAt": "2019-08-24T14:15:22Z"
    }
  ]
}