Partner Zone
Partner Zone

Updating Status property in Invoice using PUT

2 REPLIES 2
bryniker
3 Posts
User
bryniker

3Posts

0Kudos

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?

Valued Partner Triboss
92 Posts
Valued Partner
Triboss
Valued Partner

92Posts

46Kudos

15Solutions

Accepted Solution Solved Solution

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.

Highlighted
bryniker
3 Posts
User
bryniker

3Posts

0Kudos

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.

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