Back

Search

Search

Methods

Inventory

Orders

Orders /SetOrderPackaging

Response: CalcOrderHeader



Designed to save order packaging when it has already been calculated but not saved or is a manual edit.

Parameters

NameTypeDescription
requestSetOrderPackagingRequestRequest object with data to be saved in the database

HTTP Endpoint

Server /Orders / SetOrderPackaging

Permissions

GlobalPermissions.OrderBook.ViewOrderDetailsNode

Example Code

Example Request

The following request format is required for this method.

POST https://eu-ext.linnworks.net//api/Orders/SetOrderPackaging HTTP/1.1
Host: eu-ext.linnworks.net
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
Origin: https://www.linnworks.net
Accept-Language: en
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://www.linnworks.net/
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

request={
  "fkPackagingGroupId": "cc92819e-70fa-40d9-b588-1bb53c139253",
  "fkPackagingTypeId": "34ef5f7d-c8b9-4095-a0db-e8cbf9149cd9",
  "pkOrderId": "ea26cc95-9185-448b-8a27-595710ca8307",
  "TotalWeight": 4.1,
  "ManualAdjust": true,
  "IsAutoSplit": true,
  "TotalDepth": 7.0,
  "TotalHeight": 8.0,
  "TotalWidth": 9.0
}

Response

This is an example response. Results may vary depending on your data.

{
  "pkOrderID": "c74c47bd-ec9a-405c-ae02-a22a3ad9a4fb",
  "nOrderId": 2,
  "fkPostalServiceId": "30f0615a-8b63-4b39-96a5-47f1f32e6c1d",
  "fkCountryId": "6684d06a-5843-4584-8c4f-f930b561266d",
  "cCountry": "sample string 5",
  "ItemWeight": 6.1,
  "fkPackagingGroupId": "63c3853b-5601-41df-8797-f31513972c97",
  "fkPackagingTypeId": "01203784-b4d2-4896-b0e3-3000e6e57122",
  "IsSplitPackaging": false,
  "PackagingWeight": 9.1,
  "TotalWeight": 10.1,
  "TotalWidth": 1.0,
  "TotalHeight": 1.0,
  "TotalDepth": 1.0,
  "ManualAdjust": true,
  "CanAutoSplit": false,
  "IsAutoSplit": false,
  "SplitPackageCount": 13,
  "LabelPrinted": true,
  "CalculationHints": [
    "sample string 1",
    "sample string 2"
  ],
  "Items": [
    {
      "fkStockItemId": "9cbab667-9d3d-4c93-ba0f-ae0dc95c84bb",
      "fkOrderItemId": "0dd492bb-3512-4f25-8842-60b62728a904",
      "SKU": "sample string 3",
      "nQty": 4,
      "ItemWeight": 5.1,
      "DimHeight": 6.1,
      "DimWidth": 7.1,
      "DimDepth": 8.1,
      "PackageGroup": "9405b953-6b60-4941-898e-83a68b69fa6c",
      "fkCompositeParentRowId": "679a06c5-65bc-4dd4-a3ff-339689f03ad3"
    },
    {
      "fkStockItemId": "9cbab667-9d3d-4c93-ba0f-ae0dc95c84bb",
      "fkOrderItemId": "0dd492bb-3512-4f25-8842-60b62728a904",
      "SKU": "sample string 3",
      "nQty": 4,
      "ItemWeight": 5.1,
      "DimHeight": 6.1,
      "DimWidth": 7.1,
      "DimDepth": 8.1,
      "PackageGroup": "9405b953-6b60-4941-898e-83a68b69fa6c",
      "fkCompositeParentRowId": "679a06c5-65bc-4dd4-a3ff-339689f03ad3"
    }
  ],
  "Bins": [
    {
      "pkBinId": "8ab0e808-5725-4613-b21c-16def2ae963c",
      "TrackingNumber": "sample string 2",
      "LabelId": "sample string 3",
      "Weight": 1.0,
      "PrintDate": "2018-10-03T11:12:36.4979168+01:00",
      "Cost": 1.0,
      "fkPackagingTypeId": "afc6a605-4bf1-4b43-8ca3-06ce51ad05e4",
      "Width": 1.0,
      "Height": 1.0,
      "Depth": 1.0,
      "PackagingWeight": 1.0,
      "ItemWeight": 1.0,
      "ManualAdjust": true,
      "Items": [
        {
          "fkOrderItemId": "f128b1ae-5811-444d-a37c-1b1276eff77f",
          "Quantity": 2
        },
        {
          "fkOrderItemId": "f128b1ae-5811-444d-a37c-1b1276eff77f",
          "Quantity": 2
        }
      ]
    },
    {
      "pkBinId": "8ab0e808-5725-4613-b21c-16def2ae963c",
      "TrackingNumber": "sample string 2",
      "LabelId": "sample string 3",
      "Weight": 1.0,
      "PrintDate": "2018-10-03T11:12:36.4979168+01:00",
      "Cost": 1.0,
      "fkPackagingTypeId": "afc6a605-4bf1-4b43-8ca3-06ce51ad05e4",
      "Width": 1.0,
      "Height": 1.0,
      "Depth": 1.0,
      "PackagingWeight": 1.0,
      "ItemWeight": 1.0,
      "ManualAdjust": true,
      "Items": [
        {
          "fkOrderItemId": "f128b1ae-5811-444d-a37c-1b1276eff77f",
          "Quantity": 2
        },
        {
          "fkOrderItemId": "f128b1ae-5811-444d-a37c-1b1276eff77f",
          "Quantity": 2
        }
      ]
    }
  ],
  "ThreeDimPackaging": {
    "TotalPackages": 2,
    "Packages": [
      {
        "PackagingId": "34f00ccb-94c8-4c76-a0b6-c1877ddce21f",
        "Width": 2.1,
        "Height": 3.1,
        "Depth": 4.1,
        "ItemWeight": 5.0,
        "PackagingWeight": 6.0,
        "Faces": [
          {
            "TopLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "TopRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            }
          },
          {
            "TopLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "TopRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            }
          }
        ],
        "Items": [
          {
            "ID": "138527ef-837f-4c0b-82c7-b3b7a17bc4fa",
            "PkStockItemId": "56377cf5-ee3a-45f1-b018-ad0cb5428f54",
            "SKU": "sample string 2",
            "Width": 3.1,
            "Height": 4.1,
            "Depth": 5.1,
            "Weight": 6.0,
            "X": 7.1,
            "Y": 8.1,
            "Z": 9.1,
            "Layer": 10,
            "Faces": [
              {
                "TopLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "TopRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                }
              },
              {
                "TopLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "TopRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                }
              }
            ]
          },
          {
            "ID": "138527ef-837f-4c0b-82c7-b3b7a17bc4fa",
            "PkStockItemId": "56377cf5-ee3a-45f1-b018-ad0cb5428f54",
            "SKU": "sample string 2",
            "Width": 3.1,
            "Height": 4.1,
            "Depth": 5.1,
            "Weight": 6.0,
            "X": 7.1,
            "Y": 8.1,
            "Z": 9.1,
            "Layer": 10,
            "Faces": [
              {
                "TopLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "TopRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                }
              },
              {
                "TopLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "TopRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                }
              }
            ]
          }
        ],
        "LayerCount": 7,
        "LayerFace": {
          "1": {
            "TopLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "TopRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            }
          },
          "2": {
            "TopLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "TopRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            }
          }
        },
        "IsManualPackage": true
      },
      {
        "PackagingId": "34f00ccb-94c8-4c76-a0b6-c1877ddce21f",
        "Width": 2.1,
        "Height": 3.1,
        "Depth": 4.1,
        "ItemWeight": 5.0,
        "PackagingWeight": 6.0,
        "Faces": [
          {
            "TopLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "TopRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            }
          },
          {
            "TopLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "TopRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            }
          }
        ],
        "Items": [
          {
            "ID": "138527ef-837f-4c0b-82c7-b3b7a17bc4fa",
            "PkStockItemId": "56377cf5-ee3a-45f1-b018-ad0cb5428f54",
            "SKU": "sample string 2",
            "Width": 3.1,
            "Height": 4.1,
            "Depth": 5.1,
            "Weight": 6.0,
            "X": 7.1,
            "Y": 8.1,
            "Z": 9.1,
            "Layer": 10,
            "Faces": [
              {
                "TopLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "TopRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                }
              },
              {
                "TopLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "TopRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                }
              }
            ]
          },
          {
            "ID": "138527ef-837f-4c0b-82c7-b3b7a17bc4fa",
            "PkStockItemId": "56377cf5-ee3a-45f1-b018-ad0cb5428f54",
            "SKU": "sample string 2",
            "Width": 3.1,
            "Height": 4.1,
            "Depth": 5.1,
            "Weight": 6.0,
            "X": 7.1,
            "Y": 8.1,
            "Z": 9.1,
            "Layer": 10,
            "Faces": [
              {
                "TopLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "TopRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                }
              },
              {
                "TopLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomLeft": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "TopRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                },
                "BottomRight": {
                  "IsEmpty": false,
                  "X": 1.1,
                  "Y": 2.1
                }
              }
            ]
          }
        ],
        "LayerCount": 7,
        "LayerFace": {
          "1": {
            "TopLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "TopRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            }
          },
          "2": {
            "TopLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomLeft": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "TopRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            },
            "BottomRight": {
              "IsEmpty": false,
              "X": 1.1,
              "Y": 2.1
            }
          }
        },
        "IsManualPackage": true
      }
    ],
    "UnpackedItems": {
      "f5b8c65f-9bdf-4d9d-b275-66635797be5e": 2,
      "5b5e4b58-93e0-4b84-876c-aeedb0c79cb3": 4
    }
  },
  "DimMethod": 0
}