Schema
Schema Discovery API
Discover available fields, validation rules, and data types for each resource type.
GET
/v1/schema/:resourceGet the field schema for a resource type
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| resource | string | Resource type: order, product, inventory, customer |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| grouped | boolean | false | Group fields by category |
| category | string | - | Filter by category (core, customer, shipping, payment, metadata) |
| required | boolean | - | Filter to required fields only |
curl -X GET "https://gateway.regentherapy.com/api/v1/schema/order?grouped=true" \
-H "X-API-Key: your_api_key"Field Schema Object
Structure of each field in the schema response
| Field | Type | Description |
|---|---|---|
| fieldPath | string | Full path to the field (e.g., "items[].sku", "shippingAddress.city") |
| fieldName | string | Field name without path |
| displayName | string | Human-readable label |
| description | string | Detailed description of the field |
| dataType | string | Data type: string, number, boolean, date, array, object |
| isRequired | boolean | Whether the field is required |
| isArray | boolean | Whether the field is an array |
| validationPattern | string | Regex pattern for validation (if applicable) |
| validationMessage | string | Error message when validation fails |
| minValue / maxValue | number | Min/max for numeric fields |
| minLength / maxLength | number | Min/max length for string fields |
| enumValues | array | Allowed values (if restricted) |
| exampleValue | string | Example value for documentation |
| category | string | Field category (core, customer, shipping, etc.) |
| isDeprecated | boolean | Whether the field is deprecated |
Available Resource Types
| Resource | Description | Categories |
|---|---|---|
| order | Order submission fields | core, customer, shipping, payment, pricing, metadata |
| product | Product creation/update fields | core, pricing, inventory, shipping, classification, status |
| inventory | Inventory adjustment fields | core, location, metadata |
| customer | Customer data fields | core, contact, address, metadata |