← Platform API v1.32.0

GET /tenants/{tenantId}/accounting/reconciliation

tenantAccountingGetReconciliation · Accounting

Human Supabase USER only; permissions accounting.read. Double-entry books per legal entity, in its base currency. Opening a ledger turns accounting on for one legal entity from `startsOn`: from then on every covered operation of that entity (invoices, payments, applications, credits, refunds, counter collections, cash movements, settlements and valued stock movements) writes its entry in the same transaction or does not happen. An entity without a ledger keeps no books and behaves as before. Debits equal credits to the last unit of the currency; amounts are exact and never floats. A posted entry is immutable: it is corrected by a linked mirror entry. One entry per event, enforced by a unique key. A closed period refuses every new entry dated in it. Manual and opening entries are proposals until a different user approves them. Billing, delivery and collection are separate facts: an invoice never recognises revenue by itself, a goods receipt and its bill never count inventory twice, and an application distributes money or credit already booked without bringing money in. Card vouchers and cheques wait in clearing accounts until a settlement records the real net and fee. No tax, fiscal policy, exchange rate or cost is ever invented: what is missing blocks the operation with a specific code. Writes are idempotent, tenant scoped and audited.

Autenticación
SupabaseBearer · http bearer

Ejemplo

Los valores entre <> y {} son marcadores: sustitúyelos por los tuyos antes de ejecutarlo.

curl --request GET \
  --url 'https://api.marky.ec/v1/tenants/{tenantId}/accounting/reconciliation?legalEntityId=<legalEntityId>' \
  --header 'Authorization: Bearer <SupabaseBearer>'

Parámetros

Nombre En Tipo Descripción
tenantIdobligatorio path stringformato uuidpatrón ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
legalEntityIdobligatorio query stringformato uuidpatrón ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ Legal entity whose books are read. 409 ACCOUNTING_SETUP_REQUIRED when it keeps none.

Respuestas

200 Success
application/json
Reconciliation
objectsin otras propiedades
  • legalEntityIdobligatorio
    stringformato uuidpatrón ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
  • currencyCodeobligatorio
    stringpatrón ^[A-Z]{3}$
  • completeobligatorio
    boolean
  • itemsobligatorio
    array

    What the documents hold against what the mapped account holds, shown on the side the operation uses. Documents older than the ledger count: until an opening entry brings them in they show as a difference.

    Cada elemento
    objectsin otras propiedades
    • idobligatorio
      uno de "ACCOUNTS_RECEIVABLE", "ACCOUNTS_PAYABLE", "SALES_REVENUE", "SALES_BRIDGE", "SALES_ALLOWANCES", "CUSTOMER_ADVANCES", "CUSTOMER_CREDITS", "PURCHASE_BRIDGE", "PURCHASE_ALLOWANCES", "PURCHASE_COST_VARIANCE", "SUPPLIER_ADVANCES", "SUPPLIER_CREDITS", "SUPPLIER_RETURNS_BRIDGE", "INVENTORY", "INVENTORY_IN_TRANSIT", "COST_OF_SALES", "INVENTORY_ADJUSTMENT", "INVENTORY_LOSS", "CARD_FEES", "CASH_OVER_SHORT", "INTERCOMPANY_RECEIVABLE", "INTERCOMPANY_PAYABLE", "OPENING_BALANCE_EQUITY", "RETAINED_EARNINGS", "PAYMENT_CASH", "PAYMENT_TRANSFER", "PAYMENT_CARD", "PAYMENT_CHECK", "PAYMENT_OTHER"

      What an operation needs an account for. An unmapped key blocks the operations that use it.

    • keyobligatorio
      uno de "ACCOUNTS_RECEIVABLE", "ACCOUNTS_PAYABLE", "SALES_REVENUE", "SALES_BRIDGE", "SALES_ALLOWANCES", "CUSTOMER_ADVANCES", "CUSTOMER_CREDITS", "PURCHASE_BRIDGE", "PURCHASE_ALLOWANCES", "PURCHASE_COST_VARIANCE", "SUPPLIER_ADVANCES", "SUPPLIER_CREDITS", "SUPPLIER_RETURNS_BRIDGE", "INVENTORY", "INVENTORY_IN_TRANSIT", "COST_OF_SALES", "INVENTORY_ADJUSTMENT", "INVENTORY_LOSS", "CARD_FEES", "CASH_OVER_SHORT", "INTERCOMPANY_RECEIVABLE", "INTERCOMPANY_PAYABLE", "OPENING_BALANCE_EQUITY", "RETAINED_EARNINGS", "PAYMENT_CASH", "PAYMENT_TRANSFER", "PAYMENT_CARD", "PAYMENT_CHECK", "PAYMENT_OTHER"

      What an operation needs an account for. An unmapped key blocks the operations that use it.

    • operationalBalanceobligatorio
      stringpatrón ^-?[0-9]{1,12}(\.[0-9]{1,6})?$

      Exact signed amount in the ledger currency: debit minus credit unless stated.

    • ledgerBalanceobligatorio
      string | nullpatrón ^-?[0-9]{1,12}(\.[0-9]{1,6})?$

      Exact signed amount in the ledger currency: debit minus credit unless stated.

    • differenceobligatorio
      string | nullpatrón ^-?[0-9]{1,12}(\.[0-9]{1,6})?$

      Exact signed amount in the ledger currency: debit minus credit unless stated.

    • reconciledobligatorio
      boolean
  • clearingobligatorio
    array

    Card vouchers and cheques recorded and not yet settled, against the balance of their account.

    Cada elemento
    objectsin otras propiedades
    • accountIdobligatorio
      stringformato uuidpatrón ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
    • codeobligatorio
      string
    • nameobligatorio
      string
    • kindobligatorio
      uno de "CARD_CLEARING", "CHECKS"
    • ledgerBalanceobligatorio
      stringpatrón ^-?[0-9]{1,12}(\.[0-9]{1,6})?$

      Exact signed amount in the ledger currency: debit minus credit unless stated.

    • pendingSettlementobligatorio
      stringpatrón ^-?[0-9]{1,12}(\.[0-9]{1,6})?$

      Exact signed amount in the ledger currency: debit minus credit unless stated.

    • reconciledobligatorio
      boolean
  • purchasesobligatorio
    objectsin otras propiedades
    • receivedNotBilledobligatorio
      stringpatrón ^-?[0-9]{1,12}(\.[0-9]{1,6})?$

      Goods received and valued whose bill has not arrived: no difference yet.

    • billedNotReceivedobligatorio
      stringpatrón ^-?[0-9]{1,12}(\.[0-9]{1,6})?$

      Supplier bills of orders with nothing received and unmatched: no difference yet.

    • unresolvedobligatorio
      array

      Orders with goods received and a bill issued that nobody matched: a cost difference that is not resolved. While any is listed the reconciliation is not complete.

      Cada elemento
      objectsin otras propiedades
      • purchaseOrderIdobligatorio
        stringformato uuidpatrón ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
      • numberobligatorio
        string
      • receivedUnmatchedobligatorio
        stringpatrón ^-?[0-9]{1,12}(\.[0-9]{1,6})?$

        Exact signed amount in the ledger currency: debit minus credit unless stated.

      • billedUnmatchedobligatorio
        stringpatrón ^-?[0-9]{1,12}(\.[0-9]{1,6})?$

        Exact signed amount in the ledger currency: debit minus credit unless stated.

      • differenceobligatorio
        stringpatrón ^-?[0-9]{1,12}(\.[0-9]{1,6})?$

        Billed minus received.

  • unpostedobligatorio
    array

    What the books cannot vouch for yet: operations with no entry, stock with no value and entries awaiting approval. Documents older than the ledger are not listed: they enter through the opening entry.

    Cada elemento
    objectsin otras propiedades
    • kindobligatorio
      uno de "INVOICE", "PAYMENT", "CREDIT", "POS_RECEIPT", "STOCK", "DRAFT_ENTRY"
    • countobligatorio
      integermín. 1
  • setupobligatorio
    objectsin otras propiedades
    • missingMappingsobligatorio
      array
      Cada elemento
      uno de "ACCOUNTS_RECEIVABLE", "ACCOUNTS_PAYABLE", "SALES_REVENUE", "SALES_BRIDGE", "SALES_ALLOWANCES", "CUSTOMER_ADVANCES", "CUSTOMER_CREDITS", "PURCHASE_BRIDGE", "PURCHASE_ALLOWANCES", "PURCHASE_COST_VARIANCE", "SUPPLIER_ADVANCES", "SUPPLIER_CREDITS", "SUPPLIER_RETURNS_BRIDGE", "INVENTORY", "INVENTORY_IN_TRANSIT", "COST_OF_SALES", "INVENTORY_ADJUSTMENT", "INVENTORY_LOSS", "CARD_FEES", "CASH_OVER_SHORT", "INTERCOMPANY_RECEIVABLE", "INTERCOMPANY_PAYABLE", "OPENING_BALANCE_EQUITY", "RETAINED_EARNINGS", "PAYMENT_CASH", "PAYMENT_TRANSFER", "PAYMENT_CARD", "PAYMENT_CHECK", "PAYMENT_OTHER"

      What an operation needs an account for. An unmapped key blocks the operations that use it.

    • productsWithoutMethodobligatorio
      integermín. 0
    • categoriesWithMixedMethodsobligatorio
      integermín. 0
    • openPeriodTodayobligatorio
      boolean
  • nextCursorobligatorio
    null
400 Invalid request/idempotency key
application/problem+json
ProblemDetails
objectsin otras propiedades
  • typeobligatorio
    valor fijo "about:blank"
  • statusobligatorio
    integer
  • codeobligatorio
    string
  • titleobligatorio
    string
  • detailobligatorio
    string
  • requestIdobligatorio
    stringformato uuid
  • errors
    arrayelementos máx. 200

    Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.

    Cada elemento
    objectsin otras propiedades
    • pointerobligatorio
      string
    • codeobligatorio
      string
    • required
      integermín. 0máx. 1000

      For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.

    • identified
      integermín. 0máx. 1000

      For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.

401 Missing/invalid Supabase JWT
application/problem+json
ProblemDetails
objectsin otras propiedades
  • typeobligatorio
    valor fijo "about:blank"
  • statusobligatorio
    integer
  • codeobligatorio
    string
  • titleobligatorio
    string
  • detailobligatorio
    string
  • requestIdobligatorio
    stringformato uuid
  • errors
    arrayelementos máx. 200

    Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.

    Cada elemento
    objectsin otras propiedades
    • pointerobligatorio
      string
    • codeobligatorio
      string
    • required
      integermín. 0máx. 1000

      For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.

    • identified
      integermín. 0máx. 1000

      For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.

403 Wrong identity family or permissions
application/problem+json
ProblemDetails
objectsin otras propiedades
  • typeobligatorio
    valor fijo "about:blank"
  • statusobligatorio
    integer
  • codeobligatorio
    string
  • titleobligatorio
    string
  • detailobligatorio
    string
  • requestIdobligatorio
    stringformato uuid
  • errors
    arrayelementos máx. 200

    Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.

    Cada elemento
    objectsin otras propiedades
    • pointerobligatorio
      string
    • codeobligatorio
      string
    • required
      integermín. 0máx. 1000

      For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.

    • identified
      integermín. 0máx. 1000

      For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.

404 Unknown tenant resource
application/problem+json
ProblemDetails
objectsin otras propiedades
  • typeobligatorio
    valor fijo "about:blank"
  • statusobligatorio
    integer
  • codeobligatorio
    string
  • titleobligatorio
    string
  • detailobligatorio
    string
  • requestIdobligatorio
    stringformato uuid
  • errors
    arrayelementos máx. 200

    Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.

    Cada elemento
    objectsin otras propiedades
    • pointerobligatorio
      string
    • codeobligatorio
      string
    • required
      integermín. 0máx. 1000

      For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.

    • identified
      integermín. 0máx. 1000

      For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.

409 Version, state, duplicate, or a specific block: ACCOUNTING_SETUP_REQUIRED (no ledger, unmapped key, account of the wrong kind), ACCOUNTING_PERIOD_CLOSED, ACCOUNTING_CURRENCY_UNSUPPORTED, ACCOUNTING_AMOUNT_PRECISION, VALUATION_METHOD_REQUIRED, VALUATION_COST_REQUIRED, SEPARATION_OF_DUTIES, PAYMENT_ACCOUNT_INVALID (the account stated is not an active account of the entity that fits the method), CASH_SESSION_REQUIRED, CASH_INSUFFICIENT, COST_SOURCE_NOT_VALUED, COST_ADJUSTMENT_EXCEEDS_COST, COST_MATCH_MISMATCH
application/problem+json
ProblemDetails
objectsin otras propiedades
  • typeobligatorio
    valor fijo "about:blank"
  • statusobligatorio
    integer
  • codeobligatorio
    string
  • titleobligatorio
    string
  • detailobligatorio
    string
  • requestIdobligatorio
    stringformato uuid
  • errors
    arrayelementos máx. 200

    Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.

    Cada elemento
    objectsin otras propiedades
    • pointerobligatorio
      string
    • codeobligatorio
      string
    • required
      integermín. 0máx. 1000

      For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.

    • identified
      integermín. 0máx. 1000

      For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.

429 Rate/quota exceeded
application/problem+json
ProblemDetails
objectsin otras propiedades
  • typeobligatorio
    valor fijo "about:blank"
  • statusobligatorio
    integer
  • codeobligatorio
    string
  • titleobligatorio
    string
  • detailobligatorio
    string
  • requestIdobligatorio
    stringformato uuid
  • errors
    arrayelementos máx. 200

    Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.

    Cada elemento
    objectsin otras propiedades
    • pointerobligatorio
      string
    • codeobligatorio
      string
    • required
      integermín. 0máx. 1000

      For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.

    • identified
      integermín. 0máx. 1000

      For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.

503 Runtime/auth/governance unavailable
application/problem+json
ProblemDetails
objectsin otras propiedades
  • typeobligatorio
    valor fijo "about:blank"
  • statusobligatorio
    integer
  • codeobligatorio
    string
  • titleobligatorio
    string
  • detailobligatorio
    string
  • requestIdobligatorio
    stringformato uuid
  • errors
    arrayelementos máx. 200

    Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.

    Cada elemento
    objectsin otras propiedades
    • pointerobligatorio
      string
    • codeobligatorio
      string
    • required
      integermín. 0máx. 1000

      For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.

    • identified
      integermín. 0máx. 1000

      For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.