Forum Discussion

bhatnajam's avatar
bhatnajam
Member
1 month ago

Time Billing invoices

Hello MYOB Team,

 

We are integrating with the AccountRight API and have a question regarding Time Billing invoices.

 

We enabled the company preference:

 

“I Include Items on Time Billing Invoices”

 

and from the MYOB UI we are successfully able to create a Time Billing invoice containing both:

 

1. Activity line

2. Item line

 

However, when we try to create the same invoice through:

 

`POST /Sale/Invoice/TimeBilling`

 

with mixed Activity + Item lines, we receive:

 

`OrderQuote_MixedLayoutLineTypes`

 

Our question is:

 

Does the AccountRight API officially support creating Time Billing invoices containing both Activity and Item lines when the “I Include Items on Time Billing Invoices” preference is enabled?

 

If supported:

 

1. Is there a required payload format for mixed lines?

2. Are there restrictions on Hours / Units fields?

3. Is this supported only via UI and read APIs, or also via POST create APIs?

 

Thank you.

 

3 Replies

  • Mike_James's avatar
    Mike_James
    Ultimate Cover User
    1 month ago

    Hi bhatnajam​ , you need to ask the apisupport team this question.

    https://apisupport.myob.com/hc/en-us/requests/new

  • The_Doc's avatar
    The_Doc
    Ultimate Cover User
    28 days ago

    Hi bhatnajam​  - I think you might be waiting awhile - I am still waiting a direct question to API support - and have even had the MYOB survey ask me how MYOB faired in answering my last question.

    hmm - notwithstanding - often API support thought helpful when they reply often don't exactly know what their endpoints do exactly.

     

    I know timebilling has had a bug in formatting an invoice with an inventory item included - it reverted to item invoice - and the only way around it was to always put the 1st line of the invoice as an inventory item - then it behaved.

     

    My point is - I have written code to post most invoice types - but I can't give you an answer directly on your question - however, what I found in writing endpoint code is trial and error gets you up the mount a lot faster than asking API support.

     

    Write a simple timebilling invoice post - 1 line and get it accepted.

     

    Then try a simple time billing with an inventory item - if it isn't going to work it will tell you - however, the API error codes are not always helpful.

     

    The Doc