Skip to main content
Solved

REST API for Create Document

  • July 30, 2025
  • 4 replies
  • 88 views

asanka1055
Hero (Partner)
Forum|alt.badge.img+9

Hi All,

 

I’m getting an error when trying to create a document using a REST API. I’m passing value as ‘YES’ for CreateFileRef, but it’s giving below error.

 

 

API Documentation
Core Code/ Function

 

POSTMAN Request

Please share if you have any input on this.

 

Thanks & Regards,
Asanka.

Best answer by asanka1055

This is not an IFS Bug, this was due to a Custom Event we had in our environment. I was able to sort this by debugging through POSTMAN.

To enable debugging you can add ‘?odata-debug=json’ to the end of the url. It will be easy to investigate and solve issues.

 

4 replies

asanka1055
Hero (Partner)
Forum|alt.badge.img+9
  • Author
  • Hero (Partner)
  • 68 replies
  • Answer
  • July 30, 2025

This is not an IFS Bug, this was due to a Custom Event we had in our environment. I was able to sort this by debugging through POSTMAN.

To enable debugging you can add ‘?odata-debug=json’ to the end of the url. It will be easy to investigate and solve issues.

 


Forum|alt.badge.img+10
  • Hero (Customer)
  • 77 replies
  • July 30, 2025

Hi Asanka

We’ve successfully used this interface to create and subsequently upload documents to IFS using the REST APIs, with CreateFileRef set to “YES” (currently using 23R2 but also worked in 22R2).

Have any documents been created within IFS for the document class you are using?  I’m wondering if it’s something to do with the document class rather than the parameters to the REST API call.

MMck

 

PS Ignore this, my browser just refreshed with your own answer!


asanka1055
Hero (Partner)
Forum|alt.badge.img+9
  • Author
  • Hero (Partner)
  • 68 replies
  • July 30, 2025

Hi ​@MMcK ,

It was due to a Custom Event. Which Blocked creating and attaching new documents

Thanks & Regards,
Asanka.


Mathias Dahl
Superhero (Employee)
Forum|alt.badge.img+32
  • Superhero (Employee)
  • 2901 replies
  • July 30, 2025

The sneaky thing with custom events, it seems... 🙂