Retrieveing Company File AccountRight Live API

2 REPLIES
Partner Kais
4 Posts
Partner
Kais
Partner

4Posts

0Kudos

0Solutions

Re: Retrieveing Company File AccountRight Live API

Thank you. Have been using Entity Framework Smiley Happy

MYOB Staff Post DeveloperJack
86 Posts
MYOB Staff Post
Australia
DeveloperJack
MYOB Staff Post

86Posts

26Kudos

13Solutions

Accepted Solution Solved Solution

Re: Retrieveing Company File AccountRight Live API

Hi there @Kais,

You sure can - its hard to tell from your sample since the full oData filter you're providing is truncated however you'll need to cast the ID to a guid as part of your odata filter.

 

For example you could try:

 

https://api.myob.com/accountright?$filter=Id eq guid'7df29aa9-52f3-4f3a-ab87-9d9deda88913'

 

You could also query directly to the API:https://api.myob.com/accountright/7df29aa9-52f3-4f3a-ab87-9d9deda88913

 

The difference is that the first URL will give you a JSON array of one object in the array and the second will give you a JSON object (of the file you're looking for).

 

Hope this helps,

Cheers,

Jack

 

Jack Skinner
MYOBapi Evangelist

Are you a developer? Check out http://developer.myob.com
Looking for an Add-on? Check out http://myob.com/addons/
Highlighted
Partner Kais
4 Posts
Partner
Kais
Partner

4Posts

0Kudos

0Solutions

Solved: Go to Solution

Retrieveing Company File AccountRight Live API

Hello everyone,

 

I'm trying to retieve a company file by applying a filter. It seems the filter doesn't work with company files.
I'm getting the error:

 

ApiValidationException: Encountered a validation error (https://api.myob.com/accountright/?$filter=Id eq '.......

 

Is it a right way to retrieve one file?

 

Thanks

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