Skip to content

Document gov-fr Annuaire directory lookup endpoints#343

Open
alvarolivie wants to merge 1 commit intomainfrom
fr-lookup
Open

Document gov-fr Annuaire directory lookup endpoints#343
alvarolivie wants to merge 1 commit intomainfrom
fr-lookup

Conversation

@alvarolivie
Copy link
Copy Markdown
Contributor

Summary

  • Add OpenAPI spec for the new gov-fr directory lookup endpoints (GET /apps/gov-fr/v1/directory/siren/{siren} and …/identifier/{identifier}).
  • Add API reference pages under a new "France" group, and register the spec in docs.json.
  • Link both endpoints from the Annuaire registration section of guides/fr-pa.mdx so users can branch regulated vs. non-regulated flows by checking the directory first.

Test plan

  • mintlify dev renders the new pages under API Reference → Apps → France
  • OpenAPI examples render with realistic Annuaire data (PascalCase note below)
  • Link from guides/fr-pa to the API reference resolves

Follow-up

The live response currently serializes as PascalCase (IDInstance, SIREN, …) because repos.DirectoryEntry in gov-fr has no json: struct tags. The docs document the intended snake_case shape — needs json: tags added in gov-fr/internal/domain/repos/directory.go to match.

🤖 Generated with Claude Code

Adds an OpenAPI spec and API reference pages for the new
`/apps/gov-fr/v1/directory/{siren,identifier}` endpoints, registers
them in docs.json under a new France group, and links them from the
Annuaire registration section of the France PA guide.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented Apr 27, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
invopop 🟢 Ready View Preview Apr 27, 2026, 10:46 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds documentation for new gov-fr Annuaire (PPF directory) lookup endpoints and exposes them in the Mintlify API reference and France PA guide.

Changes:

  • Added a new OpenAPI spec for GET /apps/gov-fr/v1/directory/siren/{siren} and GET /apps/gov-fr/v1/directory/identifier/{identifier}.
  • Added two API reference MDX pages under a new “France” Apps group and registered the spec in docs.json.
  • Linked the new lookup endpoints from the France PA guide’s Annuaire registration section.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
openapi/apps/gov-fr_v1.yaml New OpenAPI 3.1 spec defining the gov-fr Annuaire directory lookup endpoints, schemas, and examples.
api-ref/apps/gov-fr/lookup-siren.mdx Mintlify API reference page wiring the SIREN lookup operation into docs navigation.
api-ref/apps/gov-fr/lookup-identifier.mdx Mintlify API reference page wiring the identifier lookup operation into docs navigation.
docs.json Registers the new OpenAPI file and adds a “France” group under API Reference → Apps.
guides/fr-pa.mdx Adds links from the France PA guide to the new Annuaire lookup API reference pages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

suffix: "suffixe1"
start_date: "20251227"
end_date: ""
effective_end_date: "20280402"
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue in this example: effective_end_date is described as the date after deactivation, but the example sets it to a future date while created_at/updated_at are in 2026. Please adjust the example so the dates are internally consistent (either active entry with empty effective_end_date, or deactivated entry with timestamps after the effective end).

Suggested change
effective_end_date: "20280402"
effective_end_date: ""

Copilot uses AI. Check for mistakes.
count: 1
results:
- id_instance: "1020993"
siren: "269909452"
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the 200-response example for this endpoint, the top-level siren being looked up is 123456789, but the example directory entry in results has siren: "269909452". This makes the example self-contradictory; please update the sample data so the queried SIREN and returned entry SIREN match.

Suggested change
siren: "269909452"
siren: "123456789"

Copilot uses AI. Check for mistakes.
routing_code: "ROUTE123"
platform_id: "0431"
nature: "M"
identifier: "269909452_suffixe1"
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The identifier-lookup example is inconsistent: the lookup is for identifier: "0009:123456789" but the returned directory entry shows identifier: "269909452_suffixe1". Please make the example values consistent so it’s clear whether DirectoryEntry.identifier is expected to include the scheme: prefix and how it relates to the path parameter.

Suggested change
identifier: "269909452_suffixe1"
identifier: "0009:123456789"

Copilot uses AI. Check for mistakes.
Comment thread openapi/apps/gov-fr_v1.yaml
Comment thread guides/fr-pa.mdx
@@ -50,6 +50,8 @@ The _annuaire_ is France's national directory of e-invoicing endpoints. It recor

Registering in the annuare enables parties (companies) to send and receive invoices in France. Behind the scenes, it extends the standard [Peppol registration workflow](/guides/peppol) with one additional French-specific step to register the party in the Annuaire.
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: "annuare" should be "annuaire".

Suggested change
Registering in the annuare enables parties (companies) to send and receive invoices in France. Behind the scenes, it extends the standard [Peppol registration workflow](/guides/peppol) with one additional French-specific step to register the party in the Annuaire.
Registering in the annuaire enables parties (companies) to send and receive invoices in France. Behind the scenes, it extends the standard [Peppol registration workflow](/guides/peppol) with one additional French-specific step to register the party in the Annuaire.

Copilot uses AI. Check for mistakes.
Comment on lines +148 to +166
id_instance:
type: string
description: Unique instance identifier from the PPF export.
example: "1020993"
siren:
type: string
description: 9-digit French SIREN of the company.
example: "269909452"
siret:
type: string
description: 14-digit French SIRET of the establishment, when applicable.
example: ""
routing_code:
type: string
description: Routing code used by the PPF to deliver invoices.
example: "ROUTE123"
platform_id:
type: string
description: 4-digit identifier of the PA platform that registered the entry.
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description notes the live API currently serializes directory fields in PascalCase due to missing json: tags in the gov-fr service. Since this spec documents snake_case fields (id_instance, routing_code, etc.), it will be inaccurate until the backend change ships; please either (a) add a prominent note/warning in the schema/endpoint descriptions, or (b) update the spec/examples to match the current live response shape until the backend is updated.

Copilot uses AI. Check for mistakes.
suffix: ""
start_date: "20251227"
end_date: ""
effective_end_date: "20280402"
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the example payload, effective_end_date is documented as the date “once the entry has been deactivated”, but the sample value (20280402) is in the future relative to created_at/updated_at (2026-01-15). To avoid confusion, either leave effective_end_date empty in the example (active entry) or make the timestamps consistent with a deactivated entry.

Suggested change
effective_end_date: "20280402"
effective_end_date: ""

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants