Raindrop API / Documentation
Get started Entities raindrop.com →
Raindrop API

Query Raindrop with GraphQL.

One typed endpoint over your whole procurement data model — users, roles, suppliers, spend. Send a query, get exactly the fields you asked for. The same per-record permissions that protect the web app protect every call.

Introduction

The Raindrop API is a single GraphQL endpoint at /gql. Every entity below is a typed table you can read and, where you have permission, write. Pick the fields you want, filter with where:, and the response comes back shaped exactly like your query — no over-fetching, no guesswork.

GraphQL endpoint
https://stgapi.raindrop.com/gql

How it works

  • Ask for exactly what you need. A query lists the fields it wants; the response carries those and nothing else.
  • Filter inline. Every list query accepts a where: argument over the same columns — no bespoke endpoints per query shape.
  • Your permissions, applied automatically. An API key resolves to a user, role, and tenant. You see exactly the records that user can see.
  • Live schema. The fields documented here are read straight from the running schema, so the docs match what your queries return.

Authentication

Send an API key as a bearer token on every request. Keys are minted per user and carry that user's role and tenant — there's no shared admin key and no way to read across organizations. See the auto-provision walkthrough to mint, rotate, or expire one.

Auth header
Authorization: Bearer $RAINDROP_API_KEY

Entities

Grouped by domain, the same way the MCP tools are. Each entity shows its field list, then nested Read, Create, and Update query examples — expand the one you need. Everything's on this page; nothing navigates away.

Identity

3 entities

Users

user #

A user is the people side of Raindrop — who's signed in, who they report to, what role they're playing today. Read users to power sign-in flows, org charts, and approval routing. Write to invite teammates and update profiles.

account
String
billing_admin
Boolean!
budgetary_approval
numeric
cart_item_count
Int
A computed field, executes function "rd_user_cart_item_count"
created_at
timestamptz!
created_by
String!
created_by_user
user
An object relationship
department_id
Int
email
String!
external_id
String
first_name
String
id
String!
instance_id
Int!
is_archived
Boolean!
is_cart_admin
Boolean!
is_catalog_admin
Boolean!
is_deleted
Boolean
is_email_bounced
Boolean
is_finance_admin
Boolean!
is_inactive
Boolean!
is_invoice_contact
Boolean!
is_payment_contact
Boolean!
is_primary_contact
Boolean!
is_purchase_order_contact
Boolean!
is_rainsign_admin
Boolean!
last_name
String!
manager
user
An object relationship
manager_email
String
name
String!
nickname
String
phone
String
po_headers
[po_header!]!
An array relationship
po_headers_aggregate
po_header_aggregate!
An aggregate relationship
privilege
jsonb
role
role!
An object relationship
role_id
Int!
scim
jsonb!
scorecards
[scorecard!]!
An array relationship
scorecardsByApproverId
[scorecard!]!
An array relationship
scorecardsByApproverId_aggregate
scorecard_aggregate!
An aggregate relationship
scorecards_aggregate
scorecard_aggregate!
An aggregate relationship
sourcing_event_business_users
[sourcing_event_business_user!]!
An array relationship
sourcing_event_business_users_aggregate
sourcing_event_business_user_aggregate!
An aggregate relationship
sourcing_events
[sourcing_event!]!
An array relationship
sourcing_events_aggregate
sourcing_event_aggregate!
An aggregate relationship
system_access
Boolean!
title
String
updated_at
timestamptz!
updated_by
String!
updated_by_user
user
An object relationship
user_businesses
[user_business!]!
An array relationship
user_businesses_aggregate
user_business_aggregate!
An aggregate relationship
uuid
uuid!

Filter any list query with where: over the same columns — see the Read example below.

Read & query

List users

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query ListUser {\n  user(limit: 10) {\n    id\n    account\n    billing_admin\n    budgetary_approval\n  }\n}"}'
Response
{
  "data": {
    "user": [
      {
        "account": "example",
        "billing_admin": true,
        "budgetary_approval": 1,
        "id": 1
      },
      {
        "account": "example",
        "billing_admin": true,
        "budgetary_approval": 1,
        "id": 2
      }
    ]
  }
}

Get one by id

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query GetUser($id: Int!) {\n  user(where: {id: {_eq: $id}}) {\n    id\n    account\n    billing_admin\n    budgetary_approval\n  }\n}","variables":{"id":1}}'
Response
{
  "data": {
    "user": [
      {
        "account": "example",
        "billing_admin": true,
        "budgetary_approval": 1,
        "id": 1
      }
    ]
  }
}
Create

Insert a user

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation CreateUser($object: user_insert_input!) {\n  insert_user_one(object: $object) {\n    id\n    account\n    billing_admin\n    budgetary_approval\n  }\n}","variables":{"object":{"account":"example","billing_admin":true,"budgetary_approval":1}}}'
Response
{
  "data": {
    "insert_user_one": {
      "account": "example",
      "billing_admin": true,
      "budgetary_approval": 1,
      "id": 1
    }
  }
}
Update

Update a user

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation UpdateUser($id: Int!, $changes: user_set_input!) {\n  update_user(where: {id: {_eq: $id}}, _set: $changes) {\n    affected_rows\n    returning {\n      id\n    account\n    billing_admin\n    budgetary_approval\n    }\n  }\n}","variables":{"changes":{"account":"example","billing_admin":true,"budgetary_approval":1},"id":1}}'
Response
{
  "data": {
    "update_user": {
      "affected_rows": 1,
      "returning": [
        {
          "account": "example",
          "billing_admin": true,
          "budgetary_approval": 1,
          "id": 1
        }
      ]
    }
  }
}

Roles

role #

Roles decide what a user can see and do. Assign a role to gate access to sourcing events, approvals, payments, and everything else. Roles are per-tenant — you can define as many as your org needs.

approve_on_behalf_of
Boolean!
created_at
timestamptz!
created_by
String!
description
String
external_id
String
id
Int!
instance_id
Int!
is_external
Boolean!
is_guest
Boolean
is_managed
Boolean!
is_platform
Boolean!
name
String!
updated_at
timestamptz!
updated_by
String!
users
[user!]!
An array relationship
users_aggregate
user_aggregate!
An aggregate relationship

Filter any list query with where: over the same columns — see the Read example below.

Read & query

List roles

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query ListRole {\n  role(limit: 10) {\n    id\n    approve_on_behalf_of\n    created_at\n    created_by\n  }\n}"}'
Response
{
  "data": {
    "role": [
      {
        "approve_on_behalf_of": true,
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "id": 4
      },
      {
        "approve_on_behalf_of": true,
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "id": 5
      }
    ]
  }
}

Get one by id

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query GetRole($id: Int!) {\n  role(where: {id: {_eq: $id}}) {\n    id\n    approve_on_behalf_of\n    created_at\n    created_by\n  }\n}","variables":{"id":4}}'
Response
{
  "data": {
    "role": [
      {
        "approve_on_behalf_of": true,
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "id": 4
      }
    ]
  }
}
Create

Insert a role

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation CreateRole($object: role_insert_input!) {\n  insert_role_one(object: $object) {\n    id\n    approve_on_behalf_of\n    created_at\n    created_by\n  }\n}","variables":{"object":{"approve_on_behalf_of":true,"created_by":"example"}}}'
Response
{
  "data": {
    "insert_role_one": {
      "approve_on_behalf_of": true,
      "created_at": "2024-01-15T09:30:00Z",
      "created_by": "example",
      "id": 4
    }
  }
}
Update

Update a role

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation UpdateRole($id: Int!, $changes: role_set_input!) {\n  update_role(where: {id: {_eq: $id}}, _set: $changes) {\n    affected_rows\n    returning {\n      id\n    approve_on_behalf_of\n    created_at\n    created_by\n    }\n  }\n}","variables":{"changes":{"approve_on_behalf_of":true,"created_by":"example"},"id":4}}'
Response
{
  "data": {
    "update_role": {
      "affected_rows": 1,
      "returning": [
        {
          "approve_on_behalf_of": true,
          "created_at": "2024-01-15T09:30:00Z",
          "created_by": "example",
          "id": 4
        }
      ]
    }
  }
}

User–business links

user_business #

The join between people and the businesses they act for. A user can hold contacts at several supplier businesses; each row is one of those memberships. Read it to resolve a supplier contact back to a person, or to list who you have on file at a given business.

business
business!
An object relationship
business_id
Int!
created_at
timestamptz!
created_by
String!
id
Int!
instance_business_relationship
instance_business_relationship
An object relationship
instance_business_relationship_id
Int
instance_id
Int!
updated_at
timestamptz!
updated_by
String!
user
user!
An object relationship
user_id
String!

Filter any list query with where: over the same columns — see the Read example below.

Read & query

List user_businesss

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query ListUserBusiness {\n  user_business(limit: 10) {\n    id\n    business_id\n    created_at\n    created_by\n  }\n}"}'
Response
{
  "data": {
    "user_business": [
      {
        "business_id": 1,
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "id": 1
      },
      {
        "business_id": 1,
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "id": 2
      }
    ]
  }
}

Get one by id

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query GetUserBusiness($id: Int!) {\n  user_business(where: {id: {_eq: $id}}) {\n    id\n    business_id\n    created_at\n    created_by\n  }\n}","variables":{"id":1}}'
Response
{
  "data": {
    "user_business": [
      {
        "business_id": 1,
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "id": 1
      }
    ]
  }
}
Create

Insert a user_business

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation CreateUserBusiness($object: user_business_insert_input!) {\n  insert_user_business_one(object: $object) {\n    id\n    business_id\n    created_at\n    created_by\n  }\n}","variables":{"object":{"business_id":1,"created_by":"example"}}}'
Response
{
  "data": {
    "insert_user_business_one": {
      "business_id": 1,
      "created_at": "2024-01-15T09:30:00Z",
      "created_by": "example",
      "id": 1
    }
  }
}
Update

Update a user_business

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation UpdateUserBusiness($id: Int!, $changes: user_business_set_input!) {\n  update_user_business(where: {id: {_eq: $id}}, _set: $changes) {\n    affected_rows\n    returning {\n      id\n    business_id\n    created_at\n    created_by\n    }\n  }\n}","variables":{"changes":{"business_id":1,"created_by":"example"},"id":1}}'
Response
{
  "data": {
    "update_user_business": {
      "affected_rows": 1,
      "returning": [
        {
          "business_id": 1,
          "created_at": "2024-01-15T09:30:00Z",
          "created_by": "example",
          "id": 1
        }
      ]
    }
  }
}

Suppliers

2 entities

Suppliers

instance_business_relationship #

Every supplier you can transact with is an instance_business_relationship (IBR) — the link between your tenant and another business. Read it to search the supplier master, check status, and resolve the IBR id that sourcing events and purchase orders reference. Write to onboard a new supplier.

account
String
active_at
timestamptz
annual_revenue
money
ap_user
user
An object relationship
ap_user_id
String
business
business
An object relationship
business_id
Int
catalog_id
Int
compliance_entity_num
Int
compliance_issue
Boolean!
compliance_status
String!
created_at
timestamptz!
created_by
String!
creation_type
String!
currency_code
String
data
jsonb!
description
String
doing_business_as
String
duns_number
String
duplicate_id
Int
early_payment
String
erp
String
erp_data
jsonb
A computed field, executes function "rd_ibr_erp_data"
erp_error
String
external_id
String
fiscal_year_start_date
date
holds
jsonb!
ibr_attributes_jsonb
jsonb
A computed field, executes function "rd_ibr_attributes_jsonb"
id
Int!
instance_id
Int!
invoice_settings
jsonb
is_archived
Boolean!
mailing_name
String
name
String
payment_terms
String
payment_terms_code
String
A computed field, executes function "rd_ibr_payment_terms_code"
po_settings
jsonb
predecessor_alias
String
previous_status
String
primary_address
jsonb
A computed field, executes function "rd_ibr_primary_business_address"
region
String
scorecards
[scorecard!]!
An array relationship
scorecards_aggregate
scorecard_aggregate!
An aggregate relationship
sic_code
String
sourcing_event_businesses
[sourcing_event_business!]!
An array relationship
sourcing_event_businesses_aggregate
sourcing_event_business_aggregate!
An aggregate relationship
tax_identification_number
String
updated_at
timestamptz!
updated_by
String!
user_businesses
[user_business!]!
An array relationship
user_businesses_aggregate
user_business_aggregate!
An aggregate relationship
uuid
uuid!
website
String

Filter any list query with where: over the same columns — see the Read example below.

Read & query

List instance_business_relationships

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query ListInstanceBusinessRelationship {\n  instance_business_relationship(limit: 10) {\n    id\n    account\n    active_at\n    annual_revenue\n  }\n}"}'
Response
{
  "data": {
    "instance_business_relationship": [
      {
        "account": "example",
        "active_at": "2024-01-15T09:30:00Z",
        "annual_revenue": "example",
        "id": 88
      },
      {
        "account": "example",
        "active_at": "2024-01-15T09:30:00Z",
        "annual_revenue": "example",
        "id": 89
      }
    ]
  }
}

Get one by id

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query GetInstanceBusinessRelationship($id: Int!) {\n  instance_business_relationship(where: {id: {_eq: $id}}) {\n    id\n    account\n    active_at\n    annual_revenue\n  }\n}","variables":{"id":88}}'
Response
{
  "data": {
    "instance_business_relationship": [
      {
        "account": "example",
        "active_at": "2024-01-15T09:30:00Z",
        "annual_revenue": "example",
        "id": 88
      }
    ]
  }
}
Create

Insert a instance_business_relationship

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation CreateInstanceBusinessRelationship($object: instance_business_relationship_insert_input!) {\n  insert_instance_business_relationship_one(object: $object) {\n    id\n    account\n    active_at\n    annual_revenue\n  }\n}","variables":{"object":{"account":"example","annual_revenue":"example"}}}'
Response
{
  "data": {
    "insert_instance_business_relationship_one": {
      "account": "example",
      "active_at": "2024-01-15T09:30:00Z",
      "annual_revenue": "example",
      "id": 88
    }
  }
}
Update

Update a instance_business_relationship

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation UpdateInstanceBusinessRelationship($id: Int!, $changes: instance_business_relationship_set_input!) {\n  update_instance_business_relationship(where: {id: {_eq: $id}}, _set: $changes) {\n    affected_rows\n    returning {\n      id\n    account\n    active_at\n    annual_revenue\n    }\n  }\n}","variables":{"changes":{"account":"example","annual_revenue":"example"},"id":88}}'
Response
{
  "data": {
    "update_instance_business_relationship": {
      "affected_rows": 1,
      "returning": [
        {
          "account": "example",
          "active_at": "2024-01-15T09:30:00Z",
          "annual_revenue": "example",
          "id": 88
        }
      ]
    }
  }
}

Businesses

business #

A business is the company itself — name, DBA, addresses — independent of any one tenant's relationship with it. Suppliers (IBRs) point at a business; read it for firmographic detail, write it when onboarding a brand-new company.

address
String
address_1
String
address_2
String
address_3
String
address_number
String
annual_revenue
money
billing_address
String
billing_address_number
String
billing_city
String
billing_country
String
billing_formatted_address
String
billing_postal_code
String
billing_state_province
String
city
String
compliance_entity_num
Int
compliance_issue
Boolean!
country
String
country_code
String
created_at
timestamptz!
created_by
String!
created_by_instance_id
Int!
description
String
doing_business_as
String
employees
Int
fax_number
String
fiscal_year_start_date
date!
formatted_address
String
google_place_id
String
google_place_id_billing
String
google_place_id_shipping
String
id
Int!
instance_business_relationship
jsonb
A computed field, executes function "rd_business_ibr"
instance_business_relationships
[instance_business_relationship!]!
An array relationship
instance_business_relationships_aggregate
instance_business_relationship_aggregate!
An aggregate relationship
instance_contacts
jsonb
A computed field, executes function "rd_business_instance_contacts"
instance_id
Int!
is_private
Boolean!
latitude
numeric
longitude
numeric
name
String!
phone
String
poHeadersByBillToBusinessId
[po_header!]!
An array relationship
poHeadersByBillToBusinessId_aggregate
po_header_aggregate!
An aggregate relationship
poHeadersByShipToBusinessId
[po_header!]!
An array relationship
poHeadersByShipToBusinessId_aggregate
po_header_aggregate!
An aggregate relationship
po_headers
[po_header!]!
An array relationship
po_headers_aggregate
po_header_aggregate!
An aggregate relationship
postal_code
String
predecessor
String
request_change_instance_id
Int
instance requested to own business
scorecards
[scorecard!]!
An array relationship
scorecards_aggregate
scorecard_aggregate!
An aggregate relationship
shipping_address
String
shipping_address_number
String
shipping_city
String
shipping_country
String
shipping_formatted_address
String
shipping_postal_code
String
shipping_state_province
String
sic_code
String
sourcing_event_businesses
[sourcing_event_business!]!
An array relationship
sourcing_event_businesses_aggregate
sourcing_event_business_aggregate!
An aggregate relationship
state_code
String
state_code_udc
String
A computed field, executes function "rd_business_state_code_udc"
state_province
String
updated_at
timestamptz!
updated_by
String!
user_businesses
[user_business!]!
An array relationship
user_businesses_aggregate
user_business_aggregate!
An aggregate relationship
uuid
uuid!
website
String

Filter any list query with where: over the same columns — see the Read example below.

Read & query

List businesss

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query ListBusiness {\n  business(limit: 10) {\n    id\n    address\n    address_1\n    address_2\n  }\n}"}'
Response
{
  "data": {
    "business": [
      {
        "address": "example",
        "address_1": "example",
        "address_2": "example",
        "id": 88
      },
      {
        "address": "example",
        "address_1": "example",
        "address_2": "example",
        "id": 89
      }
    ]
  }
}

Get one by id

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query GetBusiness($id: Int!) {\n  business(where: {id: {_eq: $id}}) {\n    id\n    address\n    address_1\n    address_2\n  }\n}","variables":{"id":88}}'
Response
{
  "data": {
    "business": [
      {
        "address": "example",
        "address_1": "example",
        "address_2": "example",
        "id": 88
      }
    ]
  }
}
Create

Insert a business

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation CreateBusiness($object: business_insert_input!) {\n  insert_business_one(object: $object) {\n    id\n    address\n    address_1\n    address_2\n  }\n}","variables":{"object":{"address":"example","address_1":"example","address_2":"example"}}}'
Response
{
  "data": {
    "insert_business_one": {
      "address": "example",
      "address_1": "example",
      "address_2": "example",
      "id": 88
    }
  }
}
Update

Update a business

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation UpdateBusiness($id: Int!, $changes: business_set_input!) {\n  update_business(where: {id: {_eq: $id}}, _set: $changes) {\n    affected_rows\n    returning {\n      id\n    address\n    address_1\n    address_2\n    }\n  }\n}","variables":{"changes":{"address":"example","address_1":"example","address_2":"example"},"id":88}}'
Response
{
  "data": {
    "update_business": {
      "affected_rows": 1,
      "returning": [
        {
          "address": "example",
          "address_1": "example",
          "address_2": "example",
          "id": 88
        }
      ]
    }
  }
}

Sourcing Events

8 entities

Sourcing events

sourcing_event #

A sourcing event is one RFx — an RFQ, RFP, or RFI. Read events to power dashboards and status views; write to start a new event, reshape it, or move its dates. Most of the sourcing API hangs off a sourcing_event id.

amount
numeric
A computed field, executes function "rd_sourcing_event_amount"
awarded_message
String
business
business
An object relationship
business_id
Int
click_through_attachment_uuid
uuid
click_through_read_secret
String
close_comment
String
close_email
String
closed_at
timestamptz
copied_from_uuid
uuid
created_at
timestamptz!
created_by
String!
description
String
evaluation_scorecard_count
bigint
A computed field, executes function "rd_get_sourcing_event_evaluation_scorecard_count"
evaluation_scorecard_template
scorecard_template
An object relationship
evaluation_scorecard_template_id
Int
id
Int!
image
String
instance_business_relationship
instance_business_relationship
An object relationship
instance_business_relationship_id
Int
instance_id
Int!
is_archived
Boolean!
is_baseline_ppu_enabled
Boolean!
is_click_through_enabled
Boolean!
is_incumbent_supplier_enabled
Boolean!
is_managed
Boolean!
is_sealed
Boolean
is_starter_template
Boolean!
is_value_engineering_enabled
Boolean!
managed_by_business_id
Int
name
String!
negotiation_round
Int!
not_awarded_message
String
owner
user!
An object relationship
owner_id
String!
owner_jsonb
jsonb!
qualification_scorecard_template
scorecard_template
An object relationship
qualification_scorecard_template_id
Int!
sourcing_event_businesses
[sourcing_event_business!]!
An array relationship
sourcing_event_businesses_aggregate
sourcing_event_business_aggregate!
An aggregate relationship
sourcing_event_lots
[sourcing_event_lot!]!
An array relationship
sourcing_event_lots_aggregate
sourcing_event_lot_aggregate!
An aggregate relationship
sourcing_event_scorecards
[scorecard!]!
An array relationship
sourcing_event_scorecards_aggregate
scorecard_aggregate!
An aggregate relationship
summary
jsonb
updated_at
timestamptz!
updated_by
String!
uuid
uuid!

Filter any list query with where: over the same columns — see the Read example below.

Read & query

List sourcing_events

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query ListSourcingEvent {\n  sourcing_event(limit: 10) {\n    id\n    amount\n    awarded_message\n    business_id\n  }\n}"}'
Response
{
  "data": {
    "sourcing_event": [
      {
        "amount": 1,
        "awarded_message": "example",
        "business_id": 1,
        "id": 4123
      },
      {
        "amount": 1,
        "awarded_message": "example",
        "business_id": 1,
        "id": 4124
      }
    ]
  }
}

Get one by id

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query GetSourcingEvent($id: Int!) {\n  sourcing_event(where: {id: {_eq: $id}}) {\n    id\n    amount\n    awarded_message\n    business_id\n  }\n}","variables":{"id":4123}}'
Response
{
  "data": {
    "sourcing_event": [
      {
        "amount": 1,
        "awarded_message": "example",
        "business_id": 1,
        "id": 4123
      }
    ]
  }
}
Create

Insert a sourcing_event

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation CreateSourcingEvent($object: sourcing_event_insert_input!) {\n  insert_sourcing_event_one(object: $object) {\n    id\n    amount\n    awarded_message\n    business_id\n  }\n}","variables":{"object":{"amount":1,"awarded_message":"example","business_id":1}}}'
Response
{
  "data": {
    "insert_sourcing_event_one": {
      "amount": 1,
      "awarded_message": "example",
      "business_id": 1,
      "id": 4123
    }
  }
}
Update

Update a sourcing_event

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation UpdateSourcingEvent($id: Int!, $changes: sourcing_event_set_input!) {\n  update_sourcing_event(where: {id: {_eq: $id}}, _set: $changes) {\n    affected_rows\n    returning {\n      id\n    amount\n    awarded_message\n    business_id\n    }\n  }\n}","variables":{"changes":{"amount":1,"awarded_message":"example","business_id":1},"id":4123}}'
Response
{
  "data": {
    "update_sourcing_event": {
      "affected_rows": 1,
      "returning": [
        {
          "amount": 1,
          "awarded_message": "example",
          "business_id": 1,
          "id": 4123
        }
      ]
    }
  }
}

Event suppliers

sourcing_event_business #

Each row attaches one supplier (IBR) to one sourcing event — the participants invited to respond. Read it to list who's on an event; write to add a supplier after the event exists.

business
business!
An object relationship
business_id
Int!
comment
String
created_at
timestamptz!
created_by
String!
id
Int!
instance_business_relationship
instance_business_relationship
An object relationship
instance_business_relationship_id
Int
instance_id
Int!
is_awarded
Boolean
negotiation_round
Int!
sourcing_event
sourcing_event!
An object relationship
sourcing_event_business_users
[sourcing_event_business_user!]!
An array relationship
sourcing_event_business_users_aggregate
sourcing_event_business_user_aggregate!
An aggregate relationship
sourcing_event_id
Int!
updated_at
timestamptz!
updated_by
String!

Filter any list query with where: over the same columns — see the Read example below.

Read & query

List sourcing_event_businesss

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query ListSourcingEventBusiness {\n  sourcing_event_business(limit: 10) {\n    id\n    business_id\n    comment\n    created_at\n  }\n}"}'
Response
{
  "data": {
    "sourcing_event_business": [
      {
        "business_id": 1,
        "comment": "example",
        "created_at": "2024-01-15T09:30:00Z",
        "id": 5001
      },
      {
        "business_id": 1,
        "comment": "example",
        "created_at": "2024-01-15T09:30:00Z",
        "id": 5002
      }
    ]
  }
}

Get one by id

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query GetSourcingEventBusiness($id: Int!) {\n  sourcing_event_business(where: {id: {_eq: $id}}) {\n    id\n    business_id\n    comment\n    created_at\n  }\n}","variables":{"id":5001}}'
Response
{
  "data": {
    "sourcing_event_business": [
      {
        "business_id": 1,
        "comment": "example",
        "created_at": "2024-01-15T09:30:00Z",
        "id": 5001
      }
    ]
  }
}
Create

Insert a sourcing_event_business

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation CreateSourcingEventBusiness($object: sourcing_event_business_insert_input!) {\n  insert_sourcing_event_business_one(object: $object) {\n    id\n    business_id\n    comment\n    created_at\n  }\n}","variables":{"object":{"business_id":1,"comment":"example"}}}'
Response
{
  "data": {
    "insert_sourcing_event_business_one": {
      "business_id": 1,
      "comment": "example",
      "created_at": "2024-01-15T09:30:00Z",
      "id": 5001
    }
  }
}
Update

Update a sourcing_event_business

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation UpdateSourcingEventBusiness($id: Int!, $changes: sourcing_event_business_set_input!) {\n  update_sourcing_event_business(where: {id: {_eq: $id}}, _set: $changes) {\n    affected_rows\n    returning {\n      id\n    business_id\n    comment\n    created_at\n    }\n  }\n}","variables":{"changes":{"business_id":1,"comment":"example"},"id":5001}}'
Response
{
  "data": {
    "update_sourcing_event_business": {
      "affected_rows": 1,
      "returning": [
        {
          "business_id": 1,
          "comment": "example",
          "created_at": "2024-01-15T09:30:00Z",
          "id": 5001
        }
      ]
    }
  }
}

Event supplier contacts

sourcing_event_business_user #

One level deeper than event suppliers: the individual contacts at a participating supplier who receive the invite and respond. Read to see who'll be emailed; write to add a named contact to a business already on the event.

click_through_accepted
Boolean
click_through_accepted_on
timestamptz
created_at
timestamptz!
created_by
String!
created_by_instance_id
Int
created_by_user_jsonb
jsonb
first_name
String
id
Int!
invite_comment
String
invited_at
timestamptz
is_primary
Boolean!
last_name
String
last_viewed_at
timestamptz
rsvp_at
timestamptz
rsvp_comment
String
sourcing_event_business
sourcing_event_business!
An object relationship
sourcing_event_business_id
Int!
updated_at
timestamptz!
updated_by
String!
updated_by_instance_id
Int
updated_by_user_jsonb
jsonb
user
user!
An object relationship
user_email
String
cross instance support
user_id
String!

Filter any list query with where: over the same columns — see the Read example below.

Read & query

List sourcing_event_business_users

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query ListSourcingEventBusinessUser {\n  sourcing_event_business_user(limit: 10) {\n    id\n    click_through_accepted\n    click_through_accepted_on\n    created_at\n  }\n}"}'
Response
{
  "data": {
    "sourcing_event_business_user": [
      {
        "click_through_accepted": true,
        "click_through_accepted_on": "example",
        "created_at": "2024-01-15T09:30:00Z",
        "id": 6001
      },
      {
        "click_through_accepted": true,
        "click_through_accepted_on": "example",
        "created_at": "2024-01-15T09:30:00Z",
        "id": 6002
      }
    ]
  }
}

Get one by id

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query GetSourcingEventBusinessUser($id: Int!) {\n  sourcing_event_business_user(where: {id: {_eq: $id}}) {\n    id\n    click_through_accepted\n    click_through_accepted_on\n    created_at\n  }\n}","variables":{"id":6001}}'
Response
{
  "data": {
    "sourcing_event_business_user": [
      {
        "click_through_accepted": true,
        "click_through_accepted_on": "example",
        "created_at": "2024-01-15T09:30:00Z",
        "id": 6001
      }
    ]
  }
}
Create

Insert a sourcing_event_business_user

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation CreateSourcingEventBusinessUser($object: sourcing_event_business_user_insert_input!) {\n  insert_sourcing_event_business_user_one(object: $object) {\n    id\n    click_through_accepted\n    click_through_accepted_on\n    created_at\n  }\n}","variables":{"object":{"click_through_accepted":true,"click_through_accepted_on":"example"}}}'
Response
{
  "data": {
    "insert_sourcing_event_business_user_one": {
      "click_through_accepted": true,
      "click_through_accepted_on": "example",
      "created_at": "2024-01-15T09:30:00Z",
      "id": 6001
    }
  }
}
Update

Update a sourcing_event_business_user

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation UpdateSourcingEventBusinessUser($id: Int!, $changes: sourcing_event_business_user_set_input!) {\n  update_sourcing_event_business_user(where: {id: {_eq: $id}}, _set: $changes) {\n    affected_rows\n    returning {\n      id\n    click_through_accepted\n    click_through_accepted_on\n    created_at\n    }\n  }\n}","variables":{"changes":{"click_through_accepted":true,"click_through_accepted_on":"example"},"id":6001}}'
Response
{
  "data": {
    "update_sourcing_event_business_user": {
      "affected_rows": 1,
      "returning": [
        {
          "click_through_accepted": true,
          "click_through_accepted_on": "example",
          "created_at": "2024-01-15T09:30:00Z",
          "id": 6001
        }
      ]
    }
  }
}

Event lots

sourcing_event_lot #

Lots break a sourcing event into separately-awardable groups, e.g. "Corrugate", "Mailers", "Tape" on a packaging RFQ. Read to show an event's structure; write to add or reshape lots.

created_at
timestamptz!
created_by
String!
custom_column_defs
jsonb!
default_view
jsonb
id
Int!
instance_id
Int!
name
String!
rank
jsonb
sourcing_event
sourcing_event!
An object relationship
sourcing_event_id
Int!
updated_at
timestamptz!
updated_by
String!

Filter any list query with where: over the same columns — see the Read example below.

Read & query

List sourcing_event_lots

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query ListSourcingEventLot {\n  sourcing_event_lot(limit: 10) {\n    id\n    created_at\n    created_by\n    custom_column_defs\n  }\n}"}'
Response
{
  "data": {
    "sourcing_event_lot": [
      {
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "custom_column_defs": {},
        "id": 502
      },
      {
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "custom_column_defs": {},
        "id": 503
      }
    ]
  }
}

Get one by id

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query GetSourcingEventLot($id: Int!) {\n  sourcing_event_lot(where: {id: {_eq: $id}}) {\n    id\n    created_at\n    created_by\n    custom_column_defs\n  }\n}","variables":{"id":502}}'
Response
{
  "data": {
    "sourcing_event_lot": [
      {
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "custom_column_defs": {},
        "id": 502
      }
    ]
  }
}
Create

Insert a sourcing_event_lot

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation CreateSourcingEventLot($object: sourcing_event_lot_insert_input!) {\n  insert_sourcing_event_lot_one(object: $object) {\n    id\n    created_at\n    created_by\n    custom_column_defs\n  }\n}","variables":{"object":{"created_by":"example","custom_column_defs":{}}}}'
Response
{
  "data": {
    "insert_sourcing_event_lot_one": {
      "created_at": "2024-01-15T09:30:00Z",
      "created_by": "example",
      "custom_column_defs": {},
      "id": 502
    }
  }
}
Update

Update a sourcing_event_lot

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation UpdateSourcingEventLot($id: Int!, $changes: sourcing_event_lot_set_input!) {\n  update_sourcing_event_lot(where: {id: {_eq: $id}}, _set: $changes) {\n    affected_rows\n    returning {\n      id\n    created_at\n    created_by\n    custom_column_defs\n    }\n  }\n}","variables":{"changes":{"created_by":"example","custom_column_defs":{}},"id":502}}'
Response
{
  "data": {
    "update_sourcing_event_lot": {
      "affected_rows": 1,
      "returning": [
        {
          "created_at": "2024-01-15T09:30:00Z",
          "created_by": "example",
          "custom_column_defs": {},
          "id": 502
        }
      ]
    }
  }
}

Scorecards

scorecard #

A scorecard is one supplier's evaluation on an event — the instance evaluators actually fill in, created from a template. Read to see scoring progress; write to create the per-supplier scorecards once a template is applied.

approver
user
An object relationship
approver_id
String
business
business
An object relationship
business_id
Int
child_scorecards
[scorecard!]!
An array relationship
child_scorecards_aggregate
scorecard_aggregate!
An aggregate relationship
created_at
timestamptz!
created_by
String!
created_by_instance_id
Int
created_by_user_jsonb
jsonb
id
Int!
instance_business_relationship
instance_business_relationship
An object relationship
instance_business_relationship_id
Int
instance_id
Int!
is_archived
Boolean!
is_assigned_scoring_only
Boolean
name
String!
notes
String
owner
user
An object relationship
owner_id
String
parent_scorecard
scorecard
An object relationship
parent_scorecard_id
Int
recipient
user
An object relationship
registration_id
Int
revisit_date
timestamptz
score
Float
0-100 representing total weighted score
scorecard_template_version
scorecard_template_version
An object relationship
scorecard_template_version_id
Int
sourcing_event
sourcing_event
An object relationship
sourcing_event_business
sourcing_event_business
An object relationship
sourcing_event_business_id
Int
sourcing_event_id
Int
updated_at
timestamptz!
updated_by
String!
updated_by_instance_id
Int
updated_by_user_jsonb
jsonb
user_email
String
uuid
uuid!

Filter any list query with where: over the same columns — see the Read example below.

Read & query

List scorecards

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query ListScorecard {\n  scorecard(limit: 10) {\n    id\n    approver_id\n    business_id\n    created_at\n  }\n}"}'
Response
{
  "data": {
    "scorecard": [
      {
        "approver_id": 1,
        "business_id": 1,
        "created_at": "2024-01-15T09:30:00Z",
        "id": 201
      },
      {
        "approver_id": 1,
        "business_id": 1,
        "created_at": "2024-01-15T09:30:00Z",
        "id": 202
      }
    ]
  }
}

Get one by id

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query GetScorecard($id: Int!) {\n  scorecard(where: {id: {_eq: $id}}) {\n    id\n    approver_id\n    business_id\n    created_at\n  }\n}","variables":{"id":201}}'
Response
{
  "data": {
    "scorecard": [
      {
        "approver_id": 1,
        "business_id": 1,
        "created_at": "2024-01-15T09:30:00Z",
        "id": 201
      }
    ]
  }
}
Create

Insert a scorecard

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation CreateScorecard($object: scorecard_insert_input!) {\n  insert_scorecard_one(object: $object) {\n    id\n    approver_id\n    business_id\n    created_at\n  }\n}","variables":{"object":{"approver_id":1,"business_id":1}}}'
Response
{
  "data": {
    "insert_scorecard_one": {
      "approver_id": 1,
      "business_id": 1,
      "created_at": "2024-01-15T09:30:00Z",
      "id": 201
    }
  }
}
Update

Update a scorecard

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation UpdateScorecard($id: Int!, $changes: scorecard_set_input!) {\n  update_scorecard(where: {id: {_eq: $id}}, _set: $changes) {\n    affected_rows\n    returning {\n      id\n    approver_id\n    business_id\n    created_at\n    }\n  }\n}","variables":{"changes":{"approver_id":1,"business_id":1},"id":201}}'
Response
{
  "data": {
    "update_scorecard": {
      "affected_rows": 1,
      "returning": [
        {
          "approver_id": 1,
          "business_id": 1,
          "created_at": "2024-01-15T09:30:00Z",
          "id": 201
        }
      ]
    }
  }
}

Scorecard templates

scorecard_template #

Templates define the questions and weighting a scorecard uses, so every supplier on an event is scored the same way. Read the library to pick a template; its versioned areas and items live on its versions.

business
business
An object relationship
copied_from_uuid
uuid
created_at
timestamptz!
created_by
String!
created_by_user
user
An object relationship
description
String
id
Int!
image
String
instance_id
Int!
is_archived
Boolean!
is_managed
Boolean!
managed_by_business_id
Int
managed_by_instance_business_relationship
instance_business_relationship
An object relationship
managed_by_instance_business_relationship_id
Int
name
String!
published_version_id
Int
scorecard_template_version
scorecard_template_version
An object relationship
scorecard_template_versions
[scorecard_template_version!]!
An array relationship
scorecard_template_versions_aggregate
scorecard_template_version_aggregate!
An aggregate relationship
updated_at
timestamptz!
updated_by
String!
uuid
uuid!

Filter any list query with where: over the same columns — see the Read example below.

Read & query

List scorecard_templates

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query ListScorecardTemplate {\n  scorecard_template(limit: 10) {\n    id\n    copied_from_uuid\n    created_at\n    created_by\n  }\n}"}'
Response
{
  "data": {
    "scorecard_template": [
      {
        "copied_from_uuid": "00000000-0000-4000-8000-000000000001",
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "id": 12
      },
      {
        "copied_from_uuid": "00000000-0000-4000-8000-000000000001",
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "id": 13
      }
    ]
  }
}

Get one by id

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query GetScorecardTemplate($id: Int!) {\n  scorecard_template(where: {id: {_eq: $id}}) {\n    id\n    copied_from_uuid\n    created_at\n    created_by\n  }\n}","variables":{"id":12}}'
Response
{
  "data": {
    "scorecard_template": [
      {
        "copied_from_uuid": "00000000-0000-4000-8000-000000000001",
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "id": 12
      }
    ]
  }
}
Create

Insert a scorecard_template

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation CreateScorecardTemplate($object: scorecard_template_insert_input!) {\n  insert_scorecard_template_one(object: $object) {\n    id\n    copied_from_uuid\n    created_at\n    created_by\n  }\n}","variables":{"object":{"copied_from_uuid":"00000000-0000-4000-8000-000000000001","created_by":"example"}}}'
Response
{
  "data": {
    "insert_scorecard_template_one": {
      "copied_from_uuid": "00000000-0000-4000-8000-000000000001",
      "created_at": "2024-01-15T09:30:00Z",
      "created_by": "example",
      "id": 12
    }
  }
}
Update

Update a scorecard_template

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation UpdateScorecardTemplate($id: Int!, $changes: scorecard_template_set_input!) {\n  update_scorecard_template(where: {id: {_eq: $id}}, _set: $changes) {\n    affected_rows\n    returning {\n      id\n    copied_from_uuid\n    created_at\n    created_by\n    }\n  }\n}","variables":{"changes":{"copied_from_uuid":"00000000-0000-4000-8000-000000000001","created_by":"example"},"id":12}}'
Response
{
  "data": {
    "update_scorecard_template": {
      "affected_rows": 1,
      "returning": [
        {
          "copied_from_uuid": "00000000-0000-4000-8000-000000000001",
          "created_at": "2024-01-15T09:30:00Z",
          "created_by": "example",
          "id": 12
        }
      ]
    }
  }
}

Scorecard template versions

scorecard_template_version #

Templates are versioned so in-flight evaluations keep the question set they started with even after the template is later edited. Read a version to see its areas and weighted items.

created_at
timestamptz!
created_by
String!
id
Int!
instance_id
Int!
rank
jsonb!
scorecard_template
scorecard_template!
An object relationship
scorecard_template_id
Int!
scorecard_templates
[scorecard_template!]!
An array relationship
scorecard_templates_aggregate
scorecard_template_aggregate!
An aggregate relationship
scorecards
[scorecard!]!
An array relationship
scorecards_aggregate
scorecard_aggregate!
An aggregate relationship
updated_at
timestamptz!
updated_by
String!
version
Int!

Filter any list query with where: over the same columns — see the Read example below.

Read & query

List scorecard_template_versions

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query ListScorecardTemplateVersion {\n  scorecard_template_version(limit: 10) {\n    id\n    created_at\n    created_by\n    instance_id\n  }\n}"}'
Response
{
  "data": {
    "scorecard_template_version": [
      {
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "id": 30,
        "instance_id": 1
      },
      {
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "id": 31,
        "instance_id": 1
      }
    ]
  }
}

Get one by id

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query GetScorecardTemplateVersion($id: Int!) {\n  scorecard_template_version(where: {id: {_eq: $id}}) {\n    id\n    created_at\n    created_by\n    instance_id\n  }\n}","variables":{"id":30}}'
Response
{
  "data": {
    "scorecard_template_version": [
      {
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "id": 30,
        "instance_id": 1
      }
    ]
  }
}
Create

Insert a scorecard_template_version

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation CreateScorecardTemplateVersion($object: scorecard_template_version_insert_input!) {\n  insert_scorecard_template_version_one(object: $object) {\n    id\n    created_at\n    created_by\n    instance_id\n  }\n}","variables":{"object":{"created_by":"example","instance_id":1}}}'
Response
{
  "data": {
    "insert_scorecard_template_version_one": {
      "created_at": "2024-01-15T09:30:00Z",
      "created_by": "example",
      "id": 30,
      "instance_id": 1
    }
  }
}
Update

Update a scorecard_template_version

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation UpdateScorecardTemplateVersion($id: Int!, $changes: scorecard_template_version_set_input!) {\n  update_scorecard_template_version(where: {id: {_eq: $id}}, _set: $changes) {\n    affected_rows\n    returning {\n      id\n    created_at\n    created_by\n    instance_id\n    }\n  }\n}","variables":{"changes":{"created_by":"example","instance_id":1},"id":30}}'
Response
{
  "data": {
    "update_scorecard_template_version": {
      "affected_rows": 1,
      "returning": [
        {
          "created_at": "2024-01-15T09:30:00Z",
          "created_by": "example",
          "id": 30,
          "instance_id": 1
        }
      ]
    }
  }
}

Email templates

email_template #

Email templates back the messages Raindrop sends suppliers — most importantly the event invitation. Read the library to pick the template an invite send will use.

created_at
timestamptz!
created_by
String!
data_structure
jsonb!
data_structure_history
jsonb!
id
Int!
instance_id
Int!
is_managed
Boolean!
name
String!
template
String!
updated_at
timestamptz!
updated_by
String!

Filter any list query with where: over the same columns — see the Read example below.

Read & query

List email_templates

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query ListEmailTemplate {\n  email_template(limit: 10) {\n    id\n    created_at\n    created_by\n    data_structure\n  }\n}"}'
Response
{
  "data": {
    "email_template": [
      {
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "data_structure": {},
        "id": 7
      },
      {
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "data_structure": {},
        "id": 8
      }
    ]
  }
}

Get one by id

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query GetEmailTemplate($id: Int!) {\n  email_template(where: {id: {_eq: $id}}) {\n    id\n    created_at\n    created_by\n    data_structure\n  }\n}","variables":{"id":7}}'
Response
{
  "data": {
    "email_template": [
      {
        "created_at": "2024-01-15T09:30:00Z",
        "created_by": "example",
        "data_structure": {},
        "id": 7
      }
    ]
  }
}
Create

Insert a email_template

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation CreateEmailTemplate($object: email_template_insert_input!) {\n  insert_email_template_one(object: $object) {\n    id\n    created_at\n    created_by\n    data_structure\n  }\n}","variables":{"object":{"created_by":"example","data_structure":{}}}}'
Response
{
  "data": {
    "insert_email_template_one": {
      "created_at": "2024-01-15T09:30:00Z",
      "created_by": "example",
      "data_structure": {},
      "id": 7
    }
  }
}
Update

Update a email_template

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation UpdateEmailTemplate($id: Int!, $changes: email_template_set_input!) {\n  update_email_template(where: {id: {_eq: $id}}, _set: $changes) {\n    affected_rows\n    returning {\n      id\n    created_at\n    created_by\n    data_structure\n    }\n  }\n}","variables":{"changes":{"created_by":"example","data_structure":{}},"id":7}}'
Response
{
  "data": {
    "update_email_template": {
      "affected_rows": 1,
      "returning": [
        {
          "created_at": "2024-01-15T09:30:00Z",
          "created_by": "example",
          "data_structure": {},
          "id": 7
        }
      ]
    }
  }
}

Purchase Orders

2 entities

Purchase orders

po_header #

The purchase order itself — supplier, currency, dates, totals, and approval state. Read POs to track committed spend; write to cut a new order. Line-level detail lives on po_line.

amount
numeric
A computed field, executes function "rd_po_header_amount"
amount_default_currency
numeric
A computed field, executes function "rd_po_header_amount_default_currency"
amount_remaining
numeric
approved_at
timestamptz
bill_to
jsonb
A computed field, executes function "rd_po_header_bill_to"
bill_to_business_address_id
Int
bill_to_business_id
Int
businessBillTo
business
An object relationship
businessShipTo
business
An object relationship
businessSupplier
business
An object relationship
buyer
user
An object relationship
buyer_id
String
buyer_jsonb
jsonb
contract_id
Int
created_at
timestamptz!
created_by
String!
created_by_instance_id
Int
created_by_user
user
An object relationship
created_by_user_jsonb
jsonb
data
jsonb!
department_id
Int
distribution
String
early_payment
String
entity_id
Int
entity_string
String
erp
String
erp_error
String
external_id
String
external_po_number
String
funding_department_id
Int
id
Int!
instance_business_relationship
instance_business_relationship
An object relationship
instance_business_relationship_id
Int
instance_business_relationship_site_id
Int
instance_id
Int!
invoiced_amount
numeric
A computed field, executes function "rd_po_header_invoiced_amount"
invoicing_instructions
String
is_api
Boolean!
is_archived
Boolean!
is_deleted
Boolean!
is_max_rev
Boolean
A computed field, executes function "rd_po_header_is_max_rev"
managing_department_id
Int
metadata
jsonb
notes
String
payment_terms
String!
po_headers
[po_header!]!
An array relationship
po_headers_aggregate
po_header_aggregate!
An aggregate relationship
po_lines
[po_line!]!
An array relationship
po_lines_aggregate
po_line_aggregate!
An aggregate relationship
po_number
String!
punchout_id
Int
requester_id
String
requester_jsonb
jsonb
rev
Int!
ship_from_business_addresses
jsonb
A computed field, executes function "rd_po_header_ship_from_business_addresses"
ship_to
jsonb
A computed field, executes function "rd_po_header_ship_to"
ship_to_business_address_id
Int
ship_to_business_address_uuid
uuid
ship_to_business_addresses
jsonb
A computed field, executes function "rd_po_header_ship_to_business_addresses"
ship_to_business_id
Int
sold_to_entity
String
sold_to_entity_id
Int
supplier_business_id
Int
supplier_contact
user
An object relationship
supplier_contact_id
String
supplier_contact_jsonb
jsonb
supplier_contacts
jsonb!
supplier_revision_status
String
terms_and_conditions
String
updated_at
timestamptz!
updated_by
String!
updated_by_instance_id
Int
updated_by_user_jsonb
jsonb
uuid
uuid!

Filter any list query with where: over the same columns — see the Read example below.

Read & query

List po_headers

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query ListPoHeader {\n  po_header(limit: 10) {\n    id\n    amount\n    amount_default_currency\n    amount_remaining\n  }\n}"}'
Response
{
  "data": {
    "po_header": [
      {
        "amount": 1,
        "amount_default_currency": 1,
        "amount_remaining": 1,
        "id": 4127
      },
      {
        "amount": 1,
        "amount_default_currency": 1,
        "amount_remaining": 1,
        "id": 4128
      }
    ]
  }
}

Get one by id

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query GetPoHeader($id: Int!) {\n  po_header(where: {id: {_eq: $id}}) {\n    id\n    amount\n    amount_default_currency\n    amount_remaining\n  }\n}","variables":{"id":4127}}'
Response
{
  "data": {
    "po_header": [
      {
        "amount": 1,
        "amount_default_currency": 1,
        "amount_remaining": 1,
        "id": 4127
      }
    ]
  }
}
Create

Insert a po_header

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation CreatePoHeader($object: po_header_insert_input!) {\n  insert_po_header_one(object: $object) {\n    id\n    amount\n    amount_default_currency\n    amount_remaining\n  }\n}","variables":{"object":{"amount":1,"amount_default_currency":1,"amount_remaining":1}}}'
Response
{
  "data": {
    "insert_po_header_one": {
      "amount": 1,
      "amount_default_currency": 1,
      "amount_remaining": 1,
      "id": 4127
    }
  }
}
Update

Update a po_header

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation UpdatePoHeader($id: Int!, $changes: po_header_set_input!) {\n  update_po_header(where: {id: {_eq: $id}}, _set: $changes) {\n    affected_rows\n    returning {\n      id\n    amount\n    amount_default_currency\n    amount_remaining\n    }\n  }\n}","variables":{"changes":{"amount":1,"amount_default_currency":1,"amount_remaining":1},"id":4127}}'
Response
{
  "data": {
    "update_po_header": {
      "affected_rows": 1,
      "returning": [
        {
          "amount": 1,
          "amount_default_currency": 1,
          "amount_remaining": 1,
          "id": 4127
        }
      ]
    }
  }
}

Purchase order lines

po_line #

One line on a purchase order — SKU, quantity, unit price, and the line total. Read lines to itemize an order; write to add or edit a line on an existing PO.

account
String
commodity_id
Int
created_at
timestamptz!
created_by
String!
data
jsonb!
discount_percent
numeric
erp
String
id
Int!
instance_id
Int!
is_canceled
Boolean!
item_code
String
item_description
String!
line_amount
numeric
line_number
Int!
list_price_per_unit
numeric
net_price_per_unit
numeric
po_header
po_header!
An object relationship
po_header_id
Int!
quantity
numeric
requester
user
An object relationship
requester_id
String
type
String
uom_code
String!
updated_at
timestamptz!
updated_by
String!
uuid
uuid!

Filter any list query with where: over the same columns — see the Read example below.

Read & query

List po_lines

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query ListPoLine {\n  po_line(limit: 10) {\n    id\n    account\n    commodity_id\n    created_at\n  }\n}"}'
Response
{
  "data": {
    "po_line": [
      {
        "account": "example",
        "commodity_id": 1,
        "created_at": "2024-01-15T09:30:00Z",
        "id": 1
      },
      {
        "account": "example",
        "commodity_id": 1,
        "created_at": "2024-01-15T09:30:00Z",
        "id": 2
      }
    ]
  }
}

Get one by id

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"query GetPoLine($id: Int!) {\n  po_line(where: {id: {_eq: $id}}) {\n    id\n    account\n    commodity_id\n    created_at\n  }\n}","variables":{"id":1}}'
Response
{
  "data": {
    "po_line": [
      {
        "account": "example",
        "commodity_id": 1,
        "created_at": "2024-01-15T09:30:00Z",
        "id": 1
      }
    ]
  }
}
Create

Insert a po_line

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation CreatePoLine($object: po_line_insert_input!) {\n  insert_po_line_one(object: $object) {\n    id\n    account\n    commodity_id\n    created_at\n  }\n}","variables":{"object":{"account":"example","commodity_id":1}}}'
Response
{
  "data": {
    "insert_po_line_one": {
      "account": "example",
      "commodity_id": 1,
      "created_at": "2024-01-15T09:30:00Z",
      "id": 1
    }
  }
}
Update

Update a po_line

curl https://${RAINDROP_API_HOST}/gql \
  -H "Authorization: Bearer ${RAINDROP_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"query":"mutation UpdatePoLine($id: Int!, $changes: po_line_set_input!) {\n  update_po_line(where: {id: {_eq: $id}}, _set: $changes) {\n    affected_rows\n    returning {\n      id\n    account\n    commodity_id\n    created_at\n    }\n  }\n}","variables":{"changes":{"account":"example","commodity_id":1},"id":1}}'
Response
{
  "data": {
    "update_po_line": {
      "affected_rows": 1,
      "returning": [
        {
          "account": "example",
          "commodity_id": 1,
          "created_at": "2024-01-15T09:30:00Z",
          "id": 1
        }
      ]
    }
  }
}

Sample responses are illustrative — synthetic data shaped like a real tenant, not live records.

Auto-provision an API key

Mint, rotate, or expire a key the same way the Raindrop System settings page does. See the auto-provision walkthrough.