Dokumentation Entwickler API

Item Ressource

Aktualisiert am 29.03.2017

Item Ressource

Attention

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

Item Ressource

$ 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

Item Ressource

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
}
}
]

Item Ressource

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

Item Ressource

$ 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

Item Ressource

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 Ressource

Get Items Count

GET /api/items/count.json

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


Example

Item Ressource

$ 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

Item Ressource

{
"count": 124
}

Item Ressource

Ship Items

PUT /api/items/:item_id/ship_now.json

  • PUT /api/items/:item_id/ship_now.json will update the item from the parameters passed. The item and order status is set to packing. If the order has more than one item, the order status is set to partial_packing until all items have the status packing.
  • PUT /api/orders/:order_id/items/:item_id/ship_now.json is also possible.


Example

Item Ressource

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