| | | 1 | | using Newtonsoft.Json; |
| | | 2 | | |
| | | 3 | | namespace Services.ApiServices.OzonApi.Filters; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Запрос списка возвратов FBO и FBS. POST /v1/returns/list. |
| | | 7 | | /// Используйте только один фильтр по дате: logistic_return_date, storage_tariffication_start_date |
| | | 8 | | /// или visual_status_change_moment — иначе API вернёт ошибку. |
| | | 9 | | /// </summary> |
| | | 10 | | public class ReturnListRequest : IRequestModel |
| | | 11 | | { |
| | | 12 | | [JsonProperty("filter")] |
| | 12 | 13 | | public ReturnListFilter? Filter { get; set; } |
| | | 14 | | |
| | | 15 | | /// <summary>Количество подгружаемых возвратов. Максимальное значение — 500.</summary> |
| | | 16 | | [JsonProperty("limit")] |
| | 9 | 17 | | public int Limit { get; set; } = 100; |
| | | 18 | | |
| | | 19 | | /// <summary>Идентификатор последнего подгруженного возврата (для пагинации).</summary> |
| | | 20 | | [JsonProperty("last_id")] |
| | 5 | 21 | | public long? LastId { get; set; } |
| | | 22 | | } |
| | | 23 | | |
| | | 24 | | public class ReturnListFilter |
| | | 25 | | { |
| | | 26 | | /// <summary>Фильтр по дате создания возврата.</summary> |
| | | 27 | | [JsonProperty("logistic_return_date")] |
| | | 28 | | public ReturnDateFilter? LogisticReturnDate { get; set; } |
| | | 29 | | |
| | | 30 | | /// <summary>Фильтр по дате начала тарификации.</summary> |
| | | 31 | | [JsonProperty("storage_tariffication_start_date")] |
| | | 32 | | public ReturnDateFilter? StorageTarificationStartDate { get; set; } |
| | | 33 | | |
| | | 34 | | /// <summary>Фильтр по дате изменения статуса возврата.</summary> |
| | | 35 | | [JsonProperty("visual_status_change_moment")] |
| | | 36 | | public ReturnDateFilter? VisualStatusChangeMoment { get; set; } |
| | | 37 | | |
| | | 38 | | /// <summary>Фильтр по идентификатору заказа.</summary> |
| | | 39 | | [JsonProperty("order_id")] |
| | | 40 | | public long? OrderId { get; set; } |
| | | 41 | | |
| | | 42 | | /// <summary>Фильтр по номерам отправлений. Не более 50.</summary> |
| | | 43 | | [JsonProperty("posting_numbers")] |
| | | 44 | | public string[]? PostingNumbers { get; set; } |
| | | 45 | | |
| | | 46 | | /// <summary>Фильтр по названию товара.</summary> |
| | | 47 | | [JsonProperty("product_name")] |
| | | 48 | | public string? ProductName { get; set; } |
| | | 49 | | |
| | | 50 | | /// <summary>Фильтр по артикулу товара.</summary> |
| | | 51 | | [JsonProperty("offer_id")] |
| | | 52 | | public string? OfferId { get; set; } |
| | | 53 | | |
| | | 54 | | /// <summary> |
| | | 55 | | /// Фильтр по статусу возврата (sys_name). Например: ArrivedAtReturnPlace, Approved, |
| | | 56 | | /// ReceivedBySeller, MoneyReturned, Cancelled и др. |
| | | 57 | | /// </summary> |
| | | 58 | | [JsonProperty("visual_status_name")] |
| | | 59 | | public string? VisualStatusName { get; set; } |
| | | 60 | | |
| | | 61 | | /// <summary>Фильтр по идентификатору склада (/v1/warehouse/list).</summary> |
| | | 62 | | [JsonProperty("warehouse_id")] |
| | | 63 | | public long? WarehouseId { get; set; } |
| | | 64 | | |
| | | 65 | | /// <summary>Фильтр по штрихкоду возвратной этикетки.</summary> |
| | | 66 | | [JsonProperty("barcode")] |
| | | 67 | | public string? Barcode { get; set; } |
| | | 68 | | |
| | | 69 | | /// <summary>Фильтр по схеме доставки: FBS или FBO.</summary> |
| | | 70 | | [JsonProperty("return_schema")] |
| | | 71 | | public string? ReturnSchema { get; set; } |
| | | 72 | | |
| | | 73 | | /// <summary> |
| | | 74 | | /// Фильтр по статусу компенсации: 1 — отправлена; 2 — получена; 3 — отменена; 4 — декомпенсация. |
| | | 75 | | /// </summary> |
| | | 76 | | [JsonProperty("compensation_status_id")] |
| | | 77 | | public int? CompensationStatusId { get; set; } |
| | | 78 | | } |
| | | 79 | | |
| | | 80 | | public class ReturnDateFilter |
| | | 81 | | { |
| | | 82 | | /// <summary>Начало периода. ISO 8601 с суффиксом Z (UTC), например: 2026-02-19T00:00:00.000Z</summary> |
| | | 83 | | [JsonProperty("time_from")] |
| | | 84 | | public string? TimeFrom { get; set; } = string.Empty; |
| | | 85 | | |
| | | 86 | | /// <summary>Окончание периода. ISO 8601 с суффиксом Z (UTC), например: 2026-02-20T23:59:59.999Z</summary> |
| | | 87 | | [JsonProperty("time_to")] |
| | | 88 | | public string? TimeTo { get; set; } = string.Empty; |
| | | 89 | | } |