This is a sample script to generate files in WIPO Standard ST.92 Patent Priority Document Data Package (PDDP) ZIP files, for testing REGISTRATION of priority documents in WIPO DAS REST API V2. 

It will generate the files for any IP office and IP right type this via the configuration in pddp_config.json.

Disclaimer

This is a sample script to help users prepare their sample files for testing the REST API, it does not cover all possible cases available in ST.92.

If you run into errors or you want an specific case, feel free to modify it to suit your needs.

For official ST.92 resources, please check the following links from the WIPO Standards Division:

Recommendations on the Data Package Format for the Electronic Exchange of Priority Documents (ST.92 document detailing the standard)


Get the generator here: 4.-ST.92.zip (version of 02.10.2026)

To check the generated packages (or packages received from an IP office), use the validator: 4.1.- Validating PDDP packages

Contents of the package

generate_pddp_ib.py           # Generator script
pddp_config.json              # Configuration file (office, year, number patterns)
README.md                     # Documentation

Configuration (pddp_config.json)

{
  "office_code": "IB",
  "filing_year": 2026,

  "patent":    { "enabled": true,  "number_regex": "PCT/IB{year}/\\d{6}" },
  "design":    { "enabled": false, "number_regex": "IB{year}\\d{6}" },
  "trademark": { "enabled": false, "number_regex": "IB\\d{9}" }
}
FieldDescription
office_codeWIPO ST.3 office code (e.g. IB, FR, EP, US)
filing_yearYear used for random filing dates (1 January → today)
*.enabledWhether this IP type is generated by default
*.number_regexPattern for generating application numbers (see below)

Number regex syntax

TokenMeaning
\d{N} or [0-9]{N}N random decimal digits
{year}Replaced by filing_year before digit substitution
Any other characterKept as-is (literal)

Examples for common offices

See also: 1.- Priority number format in use by IP Office

OfficeIP typenumber_regexExample output
IBPatentPCT/IB{year}/\d{6}PCT/IB2026/050123
FRPatentFR\d{7}FR2420100
FRDesign\d{8}01519876
FRTrademark\d{9}018975602
EPPatentEP\d{8}EP23123456
USPatentUS\d{7}US1234567

Usage

# Generate all enabled types from config (default: 1 of each)
python3 generate_pddp_ib.py

# Generate only patents, 5 packages
python3 generate_pddp_ib.py --ip-type patent --count 5

# Generate all enabled types into a folder
python3 generate_pddp_ib.py --count 3 --output-dir ./output

# Use a different config (e.g. FR office)
python3 generate_pddp_ib.py --config fr_config.json --ip-type patent

# Fix a specific application number (single package only)
python3 generate_pddp_ib.py --ip-type patent --number "PCT/IB2026/050123"

# Include an ST.26 (XML) sequence listing in patent packages
python3 generate_pddp_ib.py --ip-type patent --count 2 --seq-listing

# Include an ST.25 (plain text) sequence listing - needs filing_year < 2022 in the config
python3 generate_pddp_ib.py --config no_2021.json --ip-type patent \
        --seq-listing --seq-listing-format ST25

All options

OptionDefaultDescription
--config FILEpddp_config.jsonJSON configuration file
--ip-type TYPEallpatent, design, trademark, or all (enabled in config)
--count N1Packages to generate per IP type
--output-dir DIR.Output directory
--number APPNUMrandomFull application number override. Only valid with --count 1 and a single --ip-type; the script stops with an error otherwise.
--seq-listingoffAdd a sequence listing to patent packages
--seq-listing-format FMTST26ST26 (XML) or ST25 (plain text, pre-July-2022 filings only)

Sequence listings: ST.26 and ST.25

ST.92 paragraph 18 allows a sequence listing in ST.26, ST.25 or ST.23 format “as originally submitted by the applicant”. Footnote 2 ties the choice to the filing date:

All patent applications filed on or after July 1, 2022 disclosing amino acid and nucleotide sequences must contain an ST.26 XML compliant sequence listing. Any sequence listing furnished in respect of any applications filed before that date should still comply with the applicable WIPO Standards.

The generator defaults to ST.26 and produces ST.25 only for earlier filings:

FormatOptionFileDocumentFileFormatCategoryAllowed filing dates
ST.26--seq-listing-format ST26 (default)*_SequenceListing_ST26.xmlXMLany
ST.25--seq-listing-format ST25*_SequenceListing_ST25.txtTEXTbefore 2022-07-01

Requesting ST.25 with a filing_year of 2022 or later is refused. For earlier years the generated filing dates are capped at 2022-06-30, so every ST.25 sample is one an Office could really have filed.

Generated ZIP structure

Patent_{office}_{app-number}_{YYYYMMDD}.zip
├── PriorityDocumentIndex.xml
├── MandatoryArtifacts/
│   ├── *_PriorityDocument.pdf
│   ├── *_CertificatePage.pdf
│   └── *_SequenceListing_ST26.xml   ← only with --seq-listing
└── SupplementaryArtifacts/
    ├── *_BibliographicData.xml
    ├── *_ClassificationData.xml
    └── *_Description/
        ├── *_Description.pdf
        └── *_IntermediateDocuments.pdf
Design_{office}_{app-number}_{YYYYMMDD}.zip
├── PriorityDocumentIndex.xml
├── MandatoryArtifacts/
│   ├── *_PriorityDocument.pdf
│   ├── *_CertificationPage.pdf
│   └── *.stl               ← 3D representation (ASCII STL)
└── SupplementaryArtifacts/
    ├── *_RegistrationCertificate.pdf
    ├── *-001.png           ← 2D view 1
    ├── *-002.png           ← 2D view 2
    ├── *-003.png           ← 2D view 3
    ├── *_BibliographicData.xml
    ├── *_ClassificationData.xml
    └── *_IntermediateDocuments.pdf
Trademark_{office}_{app-number}_{YYYYMMDD}.zip
├── PriorityDocumentIndex.xml
├── MandatoryArtifacts/
│   ├── *_PriorityDocument.pdf
│   ├── *_CertificatePage.pdf
│   └── *.wav               ← sound representation (silent WAV)
└── SupplementaryArtifacts/
    ├── *.png               ← mark image
    ├── *_BibliographicData.xml
    ├── *_ClassificationData.xml
    └── *_IntermediateDocuments.pdf

Supplementary artifacts are real ST.96 V9.0 documents

The bibliographic and classification files are generated per IP right type and validate against the published ST.96 V9.0 schemas:

IP typeBibliographic dataClassification
Patentpat:BibliographicDatapat:PatentClassificationBag (IPC)
Industrial designdgn:DesignApplicationcom:DesignClassificationBag (Locarno)
Trademarktmk:TrademarkApplicationtmk:GoodsServicesBag (Nice)

Earlier versions emitted com:PatentBibliographicData for every type, including designs and trademarks. That element does not exist in the ST.96 Common namespace, so those files could not be validated against ST.96 at all.

Example output

>>>> python3 generate_pddp_ib.py --ip-type patent --count 2 --seq-listing --output-dir ./output
[1] Patent_IB_PCT-IB2026-313920_20260121.zip  (patent, PCT/IB2026/313920, filed 2026-01-21, 7,749 bytes +ST26)
[2] Patent_IB_PCT-IB2026-577295_20260715.zip  (patent, PCT/IB2026/577295, filed 2026-07-15, 7,751 bytes +ST26)

Done. 2 package(s) written to './output'.




Requirements

Python 3.10+ — no external dependencies.

Change log

DateChanges
08.10.2026
  • Sequence listings can again be generated in ST.25 (plain text) via --seq-listing-format ST25, for applications filed before 1 July 2022. ST.26 remains the default and the only valid choice for later filings.
  • ST.25 output follows ST.25 Annex C: numeric identifiers <110>–<400>, nucleotides in lower case in blocks of 10 with 60 per line, amino acids as three-letter codes.
07.10.2026
  • Corrected the PCT example in pddp_config.json. The segment after PCT/ in a PCT application number is the receiving Office ST.3 code, so it is PCT/IB{year}/\d{6}, not PCT/WO{year}/.... The example was renamed from WO_patent to PCT_patent to avoid the confusion.
  • Note that WO and IB are both valid ST.3 codes for com:IPOfficeCode; PCT is not an ST.3 code and is rejected by the schema.
02.10.2026
  • Bibliographic and classification data are now real ST.96 V9.0 documents, generated per IP right type (see the panel above). Designs get Locarno, trademarks get Nice.
  • Priority document PDFs are paginated, so com:PageTotalQuantity matches the real page count (3 pages for patents and trademarks, 5 for designs).
  • PDF text is ASCII-only. Em dashes were previously written as UTF-8 into a Helvetica content stream with no /Encoding and rendered as â€â“.
  • The patent Description document declared PDF while its com:FileNameBag also held an XML file; both members are now PDFs.
  • --number is rejected with a clear message when it cannot be applied, instead of being silently ignored.
  • DocumentLocationURI now uses the folder form consistently, and DocumentAsFiledIndicator reflects whether the applicant filed the document or the office produced it.
  • ST.26 sequence listings use ASCII hyphens, staying inside the Annex IV Basic Latin subset.
29.09.2026
  • Sequence listings are now ST.26 (XML) only; ST.25 generation and --seq-listing-format removed.
  • Fixed ST.26 output: removed INSDSeq_organism, which is not allowed by the ST.26 DTD (organism is given as a source feature qualifier).
  • Package now contains only the generator files. New validator: 4.1.- Validating PDDP packages
20.03.2026Initial version.
  • No labels