Methods that operate on the Product data model

GET http://api.cratejoy.com/v1/products/
GET http://api.cratejoy.com/v1/products/{prod_id}/
PUT http://api.cratejoy.com/v1/products/{prod_id}/

List products

GET http://api.cratejoy.com/v1/products/
$.ajax({
    url: 'https://api.cratejoy.com/v1/products/',
    method: 'GET'
});
$.get('https://api.cratejoy.com/v1/customers/',{
  "address.city": "Austin",
  "_md.shoe.size__gt": 10
});
{
  "count": 1, 
  "next": null, 
  "prev": null, 
  "results": [{
    "base_term_prices": [{...}], // Term prices property 
    "billing": {...}, // Product billing property 
    "deleted": false, 
    "description": "Top selling product", 
    "flat_ship_price": 0, 
    "gift_shipping": 0, 
    "gift_term_prices": [{...}], // Gift term prices property 
    "gift_terms": [{...}], // Gift terms property
    "giftable": true, 
    "giftinstances": [{...}], // Gift instances property
    "has_subscribers": true, 
    "id": 55065957, 
    "images": [{...}], // Images relation property 
    "instances": [{...}], // Instances relation property 
    "listed": false, 
    "meta": {}, 
    "metadata": [], 
    "name": "My Product with Options", 
    "product_billing_id": 55065955, 
    "reviewable": true, 
    "rulesets": [], 
    "ruletypes": [{...}], // Shipping rule types relation property
    "ship_option": "pricedin", 
    "ship_weight": 2.0, 
    "single_purchasable": false, 
    "sku": "SQ3851001", 
    "slug": "my-product-with-options", 
    "store_id": 4848355, 
    "subscription_types": [{...}], // Subscription types relation property
    "taxonomy": [], 
    "type": "product", 
    "variants": [{...}], // Variants relation property
    "visible": true
  }]
}

Get a product

GET http://api.cratejoy.com/v1/products/{prod_id}/
$.ajax({
    url: 'https://api.cratejoy.com/v1/products/75572211/',
    method: 'GET'
});

Update a product

PUT http://api.cratejoy.com/v1/products/{prod_id}/
$.ajax({
    url: 'https://api.cratejoy.com/v1/products/75572211/',
    method: 'PUT',
    data: {
      'name': "Batty Box",
      'ship_weight': 1.5,
      'visible': true
    }
});

For a complete list of writable properties see the Product data model.