CompanyOperations - Add a Document to a Company
When should this function be used?
Use this function when you need to add a document to a company through the supplier interface.
For example, this function can be used to add an ID card, passport, bank account confirmation, or business license/work permit to a company.
Below is a link to the function in the JSON API documentation.
https://secure.cardcom.solutions/api/v11/CompanyOperations/AddDocumentToCompany
Below are the parameters that must be passed to the function.
Legend:
Red parameter – required
Bold parameter – recommended
A parameter that is neither red nor bold is optional.
| No. |
Parameter | Example Possible Values | Description |
| 1 | DocumentsInfo – array of objects. |
DocType:
----- Name - string ---- Content - (String) |
DocType – the type of document being submitted. ---- Name – the name under which the document is submitted. --- Content – the file content. |
| 2 | SupplierUserName | (String) | Supplier username. |
| 3 | SupplierPassword | (String) | Supplier password. |
| 4 | Secret | (String) | Secret. |
| 5 | CompanyInternalID | (String) | Internal company ID. |
Add document to company RESPONSE.
| No. |
Parameter | Example Possible Values | Description |
| 1 | ResponseCode | 0 | Response code. If it equals zero, the function was completed successfully. Any other response indicates that the operation failed. |
| 2 | Description | "OK" | Response description. "OK" indicates success. |
| 3 | CompanyInternalID | "2154" | Internal company ID. |
| 4 | TerminalNumber | 1000 | The company's terminal number. |
| 5 | APIUserName | "test2025" | API username. |
| 6 | APISecret | (String) | API secret. |
| 7 | ModulesList – array of strings | "Direct Debit", "Landing Pages", "Low Profile" | List of the company's modules. |
| 8 | UpayAPIKey | (String) | UPAY API key. |
| 9 | ShowErrorToEndUser | boolean - true / false. | Whether to display an error to the end user. |
| 10 | CardComSapakNumber | (String) | CardCom supplier number, if available. |
| 11 | CompanyNumber | 21351 | The company's internal number. |
Below is sample code for the function together with the response.
Request example:
Response example: