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

Header
Type
Required
Description

x-api-key

string

âś…

API key for authentication

Body Parameters

Field
Type
Required
Description

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

Status
Meaning

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

Header
Type
Required
Description

x-api-key

string

âś…

API key for authentication

Body Parameters

Field
Type
Required
Description

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

Status
Meaning

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:

Feature
Description

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?