GET /purchases

Récupère la liste de tous les achats/factures fournisseurs avec pagination et filtres.

Les achats permettent de suivre les dépenses de l'entreprise (factures fournisseurs, notes de frais, etc.).

États disponibles

  • draft : Brouillon (pas encore validé)
  • waiting : En attente de paiement
  • to_pay : À payer
  • paid : Payé
  • notpaid : Impayé (échéance dépassée)
  • inactive : Supprimé (soft delete)

Query parameters

  • limit integer

    Nombre maximum d'achats à retourner

    Default value is 20.

  • skip integer

    Nombre d'achats à ignorer (pagination)

    Default value is 0.

  • sort string

    Champ et direction de tri (ex. "date:-1" pour les plus récents)

  • state string

    Filtrer par état de l'achat

    Values are draft, waiting, paid, to_pay, notpaid, or inactive.

  • supplier string

    Filtrer par fournisseur (ID du fournisseur)

Responses

  • 200 application/json

    Liste des achats avec pagination

    Hide response attributes Show response attributes object
    • purchases array[object]

      Tableau des achats

      Hide purchases attributes Show purchases attributes object
      • _id string

        Unique identifier for the purchase

      • number string

        Purchase number

      • invoiceNumber string

        Supplier invoice number

      • date string(date-time)

        Purchase date

      • dateRecord string(date-time)

        Record date

      • company string

        Reference to the company

      • supplier string

        Reference to supplier (client)

      • supplier_name string

        Supplier name

      • supplier_code string

        Supplier code

      • supplierTvaNumber string

        Supplier VAT number

      • supplierReverseCharge boolean

        Reverse charge applicable

        Default value is false.

      • total_ht number

        Total without tax

      • total_ttc number

        Total with tax

      • total_tva number

        Total VAT amount

      • base_currency string

        Default value is EUR.

      • currency string

        Default value is EUR.

      • state string

        Values are draft, waiting, paid, to_pay, notpaid, or inactive. Default value is waiting.

      • type string

        Values are purchase_old, purchase, or purchase_credit. Default value is purchase.

      • lines array[object]
        Hide lines attributes Show lines attributes object
        • title string
        • totalHt number
        • totalTva number
        • totalTtc number
        • tvaRate number
        • tva string
        • type string

          Default value is product.

      • payments array[object]
        Hide payments attributes Show payments attributes object
        • mode string
        • method_name string
        • amount number
        • currency string
        • date string(date-time)
        • check_number string
      • payment_date string(date-time)
      • payment_expiry_date string(date-time)
      • payment_methods array[string]
      • categories array[string]

        Purchase category references

      • VatRates array[object]
        Hide VatRates attributes Show VatRates attributes object
        • amount number

          Amount of VAT

        • rate string

          VAT rate

        • total number

          Total amount with this VAT rate

      • url string

        Attached file URL

      • exported boolean

        Default value is false.

      • exportedFEC boolean

        Default value is false.

      • exportedPDF boolean

        Default value is false.

      • bank_reconciliations array[string]
      • bank_reconciliation_status string

        Values are unreconciliated, reconciliated, or partialreconciliated. Default value is unreconciliated.

      • bank_reconciliate_total number
      • creditForPurchase string

        Reference to original purchase for credit notes

      • analytical_code string
      • createdAt string(date-time)
      • updatedAt string(date-time)
    • total integer

      Nombre total d'achats

    • limit integer

      Limite utilisée

    • skip integer

      Offset utilisé

GET /purchases
curl \
 --request GET 'https://wuro.pro/api/v3.2/purchases' \
 --header "X-APP-ID: $API_KEY" \
 --header "X-APP-SECRET: $API_KEY"
Response examples (200)
{
  "purchases": [
    {
      "_id": "string",
      "number": "string",
      "invoiceNumber": "string",
      "date": "2025-05-04T09:42:00Z",
      "dateRecord": "2025-05-04T09:42:00Z",
      "company": "string",
      "supplier": "string",
      "supplier_name": "string",
      "supplier_code": "string",
      "supplierTvaNumber": "string",
      "supplierReverseCharge": false,
      "total_ht": 42.0,
      "total_ttc": 42.0,
      "total_tva": 42.0,
      "base_currency": "EUR",
      "currency": "EUR",
      "state": "waiting",
      "type": "purchase",
      "lines": [
        {
          "title": "string",
          "totalHt": 42.0,
          "totalTva": 42.0,
          "totalTtc": 42.0,
          "tvaRate": 42.0,
          "tva": "string",
          "type": "product"
        }
      ],
      "payments": [
        {
          "mode": "string",
          "method_name": "string",
          "amount": 42.0,
          "currency": "string",
          "date": "2025-05-04T09:42:00Z",
          "check_number": "string"
        }
      ],
      "payment_date": "2025-05-04T09:42:00Z",
      "payment_expiry_date": "2025-05-04T09:42:00Z",
      "payment_methods": [
        "string"
      ],
      "categories": [
        "string"
      ],
      "VatRates": [
        {
          "amount": 42.0,
          "rate": "string",
          "total": 42.0
        }
      ],
      "url": "string",
      "exported": false,
      "exportedFEC": false,
      "exportedPDF": false,
      "bank_reconciliations": [
        "string"
      ],
      "bank_reconciliation_status": "unreconciliated",
      "bank_reconciliate_total": 42.0,
      "creditForPurchase": "string",
      "analytical_code": "string",
      "createdAt": "2025-05-04T09:42:00Z",
      "updatedAt": "2025-05-04T09:42:00Z"
    }
  ],
  "total": 42,
  "limit": 42,
  "skip": 42
}