variant

GET https://api.bootic.net/v1/shops/{shop_id}/variants/{id or sku}

Retrieve a product variant.

This relation is only available for products owned by your current access token (admin scope).

HTTP GET

$ curl -XGET -H'Accept:application/json' -H'Content-Type:application/json' -H "Authorization: Bearer xxxx" -i https://api.bootic.net/v1/shops/:shop_id/variants/:id

Successful response

Status: 200 OK
Content-Type: application/json; charset=utf-8
Connection: keep-alive
ETag: "0728e2965bd03e20a7f1c33add2f8775"
Last-Modified: Fri, 20 Jun 2014 22:34:14 GMT
Cache-Control: must-revalidate, private, max-age=0
Date: Wed, 31 Jul 2013 21:11:52 GMT
X-OAuth-Scopes: admin
{
  "_class": [
    "variant"
  ],
  "_links": {
    "self": {
      "href": "https://api.bootic.net/v1/shops/453/variants/145812"
    },
    "btc:update_variant": {
      "href": "https://api.bootic.net/v1/shops/453/variants/145812",
      "title": "Update a product variant",
      "method": "put"
    },
    "btc:delete_variant": {
      "href": "https://api.bootic.net/v1/shops/453/variants/145812",
      "title": "Remove a product variant",
      "method": "delete"
    }
  },
  "title": "Some variant",
  "id": 145812,
  "stock": 100,
  "available_if_no_stock": true,
  "sku": "sv-123",
  "weight_in_grams": 230,
  "price": 12333,
  "price_comparison": 122234
}

A succesful response returns a variant entity including links to further actions.
See update_variant,create_variant and delete_variant for more.

Retrieving a variant by SKU

Optionally, you can identify a variant by its SKU (Stock Keeping Unit), which is unique per shop, instead of its :id. So for a variant with SKU “abc” and shop id “123”, do this:

GET https://api.bootic.net/v1/shops/123/variants/abc

This can be useful when syncronizing data directly from 3rd party data sources.