Brand
Cart
Get Primary Product

Get Primary Product

Retrieve the primary product associated with a given cart. Includes the product’s details such as title, description, handle, status, timestamps, and its variants with SKU, price, and inventory information.

Overview

  • Method: GET
  • Path: /brand/cart/get-primary-product
  • Tags: brand

Use Cases

  • Identify the main product in a cart for checkout or display purposes.
  • Access detailed variant information for pricing or inventory checks.
  • Highlight a primary product when a cart contains multiple items.
  • Facilitate promotions, discounts, or product-specific rules tied to the primary product.

Parameters

No parameters required.

Request Body

No request body required.

Responses

200

Successful response

Content Type: application/json

{
  "product": "string",
  "title": "string",
  "description": "string",
  "handle": "string",
  "status": "string",
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-01-01T00:00:00.000Z",
  "variants": "string",
  "sku": "string",
  "price": 123,
  "inventory_quantity": 123
}

400

Bad Request

Content Type: application/json

{
  "error": "string",
  "details": [
    {}
  ]
}

401

Unauthorized

404

Not Found

500

Internal Server Error

Example Usage

curl -X GET \
  https://api.pillexa.com/brand/cart/get-primary-product \
  -H "Content-Type: application/json" \