The Comodo API can be accessed with a SOAP client. It supports enrolling new certificate requests, renewing existing certificates and collecting certificates. See the API documentation for additional details.
The InCommon API documentation is linked in the last section of this page: https://www.incommon.org/cert/repository/index.html
Basic information about the possible error codes is provided in the Comodo API documentation; but some of the error codes can have multiple causes. Additional anecdotal details are provided here as a community reference.