Skip to main content

 

 

Coupa Success Portal

Comments API

The URL to access contract terms is: https://<instance>/api/comments

Example: POST Call

<comment>
   <commentable-id type="integer">123456</commentable-id>
   <commentable-type>InvoiceHeader</commentable-type>
   <comments>COMMENT TEXT</comments>
</comment>

Actions

To GET or POST comments, use the API for the object you’d like to pull data for, and add /comments to the end; it should look like this: api/<object>/<id>/<comments> or https://<instance>/api/invoices/123456/comments. 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 https://<instance>/api/comments, where a payload is required to GET or POST properly.

The Comments API allows you to:

Verb Path Action Description
POST /api/invoices/:invoice_id/comments create Create comment
POST /api/expense_reports/:expense_report_id/comments create Create comment
POST /api/purchase_orders/:purchase_order_id/comments create Create comment
POST /api/users/:user_id/comments create Create comment
POST /api/requisitions/:requisition_id/comments create Create comment
GET /api/invoices/:invoice_id/comments index Query comments
GET /api/expense_reports/:expense_report_id/comments index Query comments
GET /api/purchase_orders/:purchase_order_id/comments index Query comments
GET /api/users/:user_id/comments index Query comments
GET /api/requisitions/:requisition_id/comments index Query comments
GET /api/invoices/:invoice_id/comments/:id show Show comment
GET /api/expense_reports/:expense_report_id/comments/:id show Show comment
GET /api/purchase_orders/:purchase_order_id/comments/:id show Show comment
GET /api/users/:user_id/comments/:id show Show comment
GET /api/requisitions/:requisition_id/comments/:id show Show comment
PATCH /api/invoices/:invoice_id/comments/:id update Update comment
PUT /api/invoices/:invoice_id/comments/:id update Update comment
PATCH /api/expense_reports/:expense_report_id/comments/:id update Update comment
PUT /api/expense_reports/:expense_report_id/comments/:id update Update comment
PATCH /api/purchase_orders/:purchase_order_id/comments/:id update Update comment
PUT /api/purchase_orders/:purchase_order_id/comments/:id update Update comment
PATCH /api/users/:user_id/comments/:id update Update comment
PUT /api/users/:user_id/comments/:id update Update comment
PATCH /api/requisitions/:requisition_id/comments/:id update Update comment
PUT /api/requisitions/:requisition_id/comments/:id update Update comment

Elements

The following elements are available for the Comments API:

Element Description Required Field? Unique? Allowable Value Api_In Field? Api_Out Field? Data Type
commentable-id commentable_id       yes yes integer
commentable-type commentable_type       yes yes string(255)
comments comments       yes yes text
created-at Automatically created by Coupa in the format YYYY-MM-DDTHH:MM:SS+HH:MMZ         yes datetime
created-by User who created         yes User   
id Coupa unique identifier         yes integer
  • Was this article helpful?