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.ViewOrderDetails.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": "5cc2fe6d-c61a-4c21-ad51-c839d1a39ef5",
  "fkPackagingTypeId": "d5f8009e-3fe4-4240-941e-e65d259375f7",
  "pkOrderId": "ac2ec78a-30c0-4bca-b776-542642b4eae7",
  "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": "b4979275-8568-495b-aa85-b85d2bf9febe",
  "nOrderId": 2,
  "fkPostalServiceId": "c9db34ee-bf37-4bce-9d0f-a6659e6e8e4c",
  "fkCountryId": "8748866c-4e03-48f6-9a67-5d348b3e862c",
  "cCountry": "sample string 5",
  "ItemWeight": 6.1,
  "fkPackagingGroupId": "b755befb-da65-4de2-b6c0-b2723525ba11",
  "fkPackagingTypeId": "c14ab7bc-d0ee-4ef1-95bb-3671fc011330",
  "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": "a93cb1b0-ce88-4806-a9fd-e993e7418939",
      "fkOrderItemId": "e2977685-ec18-4425-8c18-196c29062172",
      "SKU": "sample string 3",
      "nQty": 4,
      "ItemWeight": 5.1,
      "DimHeight": 6.1,
      "DimWidth": 7.1,
      "DimDepth": 8.1,
      "PackageGroup": "8226ba20-1128-4374-984e-4dcb69b9ec47",
      "fkCompositeParentRowId": "70e67cf9-8fdf-4a8d-af9c-8799b8613038"
    },
    {
      "fkStockItemId": "a93cb1b0-ce88-4806-a9fd-e993e7418939",
      "fkOrderItemId": "e2977685-ec18-4425-8c18-196c29062172",
      "SKU": "sample string 3",
      "nQty": 4,
      "ItemWeight": 5.1,
      "DimHeight": 6.1,
      "DimWidth": 7.1,
      "DimDepth": 8.1,
      "PackageGroup": "8226ba20-1128-4374-984e-4dcb69b9ec47",
      "fkCompositeParentRowId": "70e67cf9-8fdf-4a8d-af9c-8799b8613038"
    }
  ],
  "Bins": [
    {
      "pkBinId": "155ff07c-509a-476a-9c99-2b479d4e6290",
      "TrackingNumber": "sample string 2",
      "LabelId": "sample string 3",
      "Weight": 1.0,
      "PrintDate": "2018-02-19T16:57:08.4697333+00:00",
      "Cost": 1.0,
      "fkPackagingTypeId": "3a920277-1607-4674-851b-d0aa1ec5fd0c",
      "Width": 1.0,
      "Height": 1.0,
      "Depth": 1.0,
      "PackagingWeight": 1.0,
      "ItemWeight": 1.0,
      "ManualAdjust": true,
      "Items": [
        {
          "fkOrderItemId": "d5fa1a73-b6c9-4afa-a306-3a9e33443175",
          "Quantity": 2
        },
        {
          "fkOrderItemId": "d5fa1a73-b6c9-4afa-a306-3a9e33443175",
          "Quantity": 2
        }
      ]
    },
    {
      "pkBinId": "155ff07c-509a-476a-9c99-2b479d4e6290",
      "TrackingNumber": "sample string 2",
      "LabelId": "sample string 3",
      "Weight": 1.0,
      "PrintDate": "2018-02-19T16:57:08.4697333+00:00",
      "Cost": 1.0,
      "fkPackagingTypeId": "3a920277-1607-4674-851b-d0aa1ec5fd0c",
      "Width": 1.0,
      "Height": 1.0,
      "Depth": 1.0,
      "PackagingWeight": 1.0,
      "ItemWeight": 1.0,
      "ManualAdjust": true,
      "Items": [
        {
          "fkOrderItemId": "d5fa1a73-b6c9-4afa-a306-3a9e33443175",
          "Quantity": 2
        },
        {
          "fkOrderItemId": "d5fa1a73-b6c9-4afa-a306-3a9e33443175",
          "Quantity": 2
        }
      ]
    }
  ],
  "ThreeDimPackaging": {
    "TotalPackages": 2,
    "Packages": [
      {
        "PackagingId": "0d79a238-d747-4c2f-bd7e-ae9a45a6b1eb",
        "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": "20580984-f069-4fa2-b42b-5418b13e61d2",
            "PkStockItemId": "bd76afd5-caf5-439d-a81b-df90945c7361",
            "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": "20580984-f069-4fa2-b42b-5418b13e61d2",
            "PkStockItemId": "bd76afd5-caf5-439d-a81b-df90945c7361",
            "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": "0d79a238-d747-4c2f-bd7e-ae9a45a6b1eb",
        "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": "20580984-f069-4fa2-b42b-5418b13e61d2",
            "PkStockItemId": "bd76afd5-caf5-439d-a81b-df90945c7361",
            "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": "20580984-f069-4fa2-b42b-5418b13e61d2",
            "PkStockItemId": "bd76afd5-caf5-439d-a81b-df90945c7361",
            "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": {
      "f1a3f5f8-3742-448a-994f-2b91c8681a55": 2,
      "8dc9e22c-0188-46b3-bb18-8ed0bc7233a8": 4
    }
  },
  "DimMethod": 0
}