{"_id":"5c4936f5498a01005d5c0e00","project":"567f0c06143cc60d00c1fdbe","initVersion":{"_id":"567f0c06143cc60d00c1fdc1","version":"1"},"user":{"_id":"567f0baca74a1c0d003e1fba","username":"","name":"Chris Estreich"},"__v":6,"createdAt":"2019-01-24T03:54:29.322Z","changelog":[],"body":"Tophatter currently offers two upsell options for each product:\n\n* Buy one get one upsell - This allows a customer to purchase a second instance of the product during checkout for the price specified by the merchant.\n* Accessory upsell - This allows a customer to purchase an accessory related to the product during checkout for the price specified by the merchant.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/69390d9-_2019-01-24_12.07.09.png\",\n        \"屏幕快照 2019-01-24 下午12.07.09.png\",\n        653,\n        156,\n        \"#d3d7d4\"\n      ]\n    }\n  ]\n}\n[/block]\nThese upsells are now included in the `Product` and `Order` objects when fetched via the Tophatter Merchant API.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  ...\\n  \\\"upsells\\\" : [\\n    {\\n      \\\"type_description\\\" : \\\"buy_one_get_one\\\",\\n      \\\"amount\\\" : \\\"40.0\\\",\\n      \\\"description\\\" : null\\n    },\\n    {\\n      \\\"type_description\\\" : \\\"accessory\\\",\\n      \\\"amount\\\" : \\\"2.0\\\",\\n      \\\"description\\\" : \\\"<text>\\\"\\n    }\\n\\t],\\n\\t...\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","slug":"add-upsells-to-product-and-order-api","title":"Upsell parameters added to products & orders"}

Upsell parameters added to products & orders


Tophatter currently offers two upsell options for each product: * Buy one get one upsell - This allows a customer to purchase a second instance of the product during checkout for the price specified by the merchant. * Accessory upsell - This allows a customer to purchase an accessory related to the product during checkout for the price specified by the merchant. [block:image] { "images": [ { "image": [ "https://files.readme.io/69390d9-_2019-01-24_12.07.09.png", "屏幕快照 2019-01-24 下午12.07.09.png", 653, 156, "#d3d7d4" ] } ] } [/block] These upsells are now included in the `Product` and `Order` objects when fetched via the Tophatter Merchant API. [block:code] { "codes": [ { "code": "{\n ...\n \"upsells\" : [\n {\n \"type_description\" : \"buy_one_get_one\",\n \"amount\" : \"40.0\",\n \"description\" : null\n },\n {\n \"type_description\" : \"accessory\",\n \"amount\" : \"2.0\",\n \"description\" : \"<text>\"\n }\n\t],\n\t...\n}", "language": "json" } ] } [/block]