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": "a2427463-5aa0-4427-95fe-4b3f804577f8",
  "fkPackagingTypeId": "fd04ce5b-e6c3-4708-a05a-703e2289d66e",
  "pkOrderId": "74dda52f-1a89-4fe4-9f56-84c5b210a024",
  "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": "e77948d1-c217-462e-adf4-b7f2e86ca8ed",
  "nOrderId": 2,
  "fkPostalServiceId": "c27a53d3-7d1c-43b2-8bd7-401204c05f9c",
  "fkCountryId": "a5cb848d-4c7a-4eae-a716-b8150a3aa0fd",
  "cCountry": "sample string 5",
  "ItemWeight": 6.1,
  "fkPackagingGroupId": "f9c5dc78-1b2e-424c-8d46-47b61d042839",
  "fkPackagingTypeId": "0c0dc62e-fdab-4efc-922e-ba87e3ce290c",
  "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": "b5d9361f-f86e-4335-9924-f191b71943e9",
      "fkOrderItemId": "75d7042f-fdc7-4573-9e65-4eec8430aa67",
      "SKU": "sample string 3",
      "nQty": 4,
      "ItemWeight": 5.1,
      "DimHeight": 6.1,
      "DimWidth": 7.1,
      "DimDepth": 8.1,
      "PackageGroup": "38ebe196-1d35-4dcd-9436-99b3fc9b20eb",
      "fkCompositeParentRowId": "1eddbc23-e8b8-42b9-aaab-30d103f9d54f"
    },
    {
      "fkStockItemId": "b5d9361f-f86e-4335-9924-f191b71943e9",
      "fkOrderItemId": "75d7042f-fdc7-4573-9e65-4eec8430aa67",
      "SKU": "sample string 3",
      "nQty": 4,
      "ItemWeight": 5.1,
      "DimHeight": 6.1,
      "DimWidth": 7.1,
      "DimDepth": 8.1,
      "PackageGroup": "38ebe196-1d35-4dcd-9436-99b3fc9b20eb",
      "fkCompositeParentRowId": "1eddbc23-e8b8-42b9-aaab-30d103f9d54f"
    }
  ],
  "Bins": [
    {
      "pkBinId": "fa616cd5-7e2b-4058-85db-a1a35bb341aa",
      "TrackingNumber": "sample string 2",
      "LabelId": "sample string 3",
      "Weight": 1.0,
      "PrintDate": "2019-07-23T15:31:56.8748845+01:00",
      "Cost": 1.0,
      "fkPackagingTypeId": "ada9a15c-8096-415d-b2d1-25799eb2ed0d",
      "Width": 1.0,
      "Height": 1.0,
      "Depth": 1.0,
      "PackagingWeight": 1.0,
      "ItemWeight": 1.0,
      "ManualAdjust": true,
      "Items": [
        {
          "fkOrderItemId": "e2258562-77ef-4116-b711-2cef81b2112e",
          "Quantity": 2
        },
        {
          "fkOrderItemId": "e2258562-77ef-4116-b711-2cef81b2112e",
          "Quantity": 2
        }
      ]
    },
    {
      "pkBinId": "fa616cd5-7e2b-4058-85db-a1a35bb341aa",
      "TrackingNumber": "sample string 2",
      "LabelId": "sample string 3",
      "Weight": 1.0,
      "PrintDate": "2019-07-23T15:31:56.8748845+01:00",
      "Cost": 1.0,
      "fkPackagingTypeId": "ada9a15c-8096-415d-b2d1-25799eb2ed0d",
      "Width": 1.0,
      "Height": 1.0,
      "Depth": 1.0,
      "PackagingWeight": 1.0,
      "ItemWeight": 1.0,
      "ManualAdjust": true,
      "Items": [
        {
          "fkOrderItemId": "e2258562-77ef-4116-b711-2cef81b2112e",
          "Quantity": 2
        },
        {
          "fkOrderItemId": "e2258562-77ef-4116-b711-2cef81b2112e",
          "Quantity": 2
        }
      ]
    }
  ],
  "ThreeDimPackaging": {
    "TotalPackages": 2,
    "Packages": [
      {
        "PackagingId": "faddaf31-a70f-4caa-b9b9-ffb2a9c3899c",
        "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": "9bd7a634-814b-441d-ae9b-744155cac215",
            "PkStockItemId": "c69432d3-a5b5-46ba-818a-118f357e0779",
            "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": "9bd7a634-814b-441d-ae9b-744155cac215",
            "PkStockItemId": "c69432d3-a5b5-46ba-818a-118f357e0779",
            "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": "faddaf31-a70f-4caa-b9b9-ffb2a9c3899c",
        "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": "9bd7a634-814b-441d-ae9b-744155cac215",
            "PkStockItemId": "c69432d3-a5b5-46ba-818a-118f357e0779",
            "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": "9bd7a634-814b-441d-ae9b-744155cac215",
            "PkStockItemId": "c69432d3-a5b5-46ba-818a-118f357e0779",
            "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": {
      "dd6e4f32-93b2-4a6c-9de7-8aec5563f893": 2,
      "824fa981-0a6d-446e-ac8c-c5ec333334fd": 4
    }
  },
  "DimMethod": 0
}