Spain's Law 12/2013 · AICA Register · API connector in pilot

AICA food supply contracts software: signed, registered and retained for 4 years without chasing anyone

A form with the clauses of Article 9 of Spain's Law 12/2013 (food supply chain act), electronic signature of buyer and producer, proof of registration in the Food Contracts Register and a retention deadline in each record. When AICA asks for a contract, it is one click away, not in a drawer at the field office. Free, with no implementation project and on the same low-code BPM platform that manages your documents and processes, with data in the EU and support in English and Spanish.

No card, in under a minute 6 sample contracts and 3 tours Editable with the low-code designer
4 years
Mandatory retention (Art. 11)
€1M
Maximum fine (Art. 24)
30 / 60
Payment days, perishables / rest
Updated: October 2026 · Reviewed by the Dokuflex Compliance Team
Article 9 clauses Parties, object, price, payment, delivery, duration
Signature of both parties Before performance begins (Art. 8)
AICA Register Contract number and receipt in the record
4-year retention Signed PDF and retention deadline

What Spain's Law 12/2013 on the food supply chain requires

What a food supply contract is (Law 12/2013). It is the written agreement signed by both parties that Spanish law requires in every sale or supply of agricultural and food products between operators established in Spain. It must contain the Article 9 clauses; if the seller is a primary producer, the buyer registers it with AICA, and it is retained for four years.

Law 12/2013 on measures to improve the functioning of the food supply chain, as amended by Law 16/2021, applies to commercial relations between operators established in Spain from production to distribution. Five specific obligations fall on every purchase from a farmer, livestock breeder, fisherman or their cooperative:

Obligation Article What it means in practice
Written and signed contract Art. 8.1 Signed by each party before performance begins; electronic signature is valid and each party keeps a copy. Only cash payment on delivery is exempt (Art. 8.3).
Minimum content Art. 9.1 Identification of the parties, object, price, payment terms, delivery terms, rights and obligations, duration with entry-into-force date, grounds for termination, dispute resolution and force majeure.
Objective price above cost Art. 9.1.c) and 9.3 Fixed, or variable according to objective, verifiable and non-manipulable factors. The primary producer must be paid above their effective production cost; a clause that breaches this is void.
Registration in the Food Contracts Register Art. 11 bis The buyer registers each contract with a primary producer, and its amendments, before the product is delivered. Mandatory since 30 June 2023 (Royal Decree 1028/2022).
Retention for 4 years Art. 11 All correspondence, documentation and supporting documents of the contract, on paper or electronically.

Compliance is supervised by the Agencia de Información y Control Alimentarios (AICA), Spain's food chain enforcement agency, and Article 24 sets the fines: from €250 to €3,000 for minor infringements (for example, not including the minimum content, not retaining the documents or not registering the contract), from €3,001 to €100,000 for serious ones (not formalising the contract in writing, omitting the price, unilaterally changing the price or terms, breaching payment terms) and from €100,001 to €1,000,000 for very serious ones (repeating a serious one within two years).

991
infringements penalised by AICA in 2025 (250 in 2024)
51 %
of the 2025 penalties were for not registering the contract
56 %
of the 2025 inspections were in fruit and vegetables

Sources: AICA annual activity report 2025 and 2024; breakdown of penalties according to the AICA balance published by AgroNews (4 March 2026), all in Spanish.

The details, with the articles cited, are in the guide food supply contract: clauses, AICA registration and inspection (in Spanish).

AICA's Food Contracts Register: who registers, when and how it is evidenced

The buyer registers in AICA's Food Contracts Register (RCA) each contract signed with a primary producer or a producer group, and each of its amendments, before the product is delivered. This is required by Article 11 bis of Law 12/2013, developed by Royal Decree 1028/2022, and has been mandatory since 30 June 2023.

Dokuflex does not register contracts with AICA for you: the obliged buyer files them at the register's electronic office. What the module provides is that the contract reaches that step complete and signed and that registration is a fact, not a promise: when the record moves to “Registered with AICA”, the registration date and the registration code become mandatory and are shown in the list next to the signed PDF, with data in the EU. The official procedure is in the official FAQ of the register (in Spanish).

Food supply contract template: the Article 9 clauses turned into mandatory fields

Law 12/2013 sets the minimum content every food supply contract must include in writing (Article 9.1) and leaves the rest free (Article 9.2). That list is what an inspector goes through letter by letter: leaving out any of the items is a minor infringement and omitting the price, a serious one. If you prefer to start from a document, download the free food supply contract template with the Article 9 clauses (Word, template in Spanish). The Dokuflex module goes one step further: a form in which each clause is a field that cannot be left empty:

Article 9.1 clause In the Dokuflex form
a) Identification of the parties Parties panel: buyer and tax ID, producer and tax ID, and whether the seller acts as a primary producer.
b) Object, categories and references Object panel: product, category, quantity, unit, quality and specifications.
c) Fixed price or variable price based on objective factors, above the effective production cost Mutually exclusive price type: “Fixed” requires the price per unit and “Variable” requires the formula; reference effective production cost field.
d) Payment terms within the legal deadlines Payment terms and deadline, with the maximum of 30 days for perishables and 60 for the rest noted in the field itself, and a perishable product flag.
e) Delivery terms Delivery terms and place.
h) and i) Duration, amendment and termination Start and end date, grounds for amendment and grounds for termination.
f), g), k) and l) Rights and obligations, information to be supplied, dispute resolution and force majeure They go in the text of the signed PDF contract; with the low-code designer they are added as your own fields if you want to use them as data.

The clauses one by one, with what is usually missing in practice, are in the guide to the mandatory clauses of the food supply contract (Article 9) (in Spanish). If you also manage contracts with suppliers or customers outside the food supply chain, the guide to contract lifecycle management explains how to organise them in Dokuflex.

Why a Word template and a shared folder are not enough

Most of the cooperatives, olive mills, wineries, fruit and vegetable packing houses and food manufacturers we have seen do have contracts. The problem is that they cannot prove it at the moment AICA asks: the Word template has three versions, the signed contract is on paper at the field office, the registration code arrived by email to someone who has since left, and nobody knows which contracts from last season are still within the four-year retention period.

What is needed is not more templates but a register where the contract cannot be saved incomplete, the signature stays inside the case file and the registration status is a fact, not a promise.

How Dokuflex manages AICA food supply contracts: form, rules, register and dashboard

The Food supply contracts (AICA) module of Dokuflex, the low-code BPM platform with AI, is a direct register with no approval circuit: whoever manages the contract creates it, completes it, signs it with the other party and notes its registration. Each record receives a sequential number AICA-{seq} and goes through the statuses Draft, Signed, Registered with AICA, Amended, Expired or Cancelled.

1. Form with the Article 9 clauses

Five panels: Parties (buyer and tax ID, producer and tax ID, whether the seller is a primary producer), Object (product, category, quantity, unit, quality and specifications), Price and payment (price type, price per unit, reference effective production cost, formula, payment terms and deadline, perishable product), Delivery and duration (delivery terms and place, start and end date, grounds for amendment and termination) and Signature and AICA registration.

2. Ten rules that prevent an incomplete contract

Fixed price and formula price are mutually exclusive: choosing “Fixed” shows and requires the price per unit; choosing “Variable” shows and requires the pricing formula. The “Signed” status requires the signature date and the signed PDF; “Registered with AICA” also requires the registration date and the registration code, which are only shown in that status. The payment deadline field recalls the maximum of 30 days for perishables and 60 for the rest.

3. Signature of both parties and retained PDF

Two signature fields, one for the buyer and one for the seller, with the signatory's name, and a file field that stores the signed PDF contract inside the case file. To sign remotely, buyer and producer can use Dokuflex's eIDAS electronic signature from their phone and save the signed PDF in that same field, or launch the buyer–seller signature circuit with Contract Creator, with reminders and certified email. The “Retain until (4 years)” field notes the Article 11 retention deadline. A legal notice in the form itself recalls the signature, registration, payment term and retention obligations.

4. List, kanban and dashboard

Four cards (Drafts, Signed, Registered with AICA, Expired), a grid with producer, buyer, product, category, signature date, expiry, registration code and status, exportable to Excel, a kanban board by status and a dashboard with six charts: contracts by status, by product category, price type, contract type, signed per month and perishable versus non-perishable.

Two ways to register: with the free module, the buyer registers the contract on the AICA Register website and notes in the record the code and the date returned by the register. With the connector to the official RCA API (in pilot), the registration goes out from the case file itself without entering the website. In both cases compliance with Law 12/2013 is decided and answered for by the organisation; Dokuflex provides the circuit, the traceability and the evidence.
Pilot · limited places for the 2026-2027 season

Registration with AICA from the case file: connector to the official RCA API

The Food Contracts Register has a public API for buyers (integration manual v0.46, July 2026, in Spanish). Dokuflex connects to it so that the signed contract is registered without entering the register's website, without uploading PDFs by hand and without the receipt ending up in someone's downloads folder.

  1. 1

    Signature of buyer and producer

    The contract comes out of the form with the Article 9 clauses and is signed electronically by both parties; the producer signs from their phone with a one-time code.

  2. 2

    “Register with AICA” or on completing the signature

    A button in the record, or an automatic workflow action when the last party signs, sends the signed PDF to the RCA with the buyer's and producer's tax IDs (up to 5 PDFs per submission, 10 MB each and 25 MB in total, the API limits; the register's website accepts 5 MB per upload).

  3. 3

    Contract number and official receipt

    AICA returns the contract number and the receipt as a PDF. Both are stored in the record, the status changes to “Registered with AICA” and the date is recorded: in an inspection you show the record, you do not search for an email.

  4. 4

    Amendments, addenda and registration of producers in the RCA

    Amendments, addenda and annexes are registered under the same contract number, without redoing the original contract. If the producer is not yet registered in the RCA, the connector registers them first with their tax ID, address, municipality, province and postcode.

Every call to the register is traced with its result: if AICA rejects a submission, the error code from the official manual appears in the record with its description, so it can be corrected before the product is delivered. There is a test mode against AICA's integration environment and a simulated mode to train the team without touching the real register.

What the buyer needs to use the API

What the API does not allow (and therefore no provider can do through it): querying or deleting contracts already registered. An error is corrected by registering again or updating under the same number.

I want to join the connector pilot

Register website by hand versus registration from the case file

For a buyer with ten contracts a year, the RCA website is enough. With hundreds of producers and a season concentrated in a few weeks, every manual step multiplies:

Step RCA website by hand Dokuflex with the connector
AccessElectronic certificate on the computer of whoever registersAPI credentials stored in the organisation; whoever has permission in the process registers
ContractPDF downloaded and uploaded one by oneThe signed PDF goes out from the case file on pressing the button or on completing the signature
New producerPrior registration on the website, field by fieldAutomatic registration with the data in the record before registering the contract
ReceiptDownloaded and filed wherever each person decidesAttached to the contract record with the registration number
What is still to be registeredThe website has to be cross-checked against the contract listThe “Signed” card in the list is precisely the signed contracts pending registration
4-year retentionOutside the register, on paper or in foldersContract, signatures, receipt and retention deadline in the same case file

Five checks before an AICA inspection arrives

These are the first things worth reviewing at the start of each season, whether you use Dokuflex or not:

  1. 1.Every purchase from a primary producer has a written contract signed by both parties before the first delivery, except cash payment on delivery or members' deliveries with articles of association that fix the valuation.
  2. 2.The price is in the contract: a fixed figure, or a formula with objective and verifiable factors, and not below the effective production cost.
  3. 3.The payment term respects the 30 days for perishables and 60 for the rest.
  4. 4.Every contract, amendment and annex is registered in the RCA before delivery, and you can locate the contract number and the receipt.
  5. 5.You retain for four years the contract, the correspondence and the supporting documents, and you know when each one expires.

What the free food supply contracts module includes

It is activated from the module catalogue of any Dokuflex account, in the “Regulatory compliance” group, and is operational in under a minute. It is also listed in the template catalogue as DKF-P046.

Activate the free module in your account

Food supply chain regulatory compliance with no implementation project

Complying with Law 12/2013 does not require buying a compliance suite or opening a consulting project. What AICA reviews are complete contracts, signed by both parties, registered and retained for four years, and that fits in a register with evidence. The food supply contracts module is activated free of charge in under a minute, is adapted with the low-code designer and stores each signed PDF inside the case file, on the same platform as the Dokuflex document management system.

Regulatory compliance management for an agri-food company does not end with contracts. In the same “Regulatory compliance” group of the catalogue there are other free modules: the ISO 9001 nonconformities and corrective actions register, for findings from audits, inspections and suppliers, and GDPR rights and data breach management within 72 h, for data subject requests and incidents involving personal data.

Who uses it: cooperatives, industry, distribution and integrators

Any operator that buys from primary producers or their groups is obliged to register; any operator in the chain is obliged to contract in writing and to retain.

Cooperatives and fruit and vegetable packing houses

Contracts with non-member third parties (mandatory and registrable) and individual contracts with members when the articles of association do not fix in advance the valuation procedure and the settlement calendar. A season with hundreds of producers needs a list, not a folder.

Food industry

Olive mills, wineries, dairies, canneries and slaughterhouses that buy raw materials from the producer: a sale or supply contract with a fixed or formula price, a 30-day payment term for perishables and a registration code before the first delivery. It fits with the processes of Dokuflex for manufacturing.

Meat industry and slaughterhouses: contracts with livestock farmers registered before slaughter

13 % of AICA's inspections in 2025 were in the meat sector (annual activity report 2025, in Spanish). Slaughterhouses, cutting plants and manufacturers that buy live animals from livestock farmers or their groups: a written contract with a fixed or formula price, a 30-day payment term for perishable products and an RCA registration code before the animals are delivered. The form accepts a formula price and the “Integration” contract type for pigs and poultry.

Distribution and retail with direct purchasing

Chains and wholesalers that buy fruit, vegetables or fish directly from producers or fish markets: each agreement is a food supply contract with the Article 9 clauses and the law's prohibitions (unilateral amendment, returning unsold goods without payment, selling at a loss). See also Dokuflex for retail.

Integrators and first purchasers of milk

In poultry and pig integration the integrator registers; for raw milk, the first purchaser. The “Integration” contract type and the price formula by feed conversion ratio or by market reference are provided for in the form and in the sample data.

Frequently asked questions

Which contracts must be formalised in writing under Law 12/2013?▾

All food supply contracts between operators established in Spain, from production to distribution, must be formalised in writing and signed by each party before performance begins (Article 8.1). The law exempts only two cases: cash payment on delivery, documented with the invoice under Royal Decree 1619/2012 (Article 8.3), and members' deliveries to their cooperative when the articles of association fix in advance how the value of the product is calculated and the settlement calendar.

Who has to register the contract in AICA's Food Contracts Register?▾

The buyer. Article 11 bis requires the operator that buys from a primary producer or a producer group to register each contract and its amendments before the product is delivered. In integration contracts the integrator registers. The register is electronic, managed by AICA and mandatory since 30 June 2023 (Royal Decree 1028/2022).

How long must a food supply contract be retained?▾

Four years. Article 11 of Law 12/2013 requires operators to retain all correspondence, documentation and supporting documents related to their food supply contracts, on paper or electronically, for that period. In the Dokuflex record the “Retain until (4 years)” field notes the retention deadline of each contract and appears next to the signed PDF.

What penalties can AICA impose for a badly drafted contract?▾

Under Article 24 of Law 12/2013, minor infringements are fined from 250 to 3,000 euros, serious ones from 3,001 to 100,000 euros and very serious ones from 100,001 to 1,000,000 euros. Not including the minimum content, not retaining the documents or not registering the contract are minor infringements; not formalising the contract in writing, omitting the price or breaching payment terms are serious; repeating a serious one within two years is very serious.

Does Dokuflex send the contract to the AICA Register automatically?▾

With the connector to the official RCA API, yes: the signed contract is registered from the case file with a button or when the signature is completed, and the contract number and the AICA receipt are stored in the record. The connector is in pilot with the first buyers. With the free module without the connector, the buyer registers on the register's website and notes the code and the date in the record; when moving to Registered with AICA those two fields are mandatory, so you know which contracts are registered and which are not.

Which software allows food supply contracts to be registered with AICA automatically?▾

Automatic registration goes through the official services API of the Food Contracts Register: the registered buyer requests access with AICA's form and, from then on, its software sends the contracts without uploading them by hand on the website. Dokuflex brings together in the same case file the Article 9 clauses, the producer's signature, registration through that API (connector in pilot with the first buyers) and the 4-year retention. Without the connector, the free module stores the registration code and date the buyer obtains on the register's website.

What do I need to connect Dokuflex to the AICA API?▾

To be registered as a buyer in the Food Contracts Register with your legal representative, request API access with AICA's official form and sign the terms of use with Autofirma on the register's website. On signing, the RCA gives you an API user and password, different for testing and for production, which are entered in Dokuflex. We guide you through the process and do the first registration with you in the test environment.

What about amendments, addenda, annexes and producers who are not yet registered?▾

Amendments, addenda and annexes must also be registered before delivery; the connector sends them under the same contract number AICA returned. If the producer does not yet appear in the register, the connector registers them first with their tax ID, address, municipality, province and postcode. The API does not allow querying or deleting contracts already registered: an error is corrected by updating the contract or registering it again.

Can I adapt the form to my sector (milk, wine, olive oil, poultry integration)?▾

Yes. The module is installed with a low-code designer: you can add your own fields (price reference index, size, grade, quality parameters), change the product categories, add statuses or an approval circuit before signature. The six sample records cover PDO fruit, raw milk with a price formula, grapes, chicken integration, olive-mill olives and raft-grown mussels.

Does a cooperative have to register contracts with its members at AICA?▾

No. Cooperatives and other associative entities do not register their members' deliveries, and the law exempts them from the written contract when the articles of association require delivery and fix in advance the product valuation procedure and the settlement calendar. If they do not, an individual contract with each member is needed. Contracts with non-member third parties are formalised in writing and registered.

What happens if the price or quantity of a contract already registered with AICA is amended?▾

The amendment must be agreed under the contract clause that allows it, signed by both parties as an annex and registered before the affected product is delivered. Changing the price, object, payment or delivery terms without express agreement is a serious infringement; any other unagreed amendment, minor. In Dokuflex the record moves to the “Amended” status and the list shows which contracts have changed.

How do you respond to an AICA request about food supply contracts from Dokuflex?▾

From the module's list, which shows for each contract the producer, the buyer, the product, the signature date, the expiry, the registration code and the status, and exports to Excel. Each record also stores the PDF signed by both parties, the registration date and code and the retention deadline. Supplying incomplete or late information is a minor infringement.

How much does the Dokuflex AICA food supply contracts module cost?▾

Nothing: the module is free and is activated from the module catalogue of any Dokuflex account, in the “Regulatory compliance” group, with no card and in under a minute, with the six sample contracts and the three guided tours. If you later want to bring other processes to the platform, the paid plans, with Starter from €25/user/month, are on the Dokuflex pricing page.

Is compliance software needed to comply with Spain's food supply chain law?▾

No. Law 12/2013 does not require any specific software: it requires written contracts with the Article 9 clauses, signed by both parties, registered with AICA when the seller is a primary producer and retained for four years. The free Dokuflex module turns those clauses into mandatory fields and stores the signed PDF, the registration code and the retention deadline.

Which other free regulatory compliance modules can I activate in the same account?▾

The “Regulatory compliance” group of the module catalogue includes, among others, the nonconformities and corrective actions register for ISO 9001, 14001, 45001 and 27001, GDPR rights and data breach management with the Spanish data protection authority's 72-hour deadline, the KYC and due diligence file and the AI systems register. All are free and are activated from the same Dokuflex account.

How do I register a producer who is not yet in the AICA Register?▾

From the same case file. If the producer does not appear in the RCA, the connector registers them before registering the contract with the data in their record (tax ID, address, municipality, province and postcode) and then sends the contract. Without the connector, the registration is done field by field on the register's website before registering the contract. In both cases the record does not move to “Registered with AICA” until the registration date and code are recorded.

What is the fine for not registering a contract with AICA?▾

It is a minor infringement, fined from €250 to €3,000 per contract (Article 24 of Law 12/2013); a repeat within two years turns the next one into a serious infringement, from €3,001 to €100,000. Failure to register was the reason for 51 % of the 991 infringements AICA penalised in 2025. With signed contracts pending registration visible in the list, no product is delivered without a registration number.

Official sources

Guidance prepared by the Dokuflex Compliance Team from the consolidated text of 15 December 2021 and the RCA API manual v0.46. All sources are in Spanish. For specific cases consult your legal advisers or AICA itself.

So the next AICA request is answered in five minutes

Activate the module in your Dokuflex account, review the six sample contracts with the guided tour and create the first one of your season. If you would rather see it with your own contracts, request a demo.

✓ Article 9 clauses ✓ Signature of both parties ✓ AICA registration code ✓ 4-year retention