{"_id":"5b68ab0b1e4c8300032c92f3","project":"567f0c06143cc60d00c1fdbe","version":{"_id":"567f0c06143cc60d00c1fdc1","__v":9,"project":"567f0c06143cc60d00c1fdbe","createdAt":"2015-12-26T21:52:06.734Z","releaseDate":"2015-12-26T21:52:06.734Z","categories":["567f0c07143cc60d00c1fdc2","56a9783109cb9c0d00f0c7d3","56a97837f834950d0037b363","56a9783b2d8fd90d0036eed6","56a979912d8fd90d0036eed8","5834b5691a80690f00d31faf","5834b5e4f775120f00c45f9d","5bf1a1473031e4005075ae14","5c64c200244bda003204b97f"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"category":{"_id":"56a9783109cb9c0d00f0c7d3","__v":9,"pages":["56a98f8fcc0f740d005bc176","56a98fa21801ac0d00881b88","56a98fad257fbc0d00d47630","56a98fb8318e6c1700a19d02","56a99061257fbc0d00d47637","56a990712d8fd90d0036eeeb","56a992361801ac0d00881b91","56a99bfe1801ac0d00881ba1","56a9a64d09cb9c0d00f0c7f0"],"project":"567f0c06143cc60d00c1fdbe","version":"567f0c06143cc60d00c1fdc1","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-28T02:08:49.783Z","from_sync":false,"order":1,"slug":"products","title":"Products"},"user":"567f0baca74a1c0d003e1fba","githubsync":"","__v":14,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-08-06T20:09:47.437Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"post","examples":{"codes":[{"code":"# Using the variation_identifier:\ncurl -X POST https://tophatter.com/merchant_api/v1/products/quantity.json \\\n-d 'access_token=YOUR_ACCESS_TOKEN' \\\n-d 'variation_identifier=6631A-SG' \\\n-d 'quantity=50'\n\n# Using the variation_internal_id:\ncurl -X POST https://tophatter.com/merchant_api/v1/products/quantity.json \\\n-d 'access_token=YOUR_ACCESS_TOKEN' \\\n-d 'variation_internal_id=43415170' \\\n-d 'quantity=50'","language":"curl"}]},"settings":"","results":{"codes":[{"name":"","code":"{\n  \"product_identifier\": \"6631A\",\n  \"product_internal_id\": 19301513,\n  \"identifier\": \"6631A-SG\",\n  \"internal_id\": 43415170,\n  \"size\": null,\n  \"color\": \"Space Gray\",\n  \"quantity\": 50,\n  \"created_at\": \"2019-02-14T00:04:15-08:00\",\n  \"disabled_at\": null,\n  \"deleted_at\": null\n}","language":"json","status":200}]},"auth":"required","params":[{"_id":"56a9a6a509cb9c0d00f0c7f1","ref":"","in":"body","required":true,"desc":"The identifier for the product you wish to update.","default":"","type":"string","name":"identifier"},{"_id":"5b68ab8f42c3b0000389972a","ref":"","in":"body","required":false,"desc":"The identifier for the variation you wish to update. This field is only required if the product has multiple variations.","default":"","type":"string","name":"variation_identifier"},{"_id":"5c65239f3d50110057d08dcf","ref":"","in":"body","required":false,"desc":"The Tophatter internal ID for the variation you wish to update. This field is only required if the product has multiple variations and you are not already using the `variation_identifier` or `identifier`.","default":"","type":"int","name":"variation_internal_id"},{"_id":"5b68ab251e4c8300032c92fd","ref":"","in":"body","required":true,"desc":"The new quantity for the product.","default":"","type":"int","name":"quantity"}],"url":"/products/quantity.json"},"isReference":false,"order":8,"body":"","excerpt":"","slug":"product-quantity","type":"endpoint","title":"Update Quantity"}

postUpdate Quantity


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

identifier:
required
string
The identifier for the product you wish to update.
variation_identifier:
string
The identifier for the variation you wish to update. This field is only required if the product has multiple variations.
variation_internal_id:
integer
The Tophatter internal ID for the variation you wish to update. This field is only required if the product has multiple variations and you are not already using the `variation_identifier` or `identifier`.
quantity:
required
integer
The new quantity for the product.

Examples


Result Format