Mentionables
This section describes how a mentionable works. A mentionable is an entity (an user or an organization) that can be mentioned in a body of text, to call out it's attention. For now, only users are mentionable and it is possible to mention them only in comments on an Expense or an Advancement or a Reimbursement. To mention a user you use its mention_name
with @
as a preffix (@John
, for example).
Mentionable Example
List all mentionables
This endpoint lists all mentionable users of a specific resource (an Expense or an Advancement or a Reimbursement).
The response returns an HTTP ETag for caching and improving efficience. On your first request, you should save the returned ETag value and supply it on subsequent requests for the same resource. If you make a request providing an ETag and the resource has not changed on the server, it will respond with 304 Not Modified
HTTP Status and an empty body.
Definition (mentionables of an Expense)
GET https://app.rexpense.com/api/v1/expenses/:expense_id/mentionables
Example Request
$ curl -u $YOUR_API_TOKEN:X -X GET https://app.rexpense.com/api/v1/expenses/1/mentionables \ -H 'Accept: application/json' \ -H 'Content-type: application/json'
Response Example
ETag cde0a947653ebd83b7294edddb29ad37
Example Request
$ curl -u $YOUR_API_TOKEN:X -X GET https://app.rexpense.com/api/v1/expenses/1/mentionables \ -H 'Accept: application/json' \ -H 'Content-type: application/json' -H 'ETag: cde0a947653ebd83b7294edddb29ad37'
Response Example
304 Not Modified
Definition (mentionables of an Advancement)
GET https://app.rexpense.com/api/v1/advancements/:advancement_id/mentionables
Example Request
$ curl -u $YOUR_API_TOKEN:X -X GET https://app.rexpense.com/api/v1/advancements/1/mentionables \ -H 'Accept: application/json' \ -H 'Content-type: application/json'
Response Example
ETag cde0a947653ebd83b7294edddb29ad37
Example Request
$ curl -u $YOUR_API_TOKEN:X -X GET https://app.rexpense.com/api/v1/advancements/1/mentionables \ -H 'Accept: application/json' \ -H 'Content-type: application/json' -H 'ETag: cde0a947653ebd83b7294edddb29ad37'
Response Example
304 Not Modified
Definition (mentionables of a Reimbursement)
GET https://app.rexpense.com/api/v1/reimbursements/:reimbursement_id/mentionables
Example Request
$ curl -u $YOUR_API_TOKEN:X -X GET https://app.rexpense.com/api/v1/reimbursements/1/mentionables \ -H 'Accept: application/json' \ -H 'Content-type: application/json'
Response Example
ETag cde0a947653ebd83b7294edddb29ad37
Example Request
$ curl -u $YOUR_API_TOKEN:X -X GET https://app.rexpense.com/api/v1/reimbursements/1/mentionables \ -H 'Accept: application/json' \ -H 'Content-type: application/json' -H 'ETag: cde0a947653ebd83b7294edddb29ad37'
Response Example
304 Not Modified