Skip to content

Partner routes: update, delete

The Partner Verbs update, delete as api.sb routes, with inputs, result, refusals and an example.

Reference for Partner, one group of Partner routes.

Partner.update

Changes the given properties of a Partner. Verb page.

Text
PATCH /{namespace}/partners/{id}

Path: id. Body, as JSON: the other inputs. Emits Partner.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Partner.
namestringThe name it trades under.
hostnamestringThe web domain that keys it.
sidestringOne of supply, distribution, or both.

Returns

OutputTypeRequiredDescription
partnerPartnerrequiredThe Partner.

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 PATCH https://api.sb/leaseline.app/partners/partner_YcEOEgSexq \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"side":"supply"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "partner": {
    "$id": "https://api.sb/leaseline.app/partners/partner_YcEOEgSexq",
    "$type": "Partner",
    "name": "Leaseline",
    "side": "supply"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Partner.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Partner.delete

Deletes a Partner: a soft delete that keeps its history, undone by Thing.restore. Verb page.

Text
DELETE /{namespace}/partners/{id}

Path: id. Emits Partner.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Partner.

Returns

OutputTypeRequiredDescription
partnerPartnerrequiredThe Partner.

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 DELETE https://api.sb/leaseline.app/partners/partner_YcEOEgSexq \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "partner": {
    "$id": "https://api.sb/leaseline.app/partners/partner_YcEOEgSexq",
    "$type": "Partner",
    "name": "Leaseline",
    "side": "supply"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Partner.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}