GET
/
api
/
v2
/
platform
/
variants
/
{id}
curl --request GET \
  --url http://{defaultHost}/api/v2/platform/variants/{id} \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "id": "291",
    "type": "variant",
    "attributes": {
      "sku": "SKU-290",
      "weight": "185.0",
      "height": "33.55",
      "depth": "3.78",
      "deleted_at": null,
      "is_master": false,
      "cost_price": "17.0",
      "position": 2,
      "cost_currency": "USD",
      "track_inventory": true,
      "updated_at": "2022-11-08T19:35:57.221Z",
      "discontinue_on": null,
      "created_at": "2022-11-08T19:35:57.218Z",
      "public_metadata": {},
      "private_metadata": {},
      "barcode": null,
      "display_price": "$19.99",
      "display_compare_at_price": null,
      "name": "Product 2153349",
      "options_text": "Size: S",
      "total_on_hand": 0,
      "purchasable": true,
      "in_stock": false,
      "backorderable": true,
      "available": true,
      "currency": "USD",
      "price": "19.99",
      "compare_at_price": null
    },
    "relationships": {
      "product": {
        "data": {
          "id": "216",
          "type": "product"
        }
      },
      "tax_category": {
        "data": null
      },
      "digitals": {
        "data": []
      },
      "images": {
        "data": []
      },
      "option_values": {
        "data": [
          {
            "id": "87",
            "type": "option_value"
          }
        ]
      },
      "stock_items": {
        "data": [
          {
            "id": "307",
            "type": "stock_item"
          }
        ]
      },
      "stock_locations": {
        "data": [
          {
            "id": "189",
            "type": "stock_location"
          }
        ]
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Query Parameters

include
string

Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>

Response

200
application/vnd.api+json
Record found
data
object
required