List status reasons
GET /Lookup/OrderStatusReasonByTenant/GetStatusReasonByType — OMS API · Definitions
Lists the reasonId values to be sent in cancellation and return requests. The id field of the returned records is used as reasonId.
When to call: When setting up the integration or to refresh the reason list cache; no need to call before every cancellation/return request.
The response is an array (no envelope); sorted by reason name.
Parametreler
statusType(query, string, zorunlu): The status the reason belongs to:Cancelledfor cancellation,Returnedfor return (seeOrderPackageStatus).statusReasonSource(query, string, zorunlu): Who selected the reason. UsuallyCustomerin integrations.culture(query, string): Language of the reason names (e.g.tr,en). Returns default name if empty.
Yanıtlar
- 200: List of reasons.
- 400: Body validation failed (missing required field, type mismatch, or malformed JSON). Response is in ASP.NET Core
ValidationProblemDetailsformat; theerrorsfield indicates which fields are invalid. - 401:
Authorizationheader missing, token invalid or expired. Response body is empty; obtain a new token via/Auth/login. - 500: Unexpected server error. This response uses PascalCase field names (unlike other responses) and includes
nullfields.
200 yanıt alanları
id(integer<int64>): Reason ID. This value is sent asreasonIdin cancellation/return requests.createdAt(string<date-time>): Record timestamp.reasonName(string): Reason name (in the language ifcultureis provided).reasonSourceId(integer<int32>): Source of the reason: 1 = Customer, 2 = Vendor, 3 = Operator.orderStatusReasonId(integer<int64>): ID of the general reason definition.