MYOBCommunity
Partner Zone
|
|
Partner Zone

Invalid identifier for a company file 'Contact'

This thread is now closed to new comments.
Some of the links provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
2 REPLIES
MYOB Staff Post DeveloperJack
141 Posts
MYOB Staff Post
Australia
DeveloperJack
MYOB Staff Post

141Posts

31Kudos

21Solutions

Accepted Solution Solved Solution

Re: Invalid identifier for a company file 'Contact'

Hi there @Myles,

 

Thanks for posting.

 

It looks like the URI you're using is not quite correct.

 

You first need to retrieve the company file URI from the company file endpoint. That endpoint will give you the Base URI for the file you want to access.

 

From there, you can access the /Contact/Customer endpoint within that file. You'll note that the API documentation refers to the {cf_uri} which is shorthand for the company file URI you retrieved above.

 

For example in one of our sandbox files, the URI you want to use would be: https://ar1.api.myob.com/accountright/20471804-e604-4fed-b8b9-5c126143bc71/Contact/Customer

 

We have some best practice guides for both hypermedia (the file URI) and company file authentication (for authenticating to a given file) that may help you out.

 

If you need further assistance you can reach out to us for support via developers@myob.com

 

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/
Experienced Partner Myles
10 Posts
Experienced Partner
Australia
Myles
Experienced Partner

10Posts

1Kudos

0Solutions

Invalid identifier for a company file 'Contact'

we are calling a post request with 

URL - api.myob.com/accountright/Contact/customer with json data. we passed correct headers information

 

 ERROR code - 160

error message : Invalid identifier for a company file 'Contact'

 

getting an error:

{

"Errors": 
  {
"Name": "NotValid"
"Message": "Invalid identifier for a company file 'Contact'"
"AdditionalDetails": ""
"ErrorCode": 160
"Severity": "Error"
"LearnMore": null
"Information": "Warning, error messages have not been finalised in this release and may change"

}

Highlighted
Experienced Partner Myles
10 Posts
Experienced Partner
Australia
Myles
Experienced Partner

10Posts

1Kudos

0Solutions

Solved: Go to Solution

Invalid identifier for a company file 'Contact'

we are calling a post request with 

{"CompanyName":"demo company","LastName":"last naming", "FirstName":"firs name","IsIndividual":"True"}

URL - api.myob.com/accountright/Contact/customer

 

 

getting an error:

{

"Errors": 
  {
"Name": "NotValid"
"Message": "Invalid identifier for a company file 'Contact'"
"AdditionalDetails": ""
"ErrorCode": 160
"Severity": "Error"
"LearnMore": null
"Information": "Warning, error messages have not been finalised in this release and may change"

}

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