Interface CreateProductDto<CustomFields, VariantCustomFields>

Payload for creating a product

See

ProductResponse for details on fields

interface CreateProductDto {
    additionalInformation?: string;
    addressLine1?: string;
    addressLine2?: string;
    addressLine3?: string;
    attributes?: {
        attributeId: string;
        value: string | number | boolean | string[] | Date;
    }[];
    categoryId: string;
    customFields?: CustomFields;
    description?: string;
    dimensions?: string;
    features?: {
        name: string;
        value: string;
    }[];
    geoCoordinatesField?: {
        coordinates: [number, number];
        type: string;
    };
    imageIds?: string[];
    isPromoted?: boolean;
    locationIds?: string[];
    name: string;
    postalCode?: string;
    publication?: Partial<ProductPublication>;
    tags?: string[];
    variantNote?: string;
    variants?: {
        customFields?: VariantCustomFields;
        description?: string;
        imageIds?: string[];
        price?: {
            amount?: number;
            currency?: string;
            taxIncluded?: boolean;
            taxable?: boolean;
        };
        sku?: string;
        title?: string;
    }[];
}

Type Parameters

  • CustomFields = unknown

  • VariantCustomFields = unknown

Properties

additionalInformation?: string
addressLine1?: string
addressLine2?: string
addressLine3?: string
attributes?: {
    attributeId: string;
    value: string | number | boolean | string[] | Date;
}[]

Type declaration

  • attributeId: string
  • value: string | number | boolean | string[] | Date
categoryId: string
customFields?: CustomFields
description?: string
dimensions?: string
features?: {
    name: string;
    value: string;
}[]

Type declaration

  • name: string
  • value: string
geoCoordinatesField?: {
    coordinates: [number, number];
    type: string;
}

Type declaration

  • coordinates: [number, number]
  • type: string
imageIds?: string[]
isPromoted?: boolean
locationIds?: string[]
name: string
postalCode?: string
publication?: Partial<ProductPublication>
tags?: string[]
variantNote?: string
variants?: {
    customFields?: VariantCustomFields;
    description?: string;
    imageIds?: string[];
    price?: {
        amount?: number;
        currency?: string;
        taxIncluded?: boolean;
        taxable?: boolean;
    };
    sku?: string;
    title?: string;
}[]

Type declaration

  • Optional customFields?: VariantCustomFields
  • Optional description?: string
  • Optional imageIds?: string[]
  • Optional price?: {
        amount?: number;
        currency?: string;
        taxIncluded?: boolean;
        taxable?: boolean;
    }
    • Optional amount?: number
    • Optional currency?: string
    • Optional taxIncluded?: boolean
    • Optional taxable?: boolean
  • Optional sku?: string
  • Optional title?: string

Generated using TypeDoc