SendInvoiceDocuments (Push Method)
SendInvoiceDocuments
Uploads one or more documents attached to an invoice.
Each file is passed as base64‑encoded data, and the system stores the documents against the specified invoice.
Request
| Parameter | Type | Description |
|---|---|---|
| Company | String | Required. Company identifier from GetCompanies. |
| InvoiceNumber | String | Required. Invoice number the documents will be attached to. |
| InvoiceFiles.FileName | String | Required (per file). File name including extension. |
| InvoiceFiles.FileData | String | Required (per file). Base64‑encoded file bytes. |
Response
| Parameter | Type | Description |
|---|---|---|
| ID | String | Identifier in BAP. |
| Errors | Array | Contains error message(s) should an error occur. |
Example (C#)
// setup request parameters
ParametersForInvoiceDocuments objVParams = new ParametersForInvoiceDocuments
{
Company = "ABC",
InvoiceNumber = "1000",
invoiceFiles = new List<InvoiceFile>()
{
new InvoiceFile()
{
FileName = "M Info.txt",
FileData = Convert.ToBase64String(
File.ReadAllBytes(@"C:\Inv313\Info.txt")
)
},
new InvoiceFile()
{
FileName = "index.jpg",
FileData = Convert.ToBase64String(
File.ReadAllBytes(@"C:\Inv313\index.jpg")
)
}
}
};
dynamic sendInvoiceDocsResponse = apiClient.SendInvoiceDocuments(objVParams);