Item Resource

Item Resource

Those resources are read-only by default. Please contact us if you need write permissions.


Get Items

GET /api/items.json

  • GET /api/items.json will return the first 150 (default limit) items. You can increase the limit to a maximum of 250 items.
  • GET /api/orders/:order_id/items.json is also possible.

Example:

$ curl -s \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u APP_API_KEY:APP_API_PASSWORD \
-X GET \
http://shop_subdomain.versacommerce.de/api/items.json

Status: 200 OK

[
  {
    "item": {
      "category": "Fashion",
      "code": "dress-001",
      "current_status_on": null,
      "discount": 0,
      "discount_amount": "0.0",
      "discount_price": "12.0",
      "discount_type": "money",
      "editable_quantity": 1,
      "editable_shipping_type": "DHL",
      "extra_price": "0.0",
      "id": "100",
      "line_price": "12.0",
      "line_tax": "2.28",
      "line_weight": "0",
      "options": {
        "Color": "blue"
      },
      "order_id": 1000,
      "price": "12.0",
      "product_id": 10000,
      "quantity": 1,
      "shipment_id": null,
      "shipping_address_id": null,
      "shipping_type": "DHL",
      "status": "undelivered",
      "subtitle": "Now for a special price!",
      "tax_category": "standard",
      "tax_rate": "19.0",
      "title": "Jersey dress",
      "vendor": "Promod",
      "weight": 0
    }
  },
  {
    "item": {
      "category": "Fashion",
      "code": "dress-002",
      "current_status_on": null,
      "discount": 0,
      "discount_amount": "0.0",
      "discount_price": "20.0",
      "discount_type": "money",
      "editable_quantity": 1,
      "editable_shipping_type": "DHL",
      "extra_price": "0.0",
      "id": 101,
      "line_price": "0.0",
      "line_tax": "0.0",
      "line_weight": 0,
      "options": null,
      "order_id": 1000,
      "price": "20.0",
      "product_id": 10001,
      "quantity": 1,
      "shipment_id": null,
      "shipping_address_id": null,
      "shipping_type": "DHL",
      "status": "canceled",
      "subtitle": null,
      "tax_category": "standard",
      "tax_rate": "19.0",
      "title": "Knee Length Modest Neckline Dress",
      "vendor": "XOXO",
      "weight": 0
    }
  }
]


Get Item

GET /api/items/:item_id.json

  • GET /api/items/:item_id.json will return the specified item.
  • GET /api/orders/:order_id/items/:item_id.json is also possible.

Example:

$ curl -s \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u APP_API_KEY:APP_API_PASSWORD \
-X GET \
http://shop_subdomain.versacommerce.de/api/items/:item_id.json

Status: 200 OK

{
  "item": {
    "category": "Fashion",
    "code": "dress-001",
    "current_status_on": null,
    "discount": 0,
    "discount_amount": "0.0",
    "discount_price": "12.0",
    "discount_type": "money",
    "editable_quantity": 1,
    "editable_shipping_type": "DHL",
    "extra_price": "0.0",
    "id": 100,
    "line_price": "12.0",
    "line_tax": "2.28",
    "line_weight": 0,
    "options": {
      "Color": "blue"
    },
    "order_id": 1000,
    "price": "12.0",
    "product_id": 10000,
    "quantity": 1,
    "shipment_id": null,
    "shipping_address_id": null,
    "shipping_type": "DHL",
    "status": "undelivered",
    "subtitle": "Now for a special price!",
    "tax_category": "standard",
    "tax_rate": "19.0",
    "title": "Jersey dress",
    "vendor": "Promod",
    "weight": 0
  }
}


Get Items Count

GET /api/items/count.json

  • GET /api/items/count.json will return the items count.

Example:

$ curl -s \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u APP_API_KEY:APP_API_PASSWORD \
-X GET \
http://shop_subdomain.versacommerce.de/api/items/count.json

Status: 200 OK

{
  "count": 124
}


    • Related Articles

    • Item

      Anzeige einer Artikelliste mit Produktbildern, indem aus der item-Variable die product-Variable zurückgeholt wird. <tbody class="cart_products"> {% for item in cart.items %} <tr> <td><input type="text" size="4" name="updates[]" id="updates_" ...
    • List_item

      list_item.link Gibt einen link aus, der auf das Objekt zeigt. list_item.object Gibt das Objekt zu diesem Verweis aus.
    • Order Resource

      Attention Order resources are read-only by default. Please contact us for access. ​ Order Statuses Order Status English German open new order Neue Bestellung in_progress in progress, started processing Bearbeitung begonnen cancelled order was ...
    • Shipment Resource

      Attention Shipment resources are read-only by default. Please contact us at support@versacommerce.de if you need write permissions. Get Shipments GET /api/shipments.json GET /api/shipments.json will return the first 150 (default limit) items. You can ...
    • Metafield Resource

      Metafield Resource Get Metafields Get Metafield Create Metafield Update Metafield Delete Metafield Get Metafield Count Filter Metafields Get Metfields GET /api/metafields.json GET /api/metafields.json will return all Metafields. See the Filter ...