Update package status (bulk)

POST /OrderPackage/SetOrderPackageStatusInfoList — OMS API · Packages

Bulk updates the OMS status of packages; optionally writes the shipping company and tracking information as well. The body is an array; you can send multiple records in a single request.

When to call: When a package is prepared, shipped, delivered, etc. on the warehouse/ERP side.

  • The status value must be one of the names in the OrderPackageStatus list.
  • The transition must comply with the tenant's workflow rules; if the package is already in that status and no other information changes, it returns an error.
  • The operation is atomic: if one package is not valid, none are updated and HTTP 200, isSuccess: false, errorMesssage: "<package> package status change not allowed!" is returned.
  • The OrderPackageStatusChangedEvent webhook is triggered on status change.

İstek gövdesi

  • status (OrderPackageStatus, zorunlu): The status the package will transition to.
  • cargoKey (string): Shipping key.
  • carrierCode (string): Shipping company code. If different from the current company and valid, it is updated.
  • trackingUrl (string): Shipping tracking URL. Ignored if it does not comply with the shipping company's URL pattern.
  • trackingNumber (string): Shipping tracking number.
  • sourcePackageId (string, zorunlu): The package's sourcePackageId value.

Yanıtlar

  • 200: Successful. Always check the isSuccess field in the body.
  • 400: Body validation failed (missing required field, type mismatch, or malformed JSON). The response is in ASP.NET Core ValidationProblemDetails format; the errors field indicates which fields are invalid.
  • 401: Authorization header missing, token invalid or expired. The body is empty; obtain 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 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 has three s in the source). Returned only if there is an error.