Skip to main content
POST
/
invoice-series
/
reservations
/
{token}
/
release
Release an unused reservation
curl --request POST \
  --url https://api.contazen.ro/v1/invoice-series/reservations/{token}/release \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "object": "number_reservation",
    "token": "<string>",
    "series_id": "<string>",
    "number": 123,
    "status": "pending",
    "device_id": "<string>",
    "reserved_at": 123,
    "expires_at": 123,
    "consumed_at": 123,
    "client_local_uuid": "<string>"
  },
  "meta": {
    "version": "v1",
    "request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "response_time": "23.45ms"
  }
}

Overview

Flips a pending reservation to released. Called by the mobile app when the user discards an offline draft before it was synced.
Releasing does not return the number to the pool — the series counter already advanced when the reservation was allocated. Released reservations become documented gaps (same outcome as expired ones). Release primarily exists so the server can tell the difference between “device will retry this invoice later” and “user cancelled it intentionally” — useful for audit trails and for other devices that may come back online and expect accurate pool sizes.

Path parameters

token
string
required
The reservation_token returned by Reserve Numbers.

Response

Returns the updated reservation object with status = 'released'.

Errors

CodeMeaning
resource_missingToken does not exist or belongs to another firm.
forbiddenToken belongs to a different device — only the owning device can release.

Authorizations

Authorization
string
header
required

Use your API key (sk_live_xxx or sk_test_xxx)

Path Parameters

token
string
required

Response

Reservation released

success
boolean
data
object

Pre-allocated invoice number held for a mobile device.

meta
object