You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

This page covers the third hop: what an OSF actually sees when it uses the REST API in pull mode — i.e. submitting a request and then calling GET endpoints to check its status. This is the model used by our Postman collections (c.- WIPO DAS REST API V2 Validation Test, c.- WIPO DAS REST API V2 Registration process Hosted OFF).

There are two unrelated situations here, with two different response shapes. Don't confuse them.


A. Synchronous validation errors (the request itself was rejected)

This happens immediately, on the call that submits the request (e.g. POST /requests/registrations, POST /requests/retrievals, POST /requests/files/url-uploads) when the input is malformed, mismatched, or unauthorized. It returns a 4xx HTTP status with this body shape:

{
  "code": "INVALID_INPUT_DATA",
  "message": "Invalid input data or document",
  "details": [
    { "code": -4, "message": "Mismatched access code: dasAccessCode: expected dasAccessCode=AB46" }
  ]
}

code is one of the 6 top-level DASSystemCodes (SUCCESS, INVALID_INPUT_DATA, OPERATION_FORBIDDEN, DAS_SYSTEM_ERROR, OPERATION_IN_PROGRESS, INVALID_TOKEN). details[].message is built by a single shared formatter (gererateErrorDetail in app/utils.ts):

<ErrorMessage text>[: <attributeName>[=<attributeValue>]][: expected <attributeName>=<expectedValue>]

This section is about OSF input validation, unrelated to the OFF's protocol (TDA/PDX vs REST) — it does not change when an OFF migrates.

Common message templates

SituationDASErrorMessagesResulting message (example)
Priority date doesn't match the registered oneMISMATCHED_PRIORITY_FILING_DATE"Mismatched priority filing date: documentDate: expected documentDate=2022-10-01"
Access code doesn't matchMISMATCHED_ACCESS_CODE"Mismatched access code: dasAccessCode: expected dasAccessCode=AB46"
Both date and access code wrongMISMATCHED_ACCESS_CODE_AND_PRIORITY_FILING_DATE"Mismatched access code and priority filing date: dasAccessCode, documentDate: expected dasAccessCode=AB46, documentDate=2022-10-01"
documentKindCategory wrong (alone or combined)MISMATCHED_DOCUMENT_KIND_CATEGORY (+ combos)"Mismatched document kind category: documentKindCategory=design: expected documentKindCategory=patent"
Priority date missingMISSING_PRIORITY_FILING_DATE"Missing priority filing date: documentDate"
Access code missingMISSING_ACCESS_CODE"Missing access code: dasAccessCode"
Access code fails format/checksum checkINVALID_ACCESS_CODE"Invalid access code: dasAccessCode: expected dasAccessCode=AB46"
documentDate not a valid dateINVALID_PRIORITY_FILING_DATE"Invalid priority filing date: documentDate: expected documentDate=2022-10-01"
Document not registeredDOCUMENT_NOT_FOUND"The requested document is not registered in the system: documentNumber=US64/282,001, documentKindCategory=patent"
Other field mismatch (generic)MISMATCHED_INPUT_VALUE"Mismatched input value: documentKindCategory: expected documentKindCategory=patent"
Invalid file format on uploadINVALID_DOCUMENT_FILE_FORMAT"Invalid document file format: fileFormatCategory=jpg: expected fileFormatCategory=pdf,zip"
Required field missing on uploadMISSING_REQUIRED_FIELD"Missing required field: fileChecksum"

The illustrative comments in the OpenAPI yaml ("...received fileFormatCategory=jpg -> expected fileFormatCategory=[pdf, zip]") are paraphrased, not literal strings — the real formatter always produces the colon/"expected" pattern above.

⚠️ Security redaction: the "expected" value can be hidden

In das-validation-rules.ts:

return isDasSupportUser(authInfo) || !isAccessCodeValid
    ? dasErrors
    : filterErrorsForExpectedValue(dasErrors);
dasAccessCode in the request was wrong and the caller's token does not carry the das-api/support scope (true for essentially every normal OFF/OSF client), the expectedValue is stripped from every error in that response — not just the access-code one. Practical effect: - Wrong access code alone → "Mismatched access code: dasAccessCode" (no correct value leaked, by design). - Wrong access code and wrong filing date together → the filing date's expected value is also hidden, even though it isn't sensitive by itself. - Wrong filing date alone (access code correct) → the expected value is shown.


B. Asynchronous status polling (the request was accepted; you're checking what happened to it)

This covers GET .../requests/retrievals/statuses, GET .../requests/registrations (record), and the bulk recordedDocumentRequestBag list. These return HTTP 200 even when the underlying operation failed — the failure is only visible in the body.

// retrieve-request-status.ts  (single retrieval status check)
requestStatusCategory: string;
requestStatusMessage?: string;
error?: string;
// NOTE: there is no errorCode field in this type

// reterive-registration-record.ts (registration record)
requestStatusCategory: string;
// NOTE: no errorCode field here either

// retrieve-collection-recorded-request.ts (bulk list)
requestStatusCategory: string;
// NOTE: no errorCode field here either

There is no numeric errorCode field anywhere in the polling responses. The only channel that carries one is the push notification webhook (see 5.1.2). What you do get is a free-text requestStatusMessage, sourced from das-status.ts.

Literal requestStatusCategory / requestStatusMessage values you may see (retrieval)

requestStatusCategory (SERVICE_STATUS)requestStatusMessage (UI_MESSAGE, when set)
success—
error—
pendingpending
delivered—
file retrieval - ready for downloadFile is ready for download
awaiting off response—
document awaiting security clearance—
document number not available—
document incomplete—
unmatched document date—
unmatched access code—
unmatched document date and access code—
invalid document details—

Literal values you may see (registration)

requestStatusCategory (SERVICE_STATUS)requestStatusMessage (UI_MESSAGE, when set)
document registereddocument registered successfully
document not registereddocument not registered
registration - recordedregistration - recorded
successfulsuccessful
successsuccess
pending—
registration - withdrawnregistration - withdrawn

Where the message text comes from today, for a hosted OFF on TDA/PDX

If the failure originated from a hosted OFF answering over TDA/PDX → requestStatusMessage is overwritten with the EDI-translated text documented on 5.1.2 (e.g. "ACCESS NOT AUTHORIZED" for TDA code 5), because OSF_LAST_MESSAGE is set to that EDI string regardless of which channel (push or pull) ends up reading it.

If the failure was raised by DAS's own validator instead (e.g. an OSF polls a retrieval it submitted with a mismatched access code, unrelated to any OFF) → you'll see the literal strings in the tables above directly (e.g. unmatched access code).

So the same underlying TDA failure can appear as "ACCESS NOT AUTHORIZED" to a polling OSF, and as errorCode: -6, statusMessage: "ACCESS NOT AUTHORIZED" to a webhook-registered OSF — same text, but only the webhook gets the numeric code.

🆕 What changes once this OFF migrates from TDA/PDX to REST

Just like on the notification channel (5.1.2), OSF_LAST_MESSAGE (which becomes requestStatusMessage here) is only EDI-translated when event.respondingProtocol == 'tda'. Once the OFF answers over the draft REST interface instead (5.1.1), the raw statusMessage the OFF sent is stored and returned as-is — no EDI translation step runs at all.

Today (OFF on TDA/PDX)After migration (OFF on REST, per the draft)
requestStatusMessage sourceEDI-translated text from the fixed lookup table on 5.1.2 (ALL-CAPS legacy phrases)Whatever free text the OFF's REST endpoint sent — expected to already match the literal das-status.ts strings in the tables above
Practical effectrequestStatusMessage looks different from the strings DAS uses for its own native validation failures (e.g. "ACCESS NOT AUTHORIZED" vs. "unmatched access code")requestStatusMessage should look the same style as DAS's own native strings once the OFF reuses the same vocabulary — e.g. "document awaiting security clearance" instead of "ACCESS NOT AUTHORIZED" for the TDA-5 equivalent case
Consistency guaranteeStrong — fixed EDI lookup table⚠️ Weak — nothing validates what the OFF actually sends; see 5.1.1 for the gaps in the draft's vocabulary (e.g. TDA 2 and TDA 5 both map to the same REST phrase)

Worked example — same underlying failure (TDA code 5 equivalent), polled via GET: - Today: {"requestStatusCategory": "error", "requestStatusMessage": "ACCESS NOT AUTHORIZED"} - After migration: {"requestStatusCategory": "error", "requestStatusMessage": "document awaiting security clearance"} (assuming the OFF implements the draft vocabulary as documented on 5.1.1)

Quick reference: which page documents which field

Field you seeWhere it's documented
code, details[].code, details[].message (HTTP 4xx on submission)This page, section A
requestStatusCategory, requestStatusMessage (HTTP 200 on poll)This page, section B
errorCode, statusMessage (push notification body)5.1.2.- Responses from DAS to OSF via notification endpoint
Legacy TDA/PDX numeric code, and its REST migration mapping (OFF→DAS only, never seen by the OSF directly)5.1.1.- Responses from OFF to DAS (TDA/PDX codes)
  • No labels