Back

Search

Search

Methods

Inventory

OrderPrintStatus
Orders

ShippingService

Orders /RecalculateSingleOrderPackaging

Allows 150 calls per minute

Response: CalcOrderHeader



Designed to recalculate order packaging totals based on the object provided

Parameters

NameTypeDescription
requestCalcOrderHeaderRequest object with data needed
cancellationTokenCancellationToken

Permissions

GlobalPermissions.OrderBook.ViewOrderDetailsNode

Example Request

The following request format is required for this method.

Endpoint URL

POST https://eu-ext.linnworks.net/api/Orders/RecalculateSingleOrderPackaging

Headers

Connection: keep-alive
Accept: application/json
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

Request Body

This is an example of the request structure. Results will vary depending on your data.

request={
  "pkOrderID": "b0a59764-e71a-4da7-90aa-1af10fd15fe2",
  "nOrderId": 2,
  "fkPostalServiceId": "25eabb42-5196-468e-b359-6371d0e2ff63",
  "fkCountryId": "4beadf60-7baf-4e2e-a8c4-34bc907e74e3",
  "cCountry": "sample string 5",
  "ItemWeight": 6.0,
  "fkPackagingGroupId": "9b8f676d-1723-47b2-8252-c54f0d78d788",
  "fkPackagingTypeId": "9478ea73-cbe5-4ddb-b1d1-198c45979591",
  "IsSplitPackaging": false,
  "PackagingWeight": 9.0,
  "TotalWeight": 10.0,
  "TotalWidth": 1.0,
  "TotalHeight": 1.0,
  "TotalDepth": 1.0,
  "ManualAdjust": true,
  "CanAutoSplit": false,
  "IsAutoSplit": false,
  "SplitPackageCount": 13,
  "LabelPrinted": true,
  "CalculationHints": [
    "sample string 1"
  ],
  "Items": [
    {
      "fkStockItemId": "f0b23f3a-c716-4e30-a532-cb6f04cb76d9",
      "fkOrderItemId": "fb7f6c42-1d3b-4fbb-99e6-e46c643bd375",
      "StockItemIntId": 3,
      "SKU": "sample string 4",
      "nQty": 5,
      "ItemWeight": 6.0,
      "DimHeight": 7.0,
      "DimWidth": 8.0,
      "DimDepth": 9.0,
      "PackageGroup": "31468ec1-383e-480f-94dd-8fa04cef383d",
      "fkCompositeParentRowId": "f69c27f1-667c-4f6a-be4b-b6a6674da787",
      "IsCompositeChild": true,
      "Boxes": [
        {
          "BoxId": 1,
          "StockItemIntId": 2,
          "BoxName": "sample string 3",
          "Width": 4.0,
          "Height": 5.0,
          "Length": 6.0,
          "Weight": 7.0,
          "ValuePercentage": 8.0,
          "Barcode": "sample string 9",
          "PackagingTypeId": "fcb7b753-4d53-4249-9f16-5b3b574a0a6e",
          "LogicalDelete": true
        }
      ]
    }
  ],
  "Bins": [
    {
      "pkBinId": "cd9c60d1-c109-45d3-afd5-f6db38d69e43",
      "TrackingNumber": "sample string 2",
      "LabelId": "sample string 3",
      "Weight": 1.0,
      "PrintDate": "2021-07-29T09:24:12.9541188+01:00",
      "Cost": 1.0,
      "fkPackagingTypeId": "044e638c-f6c4-4a87-a8a3-6f9200b612ee",
      "Width": 1.0,
      "Height": 1.0,
      "Depth": 1.0,
      "PackagingWeight": 1.0,
      "ItemWeight": 1.0,
      "ManualAdjust": true,
      "Items": [
        {
          "ShippingOrderItemId": 1,
          "BinId": "efbd06ba-7d1d-4cd6-8968-bae84782dd01",
          "fkOrderItemId": "7177b5ac-7a59-49d4-91f5-118670427379",
          "BoxId": 1,
          "Quantity": 4
        }
      ]
    }
  ],
  "ThreeDimPackaging": {
    "TotalPackages": 1,
    "Packages": [
      {
        "PackagingId": "83626d14-f90c-4801-9e2f-52e48ede0d23",
        "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
            }
          }
        ],
        "Items": [
          {
            "ID": "027b38b1-b800-425d-b7ff-77de976d4e6c",
            "PkStockItemId": "1666a7b5-69ef-454f-b51f-eacbb14f66a1",
            "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
                }
              }
            ]
          }
        ],
        "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
            }
          }
        },
        "IsManualPackage": true
      }
    ],
    "UnpackedItems": {
      "b721a2eb-206f-4d7c-a4df-c9ec29111add": 2
    }
  },
  "DimMethod": 0
}&cancellationToken={
  "IsCancellationRequested": false,
  "CanBeCanceled": false,
  "WaitHandle": {
    "Handle": {
      "value": 1248
    },
    "SafeWaitHandle": {
      "IsInvalid": false,
      "IsClosed": false
    }
  }
}

Response

This is an example of the response JSON. Results will vary depending on your data.

{
  "pkOrderID": "84e34fa8-25bd-4d63-a189-11ef0abb2da0",
  "nOrderId": 2,
  "fkPostalServiceId": "217e3c02-ab1a-46c6-b3da-36bee999e260",
  "fkCountryId": "ff00dd1b-2695-4440-ac19-e49614525c66",
  "cCountry": "sample string 5",
  "ItemWeight": 6.0,
  "fkPackagingGroupId": "04e018a4-babf-4f99-971b-23527757dd46",
  "fkPackagingTypeId": "4a9d5f45-1942-4097-9064-ecc0d22dcdd7",
  "IsSplitPackaging": false,
  "PackagingWeight": 9.0,
  "TotalWeight": 10.0,
  "TotalWidth": 1.0,
  "TotalHeight": 1.0,
  "TotalDepth": 1.0,
  "ManualAdjust": true,
  "CanAutoSplit": false,
  "IsAutoSplit": false,
  "SplitPackageCount": 13,
  "LabelPrinted": true,
  "CalculationHints": [
    "sample string 1"
  ],
  "Items": [
    {
      "fkStockItemId": "531db36f-624c-45f4-b2f8-67005a5ca531",
      "fkOrderItemId": "c2327d1a-a912-417d-9ce2-5c90d847cacb",
      "StockItemIntId": 3,
      "SKU": "sample string 4",
      "nQty": 5,
      "ItemWeight": 6.0,
      "DimHeight": 7.0,
      "DimWidth": 8.0,
      "DimDepth": 9.0,
      "PackageGroup": "847537db-9085-4cd9-9d29-871a3bf0c2b4",
      "fkCompositeParentRowId": "ca3ed01a-538b-4dc9-b3ee-60046745fdcb",
      "IsCompositeChild": true,
      "Boxes": [
        {
          "BoxId": 1,
          "StockItemIntId": 2,
          "BoxName": "sample string 3",
          "Width": 4.0,
          "Height": 5.0,
          "Length": 6.0,
          "Weight": 7.0,
          "ValuePercentage": 8.0,
          "Barcode": "sample string 9",
          "PackagingTypeId": "f1cc7ecf-34c4-472b-9080-54c7172fa825",
          "LogicalDelete": true
        }
      ]
    }
  ],
  "Bins": [
    {
      "pkBinId": "281c7f67-9b6a-49a2-b3b2-3ad3e172cfde",
      "TrackingNumber": "sample string 2",
      "LabelId": "sample string 3",
      "Weight": 1.0,
      "PrintDate": "2021-07-29T09:24:51.953449+01:00",
      "Cost": 1.0,
      "fkPackagingTypeId": "a50c4f37-b427-469a-ad6b-b31b8246605f",
      "Width": 1.0,
      "Height": 1.0,
      "Depth": 1.0,
      "PackagingWeight": 1.0,
      "ItemWeight": 1.0,
      "ManualAdjust": true,
      "Items": [
        {
          "ShippingOrderItemId": 1,
          "BinId": "546bd2bd-5cfe-4238-bafc-6b470498f8f3",
          "fkOrderItemId": "408b83d9-3c77-4bce-8fb7-c78c11c5d336",
          "BoxId": 1,
          "Quantity": 4
        }
      ]
    }
  ],
  "ThreeDimPackaging": {
    "TotalPackages": 1,
    "Packages": [
      {
        "PackagingId": "b3a9914f-6844-4a9a-a519-7b1c74c4e443",
        "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
            }
          }
        ],
        "Items": [
          {
            "ID": "578e37df-31d0-428c-a548-25af251796c5",
            "PkStockItemId": "c68d9b5b-4bb4-4efc-b258-3cda64cca985",
            "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": [
              {
              }
            ]
          }
        ],
        "LayerCount": 7,
        "LayerFace": {
          "1": {
          }
        },
        "IsManualPackage": true
      }
    ],
    "UnpackedItems": {
      "5758d949-6456-4b05-a508-9a0fb5334a60": 2
    }
  },
  "DimMethod": 0
}