API Product Integration
This page explains how to create and update product data using the AI Image Service API by Sizebay. You can also explore and test the endpoints in the Swagger documentation.
1. Create Product
POST
https://ai-image-service-dev.internalsizebay.com/products
Description: Submits a product for asynchronous processing. A callback will notify success or failure after processing.
Headers
x-api-key
string
β
API key for authentication
Body Parameters
tenantId
number
β
Tenant (client) ID
collectionName
string
β
Product collection name
processType
string
β
Type: SIMILAR
, COMPLEMENTARY
, ALL
brandName
string
β
Brand name
specialtyFromPersona
string
β
Product style (e.g., "casual fashion")
productItem.id
string
β
Unique ID of the variant (e.g. color + size)
productItem.itemGroupId
string
β
Common ID for all variants of a product
localizations
object
β
Language-specific title, link, availability
pricing
object
β
Prices by currency (price, salePrice, date)
productType
string
β
Category hierarchy
imageLink
string
β
Main image of the variant
additionalImageLinks
array
Optional
Additional images for the variant
gender
string
β
male
, female
, unisex
ageGroup
string
β
adult
, kids
size
string
β
Sizes, comma-separated (e.g., S,M,L
)
sizeSystem
string
β
Size system (BR
, US
, etc.)
color
string
β
Product color
gtin
string
Optional
Barcode (Global Trade Item Number)
Callback Notification
After processing, a POST request is sent to your callback URL:
{
"productId": "380145e972ee",
"status": "success",
"message": "Required only if status is 'error'"
}
Header
Authorization
will be included in the request.
Payload Example
{
"tenantId": 1234,
"collectionName": "sizebay-collection",
"processType": "SIMILAR",
"brandName": "Sizebay",
"specialtyFromPersona": "casual fashion",
"productItem": {
"id": "380145e972ee",
"itemGroupId": "edb1e435d172",
"localizations": {
"en-US": {
"title": "Classic White T-Shirt",
"availability": "in stock",
"link": "www.example.com/us/product"
},
"pt-BR": {
"title": "Camiseta Branca",
"availability": "in stock",
"link": "www.example.com/br/product"
}
},
"pricing": {
"USD": {
"price": 25,
"salePrice": 19.99,
"salePriceEffectiveDate": "2024-06-10T00:00:00/2024-06-20T23:59:59"
},
"BRL": {
"price": 99.9,
"salePrice": 79.9,
"salePriceEffectiveDate": "2024-06-10T00:00:00/2024-06-20T23:59:59"
}
},
"productType": "KIDS > MALE > BOTTOMS",
"brand": "Sizebay",
"imageLink": "www.example.com/image.jpg",
"additionalImageLinks": [
"www.example.com/image.jpg"
],
"gender": "unisex",
"ageGroup": "adult",
"size": "XS,S,M,L,XL",
"sizeSystem": "BR",
"color": "Blue",
"gtin": "00012345678905"
}
}
Responses
202
Product accepted for processing
400
Invalid or missing fields
500
Internal server error
2. Update Product
PATCH
https://ai-image-service-dev.internalsizebay.com/products
Description: Updates an existing productβs title, availability and pricing.
Headers
x-api-key
string
β
API key for authentication
Body Parameters
tenantId
number
β
Tenant ID
collectionName
string
β
Collection name
productId
string
β
ID of the product to update
localizations
object
β
Updated title & availability per locale
pricing
object
β
Updated prices per currency
Payload Example
{
"tenantId": 123,
"collectionName": "string",
"productId": "FSW012345",
"localizations": {
"en-US": {
"title": "Classic White T-Shirt",
"availability": "in stock"
},
"pt-BR": {
"title": "Camiseta Branca",
"availability": "in stock"
}
},
"pricing": {
"USD": {
"price": 25,
"salePrice": 19.99,
"salePriceEffectiveDate": "2024-06-10T00:00:00/2024-06-20T23:59:59"
},
"BRL": {
"price": 99.9,
"salePrice": 79.9,
"salePriceEffectiveDate": "2024-06-10T00:00:00/2024-06-20T23:59:59"
}
}
}
Responses
200
Product updated successfully
400
Invalid or missing fields
404
Product not found
500
Internal server error
3. Swagger β Interactive API Explorer
To simplify integration and testing, you can access the official Swagger API Reference.
What you can do there:
Explore endpoints
View all available endpoints with descriptions and example payloads
Test requests
Use the βTry it outβ button to send test requests directly from the browser
Validate payloads
Ensure your request structure matches the APIβs expected schema
Check responses
See example success and error responses
Use your API key
Authenticate and test using your tenantβs x-api-key
This tool is ideal for developers and integrators during setup, debugging, and ongoing maintenance.
Last updated
Was this helpful?