Endpoint to create document access requests - error:Invalid Document Type

Using the API programatically I receive the error:

Invalid Document Type

Using the site:

https://bcregistry-demo.apigee.io/docs/regsearchproxy/1/routes/businesses/{identifier}/requests/post

I receive the error:

An unknown error occurred while making the request. Please verify your connection and try again. If you continue to experience issues please contact support

It appears the documentation of the API page is not correct when referencing the URL to use.

This does not work programmatically:

https://bcregistry-sandbox.apigee.net/registry-search/api/v1/businesses/{identifier}/requests

This does:

https://bcregistry-sandbox.apigee.net/registry-search/api/v1/businesses/{identifier}/documents/requests

The documentation is missing the ‘documents’ part in the url.

I am seeing the URL documentation mismatch and the call returning different errors depending on the way I try to make the request through the website or programatically.

URL used:

https://bcregistry-sandbox.apigee.net/registry-search/api/v1/businesses/FM0601236/documents/requests

I used this is the JSON request:
{
“documentAccessRequest”: {
“documents”: [
{
“documentType”: “BUSINESS_SUMMARY_FILING_HISTORY”
}
]
}
}

Error:

{“errorMessage”=>“API backend third party service error.”, “rootCause”=>"message:[error:Invalid Document Type] "}

Through the webpage I get this:

I can search through the webpage so I know that much does work and that I am authorized to do that much.

1 Like

Hello. Thank you for this message. I will raise this concern about the API documentation. In the meantime, can you please run all examples using the postman collection we provided?

Please reply if you don’t have a copy of the collection and I can send that to you right away.

Please send me a copy of the collection.

I continue to get this error:

message:[error:Invalid Document Type]

All these types were attempted:
BUSINESS_SUMMARY_FILING_HISTORY, CERTIFICATE_OF_GOOD_STANDING, CERTIFICATE_OF_STATUS, LETTER_UNDER_SEAL

Return:

message:[error:Invalid Document Type]

Good morning.

I am working with the team to get our documentation updated. One small change within this call
POST {{base_url}}/{{version}}/businesses/{{identifier}}/documents/requests
is that child of “documents” in the body is called “type” instead of “documentType”

{

"documentAccessRequest":{
    "documents": [
        {
            "type": "BUSINESS_SUMMARY_FILING_HISTORY"
        }
    ]
}

}

Note that the business and search index are being syncronized because they didn’t match. You may encounter this error if you request a PDF for one of the businesses that is out of sync:

{
“errorMessage”: “API backend third party service error.”,
“rootCause”: "message:Business not found. "
}