Update shipment¶
PUT
*base*/shipments/*shipmentId*
This will modify the products on the shipment, keeping the same shipmentId
. This function is designed for creation and modification of new shipments, meaning it will not work on existing shipments which:
- Have been shipped,
- Have been captured or paid, or
- Have any returns.
The only exception to this rule is setting GTG (Good to Go) or setting serial numbers on serializable product lines. This you can do at any point.
To be able to use this call, you need to create a shipment using "capture": false
so the create shipment call is not trying to capture the money.
Warning
If the automatic capture when creating shipments is disabled, to avoid sending shipments that has not been captured you need to Capture Shipment before you ship it.
If you need to remove the shipment, use the Delete Shipment method.
Parameters¶
string
required
|
The ID from shipment when creating or updating a shipment. |
||||
boolean
optional
|
Default 0 . Update shipment with Good to Go. |
||||
object
optional
|
Key is Example:
|
||||
boolean
optional
|
Response in xml format instead of json. |
Request example¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | PUT <base>/shipments/23123 HTTP/1.1
Content-type: application/json
{
"gtg":1,
"products": {
"43243": 1,
"43244": 2,
"43245": {
"serialNumber": "newSerialNumber",
"qty": 5
}
}
}
|
Response example¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | HTTP/1.1 200 OK
Content-type: application/json
{
"status": "ok",
"shipment": {
"orderId": "83651",
"selectionId": "ff805e6dc70f905553e2225c6977a27a",
"orderDate": "2012-02-04 15:16:13",
"cancelDate": "2012-08-04 15:16:13",
"preferredDeliveryDate": "2012-05-04 15:16:13",
"estimatedDeliveryDate": "2012-05-04 15:16:13",
"orderStore": "retail",
"orderCurrency": "EUR",
"shipmentId": "83651-1",
"customerId": "11627",
"accountId": "0",
"deliveryName": "Someones Name",
"deliveryCompany": "",
"deliveryEmail": "tetete@ttet.com",
"deliveryCell": "+4912345678",
"deliveryTele": "",
"deliveryAddress": "Examplestreet 1",
"deliveryCoaddress": "",
"deliveryZipcode": "12345",
"deliveryCity": "Somecity",
"deliveryState": "",
"deliveryCountry": "DE",
"billingVAT": "",
"poNumber": "",
"shippingList": "standard",
"proforma": "http://.../proforma?shipment=83651-1",
"deliveryNote": "http://../delnote?shipment=83651-1",
"invoices": [
"https://online.klarna.com/invoice_public_show.yaws/invoice.pdf?invno=<>&orgno="
],
"suspect": 0,
"hold": 0,
"paid": 1,
"shouldCapture": 0,
"shippingValue": 25,
"voucherValue": 0,
"grandTotalValue": 3978.75,
"grandTotalTaxValue": 795.75,
"internalComment": "",
"otherComment": "",
"products": [
{
"lineId": "43243",
"sku": "B405916999",
"variantSku": "",
"sizeSku": "",
"name": "Product #1",
"variant": "White",
"size": "XS",
"ean": "7332577534606",
"qty": 1,
"originalPrice": 500.5,
"price": 450.5,
"weight": 2,
"weightUnit": "kg",
"countryOfOrigin": "DE",
"harmCode": "345345435",
"comment": ""
},
{
"lineId": "43244",
"sku": "C00622469B",
"variantSku": "",
"sizeSku": "",
"name": "Product #2",
"variant": "Blue",
"size": "XS",
"ean": "7332577652942",
"qty": 2,
"originalPrice": 200.5,
"price": 180.5,
"weight": 1.5,
"weightUnit": "kg",
"countryOfOrigin": "CI",
"harmCode": "423432",
"comment": ""
}
]
}
}
|
Error examples¶
1 2 3 4 5 | {
"status": "no",
"msg": "shipment is sent and can not be updated",
"shipment": "4-1"
}
|
1 2 3 4 5 | {
"status": "no",
"msg": "shipment is paid and can not be updated",
"shipment": "4-1"
}
|
1 2 3 4 5 | {
"status": "no",
"msg": "shipment is captured and can not be updated",
"shipment": "4-1"
}
|
1 2 3 4 5 | {
"status": "no",
"msg": "shipment has refunds and can not be updated",
"shipment": "4-1"
}
|