A request should not contain UID during POST operation

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.
abhinavrazz
4 Posts
User

4Posts

0Kudos

0Solutions

A request should not contain UID during POST operation

I'm Gating "

A request should not contain UID during POST operation"  error during creating or updating inventory throught API please Suggest  
7 REPLIES 7
abhinavrazz
4 Posts
User

4Posts

0Kudos

0Solutions

Re: A request should not contain UID during POST operation

Any update on this?
I'm still facing issue during export item "/Inventory/Item" API 

Mike_James
Ultimate Partner
5,839 Posts
Ultimate Partner
New Zealand
Ultimate Partner

5,839Posts

1,080Kudos

755Solutions

Re: A request should not contain UID during POST operation

Hi @abhinavrazz , please see https://apisupport.myob.com/hc/en-us/articles/5319928281871-Changes-to-POST-requests

 

POST operations (eg a new customer) that contain a (customer) UID will now be rejected with the error you noted. This requires a change in your process, or the 3rd party app you are using to post to AccountRight. 


Regards, Mike (mike@datawise.co.nz)
DataWise Limited (www.datawise.co.nz), developers of:
DataWise ProActive - Custom Reporting from MYOB programs
(MYOB Business, including AccountRight Live, AccountRight v19.x and exo Payroll)

Bulk download of attachments (more details...)

abhinavrazz
4 Posts
User

4Posts

0Kudos

0Solutions

Re: A request should not contain UID during POST operation

Hi @Mike_James 

I have checked it in my code but i got status 404 from MYOB

Request URL : https://arl2.api.myob.com/accountright/53f60d69-ae83-4722-99a8-bdfc30d65040/Inventory/Item?returnBod...

Request Data : {"UID":"a524e5f4-2620-418f-9c59-2fbb984063bb","RowVersion":"-4217799171916169216","Number":"QBB0001","Name":"Apple strudel each","IsActive":true,"Description":"Apple strudel each1","UseDescription":true,"AverageCost":"14.00","BaseSellingPrice":"14.00","IsBought":true,"IsSold":true,"IsInventoried":false,"ExpenseAccount":{"UID":"2a466bf3-d587-4bda-a695-95bc85958cfb"},"BuyingDetails":{"TaxCode":{"UID":"804e6d8b-aef8-49c0-98bf-bf492dc17cd1"}},"IncomeAccount":{"UID":"d8954628-2c1e-46ce-a824-c93d69b1255f"},"SellingDetails":{"BaseSellingPrice":"29.40","TaxCode":{"UID":"804e6d8b-aef8-49c0-98bf-bf492dc17cd1"},"IsTaxInclusive":false}}

I'm sending it on URL with these data on PUT methord  than i got status 404 please suggest 

JeremyF
Experienced User
33 Posts
Experienced User
Experienced User

33Posts

4Kudos

3Solutions

Re: A request should not contain UID during POST operation

Hi abhinavrazz,

 

You need to pass the UID in the URL when you make a PUT call. 

 

Cheers

 

JF

Mike_James
Ultimate Partner
5,839 Posts
Ultimate Partner
New Zealand
Ultimate Partner

5,839Posts

1,080Kudos

755Solutions

Re: A request should not contain UID during POST operation

Hi @abhinavrazz , is the UID you are quoting coming from AccountRIght, or is it user-created? 

 

AccountRight does not accept user-created UIDs.


Regards, Mike (mike@datawise.co.nz)
DataWise Limited (www.datawise.co.nz), developers of:
DataWise ProActive - Custom Reporting from MYOB programs
(MYOB Business, including AccountRight Live, AccountRight v19.x and exo Payroll)

Bulk download of attachments (more details...)

abhinavrazz
4 Posts
User

4Posts

0Kudos

0Solutions

Re: A request should not contain UID during POST operation

Hi @Mike_James 

Yes the UID comming from AccountRIght. 


Mike_James
Ultimate Partner
5,839 Posts
Ultimate Partner
New Zealand
Ultimate Partner

5,839Posts

1,080Kudos

755Solutions

Re: A request should not contain UID during POST operation

Well it's a mystery,  the API seems to be treating your call as a Post, and yet you say you defined it as a Put. How did you do that?


Regards, Mike (mike@datawise.co.nz)
DataWise Limited (www.datawise.co.nz), developers of:
DataWise ProActive - Custom Reporting from MYOB programs
(MYOB Business, including AccountRight Live, AccountRight v19.x and exo Payroll)

Bulk download of attachments (more details...)

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