Interface ProductResponse<CustomFields, AttributeCustomFields, ProductVariantCustomFields>

A product on the product service Note: Attributes, Catalogs, Organizations and Variants are always expanded on the response, as the chance of them being needed is high

interface ProductResponse {
    additionalInformation?: string;
    addressLine1?: string;
    addressLine2?: string;
    addressLine3?: string;
    attributes: (AttributeResponse<AttributeCustomFields> & {
        value: string | number | boolean | string[];
    })[];
    category: null | CategoryResponse;
    categoryId: string;
    createdAt: string;
    customFields: CustomFields;
    description: string;
    dimensions?: string;
    features: {
        name: string;
        value: string;
    }[];
    geoCoordinatesField: {
        coordinates: [number, number];
        type: string;
    };
    id: string;
    images: {
        url: string;
    }[];
    isPromoted: boolean;
    name: string;
    organization: null | OrganizationBase<unknown>;
    organizationId: string;
    postalCode?: string;
    publication: ProductPublication;
    tags: string[];
    updatedAt: string;
    variantNote?: string;
    variants: ProductVariantResponse<ProductVariantCustomFields>[];
}

Type Parameters

  • CustomFields = unknown

  • AttributeCustomFields = unknown

  • ProductVariantCustomFields = unknown

Properties

additionalInformation?: string

Misc additional information

addressLine1?: string

The first line of the address for this product

addressLine2?: string

The second line of the address for this product

addressLine3?: string

The third line of the address for this product

attributes: (AttributeResponse<AttributeCustomFields> & {
    value: string | number | boolean | string[];
})[]

Array of expanded attributes and their values for this product

category: null | CategoryResponse

The category this product is in (null if not present)

categoryId: string

The id of the category this product is in

createdAt: string

ISO date time string - when the product was created

customFields: CustomFields

The custom fields for this product

description: string

The description of the product

dimensions?: string

The dimensions of the product

features: {
    name: string;
    value: string;
}[]

The features of the product

Type declaration

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

The 2D coordinates for this product

Type declaration

  • coordinates: [number, number]
  • type: string
id: string

The unique identifier for this product

images: {
    url: string;
}[]

The expanded images for this product

Type declaration

  • url: string
isPromoted: boolean

Whether the product has been promoted

name: string

The name of the product

organization: null | OrganizationBase<unknown>

The organization the product belongs to

organizationId: string

The id of the organization this product belongs to

postalCode?: string

The postal code for this product

publication: ProductPublication

The publication info for this product

tags: string[]

List of arbitrary tags for the product

updatedAt: string

ISO date time string - when the product was last updated

variantNote?: string

Arbitrary notes about variant information

variants: ProductVariantResponse<ProductVariantCustomFields>[]

The list of variants for this product

Generated using TypeDoc