Skip to content

Customer routes: activate, exempt

The Customer Verbs activate, exempt as api.sb routes, with inputs, result, refusals and an example.

Reference for Customer, one group of Customer routes.

Customer.activate

Activate marks a Customer activated on an Offer once its declared activation Event reaches the count within the window. Verb page.

Text
POST /{namespace}/customers/{customer}/activate

Path: customer. Body, as JSON: the other inputs. Emits Customer.activated.

Inputs

InputTypeRequiredDescription
customerCustomerrequiredThe Customer who crossed the line.
offerOfferrequiredThe Offer whose activation was met.

Returns

OutputTypeRequiredDescription
customerCustomerrequiredThe activated Customer.

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/customers/cus_K1BROJhqzZ/activate \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"offer":"offer_2hzYe1ERo0"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "customer": {
    "$id": "https://api.sb/leaseline.app/customers/cus_K1BROJhqzZ",
    "$type": "Customer",
    "since": "2026-04-13T08:00:00Z"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Customer.activate",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Customer.exempt

Exempt records a Customer’s exemption or resale certificate, verifies it, and stops tax on its Orders where the certificate applies. Verb page.

Text
POST /{namespace}/customers/{customer}/exempt

Path: customer. Body, as JSON: the other inputs. Emits Customer.exempted.

Inputs

InputTypeRequiredDescription
customerCustomerrequiredThe buying Customer.
certificateFilerequiredThe certificate as uploaded through the Portal or received by email.
jurisdictionsstring[]requiredWhere the certificate applies, such as US-TX.
expiresOndateWhen the certificate lapses; empty when it does not.

Returns

OutputTypeRequiredDescription
credentialCredentialrequiredThe certificate, held by the Customer’s Organization.
customerCustomerrequiredThe Customer, now exempt where the certificate applies.

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/customers/cus_K1BROJhqzZ/exempt \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"certificate":"file_V1AuhyCTsH","jurisdictions":["US-TX"]}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "credential": {
    "$id": "https://api.sb/leaseline.app/credentials/credential_Abb9zatRR1",
    "$type": "Credential",
    "issuer": "Example issuer",
    "jurisdiction": "US-DE"
  },
  "customer": {
    "$id": "https://api.sb/leaseline.app/customers/cus_K1BROJhqzZ",
    "$type": "Customer",
    "since": "2026-04-13T08:00:00Z"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Customer.exempt",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}