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: Cancelled for cancellation, Returned for return (see OrderPackageStatus).
  • statusReasonSource (query, string, zorunlu): Who selected the reason. Usually Customer in 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 ValidationProblemDetails format; the errors field indicates which fields are invalid.
  • 401: Authorization header 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 null fields.

200 yanıt alanları

  • id (integer<int64>): Reason ID. This value is sent as reasonId in cancellation/return requests.
  • createdAt (string<date-time>): Record timestamp.
  • reasonName (string): Reason name (in the language if culture is provided).
  • reasonSourceId (integer<int32>): Source of the reason: 1 = Customer, 2 = Vendor, 3 = Operator.
  • orderStatusReasonId (integer<int64>): ID of the general reason definition.