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.
Get the files here: 4.-ST.92.zip (version of 20.03.2026)
Contents of the package:
├── generate_pddp_ib.py # Generator script ├── pddp_config.json # Configuration file (office, year, number patterns) ├── samples/ # Reference ZIP packages │ ├── Patent_FR_FR2420100_20250101.zip │ ├── Design_FR_01519876_20250101.zip │ └── Trademark_FR_018975509_20250101.zip └── ST92_XSD/ # Schema definitions ├── PriorityDocumentIndex_V2_0.xsd ├── ST92PDDPIndex_V1_1.xsd ├── ST96_Common_V9_0.xsd ├── ST96_Design_V9_0.xsd ├── ST96_Trademark_V9_0.xsd └── ...
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}" }
}
```
| Field | Description |
|---|---|
| office_code | WIPO ST.3 office code (e.g. `IB`, `FR`, `EP`, `US`) |
| filing_year | Year used for random filing dates (Jan 1 → today) |
| *.enabled | Whether this IP type is generated by default |
| *.number_regex | Pattern for generating application numbers (see below) |
Number regex syntax
| Token | Meaning |
|---|---|
| `\d{N}` or `[0-9]{N}` | N random decimal digits |
| `{year}` | Replaced by `filing_year` before digit substitution |
| Any other character | Kept as-is (literal) |
Examples for common offices:
1.- Priority number format in use by IP Office - DAS Wiki - WIPO Wiki
| Office | IP type | `number_regex` | Example output |
|---|---|---|---|
| `IB` | Patent | `PCT/IB{year}/\d{6}` | `PCT/IB2026/050123` |
| `FR` | Patent | `FR\d{7}` | `FR2420100` |
| `FR` | Design | `\d{8}` | `01519876` |
| `FR` | Trademark | `\d{9}` | `018975602` |
| `EP` | Patent | `EP\d{8}` | `EP23123456` |
| `EP` | Patent | `EP\d{8}` | `EP23123456` |
| `US` | Patent | `US\d{7}` | `US1234567` |
All options
| Option | Default | Description |
|---|---|---|
| `--config FILE` | `pddp_config.json` | JSON configuration file |
| `--ip-type TYPE` | `all` | `patent`, `design`, `trademark`, or `all` (enabled in config) |
| `--count N` | `1` | Packages to generate per IP type |
| `--output-dir DIR` | `.` | Output directory |
| `--number APPNUM` | random | Full application number override (single package only) |
| `--seq-listing` | off | Add ST.25 sequence listing to patent packages |
Generated ZIP structure
Patent_{office}_{app-number}_{YYYYMMDD}.zip
├── PriorityDocumentIndex.xml
├── MandatoryArtifacts/
│ ├── *_PriorityDocument.pdf
│ ├── *_CertificatePage.pdf
│ └── *_SequenceListing_ST25.txt ← only with --seq-listing
└── SupplementaryArtifacts/
├── *_BibliographicData.xml
└── *_Description/
├── *_IntermediateDocuments.pdf
└── *_ClassificationData.xml
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
├── *_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
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 ST.25 sequence listing in patent packages python3 generate_pddp_ib.py --ip-type patent --count 2 --seq-listing
Example output
>>>>python3 generate_pddp_ib.py --count 3 --output-dir ./output [1] Patent_IB_PCT-IB2026-330734_20260220.zip (patent, PCT/IB2026/330734, filed 2026-02-20, 5,989 bytes) [2] Patent_IB_PCT-IB2026-790994_20260109.zip (patent, PCT/IB2026/790994, filed 2026-01-09, 5,991 bytes) [3] Patent_IB_PCT-IB2026-731153_20260117.zip (patent, PCT/IB2026/731153, filed 2026-01-17, 5,988 bytes) Done. 3 package(s) written to './output'.
Requirements

