Getting error on Updating Invoice

Hi im creating and Invoice with api and returning ID: 6066473

but when i check IS dashboard the Invoice URL is
https://123.infusionsoft.com/Job/manageJob.jsp?view=edit&ID=6066477 the ID in URL is 6066477 why this is so, i want to update the invoice after creating it but so im trying to use:

$infusionsoft->data()->update('Job', $invoiceId, $invoiceUpdate);

but getting error:

Fatal error: Uncaught fXmlRpc\Exception\FaultException: [DatabaseError]Error updating: Couldn’t find the record with primary key 6066473 in Job in…

Hi @pagedesigner, each order (Job in XML-RPC) that is placed will have two records created, the order and an invoice. Typically these Ids will match but that is not always the case. If you created an invoice and received 6066473 as the Id, you would update it via the API with something like this.

$infusionsoft->data()->update('Invoice', 6066473, $invoiceUpdate);
2 Likes