Shipment Resource

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

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": "123456"
    }
  }
]


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:
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

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

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:
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

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..."
  }
}


Update Shipment for Order

POST /api/shipments.json

  1. POST /api/shipments.json lets you create a shipment for the specified order.
  2. If you set "deliver" to true, the order will be marked as shipped
curl -s \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u api:YOUR_API_KEY \
-X POST \
-d \
'{
"shipment": {
"order_id": 963698,
"item_ids": [1575436],
"tracking_code": "123456789",
"tracking_url": "https://gls.com/123456789%22,
"origin_name": "WAKUE",
"origin_id": "-1",
"deliver": "true"
}
}' \
https://shop-subdomain.versacommerce.de/api/shipments.json

    • Related Articles

    • Shipment

      ​ Versandunternehmen: {{ order.shipment.carrier_name }} shipment.billing_address {{ shipment.billing_address }} shipment.carries_name {{ shipment.carrier_name }} shipment.id {{ shipment.id }} shipment.items {{ shipment.items }} shipment.order {{ ...
    • 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 ...
    • 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 ...
    • Product Image Resource

      Product Image Resource Bulk Create Or Update Delete Product Images Bulk Create or Update PUT /api/products/1/.json PUT /api/products/1.json will create or update the product images from the parameters passed. Example: $ curl -s \ -H 'Accept: ...
    • Customer Resource

      Attention Those resources are read-only by default. Get Customers GET /api/customers.json GET /api/customers.json will return the first 150 (default limit) customers. You can increase the limit to a maximum of 250 customers. Example: $ curl -s \ -H ...