{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/products/quantity.json","auth":"required","method":"post","examples":{"codes":[{"language":"curl","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'"}]},"settings":"","results":{"codes":[{"status":200,"language":"json","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}","name":""}]},"params":[{"name":"identifier","type":"string","default":"","desc":"The identifier for the product you wish to update.","required":true,"in":"body","ref":"","_id":"56a9a6a509cb9c0d00f0c7f1"},{"name":"variation_identifier","type":"string","default":"","desc":"The identifier for the variation you wish to update. This field is only required if the product has multiple variations.","required":false,"in":"body","ref":"","_id":"5b68ab8f42c3b0000389972a"},{"name":"variation_internal_id","type":"int","default":"","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`.","required":false,"in":"body","ref":"","_id":"5c65239f3d50110057d08dcf"},{"name":"quantity","type":"int","default":"","desc":"The new quantity for the product.","required":true,"in":"body","ref":"","_id":"5b68ab251e4c8300032c92fd"}]},"next":{"description":"","pages":[]},"title":"Update Quantity","type":"endpoint","slug":"product-quantity","excerpt":"","body":"","updates":[],"order":8,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5b68ab0b1e4c8300032c92f3","project":"567f0c06143cc60d00c1fdbe","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"},"category":{"sync":{"isSync":false,"url":""},"pages":["56a98f8fcc0f740d005bc176","56a98fa21801ac0d00881b88","56a98fad257fbc0d00d47630","56a98fb8318e6c1700a19d02","56a99061257fbc0d00d47637","56a990712d8fd90d0036eeeb","56a992361801ac0d00881b91","56a99bfe1801ac0d00881ba1","56a9a64d09cb9c0d00f0c7f0"],"title":"Products","slug":"products","order":1,"from_sync":false,"reference":false,"_id":"56a9783109cb9c0d00f0c7d3","__v":9,"project":"567f0c06143cc60d00c1fdbe","createdAt":"2016-01-28T02:08:49.783Z","version":"567f0c06143cc60d00c1fdc1"},"user":"567f0baca74a1c0d003e1fba","createdAt":"2018-08-06T20:09:47.437Z","githubsync":"","__v":14,"parentDoc":null}

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