Skip to content

Public API: curl examples (products, orders and documents)

Requests ready to copy: list products and stock, create a customer and an order, and read invoices with their PDF.

In the examples, replace https://your-erp.example.com with your ERP address and bzk_YOUR_KEY with your key.

Products and stock

  • Products (50 per page): curl -H "Authorization: Bearer bzk_YOUR_KEY" https://your-erp.example.com/api/v1/public/v1/products
  • Only those changed since a date: curl -H "Authorization: Bearer bzk_YOUR_KEY" "https://your-erp.example.com/api/v1/public/v1/products?updatedSince=2026-11-14T00:00:00Z"
  • Stock: curl -H "Authorization: Bearer bzk_YOUR_KEY" https://your-erp.example.com/api/v1/public/v1/stock

Each product has price in the store price mode (priceIncludesTax), plus priceNet and priceGross computed with its taxRate. In stock, sellable is what can be sold now (the same figure the POS and the online shop use).

Create a customer

  • curl -X POST -H "Authorization: Bearer bzk_YOUR_KEY" -H "Idempotency-Key: customer-B12345674" -H "Content-Type: application/json" -d '{"name":"Ferretería López SL","taxId":"B12345674","email":"compras@ferreterialopez.es"}' https://your-erp.example.com/api/v1/public/v1/customers

There is one customer per tax ID: if it already exists you get 409 CUSTOMER_NIF_EXISTS. Find it with GET /customers?taxId=B12345674.

Create an order

  • curl -X POST -H "Authorization: Bearer bzk_YOUR_KEY" -H "Idempotency-Key: web-10023" -H "Content-Type: application/json" -d '{"customerId":"CUSTOMER_ID","reference":"WEB-10023","lines":[{"productId":"PRODUCT_ID","quantity":2}]}' https://your-erp.example.com/api/v1/public/v1/orders

Prices are not sent: BizQ applies the store prices for that customer (price lists, tiers, promotions and their discount) and the VAT of each product. The order appears in the store as a parked sale and reserves the stock; the store confirms it, collects it and issues the ticket, invoice or albarán as usual. If the product has variants, give variantId.

Documents

  • Invoices and tickets: curl -H "Authorization: Bearer bzk_YOUR_KEY" https://your-erp.example.com/api/v1/public/v1/invoices
  • PDF of an invoice: curl -H "Authorization: Bearer bzk_YOUR_KEY" -o invoice.pdf https://your-erp.example.com/api/v1/public/v1/invoices/INVOICE_ID/pdf
  • Albaranes: curl -H "Authorization: Bearer bzk_YOUR_KEY" https://your-erp.example.com/api/v1/public/v1/albaranes

Money collected and pending comes from the documents: use pendingAmount of each invoice, ticket or albarán. An order total is the business record, not what has been collected.

Back to the help centre