The URL to access contract terms is:
Example: POST Call
<comment> <commentable-id type="integer">123456</commentable-id> <commentable-type>InvoiceHeader</commentable-type> <comments>COMMENT TEXT</comments> </comment>
To GET or POST comments, use the API for the object you’d like to pull data for, and add
/comments to the end of the url; it should look like this:
Using the GET call gets all comments for the document, where the POST call adds a new comment.
Comments can also be added by using
/api/comments, where a payload is required to GET or POST properly.
The Comments API allows you to:
The following elements are available for the Comments API:
|Element||Description||Required Field?||Unique?||Allowable Value||Api_In Field?||Api_Out Field?||Data Type|
|comments||The comment you want to post. You can mention a user by including
|created-at||Automatically created by Coupa in the format YYYY-MM-DDTHH:MM:SS+HH:MMZ||yes||datetime|
|created-by||User who created the comment.||yes||User|
|id||Coupa's unique identifier for the comment.||yes||integer|
It is also possible to mention a specific user in a comment posted via the API, this will notify the user that they have been mentioned in the comment, provided that they have document mentions notifications turned on. When mentioning a user in a comment via the API refer to them via their user's technical ID, for example, to mention the user with technical ID 2 - include "@[User:2] " in the comment text, like this:
<comment> <commentable-id type="integer">123456</commentable-id> <commentable-type>InvoiceHeader</commentable-type> <comments>@[User:2] please see this comment</comments> </comment>
You can read more about mentions in comments here.