Create new packages with quantities from the package

POST /OrderPackage/shipment-packages/{shipmentPackageId}/split-packages — OMS API · Package Splitting

Creates new packages by taking specified quantities from the items in the package; each splitPackages element is a package, packageDetails is the content of that package. Products left out in the request remain in a separate new package.

Splitting completes asynchronously: fetch packages again with GetOrderPackages to see the new packages.

Parametreler

  • shipmentPackageId (path, integer<int64>, zorunlu): OMS ID of the package to be split (the id in GetOrderPackages response; not sourcePackageId).

İstek gövdesi

  • splitPackages (object[], zorunlu): Packages to be created. Products left out remain in a separate package.
    • splitPackages.packageDetails (object[], zorunlu): Content of the new package.
      • splitPackages.packageDetails.quantities (integer<int32>, zorunlu): Quantity from this line to be included in the new package.
      • splitPackages.packageDetails.orderLineId (integer<int32>, zorunlu): OMS ID of the line to be included in the package.

Yanıtlar

  • 200: Successful. Always check the isSuccess field in the body.
  • 400: Body validation failed (missing required field, type mismatch, or malformed JSON). Response is in ASP.NET Core ValidationProblemDetails format; the errors field indicates which field is invalid.
  • 401: Authorization header missing, token invalid or expired. Body returns empty; get a new token with /Auth/login.
  • 500: Unexpected server error. This response returns with PascalCase field names (unlike other responses) and includes null fields.

200 yanıt alanları

  • errors (object[]): Detailed error list. Returned only if present.
    • errors.code (string): Error code.
    • errors.message (string): Error message.
  • isSuccess (boolean, zorunlu): true if the operation is successful. Can be false even if HTTP 200 is returned; check every response.
  • statusCode (integer<int32>, zorunlu): Status code. Usually 0 for successful responses; should not be used instead of HTTP status code.
  • errorSource (string): Error source. Returned only if present.
  • correlationId (string): Request tracking ID. Returned only if present.
  • errorMesssage (string): Error message (field name is spelled with three s in the source). Returned only if there is an error.