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
statusvalue must be one of the names in theOrderPackageStatuslist. - 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
OrderPackageStatusChangedEventwebhook 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'ssourcePackageIdvalue.
Yanıtlar
- 200: Successful. Always check the
isSuccessfield in the body. - 400: Body validation failed (missing required field, type mismatch, or malformed JSON). The response is in ASP.NET Core
ValidationProblemDetailsformat; theerrorsfield indicates which fields are invalid. - 401:
Authorizationheader 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
nullfields.
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):trueif the operation is successful. Can befalseeven if HTTP 200 is returned; check every response.statusCode(integer<int32>, zorunlu): Status code. Usually0for 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 threesin the source). Returned only if there is an error.