Hello all,
I’m working through some QF API end points and I have run in to an issue with the invoicing method.
I’m running the Invoice_Create method to update an invoice, by including the Invoice ID and this works just fine until I try and include a ClientAddress child record with the submission.
When I run Invoice_Create to actually create the invoice, it’s working OK as it’s pulling the address details from the Client record, rather than being individually specified (not passing the ClientAddress record here).
I’m trying to update the ‘Address’ field for the Invoice under Invoice_Create → ClientAddress.Address. I’m getting an error with the Country ISO field.
When I send:
ClientAddress {
Address: “Some address”,
CountryISO = “GB”
}
I get:
System.Net.Http.HttpClient.Default.LogicalHandler: Information: Start processing HTTP request POST https://api.quickfile.co.uk/1_2/invoice/create
23:37:15:982 System.Net.Http.HttpClient.Default.ClientHandler: Information: Sending HTTP request POST https://api.quickfile.co.uk/1_2/invoice/create
23:37:16:476 System.Net.Http.HttpClient.Default.ClientHandler: Information: Received HTTP response headers after 506.4279ms - 400
23:37:16:476 System.Net.Http.HttpClient.Default.LogicalHandler: Information: End processing HTTP request after 508.8418ms - 400
23:37:16:476 QF API Error: BadRequest
23:37:16:476 Error content: {“Errors”:{“Error”:[“52The element ‘ClientAddress’ in namespace ‘https://api.quickfile.co.uk’ has invalid child element ‘CountryISO’ in namespace ‘https://api.quickfile.co.uk’. List of possible elements expected: ‘https://api.quickfile.co.uk:Address’.”]}}
23:37:16:476 invoice_Response was null.
So when I send just:
ClientAddress {
Address: “Some address”
}
I get:
System.Net.Http.HttpClient.Default.LogicalHandler: Information: Start processing HTTP request POST https://api.quickfile.co.uk/1_2/invoice/create
System.Net.Http.HttpClient.Default.ClientHandler: Information: Sending HTTP request POST https://api.quickfile.co.uk/1_2/invoice/create
System.Net.Http.HttpClient.Default.ClientHandler: Information: Received HTTP response headers after 480.8448ms - 400
System.Net.Http.HttpClient.Default.LogicalHandler: Information: End processing HTTP request after 483.5509ms - 400
QF API Error: BadRequest
Error content: {“Errors”:{“Error”:[“53The element ‘ClientAddress’ in namespace ‘https://api.quickfile.co.uk’ has incomplete content. List of possible elements expected: ‘https://api.quickfile.co.uk:CountryISO’.”]}}
invoice_Response was null.
If I don’t send a ClientAddress object at all, the function updates just fine with all the parent properties, it’s just when I add this in.
Any help much appreciated?
Thanks - Sam.