@@ -304,3 +304,168 @@ func (c Reports) GetStocks(params *GetStocksReportParams) (*GetStocksReportRespo
304
304
305
305
return resp , nil
306
306
}
307
+
308
+ type GetProductsMovementReportParams struct {
309
+ // Date from which the data will be in the report
310
+ DateFrom time.Time `json:"date_from"`
311
+
312
+ // Date up to which the data will be in the report
313
+ DateTo time.Time `json:"date_to"`
314
+
315
+ // Default: "DEFAULT"
316
+ // Response language:
317
+ // - RU — Russian
318
+ // - EN — English
319
+ Language string `json:"language" default:"DEFAULT"`
320
+ }
321
+
322
+ type GetProductsMovementReportResponse struct {
323
+ core.CommonResponse
324
+
325
+ // Method result
326
+ Result struct {
327
+ // Unique report identifier
328
+ Code string `json:"code"`
329
+ } `json:"result"`
330
+ }
331
+
332
+ // Report with complete information on products, as well as the number of products with statuses:
333
+ // - products with defects or in inventory,
334
+ // - products in transit between the fulfillment centers,
335
+ // - products in delivery,
336
+ // - products to be sold
337
+ func (c Reports ) GetProductsMovement (params * GetProductsMovementReportParams ) (* GetProductsMovementReportResponse , error ) {
338
+ url := "/v1/report/products/movement/create"
339
+
340
+ resp := & GetProductsMovementReportResponse {}
341
+
342
+ response , err := c .client .Request (http .MethodPost , url , params , resp )
343
+ if err != nil {
344
+ return nil , err
345
+ }
346
+ response .CopyCommonResponse (& resp .CommonResponse )
347
+
348
+ return resp , nil
349
+ }
350
+
351
+ type GetReturnsReportParams struct {
352
+ // Filter
353
+ Filter GetReturnsReportsFilter `json:"filter"`
354
+
355
+ // Default: "DEFAULT"
356
+ // Response language:
357
+ // - RU — Russian
358
+ // - EN — English
359
+ Language string `json:"language" default:"DEFAULT"`
360
+ }
361
+
362
+ type GetReturnsReportsFilter struct {
363
+ // Order delivery scheme: fbs — delivery from seller's warehouse
364
+ DeliverySchema string `json:"delivery_schema"`
365
+
366
+ // Order identifier
367
+ OrderId int64 `json:"order_id"`
368
+
369
+ // Order status
370
+ Status string `json:"status"`
371
+ }
372
+
373
+ type GetReturnsReportResponse struct {
374
+ core.CommonResponse
375
+
376
+ // Method result
377
+ Result struct {
378
+ // Unique report identifier
379
+ Code string `json:"code"`
380
+ } `json:"result"`
381
+ }
382
+
383
+ // The report contains information about returned products that were accepted from the customer, ready for pickup, or delivered to the seller.
384
+ //
385
+ // The method is only suitable for orders shipped from the seller's warehouse
386
+ func (c Reports ) GetReturns (params * GetReturnsReportParams ) (* GetReturnsReportResponse , error ) {
387
+ url := "/v1/report/returns/create"
388
+
389
+ resp := & GetReturnsReportResponse {}
390
+
391
+ response , err := c .client .Request (http .MethodPost , url , params , resp )
392
+ if err != nil {
393
+ return nil , err
394
+ }
395
+ response .CopyCommonResponse (& resp .CommonResponse )
396
+
397
+ return resp , nil
398
+ }
399
+
400
+ type GetShipmentReportParams struct {
401
+ // Filter
402
+ Filter GetShipmentReportFilter `json:"filter"`
403
+
404
+ // Default: "DEFAULT"
405
+ // Response language:
406
+ // - RU — Russian
407
+ // - EN — English
408
+ Language string `json:"language"`
409
+ }
410
+
411
+ type GetShipmentReportFilter struct {
412
+ // Cancellation reason identifier
413
+ CancelReasonId []int64 `json:"cancel_reason_id"`
414
+
415
+ // Work scheme: FBO or FBS.
416
+ //
417
+ // To get an FBO scheme report, pass fbo in this parameter. For an FBS scheme report pass fbs
418
+ DeliverySchema []string `json:"delivery_schema"`
419
+
420
+ // Product identifier
421
+ OfferId string `json:"offer_id"`
422
+
423
+ // Order processing start date and time
424
+ ProcessedAtFrom time.Time `json:"processed_at_from"`
425
+
426
+ // Time when the order appeared in your personal account
427
+ ProcessedAtTo time.Time `json:"processed_at_to"`
428
+
429
+ // Product identifier in the Ozon system, SKU
430
+ SKU []int64 `json:"sku"`
431
+
432
+ // Status text
433
+ StatusAlias []string `json:"status_alias"`
434
+
435
+ // Numerical status
436
+ Statuses []int64 `json:"statused"`
437
+
438
+ // Product name
439
+ Title string `json:"title"`
440
+ }
441
+
442
+ type GetShipmentReportResponse struct {
443
+ core.CommonResponse
444
+
445
+ // Method result
446
+ Result struct {
447
+ // Unique report identifier
448
+ Code string `json:"code"`
449
+ } `json:"result"`
450
+ }
451
+
452
+ // Shipment report with orders details:
453
+ // - order statuses
454
+ // - processing start date
455
+ // - order numbers
456
+ // - shipment numbers
457
+ // - shipment costs
458
+ // - shipments contents
459
+ func (c Reports ) GetShipment (params * GetShipmentReportParams ) (* GetShipmentReportResponse , error ) {
460
+ url := "/v1/report/postings/create"
461
+
462
+ resp := & GetShipmentReportResponse {}
463
+
464
+ response , err := c .client .Request (http .MethodPost , url , params , resp )
465
+ if err != nil {
466
+ return nil , err
467
+ }
468
+ response .CopyCommonResponse (& resp .CommonResponse )
469
+
470
+ return resp , nil
471
+ }
0 commit comments