Voucher APIVoucherBases

Get voucher details

gethttps://voucher-api.ancon.io/public/api/v1/Outlets/{outletId}/OrderVoucherBases/{voucherBasisId}/Voucher
View .mdOpenAPI

Builds the accounting voucher for a published voucher basis. Responds 400 with error code aad1dadd-f6c5-401c-9ae1-cdf0788dc952 (MissingAccountNumbers) when the outlet has no account number configured for a way of payment, product group, tax rate or fee on the voucher basis. The message lists what is missing and additionalData holds the same names per category (paymentMethods, productGroups, taxes, fees). The request keeps failing until the accounts are configured in Backoffice; retrying without a configuration change does not help.

Authorization

  • Access-Tokenheaderrequired

    Tenant- or outlet-level token from the backoffice. See Get started.

Path parameters

  • outletIdstring (uuid)required
  • voucherBasisIdstring (uuid)required

Query parameters

  • PartTypeinteger (int32)

    Allowed values: 0, 1, 2.

Header parameters

  • correlationIdstring

    Correlation Id for the request

Responses

200OKapplication/json
  • voucherobject | null
    9 fields in voucher
    • titlestring | null
    • voucherNostring | null
    • trackingobject | null
      2 fields in tracking
      • costCenterstring | null
      • projectstring | null
    • custom1string | null
    • custom2string | null
    • custom3string | null
    • custom4string | null
    • currencyCodestring | null
    • itemsarray<object> | null
      10 fields in items
      • accountNumberstring | null
      • debitnumber (double)
      • creditnumber (double)
      • namestring | null
      • trackingobject | null
        2 fields in tracking
        • costCenterstring | null
        • projectstring | null
      • custom1string | null
      • custom2string | null
      • custom3string | null
      • custom4string | null
      • custom5string | null
400Bad Requestapplication/json
  • messagestring | null
  • errorCodestring (uuid)
  • additionalDataany | null
401Unauthorizedapplication/json
404Not Foundapplication/json
  • messagestring | null
  • errorCodestring (uuid)