{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/variations.json","auth":"required","results":{"codes":[{"status":200,"language":"json","code":"{  \n   \"product_identifier\": \"6631A\",\n   \"identifier\": \"6631A-PINK\",\n   \"internal_id\": 26090755,\n   \"size\": null,\n   \"color\": \"Pink\",\n   \"quantity\": 33,\n   \"created_at\": \"2018-04-03T23:08:45-07:00\",\n   \"disabled_at\": null,\n   \"deleted_at\": null\n}","name":""}]},"settings":"","examples":{"codes":[{"language":"curl","code":"curl -X POST https://tophatter.com/merchant_api/v1/variations.json \\\n-d 'access_token=YOUR_ACCESS_TOKEN' \\\n-d 'product_identifier=6631A' \\\n-d 'identifier=6631A-PINK' \\\n-d 'color=Pink' \\\n-d 'quantity=33'"}]},"method":"post","params":[{"name":"product_identifier","type":"string","default":"","desc":"The unique identifier of the product this variation belongs to.","required":true,"in":"body","ref":"","_id":"5834ef3007e6c80f004edfc8"},{"name":"identifier","type":"string","default":"","desc":"The unique identifier or SKU that your system uses to recognize this product variation. Only letters, numbers, spaces, dashes and underscores are allowed.","required":true,"in":"body","ref":"","_id":"5834ef3007e6c80f004edfc7"},{"name":"size","type":"string","default":"","desc":"The size of the variation. You can specify any size you'd like, but we recommend you use a size from our standardized list of sizes here: https://tophatter.readme.io/docs/sizes.","required":false,"in":"body","ref":"","_id":"5834ef3007e6c80f004edfc6"},{"name":"color","type":"string","default":"","desc":"You can specify any color you'd like, but we recommend you use a size from our standardized list of colors here: https://tophatter.readme.io/docs/colors.","required":false,"in":"body","ref":"","_id":"5834ef3007e6c80f004edfc5"},{"name":"quantity","type":"int","default":"","desc":"The quantity available to sell for this variation.","required":true,"in":"body","ref":"","_id":"5834ef3007e6c80f004edfc4"}]},"next":{"description":"","pages":[]},"title":"Create a Variation","type":"endpoint","slug":"variation-create","excerpt":"","body":"","updates":[],"order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5834e58cb85f2f0f004638f5","__v":3,"category":{"sync":{"isSync":false,"url":""},"pages":["56a98ff62d8fd90d0036eee9","56a98ffc1801ac0d00881b8b","56a99013257fbc0d00d47633","56a99029257fbc0d00d47635","56a990541801ac0d00881b8e","56a99094f834950d0037b37e","56a9923e13a69a0d00a778dc","56a9a7161801ac0d00881ba5"],"title":"Variations","slug":"variations","order":2,"from_sync":false,"reference":false,"_id":"56a97837f834950d0037b363","__v":8,"createdAt":"2016-01-28T02:08:55.258Z","project":"567f0c06143cc60d00c1fdbe","version":"567f0c06143cc60d00c1fdc1"},"githubsync":"","project":"567f0c06143cc60d00c1fdbe","user":"567f0baca74a1c0d003e1fba","createdAt":"2016-11-23T00:40:44.223Z","version":{"version":"1","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["567f0c07143cc60d00c1fdc2","56a9783109cb9c0d00f0c7d3","56a97837f834950d0037b363","56a9783b2d8fd90d0036eed6","56a979912d8fd90d0036eed8","5834b5691a80690f00d31faf","5834b5e4f775120f00c45f9d","5bf1a1473031e4005075ae14","5c64c200244bda003204b97f"],"_id":"567f0c06143cc60d00c1fdc1","__v":9,"createdAt":"2015-12-26T21:52:06.734Z","releaseDate":"2015-12-26T21:52:06.734Z","project":"567f0c06143cc60d00c1fdbe"},"parentDoc":null}

postCreate a Variation


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

product_identifier:
required
string
The unique identifier of the product this variation belongs to.
identifier:
required
string
The unique identifier or SKU that your system uses to recognize this product variation. Only letters, numbers, spaces, dashes and underscores are allowed.
size:
string
The size of the variation. You can specify any size you'd like, but we recommend you use a size from our standardized list of sizes here: https://tophatter.readme.io/docs/sizes.
color:
string
You can specify any color you'd like, but we recommend you use a size from our standardized list of colors here: https://tophatter.readme.io/docs/colors.
quantity:
required
integer
The quantity available to sell for this variation.

Examples


Result Format