OA Actions Models

models.oa_actions - Data models for USPTO Office Action Text Retrieval API.

This module provides data models for representing responses from the USPTO Office Action Text Retrieval API (v1). These models cover office action documents including full body text and structured section data.

class pyUSPTO.models.oa_actions.OAActionsFieldsResponse(api_key=None, api_version_number=None, api_url=None, api_documentation_url=None, api_status=None, field_count=0, fields=<factory>, last_data_updated_date=None)[source]

Bases: object

Response from the OA Actions API fields endpoint.

Contains metadata about the API including available field names and the last data update timestamp.

api_key

The dataset key (e.g., "oa_actions").

api_version_number

API version (e.g., "v1").

api_url

The URL of this fields endpoint.

api_documentation_url

URL to the Swagger documentation.

api_status

Publication status (e.g., "PUBLISHED").

field_count

Number of available fields.

fields

List of available field names.

last_data_updated_date

Timestamp of the last data update (non-standard format).

api_documentation_url: str | None = None
api_key: str | None = None
api_status: str | None = None
api_url: str | None = None
api_version_number: str | None = None
field_count: int = 0
fields: list[str]
classmethod from_dict(data, include_raw_data=False)[source]

Create an OAActionsFieldsResponse from a dictionary.

Parameters:
  • data (dict[str, Any]) – Dictionary containing API response data.

  • include_raw_data (bool) – Unused. Present for FromDictProtocol conformance.

Returns:

An instance of OAActionsFieldsResponse.

Return type:

OAActionsFieldsResponse

last_data_updated_date: str | None = None
to_dict()[source]

Convert the OAActionsFieldsResponse instance to a dictionary.

Returns:

Dictionary representation with camelCase keys.

Return type:

dict[str, Any]

class pyUSPTO.models.oa_actions.OAActionsRecord(id='', application_deemed_withdrawn_date=None, work_group=<factory>, filing_date=None, document_active_indicator=<factory>, legacy_document_code_identifier=<factory>, application_status_number=None, national_class=<factory>, effective_filing_date=None, body_text=<factory>, obsolete_document_identifier=<factory>, access_level_category=<factory>, application_type_category=<factory>, patent_number=<factory>, patent_application_number=<factory>, grant_date=None, submission_date=None, customer_number=None, group_art_unit_number=None, invention_title=<factory>, national_subclass=<factory>, patent_application_confirmation_number=None, last_modified_timestamp=None, examiner_employee_number=<factory>, create_date_time=None, tech_center=<factory>, invention_subject_matter_category=<factory>, source_system_name=<factory>, legacy_cms_identifier=<factory>, section=None)[source]

Bases: object

A single Office Action document record from the OA Actions API.

id

Unique document identifier (hex hash).

application_deemed_withdrawn_date

Date the application was deemed withdrawn.

work_group

Work group code(s).

filing_date

Filing date of the application.

document_active_indicator

Whether the document is active ("0" = inactive).

legacy_document_code_identifier

Document code (e.g., "CTNF", "NOA").

application_status_number

Numeric application status code.

national_class

USPC national class code(s).

effective_filing_date

Effective filing date of the application.

body_text

Full text of the office action document.

obsolete_document_identifier

Legacy IFW document identifier(s).

access_level_category

Access level (e.g., "PUBLIC").

application_type_category

Application type (e.g., "REGULAR").

patent_number

Issued patent number(s). Empty list when no patent granted.

patent_application_number

Patent application number(s).

grant_date

Date the patent was granted.

submission_date

Date the office action was submitted.

customer_number

USPTO customer number.

group_art_unit_number

Art unit number (integer).

invention_title

Title of the invention.

national_subclass

USPC national subclass code(s).

patent_application_confirmation_number

Confirmation number for the application.

last_modified_timestamp

Timestamp of the last record modification.

examiner_employee_number

Examiner employee number(s).

create_date_time

Timestamp when this record was created in the database.

tech_center

Technology center code(s).

invention_subject_matter_category

Subject matter category (e.g., "UTL").

source_system_name

Source system that produced this record.

legacy_cms_identifier

Legacy CMS identifier(s).

section

Structured section data, or None if no section fields are present.

access_level_category: list[str]
application_deemed_withdrawn_date: datetime | None = None
application_status_number: int | None = None
application_type_category: list[str]
body_text: list[str]
create_date_time: datetime | None = None
customer_number: int | None = None
document_active_indicator: list[str]
effective_filing_date: datetime | None = None
examiner_employee_number: list[str]
filing_date: datetime | None = None
classmethod from_dict(data)[source]

Create an OAActionsRecord from a dictionary.

Parameters:

data (dict[str, Any]) – Dictionary containing office action record data from API response. May include flat sections.* keys.

Returns:

An instance of OAActionsRecord.

Return type:

OAActionsRecord

grant_date: datetime | None = None
group_art_unit_number: int | None = None
id: str = ''
invention_subject_matter_category: list[str]
invention_title: list[str]
last_modified_timestamp: datetime | None = None
legacy_cms_identifier: list[str]
legacy_document_code_identifier: list[str]
national_class: list[str]
national_subclass: list[str]
obsolete_document_identifier: list[str]
patent_application_confirmation_number: int | None = None
patent_application_number: list[str]
patent_number: list[str]
section: OAActionsSection | None = None
source_system_name: list[str]
submission_date: datetime | None = None
tech_center: list[str]
to_dict()[source]

Convert the OAActionsRecord instance to a dictionary.

Returns:

Flat dictionary with camelCase keys matching the API format.

sections.* keys are included when section data is present. None values and empty lists are omitted.

Return type:

dict[str, Any]

work_group: list[str]
class pyUSPTO.models.oa_actions.OAActionsResponse(num_found=0, start=0, docs=<factory>, raw_data=None)[source]

Bases: object

Response from the OA Actions API search endpoint.

The API returns a Solr-style response with start, numFound, and docs. The outer envelope key is "response".

num_found

Total number of matching records.

start

The start index of the first result in this page.

docs

List of office action records in this page.

raw_data

Optional raw JSON data from the API response (for debugging).

property count: int

Return total result count for pagination compatibility.

docs: list[OAActionsRecord]
classmethod from_dict(data, include_raw_data=False)[source]

Create an OAActionsResponse from a dictionary.

Handles both the raw API envelope ({"response": {...}}) and a pre-unwrapped dictionary.

Parameters:
  • data (dict[str, Any]) – Dictionary containing API response data.

  • include_raw_data (bool) – If True, store the raw JSON for debugging.

Returns:

An instance of OAActionsResponse.

Return type:

OAActionsResponse

num_found: int = 0
raw_data: str | None = None
start: int = 0
to_dict()[source]

Convert the OAActionsResponse instance to a dictionary.

Returns:

Dictionary wrapped in the "response" envelope

matching the API format.

Return type:

dict[str, Any]

class pyUSPTO.models.oa_actions.OAActionsSection(section_101_rejection_text=None, grant_date=None, filing_date=None, submission_date=None, examiner_employee_number=<factory>, section_103_rejection_text=<factory>, specification_title_text=<factory>, detail_citation_text=<factory>, national_subclass=<factory>, tech_center_number=<factory>, patent_application_number=<factory>, national_class=<factory>, work_group_number=<factory>, terminal_disclaimer_status_text=<factory>, group_art_unit_number=<factory>, proceeding_appendix_text=<factory>, office_action_identifier=<factory>, withdrawal_rejection_text=<factory>, obsolete_document_identifier=<factory>, section_102_rejection_text=<factory>, legacy_document_code_identifier=<factory>, section_112_rejection_text=<factory>, summary_text=<factory>, section_101_rejection_form_paragraph_text=<factory>, section_102_rejection_form_paragraph_text=<factory>, section_103_rejection_form_paragraph_text=<factory>, section_112_rejection_form_paragraph_text=<factory>)[source]

Bases: object

Structured section data extracted from an Office Action document.

These fields are returned as flat sections.* keys alongside the top-level record fields in the API response.

section_101_rejection_text

Full text of the 35 U.S.C. § 101 rejection.

grant_date

Grant date associated with this section.

filing_date

Filing date associated with this section.

submission_date

Submission date of this section.

examiner_employee_number

Examiner employee number(s).

section_103_rejection_text

Full text of the 35 U.S.C. § 103 rejection(s).

specification_title_text

Title of the specification.

detail_citation_text

Detailed citation text.

national_subclass

National subclass code(s).

tech_center_number

Technology center number(s).

patent_application_number

Patent application number(s).

national_class

National class code(s).

work_group_number

Work group number(s).

terminal_disclaimer_status_text

Terminal disclaimer status text.

group_art_unit_number

Group art unit number(s).

proceeding_appendix_text

Proceeding appendix text.

office_action_identifier

Office action identifier(s).

withdrawal_rejection_text

Withdrawal rejection text.

obsolete_document_identifier

Legacy IFW document identifier(s).

section_102_rejection_text

Full text of the 35 U.S.C. § 102 rejection(s).

legacy_document_code_identifier

Legacy document code identifier(s).

section_112_rejection_text

Full text of the 35 U.S.C. § 112 rejection(s).

summary_text

Summary text of the office action.

section_101_rejection_form_paragraph_text

Form paragraph text for § 101 rejection.

section_102_rejection_form_paragraph_text

Form paragraph text for § 102 rejection.

section_103_rejection_form_paragraph_text

Form paragraph text for § 103 rejection.

section_112_rejection_form_paragraph_text

Form paragraph text for § 112 rejection.

detail_citation_text: list[str]
examiner_employee_number: list[str]
filing_date: datetime | None = None
classmethod from_dict(data)[source]

Create an OAActionsSection from a flat record dict containing sections.* keys.

Parameters:

data (dict[str, Any]) – The full flat record dictionary. Keys beginning with sections. are read as section fields.

Returns:

An instance of OAActionsSection.

Return type:

OAActionsSection

grant_date: datetime | None = None
group_art_unit_number: list[str]
legacy_document_code_identifier: list[str]
national_class: list[str]
national_subclass: list[str]
obsolete_document_identifier: list[str]
office_action_identifier: list[str]
patent_application_number: list[str]
proceeding_appendix_text: list[str]
section_101_rejection_form_paragraph_text: list[str]
section_101_rejection_text: str | None = None
section_102_rejection_form_paragraph_text: list[str]
section_102_rejection_text: list[str]
section_103_rejection_form_paragraph_text: list[str]
section_103_rejection_text: list[str]
section_112_rejection_form_paragraph_text: list[str]
section_112_rejection_text: list[str]
specification_title_text: list[str]
submission_date: datetime | None = None
summary_text: list[str]
tech_center_number: list[str]
terminal_disclaimer_status_text: list[str]
to_dict()[source]

Convert the OAActionsSection instance to a dictionary.

Returns:

Flat dictionary with sections.* keys matching the

API format. None values and empty lists are omitted.

Return type:

dict[str, Any]

withdrawal_rejection_text: list[str]
work_group_number: list[str]