Reviews represent a stateful association between Items and Users within the Verve graph. This state indicates a User’s approval of this Item.

Endpoints and Data Structures

GET Endpoints and Parameters

Endpoints

  • To access a list of approvals associated with a specific Item: GET /approval/byitem/<id>

  • To access a list of approvals associated with all items within a specific Group: GET /approval/bygroup/<id>

  • To access a list of approvals associated with a specific user: GET /approval/byuser/<id>

  • To access a specific approval by its id: GET /approval/byapproval/<id>

Data Model:

For the endpoints requesting approvals by items, groups, and users, the result will be a list. For a specific approval by its own ID, the result will be a single object.

Parameter

Datatype

Description

id

integer, primary key

ID of the Approval object

item_id

integer, foreign key

ID of Item associated with Approval

item_title

string

Title of item associated with Approval

state

enum

enum approval_state:

  • draft

  • requested

  • approved

  • rejected

  • abstained

For more info, visit Verve Review & Approval Process | Data-Model

timestamp

timestamp

Timestamp of most recent modification of the Approval object

user

user object

An object containing user information:

  • userid

  • user status

  • display name

  • avatar URL

POST and PATCH endpoints and parameters

Endpoints:

  • To create a new approval, POST /approval

    • This takes a list of approval objects in its body parameter

  • To update several approvals at once, PATCH /approval

    • This takes a list of approval objects in its body parameter

Body Parameters

Parameter

Datatype

Required

Description

item_id

integer

yes

Item ID of the item we wish to add or update or associate an approval for

user_id

integer

yes

User ID of the user we wish to associate or update an approval for

state

string

yes

A string representation of the approval state. Must be one of:

  • draft

  • requested

  • rejected

  • abstained

  • approved

PUT endpoint and parameters

Endpoint

To update a single approval, PUT /approval/byapproval/<id>

This takes a single approval state status in its query parameter. Accepts a string representation of:

  • draft

  • requested

  • rejected

  • abstained

  • approved