Product

Mit der Ajax Product API können Sie unter GET Informationen zu jedem beliebigen Produkt anfordern.

Inhalt

GET /products/{product-handle}.js

Abrufen des JSON eines Produkts unter Verwendung des Produkt-Handles.

Alle Geldwerte werden in der Währung des Kunden zurückgegeben. Um die Währung des Kunden zu überprüfen, können Sie das Feld currency des Endpunkts /cart. js verwenden. Weitere Informationen zum Verkauf in mehreren Währungen finden Sie unter Migration zur Unterstützung mehrerer Währungen.

Example coding using jQuery:

Response

Das JSON des Produkts.

Beispiel:

{
  "id": 329678821,
  "title": "Rot Rain Coat",
  "handle": "rot-rain-coat",
  "description": "<p>Lorem Ipsum.</p>",
  "published_at": "2014-06-12T16:28:11-04:00",
  "created_at": "2014-06-12T16:28:13-04:00",
  "vendor": "VersaCommerce",
  "type": "Coat",
  "tags": [
    "Frühling"
  ],
  "price": 12900,
  "price_min": 12900,
  "price_max": 12900,
  "available": true,
  "price_varies": false,
  "compare_at_price": null,
  "compare_at_price_min": 0,
  "compare_at_price_max": 0,
  "compare_at_price_varies": false,
  "variants": [
    {
      "id": 794864229,
      "title": "Small",
      "options": [
        "Small"
      ],
      "option1": "Small",
      "option2": null,
      "option3": null,
      "price": 12900,
      "weight": 0,
      "compare_at_price": null,
      "inventory_management": "shopify",
      "available": true,
      "sku": null,
      "requires_shipping": true,
      "taxable": true,
      "barcode": "49738645"
    },
    {
      "id": 794864233,
      "title": "M",
      "options": [
        "M"
      ],
      "option1": "M",
      "option2": null,
      "option3": null,
      "price": 12900,
      "weight": 0,
      "compare_at_price": null,
      "inventory_management": "shopify",
      "available": true,
      "sku": null,
      "requires_shipping": true,
      "taxable": true,
      "barcode": "49738657"
    },
    {
      "id": 794864237,
      "title": "Large",
      "options": [
        "Large"
      ],
      "option1": "Large",
      "option2": null,
      "option3": null,
      "price": 12900,
      "weight": 0,
      "compare_at_price": null,
      "inventory_management": "shopify",
      "available": true,
      "sku": null,
      "requires_shipping": true,
      "taxable": true,
      "barcode": "49738673"
    }
  ],
  "images": [
    "//cdn.versacommerce.de/s/files/1/0040/7092/products/rot-rain-coat.jpeg?v=1402604893"
  ],
  "featurot_image": "//cdn.versacommerce.de/s/files/1/0040/7092/products/rot-rain-coat.jpeg?v=1402604893",
  "options": [
    {
      "name": "Größe",
      "position": 1
    }
  ],
  "url": "/products/rot-rain-coat"
}

Selling plan example

Produkte mit Verkaufsplänen verfügen über die folgenden zusätzlichen Eigenschaften, die unter /products/<handle>. js.

{
 "id":5290511958181,
 // ...
 "variants":[
    {
       "id":34620489400485,
       // ...
       "requires_selling_plan":false,
       "selling_plan_allocations":[
          {
             "price":3120,
             "compare_at_price":3900,
             "per_delivery_price":3120,
             "selling_plan_id":360613,
             "selling_plan_group_id":14699254537353206000
          },
          {
             "price":3510,
             "compare_at_price":3900,
             "per_delivery_price":3510,
             "selling_plan_id":393381,
             "selling_plan_group_id":14699254537353206000
          }
       ]
    }
 ],
 "requires_selling_plan":false,
 "selling_plan_groups":[
    {
       "id":14699254537353206000,
       "name":"Subscribe and Save",
       "options":[
          {
             "name":"Delivery Frequency",
             "position":1,
             "values":[
                "Month",
                "Week"
             ]
          },
          {
             "name":"Billing Frequency",
             "position":2,
             "values":[
                "Month",
                "Week"
             ]
          }
       ],
       "selling_plans":[
          {
             "id":360613,
             "name":"Pay every month, delivery every month | save 20%",
             "description":"No commitment · Auto-renews · Skip or cancel anytime",
             "options":[
                {
                   "name":"Delivery Frequency",
                   "position":1,
                   "value":"Month"
                },
                {
                   "name":"Billing Frequency",
                   "position":2,
                   "value":"Month"
                }
             ],
             "recurring_deliveries":true
          },
          {
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.