Get Variant By ID

GET /items/{itemId}/variants/{variantId}

Get a single variant by ID

Path parameters

  • itemId string(guid) Required

    ID of the parent item

  • variantId string(guid) Required

    ID of the variant

Responses

  • 200 application/json

    A single variant

    Hide response attributes Show response attributes object
    • id string(guid)

      System generated unique identifier. Don't include this in POST request body.

    • parent_id string(guid)
    • parent_title string
    • parent_product_code string
    • title string

      Autogenerated - Variant title is a combination of all option values

    • description string
    • sku string
    • upc string
    • msrp string(float)
    • unit_price string(float)
    • map string(float)

      Minimum Advertised Price

    • moq integer(int32)

      Minimum Order Quantity

    • quantity_multiplier integer(int32)

      Multiple of quantity to be ordered

    • options array[object]
      Hide options attributes Show options attributes object
      • name string
      • value string
      • _destroy boolean
    • sku_status string

      Status of the variant SKU (active or inactive)

      Values are active or inactive.

    • category_id string(guid)

      Inherited from parent product

    • vendor_id string(guid)

      Inherited from parent product

    • brand_id string(guid)

      Inherited from parent product

    • category_name string

      Category Name to which the item belongs, Inherited from parent product

    • vendor_name string

      Vendor Name to which the item belongs, Inherited from parent product

    • brand_name string

      Brand Name to which the item belongs, Inherited from parent product

  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • error string

      401: Invalid Credentials

      404: Resource not found

      422: Unprocessable Entity

    • details string

      404: empty

      401: The credentials presented are not valid to access this resource

  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • error string

      401: Invalid Credentials

      404: Resource not found

      422: Unprocessable Entity

    • details string

      404: empty

      401: The credentials presented are not valid to access this resource

GET /items/{itemId}/variants/{variantId}
curl \
 --request GET 'https://app.getfoundation.com/api/external/v1/items/{itemId}/variants/{variantId}' \
 --header "X-API-Key: $API_KEY"
Response examples (200)
{
  "id": "9aa62446-c3b0-42f5-8027-3648daed9d73",
  "parent_id": "9aa62446-c3b0-42f5-8027-3648daed9d73",
  "parent_title": "Dog Collar",
  "parent_product_code": "DC",
  "title": "Large / Leather",
  "description": "A beautiful red dog collar",
  "sku": "DC-001-R",
  "upc": "123456789012",
  "msrp": 99.99,
  "unit_price": 49.99,
  "map": 49.99,
  "moq": 10,
  "quantity_multiplier": 1,
  "options": [
    {
      "name": "Size",
      "value": "Large"
    },
    {
      "name": "Material",
      "value": "Leather"
    }
  ],
  "sku_status": "active",
  "category_id": "string",
  "vendor_id": "string",
  "brand_id": "string",
  "category_name": "Toys",
  "vendor_name": "Acme Corp",
  "brand_name": "Acme Corp"
}
Response examples (401)
{
  "error": "string",
  "details": "string"
}
Response examples (404)
{
  "error": "string",
  "details": "string"
}