2
votes

Question about the valid values for some attributes of product variants.

Specifically there is confusion around the variant inventory_management property and the fulfillment_service property.

For starters here is some JSON of a variant which was output by the store admin:

compare_at_price: "39.99"
created_at: "2012-02-18T20:14:40-05:00"
fulfillment_service: "manual"
grams: 0
id: 201382272
inventory_management: "shopify"
inventory_policy: "deny"
inventory_quantity: -1
option1: "Gold"
option2: null
option3: null
position: 1
price: "29.99"
product_id: 85812592
requires_shipping: true
sku: "charm amethyst"
taxable: true
title: "Gold"
updated_at: "2012-12-01T19:29:32-05:00"

Now, here is link to the Shopify help docs explaining what valid values are for all of the variant's attributes:

http://wiki.shopify.com/Variant#variant.inventory_management

Granted that this link takes you to what looks like liquid code, I would hope that we can expect the same attributes on the back-end to reappear on the front-end. For the most part they do, and here is a list of all of the attributes which definitions are provided for in the previously mentioned link:

1 variant.id
2 variant.title
3 variant.price
4 variant.compare_at_price
5 variant.available
6 variant.inventory_management
7 variant.inventory_quantity
8 variant.inventory_policy
9 variant.weight
10 variant.sku
11 variant.option1
12 variant.option2
13 variant.option3
14 variant.options
15 requires_shipping
16 taxable

Hopefully you've noted that fulfillment_service which appears on the back-end API is not represented on the front-end.

To complicate matters further, another help article has been written to provide definitions for the variant attributes here. The problem with this article is that it mentions a variant attribute called "Variant Inventory Tracker" which doesn't appear anywhere else in the help docs yet seems to contain values that are relevant to both the fulfillment_service and possibly inventory_management variants.

Really appreciate the help here!

2

2 Answers

4
votes

The valid values for variant.inventory_management are ["Shopify", "Shipline", ""]

and the valid values for variant.fulfillment_service are ["Manual", "Shipwire", "Webgistix", "Amazon Marketplace Web"]

1
votes

For up-to-date API documentation, use our API docs. The API docs get generated automatically, whereas the wiki is evidently outdated. From the Variant API doc:

{
  "variant": {
    "compare_at_price": null,
    "created_at": "2012-12-06T17:33:56-05:00",
    "fulfillment_service": "manual",
    "grams": 200,
    "id": 808950810,
    "inventory_management": "shopify",
    "inventory_policy": "continue",
    "option1": "Pink",
    "option2": null,
    "option3": null,
    "position": 1,
    "price": "199.00",
    "product_id": 632910392,
    "requires_shipping": true,
    "sku": "IPOD2008PINK",
    "taxable": true,
    "title": "Pink",
    "updated_at": "2012-12-06T17:33:56-05:00",
    "inventory_quantity": 10
  }
}

I think this should answer your question. As a sidenote, our docs are actively getting a rehaul, so once that's rolled out this sort of thing shouldn't be a problem in the future.