worldia / textmaster-api

Simple PHP client for the Textmaster API
1 stars 5 forks source link

Document status on a "complete document" API call #66

Closed Pitoune closed 8 years ago

Pitoune commented 8 years ago

According to documentation and the tests I have made, the document status returned by an API call to "complete document" is ìn_review. According to the workflow I would expect statuscompleted`. Is there any chance you change it ?

aponsin commented 8 years ago

I am not sure what you mean ? When a document is completed, his status should definitely be "completed".

Pitoune commented 8 years ago

I agree. But the API response is returning "in_review". As it is documented here https://fr.app.sandbox.textmaster.com/api-documentation#documents-complete-document

aponsin commented 8 years ago

Ok. I looked into this. So indeed, you are right, we'll return the status as "in_review", the reason being that the action that is happening is actually asynchronous on that end point. Meaning that by the time we respond, the completion has not actually happened yet. If you want to catch the completion of that event, you should set a callback on it. Sorry, it was definitely not clear from the documentation.

Pitoune commented 8 years ago

Thanks. It is clear now.