Wine GAMMA2 Excise Documents API for Odoo

DAE and DSA sent to French customs from the delivery.

What Wine GAMMA2 Excise Documents API does

Submit the excise document and Odoo sends it to GAMMA2 through the customs EDI-via-API service. The ARC, rejections, reports of receipt and cancellations come back on their own and update the document. Requires the customs EDI-via-API agreement, an API account enabled for GAMMA2 and the certification of the connection.

GAMMA2 EDI/API client for French excise movement documents (DAE / DSA) of wine; needs a customs API account and certification

  • FRA815 DAE
  • MVVDSA
  • ARC back
  • Replays
  • Certification

Features

  • OAuth2 the way customs ask

    Password grant with the API account, the 5-minute token reused until it expires and renewed after a 401. Client id and secret when customs provide them.

  • Outbound messages

    FRA815 e-AD creation, MVVDSA DSA creation and cancellation, FRA810 cancellation, FRA813 change of destination and FRA900 status requests, validated against the official contract.

  • Call-backs from GAMMA2

    FRA801 (ARC), FRA906 / FRA917 rejections, MVVDSACONF, FRA818 receipts, FRA819, FRA803, FRA807, FRA881 and more, protected by the inbound token and processed once.

  • Replays and alerts

    Network errors, 5xx, 408 and 429 replayed on the customs tiers (1, 5, 15, 30 minutes, then hourly); an activity is raised when a message gives up or GAMMA2 stays silent.

  • Message journal

    Every exchange with payload, headers, HTTP status and answer, linked to its excise document and kept in the connector log.

  • Certification workspace

    Campaigns with the consignor cases of the official DAE and MVV/DSA test books, model documents, second steps and the expected versus received answers.

  • Setup wizard

    Agreement, API account, call-back URL and inbound token, authentication test and go live, in the order customs require.

  • Synchronisation cron

    Validated movements without a report of receipt are synchronised with FRA900 once a day.

  • Credentials kept safe

    API password, client secret and inbound token visible to compliance officers only; the inbound token is compared in constant time.

Before and after

Without the app

  • Every DAE typed again in the GAMMA2 portal
  • ARC copied back by hand, receipts checked one by one
  • A gateway outage means documents silently not sent
  • Certification test cases followed on paper

With Wine GAMMA2 Excise Documents API

  • Submit in Odoo: the document goes to GAMMA2 with the right headers and token
  • ARC, rejections and receipts update the document automatically
  • Failed calls replayed on the customs schedule, with alerts when they give up
  • Certification campaign with the official cases and the answers received

How it works, step by step

  1. 01Start the setup wizard

    Step one recalls the agreement customs require and keeps its date on the connector.

    Wine GAMMA2 Excise Documents API: Start the setup wizard
  2. 02Enter the API account

    Environment, token and API URLs, API account, password and sender SIRET. Secrets are stored on the connector only.

    Wine GAMMA2 Excise Documents API: Enter the API account
  3. 03Declare the call-back

    Copy the call-back URL and the inbound token, shown once, into Correspondant Entreprise.

    Wine GAMMA2 Excise Documents API: Declare the call-back
  4. 04Test the authentication

    Odoo asks the authorisation server for a token with the saved account. Nothing is sent to GAMMA2.

  5. 05Submit the excise document

    The FRA815 message is sent and taken in charge; the document waits for GAMMA2.

  6. 06Receive the ARC

    GAMMA2 calls back with FRA801: the document is validated with its ARC, the report of receipt follows.

  7. 07Follow every exchange

    The message journal shows payloads, HTTP status, attempts and the next replay.

  8. 08Run the certification

    Load the official test cases, run them with the certifier and see expected versus received answers.

Included apps

Odoo installs these Viyug Infotech apps together with Wine GAMMA2 Excise Documents API.

Questions about Wine GAMMA2 Excise Documents API

Do I need an agreement with customs?

Yes. GAMMA2 EDI via API needs the customs EDI-via-API contract, an API account enabled for GAMMA2 and the certification of the connection on the test environment. Without them, keep using the GAMMA2 portal: the French Customs Localisation app builds the DTI+ draft file of each document.

Can I try it before the agreement?

You can install it, run the setup wizard and prepare the certification campaign. Real exchanges, even on the customs test environment, need the credentials customs give with the agreement.

What does my server need?

An HTTPS address reachable from the Internet for the call-backs, with this database selected without a session (single database or dbfilter). Optional: the Python package jsonschema to validate every outbound message.

Which messages are not covered?

The consignee side (issuing reports of receipt), explanations on delay or shortages, splitting and MVV documents. Use the GAMMA2 portal for those.

What happens when GAMMA2 is down?

The message stays queued and is replayed on the customs schedule; after the last attempt it is marked in error and an activity is created on the document.

All Odoo apps

Related Odoo apps

Tell us which systems disagree. We will fix that.

Thirty minutes with an engineer, not a salesperson. You leave with a map of what you run, what to connect first and a price range, whether or not you hire us.