Skip to content

Human routes: hold, invite, onboard, recruit

The Human Verbs hold, invite, onboard, recruit as api.sb routes, with inputs, result, refusals and an example.

Reference for Human, one group of Human routes.

Human.hold

Hold sets aside part of a supplying Human’s earned balance against an open Dispute or an Order inside its clearance period. Verb page.

Text
POST /{namespace}/humans/{human}/hold

Path: human. Body, as JSON: the other inputs. Emits Human.held.

Inputs

InputTypeRequiredDescription
humanHumanrequiredThe payee.
amountmoneyrequiredThe amount to hold.
causestringrequiredThe Order or Dispute the hold cites.

Returns

OutputTypeRequiredDescription
humanHumanrequiredThe payee, with the held amount recorded.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X POST https://api.sb/leaseline.app/humans/human_EeCsrv4AOW/hold \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount":{"amount":29,"currency":"USD"},"cause":"Example cause"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "human": {
    "$id": "https://api.sb/leaseline.app/humans/human_EeCsrv4AOW",
    "$type": "Human",
    "name": "Dana Okafor",
    "email": "dana@leaseline.app"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Human.hold",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Human.invite

Invite asks a person to join a Startup in a named Role, sharing that Role’s work with its Agent. Verb page.

Text
POST /{namespace}/humans/invite

Body, as JSON: the inputs. Emits Human.invited.

Inputs

InputTypeRequiredDescription
emailemailrequiredWhere the invitation goes.
roleRolerequiredThe Role offered.
accessstringThe Access Level the person holds in the app, apart from the Role: admin, member or viewer. Owner is never invited.

Returns

OutputTypeRequiredDescription
humanHumanrequiredThe invited Human.

Refuses when

CheckErrorFixThen call
The input does not match the schema of the operation.invalid-inputRead the schema of the operation, then send every required field with the right type.None.
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.
The record changed since it was read, so the write would overwrite a newer version.conflictRead the record again, then retry the write against its current state.None.

Example

Terminal
curl -X POST https://api.sb/leaseline.app/humans/invite \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"dana@leaseline.app","role":"role_oloMFMUeCH"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "human": {
    "$id": "https://api.sb/leaseline.app/humans/human_SUMqLjx79R",
    "$type": "Human",
    "name": "Dana Okafor",
    "email": "dana@leaseline.app"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Human.invite",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Human.onboard

Onboard admits a recruited Human to supply work once their identity, Credentials and payout details verify. Verb page.

Text
POST /{namespace}/humans/{human}/onboard

Path: human. Emits Human.onboarded.

Inputs

InputTypeRequiredDescription
humanHumanrequiredThe recruited Human.

Returns

OutputTypeRequiredDescription
humanHumanrequiredThe Human, able to take Tasks.

Refuses when

CheckErrorFixThen call
The input does not match the schema of the operation.invalid-inputRead the schema of the operation, then send every required field with the right type.None.
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.
The record is not in a state that allows this Verb, so the call is refused.refusedRead the record, run the Verb that moves it to an allowed state, then retry.None.

Example

Terminal
curl -X POST https://api.sb/leaseline.app/humans/human_EeCsrv4AOW/onboard \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "human": {
    "$id": "https://api.sb/leaseline.app/humans/human_EeCsrv4AOW",
    "$type": "Human",
    "name": "Dana Okafor",
    "email": "dana@leaseline.app"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Human.onboard",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Human.recruit

Recruit invites a person to supply credentialed work to a Startup through its supply App. Verb page.

Text
POST /{namespace}/humans/recruit

Body, as JSON: the inputs. Emits Human.recruited.

Inputs

InputTypeRequiredDescription
emailemailrequiredWhere the invitation goes.
credentialstringThe Credential the work requires.

Returns

OutputTypeRequiredDescription
humanHumanrequiredThe recruited Human.

Refuses when

CheckErrorFixThen call
The input does not match the schema of the operation.invalid-inputRead the schema of the operation, then send every required field with the right type.None.
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.
The record is not in a state that allows this Verb, so the call is refused.refusedRead the record, run the Verb that moves it to an allowed state, then retry.None.

Example

Terminal
curl -X POST https://api.sb/leaseline.app/humans/recruit \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"dana@leaseline.app"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "human": {
    "$id": "https://api.sb/leaseline.app/humans/human_SUMqLjx79R",
    "$type": "Human",
    "name": "Dana Okafor",
    "email": "dana@leaseline.app"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Human.recruit",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}