Skip to content

BuyOrderItemAgain

Type: schema

Description

A previously purchased item suggested for re-purchase. Returned by the buy-it-again endpoint, deduplicated to one entry per product_id (most recent purchase) across the user's paid orders.

TypeScript Definition

typescript
BuyOrderItemAgain: {{
            product_id: string;
            product_name: string | null;
            product_image_url: string | null;
            /** @description The unique identifier of the product variant. `null` if the product has no variants. */
            variant_id: string | null;
            /** @description The display name of the variant. `null` if the product has no variants. */
            variant_name: string | null;
            /**
             * Format: double
             * @description Selling price at the time of the original purchase.
             */
            selling_price: number;
            /**
             * Format: double
             * @description Listing price at the time of the original purchase.
             */
            listing_price: number;
            /** @description Seller ID. Relevant for marketplace stores only. `null` for b2b and b2c stores. */
            seller_id: string | null;
            /** @description Seller detail information. Relevant for marketplace stores only. `null` for b2b and b2c stores, or when `seller_id` is `null`. */
            seller_detail: components["schemas"]["SellerInfo"] | null;
        };
        /** BuyXGetYCouponPromotion */
}

Component References

ReferenceResolves To
components["schemas"]["SellerInfo"]SellerInfo

OpenAPI Schema

json
{
  "title": "BuyOrderItemAgain",
  "description": "A previously purchased item suggested for re-purchase. Returned by the `buy-it-again` endpoint, deduplicated to one entry per `product_id` (most recent purchase) across the user's paid orders.",
  "type": "object",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/schemas/BuyOrderItemAgain",
    "description": "API reference for the BuyOrderItemAgain schema"
  },
  "required": [
    "product_id",
    "product_name",
    "product_image_url",
    "variant_id",
    "variant_name",
    "selling_price",
    "listing_price",
    "seller_id",
    "seller_detail"
  ],
  "properties": {
    "product_id": {
      "type": "string"
    },
    "product_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "product_image_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "variant_id": {
      "description": "The unique identifier of the product variant. `null` if the product has no variants.",
      "type": [
        "string",
        "null"
      ]
    },
    "variant_name": {
      "description": "The display name of the variant. `null` if the product has no variants.",
      "type": [
        "string",
        "null"
      ]
    },
    "selling_price": {
      "description": "Selling price at the time of the original purchase.",
      "type": "number",
      "format": "double"
    },
    "listing_price": {
      "description": "Listing price at the time of the original purchase.",
      "type": "number",
      "format": "double"
    },
    "seller_id": {
      "description": "Seller ID. Relevant for marketplace stores only. `null` for b2b and b2c stores.",
      "type": [
        "string",
        "null"
      ]
    },
    "seller_detail": {
      "description": "Seller detail information. Relevant for marketplace stores only. `null` for b2b and b2c stores, or when `seller_id` is `null`.",
      "oneOf": [
        {
          "$ref": "#/components/schemas/SellerInfo"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: