← All guides

    For suppliers

    Sending your catalogue with the Vinius API

    Let your ERP, PIM or webshop send your catalogue to Vinius: connect the API, create a token, send a test batch, pass the integrity check and publish.

    Quick answer

    • In your portal, the Vinius API card on the Integrations tab of Catalogue shows Coming next: you cannot connect it yourself. The steps below apply once the card shows Connect.
    • Meanwhile, add wines by hand with Add a wine on the Catalogue tab, or connect the Odoo product feed.
    • Once connected: create a token under Tokens with Create token, named after the system that uses it. Copy it at once: Vinius shows it only once.
    • Your system sends your catalogue to POST /api/supplier/v1/catalog/items/batch, up to 500 products a batch. Before you publish, every batch is a test: nothing reaches buyers.
    • Then click Submit for review. Vinius does the spot check, publishes the catalogue and emails you. From then on, every batch is a sync.
    • Owners and admins, in the web app only.

    When to use it

    The API suits suppliers whose own system can send data: an ERP, a PIM, a webshop other than Odoo, or a tool an agency built for you. It takes someone who can program. Without that person, the Excel import does the same job by hand.

    Tokens

    A token lets your system send your catalogue. It belongs to this integration, not to a person, so it keeps working when someone leaves your team.

    • Vinius shows a token once, when you create it. It keeps only a fingerprint of it and shows its first characters (vns_ and four more) in the list.
    • Name each token after the system that uses it. Up to five can be active at once.
    • A token expires after 12 months. Create a new one before then and swap it in.
    • Revoke stops a token straight away, for example when it may have leaked.
    • A token works on the supplier API alone. It cannot read or change anything else in Vinius.

    The list shows when each token was last used, and from which address. Treat a token like a password: keep it in your system's settings, never in an email or a shared document.

    Create or revoke a token

    Owners and admins only, once the API is connected.

    On the web

    1. In the menu on the left, click Catalogue, then the Integrations tab.
    2. Under Tokens, type the system's name in Name and click Create token.
    3. Click Copy, paste the token into your system's settings, then click Done. The token is not shown again.
    4. To stop a token, click Revoke next to it, then Revoke again to confirm.

    In the app

    Not in the app: use the web app.

    Sending your catalogue

    Send the token in the Authorization header as Bearer vns_…. A batch is JSON:

    {
      "scope": "full",
      "items": [
        {
          "sku": "RAL-PREST-75",
          "producer": "Robert-Allait",
          "name": "Cuvée Prestige Brut",
          "vintage": "NV",
          "sizeMl": 750,
          "style": "sparkling",
          "country": "FRA",
          "price": 22.13,
          "availability": "available"
        }
      ]
    }
    

    Each product takes the fields of the Excel template: sku (required), type, producer, name, vintage, sizeMl, unitsPerCase (a case is set aside: Vinius publishes single bottles only), style, country, region, classification, gtin, price, currency, availability and imageUrl. The full list, with what each field takes, is in the API documentation, which API documentation on the integration's card also opens.

    • sku is your own product code. It is how the next batch finds the product again.
    • price is your list price per bottle or piece, excluding VAT: your regular price. What a business pays less is its discount.
    • scope is full for your whole catalogue: offers it leaves out become unavailable. Use partial to change only the products a batch names.

    More than 500 products

    Send the catalogue in parts of one reading. Set "more": true on every part but the last, and send the runId from the first answer with every next part. The last part, without more, completes the reading. One reading holds at most 5,000 products.

    What the answer says

    Every answer lists each product with its outcome and its findings: linked to a wine Vinius knows, new, held for review, or left out and why. The findings are the ones the integrity check uses. Every finding, with its fix.

    Connect the Vinius API

    Owners and admins only, once the Vinius API card shows Connect.

    The Vinius API card on the Integrations tab on the web: your own system sends your catalogue to the Vinius API, marked Coming next

    On the web

    1. In the menu on the left, click Catalogue, then the Integrations tab, and click Connect on the Vinius API card.
    2. Under Tokens, type a name and click Create token. Copy the token into your system.
    3. Send your whole catalogue with "scope": "full". This first reading is the integrity check.
    4. Read the report on the Integrations tab, or the answer your system got. Fix what it finds at the source and send the catalogue again.
    5. Click Submit for review. Vinius does the spot check and publishes the checked reading, then emails you.

    In the app

    Not in the app: use the web app.

    From then on, every batch your system sends is a sync. There is no schedule: your system decides when to send.

    Between batches

    Two more calls help a system that pushes changes as they happen:

    • PATCH /api/supplier/v1/catalog/items/{sku} changes the availability or the price of one product, once the integration is published. A bottle price outside the integrity check's bounds is refused.
    • GET /api/supplier/v1/catalog/items and GET /api/supplier/v1/catalog/items/{sku} show your offers as Vinius holds them.

    GET /api/supplier/v1/catalog/reviews lists the products held for review, with the wines Vinius proposes. You answer them on the Integrations tab, and the answer holds from the next batch on.

    Checks and limits

    Every batch after publishing runs the same checks as the first reading. A batch that changes much more than usual is held: the answer is 409 with the reading's runId, and nothing changes until Vinius publishes or discards it. How the change guards work.

    LimitValue
    Requests per token60 a minute
    Products per token10,000 a day
    Products per batch500
    Size of a request1 MB

    A request over a limit gets 429 and a Retry-After header with the seconds to wait. A missing, unknown, revoked or expired token gets 401.

    Related guides

    Get the Vinius newsletter

    You will get the Vinius newsletter by email: releases, guides and new articles, a few times a quarter at most. We send one email to confirm your address, and every issue has an unsubscribe link. Read more in our privacy policy.