how to delete a supplierpayment via the api

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.
neilrogers1
2 Posts
User

2Posts

0Kudos

0Solutions

how to delete a supplierpayment via the api

Hi

I am trying to delete a SupplierPayment via the API.

I am using ?$filter=UID eq guid'f9116384-6192-49c6-bda9-xxxxxxxxx' to get the payment and the record exists.

I then issue a DELETE verb using the same filter and I get a status response 404 record not found the url is 
/Purchase/SupplierPayment?returnBody=true&$filter=UID%20eq%20guid%27xxxxxxxx-xxxxxxxx%27

2 REPLIES 2
Will_H
MYOB Moderator
2,590 Posts
MYOB Moderator
New Zealand
MYOB Moderator

2,590Posts

1,062Kudos

291Solutions

Re: how to delete a supplierpayment via the api

Hi @neilrogers1 ,

 

Forgive me if I get this wrong and someone has to correct me.  While I work for MYOB I'm from a different area of the business.

 

If you look at the API documentation for the endpoint:

https://developer.myob.com/api/myob-business-api/v2/purchase/supplierpayment/

 

You can retrieve a Payment using the formula you suggest, however part of the response is the "URI" for the individual payment.

 

In your case this would look like:

/Purchase/SupplierPayment/f9116384-6192-49c6-bda9-xxxxxxxxx

 

You would then need to send the DELETE request directly to that URI endpoint.  

 

There's also a full Postman collection with examples for the AccountRight API you can find here:

https://accountrightapi.myob.cloud/#fb7216b7-0c12-481a-bdd0-9764f4be3f55

 

 

Note: You can't really say "Hey, retrieve me the body" in a DELETE command, so that's likely part of why the call is failing.

 

Hope this helped, if it didn't, please reply asking for extra information and I'll leave it up to the regular API support team/other developers to get back to you.

Cheers,
Will

MYOB Enterprise Services Product Platform Liaison

Exo Education Centre| Forum Search

neilrogers1
2 Posts
User

2Posts

0Kudos

0Solutions

Re: how to delete a supplierpayment via the api

thanks very much that works

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