Dokumentation Entwickler API

Shipment Ressource

Aktualisiert am 16.03.2017

Shipment Ressource


Attention

Shipment resources are read-only by default. Please contact us at [email protected]

/* */ 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 increase the limit to a maximum of 250 items.


Example

Shipment 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/shipments.json

Shipment Ressource

Status: 200 OK

[
{
"shipment": {
"carrier_name": "DHL",
"created_at": "2013-04-24",
"id": 100,
"order_id": 1000,
"partial_delivery": false,
"pickup_at": "2000-01-01T14:00:00Z",
"pickup_on": "2013-04-24",
"status": "delivered",
tracking_code": "12345
}
},
{
"shipment": {
"carrier_name": "DHL",
"created_at": "2013-10-11",
"id": 101,
"order_id": 1001,
"partial_delivery": false,
"pickup_at": "2000-01-01T14:00:00Z",
"pickup_on": "2013-10-11",
"status": "undelivered",
tracking_code": "
}
}
]

Shipment Ressource

Get Shipments For Order

GET /api/orders/:oder_id/shipments.json

  • GET /api/orders/:oder_id/shipments.json will return the shipments for the specified order.


Example

Shipment 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/orders/:oder_id/shipments.json

Shipment Ressource

Status: 200 OK

[
{
"shipment": {
"carrier_name": "Spedition",
"created_at": "2013-10-11",
"id": 100,
"order_id": 1000,
"partial_delivery": true,
"pickup_at": "2000-01-01T08:00:00Z",
"pickup_on": "2013-10-14",
"status": "delivered",
tracking_code": "123...
}
},
{
"shipment": {
"carrier_name": "DHL",
"created_at": "2013-10-11",
"id": 101,
"order_id": 1000,
"partial_delivery": false,
"pickup_at": "2000-01-01T08:00:00Z",
"pickup_on": "2013-10-14",
"status": "delivered",
tracking_code": "456...
}
}
]

Shipment Ressource

This will return 200 OK with the current JSON representation of the shipments array for the specified order.

Get Shipment For Order

GET /api/orders/:oder_id/shipments/:shipment_id.json

  • GET /api/orders/:oder_id/shipments/:shipment_id.json will return the shipment for the specified order.


Example

Shipment 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/orders/:oder_id/shipments/:shipment_id.json

Shipment Ressource

Status: 200 OK

{
"shipment": {
"carrier_name": "Spedition",
"created_at": "2013-10-11",
"id": 100,
"order_id": 1000,
"partial_delivery": true,
"pickup_at": "2000-01-01T08:00:00Z",
"pickup_on": "2013-10-14",
"status": "delivered",
tracking_code": "123...
}
}