127 lines
2.9 KiB
Protocol Buffer
127 lines
2.9 KiB
Protocol Buffer
syntax = "proto3";
|
|
package ozon.products;
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
option go_package = "./ozon/products";
|
|
|
|
service ProductsService {
|
|
// Retrieves a list of products based on the provided request.
|
|
rpc GetListOfProducts(GetListOfProductsRequest) returns (stream GetListOfProductsResponse);
|
|
rpc GetProductPrice(GetProductPriceRequest) returns (stream GetProductPriceResponse);
|
|
rpc GetProductAttributes(GetProductAttributesRequest) returns (stream GetProductAttributesResponse);
|
|
}
|
|
|
|
message GetListOfProductsRequest{
|
|
int64 marketplace_id = 1; // Unique identifier for the marketplace
|
|
}
|
|
|
|
message GetListOfProductsResponse {
|
|
repeated Product products = 1;
|
|
}
|
|
|
|
message GetProductPriceRequest {
|
|
int64 marketplace_id = 1;
|
|
}
|
|
|
|
message GetProductPriceResponse {
|
|
repeated ProductPrice product_prices = 1;
|
|
}
|
|
|
|
message GetProductAttributesRequest {
|
|
int64 marketplace_id = 1;
|
|
repeated int64 product_id = 2;
|
|
}
|
|
|
|
message GetProductAttributesResponse {
|
|
repeated ProductAttributes items = 1;
|
|
}
|
|
|
|
|
|
message Product {
|
|
int64 id = 1;
|
|
string offer_id = 2;
|
|
Stocks stocks = 3;
|
|
repeated string barcodes = 4;
|
|
Status statuses = 5;
|
|
repeated Error errors = 6;
|
|
|
|
message Status {
|
|
string status_name = 1;
|
|
}
|
|
|
|
message Stocks{
|
|
repeated Stock stocks = 1;
|
|
bool has_stock = 2;
|
|
}
|
|
|
|
message Stock{
|
|
int64 present = 1;
|
|
int64 reserved = 2;
|
|
int64 SKU = 3;
|
|
string source = 4;
|
|
}
|
|
|
|
message Error{
|
|
string code = 1;
|
|
}
|
|
}
|
|
|
|
message ProductPrice {
|
|
|
|
message Commissions {
|
|
double fbo_deliv_to_customer_amount = 1;
|
|
double fbo_direct_flow_trans_max_amount = 2;
|
|
double fbo_direct_flow_trans_min_amount = 3;
|
|
double fbo_return_flow_amount = 4;
|
|
double fbs_deliv_to_customer_amount = 5;
|
|
double fbs_direct_flow_trans_max_amount = 6;
|
|
double fbs_direct_flow_trans_min_amount = 7;
|
|
double fbs_first_mile_max_amount = 8;
|
|
double fbs_first_mile_min_amount = 9;
|
|
double fbs_return_flow_amount = 10;
|
|
double sales_percent_fbo = 11;
|
|
double sales_percent_fbs = 12;
|
|
}
|
|
|
|
int64 acquiring = 1;
|
|
Commissions commissions = 2;
|
|
string offer_id = 4;
|
|
int64 product_id = 7;
|
|
}
|
|
|
|
message ProductAttributes {
|
|
message Model_info {
|
|
int64 model_id = 1;
|
|
int64 count = 2;
|
|
}
|
|
|
|
message Values {
|
|
int64 dictionary_value_id = 1;
|
|
string value = 2;
|
|
}
|
|
|
|
message Attributes {
|
|
int64 id = 1;
|
|
int64 complex_id = 2;
|
|
repeated Values values = 3;
|
|
}
|
|
|
|
int64 id = 1;
|
|
string barcode = 2;
|
|
string name = 4;
|
|
string offer_id = 5;
|
|
int64 type_id = 6;
|
|
int64 height = 7;
|
|
int64 depth = 8;
|
|
int64 width = 9;
|
|
string dimension_unit = 10;
|
|
int64 weight = 11;
|
|
string weight_unit = 12;
|
|
string primary_image = 13;
|
|
Model_info model_info = 15;
|
|
repeated string images = 16;
|
|
repeated Attributes attributes = 18;
|
|
repeated int64 attributes_with_defaults = 19;
|
|
string color_image = 21;
|
|
int64 description_category_id = 22;
|
|
} |