Split package by quantity

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

Splits an item in the package into multiple packages according to quantities. Each value in the quantities array creates one package (e.g., for an item with quantity 5, [2, 3] means two packages). orderLineId is the lines[].id value of the package.

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

Parametreler

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

İstek gövdesi

  • quantitySplit (object[], zorunlu): Quantity-based split definitions.
    • quantitySplit.quantities (integer<int32>[], zorunlu): Quantities in the resulting packages; each value represents one package.
    • quantitySplit.orderLineId (integer<int64>, zorunlu): OMS ID of the line to split (lines[].id).

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 fields are invalid.
  • 401: Authorization header missing, token invalid or expired. Body is empty; get a new token via /Auth/login.
  • 500: Unexpected server error. This response returns fields in PascalCase (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 succeeded. 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 has three s in the source). Returned only if there is an error.