New? Watch our welcome video [here], which goes over the basics of logging in and participating in the forums. Then, check out the [Rules] and our [video] about the features of the forum.

Set UPC with API?

How do I set the UPC of a product with the API?

The documentation does not mention how to set the UPC.

Currently using code from the documentation to update product info:

using (var content = new StringContent("{ \"productId\": 12345678, \"sku\": \"1004\", \"name\": \"Coffee Mug\", \"price\": 26, \"defaultCost\": 0, \"length\": 3, \"width\": 3, \"height\": 3, \"weightOz\": 26, \"internalNotes\": null, \"fulfillmentSku\": \"F1004\", \"createDate\": \"2014-09-04T09:18:01.293\", \"modifyDate\": \"2014-09-18T12:38:43.893\", \"active\": true, \"productCategory\": { \"categoryId\": 9999, \"name\": \"Door Closers\" }, \"productType\": null, \"warehouseLocation\": \"Bin 22\", \"defaultCarrierCode\": \"fedex\", \"defaultServiceCode\": \"fedex_home_delivery\", \"defaultPackageCode\": \"package\", \"defaultIntlCarrierCode\": \"ups\", \"defaultIntlServiceCode\": \"ups_worldwide_saver\", \"defaultIntlPackageCode\": \"package\", \"defaultConfirmation\": \"direct_signature\", \"defaultIntlConfirmation\": \"adult_signature\", \"customsDescription\": null, \"customsValue\": null, \"customsTariffNo\": null, \"customsCountryCode\": null, \"noCustoms\": null, \"tags\": [ { \"tagId\": 9180, \"name\": \"APItest\" } ]}", System.Text.Encoding.Default, "application/json"))


using (var response = await httpClient.PutAsync("products?id=" + product.productId, content)) {

etc...
Sign In or Register to comment.