Updating Status property in Invoice using PUT

This thread is now closed to new comments.
Some of the links and information provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
bryniker
3 Posts
User

3Posts

1Kudos

0Solutions

Solved: Go to Solution

Updating Status property in Invoice using PUT

I am trying to create a credit note against an existing invoice. My first attempt against the  CreditRefund endpoint returned an  InvoiceNotInCredit error.

It seems the invoice Status must be "Credit" for me to create an associated credit note.

But I seem unable to update said Status (using the /Sale/Invoice/Item/ endpoint, request method PUT).

I can update the invoice Amount, the Comment field, etc, but the status will not change. In all cases the API appears to return nothing. HTTP response code 200.

My steps are:

- Retrieve the current myob invoice using the GUID
- Take the resulting invoice array, set the Status property to "Credit"
- "PUT" the invoice as json data to the /Sale/Invoice/Item endpoint

Nothing is returned. I appear to be able to update everything other field I've tried using these steps, but not the Status. Which is the only one I need to update :-)

Am I missing something - any ideas? is it possible to change an invoice status through the API?

cheers.

2 REPLIES 2
Triboss
Valued Partner
99 Posts
Valued Partner
Valued Partner

99Posts

6Kudos

15Solutions

Accepted Solution Solved

Re: Updating Status property in Invoice using PUT

See link here:

https://developer.myob.com/api/accountright/v2/sale/invoice/invoice_item/

 

Status is marked as a Read Only field.

bryniker
3 Posts
User

3Posts

1Kudos

0Solutions

Re: Updating Status property in Invoice using PUT

thanks for that. Pretty obvious now you mention it :-)

So back to the problem of how to issue a credit note through the api - with an invoice not in credit status - is it necessary to first manually change the status through the accountRight application itself?

Didn't find your answer here?

Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post