Supplier bills

Payables: invoices, debit and credit notes, debts for deliveries without an invoice — with VAT by rate, perceptions and lines.

Loading the search index…

Supplier bills

Objects

SupplierBill

  • idintegerrequired

    ID of the record, unique among records of its kind in the store.

  • versionintegerrequired

    Version of the record: it grows with every change. Send it as the ETag in If-Match to change the record.

  • kindstringrequired

    invoice — invoice; debit_note — debit note: increases the debt; credit_note — credit note: decreases the debt (return, discount, correction). Document amounts are always positive, kind sets the sign.

    Values:
    invoicedebit_notecredit_note
  • statusstringrequired

    draft — draft: not in the books; posted — posted: in payables and the purchase book, immutable; void — voided: not included anywhere.

    Values:
    draftpostedvoid
  • fiscalbooleanrequired

    false — debt for a delivery without an invoice: no ARCA details, not in the purchase book; true — invoice or note.

  • legal_entity_idintegerrequired

    ID of the buying store legal entity (/v1/legal-entities).

  • supplier_idintegerrequired

    Supplier ID (/v1/suppliers).

  • related_bill_idinteger or nullrequired

    ID of the document the note corrects; null for an invoice and a note without a reference.

  • numberstring or nullrequired

    Document number as the store entered it; null for a debt without an invoice.

  • issued_onstring (date)required

    Document date, YYYY-MM-DD in the store time zone.

  • tax_periodstringrequired

    Tax period in which the document is recorded in the purchase book, YYYY-MM.

  • due_onstring (date) or nullrequired

    Due date, YYYY-MM-DD in the store time zone; null — no due date.

  • currencystringrequired

    Document currency, ISO 4217: all amounts except base_total are in it.

  • exchange_ratestring or nullrequired

    Rate of the document currency to the store currency as a decimal string; null for a document in the store currency.

  • net_taxedintegerrequired

    VAT taxable base.

  • net_exemptintegerrequired

    VAT exempt amount.

  • net_untaxedintegerrequired

    Amount outside the scope of VAT.

  • tax_totalintegerrequired

    Document VAT.

  • perceptions_totalintegerrequired

    Perceptions: amounts the supplier added to the payment on account of the store future taxes.

  • other_taxes_totalintegerrequired

    Internal and other taxes of the document.

  • totalintegerrequired

    Document total: base, taxes and perceptions.

  • base_totalintegerrequired

    Total in the store currency at the document rate.

  • paid_totalintegerrequired

    Amount settled in the document currency: by money, offset, credit note, advance, journal payment or outside the system. Every settlement moves the bill in the feed.

  • outstandingintegerrequired

    Unsettled part in the document currency: total − paid_total. For a credit note, the unapplied credit; negative for an overpaid document.

  • tax_linesarray of object or nullrequired

    VAT by rate: taxed, exempt and outside the scope. null — the document has no tax or the rate of the taxed part cannot be determined.

    Fields · 6
    • regimestringrequired

      Which tax: vat — value added tax (IVA); income — income tax; turnover — gross receipts tax (Ingresos Brutos); municipal — a municipal levy; internal — excise; social — social security; other. Tax of a sale is vat: the tax class of a product classifies value added tax.

      Values:
      vatincometurnovermunicipalinternalsocialother
    • kindstringrequired

      taxed — at the rate; exempt — exempt by law; untaxed — outside the scope of the tax. exempt and untaxed lines have rate_bps 0 and amount 0: the amount is in base.

      Values:
      taxedexemptuntaxed
    • rate_bpsintegerrequired

      Rate in basis points: 2100 is 21 %.

    • baseintegerrequired

      Base of the tax, without the tax. Prices include tax: base + amount is what the customer paid for this part.

    • amountintegerrequired

      Amount of the tax. The tax of a sale is calculated per rate for the whole order, the base rounded to the nearest unit and the tax as the rest; items and delivery get shares of it, so their lines add up to the line of the order.

    • jurisdictionstring or nullrequired

      Province or municipality for taxes that need one (turnover, municipal); otherwise null.

  • additional_taxesarray of objectrequired

    Taxes beyond VAT: perceptions, withholdings, internal and other. The document carries only their amount, without base or rate.

    Fields · 5
    • kindstringrequired

      perception — perception: increases the amount payable and is credited by the store; withholding — withholding: the store withholds it on payment and pays it to the treasury, the amount transferred decreases; internal — internal taxes (excise); other — other taxes.

      Values:
      perceptionwithholdinginternalother
    • regimestringrequired

      Which tax: vat — VAT, income — income tax, turnover — turnover tax (Ingresos Brutos), municipal — municipal and others.

      Values:
      vatincometurnovermunicipalinternalsocialother
    • jurisdictionstring or nullrequired

      Tax jurisdiction, for example the Ingresos Brutos province; null if the tax does not need one.

    • amountintegerrequired

      Tax amount.

    • certificate_numberstring or nullrequired

      Withholding or perception certificate number; null if there is none.

  • linesarray of objectrequired

    Document lines in order; a document entered by totals has no lines.

    Fields · 8
    • descriptionstringrequired

      Line description as in the document.

    • variant_idinteger or nullrequired

      Product variant ID (/v1/variants); null for a line not about a product.

    • quantitystring or nullrequired

      Quantity as a decimal string; null if not stated.

    • unit_amountinteger or nullrequired

      Unit price without tax; null if not stated.

    • net_amountintegerrequired

      Line amount without tax.

    • tax_kindstringrequired

      taxed — taxed at a rate; exempt — exempt; untaxed — outside the scope of tax.

      Values:
      taxedexemptuntaxed
    • rate_bpsintegerrequired

      VAT rate in basis points: 2100 is 21 %.

    • tax_amountintegerrequired

      Line VAT.

  • vendorobjectrequired

    Supplier details as printed on the document: they stay the same if the supplier record is corrected later.

    Fields · 2
    • tax_idstring or nullrequired

      Supplier tax number on the document; null if not stated.

    • legal_namestring or nullrequired

      Supplier name on the document; null if not stated.

  • goods_receipt_idinteger or nullrequired

    ID of the goods receipt that created this delivery debt; null if the document was not created by a receipt.

  • goods_receipt_idsarray of integerrequired

    Goods receipts the document covers (/v1/goods-receipts): deliveries matched to the invoice, or the delivery behind a delivery debt.

  • purchase_order_idsarray of integerrequired

    Purchase orders the document relates to (/v1/purchase-orders).

  • supplier_return_idsarray of integerrequired

    Supplier returns the credit note was issued for (/v1/supplier-returns).

  • consignment_settlement_idinteger or nullrequired

    ID of the consignment settlement the document was issued for; null for others.

  • match_statusstringrequired

    Match with the goods receipt: unmatched — not linked to a receipt; matched — linked and matching; flagged — linked with a discrepancy. Does not block payment.

    Values:
    unmatchedmatchedflagged
  • notestring or nullrequired

    Staff note; null if there is none.

  • approved_atstring (date-time) or nullrequired

    When the document was approved for payment; null if not approved.

  • posted_atstring (date-time) or nullrequired

    When the document was posted; null for a draft.

  • voided_atstring (date-time) or nullrequired

    When the document was voided; null if not voided.

  • arobject or nullrequired

    ARCA details of the invoice or note; null for a debt for a delivery without an invoice.

    Fields · 8
    • document_type_codestring or nullrequired

      ARCA comprobante type code: 001 — invoice A, 006 — invoice B, 011 — invoice C; null if not stated.

    • point_of_saleinteger or nullrequired

      Supplier point of sale (punto de venta); null if not stated.

    • authorization_kindstring or nullrequired

      CAE — electronic document; CAEA — code issued for a period; CAI — printed form; null — no authorization (for example, a foreign document).

      Values:
      CAECAEACAInull
    • authorization_codestring or nullrequired

      Authorization code; null if not stated.

    • authorization_expires_onstring (date) or nullrequired

      Authorization code expiry date, YYYY-MM-DD; null if not stated.

    • verification_statusstring or nullrequired

      Document check with ARCA: verified — confirmed; rejected — ARCA did not recognize it; unavailable — could not be checked; pending — awaiting the check; null — not checked.

      Values:
      verifiedrejectedunavailablependingnull
    • credit_fiscal_amountinteger or nullrequired

      Creditable part of VAT under proportional credit; null — the whole tax is creditable.

    • importobject or nullrequired

      Import of goods or services — its own layout of the ARCA import ledger; null for a domestic document.

      Fields · 9
      • kindstringrequired

        goods — import of goods under a customs declaration; services — services from a provider abroad.

        Values:
        goodsservices
      • customs_declarationstring or nullrequired

        Customs declaration number (despacho) of an import of goods; null if not given.

      • document_kindstring or nullrequired

        Document of the service provider: invoice, contract or other (with a description); null if not given.

        Values:
        invoicecontractothernull
      • document_descriptionstring or nullrequired

        Description of a document of kind other; null for the rest.

      • provider_tax_idstring or nullrequired

        Tax ID of the provider in their country; null if not given.

      • tax_paid_onstring (date) or nullrequired

        Date VAT on the imported services was paid, YYYY-MM-DD; null if not given.

      • tax_paid_amountinteger or nullrequired

        VAT paid on the imported services in the document currency; null if not given.

      • payment_referencestring or nullrequired

        Identifier of the tax payment; null if not given.

      • payment_entity_tax_idstring or nullrequired

        CUIT of the bank the tax was paid through; null if not given.

  • created_atstring (date-time)required

    When the record was created.

  • updated_atstring (date-time)required

    When the record last changed.

Endpoints

Supplier bills: invoices, notes and debts for deliveries without an invoice, with tax and lines

get/supplier-bills

Scope: procurement:read

Parameters

Query

  • limitinteger

    Page size: up to 250 records; 50 by default.

    Minimum:
    1
    Maximum:
    250
  • cursorstring

    Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it.

    Max length:
    4096
  • updated_sincestring (date-time)

    Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor.

    Pattern:
    ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,6})?(Z|[+-]\d{2}:\d{2})$
  • include_deletedboolean

    true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync.

  • supplier_idinteger

    Only documents of this supplier.

    Minimum:
    1

Responses

200Success

application/json

  • dataarray of SupplierBillrequired

    Records of the page.

  • deletedarray of objectrequired

    Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor.

    Fields · 2
    • idintegerrequired

      ID of the erased record.

    • deleted_atstring (date-time)required

      When the record was erased.

  • next_cursorstring or nullrequired

    Cursor of the next page; null on the last page.

  • has_morebooleanrequired

    true when there is a next page.

  • sync_cursorstring or nullrequired

    On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages.

401The token is missing, invalid, expired or revoked

Headers

  • WWW-Authenticatestringrequired

    Authentication scheme (RFC 6750).

    Example:
    Bearer

application/problem+json

Returns Problem

403The plan, the IP address or the token scopes do not allow the request

Headers

  • WWW-Authenticatestring

    Authentication scheme (RFC 6750).

    Example:
    Bearer error="insufficient_scope", scope="locations:read"

application/problem+json

Returns ForbiddenProblem

410The sync cursor is older than the deletion retention period or was issued before the database was restored

application/problem+json

Returns Problem

422A parameter is invalid or unknown

application/problem+json

Returns ValidationProblem

429The rate limit is exhausted

Headers

  • Retry-Afterintegerrequired

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns RateLimitProblem

503The store is temporarily unavailable

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns Problem

Errors of this endpoint

Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors

Example request
curl "https://api.saleya.app/v1/supplier-bills" \
  -H "Authorization: Bearer $SALEYA_API_TOKEN"
Example response · 200
{
  "data": [
    {
      "id": 0,
      "version": 0,
      "kind": "invoice",
      "status": "draft",
      "fiscal": true,
      "legal_entity_id": 0,
      "supplier_id": 0,
      "related_bill_id": 0,
      "number": "string",
      "issued_on": "2026-01-15",
      "tax_period": "string",
      "due_on": "2026-01-15",
      "currency": "string",
      "exchange_rate": "string",
      "net_taxed": 0,
      "net_exempt": 0,
      "net_untaxed": 0,
      "tax_total": 0,
      "perceptions_total": 0,
      "other_taxes_total": 0,
      "total": 0,
      "base_total": 0,
      "paid_total": 0,
      "outstanding": 0,
      "tax_lines": [
        {
          "regime": "vat",
          "kind": "taxed",
          "rate_bps": 0,
          "base": 0,
          "amount": 0,
          "jurisdiction": "string"
        }
      ],
      "additional_taxes": [
        {
          "kind": "perception",
          "regime": "vat",
          "jurisdiction": "string",
          "amount": 0,
          "certificate_number": "string"
        }
      ],
      "lines": [
        {
          "description": "string",
          "variant_id": 0,
          "quantity": "string",
          "unit_amount": 0,
          "net_amount": 0,
          "tax_kind": "taxed",
          "rate_bps": 0,
          "tax_amount": 0
        }
      ],
      "vendor": {
        "tax_id": "string",
        "legal_name": "string"
      },
      "goods_receipt_id": 0,
      "goods_receipt_ids": [
        0
      ],
      "purchase_order_ids": [
        0
      ],
      "supplier_return_ids": [
        0
      ],
      "consignment_settlement_id": 0,
      "match_status": "unmatched",
      "note": "string",
      "approved_at": "2026-01-15T12:00:00Z",
      "posted_at": "2026-01-15T12:00:00Z",
      "voided_at": "2026-01-15T12:00:00Z",
      "ar": {
        "document_type_code": "string",
        "point_of_sale": 0,
        "authorization_kind": "CAE",
        "authorization_code": "string",
        "authorization_expires_on": "2026-01-15",
        "verification_status": "verified",
        "credit_fiscal_amount": 0,
        "import": {
          "kind": "goods",
          "customs_declaration": "string",
          "document_kind": "invoice",
          "document_description": "string",
          "provider_tax_id": "string",
          "tax_paid_on": "2026-01-15",
          "tax_paid_amount": 0,
          "payment_reference": "string",
          "payment_entity_tax_id": "string"
        }
      },
      "created_at": "2026-01-15T12:00:00Z",
      "updated_at": "2026-01-15T12:00:00Z"
    }
  ],
  "deleted": [
    {
      "id": 0,
      "deleted_at": "2026-01-15T12:00:00Z"
    }
  ],
  "next_cursor": "string",
  "has_more": true,
  "sync_cursor": "string"
}

Create a draft supplier bill

post/supplier-bills

Scope: procurement:write

Parameters

Header

  • Idempotency-Keystring

    Unique key of the attempt, for example a UUID. A retry with the same key and body gets the saved response instead of a second write. Keys live 24 hours.

    Min length:
    1
    Max length:
    255
    Example:
    8e03978e-40d5-43e8-bc93-6894a57f9324

Request body application/json

  • kindstringrequired

    invoice — invoice; debit_note — debit note: increases the debt; credit_note — credit note: decreases the debt (return, discount, correction). Document amounts are always positive, kind sets the sign.

    Values:
    invoicedebit_notecredit_note
  • fiscalbooleanrequired

    false — debt for a delivery without an invoice: no ARCA details, not in the purchase book; true — invoice or note.

  • legal_entity_idintegerrequired

    ID of the buying store legal entity (/v1/legal-entities).

  • supplier_idintegerrequired

    Supplier ID (/v1/suppliers).

  • related_bill_idinteger or null

    ID of the document the note corrects; null for an invoice and a note without a reference.

  • numberstring or null

    Document number as the store entered it; null for a debt without an invoice.

    Max length:
    20
  • issued_onstring (date)required

    Document date, YYYY-MM-DD in the store time zone.

  • tax_periodstring

    Tax period in which the document is recorded in the purchase book, YYYY-MM.

  • due_onstring (date) or null

    Due date, YYYY-MM-DD in the store time zone; null — no due date.

  • currencystringrequired

    Document currency, ISO 4217: all amounts except base_total are in it.

    Values:
    ARSUSDBRLCLPCOPMXNPENRUB
  • exchange_ratestring or null

    Rate of the document currency to the store currency as a decimal string; null for a document in the store currency.

    Max length:
    1000000000000
    Pattern:
    ^\d{1,14}(\.\d{1,10})?$
  • net_taxedinteger

    VAT taxable base.

    Minimum:
    0
    Maximum:
    10000000000
  • net_exemptinteger

    VAT exempt amount.

    Minimum:
    0
    Maximum:
    10000000000
  • net_untaxedinteger

    Amount outside the scope of VAT.

    Minimum:
    0
    Maximum:
    10000000000
  • tax_totalinteger

    Document VAT.

    Minimum:
    0
    Maximum:
    10000000000
  • totalintegerrequired

    Document total: base, taxes and perceptions.

    Minimum:
    0
    Maximum:
    10000000000
  • notestring or null

    Staff note; null if there is none.

    Max length:
    2000
  • linesarray of object

    Document lines in order; a document entered by totals has no lines.

    Max items:
    500
    Fields · 8
    • descriptionstringrequired

      Line description as in the document.

      Max length:
      300
    • variant_idinteger or null

      Product variant ID (/v1/variants); null for a line not about a product.

    • quantitystring or null

      Quantity as a decimal string; null if not stated.

      Min length:
      0
      Max length:
      1000000000000
      Pattern:
      ^\d{1,14}(\.\d{1,6})?$
    • unit_amountinteger or null

      Unit price without tax; null if not stated.

      Minimum:
      0
      Maximum:
      10000000000
    • net_amountintegerrequired

      Line amount without tax.

      Minimum:
      0
      Maximum:
      10000000000
    • tax_kindstringrequired

      taxed — taxed at a rate; exempt — exempt; untaxed — outside the scope of tax.

      Values:
      taxedexemptuntaxed
    • rate_bpsinteger

      VAT rate in basis points: 2100 is 21 %.

      Minimum:
      0
      Maximum:
      10000
    • tax_amountinteger

      Line VAT.

      Minimum:
      0
      Maximum:
      10000000000
  • additional_taxesarray of object

    Taxes beyond VAT: perceptions, withholdings, internal and other. The document carries only their amount, without base or rate.

    Max items:
    50
    Fields · 5
    • kindstringrequired

      perception — perception: increases the amount payable and is credited by the store; withholding — withholding: the store withholds it on payment and pays it to the treasury, the amount transferred decreases; internal — internal taxes (excise); other — other taxes.

      Values:
      perceptionwithholdinginternalother
    • regimestringrequired

      Which tax: vat — VAT, income — income tax, turnover — turnover tax (Ingresos Brutos), municipal — municipal and others.

      Values:
      vatincometurnovermunicipalinternalsocialother
    • jurisdictionstring or null

      Tax jurisdiction, for example the Ingresos Brutos province; null if the tax does not need one.

      Max length:
      8
      Pattern:
      ^[A-Z]{2}-[A-Z0-9]{1,5}$
    • amountintegerrequired

      Tax amount.

      Minimum:
      0
      Maximum:
      10000000000
    • certificate_numberstring or null

      Withholding or perception certificate number; null if there is none.

      Max length:
      64
  • goods_receipt_idsarray of integer

    Goods receipts the document covers (/v1/goods-receipts): deliveries matched to the invoice, or the delivery behind a delivery debt.

    Max items:
    100
  • purchase_order_idsarray of integer

    Purchase orders the document relates to (/v1/purchase-orders).

    Max items:
    100
  • supplier_return_idsarray of integer

    Supplier returns the credit note was issued for (/v1/supplier-returns).

    Max items:
    100
  • arobject or null

    ARCA details of the invoice or note; null for a debt for a delivery without an invoice.

    Fields · 7
    • document_type_codestring or null

      ARCA comprobante type code: 001 — invoice A, 006 — invoice B, 011 — invoice C; null if not stated.

      Max length:
      3
    • point_of_saleinteger or null

      Supplier point of sale (punto de venta); null if not stated.

      Minimum:
      0
      Maximum:
      99999
    • authorization_kindstring or null

      CAE — electronic document; CAEA — code issued for a period; CAI — printed form; null — no authorization (for example, a foreign document).

      Values:
      CAECAEACAInull
    • authorization_codestring or null

      Authorization code; null if not stated.

      Max length:
      14
    • authorization_expires_onstring (date) or null

      Authorization code expiry date, YYYY-MM-DD; null if not stated.

    • credit_fiscal_amountinteger or null

      Creditable part of VAT under proportional credit; null — the whole tax is creditable.

      Minimum:
      0
      Maximum:
      10000000000
    • importobject or null

      Import of goods or services — its own layout of the ARCA import ledger; null for a domestic document.

      Fields · 9
      • kindstring

        goods — import of goods under a customs declaration; services — services from a provider abroad.

        Values:
        goodsservices
      • customs_declarationstring or null

        Customs declaration number (despacho) of an import of goods; null if not given.

        Max length:
        16
      • document_kindstring or null

        Document of the service provider: invoice, contract or other (with a description); null if not given.

        Values:
        invoicecontractothernull
      • document_descriptionstring or null

        Description of a document of kind other; null for the rest.

        Max length:
        20
      • provider_tax_idstring or null

        Tax ID of the provider in their country; null if not given.

        Max length:
        20
      • tax_paid_onstring (date) or null

        Date VAT on the imported services was paid, YYYY-MM-DD; null if not given.

      • tax_paid_amountinteger or null

        VAT paid on the imported services in the document currency; null if not given.

        Minimum:
        0
        Maximum:
        10000000000
      • payment_referencestring or null

        Identifier of the tax payment; null if not given.

        Max length:
        20
      • payment_entity_tax_idstring or null

        CUIT of the bank the tax was paid through; null if not given.

        Max length:
        11

Responses

201Created

Headers

  • Idempotent-Replayedstring

    true when this is the saved response of an earlier request with the same Idempotency-Key.

    Values:
    true
  • ETagstringrequired

    Version of the record. Send it in If-Match to change the record.

    Example:
    "7"
  • Locationstring (uri)required

    Address of the created record; for an accepted request (202), the address to follow its outcome.

application/json

Returns SupplierBill

401The token is missing, invalid, expired or revoked

Headers

  • WWW-Authenticatestringrequired

    Authentication scheme (RFC 6750).

    Example:
    Bearer

application/problem+json

Returns Problem

403The plan, the IP address or the token scopes do not allow the request

Headers

  • WWW-Authenticatestring

    Authentication scheme (RFC 6750).

    Example:
    Bearer error="insufficient_scope", scope="locations:read"

application/problem+json

Returns ForbiddenProblem

409A request with the same idempotency key is in progress, the data changed after it was read, the external ID belongs to another record, the plan or webhook endpoint limit is reached, or the change needs consent to its consequences

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns ConflictProblem

422A parameter is invalid or unknown

application/problem+json

Returns ValidationProblem

429The rate limit is exhausted

Headers

  • Retry-Afterintegerrequired

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns RateLimitProblem

503The store is temporarily unavailable

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns Problem

Errors of this endpoint

Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors

Example request
curl -X POST "https://api.saleya.app/v1/supplier-bills" \
  -H "Authorization: Bearer $SALEYA_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json
Request body — body.json
{
  "kind": "invoice",
  "fiscal": true,
  "legal_entity_id": 0,
  "supplier_id": 0,
  "related_bill_id": 0,
  "number": "string",
  "issued_on": "2026-01-15",
  "tax_period": "string",
  "due_on": "2026-01-15",
  "currency": "ARS",
  "exchange_rate": "string",
  "net_taxed": 0,
  "net_exempt": 0,
  "net_untaxed": 0,
  "tax_total": 0,
  "total": 0,
  "note": "string",
  "lines": [
    {
      "description": "string",
      "variant_id": 0,
      "quantity": "string",
      "unit_amount": 0,
      "net_amount": 0,
      "tax_kind": "taxed",
      "rate_bps": 0,
      "tax_amount": 0
    }
  ],
  "additional_taxes": [
    {
      "kind": "perception",
      "regime": "vat",
      "jurisdiction": "string",
      "amount": 0,
      "certificate_number": "string"
    }
  ],
  "goods_receipt_ids": [
    0
  ],
  "purchase_order_ids": [
    0
  ],
  "supplier_return_ids": [
    0
  ],
  "ar": {
    "document_type_code": "string",
    "point_of_sale": 0,
    "authorization_kind": "CAE",
    "authorization_code": "string",
    "authorization_expires_on": "2026-01-15",
    "credit_fiscal_amount": 0,
    "import": {
      "kind": "goods",
      "customs_declaration": "string",
      "document_kind": "invoice",
      "document_description": "string",
      "provider_tax_id": "string",
      "tax_paid_on": "2026-01-15",
      "tax_paid_amount": 0,
      "payment_reference": "string",
      "payment_entity_tax_id": "string"
    }
  }
}
Example response · 201
{
  "id": 0,
  "version": 0,
  "kind": "invoice",
  "status": "draft",
  "fiscal": true,
  "legal_entity_id": 0,
  "supplier_id": 0,
  "related_bill_id": 0,
  "number": "string",
  "issued_on": "2026-01-15",
  "tax_period": "string",
  "due_on": "2026-01-15",
  "currency": "string",
  "exchange_rate": "string",
  "net_taxed": 0,
  "net_exempt": 0,
  "net_untaxed": 0,
  "tax_total": 0,
  "perceptions_total": 0,
  "other_taxes_total": 0,
  "total": 0,
  "base_total": 0,
  "paid_total": 0,
  "outstanding": 0,
  "tax_lines": [
    {
      "regime": "vat",
      "kind": "taxed",
      "rate_bps": 0,
      "base": 0,
      "amount": 0,
      "jurisdiction": "string"
    }
  ],
  "additional_taxes": [
    {
      "kind": "perception",
      "regime": "vat",
      "jurisdiction": "string",
      "amount": 0,
      "certificate_number": "string"
    }
  ],
  "lines": [
    {
      "description": "string",
      "variant_id": 0,
      "quantity": "string",
      "unit_amount": 0,
      "net_amount": 0,
      "tax_kind": "taxed",
      "rate_bps": 0,
      "tax_amount": 0
    }
  ],
  "vendor": {
    "tax_id": "string",
    "legal_name": "string"
  },
  "goods_receipt_id": 0,
  "goods_receipt_ids": [
    0
  ],
  "purchase_order_ids": [
    0
  ],
  "supplier_return_ids": [
    0
  ],
  "consignment_settlement_id": 0,
  "match_status": "unmatched",
  "note": "string",
  "approved_at": "2026-01-15T12:00:00Z",
  "posted_at": "2026-01-15T12:00:00Z",
  "voided_at": "2026-01-15T12:00:00Z",
  "ar": {
    "document_type_code": "string",
    "point_of_sale": 0,
    "authorization_kind": "CAE",
    "authorization_code": "string",
    "authorization_expires_on": "2026-01-15",
    "verification_status": "verified",
    "credit_fiscal_amount": 0,
    "import": {
      "kind": "goods",
      "customs_declaration": "string",
      "document_kind": "invoice",
      "document_description": "string",
      "provider_tax_id": "string",
      "tax_paid_on": "2026-01-15",
      "tax_paid_amount": 0,
      "payment_reference": "string",
      "payment_entity_tax_id": "string"
    }
  },
  "created_at": "2026-01-15T12:00:00Z",
  "updated_at": "2026-01-15T12:00:00Z"
}

Supplier bill

get/supplier-bills/{supplier_bill}

Scope: procurement:read

Parameters

Path

  • supplier_billintegerrequired

    Supplier bill ID.

Responses

200Success

Headers

  • ETagstringrequired

    Version of the record. Send it in If-Match to change the record.

    Example:
    "7"

application/json

Returns SupplierBill

401The token is missing, invalid, expired or revoked

Headers

  • WWW-Authenticatestringrequired

    Authentication scheme (RFC 6750).

    Example:
    Bearer

application/problem+json

Returns Problem

403The plan, the IP address or the token scopes do not allow the request

Headers

  • WWW-Authenticatestring

    Authentication scheme (RFC 6750).

    Example:
    Bearer error="insufficient_scope", scope="locations:read"

application/problem+json

Returns ForbiddenProblem

404The object does not exist or is not available to the app

application/problem+json

Returns Problem

422A parameter is invalid or unknown

application/problem+json

Returns ValidationProblem

429The rate limit is exhausted

Headers

  • Retry-Afterintegerrequired

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns RateLimitProblem

503The store is temporarily unavailable

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns Problem

Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors

Example request
curl "https://api.saleya.app/v1/supplier-bills/{supplier_bill}" \
  -H "Authorization: Bearer $SALEYA_API_TOKEN"
Example response · 200
{
  "id": 0,
  "version": 0,
  "kind": "invoice",
  "status": "draft",
  "fiscal": true,
  "legal_entity_id": 0,
  "supplier_id": 0,
  "related_bill_id": 0,
  "number": "string",
  "issued_on": "2026-01-15",
  "tax_period": "string",
  "due_on": "2026-01-15",
  "currency": "string",
  "exchange_rate": "string",
  "net_taxed": 0,
  "net_exempt": 0,
  "net_untaxed": 0,
  "tax_total": 0,
  "perceptions_total": 0,
  "other_taxes_total": 0,
  "total": 0,
  "base_total": 0,
  "paid_total": 0,
  "outstanding": 0,
  "tax_lines": [
    {
      "regime": "vat",
      "kind": "taxed",
      "rate_bps": 0,
      "base": 0,
      "amount": 0,
      "jurisdiction": "string"
    }
  ],
  "additional_taxes": [
    {
      "kind": "perception",
      "regime": "vat",
      "jurisdiction": "string",
      "amount": 0,
      "certificate_number": "string"
    }
  ],
  "lines": [
    {
      "description": "string",
      "variant_id": 0,
      "quantity": "string",
      "unit_amount": 0,
      "net_amount": 0,
      "tax_kind": "taxed",
      "rate_bps": 0,
      "tax_amount": 0
    }
  ],
  "vendor": {
    "tax_id": "string",
    "legal_name": "string"
  },
  "goods_receipt_id": 0,
  "goods_receipt_ids": [
    0
  ],
  "purchase_order_ids": [
    0
  ],
  "supplier_return_ids": [
    0
  ],
  "consignment_settlement_id": 0,
  "match_status": "unmatched",
  "note": "string",
  "approved_at": "2026-01-15T12:00:00Z",
  "posted_at": "2026-01-15T12:00:00Z",
  "voided_at": "2026-01-15T12:00:00Z",
  "ar": {
    "document_type_code": "string",
    "point_of_sale": 0,
    "authorization_kind": "CAE",
    "authorization_code": "string",
    "authorization_expires_on": "2026-01-15",
    "verification_status": "verified",
    "credit_fiscal_amount": 0,
    "import": {
      "kind": "goods",
      "customs_declaration": "string",
      "document_kind": "invoice",
      "document_description": "string",
      "provider_tax_id": "string",
      "tax_paid_on": "2026-01-15",
      "tax_paid_amount": 0,
      "payment_reference": "string",
      "payment_entity_tax_id": "string"
    }
  },
  "created_at": "2026-01-15T12:00:00Z",
  "updated_at": "2026-01-15T12:00:00Z"
}

Change a draft supplier bill

patch/supplier-bills/{supplier_bill}

Scope: procurement:write

Parameters

Path

  • supplier_billintegerrequired

    Supplier bill ID.

Header

  • Idempotency-Keystring

    Unique key of the attempt, for example a UUID. A retry with the same key and body gets the saved response instead of a second write. Keys live 24 hours.

    Min length:
    1
    Max length:
    255
    Example:
    8e03978e-40d5-43e8-bc93-6894a57f9324
  • If-Matchstringrequired

    ETag of the record from the last read, for example "7". The change applies only if nobody changed the record since then; otherwise 412. Without it — 428.

    Example:
    "7"

Request body application/json

  • kindstring

    invoice — invoice; debit_note — debit note: increases the debt; credit_note — credit note: decreases the debt (return, discount, correction). Document amounts are always positive, kind sets the sign.

    Values:
    invoicedebit_notecredit_note
  • fiscalboolean

    false — debt for a delivery without an invoice: no ARCA details, not in the purchase book; true — invoice or note.

  • legal_entity_idinteger

    ID of the buying store legal entity (/v1/legal-entities).

  • supplier_idinteger

    Supplier ID (/v1/suppliers).

  • related_bill_idinteger or null

    ID of the document the note corrects; null for an invoice and a note without a reference.

  • numberstring or null

    Document number as the store entered it; null for a debt without an invoice.

    Max length:
    20
  • issued_onstring (date)

    Document date, YYYY-MM-DD in the store time zone.

  • tax_periodstring

    Tax period in which the document is recorded in the purchase book, YYYY-MM.

  • due_onstring (date) or null

    Due date, YYYY-MM-DD in the store time zone; null — no due date.

  • currencystring

    Document currency, ISO 4217: all amounts except base_total are in it.

    Values:
    ARSUSDBRLCLPCOPMXNPENRUB
  • exchange_ratestring or null

    Rate of the document currency to the store currency as a decimal string; null for a document in the store currency.

    Max length:
    1000000000000
    Pattern:
    ^\d{1,14}(\.\d{1,10})?$
  • net_taxedinteger

    VAT taxable base.

    Minimum:
    0
    Maximum:
    10000000000
  • net_exemptinteger

    VAT exempt amount.

    Minimum:
    0
    Maximum:
    10000000000
  • net_untaxedinteger

    Amount outside the scope of VAT.

    Minimum:
    0
    Maximum:
    10000000000
  • tax_totalinteger

    Document VAT.

    Minimum:
    0
    Maximum:
    10000000000
  • totalinteger

    Document total: base, taxes and perceptions.

    Minimum:
    0
    Maximum:
    10000000000
  • notestring or null

    Staff note; null if there is none.

    Max length:
    2000
  • linesarray of object

    Document lines in order; a document entered by totals has no lines.

    Max items:
    500
    Fields · 8
    • descriptionstringrequired

      Line description as in the document.

      Max length:
      300
    • variant_idinteger or null

      Product variant ID (/v1/variants); null for a line not about a product.

    • quantitystring or null

      Quantity as a decimal string; null if not stated.

      Min length:
      0
      Max length:
      1000000000000
      Pattern:
      ^\d{1,14}(\.\d{1,6})?$
    • unit_amountinteger or null

      Unit price without tax; null if not stated.

      Minimum:
      0
      Maximum:
      10000000000
    • net_amountintegerrequired

      Line amount without tax.

      Minimum:
      0
      Maximum:
      10000000000
    • tax_kindstringrequired

      taxed — taxed at a rate; exempt — exempt; untaxed — outside the scope of tax.

      Values:
      taxedexemptuntaxed
    • rate_bpsinteger

      VAT rate in basis points: 2100 is 21 %.

      Minimum:
      0
      Maximum:
      10000
    • tax_amountinteger

      Line VAT.

      Minimum:
      0
      Maximum:
      10000000000
  • additional_taxesarray of object

    Taxes beyond VAT: perceptions, withholdings, internal and other. The document carries only their amount, without base or rate.

    Max items:
    50
    Fields · 5
    • kindstringrequired

      perception — perception: increases the amount payable and is credited by the store; withholding — withholding: the store withholds it on payment and pays it to the treasury, the amount transferred decreases; internal — internal taxes (excise); other — other taxes.

      Values:
      perceptionwithholdinginternalother
    • regimestringrequired

      Which tax: vat — VAT, income — income tax, turnover — turnover tax (Ingresos Brutos), municipal — municipal and others.

      Values:
      vatincometurnovermunicipalinternalsocialother
    • jurisdictionstring or null

      Tax jurisdiction, for example the Ingresos Brutos province; null if the tax does not need one.

      Max length:
      8
      Pattern:
      ^[A-Z]{2}-[A-Z0-9]{1,5}$
    • amountintegerrequired

      Tax amount.

      Minimum:
      0
      Maximum:
      10000000000
    • certificate_numberstring or null

      Withholding or perception certificate number; null if there is none.

      Max length:
      64
  • goods_receipt_idsarray of integer

    Goods receipts the document covers (/v1/goods-receipts): deliveries matched to the invoice, or the delivery behind a delivery debt.

    Max items:
    100
  • purchase_order_idsarray of integer

    Purchase orders the document relates to (/v1/purchase-orders).

    Max items:
    100
  • supplier_return_idsarray of integer

    Supplier returns the credit note was issued for (/v1/supplier-returns).

    Max items:
    100
  • arobject or null

    ARCA details of the invoice or note; null for a debt for a delivery without an invoice.

    Fields · 7
    • document_type_codestring or null

      ARCA comprobante type code: 001 — invoice A, 006 — invoice B, 011 — invoice C; null if not stated.

      Max length:
      3
    • point_of_saleinteger or null

      Supplier point of sale (punto de venta); null if not stated.

      Minimum:
      0
      Maximum:
      99999
    • authorization_kindstring or null

      CAE — electronic document; CAEA — code issued for a period; CAI — printed form; null — no authorization (for example, a foreign document).

      Values:
      CAECAEACAInull
    • authorization_codestring or null

      Authorization code; null if not stated.

      Max length:
      14
    • authorization_expires_onstring (date) or null

      Authorization code expiry date, YYYY-MM-DD; null if not stated.

    • credit_fiscal_amountinteger or null

      Creditable part of VAT under proportional credit; null — the whole tax is creditable.

      Minimum:
      0
      Maximum:
      10000000000
    • importobject or null

      Import of goods or services — its own layout of the ARCA import ledger; null for a domestic document.

      Fields · 9
      • kindstring

        goods — import of goods under a customs declaration; services — services from a provider abroad.

        Values:
        goodsservices
      • customs_declarationstring or null

        Customs declaration number (despacho) of an import of goods; null if not given.

        Max length:
        16
      • document_kindstring or null

        Document of the service provider: invoice, contract or other (with a description); null if not given.

        Values:
        invoicecontractothernull
      • document_descriptionstring or null

        Description of a document of kind other; null for the rest.

        Max length:
        20
      • provider_tax_idstring or null

        Tax ID of the provider in their country; null if not given.

        Max length:
        20
      • tax_paid_onstring (date) or null

        Date VAT on the imported services was paid, YYYY-MM-DD; null if not given.

      • tax_paid_amountinteger or null

        VAT paid on the imported services in the document currency; null if not given.

        Minimum:
        0
        Maximum:
        10000000000
      • payment_referencestring or null

        Identifier of the tax payment; null if not given.

        Max length:
        20
      • payment_entity_tax_idstring or null

        CUIT of the bank the tax was paid through; null if not given.

        Max length:
        11

Responses

200Success

Headers

  • Idempotent-Replayedstring

    true when this is the saved response of an earlier request with the same Idempotency-Key.

    Values:
    true
  • ETagstringrequired

    Version of the record. Send it in If-Match to change the record.

    Example:
    "7"

application/json

Returns SupplierBill

401The token is missing, invalid, expired or revoked

Headers

  • WWW-Authenticatestringrequired

    Authentication scheme (RFC 6750).

    Example:
    Bearer

application/problem+json

Returns Problem

403The plan, the IP address or the token scopes do not allow the request

Headers

  • WWW-Authenticatestring

    Authentication scheme (RFC 6750).

    Example:
    Bearer error="insufficient_scope", scope="locations:read"

application/problem+json

Returns ForbiddenProblem

404The object does not exist or is not available to the app

application/problem+json

Returns Problem

409A request with the same idempotency key is in progress, the data changed after it was read, the external ID belongs to another record, the plan or webhook endpoint limit is reached, or the change needs consent to its consequences

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns ConflictProblem

412The record changed after it was read: the version in If-Match is not current

application/problem+json

Returns Problem

422A parameter is invalid or unknown

application/problem+json

Returns ValidationProblem

428The request needs If-Match with the ETag of the record

application/problem+json

Returns Problem

429The rate limit is exhausted

Headers

  • Retry-Afterintegerrequired

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns RateLimitProblem

503The store is temporarily unavailable

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns Problem

Errors of this endpoint

Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors

Example request
curl -X PATCH "https://api.saleya.app/v1/supplier-bills/{supplier_bill}" \
  -H "Authorization: Bearer $SALEYA_API_TOKEN" \
  -H 'If-Match: "7"' \
  -H "Content-Type: application/json" \
  -d @body.json
Request body — body.json
{
  "kind": "invoice",
  "fiscal": true,
  "legal_entity_id": 0,
  "supplier_id": 0,
  "related_bill_id": 0,
  "number": "string",
  "issued_on": "2026-01-15",
  "tax_period": "string",
  "due_on": "2026-01-15",
  "currency": "ARS",
  "exchange_rate": "string",
  "net_taxed": 0,
  "net_exempt": 0,
  "net_untaxed": 0,
  "tax_total": 0,
  "total": 0,
  "note": "string",
  "lines": [
    {
      "description": "string",
      "variant_id": 0,
      "quantity": "string",
      "unit_amount": 0,
      "net_amount": 0,
      "tax_kind": "taxed",
      "rate_bps": 0,
      "tax_amount": 0
    }
  ],
  "additional_taxes": [
    {
      "kind": "perception",
      "regime": "vat",
      "jurisdiction": "string",
      "amount": 0,
      "certificate_number": "string"
    }
  ],
  "goods_receipt_ids": [
    0
  ],
  "purchase_order_ids": [
    0
  ],
  "supplier_return_ids": [
    0
  ],
  "ar": {
    "document_type_code": "string",
    "point_of_sale": 0,
    "authorization_kind": "CAE",
    "authorization_code": "string",
    "authorization_expires_on": "2026-01-15",
    "credit_fiscal_amount": 0,
    "import": {
      "kind": "goods",
      "customs_declaration": "string",
      "document_kind": "invoice",
      "document_description": "string",
      "provider_tax_id": "string",
      "tax_paid_on": "2026-01-15",
      "tax_paid_amount": 0,
      "payment_reference": "string",
      "payment_entity_tax_id": "string"
    }
  }
}
Example response · 200
{
  "id": 0,
  "version": 0,
  "kind": "invoice",
  "status": "draft",
  "fiscal": true,
  "legal_entity_id": 0,
  "supplier_id": 0,
  "related_bill_id": 0,
  "number": "string",
  "issued_on": "2026-01-15",
  "tax_period": "string",
  "due_on": "2026-01-15",
  "currency": "string",
  "exchange_rate": "string",
  "net_taxed": 0,
  "net_exempt": 0,
  "net_untaxed": 0,
  "tax_total": 0,
  "perceptions_total": 0,
  "other_taxes_total": 0,
  "total": 0,
  "base_total": 0,
  "paid_total": 0,
  "outstanding": 0,
  "tax_lines": [
    {
      "regime": "vat",
      "kind": "taxed",
      "rate_bps": 0,
      "base": 0,
      "amount": 0,
      "jurisdiction": "string"
    }
  ],
  "additional_taxes": [
    {
      "kind": "perception",
      "regime": "vat",
      "jurisdiction": "string",
      "amount": 0,
      "certificate_number": "string"
    }
  ],
  "lines": [
    {
      "description": "string",
      "variant_id": 0,
      "quantity": "string",
      "unit_amount": 0,
      "net_amount": 0,
      "tax_kind": "taxed",
      "rate_bps": 0,
      "tax_amount": 0
    }
  ],
  "vendor": {
    "tax_id": "string",
    "legal_name": "string"
  },
  "goods_receipt_id": 0,
  "goods_receipt_ids": [
    0
  ],
  "purchase_order_ids": [
    0
  ],
  "supplier_return_ids": [
    0
  ],
  "consignment_settlement_id": 0,
  "match_status": "unmatched",
  "note": "string",
  "approved_at": "2026-01-15T12:00:00Z",
  "posted_at": "2026-01-15T12:00:00Z",
  "voided_at": "2026-01-15T12:00:00Z",
  "ar": {
    "document_type_code": "string",
    "point_of_sale": 0,
    "authorization_kind": "CAE",
    "authorization_code": "string",
    "authorization_expires_on": "2026-01-15",
    "verification_status": "verified",
    "credit_fiscal_amount": 0,
    "import": {
      "kind": "goods",
      "customs_declaration": "string",
      "document_kind": "invoice",
      "document_description": "string",
      "provider_tax_id": "string",
      "tax_paid_on": "2026-01-15",
      "tax_paid_amount": 0,
      "payment_reference": "string",
      "payment_entity_tax_id": "string"
    }
  },
  "created_at": "2026-01-15T12:00:00Z",
  "updated_at": "2026-01-15T12:00:00Z"
}

Delete a draft supplier bill

delete/supplier-bills/{supplier_bill}

Scope: procurement:write

Parameters

Path

  • supplier_billintegerrequired

    Supplier bill ID.

Header

  • Idempotency-Keystring

    Unique key of the attempt, for example a UUID. A retry with the same key and body gets the saved response instead of a second write. Keys live 24 hours.

    Min length:
    1
    Max length:
    255
    Example:
    8e03978e-40d5-43e8-bc93-6894a57f9324
  • If-Matchstringrequired

    ETag of the record from the last read, for example "7". The change applies only if nobody changed the record since then; otherwise 412. Without it — 428.

    Example:
    "7"

Responses

204Success

Headers

  • Idempotent-Replayedstring

    true when this is the saved response of an earlier request with the same Idempotency-Key.

    Values:
    true

No body

401The token is missing, invalid, expired or revoked

Headers

  • WWW-Authenticatestringrequired

    Authentication scheme (RFC 6750).

    Example:
    Bearer

application/problem+json

Returns Problem

403The plan, the IP address or the token scopes do not allow the request

Headers

  • WWW-Authenticatestring

    Authentication scheme (RFC 6750).

    Example:
    Bearer error="insufficient_scope", scope="locations:read"

application/problem+json

Returns ForbiddenProblem

404The object does not exist or is not available to the app

application/problem+json

Returns Problem

409A request with the same idempotency key is in progress, the data changed after it was read, the external ID belongs to another record, the plan or webhook endpoint limit is reached, or the change needs consent to its consequences

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns ConflictProblem

412The record changed after it was read: the version in If-Match is not current

application/problem+json

Returns Problem

422A parameter is invalid or unknown

application/problem+json

Returns ValidationProblem

428The request needs If-Match with the ETag of the record

application/problem+json

Returns Problem

429The rate limit is exhausted

Headers

  • Retry-Afterintegerrequired

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns RateLimitProblem

503The store is temporarily unavailable

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns Problem

Errors of this endpoint

Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors

Example request
curl -X DELETE "https://api.saleya.app/v1/supplier-bills/{supplier_bill}" \
  -H "Authorization: Bearer $SALEYA_API_TOKEN" \
  -H 'If-Match: "7"'

Post a supplier bill: it enters payables and the purchase ledger

post/supplier-bills/{supplier_bill}/post

Scope: procurement:write

Parameters

Path

  • supplier_billintegerrequired

    Supplier bill ID.

Query

  • consentobject

    Consents to the consequences of the change, by kind: consent[<consent_kind>]=<consent_token> from a 409 consent_required response. Keep the consents already given when the next kind is asked.

    Fields · 2
    • vendor_tax_idstring

      The supplier sent the bill without a tax ID on their record: posting writes the CUIT from the invoice into the supplier record. suppliers is how many records change.

      Min length:
      64
      Max length:
      64
    • close_returnsstring

      The credit note fully covers supplier returns: posting closes them. supplier_returns is how many returns close.

      Min length:
      64
      Max length:
      64

Header

  • Idempotency-Keystring

    Unique key of the attempt, for example a UUID. A retry with the same key and body gets the saved response instead of a second write. Keys live 24 hours.

    Min length:
    1
    Max length:
    255
    Example:
    8e03978e-40d5-43e8-bc93-6894a57f9324
  • If-Matchstringrequired

    ETag of the record from the last read, for example "7". The change applies only if nobody changed the record since then; otherwise 412. Without it — 428.

    Example:
    "7"

Request body application/json

object

Responses

200Success

Headers

  • Idempotent-Replayedstring

    true when this is the saved response of an earlier request with the same Idempotency-Key.

    Values:
    true
  • ETagstringrequired

    Version of the record. Send it in If-Match to change the record.

    Example:
    "7"

application/json

Returns SupplierBill

401The token is missing, invalid, expired or revoked

Headers

  • WWW-Authenticatestringrequired

    Authentication scheme (RFC 6750).

    Example:
    Bearer

application/problem+json

Returns Problem

403The plan, the IP address or the token scopes do not allow the request

Headers

  • WWW-Authenticatestring

    Authentication scheme (RFC 6750).

    Example:
    Bearer error="insufficient_scope", scope="locations:read"

application/problem+json

Returns ForbiddenProblem

404The object does not exist or is not available to the app

application/problem+json

Returns Problem

409A request with the same idempotency key is in progress, the data changed after it was read, the external ID belongs to another record, the plan or webhook endpoint limit is reached, or the change needs consent to its consequences

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns ConflictProblem

412The record changed after it was read: the version in If-Match is not current

application/problem+json

Returns Problem

422A parameter is invalid or unknown

application/problem+json

Returns ValidationProblem

428The request needs If-Match with the ETag of the record

application/problem+json

Returns Problem

429The rate limit is exhausted

Headers

  • Retry-Afterintegerrequired

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns RateLimitProblem

503The store is temporarily unavailable

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns Problem

Errors of this endpoint

Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors

Example request
curl -X POST "https://api.saleya.app/v1/supplier-bills/{supplier_bill}/post" \
  -H "Authorization: Bearer $SALEYA_API_TOKEN" \
  -H 'If-Match: "7"' \
  -H "Content-Type: application/json" \
  -d @body.json
Request body — body.json
{}
Example response · 200
{
  "id": 0,
  "version": 0,
  "kind": "invoice",
  "status": "draft",
  "fiscal": true,
  "legal_entity_id": 0,
  "supplier_id": 0,
  "related_bill_id": 0,
  "number": "string",
  "issued_on": "2026-01-15",
  "tax_period": "string",
  "due_on": "2026-01-15",
  "currency": "string",
  "exchange_rate": "string",
  "net_taxed": 0,
  "net_exempt": 0,
  "net_untaxed": 0,
  "tax_total": 0,
  "perceptions_total": 0,
  "other_taxes_total": 0,
  "total": 0,
  "base_total": 0,
  "paid_total": 0,
  "outstanding": 0,
  "tax_lines": [
    {
      "regime": "vat",
      "kind": "taxed",
      "rate_bps": 0,
      "base": 0,
      "amount": 0,
      "jurisdiction": "string"
    }
  ],
  "additional_taxes": [
    {
      "kind": "perception",
      "regime": "vat",
      "jurisdiction": "string",
      "amount": 0,
      "certificate_number": "string"
    }
  ],
  "lines": [
    {
      "description": "string",
      "variant_id": 0,
      "quantity": "string",
      "unit_amount": 0,
      "net_amount": 0,
      "tax_kind": "taxed",
      "rate_bps": 0,
      "tax_amount": 0
    }
  ],
  "vendor": {
    "tax_id": "string",
    "legal_name": "string"
  },
  "goods_receipt_id": 0,
  "goods_receipt_ids": [
    0
  ],
  "purchase_order_ids": [
    0
  ],
  "supplier_return_ids": [
    0
  ],
  "consignment_settlement_id": 0,
  "match_status": "unmatched",
  "note": "string",
  "approved_at": "2026-01-15T12:00:00Z",
  "posted_at": "2026-01-15T12:00:00Z",
  "voided_at": "2026-01-15T12:00:00Z",
  "ar": {
    "document_type_code": "string",
    "point_of_sale": 0,
    "authorization_kind": "CAE",
    "authorization_code": "string",
    "authorization_expires_on": "2026-01-15",
    "verification_status": "verified",
    "credit_fiscal_amount": 0,
    "import": {
      "kind": "goods",
      "customs_declaration": "string",
      "document_kind": "invoice",
      "document_description": "string",
      "provider_tax_id": "string",
      "tax_paid_on": "2026-01-15",
      "tax_paid_amount": 0,
      "payment_reference": "string",
      "payment_entity_tax_id": "string"
    }
  },
  "created_at": "2026-01-15T12:00:00Z",
  "updated_at": "2026-01-15T12:00:00Z"
}

Void a supplier bill together with its payments and offsets

post/supplier-bills/{supplier_bill}/void

Scope: procurement:write

Parameters

Path

  • supplier_billintegerrequired

    Supplier bill ID.

Header

  • Idempotency-Keystring

    Unique key of the attempt, for example a UUID. A retry with the same key and body gets the saved response instead of a second write. Keys live 24 hours.

    Min length:
    1
    Max length:
    255
    Example:
    8e03978e-40d5-43e8-bc93-6894a57f9324
  • If-Matchstringrequired

    ETag of the record from the last read, for example "7". The change applies only if nobody changed the record since then; otherwise 412. Without it — 428.

    Example:
    "7"

Responses

200Success

Headers

  • Idempotent-Replayedstring

    true when this is the saved response of an earlier request with the same Idempotency-Key.

    Values:
    true
  • ETagstringrequired

    Version of the record. Send it in If-Match to change the record.

    Example:
    "7"

application/json

Returns SupplierBill

401The token is missing, invalid, expired or revoked

Headers

  • WWW-Authenticatestringrequired

    Authentication scheme (RFC 6750).

    Example:
    Bearer

application/problem+json

Returns Problem

403The plan, the IP address or the token scopes do not allow the request

Headers

  • WWW-Authenticatestring

    Authentication scheme (RFC 6750).

    Example:
    Bearer error="insufficient_scope", scope="locations:read"

application/problem+json

Returns ForbiddenProblem

404The object does not exist or is not available to the app

application/problem+json

Returns Problem

409A request with the same idempotency key is in progress, the data changed after it was read, the external ID belongs to another record, the plan or webhook endpoint limit is reached, or the change needs consent to its consequences

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns ConflictProblem

412The record changed after it was read: the version in If-Match is not current

application/problem+json

Returns Problem

422A parameter is invalid or unknown

application/problem+json

Returns ValidationProblem

428The request needs If-Match with the ETag of the record

application/problem+json

Returns Problem

429The rate limit is exhausted

Headers

  • Retry-Afterintegerrequired

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns RateLimitProblem

503The store is temporarily unavailable

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns Problem

Errors of this endpoint

Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors

Example request
curl -X POST "https://api.saleya.app/v1/supplier-bills/{supplier_bill}/void" \
  -H "Authorization: Bearer $SALEYA_API_TOKEN" \
  -H 'If-Match: "7"'
Example response · 200
{
  "id": 0,
  "version": 0,
  "kind": "invoice",
  "status": "draft",
  "fiscal": true,
  "legal_entity_id": 0,
  "supplier_id": 0,
  "related_bill_id": 0,
  "number": "string",
  "issued_on": "2026-01-15",
  "tax_period": "string",
  "due_on": "2026-01-15",
  "currency": "string",
  "exchange_rate": "string",
  "net_taxed": 0,
  "net_exempt": 0,
  "net_untaxed": 0,
  "tax_total": 0,
  "perceptions_total": 0,
  "other_taxes_total": 0,
  "total": 0,
  "base_total": 0,
  "paid_total": 0,
  "outstanding": 0,
  "tax_lines": [
    {
      "regime": "vat",
      "kind": "taxed",
      "rate_bps": 0,
      "base": 0,
      "amount": 0,
      "jurisdiction": "string"
    }
  ],
  "additional_taxes": [
    {
      "kind": "perception",
      "regime": "vat",
      "jurisdiction": "string",
      "amount": 0,
      "certificate_number": "string"
    }
  ],
  "lines": [
    {
      "description": "string",
      "variant_id": 0,
      "quantity": "string",
      "unit_amount": 0,
      "net_amount": 0,
      "tax_kind": "taxed",
      "rate_bps": 0,
      "tax_amount": 0
    }
  ],
  "vendor": {
    "tax_id": "string",
    "legal_name": "string"
  },
  "goods_receipt_id": 0,
  "goods_receipt_ids": [
    0
  ],
  "purchase_order_ids": [
    0
  ],
  "supplier_return_ids": [
    0
  ],
  "consignment_settlement_id": 0,
  "match_status": "unmatched",
  "note": "string",
  "approved_at": "2026-01-15T12:00:00Z",
  "posted_at": "2026-01-15T12:00:00Z",
  "voided_at": "2026-01-15T12:00:00Z",
  "ar": {
    "document_type_code": "string",
    "point_of_sale": 0,
    "authorization_kind": "CAE",
    "authorization_code": "string",
    "authorization_expires_on": "2026-01-15",
    "verification_status": "verified",
    "credit_fiscal_amount": 0,
    "import": {
      "kind": "goods",
      "customs_declaration": "string",
      "document_kind": "invoice",
      "document_description": "string",
      "provider_tax_id": "string",
      "tax_paid_on": "2026-01-15",
      "tax_paid_amount": 0,
      "payment_reference": "string",
      "payment_entity_tax_id": "string"
    }
  },
  "created_at": "2026-01-15T12:00:00Z",
  "updated_at": "2026-01-15T12:00:00Z"
}

Approve a posted supplier bill for payment

post/supplier-bills/{supplier_bill}/approve

Scope: procurement:approve

Parameters

Path

  • supplier_billintegerrequired

    Supplier bill ID.

Header

  • Idempotency-Keystring

    Unique key of the attempt, for example a UUID. A retry with the same key and body gets the saved response instead of a second write. Keys live 24 hours.

    Min length:
    1
    Max length:
    255
    Example:
    8e03978e-40d5-43e8-bc93-6894a57f9324
  • If-Matchstringrequired

    ETag of the record from the last read, for example "7". The change applies only if nobody changed the record since then; otherwise 412. Without it — 428.

    Example:
    "7"

Responses

200Success

Headers

  • Idempotent-Replayedstring

    true when this is the saved response of an earlier request with the same Idempotency-Key.

    Values:
    true
  • ETagstringrequired

    Version of the record. Send it in If-Match to change the record.

    Example:
    "7"

application/json

Returns SupplierBill

401The token is missing, invalid, expired or revoked

Headers

  • WWW-Authenticatestringrequired

    Authentication scheme (RFC 6750).

    Example:
    Bearer

application/problem+json

Returns Problem

403The plan, the IP address or the token scopes do not allow the request

Headers

  • WWW-Authenticatestring

    Authentication scheme (RFC 6750).

    Example:
    Bearer error="insufficient_scope", scope="locations:read"

application/problem+json

Returns ForbiddenProblem

404The object does not exist or is not available to the app

application/problem+json

Returns Problem

409A request with the same idempotency key is in progress, the data changed after it was read, the external ID belongs to another record, the plan or webhook endpoint limit is reached, or the change needs consent to its consequences

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns ConflictProblem

412The record changed after it was read: the version in If-Match is not current

application/problem+json

Returns Problem

422A parameter is invalid or unknown

application/problem+json

Returns ValidationProblem

428The request needs If-Match with the ETag of the record

application/problem+json

Returns Problem

429The rate limit is exhausted

Headers

  • Retry-Afterintegerrequired

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns RateLimitProblem

503The store is temporarily unavailable

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns Problem

Errors of this endpoint

Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors

Example request
curl -X POST "https://api.saleya.app/v1/supplier-bills/{supplier_bill}/approve" \
  -H "Authorization: Bearer $SALEYA_API_TOKEN" \
  -H 'If-Match: "7"'
Example response · 200
{
  "id": 0,
  "version": 0,
  "kind": "invoice",
  "status": "draft",
  "fiscal": true,
  "legal_entity_id": 0,
  "supplier_id": 0,
  "related_bill_id": 0,
  "number": "string",
  "issued_on": "2026-01-15",
  "tax_period": "string",
  "due_on": "2026-01-15",
  "currency": "string",
  "exchange_rate": "string",
  "net_taxed": 0,
  "net_exempt": 0,
  "net_untaxed": 0,
  "tax_total": 0,
  "perceptions_total": 0,
  "other_taxes_total": 0,
  "total": 0,
  "base_total": 0,
  "paid_total": 0,
  "outstanding": 0,
  "tax_lines": [
    {
      "regime": "vat",
      "kind": "taxed",
      "rate_bps": 0,
      "base": 0,
      "amount": 0,
      "jurisdiction": "string"
    }
  ],
  "additional_taxes": [
    {
      "kind": "perception",
      "regime": "vat",
      "jurisdiction": "string",
      "amount": 0,
      "certificate_number": "string"
    }
  ],
  "lines": [
    {
      "description": "string",
      "variant_id": 0,
      "quantity": "string",
      "unit_amount": 0,
      "net_amount": 0,
      "tax_kind": "taxed",
      "rate_bps": 0,
      "tax_amount": 0
    }
  ],
  "vendor": {
    "tax_id": "string",
    "legal_name": "string"
  },
  "goods_receipt_id": 0,
  "goods_receipt_ids": [
    0
  ],
  "purchase_order_ids": [
    0
  ],
  "supplier_return_ids": [
    0
  ],
  "consignment_settlement_id": 0,
  "match_status": "unmatched",
  "note": "string",
  "approved_at": "2026-01-15T12:00:00Z",
  "posted_at": "2026-01-15T12:00:00Z",
  "voided_at": "2026-01-15T12:00:00Z",
  "ar": {
    "document_type_code": "string",
    "point_of_sale": 0,
    "authorization_kind": "CAE",
    "authorization_code": "string",
    "authorization_expires_on": "2026-01-15",
    "verification_status": "verified",
    "credit_fiscal_amount": 0,
    "import": {
      "kind": "goods",
      "customs_declaration": "string",
      "document_kind": "invoice",
      "document_description": "string",
      "provider_tax_id": "string",
      "tax_paid_on": "2026-01-15",
      "tax_paid_amount": 0,
      "payment_reference": "string",
      "payment_entity_tax_id": "string"
    }
  },
  "created_at": "2026-01-15T12:00:00Z",
  "updated_at": "2026-01-15T12:00:00Z"
}

Revoke the payment approval of a supplier bill

post/supplier-bills/{supplier_bill}/revoke-approval

Scope: procurement:approve

Parameters

Path

  • supplier_billintegerrequired

    Supplier bill ID.

Header

  • Idempotency-Keystring

    Unique key of the attempt, for example a UUID. A retry with the same key and body gets the saved response instead of a second write. Keys live 24 hours.

    Min length:
    1
    Max length:
    255
    Example:
    8e03978e-40d5-43e8-bc93-6894a57f9324
  • If-Matchstringrequired

    ETag of the record from the last read, for example "7". The change applies only if nobody changed the record since then; otherwise 412. Without it — 428.

    Example:
    "7"

Responses

200Success

Headers

  • Idempotent-Replayedstring

    true when this is the saved response of an earlier request with the same Idempotency-Key.

    Values:
    true
  • ETagstringrequired

    Version of the record. Send it in If-Match to change the record.

    Example:
    "7"

application/json

Returns SupplierBill

401The token is missing, invalid, expired or revoked

Headers

  • WWW-Authenticatestringrequired

    Authentication scheme (RFC 6750).

    Example:
    Bearer

application/problem+json

Returns Problem

403The plan, the IP address or the token scopes do not allow the request

Headers

  • WWW-Authenticatestring

    Authentication scheme (RFC 6750).

    Example:
    Bearer error="insufficient_scope", scope="locations:read"

application/problem+json

Returns ForbiddenProblem

404The object does not exist or is not available to the app

application/problem+json

Returns Problem

409A request with the same idempotency key is in progress, the data changed after it was read, the external ID belongs to another record, the plan or webhook endpoint limit is reached, or the change needs consent to its consequences

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns ConflictProblem

412The record changed after it was read: the version in If-Match is not current

application/problem+json

Returns Problem

422A parameter is invalid or unknown

application/problem+json

Returns ValidationProblem

428The request needs If-Match with the ETag of the record

application/problem+json

Returns Problem

429The rate limit is exhausted

Headers

  • Retry-Afterintegerrequired

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns RateLimitProblem

503The store is temporarily unavailable

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns Problem

Errors of this endpoint

Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors

Example request
curl -X POST "https://api.saleya.app/v1/supplier-bills/{supplier_bill}/revoke-approval" \
  -H "Authorization: Bearer $SALEYA_API_TOKEN" \
  -H 'If-Match: "7"'
Example response · 200
{
  "id": 0,
  "version": 0,
  "kind": "invoice",
  "status": "draft",
  "fiscal": true,
  "legal_entity_id": 0,
  "supplier_id": 0,
  "related_bill_id": 0,
  "number": "string",
  "issued_on": "2026-01-15",
  "tax_period": "string",
  "due_on": "2026-01-15",
  "currency": "string",
  "exchange_rate": "string",
  "net_taxed": 0,
  "net_exempt": 0,
  "net_untaxed": 0,
  "tax_total": 0,
  "perceptions_total": 0,
  "other_taxes_total": 0,
  "total": 0,
  "base_total": 0,
  "paid_total": 0,
  "outstanding": 0,
  "tax_lines": [
    {
      "regime": "vat",
      "kind": "taxed",
      "rate_bps": 0,
      "base": 0,
      "amount": 0,
      "jurisdiction": "string"
    }
  ],
  "additional_taxes": [
    {
      "kind": "perception",
      "regime": "vat",
      "jurisdiction": "string",
      "amount": 0,
      "certificate_number": "string"
    }
  ],
  "lines": [
    {
      "description": "string",
      "variant_id": 0,
      "quantity": "string",
      "unit_amount": 0,
      "net_amount": 0,
      "tax_kind": "taxed",
      "rate_bps": 0,
      "tax_amount": 0
    }
  ],
  "vendor": {
    "tax_id": "string",
    "legal_name": "string"
  },
  "goods_receipt_id": 0,
  "goods_receipt_ids": [
    0
  ],
  "purchase_order_ids": [
    0
  ],
  "supplier_return_ids": [
    0
  ],
  "consignment_settlement_id": 0,
  "match_status": "unmatched",
  "note": "string",
  "approved_at": "2026-01-15T12:00:00Z",
  "posted_at": "2026-01-15T12:00:00Z",
  "voided_at": "2026-01-15T12:00:00Z",
  "ar": {
    "document_type_code": "string",
    "point_of_sale": 0,
    "authorization_kind": "CAE",
    "authorization_code": "string",
    "authorization_expires_on": "2026-01-15",
    "verification_status": "verified",
    "credit_fiscal_amount": 0,
    "import": {
      "kind": "goods",
      "customs_declaration": "string",
      "document_kind": "invoice",
      "document_description": "string",
      "provider_tax_id": "string",
      "tax_paid_on": "2026-01-15",
      "tax_paid_amount": 0,
      "payment_reference": "string",
      "payment_entity_tax_id": "string"
    }
  },
  "created_at": "2026-01-15T12:00:00Z",
  "updated_at": "2026-01-15T12:00:00Z"
}