lingxingapi 1.1.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lingxingapi/__init__.py +7 -0
- lingxingapi/ads/__init__.py +0 -0
- lingxingapi/ads/api.py +5946 -0
- lingxingapi/ads/param.py +192 -0
- lingxingapi/ads/route.py +134 -0
- lingxingapi/ads/schema.py +2615 -0
- lingxingapi/api.py +557 -0
- lingxingapi/base/__init__.py +0 -0
- lingxingapi/base/api.py +568 -0
- lingxingapi/base/param.py +59 -0
- lingxingapi/base/route.py +11 -0
- lingxingapi/base/schema.py +198 -0
- lingxingapi/basic/__init__.py +0 -0
- lingxingapi/basic/api.py +466 -0
- lingxingapi/basic/param.py +72 -0
- lingxingapi/basic/route.py +20 -0
- lingxingapi/basic/schema.py +218 -0
- lingxingapi/errors.py +152 -0
- lingxingapi/fba/__init__.py +0 -0
- lingxingapi/fba/api.py +1691 -0
- lingxingapi/fba/param.py +250 -0
- lingxingapi/fba/route.py +30 -0
- lingxingapi/fba/schema.py +987 -0
- lingxingapi/fields.py +50 -0
- lingxingapi/finance/__init__.py +0 -0
- lingxingapi/finance/api.py +3091 -0
- lingxingapi/finance/param.py +616 -0
- lingxingapi/finance/route.py +44 -0
- lingxingapi/finance/schema.py +1243 -0
- lingxingapi/product/__init__.py +0 -0
- lingxingapi/product/api.py +2643 -0
- lingxingapi/product/param.py +934 -0
- lingxingapi/product/route.py +49 -0
- lingxingapi/product/schema.py +1004 -0
- lingxingapi/purchase/__init__.py +0 -0
- lingxingapi/purchase/api.py +496 -0
- lingxingapi/purchase/param.py +126 -0
- lingxingapi/purchase/route.py +11 -0
- lingxingapi/purchase/schema.py +215 -0
- lingxingapi/sales/__init__.py +0 -0
- lingxingapi/sales/api.py +3200 -0
- lingxingapi/sales/param.py +723 -0
- lingxingapi/sales/route.py +70 -0
- lingxingapi/sales/schema.py +1718 -0
- lingxingapi/source/__init__.py +0 -0
- lingxingapi/source/api.py +1799 -0
- lingxingapi/source/param.py +176 -0
- lingxingapi/source/route.py +38 -0
- lingxingapi/source/schema.py +1011 -0
- lingxingapi/tools/__init__.py +0 -0
- lingxingapi/tools/api.py +291 -0
- lingxingapi/tools/param.py +73 -0
- lingxingapi/tools/route.py +8 -0
- lingxingapi/tools/schema.py +169 -0
- lingxingapi/utils.py +456 -0
- lingxingapi/warehourse/__init__.py +0 -0
- lingxingapi/warehourse/api.py +1778 -0
- lingxingapi/warehourse/param.py +506 -0
- lingxingapi/warehourse/route.py +28 -0
- lingxingapi/warehourse/schema.py +926 -0
- lingxingapi-1.1.4.dist-info/METADATA +73 -0
- lingxingapi-1.1.4.dist-info/RECORD +65 -0
- lingxingapi-1.1.4.dist-info/WHEEL +5 -0
- lingxingapi-1.1.4.dist-info/licenses/LICENSE +22 -0
- lingxingapi-1.1.4.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1243 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
from pydantic import BaseModel, Field, field_validator
|
|
3
|
+
from lingxingapi.base.schema import ResponseV1, ResponseV1TraceId, FlattenDataRecords
|
|
4
|
+
from lingxingapi.fields import IntOrNone2Zero, FloatOrNone2Zero, StrOrNone2Blank
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# 用户自定义费用管理 --------------------------------------------------------------------------------------------------------------
|
|
8
|
+
# . User Fee Types
|
|
9
|
+
class UserFeeType(BaseModel):
|
|
10
|
+
"""用户自定义费用类型"""
|
|
11
|
+
|
|
12
|
+
# 序号 [原字段 'sort']
|
|
13
|
+
seq: int = Field(validation_alias="sort")
|
|
14
|
+
# 费用类型ID [原字段 'id']
|
|
15
|
+
fee_type_id: int = Field(validation_alias="id")
|
|
16
|
+
# 费用类型名称 [原字段 'name']
|
|
17
|
+
fee_type_name: str = Field(validation_alias="name")
|
|
18
|
+
# 备用ID
|
|
19
|
+
fpoft_id: str
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class UserFeeTypes(ResponseV1):
|
|
23
|
+
"""用户自定义费用类型列表"""
|
|
24
|
+
|
|
25
|
+
data: list[UserFeeType]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# 亚马逊交易数据 -----------------------------------------------------------------------------------------------------------------
|
|
29
|
+
# . Transactions
|
|
30
|
+
class Transaction(BaseModel):
|
|
31
|
+
"""亚马逊交易明细"""
|
|
32
|
+
|
|
33
|
+
# 唯一键 [原字段 'uniqueKey']
|
|
34
|
+
# 交易明细唯一标识, 当 event_type 为 'serviceFeeEventList' 时, uid 会变动
|
|
35
|
+
# 但当交易明细 settlement_status 为 'Closed' 状态时 uid 不会变化
|
|
36
|
+
# 建议拉取数据时, 把这个类型的数据作单独的删除与写入操作
|
|
37
|
+
uid: str = Field(validation_alias="uniqueKey")
|
|
38
|
+
# 领星店铺ID
|
|
39
|
+
sid: int
|
|
40
|
+
# 亚马逊卖家ID [原字段 'sellerId']
|
|
41
|
+
seller_id: str = Field(validation_alias="sellerId")
|
|
42
|
+
# 领星店铺名称 [原字段 'storeName']
|
|
43
|
+
seller_name: str = Field(validation_alias="storeName")
|
|
44
|
+
# 国家代码 [原字段 'countryCode']
|
|
45
|
+
country_code: str = Field(validation_alias="countryCode")
|
|
46
|
+
# 市场名称 [原字段 'marketplaceName']
|
|
47
|
+
marketplace: str = Field(validation_alias="marketplaceName")
|
|
48
|
+
# 交易ID [原字段 'id']
|
|
49
|
+
transaction_id: int = Field(validation_alias="id")
|
|
50
|
+
# 交易编号 [原字段 'fid']
|
|
51
|
+
transaction_number: str = Field(validation_alias="fid")
|
|
52
|
+
# 结算ID [原字段 'settlementId']
|
|
53
|
+
settlement_id: IntOrNone2Zero = Field(validation_alias="settlementId")
|
|
54
|
+
# 事件类型 [原字段 'eventType']
|
|
55
|
+
event_type: str = Field(validation_alias="eventType")
|
|
56
|
+
# 交易类型 [原字段 'type']
|
|
57
|
+
transaction_type: str = Field(validation_alias="type")
|
|
58
|
+
# 账单类型 [原字段 'accountType']
|
|
59
|
+
account_type: str = Field(validation_alias="accountType")
|
|
60
|
+
# 处理状态 [原字段 'processingStatus']
|
|
61
|
+
# (Open: 未结算, Closed: 已结算, Reconciled: 已对账)
|
|
62
|
+
settlement_status: str = Field(validation_alias="processingStatus")
|
|
63
|
+
# 资金转账状态 [原字段 'fundTransferStatus']
|
|
64
|
+
# (Succeeded: 已转账, Processing: 转账中, Failed: 失败, Unknown: 未知)
|
|
65
|
+
transfer_status: str = Field(validation_alias="fundTransferStatus")
|
|
66
|
+
# 亚马逊订单编号 [原字段 'amazonOrderId']
|
|
67
|
+
amazon_order_id: StrOrNone2Blank = Field("", validation_alias="amazonOrderId")
|
|
68
|
+
# 卖家提供的订单编号 [原字段 'sellerOrderId']
|
|
69
|
+
merchant_order_id: StrOrNone2Blank = Field("", validation_alias="sellerOrderId")
|
|
70
|
+
# 配送渠道 [原字段 'fulfillment']
|
|
71
|
+
fulfillment_channel: str = Field(validation_alias="fulfillment")
|
|
72
|
+
# 亚马逊SKU [原字段 'sellerSku']
|
|
73
|
+
msku: StrOrNone2Blank = Field(validation_alias="sellerSku")
|
|
74
|
+
# 领星本地SKU [原字段 'localSku']
|
|
75
|
+
lsku: StrOrNone2Blank = Field(validation_alias="localSku")
|
|
76
|
+
# 领星本地商品名称 [原字段 'localName']
|
|
77
|
+
product_name: StrOrNone2Blank = Field(validation_alias="localName")
|
|
78
|
+
# 数量
|
|
79
|
+
quantity: int
|
|
80
|
+
# 金额 [原字段 'currencyAmount']
|
|
81
|
+
amount: float = Field(validation_alias="currencyAmount")
|
|
82
|
+
# 币种 [原字段 'currencyCode']
|
|
83
|
+
currency_code: str = Field(validation_alias="currencyCode")
|
|
84
|
+
# 交易发生时间 (本地时间) [原字段 'postedDateLocale']
|
|
85
|
+
transaction_time_loc: str = Field(validation_alias="postedDateLocale")
|
|
86
|
+
# 数据更新时间 (中国时间) [原字段 'gmtModified']
|
|
87
|
+
update_time_cnt: str = Field(validation_alias="gmtModified")
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class Transactions(ResponseV1, FlattenDataRecords):
|
|
91
|
+
"""亚马逊交易明细列表"""
|
|
92
|
+
|
|
93
|
+
data: list[Transaction]
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# . Settlements
|
|
97
|
+
class SettlementIncome(BaseModel):
|
|
98
|
+
"""亚马逊结算收入明细"""
|
|
99
|
+
|
|
100
|
+
# 销售 [原字段 'product']
|
|
101
|
+
product_sales: float = Field(validation_alias="product")
|
|
102
|
+
# 运费 [原字段 'freight']
|
|
103
|
+
shipping_credits: float = Field(validation_alias="freight")
|
|
104
|
+
# 包装 [原字段 'packing']
|
|
105
|
+
giftwrap_credits: float = Field(validation_alias="packing")
|
|
106
|
+
# 其他
|
|
107
|
+
other: float
|
|
108
|
+
# 税费
|
|
109
|
+
tax: float
|
|
110
|
+
# 总收入 [原字段 'sale']
|
|
111
|
+
total_income: float = Field(validation_alias="sale")
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
class SettlementRefund(BaseModel):
|
|
115
|
+
"""亚马逊结算退费明细"""
|
|
116
|
+
|
|
117
|
+
# 销售退费
|
|
118
|
+
sales_refunds: float = Field(validation_alias="saleRefund")
|
|
119
|
+
# 其他退费
|
|
120
|
+
other_refunds: float = Field(validation_alias="feeRefund")
|
|
121
|
+
# 税费退费
|
|
122
|
+
tax_refunds: float = Field(validation_alias="tax")
|
|
123
|
+
# 总退费
|
|
124
|
+
total_refunds: float = Field(validation_alias="refund")
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class SettlementExpense(BaseModel):
|
|
128
|
+
"""亚马逊结算支出明细"""
|
|
129
|
+
|
|
130
|
+
# 亚马逊费用 [原字段 'amazon']
|
|
131
|
+
amazon_fees: float = Field(validation_alias="amazon")
|
|
132
|
+
# 库存费用 [原字段 'storage']
|
|
133
|
+
inventory_fees: float = Field(validation_alias="storage")
|
|
134
|
+
# 广告费用 [原字段 'ad']
|
|
135
|
+
cost_of_advertising: float = Field(validation_alias="ad")
|
|
136
|
+
# 促销费用 [原字段 'promotion']
|
|
137
|
+
promotion_rebates: float = Field(validation_alias="promotion")
|
|
138
|
+
# 其他费用 [原字段 'other']
|
|
139
|
+
other_fees: float = Field(validation_alias="other")
|
|
140
|
+
# 总支出 [原字段 'pay']
|
|
141
|
+
total_expense: float = Field(validation_alias="pay")
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
class SettlementTransfer(BaseModel):
|
|
145
|
+
"""亚马逊结算转账明细"""
|
|
146
|
+
|
|
147
|
+
# 初期余额 [原字段 'beginningBalanceCurrencyAmount']
|
|
148
|
+
opening_balance: float = Field(validation_alias="beginningBalanceCurrencyAmount")
|
|
149
|
+
# 本期应收 [原字段 'originalTotalCurrencyAmount']
|
|
150
|
+
receivable: float = Field(validation_alias="originalTotalCurrencyAmount")
|
|
151
|
+
# 信用卡扣款 [原字段 'creditCardDeduction']
|
|
152
|
+
credit_card_deduction: float = Field(validation_alias="creditCardDeduction")
|
|
153
|
+
# 上期预留金余额 [原字段 'previousReserveAmount']
|
|
154
|
+
prior_reserve_balance: float = Field(validation_alias="previousReserveAmount")
|
|
155
|
+
# 本期预留金余额 [原字段 'currentReserveAmount']
|
|
156
|
+
current_reserve_balance: float = Field(validation_alias="currentReserveAmount")
|
|
157
|
+
# 本期结算 [原字段 'convertedTotalCurrencyAmount']
|
|
158
|
+
settlement: float = Field(validation_alias="convertedTotalCurrencyAmount")
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
class Settlement(BaseModel):
|
|
162
|
+
"""亚马逊结算汇总"""
|
|
163
|
+
|
|
164
|
+
# fmt: off
|
|
165
|
+
# 领星店铺ID
|
|
166
|
+
sid: int
|
|
167
|
+
# 亚马逊卖家ID [原字段 'sellerId']
|
|
168
|
+
seller_id: str = Field(validation_alias="sellerId")
|
|
169
|
+
# 领星店铺名称 [原字段 'storeName']
|
|
170
|
+
seller_name: str = Field(validation_alias="storeName")
|
|
171
|
+
# 国家代码 [原字段 'countryCode']
|
|
172
|
+
country_code: str = Field(validation_alias="countryCode")
|
|
173
|
+
# 追踪编号 [原字段 'traceId']
|
|
174
|
+
trace_number: str = Field(validation_alias="traceId")
|
|
175
|
+
# 结算ID [原字段 'settlementId']
|
|
176
|
+
settlement_id: IntOrNone2Zero = Field(validation_alias="settlementId")
|
|
177
|
+
# 结算编号 [原字段 'id']
|
|
178
|
+
settlement_number: str = Field(validation_alias="id")
|
|
179
|
+
# 结算备注 [原字段 'comment']
|
|
180
|
+
settlement_note: StrOrNone2Blank = Field(validation_alias="comment")
|
|
181
|
+
# 结算状态 [原字段 'processingStatus']
|
|
182
|
+
# (Open: 未结算, Closed: 已结算, Reconciled: 已对账)
|
|
183
|
+
settlement_status: str = Field(validation_alias="processingStatus")
|
|
184
|
+
# 资金转账状态 [原字段 'fundTransferStatus']
|
|
185
|
+
# (Succeeded: 已转账, Processing: 转账中, Failed: 失败, Unknown: 未知)
|
|
186
|
+
transfer_status: str = Field(validation_alias="fundTransferStatus")
|
|
187
|
+
# 账单类型 [原字段 'accountType']
|
|
188
|
+
account_type: str = Field(validation_alias="accountType")
|
|
189
|
+
# 原始结算货币代码 [原字段 'originalTotalCurrencyCode']
|
|
190
|
+
settlement_currency_code: str = Field(validation_alias="originalTotalCurrencyCode")
|
|
191
|
+
# 原始结算金额 [原字段 'originalTotalCurrencyAmount']
|
|
192
|
+
settlement_amt: float = Field(validation_alias="originalTotalCurrencyAmount")
|
|
193
|
+
# 转账货币代码 [原字段 'convertedTotalCurrencyCode']
|
|
194
|
+
transfer_currency_code: str = Field(validation_alias="convertedTotalCurrencyCode")
|
|
195
|
+
# 转账金额 [原字段 'convertedTotalCurrencyAmount']
|
|
196
|
+
transfer_amt: float = Field(validation_alias="convertedTotalCurrencyAmount")
|
|
197
|
+
# 转账折算结算金额 [原字段 'convertedTotalCurrencyAmountToOrigin']
|
|
198
|
+
transfer_to_settlement_amt: float = Field(validation_alias="convertedTotalCurrencyAmountToOrigin")
|
|
199
|
+
# 结算事件组ID [原字段 'financialEventGroupId']
|
|
200
|
+
settlement_event_group_id: str = Field(validation_alias="financialEventGroupId")
|
|
201
|
+
# 结算事件金额 [原字段 'financialEventsAmount']
|
|
202
|
+
settlement_events_amt: float = Field(validation_alias="financialEventsAmount")
|
|
203
|
+
# 对账结果 [原字段 'reconciliationResult']
|
|
204
|
+
reconciliation_result: str = Field(validation_alias="reconciliationResult")
|
|
205
|
+
# 汇款比率 [原字段 'remittanceRate']
|
|
206
|
+
remittance_rate: float = Field(validation_alias="remittanceRate")
|
|
207
|
+
# 银行帐号信息 [原字段 'accountInfo']
|
|
208
|
+
banck_account_info: StrOrNone2Blank = Field(validation_alias="accountInfo")
|
|
209
|
+
# 银行帐号尾号 [原字段 'accountTail']
|
|
210
|
+
bank_account_last_digits: StrOrNone2Blank = Field(validation_alias="accountTail")
|
|
211
|
+
# 收入 [原字段 'sale']
|
|
212
|
+
income: SettlementIncome = Field(validation_alias="sale")
|
|
213
|
+
# 退费
|
|
214
|
+
refund: SettlementRefund
|
|
215
|
+
# 支出 [原字段 'pay']
|
|
216
|
+
expense: SettlementExpense = Field(validation_alias="pay")
|
|
217
|
+
# 转账
|
|
218
|
+
transfer: SettlementTransfer = Field(validation_alias="transfer")
|
|
219
|
+
# 结算开始时间 (本地时间) [原字段 'financialEventGroupStartLocale']
|
|
220
|
+
settlement_start_time_loc: str = Field(validation_alias="financialEventGroupStartLocale")
|
|
221
|
+
# 结算结束时间 (本地时间) [原字段 'financialEventGroupEndLocale']
|
|
222
|
+
settlement_end_time_loc: str = Field(validation_alias="financialEventGroupEndLocale")
|
|
223
|
+
# 资金转账时间 (本地时间) [原字段 'fundTransferDateLocale']
|
|
224
|
+
transfer_time_loc: str = Field(validation_alias="fundTransferDateLocale")
|
|
225
|
+
# 资金转账时间 (UTC时间) [原字段 'fundTransferDate']
|
|
226
|
+
transfer_time_utc: str = Field(validation_alias="fundTransferDate")
|
|
227
|
+
# fmt: on
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
class Settlements(ResponseV1, FlattenDataRecords):
|
|
231
|
+
"""亚马逊结算汇总列表"""
|
|
232
|
+
|
|
233
|
+
data: list[Settlement]
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
# . Settlement Variances
|
|
237
|
+
class ShipmentSettlement(BaseModel):
|
|
238
|
+
"""亚马逊发货与结算差异"""
|
|
239
|
+
|
|
240
|
+
# fmt: off
|
|
241
|
+
# 领星店铺ID
|
|
242
|
+
sid: int
|
|
243
|
+
# 亚马逊卖家ID [原字段 'sellerId']
|
|
244
|
+
seller_id: str = Field(validation_alias="sellerId")
|
|
245
|
+
# 领星店铺名称 [原字段 'sellerName']
|
|
246
|
+
seller_name: str = Field(validation_alias="sellerName")
|
|
247
|
+
# 国家代码 [原字段 'countryCode']
|
|
248
|
+
country_code: str = Field(validation_alias="countryCode")
|
|
249
|
+
# 亚马逊订单编号 [原字段 'amazonOrderId']
|
|
250
|
+
amazon_order_id: str = Field(validation_alias="amazonOrderId")
|
|
251
|
+
# 卖家提供的订单编号 [原字段 'merchantOrderId']
|
|
252
|
+
merchant_order_id: str = Field(validation_alias="merchantOrderId")
|
|
253
|
+
# 亚马逊货件编号 [原字段 'shipmentId']
|
|
254
|
+
shipment_id: str = Field(validation_alias="shipmentId")
|
|
255
|
+
# 亚马逊货件商品编号 [原字段 'shipmentItemId']
|
|
256
|
+
shipment_item_id: str = Field(validation_alias="shipmentItemId")
|
|
257
|
+
# 销售渠道 [原字段 'salesChannel']
|
|
258
|
+
sales_channel: str = Field(validation_alias="salesChannel")
|
|
259
|
+
# 配送方式 [原字段 'fulfillment']
|
|
260
|
+
fulfillment_channel: str = Field(validation_alias="fulfillment")
|
|
261
|
+
# 亚马逊配送中心代码 [原字段 'fulfillmentCenterId']
|
|
262
|
+
fulfillment_center_id: str = Field(validation_alias="fulfillmentCenterId")
|
|
263
|
+
# 物流模式 [原字段 'logisitcsMode']
|
|
264
|
+
logistics_mode: str = Field(validation_alias="logisitcsMode")
|
|
265
|
+
# 物流跟踪号 [原字段 'trackingNumber']
|
|
266
|
+
tracking_number: str = Field(validation_alias="trackingNumber")
|
|
267
|
+
# 结算ID [原字段 'settlementId']
|
|
268
|
+
settlement_id: IntOrNone2Zero = Field(validation_alias="settlementId")
|
|
269
|
+
# 处理状态 [原字段 'processingStatus']
|
|
270
|
+
# (Open: 未结算, Closed: 已结算, Reconciled: 已对账)
|
|
271
|
+
settlement_status: StrOrNone2Blank = Field(validation_alias="processingStatus")
|
|
272
|
+
# 资金转账状态 [原字段 'fundTransferStatus']
|
|
273
|
+
# (Succeeded: 已转账, Processing: 转账中, Failed: 失败, Unknown: 未知)
|
|
274
|
+
transfer_status: StrOrNone2Blank = Field(validation_alias="fundTransferStatus")
|
|
275
|
+
# 发货与结算时间差异 [原字段 'daysBetweenShipAndFiance']
|
|
276
|
+
settlement_lag: str = Field(validation_alias="daysBetweenShipAndFiance")
|
|
277
|
+
# 亚马逊SKU
|
|
278
|
+
msku: str
|
|
279
|
+
# 领星本地SKU [原字段 'localSku']
|
|
280
|
+
lsku: StrOrNone2Blank = Field(validation_alias="localSku")
|
|
281
|
+
# 领星本地商品名称 [原字段 'localName']
|
|
282
|
+
product_name: StrOrNone2Blank = Field(validation_alias="localName")
|
|
283
|
+
# 领星本地品牌名称 [原字段 'brandName']
|
|
284
|
+
brand_name: StrOrNone2Blank = Field(validation_alias="brandName")
|
|
285
|
+
# 领星本地分类名称 [原字段 'categoryName']
|
|
286
|
+
category_name: StrOrNone2Blank = Field(validation_alias="categoryName")
|
|
287
|
+
# 商品开发负责人名称 [原字段 'productDeveloper']
|
|
288
|
+
developer_name: StrOrNone2Blank = Field(validation_alias="productDeveloper")
|
|
289
|
+
# 商品负责人名称 (逗号分隔) [原字段 'listing']
|
|
290
|
+
operator_names: StrOrNone2Blank = Field(validation_alias="listing")
|
|
291
|
+
# 订单商品总数量 [原字段 'quantity']
|
|
292
|
+
order_qty: int = Field(validation_alias="quantity")
|
|
293
|
+
# 商品销售金额 [原字段 'itemPrice']
|
|
294
|
+
sales_amt: FloatOrNone2Zero = Field(validation_alias="itemPrice")
|
|
295
|
+
# 商品销售金额税费 [原字段 'itemTax']
|
|
296
|
+
sales_tax_amt: FloatOrNone2Zero = Field(validation_alias="itemTax")
|
|
297
|
+
# 买家支付运费金额 [原字段 'shippingPrice']
|
|
298
|
+
shipping_credits_amt: FloatOrNone2Zero = Field(validation_alias="shippingPrice")
|
|
299
|
+
# 买家支付运费税费 [原字段 'shippingTax']
|
|
300
|
+
shipping_credits_tax_amt: FloatOrNone2Zero = Field(validation_alias="shippingTax")
|
|
301
|
+
# 买家支付礼品包装费金额 [原字段 'giftWrapPrice']
|
|
302
|
+
giftwrap_credits_amt: FloatOrNone2Zero = Field(validation_alias="giftWrapPrice")
|
|
303
|
+
# 买家支付礼品包装费税费 [原字段 'giftWrapTax']
|
|
304
|
+
giftwrap_credits_tax_amt: FloatOrNone2Zero = Field(validation_alias="giftWrapTax")
|
|
305
|
+
# 卖家商品促销折扣金额 [原字段 'itemPromotionDiscount']
|
|
306
|
+
promotion_discount_amt: FloatOrNone2Zero = Field(validation_alias="itemPromotionDiscount")
|
|
307
|
+
# 卖家商品运费折扣金额 [原字段 'shipPromotionDiscount']
|
|
308
|
+
shipping_discount_amt: FloatOrNone2Zero = Field(validation_alias="shipPromotionDiscount")
|
|
309
|
+
# 货币代码 [原字段 'currencyCode']
|
|
310
|
+
currency_code: str = Field(validation_alias="currencyCode")
|
|
311
|
+
# 买家国家 [原字段 'saleCountryName']
|
|
312
|
+
buyer_country: StrOrNone2Blank = Field(validation_alias="saleCountryName")
|
|
313
|
+
# 买家城市 [原字段 'shipCity']
|
|
314
|
+
buyer_city: str = Field(validation_alias="shipCity")
|
|
315
|
+
# 买家区域 [原字段 'region']
|
|
316
|
+
buyer_district: str = Field(validation_alias="region")
|
|
317
|
+
# 买家邮编 [原字段 'shipPostalCode']
|
|
318
|
+
buyer_postcode: str = Field(validation_alias="shipPostalCode")
|
|
319
|
+
# 订单购买时间 (本地时间) [原字段 'purchaseDateLocale']
|
|
320
|
+
purchase_time_loc: StrOrNone2Blank = Field(validation_alias="purchaseDateLocale")
|
|
321
|
+
# 订单发货时间 (本地时间) [原字段 'shipmentsDateLocale']
|
|
322
|
+
shipment_time_loc: StrOrNone2Blank = Field(validation_alias="shipmentsDateLocale")
|
|
323
|
+
# 订单付款时间 (本地时间) [原字段 'paymentsDateLocale']
|
|
324
|
+
payment_time_loc: StrOrNone2Blank = Field(validation_alias="paymentsDateLocale")
|
|
325
|
+
# 订单结算时间 (本地时间) [原字段 'financePostedDateLocale']
|
|
326
|
+
settlement_time_loc: StrOrNone2Blank = Field(validation_alias="financePostedDateLocale")
|
|
327
|
+
# 资金转账时间 (本地时间) [原字段 'fundTransferDateLocale']
|
|
328
|
+
transfer_time_loc: StrOrNone2Blank = Field(validation_alias="fundTransferDateLocale")
|
|
329
|
+
# 数据更新时间 (中国时间) [原字段 'gmtModified']
|
|
330
|
+
update_time_cnt: str = Field(validation_alias="gmtModified")
|
|
331
|
+
# fmt: on
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
class ShipmentSettlements(ResponseV1TraceId, FlattenDataRecords):
|
|
335
|
+
"""亚马逊发货与结算差异列表"""
|
|
336
|
+
|
|
337
|
+
data: list[ShipmentSettlement]
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
# . Receivables
|
|
341
|
+
class Receivable(BaseModel):
|
|
342
|
+
"""亚马逊应收账款"""
|
|
343
|
+
|
|
344
|
+
# 领星店铺ID
|
|
345
|
+
sid: int
|
|
346
|
+
# 领星店铺名称 [原字段 'storeName']
|
|
347
|
+
seller_name: str = Field(validation_alias="storeName")
|
|
348
|
+
# 国家 (中文)
|
|
349
|
+
country: str
|
|
350
|
+
# 国家代码 [原字段 'countryCode']
|
|
351
|
+
country_code: str = Field(validation_alias="countryCode")
|
|
352
|
+
# 对账状态 (0: 未对账, 1: 已对账)
|
|
353
|
+
archive_status: int = Field(validation_alias="archiveStatus")
|
|
354
|
+
# 对账状态描述
|
|
355
|
+
archive_status_desc: str = Field(validation_alias="archiveStatusName")
|
|
356
|
+
# 应收款备注 [原字段 'remark']
|
|
357
|
+
note: StrOrNone2Blank = Field(validation_alias="remark")
|
|
358
|
+
# 初期余额 [原字段 'beginningBalanceCurrencyAmount']
|
|
359
|
+
opening_balance: float = Field(validation_alias="beginningBalanceCurrencyAmount")
|
|
360
|
+
# 收入金额 [原字段 'incomeAmount']
|
|
361
|
+
income: float = Field(validation_alias="incomeAmount")
|
|
362
|
+
# 退费金额 [原字段 'refundAmount']
|
|
363
|
+
refund: float = Field(validation_alias="refundAmount")
|
|
364
|
+
# 支出金额 [原字段 'spendAmount']
|
|
365
|
+
expense: float = Field(validation_alias="spendAmount")
|
|
366
|
+
# 其他金额
|
|
367
|
+
other: float
|
|
368
|
+
# 其他: 信用卡扣款金额 [原字段 'card']
|
|
369
|
+
other_credit_card_deduction: float = Field(validation_alias="card")
|
|
370
|
+
# 其他: 其他子项金额 [原字段 'otherItem']
|
|
371
|
+
other_item: float = Field(validation_alias="otherItem")
|
|
372
|
+
# 转账成功金额 [原字段 'convertedSuccessAmount']
|
|
373
|
+
transfer_success: float = Field(validation_alias="convertedSuccessAmount")
|
|
374
|
+
# 转账到账金额 [原字段 'receivedAmount']
|
|
375
|
+
transfer_received: float = Field(validation_alias="receivedAmount")
|
|
376
|
+
# 转账失败金额 [原字段 'convertedFailedAmount']
|
|
377
|
+
transfer_failed: float = Field(validation_alias="convertedFailedAmount")
|
|
378
|
+
# 期末余额 [原字段 'endingBalance']
|
|
379
|
+
ending_balance: float = Field(validation_alias="endingBalance")
|
|
380
|
+
# 币种代码 [原字段 'currencyCode']
|
|
381
|
+
currency_code: str = Field(validation_alias="currencyCode")
|
|
382
|
+
# 币种符号 [原字段 'currencyIcon']
|
|
383
|
+
currency_icon: str = Field(validation_alias="currencyIcon")
|
|
384
|
+
# 结算日期 (格式: YYYY-MM) [原字段 'settlementDate']
|
|
385
|
+
settlement_date: str = Field(validation_alias="settlementDate")
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
class Receivables(ResponseV1):
|
|
389
|
+
"""亚马逊应收账款列表"""
|
|
390
|
+
|
|
391
|
+
data: list[Receivable]
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
# 亚马逊库存数据 -----------------------------------------------------------------------------------------------------------------
|
|
395
|
+
# . Ledger Details
|
|
396
|
+
class LedgerDetailItem(BaseModel):
|
|
397
|
+
"""亚马逊库存明细台账"""
|
|
398
|
+
|
|
399
|
+
# 同uid_idx共同构成唯一索引 [原字段 'uniqueMd5']
|
|
400
|
+
uid: str = Field(validation_alias="uniqueMd5")
|
|
401
|
+
# 同uid共同构成唯一索引 [原字段 'uniqueMd5Idx']
|
|
402
|
+
uid_idx: int = Field(validation_alias="uniqueMd5Idx")
|
|
403
|
+
# 货物关联ID [原字段 'referenceId']
|
|
404
|
+
reference_id: str = Field(validation_alias="referenceId")
|
|
405
|
+
# 亚马逊卖家ID [原字段 'sellerId']
|
|
406
|
+
seller_id: str = Field(validation_alias="sellerId")
|
|
407
|
+
# 亚马逊ASIN
|
|
408
|
+
asin: str
|
|
409
|
+
# 亚马逊SKU
|
|
410
|
+
msku: str
|
|
411
|
+
# 亚马逊FNSKU
|
|
412
|
+
fnsku: str
|
|
413
|
+
# 商品标题
|
|
414
|
+
title: str
|
|
415
|
+
# 事件类型编码 [原字段 'eventType']
|
|
416
|
+
event_type_code: str = Field(validation_alias="eventType")
|
|
417
|
+
# 事件类型 [原字段 'eventTypeDesc']
|
|
418
|
+
event_type: str = Field(validation_alias="eventTypeDesc")
|
|
419
|
+
# 事件原因 [原字段 'reason']
|
|
420
|
+
event_reason: str = Field(validation_alias="reason")
|
|
421
|
+
# 事件发生日期 [原字段 'date']
|
|
422
|
+
event_date: str = Field(validation_alias="date")
|
|
423
|
+
# 国家代码 (库存位置) [原字段 'location']
|
|
424
|
+
country_code: str = Field(validation_alias="location")
|
|
425
|
+
# 亚马逊配送中心代码 [原字段 'fulfillmentCenter']
|
|
426
|
+
fulfillment_center_id: str = Field(validation_alias="fulfillmentCenter")
|
|
427
|
+
# 库存处置结果编码 [原字段 'disposition']
|
|
428
|
+
disposition_code: str = Field(validation_alias="disposition")
|
|
429
|
+
# 库存处置结果 [原字段 'dispositionDesc']
|
|
430
|
+
disposition: str = Field(validation_alias="dispositionDesc")
|
|
431
|
+
# 数量 [原字段 'quantity']
|
|
432
|
+
qty: int = Field(validation_alias="quantity")
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
class LedgerDetail(ResponseV1TraceId, FlattenDataRecords):
|
|
436
|
+
"""亚马逊库存明细台账列表"""
|
|
437
|
+
|
|
438
|
+
data: list[LedgerDetailItem]
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
# . Ledger Summary
|
|
442
|
+
class LedgerSummaryItem(BaseModel):
|
|
443
|
+
"""亚马逊库存汇总台账"""
|
|
444
|
+
|
|
445
|
+
# 同uid_idx共同构成唯一索引 [原字段 'uniqueMd5']
|
|
446
|
+
uid: str = Field(validation_alias="uniqueMd5")
|
|
447
|
+
# 同uid共同构成唯一索引 [原字段 'uniqueMd5Idx']
|
|
448
|
+
uid_idx: int = Field(validation_alias="uniqueMd5Idx")
|
|
449
|
+
# 亚马逊卖家ID [原字段 'sellerId']
|
|
450
|
+
seller_id: str = Field(validation_alias="sellerId")
|
|
451
|
+
# 亚马逊ASIN
|
|
452
|
+
asin: str
|
|
453
|
+
# 亚马逊SKU
|
|
454
|
+
msku: str
|
|
455
|
+
# 亚马逊FNSKU
|
|
456
|
+
fnsku: str
|
|
457
|
+
# 商品标题
|
|
458
|
+
title: str
|
|
459
|
+
# 汇总月份/日期 [原字段 'date']
|
|
460
|
+
# (月维度: '2024-01', 日维度: '2024-01-01')
|
|
461
|
+
summary_date: str = Field(validation_alias="date")
|
|
462
|
+
# 国家代码 (库存位置) [原字段 'location']
|
|
463
|
+
country_code: str = Field(validation_alias="location")
|
|
464
|
+
# 库存处置结果编码 [原字段 'disposition']
|
|
465
|
+
disposition_code: str = Field(validation_alias="disposition")
|
|
466
|
+
# 库存处置结果 [原字段 'dispositionDesc']
|
|
467
|
+
disposition: str = Field(validation_alias="dispositionDesc")
|
|
468
|
+
# 初期库存 [原字段 'startingWarehouseBalance']
|
|
469
|
+
opening_balance: int = Field(validation_alias="startingWarehouseBalance")
|
|
470
|
+
# 调拨变动 [原字段 'warehouseTransferInOrOut']
|
|
471
|
+
transfer_net: int = Field(validation_alias="warehouseTransferInOrOut")
|
|
472
|
+
# 调拨在途 [原字段 'inTransitBetweenWarehouses']
|
|
473
|
+
transfer_in_transit: int = Field(validation_alias="inTransitBetweenWarehouses")
|
|
474
|
+
# 签收入库 [原字段 'receipts']
|
|
475
|
+
received: int = Field(validation_alias="receipts")
|
|
476
|
+
# 销售出库 [原字段 'customerShipments']
|
|
477
|
+
customer_shipment: int = Field(validation_alias="customerShipments")
|
|
478
|
+
# 销售退货 [原字段 'customerReturns']
|
|
479
|
+
customer_returned: int = Field(validation_alias="customerReturns")
|
|
480
|
+
# 卖家移除 [原字段 'vendorReturns']
|
|
481
|
+
seller_removal: int = Field(validation_alias="vendorReturns")
|
|
482
|
+
# 丢失报损 [原字段 'lost']
|
|
483
|
+
lost_events: int = Field(validation_alias="lost")
|
|
484
|
+
# 盘盈找回 [原字段 'found']
|
|
485
|
+
found_events: int = Field(validation_alias="found")
|
|
486
|
+
# 受损调整 [原字段 'damaged']
|
|
487
|
+
damaged_events: int = Field(validation_alias="damaged")
|
|
488
|
+
# 处置报废 [原字段 'disposed']
|
|
489
|
+
disposed_events: int = Field(validation_alias="disposed")
|
|
490
|
+
# 其他事件变动 [原字段 'otherEvents']
|
|
491
|
+
other_events: int = Field(validation_alias="otherEvents")
|
|
492
|
+
# 未知事件变动 [原字段 'unKnownEvents']
|
|
493
|
+
unknown_events: int = Field(validation_alias="unKnownEvents")
|
|
494
|
+
# 期末库存 [原字段 'endingWareHouseBalance']
|
|
495
|
+
closing_balance: int = Field(validation_alias="endingWareHouseBalance")
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
class LedgerSummary(ResponseV1TraceId, FlattenDataRecords):
|
|
499
|
+
"""亚马逊库存汇总台账列表"""
|
|
500
|
+
|
|
501
|
+
data: list[LedgerSummaryItem]
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
# . Ledger Valuation
|
|
505
|
+
class LedgerValuationItem(BaseModel):
|
|
506
|
+
"""亚马逊库存价值台账"""
|
|
507
|
+
|
|
508
|
+
# 唯一键 [原字段 'unique_key']
|
|
509
|
+
uid: str = Field(validation_alias="unique_key")
|
|
510
|
+
# 库存动作类型编码 [原字段 'business_type']
|
|
511
|
+
transaction_type_code: str = Field(validation_alias="business_type")
|
|
512
|
+
# 库存动作类型 [原字段 'business_type_desc']
|
|
513
|
+
transaction_type: str = Field(validation_alias="business_type_desc")
|
|
514
|
+
# 库存动作单号 [原字段 'business_number']
|
|
515
|
+
transaction_number: str = Field(validation_alias="business_number")
|
|
516
|
+
# 库存动作原因 [原字段 'reason']
|
|
517
|
+
transaction_reason: str = Field(validation_alias="reason")
|
|
518
|
+
# 源头单据号 (中文逗号分割) [原字段 'origin_account']
|
|
519
|
+
source_numbers: str = Field(validation_alias="origin_account")
|
|
520
|
+
# 领星店铺名称 [原字段 'shop_name']
|
|
521
|
+
seller_name: str = Field(validation_alias="shop_name")
|
|
522
|
+
# 仓库名称 [原字段 'wh_name']
|
|
523
|
+
warehouse_name: str = Field(validation_alias="wh_name")
|
|
524
|
+
# 亚马逊SKU
|
|
525
|
+
msku: str
|
|
526
|
+
# 领星本地SKU [原字段 'sku']
|
|
527
|
+
lsku: str = Field(validation_alias="sku")
|
|
528
|
+
# 结存数量 [原字段 'balance_quantity']
|
|
529
|
+
balance_qty: int = Field(validation_alias="balance_quantity")
|
|
530
|
+
# 采购单价 [原字段 'balance_purchase_unit_price']
|
|
531
|
+
purchase_unit_cost: float = Field(validation_alias="balance_purchase_unit_price")
|
|
532
|
+
# 采购金额 [原字段 'balance_purchase_amount']
|
|
533
|
+
purchase_total_cost: float = Field(validation_alias="balance_purchase_amount")
|
|
534
|
+
# 物流单价 [原字段 'balance_logistics_unit_price']
|
|
535
|
+
logistics_unit_cost: float = Field(validation_alias="balance_logistics_unit_price")
|
|
536
|
+
# 物流金额 [原字段 'balance_logistics_amount']
|
|
537
|
+
logistics_total_cost: float = Field(validation_alias="balance_logistics_amount")
|
|
538
|
+
# 其他单价 [原字段 'balance_other_unit_price']
|
|
539
|
+
other_unit_cost: float = Field(validation_alias="balance_other_unit_price")
|
|
540
|
+
# 其他金额 [原字段 'balance_other_amount']
|
|
541
|
+
other_total_cost: float = Field(validation_alias="balance_other_amount")
|
|
542
|
+
# 成本来源 [原字段 'cost_source']
|
|
543
|
+
cost_source: str = Field(validation_alias="cost_source")
|
|
544
|
+
# 库存处置 [原字段 'disposition_type']
|
|
545
|
+
disposition: str = Field(validation_alias="disposition_type")
|
|
546
|
+
# 源头数据时间
|
|
547
|
+
source_data_time: str
|
|
548
|
+
# 库存动作日期 [原字段 'stream_date']
|
|
549
|
+
transaction_date: str = Field(validation_alias="stream_date")
|
|
550
|
+
# 数据版本
|
|
551
|
+
data_version: str
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
class LedgerValuation(ResponseV1TraceId, FlattenDataRecords):
|
|
555
|
+
"""亚马逊库存价值台账列表"""
|
|
556
|
+
|
|
557
|
+
data: list[LedgerValuationItem]
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
# 亚马逊广告数据 -----------------------------------------------------------------------------------------------------------------
|
|
561
|
+
# . Ads Invoices
|
|
562
|
+
class AdsInvoices(BaseModel):
|
|
563
|
+
"""亚马逊广告发票"""
|
|
564
|
+
|
|
565
|
+
# 领星店铺ID
|
|
566
|
+
sid: int
|
|
567
|
+
# 领星店铺名称 [原字段 'store_name']
|
|
568
|
+
seller_name: str = Field(validation_alias="store_name")
|
|
569
|
+
# 国家 (中文)
|
|
570
|
+
country: str
|
|
571
|
+
# 广告发票ID
|
|
572
|
+
invoice_id: str
|
|
573
|
+
# 广告发票状态 [原字段 'status']
|
|
574
|
+
invoice_status: str = Field(validation_alias="status")
|
|
575
|
+
# 付款方式
|
|
576
|
+
payment_method: str
|
|
577
|
+
# 广告花费 [原字段 'cost_amount']
|
|
578
|
+
cost_amt: float = Field(validation_alias="cost_amount")
|
|
579
|
+
# 税费 [原字段 'tax_amount']
|
|
580
|
+
tax_amt: float = Field(validation_alias="tax_amount")
|
|
581
|
+
# 分摊费用 [原字段 'other_allocation_fee']
|
|
582
|
+
# 总发票金额中扣除的其他费或税费,按此发票的花费占比分摊
|
|
583
|
+
allocation_amt: float = Field(validation_alias="other_allocation_fee")
|
|
584
|
+
# 广告发票总金额 [原字段 'amount']
|
|
585
|
+
invoice_amt: float = Field(validation_alias="amount")
|
|
586
|
+
# 账单周期开始日期 [原字段 'from_date']
|
|
587
|
+
billing_start_date: str = Field(validation_alias="from_date")
|
|
588
|
+
# 账单周期结束日期 [原字段 'to_date']
|
|
589
|
+
billing_end_date: str = Field(validation_alias="to_date")
|
|
590
|
+
# 广告发票开具日期
|
|
591
|
+
invoice_date: str
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
class AdsInvoices(ResponseV1):
|
|
595
|
+
"""亚马逊广告发票列表"""
|
|
596
|
+
|
|
597
|
+
data: list[AdsInvoices]
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
# . Ads Invoice Detail
|
|
601
|
+
class AdsInvoiceDetailData(BaseModel):
|
|
602
|
+
"""亚马逊广告发票明细数据"""
|
|
603
|
+
|
|
604
|
+
# 广告发票ID
|
|
605
|
+
invoice_id: str
|
|
606
|
+
# 付款方式
|
|
607
|
+
payment_method: str
|
|
608
|
+
# 广告发票总金额 [原字段 'amount']
|
|
609
|
+
invoice_amt: float = Field(validation_alias="amount")
|
|
610
|
+
# 币种代码
|
|
611
|
+
currency_code: str
|
|
612
|
+
# 币种图标
|
|
613
|
+
currency_icon: str
|
|
614
|
+
# 账单地址 [原字段 'address']
|
|
615
|
+
billing_address: StrOrNone2Blank = Field(validation_alias="address")
|
|
616
|
+
# 账单周期开始日期 [原字段 'from_date']
|
|
617
|
+
billing_start_date: str = Field(validation_alias="from_date")
|
|
618
|
+
# 账单周期结束日期 [原字段 'to_date']
|
|
619
|
+
billing_end_date: str = Field(validation_alias="to_date")
|
|
620
|
+
# 广告发票开具日期
|
|
621
|
+
invoice_date: str
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
class AdsInvoiceDetail(ResponseV1):
|
|
625
|
+
"""亚马逊广告发票明细"""
|
|
626
|
+
|
|
627
|
+
data: AdsInvoiceDetailData
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
# . Ads Campaign Invoices
|
|
631
|
+
class AdsCampaignInvoice(BaseModel):
|
|
632
|
+
"""亚马逊广告活动发票明细"""
|
|
633
|
+
|
|
634
|
+
# 广告活动ID
|
|
635
|
+
campaign_id: str
|
|
636
|
+
# 广告活动名称
|
|
637
|
+
campaign_name: str
|
|
638
|
+
# 广告数据来源 [原字段 'origin']
|
|
639
|
+
source: str = Field(validation_alias="origin")
|
|
640
|
+
# 广告商品
|
|
641
|
+
items: list[str]
|
|
642
|
+
# 广告类型 [原字段 'ads_type']
|
|
643
|
+
ad_type: str = Field(validation_alias="ads_type")
|
|
644
|
+
# 计价方式
|
|
645
|
+
price_type: str
|
|
646
|
+
# 广告事件次数 [原字段 'cost_event_count']
|
|
647
|
+
event_count: int = Field(validation_alias="cost_event_count")
|
|
648
|
+
# 广告事件单次花费 [原字段 'cost_per_unit']
|
|
649
|
+
cost_per_event: float = Field(validation_alias="cost_per_unit")
|
|
650
|
+
# 广告总花费 [原字段 'cost_amount']
|
|
651
|
+
cost_amt: float = Field(validation_alias="cost_amount")
|
|
652
|
+
# 分摊费用 [原字段 'other_allocation_fee']
|
|
653
|
+
allocation_amt: float = Field(validation_alias="other_allocation_fee")
|
|
654
|
+
# 币种图标 [原字段 'currency_icon']
|
|
655
|
+
currency_icon: str = Field(validation_alias="currency_icon")
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
class AdsCampaignInvoices(ResponseV1):
|
|
659
|
+
"""亚马逊广告活动发票明细列表"""
|
|
660
|
+
|
|
661
|
+
data: list[AdsCampaignInvoice]
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
# 亚马逊损益报告 -----------------------------------------------------------------------------------------------------------------
|
|
665
|
+
# . Income Statement
|
|
666
|
+
class UserOtherFee(BaseModel):
|
|
667
|
+
"""用户自定义其他费用"""
|
|
668
|
+
|
|
669
|
+
# 费用金额
|
|
670
|
+
fee_id: int
|
|
671
|
+
# 费用名称
|
|
672
|
+
fee_name: str
|
|
673
|
+
# 费用金额
|
|
674
|
+
fee_amt: float
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
class IncomeStatement(BaseModel):
|
|
678
|
+
"""损益报告-项目维度"""
|
|
679
|
+
|
|
680
|
+
# fmt: off
|
|
681
|
+
# 币种代码 [原字段 'currencyCode']
|
|
682
|
+
currency_code: str = Field(validation_alias="currencyCode")
|
|
683
|
+
# 币种图标 [原字段 'currencyIcon']
|
|
684
|
+
currency_icon: str = Field(validation_alias="currencyIcon")
|
|
685
|
+
# 收入 - 总收入金额 [原字段 'grossProfitIncome']
|
|
686
|
+
total_income: FloatOrNone2Zero = Field(validation_alias="grossProfitIncome")
|
|
687
|
+
# 收入 - 总销售金额 [原字段 'totalSalesAmount']
|
|
688
|
+
product_sales: float = Field(validation_alias="totalSalesAmount")
|
|
689
|
+
# 收入 - 总销售数量 [原字段 'totalSalesQuantity']
|
|
690
|
+
product_sales_qty: int = Field(validation_alias="totalSalesQuantity")
|
|
691
|
+
# 收入 - 总销售退费 [原字段 'totalSalesRefunds']
|
|
692
|
+
product_sales_refunds: float = Field(validation_alias="totalSalesRefunds")
|
|
693
|
+
# 收入 - FBA销售金额 [原字段 'fbaSaleAmount']
|
|
694
|
+
fba_product_sales: float = Field(validation_alias="fbaSaleAmount")
|
|
695
|
+
# 收入 - FBA销售数量 [原字段 'fbaSalesQuantity']
|
|
696
|
+
fba_product_sales_qty: int = Field(validation_alias="fbaSalesQuantity")
|
|
697
|
+
# 收入 - FBA销售退费 [原字段 'fbaSalesRefunds']
|
|
698
|
+
fba_product_sales_refunds: float = Field(validation_alias="fbaSalesRefunds")
|
|
699
|
+
# 收入 - FBM销售金额 [原字段 'fbmSaleAmount']
|
|
700
|
+
fbm_product_sales: float = Field(validation_alias="fbmSaleAmount")
|
|
701
|
+
# 收入 - FBM销售数量 [原字段 'fbmSalesQuantity']
|
|
702
|
+
fbm_product_sales_qty: int = Field(validation_alias="fbmSalesQuantity")
|
|
703
|
+
# 收入 - FBM销售退费 [原字段 'fbmSalesRefunds']
|
|
704
|
+
fbm_product_sales_refunds: float = Field(validation_alias="fbmSalesRefunds")
|
|
705
|
+
# 收入 - FBA库存赔付/补偿金额 [原字段 'fbaInventoryCredit']
|
|
706
|
+
fba_inventory_credits: float = Field(validation_alias="fbaInventoryCredit")
|
|
707
|
+
# 收入 - FBA库存赔付/补偿数量 [原字段 'fbaInventoryCreditQuantity']
|
|
708
|
+
fba_inventory_credit_qty: int = Field(validation_alias="fbaInventoryCreditQuantity")
|
|
709
|
+
# 收入 - FBA清算收益金额 [原字段 'fbaLiquidationProceeds']
|
|
710
|
+
fba_liquidation_proceeds: float = Field(validation_alias="fbaLiquidationProceeds")
|
|
711
|
+
# 收入 - FBA清算收益调整金额 [原字段 'fbaLiquidationProceedsAdjustments']
|
|
712
|
+
fba_liquidation_proceeds_adj: float = Field(validation_alias="fbaLiquidationProceedsAdjustments")
|
|
713
|
+
# 收入 - 配送运费收入金额 (买家支出) [原字段 'shippingCredits']
|
|
714
|
+
shipping_credits: float = Field(validation_alias="shippingCredits")
|
|
715
|
+
# 收入 - 配送运费退款金额 (买家收入) [原字段 'shippingCreditRefunds']
|
|
716
|
+
shipping_credit_refunds: float = Field(validation_alias="shippingCreditRefunds")
|
|
717
|
+
# 收入 - 礼品包装费收入金额 (买家支出) [原字段 'giftWrapCredits']
|
|
718
|
+
giftwrap_credits: float = Field(validation_alias="giftWrapCredits")
|
|
719
|
+
# 收入 - 礼品包装费退款金额 (买家收入) [原字段 'giftWrapCreditRefunds']
|
|
720
|
+
giftwrap_credit_refunds: float = Field(validation_alias="giftWrapCreditRefunds")
|
|
721
|
+
# 收入 - 促销折扣金额 (卖家支出) [原字段 'promotionalRebates']
|
|
722
|
+
promotional_rebates: float = Field(validation_alias="promotionalRebates")
|
|
723
|
+
# 收入 - 促销折扣退款金额 (卖家收入) [原字段 'promotionalRebateRefunds']
|
|
724
|
+
promotional_rebate_refunds: float = Field(validation_alias="promotionalRebateRefunds")
|
|
725
|
+
# 收入 - A-to-Z 保障/索赔金额 [原字段 'guaranteeClaims']
|
|
726
|
+
a2z_guarantee_claims: float = Field(validation_alias="guaranteeClaims")
|
|
727
|
+
# 收入 - 拒付金额 (拒付造成的让利(发生时为负数))
|
|
728
|
+
chargebacks: float
|
|
729
|
+
# 收入 - 亚马逊运费补偿金额 [原字段 'amazonShippingReimbursement']
|
|
730
|
+
amazon_shipping_reimbursement: float = Field(validation_alias="amazonShippingReimbursement")
|
|
731
|
+
# 收入 - 亚马逊安全运输计划补偿金额 [原字段 'safeTReimbursement']
|
|
732
|
+
safe_t_reimbursement: float = Field(validation_alias="safeTReimbursement")
|
|
733
|
+
# 收入 - 其他补偿/赔付金额 [原字段 'reimbursements']
|
|
734
|
+
other_reimbursement: float = Field(validation_alias="reimbursements")
|
|
735
|
+
# 收入 - 积分发放金额 (日本站) [原字段 'costOfPoIntegersGranted']
|
|
736
|
+
points_granted: float = Field(validation_alias="costOfPoIntegersGranted")
|
|
737
|
+
# 收入 - 积分退还金额 (日本站) [原字段 'costOfPoIntegersReturned']
|
|
738
|
+
points_returned: float = Field(validation_alias="costOfPoIntegersReturned")
|
|
739
|
+
# 收入 - 积分调整金额 (日本站) [原字段 'pointsAdjusted']
|
|
740
|
+
points_adjusted: float = Field(validation_alias="pointsAdjusted")
|
|
741
|
+
# 收入 - 货到付款金额 (COD) [原字段 'cashOnDelivery']
|
|
742
|
+
cash_on_delivery: float = Field(validation_alias="cashOnDelivery")
|
|
743
|
+
# 收入 - NetCo混合网络交易金额 [原字段 'netcoTransaction']
|
|
744
|
+
netco_transaction: float = Field(validation_alias="netcoTransaction")
|
|
745
|
+
# 收入 - 收回/冲回金额
|
|
746
|
+
clawbacks: float
|
|
747
|
+
# 收入 - 其他收入金额 [原字段 'otherInAmount']
|
|
748
|
+
other_income: float = Field(validation_alias="otherInAmount")
|
|
749
|
+
# 支出 - FBA销售佣金 (Referral Fee) [原字段 'platformFee']
|
|
750
|
+
fba_selling_fees: float = Field(validation_alias="platformFee")
|
|
751
|
+
# 支出 - FBA销售佣金退款金额 [原字段 'sellingFeeRefunds']
|
|
752
|
+
fba_selling_fee_refunds: float = Field(validation_alias="sellingFeeRefunds")
|
|
753
|
+
# 支出 - FBA总配送费用 [原字段 'totalFbaDeliveryFee']
|
|
754
|
+
# (fba_fulfillment_fees + mcf_fulfillment_fees)
|
|
755
|
+
fba_transaction_fees: float = Field(validation_alias="totalFbaDeliveryFee")
|
|
756
|
+
# 支付 - FBA配送费用 (Fulfillment Fee) [原字段 'fbaDeliveryFee']
|
|
757
|
+
fba_fulfillment_fees: float = Field(validation_alias="fbaDeliveryFee")
|
|
758
|
+
# 支出 - FBA多渠道配送费用 (Multi-Channel) [原字段 'mcFbaDeliveryFee']
|
|
759
|
+
fba_mcf_fulfillment_fees: float = Field(validation_alias="mcFbaDeliveryFee")
|
|
760
|
+
# 支出 - FBA多渠道配送数量 (Multi-Channel) [原字段 'mcFbaFulfillmentFeesQuantity']
|
|
761
|
+
fba_mcf_fulfillment_qty: int = Field(validation_alias="mcFbaFulfillmentFeesQuantity")
|
|
762
|
+
# 支出 - FBA总配送费用退款金额 [原字段 'fbaTransactionFeeRefunds']
|
|
763
|
+
fba_transaction_fee_refunds: float = Field(validation_alias="fbaTransactionFeeRefunds")
|
|
764
|
+
# 支出 - 其他交易费用 [原字段 'otherTransactionFees']
|
|
765
|
+
other_transaction_fees: float = Field(validation_alias="otherTransactionFees")
|
|
766
|
+
# 支出 - 其他交易费用退款金额 [原字段 'otherTransactionFeeRefunds']
|
|
767
|
+
other_transaction_fee_refunds: float = Field(validation_alias="otherTransactionFeeRefunds")
|
|
768
|
+
# 支出 - FBA仓储和入库服务总费用 [原字段 'totalStorageFee']
|
|
769
|
+
fba_inventory_and_inbound_services_fees: float = Field(validation_alias="totalStorageFee")
|
|
770
|
+
# ('fba_storage_fees' 到 'awd_satellite_storage_fees_alloc' 之间的所有费用)
|
|
771
|
+
# 支出 - FBA仓储费用 [原字段 'fbaStorageFee']
|
|
772
|
+
fba_storage_fees: float = Field(validation_alias="fbaStorageFee")
|
|
773
|
+
# 支出 - FBA仓储费用计提金额 [原字段 'fbaStorageFeeAccrual']
|
|
774
|
+
fba_storage_fees_accr: float = Field(validation_alias="fbaStorageFeeAccrual")
|
|
775
|
+
# 支出 - FBA仓储费用计提调整金额 [原字段 'fbaStorageFeeAccrualDifference']
|
|
776
|
+
fba_storage_fees_accr_adj: float = Field(validation_alias="fbaStorageFeeAccrualDifference")
|
|
777
|
+
# 支出 - FBA仓储费用 (分摊) [原字段 'sharedFbaStorageFee']
|
|
778
|
+
fba_storage_fees_alloc: float = Field(validation_alias="sharedFbaStorageFee")
|
|
779
|
+
# 支出 - FBA长期仓储费用 [原字段 'longTermStorageFee']
|
|
780
|
+
fba_lt_storage_fees: float = Field(validation_alias="longTermStorageFee")
|
|
781
|
+
# 支出 - FBA长期仓储费用计提金额 [原字段 'longTermStorageFeeAccrual']
|
|
782
|
+
fba_lt_storage_fees_accr: float = Field(validation_alias="longTermStorageFeeAccrual")
|
|
783
|
+
# 支出 - FBA长期仓储费用计提调整金额 [原字段 'longTermStorageFeeAccrualDifference']
|
|
784
|
+
fba_lt_storage_fees_accr_adj: float = Field(validation_alias="longTermStorageFeeAccrualDifference")
|
|
785
|
+
# 支出 - FBA长期仓储费用 (分摊) [原字段 'sharedLongTermStorageFee']
|
|
786
|
+
fba_lt_storage_fees_alloc: float = Field(validation_alias="sharedLongTermStorageFee")
|
|
787
|
+
# 支出 - FBA仓储超储费用 (分摊) [原字段 'sharedFbaOverageFee']
|
|
788
|
+
fba_overage_fees_alloc: float = Field(validation_alias="sharedFbaOverageFee")
|
|
789
|
+
# 支出 - FBA仓储续期费用 (分摊) [原字段 'sharedStorageRenewalBilling']
|
|
790
|
+
fba_storage_renewal_fees_alloc: float = Field(validation_alias="sharedStorageRenewalBilling")
|
|
791
|
+
# 支出 - FBA仓鼠销毁费用 (分摊) [原字段 'sharedFbaDisposalFee']
|
|
792
|
+
fba_disposal_fees_alloc: float = Field(validation_alias="sharedFbaDisposalFee")
|
|
793
|
+
# 支出 - FBA仓储销毁数量 [原字段 'disposalQuantity']
|
|
794
|
+
fba_disposal_qty: int = Field(validation_alias="disposalQuantity")
|
|
795
|
+
# 支出 - FBA仓储移除费用 (分摊) [原字段 'sharedFbaRemovalFee']
|
|
796
|
+
fba_removal_fees_alloc: float = Field(validation_alias="sharedFbaRemovalFee")
|
|
797
|
+
# 支出 - FBA仓储移除数量 [原字段 'removalQuantity']
|
|
798
|
+
fba_removal_qty: int = Field(validation_alias="removalQuantity")
|
|
799
|
+
# 支出 - FBA入库运输计划费用 (分摊) [原字段 'sharedFbaInboundTransportationProgramFee']
|
|
800
|
+
fba_inbound_transportation_program_fees_alloc: float = Field(validation_alias="sharedFbaInboundTransportationProgramFee")
|
|
801
|
+
# 支出 - FBA入库便利费用 (分摊) [原字段 'sharedFbaInboundConvenienceFee']
|
|
802
|
+
fba_inbound_convenience_fees_alloc: float = Field(validation_alias="sharedFbaInboundConvenienceFee")
|
|
803
|
+
# 支出 - FBA入库缺陷费用 (分摊) [原字段 'sharedFbaInboundDefectFee']
|
|
804
|
+
fba_inbound_defect_fees_alloc: float = Field(validation_alias="sharedFbaInboundDefectFee")
|
|
805
|
+
# 支出 - FBA国际入库费用 (分摊) [原字段 'sharedFbaIntegerernationalInboundFee']
|
|
806
|
+
fba_international_inbound_fees_alloc: float = Field(validation_alias="sharedFbaIntegerernationalInboundFee")
|
|
807
|
+
# 支出 - FBA合作承运商(入库)运费 (分摊) [原字段 'sharedAmazonPartneredCarrierShipmentFee']
|
|
808
|
+
fba_partnered_carrier_shipment_fees_alloc: float = Field(validation_alias="sharedAmazonPartneredCarrierShipmentFee")
|
|
809
|
+
# 支出 - FBA客户退货处理费用 (分摊) [原字段 'sharedFbaCustomerReturnFee']
|
|
810
|
+
fba_customer_return_fees_alloc: float = Field(validation_alias="sharedFbaCustomerReturnFee")
|
|
811
|
+
# 支出 - FBA交易退货处理费用 (分摊) [原字段 'sharedFbaTransactionCustomerReturnFee']
|
|
812
|
+
fba_transaction_return_fees_alloc: float = Field(validation_alias="sharedFbaTransactionCustomerReturnFee")
|
|
813
|
+
# 支出 - FBA人工处理费用 (分摊) [原字段 'sharedManualProcessingFee']
|
|
814
|
+
fba_manual_processing_fees_alloc: float = Field(validation_alias="sharedManualProcessingFee")
|
|
815
|
+
# 支出 - FBA贴标费用 (分摊) [原字段 'sharedLabelingFee']
|
|
816
|
+
fba_labeling_fees_alloc: float = Field(validation_alias="sharedLabelingFee")
|
|
817
|
+
# 支出 - FBA塑封袋费用 (分摊) [原字段 'sharedPolybaggingFee']
|
|
818
|
+
fba_polybagging_fees_alloc: float = Field(validation_alias="sharedPolybaggingFee")
|
|
819
|
+
# 支出 - FBA气泡膜费用 (分摊) [原字段 'sharedBubblewrapFee']
|
|
820
|
+
fba_bubblewrap_fees_alloc: float = Field(validation_alias="sharedBubblewrapFee")
|
|
821
|
+
# 支出 - FBA封箱胶带费用 (分摊) [原字段 'sharedTapingFee']
|
|
822
|
+
fba_taping_fees_alloc: float = Field(validation_alias="sharedTapingFee")
|
|
823
|
+
# 支出 - FBA库存费用调整金额 (分摊) [原字段 'sharedItemFeeAdjustment']
|
|
824
|
+
fba_inventory_fees_adj_alloc: float = Field(validation_alias="sharedItemFeeAdjustment")
|
|
825
|
+
# 支出 - FBA其他库存费用 (分摊) [原字段 'sharedOtherFbaInventoryFees']
|
|
826
|
+
other_fba_inventory_fees_alloc: float = Field(validation_alias="sharedOtherFbaInventoryFees")
|
|
827
|
+
# 支出 - AWD仓储费用 (分摊) [原字段 'sharedAwdStorageFee']
|
|
828
|
+
awd_storage_fees_alloc: float = Field(validation_alias="sharedAwdStorageFee")
|
|
829
|
+
# 支出 - AWD处理费用 (分摊) [原字段 'sharedAwdProcessingFee']
|
|
830
|
+
awd_processing_fees_alloc: float = Field(validation_alias="sharedAwdProcessingFee")
|
|
831
|
+
# 支出 - AWD运输费用 (分摊) [原字段 'sharedAwdTransportationFee']
|
|
832
|
+
awd_transportation_fees_alloc: float = Field(validation_alias="sharedAwdTransportationFee")
|
|
833
|
+
# 支出 - AWD卫星仓储费用 (分摊) [原字段 'sharedStarStorageFee']
|
|
834
|
+
awd_satellite_storage_fees_alloc: float = Field(validation_alias="sharedStarStorageFee")
|
|
835
|
+
# 支出 - 运输标签花费金额 [原字段 'shippingLabelPurchases']
|
|
836
|
+
shipping_label_purchases: float = Field(validation_alias="shippingLabelPurchases")
|
|
837
|
+
# 支出 - 运输标签退款金额 [原字段 'shippingLabelRefunds']
|
|
838
|
+
shipping_label_refunds: float = Field(validation_alias="shippingLabelRefunds")
|
|
839
|
+
# 支出 - 承运商运输标签花费调整金额 [原字段 'sharedCarrierShippingLabelAdjustments']
|
|
840
|
+
carrier_shipping_label_adj: float = Field(validation_alias="sharedCarrierShippingLabelAdjustments")
|
|
841
|
+
# 支出 - 总推广费用 (Service Fee) [原字段 'promotionFee']
|
|
842
|
+
promotion_fees: float = Field(validation_alias="promotionFee")
|
|
843
|
+
# (subscription_fees_alloc + coupon_fees_alloc + deal_fees_alloc + vine_fees_alloc + early_reviewer_program_fees_alloc)
|
|
844
|
+
# 支出 - 订阅服务费 (分摊) [原字段 'sharedSubscriptionFee']
|
|
845
|
+
subscription_fees_alloc: float = Field(validation_alias="sharedSubscriptionFee")
|
|
846
|
+
# 支出 - 优惠券费用 (分摊) [原字段 'sharedCouponFee']
|
|
847
|
+
coupon_fees_alloc: float = Field(validation_alias="sharedCouponFee")
|
|
848
|
+
# 支出 - 秒杀费用 (分摊) [原字段 'sharedLdFee']
|
|
849
|
+
deal_fees_alloc: float = Field(validation_alias="sharedLdFee")
|
|
850
|
+
# 支出 - Vine费用 (分摊) [原字段 'sharedVineFee']
|
|
851
|
+
vine_fees_alloc: float = Field(validation_alias="sharedVineFee")
|
|
852
|
+
# 支出 - 早期评论人计划费用 (分摊) [原字段 'sharedEarlyReviewerProgramFee']
|
|
853
|
+
early_reviewer_program_fees_alloc: float = Field(validation_alias="sharedEarlyReviewerProgramFee")
|
|
854
|
+
# 支出 - FBM邮寄资费 (分摊) [原字段 'sharedMfnPostageFee']
|
|
855
|
+
mfn_postage_fees_alloc: float = Field(validation_alias="sharedMfnPostageFee")
|
|
856
|
+
# 支出 - 其他亚马逊服务费用 (分摊) (Service Fee) [原字段 'totalPlatformOtherFee']
|
|
857
|
+
other_service_fees_alloc: float = Field(validation_alias="totalPlatformOtherFee")
|
|
858
|
+
# 支出 - 亚马逊退款管理费用 [原字段 'refundAdministrationFees']
|
|
859
|
+
refund_administration_fees: float = Field(validation_alias="refundAdministrationFees")
|
|
860
|
+
# 支出 - 总费用退款金额 [totalFeeRefunds]
|
|
861
|
+
# (fba_selling_fee_refunds + fba_transaction_fee_refunds + refund_administration_fees)
|
|
862
|
+
total_fee_refunds: float = Field(validation_alias="totalFeeRefunds")
|
|
863
|
+
# 支出 - 其他费用调整金额
|
|
864
|
+
adjustments: float
|
|
865
|
+
# 支出 - 广告总花费 (Cost of Advertising) [原字段 'totalAdsCost']
|
|
866
|
+
# (ads_sp_cost + ads_sb_cost + ads_sbv_cost + ads_sd_cost)
|
|
867
|
+
ads_cost: float = Field(validation_alias="totalAdsCost")
|
|
868
|
+
# 支出 - 广告总销售金额 [原字段 'totalAdsSales']
|
|
869
|
+
ads_sales: float = Field(validation_alias="totalAdsSales")
|
|
870
|
+
# 支出 - 广告总销售数量 [原字段 'totalAdsSalesQuantity']
|
|
871
|
+
ads_sales_qty: int = Field(validation_alias="totalAdsSalesQuantity")
|
|
872
|
+
# 支出 - SP广告花费 (Sponsored Products) [原字段 'adsSpCost']
|
|
873
|
+
ads_sp_cost: float = Field(validation_alias="adsSpCost")
|
|
874
|
+
# 支出 - SP广告销售金额 [原字段 'adsSpSales']
|
|
875
|
+
ads_sp_sales: float = Field(validation_alias="adsSpSales")
|
|
876
|
+
# 支出 - SP广告销售数量 [原字段 'adsSpSalesQuantity']
|
|
877
|
+
ads_sp_sales_qty: int = Field(validation_alias="adsSpSalesQuantity")
|
|
878
|
+
# 支出 - SB广告花费 (Sponsored Brands) [原字段 'adsSbCost']
|
|
879
|
+
ads_sb_cost: float = Field(validation_alias="adsSbCost")
|
|
880
|
+
# 支出 - SB广告销售金额 [原字段 'sharedAdsSbSales']
|
|
881
|
+
ads_sb_sales: float = Field(validation_alias="sharedAdsSbSales")
|
|
882
|
+
# 支出 - SB广告销售数量 [原字段 'sharedAdsSbSalesQuantity']
|
|
883
|
+
ads_sb_sales_qty: int = Field(validation_alias="sharedAdsSbSalesQuantity")
|
|
884
|
+
# 支出 - SBV广告花费 (Sponsored Brands Video) [原字段 'adsSbvCost']
|
|
885
|
+
ads_sbv_cost: float = Field(validation_alias="adsSbvCost")
|
|
886
|
+
# 支出 - SBV广告销售金额 [原字段 'sharedAdsSbvSales']
|
|
887
|
+
ads_sbv_sales: float = Field(validation_alias="sharedAdsSbvSales")
|
|
888
|
+
# 支出 - SBV广告销售数量 [原字段 'sharedAdsSbvSalesQuantity']
|
|
889
|
+
ads_sbv_sales_qty: int = Field(validation_alias="sharedAdsSbvSalesQuantity")
|
|
890
|
+
# 支出 - SD广告花费 (Sponsored Display) [原字段 'adsSdCost']
|
|
891
|
+
ads_sd_cost: float = Field(validation_alias="adsSdCost")
|
|
892
|
+
# 支出 - SD广告销售金额 [原字段 'adsSdSales']
|
|
893
|
+
ads_sd_sales: float = Field(validation_alias="adsSdSales")
|
|
894
|
+
# 支出 - SD广告销售数量 [原字段 'adsSdSalesQuantity']
|
|
895
|
+
ads_sd_sales_qty: int = Field(validation_alias="adsSdSalesQuantity")
|
|
896
|
+
# 支出 - 广告分摊费用 [原字段 'sharedCostOfAdvertising']
|
|
897
|
+
ads_cost_alloc: float = Field(validation_alias="sharedCostOfAdvertising")
|
|
898
|
+
# 支出 - 广告总退款金额 (Refund for Advertiser) [原字段 'refundForAdvertiser']
|
|
899
|
+
ads_cost_refunds: float = Field(validation_alias="refundForAdvertiser")
|
|
900
|
+
# 支出 - 清算服务费 (分摊) [原字段 'sharedLiquidationsFees']
|
|
901
|
+
liquidation_service_fees_alloc: float = Field(validation_alias="sharedLiquidationsFees")
|
|
902
|
+
# 支出 - 其他支出费用 [原字段 'others']
|
|
903
|
+
other_expenses: float = Field(validation_alias="others")
|
|
904
|
+
# 支出 - 用户自定义推广总费用 [原字段 'customOrderFee']
|
|
905
|
+
user_promotion_fees: float = Field(validation_alias="customOrderFee")
|
|
906
|
+
# (user_promotion_principal + user_promotion_commission)
|
|
907
|
+
# 支出 - 用户自定义推广费用本金 [原字段 'customOrderFeePrincipal']
|
|
908
|
+
user_promotion_principal: float = Field(validation_alias="customOrderFeePrincipal")
|
|
909
|
+
# 支出 - 用户自定义推广佣金费用 [原字段 'customOrderFeeCommission']
|
|
910
|
+
user_promotion_commission: float = Field(validation_alias="customOrderFeeCommission")
|
|
911
|
+
# 支出 - 用户自定义其他费用 [原字段 'otherFeeStr']
|
|
912
|
+
user_other_fees: list[UserOtherFee] = Field(validation_alias="otherFeeStr")
|
|
913
|
+
# 税费 - 总税费 [grossProfitTax]
|
|
914
|
+
total_tax: FloatOrNone2Zero = Field(validation_alias="grossProfitTax")
|
|
915
|
+
# 税费 - 总销税收金额 [原字段 'totalSalesTax']
|
|
916
|
+
# ('product_tax_collected' 到 'tcs_cgst_collected' 之间的所有税费)
|
|
917
|
+
sales_tax_collected: float = Field(validation_alias="totalSalesTax")
|
|
918
|
+
# 税费 - 商品销售税收金额 [原字段 'taxCollectedProduct']
|
|
919
|
+
product_tax_collected: float = Field(validation_alias="taxCollectedProduct")
|
|
920
|
+
# 税费 - 配送运费税收金额 [原字段 'taxCollectedShipping']
|
|
921
|
+
shipping_tax_collected: float = Field(validation_alias="taxCollectedShipping")
|
|
922
|
+
# 税费 - 礼品包装税收金额 [原字段 'taxCollectedGiftWrap']
|
|
923
|
+
giftwrap_tax_collected: float = Field(validation_alias="taxCollectedGiftWrap")
|
|
924
|
+
# 税费 - 促销折扣税收金额 [原字段 'taxCollectedDiscount']
|
|
925
|
+
promotional_rebate_tax_collected: float = Field(validation_alias="taxCollectedDiscount")
|
|
926
|
+
# 税费 - VAT/GST税收金额 [原字段 'taxCollected']
|
|
927
|
+
vat_gst_tax_collected: float = Field(validation_alias="taxCollected")
|
|
928
|
+
# 税费 - TCS IGST税收金额 (印度站) [原字段 'tcsIgstCollected']
|
|
929
|
+
tcs_igst_collected: float = Field(validation_alias="tcsIgstCollected")
|
|
930
|
+
# 税费 - TCS SGST税收金额 (印度站) [原字段 'tcsSgstCollected']
|
|
931
|
+
tcs_sgst_collected: float = Field(validation_alias="tcsSgstCollected")
|
|
932
|
+
# 税费 - TCS CGST税收金额 (印度站) [原字段 'tcsCgstCollected']
|
|
933
|
+
tcs_cgst_collected: float = Field(validation_alias="tcsCgstCollected")
|
|
934
|
+
# 税费 - 总销售税代扣金额 [原字段 'salesTaxWithheld']
|
|
935
|
+
sales_tax_withheld: float = Field(validation_alias="salesTaxWithheld")
|
|
936
|
+
# 税费 - 总销售税费退款 [salesTaxRefund]
|
|
937
|
+
sales_tax_refunded: float = Field(validation_alias="salesTaxRefund")
|
|
938
|
+
# ('product_tax_refunded' 到 'sales_tax_withheld_refunded' 之间的所有税费退款)
|
|
939
|
+
# 税费 - 商品销售税费退款金额 [原字段 'taxRefundedProduct']
|
|
940
|
+
product_tax_refunded: float = Field(validation_alias="taxRefundedProduct")
|
|
941
|
+
# 税费 - 配送运费税费退款金额 [原字段 'taxRefundedShipping']
|
|
942
|
+
shipping_tax_refunded: float = Field(validation_alias="taxRefundedShipping")
|
|
943
|
+
# 税费 - 礼品包装税费退款金额 [原字段 'taxRefundedGiftWrap']
|
|
944
|
+
giftwrap_tax_refunded: float = Field(validation_alias="taxRefundedGiftWrap")
|
|
945
|
+
# 税费 - 促销折扣税费退款金额 [原字段 'taxRefundedDiscount']
|
|
946
|
+
promotional_rebate_tax_refunded: float = Field(validation_alias="taxRefundedDiscount")
|
|
947
|
+
# 税费 - VAT/GST税费退款金额 [原字段 'taxRefunded']
|
|
948
|
+
vat_gst_tax_refunded: float = Field(validation_alias="taxRefunded")
|
|
949
|
+
# 税费 - TCS IGST税费退款金额 (印度站) [原字段 'tcsIgstRefunded']
|
|
950
|
+
tcs_igst_refunded: float = Field(validation_alias="tcsIgstRefunded")
|
|
951
|
+
# 税费 - TCS SGST税费退款金额 (印度站) [原字段 'tcsSgstRefunded']
|
|
952
|
+
tcs_sgst_refunded: float = Field(validation_alias="tcsSgstRefunded")
|
|
953
|
+
# 税费 - TCS CGST税费退款金额 (印度站) [原字段 'tcsCgstRefunded']
|
|
954
|
+
tcs_cgst_refunded: float = Field(validation_alias="tcsCgstRefunded")
|
|
955
|
+
# 税费 - 总退款税代扣金额 [原字段 'refundTaxWithheld']
|
|
956
|
+
refund_tax_withheld: float = Field(validation_alias="refundTaxWithheld")
|
|
957
|
+
# 税费 - VAT进项税费金额 [原字段 'sharedComminglingVatIncome']
|
|
958
|
+
commingling_vat_income: float = Field(validation_alias="sharedComminglingVatIncome")
|
|
959
|
+
# 税费 - VAT销项税费金额 [原字段 'sharedComminglingVatExpenses']
|
|
960
|
+
commingling_vat_expenses: float = Field(validation_alias="sharedComminglingVatExpenses")
|
|
961
|
+
# 税费 - TDS 194-O净额 (印度站) [原字段 'tdsSection194ONet']
|
|
962
|
+
tds_section_194o_net: float = Field(validation_alias="tdsSection194ONet")
|
|
963
|
+
# 税费 - 其他税费调整 (分摊) [原字段 'sharedTaxAdjustment']
|
|
964
|
+
other_tax_adj_alloc: float = Field(validation_alias="sharedTaxAdjustment")
|
|
965
|
+
# 成本 - 总退款数量 [原字段 'refundsQuantity']
|
|
966
|
+
total_refunds_qty: int = Field(validation_alias="refundsQuantity")
|
|
967
|
+
# 成本 - 总退款率 [原字段 'refundsRate']
|
|
968
|
+
# (total_refund_qty / (fba&fbm_product_sales_qty + fba_mcf_fulfillment_qty + fba_reshipment_qty))
|
|
969
|
+
total_refunds_rate: float = Field(validation_alias="refundsRate")
|
|
970
|
+
# 成本 - FBA退货数量 [原字段 'fbaReturnsQuantity']
|
|
971
|
+
fba_returns_qty: int = Field(validation_alias="fbaReturnsQuantity")
|
|
972
|
+
# 成本 - FBA退货可售数量 [原字段 'fbaReturnsSaleableQuantity']
|
|
973
|
+
fba_returns_saleable_qty: int = Field(validation_alias="fbaReturnsSaleableQuantity")
|
|
974
|
+
# 成本 - FBA退货不可售数量 [原字段 'fbaReturnsUnsaleableQuantity']
|
|
975
|
+
fba_returns_unsaleable_qty: int = Field(validation_alias="fbaReturnsUnsaleableQuantity")
|
|
976
|
+
# 成本 - FBA退货率 [原字段 'fbaReturnsQuantityRate']
|
|
977
|
+
# (fba_returns_qty / (fba_product_sales_qty + fba_mcf_fulfillment_qty))
|
|
978
|
+
fba_returns_rate: float = Field(validation_alias="fbaReturnsQuantityRate")
|
|
979
|
+
# 成本 - 总补发/换货数量 [原字段 'totalReshipQuantity']
|
|
980
|
+
total_reshipment_qty: int = Field(validation_alias="totalReshipQuantity")
|
|
981
|
+
# 成本 - FBA补发/换货数量 [原字段 'reshipFbaProductSalesQuantity']
|
|
982
|
+
fba_reshipment_qty: int = Field(validation_alias="reshipFbaProductSalesQuantity")
|
|
983
|
+
# 成本 - FBA换货退回数量 [原字段 'reshipFbaProductSaleRefundsQuantity']
|
|
984
|
+
fba_reshipment_returned_qty: int = Field(validation_alias="reshipFbaProductSaleRefundsQuantity")
|
|
985
|
+
# 成本 - FBM补发/换货数量 [原字段 'reshipFbmProductSalesQuantity']
|
|
986
|
+
fbm_reshipment_qty: int = Field(validation_alias="reshipFbmProductSalesQuantity")
|
|
987
|
+
# 成本 - FBM换货退回数量 [原字段 'reshipFbmProductSaleRefundsQuantity']
|
|
988
|
+
fbm_reshipment_returned_qty: int = Field(validation_alias="reshipFbmProductSaleRefundsQuantity")
|
|
989
|
+
# 成本 - 总成本数量 [原字段 'cgQuantity']
|
|
990
|
+
# (fba&fbm_product_sales_qty + fba_mcf_fulfillment_qty + fba&fbm_reshipment_qty - fba_returns_saleable_qty)
|
|
991
|
+
cost_of_goods_qty: IntOrNone2Zero = Field(validation_alias="cgQuantity")
|
|
992
|
+
# 成本 - 总成本金额 (COGS) [原字段 'totalCost']
|
|
993
|
+
# (purchase_cost + logistics_cost + other_costs)
|
|
994
|
+
cost_of_goods: float = Field(validation_alias="totalCost")
|
|
995
|
+
# 成本 - 总成本占比 [原字段 'proportionOfTotalCost']
|
|
996
|
+
cost_of_goods_ratio: float = Field(validation_alias="proportionOfTotalCost")
|
|
997
|
+
# 成本 - 总采购成本 (COGS) [原字段 'cgPriceTotal']
|
|
998
|
+
purchase_cost: float = Field(validation_alias="cgPriceTotal")
|
|
999
|
+
# 成本 - 单品成本 [原字段 'cgUnitPrice']
|
|
1000
|
+
purchase_unit_cost: float = Field(validation_alias="cgUnitPrice")
|
|
1001
|
+
# 成本 - 采购成本占比 [原字段 'proportionOfCg']
|
|
1002
|
+
purchase_cost_ratio: float = Field(validation_alias="proportionOfCg")
|
|
1003
|
+
# 成本 - 是否有成本明细 [原字段 'hasCgPriceDetail']
|
|
1004
|
+
has_purchase_cost_detail: int = Field(validation_alias="hasCgPriceDetail")
|
|
1005
|
+
# 成本 - 总物流费用 [原字段 'cgTransportCostsTotal']
|
|
1006
|
+
logistics_cost: float = Field(validation_alias="cgTransportCostsTotal")
|
|
1007
|
+
# 成本 - 物流单品费用 [原字段 'cgTransportUnitCosts']
|
|
1008
|
+
logistics_unit_cost: float = Field(validation_alias="cgTransportUnitCosts")
|
|
1009
|
+
# 成本 - 物流费用占比 [原字段 'proportionOfCgTransport']
|
|
1010
|
+
logistics_cost_ratio: float = Field(validation_alias="proportionOfCgTransport")
|
|
1011
|
+
# 成本 - 是否有物流费用明细 [原字段 'hasCgTransportCostsDetail']
|
|
1012
|
+
has_logistics_cost_detail: int = Field(validation_alias="hasCgTransportCostsDetail")
|
|
1013
|
+
# 成本 - 其他费用总金额 [原字段 'cgOtherCostsTotal']
|
|
1014
|
+
other_costs: float = Field(validation_alias="cgOtherCostsTotal")
|
|
1015
|
+
# 成本 - 其他费用单品金额 [原字段 'cgOtherUnitCosts']
|
|
1016
|
+
other_unit_cost: float = Field(validation_alias="cgOtherUnitCosts")
|
|
1017
|
+
# 成本 - 其他费用占比 [原字段 'proportionOfCgOtherCosts']
|
|
1018
|
+
other_cost_ratio: float = Field(validation_alias="proportionOfCgOtherCosts")
|
|
1019
|
+
# 成本 - 是否有其他费用明细 [原字段 'hasCgOtherCostsDetail']
|
|
1020
|
+
has_other_cost_detail: int = Field(validation_alias="hasCgOtherCostsDetail")
|
|
1021
|
+
# 利润 - 毛利润 [原字段 'grossProfit']
|
|
1022
|
+
gross_profit: float = Field(validation_alias="grossProfit")
|
|
1023
|
+
# 利润 - 毛利率 [原字段 'grossRate']
|
|
1024
|
+
gross_profit_margin: float = Field(validation_alias="grossRate")
|
|
1025
|
+
# 利润 - 投资回报率 (ROI)
|
|
1026
|
+
roi: float
|
|
1027
|
+
# 交易状态 [原字段 'transactionStatusCode']
|
|
1028
|
+
transaction_status: str = Field(validation_alias="transactionStatusCode")
|
|
1029
|
+
# 交易状态描述 [原字段 'transactionStatus']
|
|
1030
|
+
transaction_status_desc: str = Field(validation_alias="transactionStatus")
|
|
1031
|
+
# 延迟结算状态 [原字段 'deferredSubStatusCode']
|
|
1032
|
+
deferred_settlement_status: str = Field(validation_alias="deferredSubStatusCode")
|
|
1033
|
+
# 延迟结算状态描述 [原字段 'deferredSubStatus']
|
|
1034
|
+
deferred_settlement_status_desc: str = Field(validation_alias="deferredSubStatus")
|
|
1035
|
+
# 延迟结算总金额 [原字段 'deferredSettlementAmount']
|
|
1036
|
+
deferred_settlement: float = Field(0.0, validation_alias="deferredSettlementAmount")
|
|
1037
|
+
# 结算小计 [原字段 'settlementSubtotal']
|
|
1038
|
+
settlement_subtotal: float = Field(0.0, validation_alias="settlementSubtotal")
|
|
1039
|
+
# 报告时间 (本地时间) [原字段 'postedDateDayLocale']
|
|
1040
|
+
report_time_loc: StrOrNone2Blank = Field(validation_alias="postedDateDayLocale")
|
|
1041
|
+
# 报告开始时间 (本地时间) [原字段 'minPostedDateDayLocale']
|
|
1042
|
+
report_start_time_loc: StrOrNone2Blank = Field(validation_alias="minPostedDateDayLocale")
|
|
1043
|
+
# 报告结束时间 (本地时间) [原字段 'maxPostedDateDayLocale']
|
|
1044
|
+
report_end_time_loc: StrOrNone2Blank = Field(validation_alias="maxPostedDateDayLocale")
|
|
1045
|
+
# 报告日期 (本地时间) [原字段 'postedDateLocale']
|
|
1046
|
+
report_date_loc: str = Field(validation_alias="postedDateLocale")
|
|
1047
|
+
# fmt: on
|
|
1048
|
+
|
|
1049
|
+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
1050
|
+
@field_validator("user_other_fees", mode="before")
|
|
1051
|
+
@classmethod
|
|
1052
|
+
def _validate_user_other_fees(cls, v):
|
|
1053
|
+
if v is None:
|
|
1054
|
+
return []
|
|
1055
|
+
return [UserOtherFee.model_validate(i) for i in v]
|
|
1056
|
+
|
|
1057
|
+
|
|
1058
|
+
# . Income Statement Sellers
|
|
1059
|
+
class IncomeStatementSeller(IncomeStatement):
|
|
1060
|
+
"""损益报告-店铺维度"""
|
|
1061
|
+
|
|
1062
|
+
# 领星店铺ID
|
|
1063
|
+
sid: int
|
|
1064
|
+
# 领星店铺名称 [原字段 'storeName']
|
|
1065
|
+
seller_name: str = Field(validation_alias="storeName")
|
|
1066
|
+
# 国家 (中文)
|
|
1067
|
+
country: str
|
|
1068
|
+
# 国家代码 [原字段 'countryCode']
|
|
1069
|
+
country_code: str = Field(validation_alias="countryCode")
|
|
1070
|
+
# 店铺负责人名称 (逗号隔开) [原字段 'sellerPrincipalRealname']
|
|
1071
|
+
operator_names: StrOrNone2Blank = Field(validation_alias="sellerPrincipalRealname")
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
class IncomeStatementSellers(ResponseV1, FlattenDataRecords):
|
|
1075
|
+
"""损益报告-店铺维度列表"""
|
|
1076
|
+
|
|
1077
|
+
data: list[IncomeStatementSeller]
|
|
1078
|
+
|
|
1079
|
+
|
|
1080
|
+
# . Income Statement Asins
|
|
1081
|
+
class IncomeStatementAsin(IncomeStatement):
|
|
1082
|
+
"""损益报告-商品维度明细"""
|
|
1083
|
+
|
|
1084
|
+
# 记录ID (非业务唯一键)
|
|
1085
|
+
id: str
|
|
1086
|
+
# 领星店铺ID
|
|
1087
|
+
sid: int
|
|
1088
|
+
# 国家代码 [原字段 'countryCode']
|
|
1089
|
+
country_code: str = Field(validation_alias="countryCode")
|
|
1090
|
+
# ASIN关联领星店铺ID列表
|
|
1091
|
+
sids: list[int]
|
|
1092
|
+
# ASIN关联领星店铺名称列表 [原字段 'storeName']
|
|
1093
|
+
seller_names: list[str] = Field(validation_alias="storeName")
|
|
1094
|
+
# ASIN关联国家列表 (中文) [原字段 'country']
|
|
1095
|
+
countries: list[str] = Field(validation_alias="country")
|
|
1096
|
+
# 商品ASIN
|
|
1097
|
+
asin: str
|
|
1098
|
+
# 商品父ASIN [原字段 'parentAsin']
|
|
1099
|
+
parent_asin: str = Field(validation_alias="parentAsin")
|
|
1100
|
+
# 关联的ASIN列表 [原字段 'asins']
|
|
1101
|
+
asins: list[str]
|
|
1102
|
+
# 领星本地SKU [原字段 'localSku']
|
|
1103
|
+
lsku: StrOrNone2Blank = Field(validation_alias="localSku")
|
|
1104
|
+
# 领星本地商品名称 [原字段 'localName']
|
|
1105
|
+
product_name: StrOrNone2Blank = Field(validation_alias="localName")
|
|
1106
|
+
# 产品型号 [原字段 'model']
|
|
1107
|
+
product_model: StrOrNone2Blank = Field(validation_alias="model")
|
|
1108
|
+
# 领星本地产品分类名称 [原字段 'categoryName']
|
|
1109
|
+
category_name: StrOrNone2Blank = Field(validation_alias="categoryName")
|
|
1110
|
+
# 领星本地产品品牌名称 [原字段 'brandName']
|
|
1111
|
+
brand_name: StrOrNone2Blank = Field(validation_alias="brandName")
|
|
1112
|
+
# 标题 [原字段 'itemName']
|
|
1113
|
+
title: StrOrNone2Blank = Field(validation_alias="itemName")
|
|
1114
|
+
# 商品略缩图链接 [原字段 'smallImageUrl']
|
|
1115
|
+
thumbnail_url: StrOrNone2Blank = Field(validation_alias="smallImageUrl")
|
|
1116
|
+
# ASIN开发人名称 [原字段 'productDeveloperRealname']
|
|
1117
|
+
developer_name: StrOrNone2Blank = Field(validation_alias="productDeveloperRealname")
|
|
1118
|
+
# ASIN负责人名称 (逗号隔开) [原字段 'principalRealname']
|
|
1119
|
+
operator_names: StrOrNone2Blank = Field(validation_alias="principalRealname")
|
|
1120
|
+
# 商品标签IDs (逗号隔开) [原字段 'listingTagIds']
|
|
1121
|
+
tag_ids: StrOrNone2Blank = Field(validation_alias="listingTagIds")
|
|
1122
|
+
|
|
1123
|
+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
1124
|
+
@field_validator("sids", "asins", mode="before")
|
|
1125
|
+
@classmethod
|
|
1126
|
+
def _validate_sids(cls, v: str) -> list[str]:
|
|
1127
|
+
return v.split(",")
|
|
1128
|
+
|
|
1129
|
+
@field_validator("seller_names", "countries", mode="before")
|
|
1130
|
+
@classmethod
|
|
1131
|
+
def _validate_seller_names(cls, v) -> list[str]:
|
|
1132
|
+
return [v] if isinstance(v, str) else v
|
|
1133
|
+
|
|
1134
|
+
|
|
1135
|
+
class IncomeStatementAsins(ResponseV1, FlattenDataRecords):
|
|
1136
|
+
"""损益报告-商品维度列表"""
|
|
1137
|
+
|
|
1138
|
+
data: list[IncomeStatementAsin]
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
# . Income Statement Mskus
|
|
1142
|
+
class IncomeStatementMsku(IncomeStatement):
|
|
1143
|
+
"""损益报告-亚马逊SKU维度明细"""
|
|
1144
|
+
|
|
1145
|
+
# 记录ID (非业务唯一键)
|
|
1146
|
+
id: str
|
|
1147
|
+
# 领星店铺ID
|
|
1148
|
+
sid: int
|
|
1149
|
+
# 领星店铺名称 [原字段 'storeName']
|
|
1150
|
+
seller_name: str = Field(validation_alias="storeName")
|
|
1151
|
+
# 国家 (中文)
|
|
1152
|
+
country: str
|
|
1153
|
+
# 国家代码 [原字段 'countryCode']
|
|
1154
|
+
country_code: str = Field(validation_alias="countryCode")
|
|
1155
|
+
# 商品ASIN
|
|
1156
|
+
asin: str
|
|
1157
|
+
# 商品父ASIN [原字段 'parentAsin']
|
|
1158
|
+
parent_asin: str = Field(validation_alias="parentAsin")
|
|
1159
|
+
# 亚马逊SKU
|
|
1160
|
+
msku: str
|
|
1161
|
+
# 领星本地SKU [原字段 'localSku']
|
|
1162
|
+
lsku: StrOrNone2Blank = Field(validation_alias="localSku")
|
|
1163
|
+
# 领星本地商品名称 [原字段 'localName']
|
|
1164
|
+
product_name: StrOrNone2Blank = Field(validation_alias="localName")
|
|
1165
|
+
# 产品型号 [原字段 'model']
|
|
1166
|
+
product_model: StrOrNone2Blank = Field(validation_alias="model")
|
|
1167
|
+
# 领星本地产品分类名称 [原字段 'categoryName']
|
|
1168
|
+
category_name: StrOrNone2Blank = Field(validation_alias="categoryName")
|
|
1169
|
+
# 领星本地产品品牌名称 [原字段 'brandName']
|
|
1170
|
+
brand_name: StrOrNone2Blank = Field(validation_alias="brandName")
|
|
1171
|
+
# 标题 [原字段 'itemName']
|
|
1172
|
+
title: StrOrNone2Blank = Field(validation_alias="itemName")
|
|
1173
|
+
# 商品略缩图链接 [原字段 'smallImageUrl']
|
|
1174
|
+
thumbnail_url: StrOrNone2Blank = Field(validation_alias="smallImageUrl")
|
|
1175
|
+
# ASIN开发人名称 [原字段 'productDeveloperRealname']
|
|
1176
|
+
developer_name: StrOrNone2Blank = Field(validation_alias="productDeveloperRealname")
|
|
1177
|
+
# ASIN负责人名称 (逗号隔开) [原字段 'principalRealname']
|
|
1178
|
+
operator_names: StrOrNone2Blank = Field(validation_alias="principalRealname")
|
|
1179
|
+
# 商品标签IDs (逗号隔开) [原字段 'listingTagIds']
|
|
1180
|
+
tag_ids: StrOrNone2Blank = Field(validation_alias="listingTagIds")
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
class IncomeStatementMskus(ResponseV1, FlattenDataRecords):
|
|
1184
|
+
"""损益报告-亚马逊SKU维度列表"""
|
|
1185
|
+
|
|
1186
|
+
data: list[IncomeStatementMsku]
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
# . Income Statement Lskus
|
|
1190
|
+
class IncomeStatementLsku(IncomeStatement):
|
|
1191
|
+
"""损益报告-领星本地SKU维度明细"""
|
|
1192
|
+
|
|
1193
|
+
# 记录ID (非业务唯一键)
|
|
1194
|
+
id: str
|
|
1195
|
+
# 领星店铺ID列表
|
|
1196
|
+
sids: list[int]
|
|
1197
|
+
# 领星店铺名称列表 [原字段 'storeName']
|
|
1198
|
+
seller_names: list[str] = Field(validation_alias="storeName")
|
|
1199
|
+
# 国家列表 (中文) [原字段 'country']
|
|
1200
|
+
countries: list[str] = Field(validation_alias="country")
|
|
1201
|
+
# 国家代码列表 [原字段 'countryCode']
|
|
1202
|
+
country_codes: list[str] = Field(validation_alias="countryCode")
|
|
1203
|
+
# 关联的ASIN列表 [原字段 'asins']
|
|
1204
|
+
asins: list[str] = Field(validation_alias="asins")
|
|
1205
|
+
# 领星本地SKU [原字段 'localSku']
|
|
1206
|
+
lsku: str = Field(validation_alias="localSku")
|
|
1207
|
+
# 领星本地商品ID [原字段 'pid']
|
|
1208
|
+
product_id: int = Field(validation_alias="pid")
|
|
1209
|
+
# 领星本地商品名称 [原字段 'localName']
|
|
1210
|
+
product_name: StrOrNone2Blank = Field(validation_alias="localName")
|
|
1211
|
+
# 产品型号 [原字段 'model']
|
|
1212
|
+
product_model: StrOrNone2Blank = Field(validation_alias="model")
|
|
1213
|
+
# 领星本地产品分类名称 [原字段 'categoryName']
|
|
1214
|
+
category_name: StrOrNone2Blank = Field(validation_alias="categoryName")
|
|
1215
|
+
# 领星本地产品品牌名称 [原字段 'brandName']
|
|
1216
|
+
brand_name: StrOrNone2Blank = Field(validation_alias="brandName")
|
|
1217
|
+
# 标题 [原字段 'itemName']
|
|
1218
|
+
title: StrOrNone2Blank = Field(validation_alias="itemName")
|
|
1219
|
+
# 商品略缩图链接 [原字段 'smallImageUrl']
|
|
1220
|
+
thumbnail_url: StrOrNone2Blank = Field(validation_alias="smallImageUrl")
|
|
1221
|
+
# ASIN开发人名称 [原字段 'productDeveloperRealname']
|
|
1222
|
+
developer_name: StrOrNone2Blank = Field(validation_alias="productDeveloperRealname")
|
|
1223
|
+
# ASIN负责人名称 (逗号隔开) [原字段 'principalRealname']
|
|
1224
|
+
operator_names: StrOrNone2Blank = Field(validation_alias="principalRealname")
|
|
1225
|
+
# 商品标签IDs (逗号隔开) [原字段 'listingTagIds']
|
|
1226
|
+
tag_ids: StrOrNone2Blank = Field(validation_alias="listingTagIds")
|
|
1227
|
+
|
|
1228
|
+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
1229
|
+
@field_validator("sids", "asins", mode="before")
|
|
1230
|
+
@classmethod
|
|
1231
|
+
def _validate_sids(cls, v: str) -> list[str]:
|
|
1232
|
+
return v.split(",")
|
|
1233
|
+
|
|
1234
|
+
@field_validator("seller_names", "countries", "country_codes", mode="before")
|
|
1235
|
+
@classmethod
|
|
1236
|
+
def _validate_seller_names(cls, v) -> list[str]:
|
|
1237
|
+
return [v] if isinstance(v, str) else v
|
|
1238
|
+
|
|
1239
|
+
|
|
1240
|
+
class IncomeStatementLskus(ResponseV1, FlattenDataRecords):
|
|
1241
|
+
"""损益报告-领星本地SKU维度列表"""
|
|
1242
|
+
|
|
1243
|
+
data: list[IncomeStatementLsku]
|