Forum Discussion

abhinavrazz's avatar
3 years ago

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

Replies have been turned off for this discussion
  • Any update on this?
    I'm still facing issue during export item "/Inventory/Item" API 

  • 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?returnBody=true

    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's avatar
    JeremyF
    Trusted User
    3 years ago

    Hi abhinavrazz,

     

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

     

    Cheers

     

    JF

  • Mike_James's avatar
    Mike_James
    Ultimate Cover User
    3 years ago

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

     

    AccountRight does not accept user-created UIDs.

  • Mike_James's avatar
    Mike_James
    Ultimate Cover User
    3 years ago

    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?