public class JetAPIProduct extends JetAPI implements IJetAPIProduct
API.REQUEST_TYPE
AUTH_TEST_RESPONSE, config
client, context, lockHost, maxDownloadSize
Constructor and Description |
---|
JetAPIProduct(IAPIHttpClient client,
JetConfig conf)
Create a new JetProduct instance
|
Modifier and Type | Method and Description |
---|---|
boolean |
addProduct(ProductRec product)
Add a product to the Jet catalog
|
boolean |
archiveSku(String sku,
boolean isArchived)
Archive a product sku.
|
ProductRec |
getFullProduct(String sku)
Retrieve product data, pricing, variations, returns exceptions and
shipping exceptions
|
ProductRec |
getProduct(String sku)
Retrieve product data
|
ProductInventoryRec |
getProductInventory(String sku)
Retrieve product inventory by sku.
|
ProductPriceRec |
getProductPrice(String sku)
At Jet, the price the retailer sets is not the same as the price the
customer pays.
|
ProductVariationGroupRec |
getProductVariations(String sku)
Retrieve product variations exceptions by sku.
|
ReturnsExceptionRec |
getReturnsExceptions(String sku)
Retrieve product returns exceptions by sku.
|
List<FNodeShippingRec> |
getShippingExceptions(String sku)
Retrieve a set of product shipping exceptions.
|
List<String> |
getSkuList(int offset,
int limit)
This call allows you visibility into the total number of SKUs you have
uploaded.
|
ProductSalesDataRec |
getSkuSalesData(String sku)
Get sales data.
|
IJetAPIResponse |
sendGetProductInventory(String sku)
Retrieve product inventory by sku.
|
IJetAPIResponse |
sendGetProductPrice(String sku)
At Jet, the price the retailer sets is not the same as the price the
customer pays.
|
IJetAPIResponse |
sendGetProductReturnsExceptions(String sku)
Retrieve product returns exceptions by sku.
|
IJetAPIResponse |
sendGetProductShippingExceptions(String sku)
Retrieve product shipping exceptions by sku.
|
IJetAPIResponse |
sendGetProductSku(String sku)
Retrieve a single product by sku.
|
IJetAPIResponse |
sendGetProductVariations(String sku)
Retrieve product variations exceptions by sku.
|
IJetAPIResponse |
sendGetSkuList(int offset,
int limit)
This call allows you visibility into the total number of SKUs you have
uploaded.
|
IJetAPIResponse |
sendGetSkuSalesData(String sku)
Get sales data.
|
IJetAPIResponse |
sendPutArchiveSku(String sku,
boolean isArchived)
Archive a product sku.
|
IJetAPIResponse |
sendPutProductImage(ProductRec product)
Adds image url's
|
IJetAPIResponse |
sendPutProductInventory(ProductRec product)
Adds product quantity and inventory data
|
IJetAPIResponse |
sendPutProductPrice(ProductRec product)
Adds product price data
|
IJetAPIResponse |
sendPutProductPrice(String sku,
ProductPriceRec price)
Send product price data
|
IJetAPIResponse |
sendPutProductShippingExceptions(String sku,
List<FNodeShippingRec> nodes)
Send shipping exceptions to jet
|
IJetAPIResponse |
sendPutProductSku(ProductRec product)
Adds a product sku.
|
IJetAPIResponse |
sendPutProductVariation(ProductVariationGroupRec group)
The variation request is used to create a variation-type relationship
between several SKUs.
|
IJetAPIResponse |
sendPutReturnsException(String sku,
List<String> hashes)
The returns exceptions call is used to set up specific methods that will
overwrite your default settings on a fulfillment node level for returns.
|
boolean |
setProductImages(ProductRec product)
Adds image url's
|
boolean |
setProductInventory(ProductRec product)
Adds product quantity and inventory data
|
boolean |
setProductPrice(ProductRec product)
Adds product price data
|
boolean |
setProductShippingExceptions(String sku,
List<FNodeShippingRec> nodes)
Send shipping exceptions to jet
|
boolean |
setProductSku(ProductRec product)
Adds a product sku.
|
boolean |
setProductVariations(ProductVariationGroupRec group)
The variation request is used to create a variation-type relationship
between several SKUs.
|
boolean |
setReturnsException(String sku,
List<String> hashes)
The returns exceptions call is used to set up specific methods that will
overwrite your default settings on a fulfillment node level for returns.
|
executeRequest, get, getHeaderBuilder, getJSONHeaderBuilder, getPlainHeaderBuilder, jsonArrayToTokenList, login, post, post, post, put, put, put, setErrorHandler
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, getHeaderBuilder, getJSONHeaderBuilder, getPlainHeaderBuilder, post, post, post, put, put, put, setErrorHandler
public JetAPIProduct(IAPIHttpClient client, JetConfig conf)
client
- The http clientconf
- Configurationpublic boolean addProduct(ProductRec product) throws APIException, JetException, ValidateException
addProduct
in interface IJetAPIProduct
product
- Product to addJetException
- if there is an error from the jet apiAPIException
- if there is some sort of error with the api
library itself. A network issue, etc.ValidateException
- if the product fails pre-submit validationpublic IJetAPIResponse sendPutProductSku(ProductRec product) throws APIException, JetException
sendPutProductSku
in interface IJetAPIProduct
product
- product dataAPIException
JetException
public IJetAPIResponse sendPutProductImage(ProductRec product) throws APIException, JetException
sendPutProductImage
in interface IJetAPIProduct
product
- product dataAPIException
JetException
public IJetAPIResponse sendPutProductPrice(ProductRec product) throws APIException, JetException
sendPutProductPrice
in interface IJetAPIProduct
product
- APIException
JetException
public IJetAPIResponse sendPutProductPrice(String sku, ProductPriceRec price) throws APIException, JetException
sendPutProductPrice
in interface IJetAPIProduct
sku
- merchant skuprice
- price dataAPIException
JetException
public IJetAPIResponse sendPutProductInventory(ProductRec product) throws APIException, JetException
sendPutProductInventory
in interface IJetAPIProduct
product
- product dataAPIException
JetException
public IJetAPIResponse sendPutProductVariation(ProductVariationGroupRec group) throws APIException, JetException
sendPutProductVariation
in interface IJetAPIProduct
group
- data to sendAPIException
- if there's a problemJetException
public IJetAPIResponse sendPutProductShippingExceptions(String sku, List<FNodeShippingRec> nodes) throws APIException, JetException
sendPutProductShippingExceptions
in interface IJetAPIProduct
sku
- Skunodes
- Filfillment nodesAPIException
JetException
public IJetAPIResponse sendPutReturnsException(String sku, List<String> hashes) throws APIException, JetException
sendPutReturnsException
in interface IJetAPIProduct
sku
- Product SKU to modifyhashes
- A list of md5 hashes - Each hash is the ID of the returns
node that was created on partner.jet.com under fulfillment settings.
Must be a valid return node ID set up by the merchantAPIException
JetException
public IJetAPIResponse sendPutArchiveSku(String sku, boolean isArchived) throws APIException, JetException
sendPutArchiveSku
in interface IJetAPIProduct
sku
- isArchived
- Indicates whether the specified SKU is archived.
'true' - SKU is inactive
'false' - SKU is potentially sellableAPIException
JetException
public IJetAPIResponse sendGetProductPrice(String sku) throws APIException, JetException
sendGetProductPrice
in interface IJetAPIProduct
sku
- Product skuAPIException
JetException
public ProductPriceRec getProductPrice(String sku) throws APIException, JetException
getProductPrice
in interface IJetAPIProduct
sku
- Product skuAPIException
JetException
public IJetAPIResponse sendGetProductSku(String sku) throws APIException, JetException
sendGetProductSku
in interface IJetAPIProduct
sku
- Product SkuAPIException
JetException
public ProductRec getProduct(String sku) throws APIException, JetException
getProduct
in interface IJetAPIProduct
sku
- Sku to retrieveAPIException
JetException
public ProductRec getFullProduct(String sku) throws APIException, JetException
getFullProduct
in interface IJetAPIProduct
sku
- product skuAPIException
JetException
public IJetAPIResponse sendGetProductInventory(String sku) throws APIException, JetException
sendGetProductInventory
in interface IJetAPIProduct
sku
- Product skuAPIException
JetException
public ProductInventoryRec getProductInventory(String sku) throws APIException, JetException
getProductInventory
in interface IJetAPIProduct
sku
- Product skuAPIException
JetException
public IJetAPIResponse sendGetProductShippingExceptions(String sku) throws APIException, JetException
sendGetProductShippingExceptions
in interface IJetAPIProduct
sku
- Product skuAPIException
JetException
public IJetAPIResponse sendGetProductVariations(String sku) throws APIException, JetException
sendGetProductVariations
in interface IJetAPIProduct
sku
- Product skuAPIException
JetException
public ProductVariationGroupRec getProductVariations(String sku) throws APIException, JetException
getProductVariations
in interface IJetAPIProduct
sku
- Product skuAPIException
JetException
public List<FNodeShippingRec> getShippingExceptions(String sku) throws APIException, JetException
getShippingExceptions
in interface IJetAPIProduct
sku
- SkuAPIException
JetException
public IJetAPIResponse sendGetProductReturnsExceptions(String sku) throws APIException, JetException
sendGetProductReturnsExceptions
in interface IJetAPIProduct
sku
- Product skuAPIException
JetException
public ReturnsExceptionRec getReturnsExceptions(String sku) throws APIException, JetException
getReturnsExceptions
in interface IJetAPIProduct
sku
- Product skuAPIException
JetException
public IJetAPIResponse sendGetSkuList(int offset, int limit) throws APIException, JetException
sendGetSkuList
in interface IJetAPIProduct
offset
- The first SKU # you wish to appear in the returnlimit
- The last SKU # you wish to appear in the returnAPIException
JetException
public List<String> getSkuList(int offset, int limit) throws APIException, JetException
getSkuList
in interface IJetAPIProduct
offset
- The first SKU # you wish to appear in the returnlimit
- The last SKU # you wish to appear in the returnAPIException
JetException
public IJetAPIResponse sendGetSkuSalesData(String sku) throws APIException, JetException
sendGetSkuSalesData
in interface IJetAPIProduct
sku
- Product skuAPIException
JetException
public ProductSalesDataRec getSkuSalesData(String sku) throws APIException, JetException
getSkuSalesData
in interface IJetAPIProduct
sku
- Product skuAPIException
JetException
public boolean archiveSku(String sku, boolean isArchived) throws APIException, JetException
archiveSku
in interface IJetAPIProduct
sku
- isArchived
- Indicates whether the specified SKU is archived.
'true' - SKU is inactive
'false' - SKU is potentially sellableAPIException
JetException
public boolean setProductImages(ProductRec product) throws APIException, JetException
setProductImages
in interface IJetAPIProduct
product
- product dataAPIException
JetException
public boolean setProductInventory(ProductRec product) throws APIException, JetException
setProductInventory
in interface IJetAPIProduct
product
- product dataAPIException
JetException
public boolean setProductPrice(ProductRec product) throws APIException, JetException
setProductPrice
in interface IJetAPIProduct
product
- APIException
JetException
public boolean setProductShippingExceptions(String sku, List<FNodeShippingRec> nodes) throws APIException, JetException
setProductShippingExceptions
in interface IJetAPIProduct
sku
- Skunodes
- Filfillment nodesAPIException
JetException
public boolean setProductSku(ProductRec product) throws APIException, JetException
setProductSku
in interface IJetAPIProduct
product
- product dataAPIException
JetException
public boolean setProductVariations(ProductVariationGroupRec group) throws APIException, JetException
setProductVariations
in interface IJetAPIProduct
group
- data to sendAPIException
- if there's a problemJetException
public boolean setReturnsException(String sku, List<String> hashes) throws APIException, JetException
setReturnsException
in interface IJetAPIProduct
sku
- Product SKU to modifyhashes
- A list of md5 hashes - Each hash is the ID of the returns
node that was created on partner.jet.com under fulfillment settings.
Must be a valid return node ID set up by the merchantAPIException
JetException
Copyright © 2017. All rights reserved.