Forum Discussion

The_Doc's avatar
The_Doc
Ultimate Cover User
2 months ago
Solved

Send an invoice from MYOB from API Posted Invoice

Hi Folks

 

Is it possible via the API to POST a new invoice - but have MYOB then send it to the client?

 

Reason - we are automating the process of web integration where an order from the web causes, amongst other things a Sales Order to be posted to MYOB for a client.

 

My integrator does all the donkey work - however, now via Oodoo CRM when an order is completed we need the Order converted to an Invoice and sent to the client.

The Order has to be deleted and the Order converted to an Invoice is then posted back as an invoice - but I would like MYOB to send out the invoice so it has a record of having done so.

Possible or am I going to have to do it from my program.?

 

The Doc

 

  • Hi Folks

     

    The answer appears to be 'yes' - there is a specific endpoint for email sending from the api - it has been there since 2019 - fiddly no less - you need the UID of the invoice - so if you first POST a Sales Order - and that needs converting to a Sales Invoice - you have to DELETE this via the API - which is easy and works well - you then have to reconstruct the Order into an Invoice - (by checking the Order hasn't changed) - if it has you need the changed info from the order to then POST the new invoice - then you need to get the UID for that Invoice ( which will be different from the order) to then send the email POST to the email endpoint - easy eh !!! Right!

     

    The Doc

1 Reply

  • The_Doc's avatar
    The_Doc
    Ultimate Cover User
    2 months ago

    Hi Folks

     

    The answer appears to be 'yes' - there is a specific endpoint for email sending from the api - it has been there since 2019 - fiddly no less - you need the UID of the invoice - so if you first POST a Sales Order - and that needs converting to a Sales Invoice - you have to DELETE this via the API - which is easy and works well - you then have to reconstruct the Order into an Invoice - (by checking the Order hasn't changed) - if it has you need the changed info from the order to then POST the new invoice - then you need to get the UID for that Invoice ( which will be different from the order) to then send the email POST to the email endpoint - easy eh !!! Right!

     

    The Doc