Stylists Endpoints¶
Stylists API endpoints.
Overview¶
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/stylists/ |
Read Stylists |
| POST | /api/v1/stylists/ |
Create Stylist |
| GET | /api/v1/stylists/{id} |
Read Stylist |
| PUT | /api/v1/stylists/{id} |
Update Stylist |
| DELETE | /api/v1/stylists/{id} |
Delete Stylist |
API Reference¶
Sartiq Backend Server - Stylists 0.1.0¶
stylists¶
GET /api/v1/stylists/¶
Read Stylists
Description
Retrieve stylists. Optionally filter by owner and public status.
When organization_id query param is provided, returns stylists belonging to that organization. Without organization_id, returns only personal stylists (not belonging to any organization).
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
OAuth2PasswordBearer |
header | string | N/A | No | |
limit |
query | integer | 100 | No | |
organization_id |
query | No | |||
owner_id |
query | No | |||
public |
query | No | |||
skip |
query | integer | 0 | No |
Responses
{
"id": "558dbd83-4757-4114-a5ef-a0bf35babf8e",
"created_at": "2022-04-13T15:42:05.901Z",
"updated_at": "2022-04-13T15:42:05.901Z",
"data": [
{
"id": "cf6ccb3b-efa7-4fbf-be36-35a28e448a24",
"created_at": "2022-04-13T15:42:05.901Z",
"updated_at": "2022-04-13T15:42:05.901Z",
"name": "string",
"styling_template_values": {
"AESTHETIC": "preppy-collegiate",
"COLOR_RULES": "BLACKBEAN/BLACK → black\nNAVY/DARKBLUE → navy...",
"FILLER_SPECIFIC_NOTES": "Real sneakers exist in catalog, use these first...",
"LAYERING_RULES": "Max 3-4 colors per look. Preppy combos encouraged...",
"OPTIONALITY_RULES": "Upper_layer optional if mid_layer provides enough visual interest...",
"SELECTION_LOGIC": "The core product MUST ALWAYS appear in the items array...",
"STYLING_DNA": "Silhouette: preppy-collegiate. Layering is key..."
},
"public": true,
"owner_id": "84d94d3b-3649-404d-b9ba-8d55d785cc19",
"underpinnings_query_template": null,
"brand": null,
"organization_id": null
}
],
"count": 0
}
Schema of the response body
{
"properties": {
"id": {
"type": "string",
"format": "uuid",
"title": "Id"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"updated_at": {
"type": "string",
"format": "date-time",
"title": "Updated At"
},
"data": {
"items": {
"$ref": "#/components/schemas/StylistPublic"
},
"type": "array",
"title": "Data"
},
"count": {
"type": "integer",
"title": "Count"
}
},
"type": "object",
"required": [
"data",
"count"
],
"title": "StylistsPublic"
}
POST /api/v1/stylists/¶
Create Stylist
Description
Create new stylist.
Admins can specify owner_id to create stylists for other users. Non-admins will get an error if they try to set owner_id.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
OAuth2PasswordBearer |
header | string | N/A | No | |
organization_id |
query | No |
Request body
{
"name": "string",
"styling_template_values": {
"AESTHETIC": "preppy-collegiate",
"COLOR_RULES": "BLACKBEAN/BLACK → black\nNAVY/DARKBLUE → navy...",
"FILLER_SPECIFIC_NOTES": "Real sneakers exist in catalog, use these first...",
"LAYERING_RULES": "Max 3-4 colors per look. Preppy combos encouraged...",
"OPTIONALITY_RULES": "Upper_layer optional if mid_layer provides enough visual interest...",
"SELECTION_LOGIC": "The core product MUST ALWAYS appear in the items array...",
"STYLING_DNA": "Silhouette: preppy-collegiate. Layering is key..."
},
"public": true,
"owner_id": null,
"underpinnings_query_template": null,
"brand": null,
"organization_id": null
}
Schema of the request body
{
"properties": {
"name": {
"type": "string",
"maxLength": 255,
"title": "Name",
"description": "Name of the stylist"
},
"styling_template_values": {
"$ref": "#/components/schemas/StylistTemplateValuesSchema",
"description": "Template values for AI prompt composition"
},
"public": {
"type": "boolean",
"title": "Public",
"description": "Whether the stylist is publicly accessible",
"default": false
},
"owner_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Owner Id",
"description": "Owner user ID. Only admins can set this. If not provided, defaults to current user."
},
"underpinnings_query_template": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Underpinnings Query Template",
"description": "Custom WHERE clause for product filtering. Admin-only. \nAvailable wildcards (use :wildcard syntax for SQLAlchemy bound parameters):\n- :core_id (UUID) - Core product ID\n- :core_brand (string) - Core product brand\n- :core_brand_collection (string) - Core product brand collection\n- :core_gender (string) - Core product gender (MALE/FEMALE/UNISEX)\n- :core_season (string) - Core product season\n- :core_year (int) - Core product year\n- :core_in_store_date (datetime) - Core product in-store date\n- :core_product_family (string) - Core product family (APPAREL/FOOTWEAR/ACCESSORIES/BEAUTY)\n- :core_product_type (string) - Core product type\n- :core_age_class (string) - Core product age class\n- :core_owner_id (UUID) - Core product owner ID\n- :core_theme (string) - Core product theme\n- :subject_gender (string) - Subject's gender (MALE/FEMALE/OTHER)\n\nExample: \"product.brand = :core_brand AND product.season = :core_season\"\n"
},
"brand": {
"anyOf": [
{
"type": "string",
"maxLength": 255
},
{
"type": "null"
}
],
"title": "Brand",
"description": "Brand this stylist is specialized for. Used for automatic selection."
},
"organization_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Organization Id",
"description": "Organization this stylist belongs to"
}
},
"type": "object",
"required": [
"name",
"styling_template_values"
],
"title": "StylistCreate",
"description": "Schema for creating a new stylist."
}
Responses
{
"id": "d11cb907-bb7c-4fd3-a4fa-a711a30faaf5",
"created_at": "2022-04-13T15:42:05.901Z",
"updated_at": "2022-04-13T15:42:05.901Z",
"name": "string",
"styling_template_values": {
"AESTHETIC": "preppy-collegiate",
"COLOR_RULES": "BLACKBEAN/BLACK → black\nNAVY/DARKBLUE → navy...",
"FILLER_SPECIFIC_NOTES": "Real sneakers exist in catalog, use these first...",
"LAYERING_RULES": "Max 3-4 colors per look. Preppy combos encouraged...",
"OPTIONALITY_RULES": "Upper_layer optional if mid_layer provides enough visual interest...",
"SELECTION_LOGIC": "The core product MUST ALWAYS appear in the items array...",
"STYLING_DNA": "Silhouette: preppy-collegiate. Layering is key..."
},
"public": true,
"owner_id": "f00336b8-37be-4cf1-bbed-4628542dca0e",
"underpinnings_query_template": null,
"brand": null,
"organization_id": null
}
Schema of the response body
{
"properties": {
"id": {
"type": "string",
"format": "uuid",
"title": "Id"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"updated_at": {
"type": "string",
"format": "date-time",
"title": "Updated At"
},
"name": {
"type": "string",
"title": "Name"
},
"styling_template_values": {
"$ref": "#/components/schemas/StylistTemplateValuesSchema"
},
"public": {
"type": "boolean",
"title": "Public"
},
"owner_id": {
"type": "string",
"format": "uuid",
"title": "Owner Id"
},
"underpinnings_query_template": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Underpinnings Query Template"
},
"brand": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Brand"
},
"organization_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Organization Id"
}
},
"type": "object",
"required": [
"id",
"created_at",
"updated_at",
"name",
"styling_template_values",
"public",
"owner_id"
],
"title": "StylistPublic",
"description": "Schema for stylist public response."
}
GET /api/v1/stylists/{id}¶
Read Stylist
Description
Get stylist by ID.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
OAuth2PasswordBearer |
header | string | N/A | No | |
id |
path | string | No | ||
organization_id |
query | No |
Responses
{
"id": "b38e8f07-c9c1-450f-9881-51fde90a2ae1",
"created_at": "2022-04-13T15:42:05.901Z",
"updated_at": "2022-04-13T15:42:05.901Z",
"name": "string",
"styling_template_values": {
"AESTHETIC": "preppy-collegiate",
"COLOR_RULES": "BLACKBEAN/BLACK → black\nNAVY/DARKBLUE → navy...",
"FILLER_SPECIFIC_NOTES": "Real sneakers exist in catalog, use these first...",
"LAYERING_RULES": "Max 3-4 colors per look. Preppy combos encouraged...",
"OPTIONALITY_RULES": "Upper_layer optional if mid_layer provides enough visual interest...",
"SELECTION_LOGIC": "The core product MUST ALWAYS appear in the items array...",
"STYLING_DNA": "Silhouette: preppy-collegiate. Layering is key..."
},
"public": true,
"owner_id": "d179fa08-3958-414a-89f9-923b6b110576",
"underpinnings_query_template": null,
"brand": null,
"organization_id": null
}
Schema of the response body
{
"properties": {
"id": {
"type": "string",
"format": "uuid",
"title": "Id"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"updated_at": {
"type": "string",
"format": "date-time",
"title": "Updated At"
},
"name": {
"type": "string",
"title": "Name"
},
"styling_template_values": {
"$ref": "#/components/schemas/StylistTemplateValuesSchema"
},
"public": {
"type": "boolean",
"title": "Public"
},
"owner_id": {
"type": "string",
"format": "uuid",
"title": "Owner Id"
},
"underpinnings_query_template": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Underpinnings Query Template"
},
"brand": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Brand"
},
"organization_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Organization Id"
}
},
"type": "object",
"required": [
"id",
"created_at",
"updated_at",
"name",
"styling_template_values",
"public",
"owner_id"
],
"title": "StylistPublic",
"description": "Schema for stylist public response."
}
PUT /api/v1/stylists/{id}¶
Update Stylist
Description
Update a stylist.
Admins can update any stylist and transfer ownership via owner_id. Non-admins can only update their own stylists and cannot change owner_id.
Organization transfer: - To transfer a personal stylist to an organization: set organization_id to the target org ID - To transfer a stylist out of an organization: set organization_id to None (org owner only)
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
OAuth2PasswordBearer |
header | string | N/A | No | |
id |
path | string | No | ||
organization_id |
query | No |
Request body
{
"name": null,
"styling_template_values": null,
"public": null,
"owner_id": null,
"underpinnings_query_template": null,
"brand": null,
"organization_id": null
}
Schema of the request body
{
"properties": {
"name": {
"anyOf": [
{
"type": "string",
"maxLength": 255
},
{
"type": "null"
}
],
"title": "Name",
"description": "Name of the stylist"
},
"styling_template_values": {
"anyOf": [
{
"$ref": "#/components/schemas/StylistTemplateValuesSchema"
},
{
"type": "null"
}
],
"description": "Template values for AI prompt composition"
},
"public": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Public",
"description": "Whether the stylist is publicly accessible"
},
"owner_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Owner Id",
"description": "Transfer ownership to another user. Only admins can set this."
},
"underpinnings_query_template": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Underpinnings Query Template",
"description": "Custom WHERE clause for product filtering. Admin-only. \nAvailable wildcards (use :wildcard syntax for SQLAlchemy bound parameters):\n- :core_id (UUID) - Core product ID\n- :core_brand (string) - Core product brand\n- :core_brand_collection (string) - Core product brand collection\n- :core_gender (string) - Core product gender (MALE/FEMALE/UNISEX)\n- :core_season (string) - Core product season\n- :core_year (int) - Core product year\n- :core_in_store_date (datetime) - Core product in-store date\n- :core_product_family (string) - Core product family (APPAREL/FOOTWEAR/ACCESSORIES/BEAUTY)\n- :core_product_type (string) - Core product type\n- :core_age_class (string) - Core product age class\n- :core_owner_id (UUID) - Core product owner ID\n- :core_theme (string) - Core product theme\n- :subject_gender (string) - Subject's gender (MALE/FEMALE/OTHER)\n\nExample: \"product.brand = :core_brand AND product.season = :core_season\"\n"
},
"brand": {
"anyOf": [
{
"type": "string",
"maxLength": 255
},
{
"type": "null"
}
],
"title": "Brand",
"description": "Brand this stylist is specialized for. Used for automatic selection."
},
"organization_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Organization Id",
"description": "Organization to transfer this stylist to"
}
},
"type": "object",
"title": "StylistUpdate",
"description": "Schema for updating an existing stylist."
}
Responses
{
"id": "ca947143-26b3-4bad-b2d5-18ec98b98598",
"created_at": "2022-04-13T15:42:05.901Z",
"updated_at": "2022-04-13T15:42:05.901Z",
"name": "string",
"styling_template_values": {
"AESTHETIC": "preppy-collegiate",
"COLOR_RULES": "BLACKBEAN/BLACK → black\nNAVY/DARKBLUE → navy...",
"FILLER_SPECIFIC_NOTES": "Real sneakers exist in catalog, use these first...",
"LAYERING_RULES": "Max 3-4 colors per look. Preppy combos encouraged...",
"OPTIONALITY_RULES": "Upper_layer optional if mid_layer provides enough visual interest...",
"SELECTION_LOGIC": "The core product MUST ALWAYS appear in the items array...",
"STYLING_DNA": "Silhouette: preppy-collegiate. Layering is key..."
},
"public": true,
"owner_id": "caa93eb9-7b06-464e-9ae2-b16338bc09e2",
"underpinnings_query_template": null,
"brand": null,
"organization_id": null
}
Schema of the response body
{
"properties": {
"id": {
"type": "string",
"format": "uuid",
"title": "Id"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"updated_at": {
"type": "string",
"format": "date-time",
"title": "Updated At"
},
"name": {
"type": "string",
"title": "Name"
},
"styling_template_values": {
"$ref": "#/components/schemas/StylistTemplateValuesSchema"
},
"public": {
"type": "boolean",
"title": "Public"
},
"owner_id": {
"type": "string",
"format": "uuid",
"title": "Owner Id"
},
"underpinnings_query_template": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Underpinnings Query Template"
},
"brand": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Brand"
},
"organization_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Organization Id"
}
},
"type": "object",
"required": [
"id",
"created_at",
"updated_at",
"name",
"styling_template_values",
"public",
"owner_id"
],
"title": "StylistPublic",
"description": "Schema for stylist public response."
}
DELETE /api/v1/stylists/{id}¶
Delete Stylist
Description
Delete a stylist.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
OAuth2PasswordBearer |
header | string | N/A | No | |
id |
path | string | No | ||
organization_id |
query | No |
Responses
Schemas¶
HTTPValidationError¶
| Name | Type | Description |
|---|---|---|
detail |
Array<ValidationError> |
Message¶
| Name | Type | Description |
|---|---|---|
message |
string |
StylistCreate¶
| Name | Type | Description |
|---|---|---|
brand |
Brand this stylist is specialized for. Used for automatic selection. | |
name |
string | Name of the stylist |
organization_id |
Organization this stylist belongs to | |
owner_id |
Owner user ID. Only admins can set this. If not provided, defaults to current user. | |
public |
boolean | Whether the stylist is publicly accessible |
styling_template_values |
StylistTemplateValuesSchema | Template values for AI prompt composition |
underpinnings_query_template |
Custom WHERE clause for product filtering. Admin-only. Available wildcards (use :wildcard syntax for SQLAlchemy bound parameters): - :core_id (UUID) - Core product ID - :core_brand (string) - Core product brand - :core_brand_collection (string) - Core product brand collection - :core_gender (string) - Core product gender (MALE/FEMALE/UNISEX) - :core_season (string) - Core product season - :core_year (int) - Core product year - :core_in_store_date (datetime) - Core product in-store date - :core_product_family (string) - Core product family (APPAREL/FOOTWEAR/ACCESSORIES/BEAUTY) - :core_product_type (string) - Core product type - :core_age_class (string) - Core product age class - :core_owner_id (UUID) - Core product owner ID - :core_theme (string) - Core product theme - :subject_gender (string) - Subject's gender (MALE/FEMALE/OTHER) Example: "product.brand = :core_brand AND product.season = :core_season" |
StylistPublic¶
| Name | Type | Description |
|---|---|---|
brand |
||
created_at |
string(date-time) | |
id |
string(uuid) | |
name |
string | |
organization_id |
||
owner_id |
string(uuid) | |
public |
boolean | |
styling_template_values |
StylistTemplateValuesSchema | |
underpinnings_query_template |
||
updated_at |
string(date-time) |
StylistsPublic¶
| Name | Type | Description |
|---|---|---|
count |
integer | |
created_at |
string(date-time) | |
data |
Array<StylistPublic> | |
id |
string(uuid) | |
updated_at |
string(date-time) |
StylistTemplateValuesSchema¶
| Name | Type | Description |
|---|---|---|
AESTHETIC |
string | Style aesthetic (e.g., 'preppy-collegiate', 'minimalist', 'streetwear') |
COLOR_RULES |
string | Color name mappings (e.g., 'BLACKBEAN/BLACK → black') |
FILLER_SPECIFIC_NOTES |
string | Guidance on when to use filler products vs catalog items |
LAYERING_RULES |
string | Color limits, print mixing rules, bottoms variety guidelines |
OPTIONALITY_RULES |
string | Rules for what's optional in a look (layers, accessories) |
SELECTION_LOGIC |
string | Product pairing rules, role assignments, track set matching rules |
STYLING_DNA |
string | Core styling rules: silhouettes, layering philosophy, attitude, footwear preferences |
StylistUpdate¶
| Name | Type | Description |
|---|---|---|
brand |
Brand this stylist is specialized for. Used for automatic selection. | |
name |
Name of the stylist | |
organization_id |
Organization to transfer this stylist to | |
owner_id |
Transfer ownership to another user. Only admins can set this. | |
public |
Whether the stylist is publicly accessible | |
styling_template_values |
Template values for AI prompt composition | |
underpinnings_query_template |
Custom WHERE clause for product filtering. Admin-only. Available wildcards (use :wildcard syntax for SQLAlchemy bound parameters): - :core_id (UUID) - Core product ID - :core_brand (string) - Core product brand - :core_brand_collection (string) - Core product brand collection - :core_gender (string) - Core product gender (MALE/FEMALE/UNISEX) - :core_season (string) - Core product season - :core_year (int) - Core product year - :core_in_store_date (datetime) - Core product in-store date - :core_product_family (string) - Core product family (APPAREL/FOOTWEAR/ACCESSORIES/BEAUTY) - :core_product_type (string) - Core product type - :core_age_class (string) - Core product age class - :core_owner_id (UUID) - Core product owner ID - :core_theme (string) - Core product theme - :subject_gender (string) - Subject's gender (MALE/FEMALE/OTHER) Example: "product.brand = :core_brand AND product.season = :core_season" |
ValidationError¶
| Name | Type | Description |
|---|---|---|
ctx |
||
input |
||
loc |
Array<> | |
msg |
string | |
type |
string |
Security schemes¶
| Name | Type | Scheme | Description |
|---|---|---|---|
| OAuth2PasswordBearer | oauth2 |