subbydocs
Visit Subby Start building

Providers

Provider profile and business-type settings.

OpenAPI

https://sandbox-api.mysubbyapp.com/v1

PATCH/providers/me/vertical

Set the provider business type

Available while approval is pending, or once for an approved provider with no business type. An approved provider with an existing type receives 403 unless sending the current value.

Metered on successful live writes

Request example

curl --request PATCH \
  --url 'https://sandbox-api.mysubbyapp.com/v1/providers/me/vertical' \
  --header 'Authorization: Bearer sk_test_YOUR_SECRET_KEY'

Add a JSON body matching the request schema below and a Content-Type: application/json header.

Request body schema
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "vertical"
        ],
        "properties": {
          "vertical": {
            "type": "string",
            "enum": [
              "generic",
              "estate_management",
              "meal_plan",
              "gym_fitness",
              "insurance",
              "waste",
              "fuel",
              "laundry",
              "ecommerce"
            ]
          }
        }
      }
    }
  }
}

Responses

200 Business type saved or unchanged.
{
  "description": "Business type saved or unchanged."
}
403 Insufficient scope, or live access not enabled.
{
  "application/json": {
    "schema": {
      "type": "object",
      "required": [
        "success",
        "error"
      ],
      "properties": {
        "success": {
          "const": false
        },
        "error": {
          "type": "object",
          "required": [
            "type",
            "code",
            "message",
            "request_id"
          ],
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "authentication_error",
                "permission_error",
                "invalid_request_error",
                "state_error",
                "idempotency_error",
                "rate_limit_error",
                "api_error"
              ]
            },
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "param": {
              "type": [
                "string",
                "null"
              ]
            },
            "request_id": {
              "type": "string"
            },
            "doc_url": {
              "type": "string",
              "format": "uri"
            }
          }
        }
      }
    }
  }
}
PATCH/providers/{id}/vertical

Change a provider business type as an administrator

Records the previous and new types, timestamp, administrator and reason in the provider history.

Metered on successful live writes

Request example

curl --request PATCH \
  --url 'https://sandbox-api.mysubbyapp.com/v1/providers/{id}/vertical' \
  --header 'Authorization: Bearer sk_test_YOUR_SECRET_KEY'

Add a JSON body matching the request schema below and a Content-Type: application/json header.

Parameters

idpath · string · required

Request body schema
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "vertical",
          "reason"
        ],
        "properties": {
          "vertical": {
            "type": "string",
            "enum": [
              "generic",
              "estate_management",
              "meal_plan",
              "gym_fitness",
              "insurance",
              "waste",
              "fuel",
              "laundry",
              "ecommerce"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 5,
            "maxLength": 500
          }
        }
      }
    }
  }
}

Responses

200 Business type changed and recorded.
{
  "description": "Business type changed and recorded."
}
403 Insufficient scope, or live access not enabled.
{
  "application/json": {
    "schema": {
      "type": "object",
      "required": [
        "success",
        "error"
      ],
      "properties": {
        "success": {
          "const": false
        },
        "error": {
          "type": "object",
          "required": [
            "type",
            "code",
            "message",
            "request_id"
          ],
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "authentication_error",
                "permission_error",
                "invalid_request_error",
                "state_error",
                "idempotency_error",
                "rate_limit_error",
                "api_error"
              ]
            },
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "param": {
              "type": [
                "string",
                "null"
              ]
            },
            "request_id": {
              "type": "string"
            },
            "doc_url": {
              "type": "string",
              "format": "uri"
            }
          }
        }
      }
    }
  }
}