Creating a Document URL - (Create document URL)
When should this function be used?
Businesses that want to allow their customers to view the documents associated with them in their interface can use this function.
This function allows customers to access the documents associated with them when they enter their customer card in the external interface.
Using this function, the documents can be displayed directly in the customer card, allowing customers to access them easily by clicking a dedicated link.
In addition, this function may also be useful when the business itself wants to access and view the documents associated with a customer.
Below is a link to the JSON function.
https://secure.cardcom.solutions/api/v11/Documents/CreateDocumentUrl
The following are the parameters that must be passed to the Create document URL function.
Legend:
Red parameter - required
Bold parameter - recommended
Parameter that is neither red nor bold - optional
| No. | Parameter | Example values | Description |
| 1 | ApiName | "test2025" | Interface username. This parameter must be obtained from the business. |
| 2 | ApiPassword | "kzFKfohEvL6AOF8aMEJz" | API password, used for credit and transaction cancellation. |
| 3 | DocumentType |
"TaxInvoiceAndReceipt" – Tax Invoice and Receipt "TaxInvoiceAndReceiptRefund" – Tax Invoice and Receipt Refund "Receipt" – Nonprofit receipt "ReceiptRefund" – Nonprofit receipt refund "Quote" – Quote "Order" – Order "OrderConfirmation" – Order Confirmation - from the website "OrderConfirmationRefund" – Order Confirmation Refund - from the website "DeliveryNote" – Delivery Note "DeliveryNoteRefund" – Return Note "ProformaInvoice" – Transaction Invoice "DemandForPayment" – Payment Demand "DemandForPaymentRefund" – Payment Demand Cancellation "ProformaDealInvoice" – Proforma Deal Receipt "ProformaDealInvoiceRefund" – Proforma Deal Receipt Refund "TaxInvoice" – Tax Invoice "ProformaInvoiceRefund" – Transaction Invoice Refund "TaxInvoiceRefund" – Tax Invoice Refund "ReceiptForTaxInvoice" – Receipt for a Tax Invoice "DonationReceipt" – Donation Receipt "DonationReceiptRefund" – Donation Receipt Refund "ReceiptForTaxInvoiceRefund" – Customer refund (Receipt Refund) |
Document type for the document number. |
| 4 | DocumentNumber | 5176 | Document number. |
Response from Create document URL.
| No. | Parameter | Example values | Description |
| 1 | ResponseCode | 0 | Response code. If it equals zero, the function was executed successfully. Any other response indicates that the operation was unsuccessful. |
| 2 | Description | "OK" | Response description. "OK" indicates success. |
| 3 | DocUrl | " https://tinyurl.com/2bsyebdh " | The document link. |
Below is sample code for the function, together with the response.
Example of a call to create the link to the document:
Example of the response received: