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": "96c11227-c910-4e56-9f6c-b4d9cca6df3f",
  "fkPackagingTypeId": "3b3a58bf-5104-4701-b98b-e27b688ae90f",
  "pkOrderId": "7204408e-e07c-41fe-a438-ff1af8aa4a1e",
  "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": "414cbf58-a64c-4cde-b960-f75e32aa15a1",
  "nOrderId": 2,
  "fkPostalServiceId": "a18852f9-f1c1-4d1e-ab8c-3c5e6910dd24",
  "fkCountryId": "b2dc6094-336b-48cb-af7c-09043ab45600",
  "cCountry": "sample string 5",
  "ItemWeight": 6.1,
  "fkPackagingGroupId": "78fa0ed0-921f-492d-b5de-8157cf1c00f2",
  "fkPackagingTypeId": "b6de708f-e334-4afc-a07a-184068a3fa98",
  "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": "c865e1ce-c712-4079-8589-c8cce1002bf0",
      "fkOrderItemId": "75411189-0cfa-48d4-8f81-6fd20316a8f2",
      "SKU": "sample string 3",
      "nQty": 4,
      "ItemWeight": 5.1,
      "DimHeight": 6.1,
      "DimWidth": 7.1,
      "DimDepth": 8.1,
      "PackageGroup": "ce2198ee-aa9d-442f-89f0-cbaf0f692c3e",
      "fkCompositeParentRowId": "0cfa6c6f-1fa4-4746-bde9-fec0d4f73815"
    },
    {
      "fkStockItemId": "c865e1ce-c712-4079-8589-c8cce1002bf0",
      "fkOrderItemId": "75411189-0cfa-48d4-8f81-6fd20316a8f2",
      "SKU": "sample string 3",
      "nQty": 4,
      "ItemWeight": 5.1,
      "DimHeight": 6.1,
      "DimWidth": 7.1,
      "DimDepth": 8.1,
      "PackageGroup": "ce2198ee-aa9d-442f-89f0-cbaf0f692c3e",
      "fkCompositeParentRowId": "0cfa6c6f-1fa4-4746-bde9-fec0d4f73815"
    }
  ],
  "Bins": [
    {
      "pkBinId": "223e9c14-b066-4216-b8d2-b23fdfc90ac5",
      "TrackingNumber": "sample string 2",
      "LabelId": "sample string 3",
      "Weight": 1.0,
      "PrintDate": "2019-10-09T15:11:44.2509139+01:00",
      "Cost": 1.0,
      "fkPackagingTypeId": "e6973547-bf55-4819-b673-954e68a2d8cb",
      "Width": 1.0,
      "Height": 1.0,
      "Depth": 1.0,
      "PackagingWeight": 1.0,
      "ItemWeight": 1.0,
      "ManualAdjust": true,
      "Items": [
        {
          "fkOrderItemId": "fa7cef01-06bc-4d18-b1bf-d12dfd6e2c7b",
          "Quantity": 2
        },
        {
          "fkOrderItemId": "fa7cef01-06bc-4d18-b1bf-d12dfd6e2c7b",
          "Quantity": 2
        }
      ]
    },
    {
      "pkBinId": "223e9c14-b066-4216-b8d2-b23fdfc90ac5",
      "TrackingNumber": "sample string 2",
      "LabelId": "sample string 3",
      "Weight": 1.0,
      "PrintDate": "2019-10-09T15:11:44.2509139+01:00",
      "Cost": 1.0,
      "fkPackagingTypeId": "e6973547-bf55-4819-b673-954e68a2d8cb",
      "Width": 1.0,
      "Height": 1.0,
      "Depth": 1.0,
      "PackagingWeight": 1.0,
      "ItemWeight": 1.0,
      "ManualAdjust": true,
      "Items": [
        {
          "fkOrderItemId": "fa7cef01-06bc-4d18-b1bf-d12dfd6e2c7b",
          "Quantity": 2
        },
        {
          "fkOrderItemId": "fa7cef01-06bc-4d18-b1bf-d12dfd6e2c7b",
          "Quantity": 2
        }
      ]
    }
  ],
  "ThreeDimPackaging": {
    "TotalPackages": 2,
    "Packages": [
      {
        "PackagingId": "56e4786b-c50b-4490-9efe-a18a5014815a",
        "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": "441e71e1-f73e-4bf8-8625-35af54df315b",
            "PkStockItemId": "57e61612-725d-4ce8-9100-90c643f1eeb9",
            "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": "441e71e1-f73e-4bf8-8625-35af54df315b",
            "PkStockItemId": "57e61612-725d-4ce8-9100-90c643f1eeb9",
            "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": "56e4786b-c50b-4490-9efe-a18a5014815a",
        "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": "441e71e1-f73e-4bf8-8625-35af54df315b",
            "PkStockItemId": "57e61612-725d-4ce8-9100-90c643f1eeb9",
            "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": "441e71e1-f73e-4bf8-8625-35af54df315b",
            "PkStockItemId": "57e61612-725d-4ce8-9100-90c643f1eeb9",
            "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": {
      "1fb88612-f5d4-41a1-b18f-e7287929721a": 2,
      "e3192993-dafc-47f6-b13c-9f16c25f4c86": 4
    }
  },
  "DimMethod": 0
}