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,3091 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-c
|
|
2
|
+
import datetime
|
|
3
|
+
from typing import Literal
|
|
4
|
+
from lingxingapi import errors
|
|
5
|
+
from lingxingapi.base.api import BaseAPI
|
|
6
|
+
from lingxingapi.finance import param, route, schema
|
|
7
|
+
|
|
8
|
+
# Type Aliases ---------------------------------------------------------------------------------------------------------
|
|
9
|
+
TRANSACTION_SEARCH_FIELD = Literal[
|
|
10
|
+
"transaction_id",
|
|
11
|
+
"transaction_number",
|
|
12
|
+
"amazon_order_id",
|
|
13
|
+
"settlement_id",
|
|
14
|
+
]
|
|
15
|
+
SETTLEMENT_SEARCH_FIELD = Literal[
|
|
16
|
+
"settlement_id",
|
|
17
|
+
"settlement_number",
|
|
18
|
+
]
|
|
19
|
+
LEDGER_EVENT_TYPE = Literal[
|
|
20
|
+
"Shipments",
|
|
21
|
+
"CustomerReturns",
|
|
22
|
+
"WhseTransfers",
|
|
23
|
+
"Receipts",
|
|
24
|
+
"VendorReturns",
|
|
25
|
+
"Adjustments",
|
|
26
|
+
]
|
|
27
|
+
LEDGER_DISPOSITION = Literal[
|
|
28
|
+
"SELLABLE",
|
|
29
|
+
"UNSELLABLE",
|
|
30
|
+
"ALL",
|
|
31
|
+
]
|
|
32
|
+
ADS_TYPE = Literal["SP", "SB", "SBV", "SD"]
|
|
33
|
+
ADS_INVOICE_SEARCH_FIELD = Literal[
|
|
34
|
+
"invoice_id",
|
|
35
|
+
"msku",
|
|
36
|
+
"asin",
|
|
37
|
+
"campaign_name",
|
|
38
|
+
]
|
|
39
|
+
ADS_CAMPAIGN_INVOICE_SEARCH_FIELD = Literal[
|
|
40
|
+
"item",
|
|
41
|
+
"campaign_name",
|
|
42
|
+
]
|
|
43
|
+
RECEIVABLE_SORT_FIELD = Literal[
|
|
44
|
+
"opening_balance",
|
|
45
|
+
"income",
|
|
46
|
+
"refund",
|
|
47
|
+
"spend",
|
|
48
|
+
"other",
|
|
49
|
+
]
|
|
50
|
+
INCOME_STATEMENT_TRANSACTION_STATUS = Literal[
|
|
51
|
+
"Disbursed",
|
|
52
|
+
"Deferred",
|
|
53
|
+
"DisbursedAndSettled",
|
|
54
|
+
"All",
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
# API ------------------------------------------------------------------------------------------------------------------
|
|
59
|
+
class FinanceAPI(BaseAPI):
|
|
60
|
+
"""领星API `财务数据` 接口
|
|
61
|
+
|
|
62
|
+
## Notice
|
|
63
|
+
请勿直接实例化此类
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
# 公共 API --------------------------------------------------------------------------------------
|
|
67
|
+
# . 用户自定义费用管理 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
68
|
+
async def UserFeeTypes(self) -> schema.UserFeeTypes:
|
|
69
|
+
"""查询用户自定义费用类型
|
|
70
|
+
|
|
71
|
+
## Docs
|
|
72
|
+
- 财务: [查询费用类型列表](https://apidoc.lingxing.com/#/docs/Finance/feeManagementType)
|
|
73
|
+
|
|
74
|
+
:returns `<'UserFeeTypes'>`: 查询到的用户自定义费用类型结果
|
|
75
|
+
```
|
|
76
|
+
{
|
|
77
|
+
# 状态码
|
|
78
|
+
"code": 0,
|
|
79
|
+
# 提示信息
|
|
80
|
+
"message": "success",
|
|
81
|
+
# 错误信息
|
|
82
|
+
"errors": [],
|
|
83
|
+
# 请求ID
|
|
84
|
+
"request_id": "44DAC5AE-7D76-9054-2431-0EF7E357CFE5",
|
|
85
|
+
# 响应时间
|
|
86
|
+
"response_time": "2025-08-13 19:23:04",
|
|
87
|
+
# 响应数据量
|
|
88
|
+
"response_count": 2,
|
|
89
|
+
# 总数据量
|
|
90
|
+
"total_count": 2,
|
|
91
|
+
# 响应数据
|
|
92
|
+
"data": [
|
|
93
|
+
{
|
|
94
|
+
# 序号 [原字段 'sort']
|
|
95
|
+
"seq": 0,
|
|
96
|
+
# 费用类型ID [原字段 'id']
|
|
97
|
+
"fee_type_id": 1045768,
|
|
98
|
+
# 费用类型名称 [原字段 'name']
|
|
99
|
+
"fee_type_name": "系统测试费用类型1",
|
|
100
|
+
# 备用ID
|
|
101
|
+
"fpoft_id": "304611409499395584",
|
|
102
|
+
},
|
|
103
|
+
...
|
|
104
|
+
],
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
"""
|
|
108
|
+
url = route.USER_FEE_TYPES
|
|
109
|
+
# 发送请求
|
|
110
|
+
data = await self._request_with_sign("POST", url)
|
|
111
|
+
return schema.UserFeeTypes.model_validate(data)
|
|
112
|
+
|
|
113
|
+
# . 亚马逊交易数据 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
114
|
+
async def Transactions(
|
|
115
|
+
self,
|
|
116
|
+
transaction_start_date: str | datetime.date | datetime.datetime | None = None,
|
|
117
|
+
transaction_end_date: str | datetime.date | datetime.datetime | None = None,
|
|
118
|
+
update_start_time: str | datetime.date | datetime.datetime | None = None,
|
|
119
|
+
update_end_time: str | datetime.date | datetime.datetime | None = None,
|
|
120
|
+
*,
|
|
121
|
+
mids: int | list[int] | None = None,
|
|
122
|
+
sids: int | list[int] | None = None,
|
|
123
|
+
event_types: str | list[str] | None = None,
|
|
124
|
+
transaction_type: str | None = None,
|
|
125
|
+
search_field: TRANSACTION_SEARCH_FIELD | None = None,
|
|
126
|
+
search_value: str | None = None,
|
|
127
|
+
offset: int | None = None,
|
|
128
|
+
length: int | None = None,
|
|
129
|
+
) -> schema.Transactions:
|
|
130
|
+
"""查询亚马逊交易明细
|
|
131
|
+
|
|
132
|
+
## Docs
|
|
133
|
+
- 财务: [查询结算中心-交易明细](https://apidoc.lingxing.com/#/docs/Finance/settlementTransactionList)
|
|
134
|
+
|
|
135
|
+
## Notice
|
|
136
|
+
- 交易明细唯一标识, 当 event_type 为 'serviceFeeEventList' 时, uid 会变动
|
|
137
|
+
- 但当交易明细 settlement_status 为 'Closed' 状态时 uid 不会变化
|
|
138
|
+
- 建议拉取数据时, 把这个类型的数据作单独的删除与写入操作
|
|
139
|
+
|
|
140
|
+
:param transaction_start_date `<'str/date/datetime/None'>`: 交易开始日期 (本地时间),
|
|
141
|
+
双闭区间, 间隔不超过7天, 默认 `None` (交易或更新日期必须指定一个)
|
|
142
|
+
:param transaction_end_date `<'str/date/datetime/None'>`: 交易结束日期 (本地时间),
|
|
143
|
+
双闭区间, 间隔不超过7天, 默认 `None` (交易或更新日期必须指定一个)
|
|
144
|
+
:param update_start_time `<'str/date/datetime/None'>`: 数据更新开始时间 (中国时间),
|
|
145
|
+
间隔不超过7天, 默认 `None` (交易或更新日期必须指定一个)
|
|
146
|
+
:param update_end_time `<'str/date/datetime/None'>`: 数据更新结束时间 (中国时间),
|
|
147
|
+
间隔不超过7天, 默认 `None` (交易或更新日期必须指定一个)
|
|
148
|
+
:param mids `<'int/list[int]/None'>`: 领星站点ID或ID列表 (Seller.mid), 默认 `None` (不筛选)
|
|
149
|
+
:param sids `<'int/list[int]/None'>`: 领星店铺ID或ID列表 (Seller.sid), 默认 `None` (不筛选)
|
|
150
|
+
:param event_types `<'str/list[str]/None'>`: 事件类型或类型列表, 默认 `None` (不筛选)
|
|
151
|
+
:param transaction_type `<'str/None'>`: 交易类型, 默认 `None` (不筛选)
|
|
152
|
+
:param search_field `<'str/None'>`: 搜索字段, 默认 `None` (不筛选), 可选值:
|
|
153
|
+
|
|
154
|
+
- 'transaction_id': 交易ID
|
|
155
|
+
- 'transaction_number': 交易编号
|
|
156
|
+
- 'amazon_order_id': 亚马逊订单ID
|
|
157
|
+
- 'settlement_id': 结算ID
|
|
158
|
+
|
|
159
|
+
:param offset `<'int/None'>`: 分页偏移量, 默认 `None` (使用: 0)
|
|
160
|
+
:param length `<'int/None'>`: 分页长度, 最大值 10000, 默认 `None` (使用: 20)
|
|
161
|
+
:returns `<'Transactions'>`: 查询到的亚马逊交易明细结果
|
|
162
|
+
```python
|
|
163
|
+
{
|
|
164
|
+
# 状态码
|
|
165
|
+
"code": 0,
|
|
166
|
+
# 提示信息
|
|
167
|
+
"message": "success",
|
|
168
|
+
# 错误信息
|
|
169
|
+
"errors": [],
|
|
170
|
+
# 请求ID
|
|
171
|
+
"request_id": "",
|
|
172
|
+
# 响应时间
|
|
173
|
+
"response_time": "2025-08-13 19:23:04",
|
|
174
|
+
# 响应数据量
|
|
175
|
+
"response_count": 2,
|
|
176
|
+
# 总数据量
|
|
177
|
+
"total_count": 2,
|
|
178
|
+
# 响应数据
|
|
179
|
+
"data": [
|
|
180
|
+
{
|
|
181
|
+
# 唯一键 [原字段 'uniqueKey']
|
|
182
|
+
"uid": "AV94ZBO************",
|
|
183
|
+
# 领星店铺ID
|
|
184
|
+
"sid": 1,
|
|
185
|
+
# 亚马逊卖家ID [原字段 'sellerId']
|
|
186
|
+
"seller_id": "AV9**********",
|
|
187
|
+
# 领星店铺名称 [原字段 'storeName']
|
|
188
|
+
"seller_name": "Store-DE",
|
|
189
|
+
# 国家代码 [原字段 'countryCode']
|
|
190
|
+
"country_code": "DE",
|
|
191
|
+
# 市场名称 [原字段 'marketplaceName']
|
|
192
|
+
"marketplace": "Amazon.de",
|
|
193
|
+
# 交易ID [原字段 'id']
|
|
194
|
+
"transaction_id": 16******,
|
|
195
|
+
# 交易编号 [原字段 'fid']
|
|
196
|
+
"transaction_number": "HIO*********",
|
|
197
|
+
# 结算ID [原字段 'settlementId']
|
|
198
|
+
"settlement_id": 0,
|
|
199
|
+
# 事件类型 [原字段 'eventType']
|
|
200
|
+
"event_type": "Shipment",
|
|
201
|
+
# 交易类型 [原字段 'type']
|
|
202
|
+
"transaction_type": "Commission",
|
|
203
|
+
# 账单类型 [原字段 'accountType']
|
|
204
|
+
"account_type": "Standard",
|
|
205
|
+
# 处理状态 [原字段 'processingStatus']
|
|
206
|
+
# (Open: 未结算, Closed: 已结算, Reconciled: 已对账)
|
|
207
|
+
"settlement_status": "Open",
|
|
208
|
+
# 资金转账状态 [原字段 'fundTransferStatus']
|
|
209
|
+
# (Succeeded: 已转账, Processing: 转账中, Failed: 失败, Unknown: 未知)
|
|
210
|
+
"transfer_status": "Unknown",
|
|
211
|
+
# 亚马逊订单编号 [原字段 'amazonOrderId']
|
|
212
|
+
"amazon_order_id": "303-*******-*******",
|
|
213
|
+
# 卖家提供的订单编号 [原字段 'sellerOrderId']
|
|
214
|
+
"merchant_order_id": "303-*******-*******",
|
|
215
|
+
# 配送渠道 [原字段 'fulfillment']
|
|
216
|
+
"fulfillment_channel": "FBA",
|
|
217
|
+
# 亚马逊SKU [原字段 'sellerSku']
|
|
218
|
+
"msku": "SKU*******",
|
|
219
|
+
# 领星本地SKU [原字段 'localSku']
|
|
220
|
+
"lsku": "LOCAL*******",
|
|
221
|
+
# 领星本地商品名称 [原字段 'localName']
|
|
222
|
+
"product_name": "JBL",
|
|
223
|
+
# 数量
|
|
224
|
+
"quantity": 1,
|
|
225
|
+
# 金额 [原字段 'currencyAmount']
|
|
226
|
+
"amount": -7.78,
|
|
227
|
+
# 金额 [原字段 'currencyAmount']
|
|
228
|
+
"currency_code": "EUR",
|
|
229
|
+
# 交易发生时间 (本地时间) [原字段 'postedDateLocale']
|
|
230
|
+
"transaction_time_loc": "2025-09-03T23:59:56+02:00",
|
|
231
|
+
# 数据更新时间 (中国时间) [原字段 'gmtModified']
|
|
232
|
+
"update_time_cnt": "2025-09-04 06:19:38.739",
|
|
233
|
+
},
|
|
234
|
+
...
|
|
235
|
+
],
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
"""
|
|
239
|
+
url = route.TRANSACTIONS
|
|
240
|
+
# 构建参数
|
|
241
|
+
args = {
|
|
242
|
+
"mids": mids,
|
|
243
|
+
"sids": sids,
|
|
244
|
+
"transaction_start_date": transaction_start_date,
|
|
245
|
+
"transaction_end_date": transaction_end_date,
|
|
246
|
+
"update_start_time": update_start_time,
|
|
247
|
+
"update_end_time": update_end_time,
|
|
248
|
+
"event_types": event_types,
|
|
249
|
+
"transaction_type": transaction_type,
|
|
250
|
+
"search_field": search_field,
|
|
251
|
+
"search_value": search_value,
|
|
252
|
+
"offset": offset,
|
|
253
|
+
"length": length,
|
|
254
|
+
}
|
|
255
|
+
try:
|
|
256
|
+
p = param.Transactions.model_validate(args)
|
|
257
|
+
except Exception as err:
|
|
258
|
+
raise errors.InvalidParametersError(err, url, args) from err
|
|
259
|
+
|
|
260
|
+
# 发送请求
|
|
261
|
+
data = await self._request_with_sign("POST", url, body=p.model_dump_params())
|
|
262
|
+
return schema.Transactions.model_validate(data)
|
|
263
|
+
|
|
264
|
+
async def Settlements(
|
|
265
|
+
self,
|
|
266
|
+
start_date: str | datetime.date | datetime.datetime,
|
|
267
|
+
end_date: str | datetime.date | datetime.datetime,
|
|
268
|
+
date_type: int,
|
|
269
|
+
*,
|
|
270
|
+
mids: int | list[int] | None = None,
|
|
271
|
+
sids: int | list[int] | None = None,
|
|
272
|
+
search_field: SETTLEMENT_SEARCH_FIELD | None = None,
|
|
273
|
+
search_value: str | None = None,
|
|
274
|
+
currency_code: str | None = None,
|
|
275
|
+
offset: int | None = None,
|
|
276
|
+
length: int | None = None,
|
|
277
|
+
) -> schema.Settlements:
|
|
278
|
+
"""查询亚马逊结算汇总
|
|
279
|
+
|
|
280
|
+
## Docs
|
|
281
|
+
- 财务: [查询结算中心-结算汇总](https://apidoc.lingxing.com/#/docs/Finance/settlementSummaryList)
|
|
282
|
+
|
|
283
|
+
:param start_date `<'str/date/datetime'>`: 日期开始, 间隔不超过90天
|
|
284
|
+
:param end_date `<'str/date/datetime'>`: 日期结束, 间隔不超过90天
|
|
285
|
+
:param date_type `<'int'>`: 日期类型, 可选值:
|
|
286
|
+
|
|
287
|
+
- `0`: 结算开始时间 (本地时间)
|
|
288
|
+
- `1`: 结算结束时间 (本地时间)
|
|
289
|
+
- `2`: 资金转账时间 (本地时间)
|
|
290
|
+
|
|
291
|
+
:param mids `<'int/list[int]/None'>`: 领星站点ID或ID列表 (Seller.mid), 默认 `None` (不筛选)
|
|
292
|
+
:param sids `<'int/list[int]/None'>`: 领星店铺ID或ID列表 (Seller.sid), 默认 `None` (不筛选)
|
|
293
|
+
:param search_field `<'str/None'>`: 搜索字段, 默认 `None` (不筛选), 可选值:
|
|
294
|
+
|
|
295
|
+
- 'settlement_id': 结算ID
|
|
296
|
+
- 'settlement_number': 结算编号
|
|
297
|
+
|
|
298
|
+
:param search_value `<'str/None'>`: 搜索值, 默认 `None` (不筛选)
|
|
299
|
+
:param currency_code `<'str/None'>`: 结算金额目标转换货币代码, 默认 `None` (保持原结算货币)
|
|
300
|
+
:param offset `<'int/None'>`: 分页偏移量, 默认 `None` (使用: 0)
|
|
301
|
+
:param length `<'int/None'>`: 分页长度, 默认 `None` (使用: 20)
|
|
302
|
+
:returns `<'Settlements'>`: 查询到的亚马逊结算汇总结果
|
|
303
|
+
```python
|
|
304
|
+
{
|
|
305
|
+
# 状态码
|
|
306
|
+
"code": 0,
|
|
307
|
+
# 提示信息
|
|
308
|
+
"message": "success",
|
|
309
|
+
# 错误信息
|
|
310
|
+
"errors": [],
|
|
311
|
+
# 请求ID
|
|
312
|
+
"request_id": "",
|
|
313
|
+
# 响应时间
|
|
314
|
+
"response_time": "2025-08-13 19:23:04",
|
|
315
|
+
# 响应数据量
|
|
316
|
+
"response_count": 2,
|
|
317
|
+
# 总数据量
|
|
318
|
+
"total_count": 2,
|
|
319
|
+
# 响应数据
|
|
320
|
+
"data": [
|
|
321
|
+
{
|
|
322
|
+
# 领星店铺ID
|
|
323
|
+
"sid": 1,
|
|
324
|
+
# 亚马逊卖家ID [原字段 'sellerId']
|
|
325
|
+
"seller_id": "ARHK*********",
|
|
326
|
+
# 领星店铺名称 [原字段 'storeName'
|
|
327
|
+
"seller_name": "Store-SE",
|
|
328
|
+
# 国家代码 [原字段 'countryCode']
|
|
329
|
+
"country_code": "SE",
|
|
330
|
+
# 追踪编号 [原字段 'traceId']
|
|
331
|
+
"trace_number": "139V**********",
|
|
332
|
+
# 结算ID [原字段 'settlementId']
|
|
333
|
+
"settlement_id": 2301*******,
|
|
334
|
+
# 结算编号 [原字段 'id']
|
|
335
|
+
"settlement_number": "8RC4********",
|
|
336
|
+
# 结算备注 [原字段 'comment']
|
|
337
|
+
"settlement_note": "",
|
|
338
|
+
# 处理状态 [原字段 'processingStatus']
|
|
339
|
+
# (Open: 未结算, Closed: 已结算, Reconciled: 已对账)
|
|
340
|
+
"settlement_status": "Closed",
|
|
341
|
+
# 资金转账状态 [原字段 'fundTransferStatus']
|
|
342
|
+
# (Succeeded: 已转账, Processing: 转账中, Failed: 失败, Unknown: 未知)
|
|
343
|
+
"transfer_status": "Succeeded",
|
|
344
|
+
# 账单类型 [原字段 'accountType']
|
|
345
|
+
"account_type": "Standard",
|
|
346
|
+
# 原始结算货币代码 [原字段 'originalTotalCurrencyCode']
|
|
347
|
+
"settlement_currency_code": "SEK",
|
|
348
|
+
# 原始结算金额 [原字段 'originalTotalCurrencyAmount']
|
|
349
|
+
"settlement_amt": 120.62,
|
|
350
|
+
# 转账货币代码 [原字段 'convertedTotalCurrencyCode']
|
|
351
|
+
"transfer_currency_code": "EUR",
|
|
352
|
+
# 转账金额 [原字段 'convertedTotalCurrencyAmount']
|
|
353
|
+
"transfer_amt": 10.77,
|
|
354
|
+
# 转账折算结算金额 [原字段 'convertedTotalCurrencyAmountToOrigin']
|
|
355
|
+
"transfer_to_settlement_amt": 122.91,
|
|
356
|
+
# 结算事件组ID [原字段 'financialEventGroupId']
|
|
357
|
+
"settlement_event_group_id": "O9rWlJ*********",
|
|
358
|
+
# 结算事件金额 [原字段 'financialEventsAmount']
|
|
359
|
+
"settlement_events_amt": 120.62,
|
|
360
|
+
# 对账结果 [原字段 'reconciliationResult']
|
|
361
|
+
"reconciliation_result": "未对账",
|
|
362
|
+
# 汇款比率 [原字段 'remittanceRate']
|
|
363
|
+
"remittance_rate": 0.607263,
|
|
364
|
+
# 银行帐号信息 [原字段 'accountInfo']
|
|
365
|
+
"banck_account_info": "",
|
|
366
|
+
# 银行帐号尾号 [原字段 'accountTail']
|
|
367
|
+
"bank_account_last_digits": "025",
|
|
368
|
+
# 收入 [原字段 'sale']
|
|
369
|
+
"income": {
|
|
370
|
+
# 销售 [原字段 'product']
|
|
371
|
+
"product_sales": 202.4,
|
|
372
|
+
# 运费 [原字段 'freight']
|
|
373
|
+
"shipping_credits": 14.02,
|
|
374
|
+
# 包装 [原字段 'packing']
|
|
375
|
+
"giftwrap_credits": 0.0,
|
|
376
|
+
# 其他
|
|
377
|
+
"other": -14.02,
|
|
378
|
+
# 税费
|
|
379
|
+
"tax": 0.0,
|
|
380
|
+
# 总收入 [原字段 'sale']
|
|
381
|
+
"total_income": 202.4,
|
|
382
|
+
},
|
|
383
|
+
# 退费
|
|
384
|
+
"refund": {
|
|
385
|
+
# 销售退费
|
|
386
|
+
"sales_refunds": 0.0,
|
|
387
|
+
# 其他退费
|
|
388
|
+
"other_refunds": 0.0,
|
|
389
|
+
# 税费退费
|
|
390
|
+
"tax_refunds": 0.0,
|
|
391
|
+
# 总退费
|
|
392
|
+
"total_refunds": 0.0,
|
|
393
|
+
},
|
|
394
|
+
# 支出 [原字段 'pay']
|
|
395
|
+
"expense": {
|
|
396
|
+
# 亚马逊费用 [原字段 'amazon']
|
|
397
|
+
"amazon_fees": -81.78,
|
|
398
|
+
# 库存费用 [原字段 'storage']
|
|
399
|
+
"inventory_fees": 0.0,
|
|
400
|
+
# 广告费用 [原字段 'ad']
|
|
401
|
+
"cost_of_advertising": 0.0,
|
|
402
|
+
# 促销费用 [原字段 'promotion']
|
|
403
|
+
"promotion_rebates": 0.0,
|
|
404
|
+
# 其他费用 [原字段 'other']
|
|
405
|
+
"other_fees": 0.0,
|
|
406
|
+
# 总支出 [原字段 'pay']
|
|
407
|
+
"total_expense": -81.78,
|
|
408
|
+
},
|
|
409
|
+
# 转账
|
|
410
|
+
"transfer": {
|
|
411
|
+
# 初期余额 [原字段 'beginningBalanceCurrencyAmount']
|
|
412
|
+
"opening_balance": 0.0,
|
|
413
|
+
# 本期应收 [原字段 'originalTotalCurrencyAmount']
|
|
414
|
+
"receivable": 120.62,
|
|
415
|
+
# 信用卡扣款 [原字段 'creditCardDeduction']
|
|
416
|
+
"credit_card_deduction": 0.0,
|
|
417
|
+
# 上期预留金余额 [原字段 'previousReserveAmount']
|
|
418
|
+
"prior_reserve_balance": 0.0,
|
|
419
|
+
# 本期预留金余额 [原字段 'currentReserveAmount']
|
|
420
|
+
"current_reserve_balance": 0.0,
|
|
421
|
+
# 本期结算 [原字段 'convertedTotalCurrencyAmount']
|
|
422
|
+
"settlement": 120.62,
|
|
423
|
+
},
|
|
424
|
+
# 结算开始时间 (本地时间) [原字段 'financialEventGroupStartLocale']
|
|
425
|
+
"settlement_start_time_loc": "2024-10-16T21:33:44+02:00",
|
|
426
|
+
# 结算结束时间 (本地时间) [原字段 'financialEventGroupEndLocale']
|
|
427
|
+
"settlement_end_time_loc": "2025-09-03T21:33:45+02:00",
|
|
428
|
+
# 资金转账时间 (本地时间) [原字段 'fundTransferDateLocale']
|
|
429
|
+
"transfer_time_loc": "2025-09-03T21:33:45+02:00",
|
|
430
|
+
# 资金转账时间 (UTC时间) [原字段 'fundTransferDate']
|
|
431
|
+
"transfer_time_utc": "2025-09-03T19:33:45Z",
|
|
432
|
+
},
|
|
433
|
+
...
|
|
434
|
+
]
|
|
435
|
+
}
|
|
436
|
+
```
|
|
437
|
+
"""
|
|
438
|
+
url = route.SETTLEMENTS
|
|
439
|
+
# 构建参数
|
|
440
|
+
args = {
|
|
441
|
+
"start_date": start_date,
|
|
442
|
+
"end_date": end_date,
|
|
443
|
+
"date_type": date_type,
|
|
444
|
+
"mids": mids,
|
|
445
|
+
"sids": sids,
|
|
446
|
+
"search_field": search_field,
|
|
447
|
+
"search_value": search_value,
|
|
448
|
+
"currency_code": currency_code,
|
|
449
|
+
"offset": offset,
|
|
450
|
+
"length": length,
|
|
451
|
+
}
|
|
452
|
+
try:
|
|
453
|
+
p = param.Settlements.model_validate(args)
|
|
454
|
+
except Exception as err:
|
|
455
|
+
raise errors.InvalidParametersError(err, url, args) from err
|
|
456
|
+
|
|
457
|
+
# 发送请求
|
|
458
|
+
data = await self._request_with_sign("POST", url, body=p.model_dump_params())
|
|
459
|
+
return schema.Settlements.model_validate(data)
|
|
460
|
+
|
|
461
|
+
async def ShipmentSettlements(
|
|
462
|
+
self,
|
|
463
|
+
sids: int | list[int],
|
|
464
|
+
seller_ids: str | list[str],
|
|
465
|
+
start_date: str | datetime.date | datetime.datetime,
|
|
466
|
+
end_date: str | datetime.date | datetime.datetime,
|
|
467
|
+
date_type: int,
|
|
468
|
+
*,
|
|
469
|
+
mskus: str | list[str] | None = None,
|
|
470
|
+
lskus: str | list[str] | None = None,
|
|
471
|
+
product_names: str | list[str] | None = None,
|
|
472
|
+
amazon_order_ids: str | list[str] | None = None,
|
|
473
|
+
shipment_ids: str | list[str] | None = None,
|
|
474
|
+
tracking_numbers: str | list[str] | None = None,
|
|
475
|
+
country_codes: str | list[str] | None = None,
|
|
476
|
+
offset: int | None = None,
|
|
477
|
+
length: int | None = None,
|
|
478
|
+
) -> schema.ShipmentSettlements:
|
|
479
|
+
"""查询亚马逊发货结算信息
|
|
480
|
+
|
|
481
|
+
## Docs
|
|
482
|
+
- 财务: [查询发货结算报告](https://apidoc.lingxing.com/#/docs/Finance/SettlementReport)
|
|
483
|
+
|
|
484
|
+
:param sids `<'int/list[int]'>`: 领星店铺ID或ID列表 (Seller.sid)
|
|
485
|
+
:param seller_ids `<'str/list[str]'>`: 亚马逊卖家ID或列表 (Seller.seller_id)
|
|
486
|
+
:param start_date `<'str/date/datetime'>`: 统计开始日期, 双闭区间
|
|
487
|
+
:param end_date `<'str/date/datetime'>`: 统计结束日期, 双闭区间
|
|
488
|
+
:param date_type `<'int'>`: 日期类型, 可选值:
|
|
489
|
+
|
|
490
|
+
- `1`: 下单时间 (本地时间)
|
|
491
|
+
- `2`: 付款时间 (本地时间)
|
|
492
|
+
- `3`: 发货时间 (本地时间)
|
|
493
|
+
- `4`: 结算时间 (本地时间)
|
|
494
|
+
- `5`: 转账时间 (本地时间)
|
|
495
|
+
- `6`: 更新时间 (中国时间)
|
|
496
|
+
|
|
497
|
+
:param mskus `<'str/list[str]/None'>`: 亚马逊SKU或列表, 默认 `None` (不筛选)
|
|
498
|
+
:param lskus `<'str/list[str]/None'>`: 领星本地SKU或列表, 默认 `None` (不筛选)
|
|
499
|
+
:param product_names `<'str/list[str]/None'>`: 领星本地商品名称或列表, 默认 `None` (不筛选)
|
|
500
|
+
:param amazon_order_ids `<'str/list[str]/None'>`: 亚马逊订单ID或列表, 默认 `None` (不筛选)
|
|
501
|
+
:param shipment_ids `<'str/list[str]/None'>`: 亚马逊发货ID或列表, 默认 `None` (不筛选)
|
|
502
|
+
:param tracking_numbers `<'str/list[str]/None'>`: 亚马逊追踪编号或列表, 默认 `None` (不筛选)
|
|
503
|
+
:param country_codes `<'str/list[str]/None'>`: 国家代码或列表, 默认 `None` (不筛选)
|
|
504
|
+
:param offset `<'int/None'>`: 分页偏移量, 默认 `None` (使用: 0)
|
|
505
|
+
:param length `<'int/None'>`: 分页长度, 最大值 1000, 默认 `None` (使用: 20)
|
|
506
|
+
:returns `<'ShipmentSettlements'>`: 查询到的亚马逊发货结算信息结果
|
|
507
|
+
```python
|
|
508
|
+
{
|
|
509
|
+
# 状态码
|
|
510
|
+
"code": 0,
|
|
511
|
+
# 提示信息
|
|
512
|
+
"message": "success",
|
|
513
|
+
# 错误信息
|
|
514
|
+
"errors": [],
|
|
515
|
+
# 请求ID
|
|
516
|
+
"request_id": "",
|
|
517
|
+
# 响应时间
|
|
518
|
+
"response_time": "2025-08-13 19:23:04",
|
|
519
|
+
# 响应数据量
|
|
520
|
+
"response_count": 2,
|
|
521
|
+
# 总数据量
|
|
522
|
+
"total_count": 2,
|
|
523
|
+
# 响应数据
|
|
524
|
+
"data": [
|
|
525
|
+
{
|
|
526
|
+
# 领星店铺ID
|
|
527
|
+
"sid": 1,
|
|
528
|
+
# 亚马逊卖家ID [原字段 'sellerId']
|
|
529
|
+
"seller_id": "A1IJ**********",
|
|
530
|
+
# 领星店铺名称 [原字段 'sellerName']
|
|
531
|
+
"seller_name": "Store-US",
|
|
532
|
+
# 国家代码 [原字段 'countryCode']
|
|
533
|
+
"country_code": "US",
|
|
534
|
+
# 亚马逊订单编号 [原字段 'amazonOrderId']
|
|
535
|
+
"amazon_order_id": "114-*******-*******",
|
|
536
|
+
# 卖家提供的订单编号 [原字段 'merchantOrderId']
|
|
537
|
+
"merchant_order_id": "",
|
|
538
|
+
# 亚马逊货件编号 [原字段 'shipmentId']
|
|
539
|
+
"shipment_id": "Bx4******",
|
|
540
|
+
# 亚马逊货件商品编号 [原字段 'shipmentItemId']
|
|
541
|
+
"shipment_item_id": "DDhy*********",
|
|
542
|
+
# 销售渠道 [原字段 'salesChannel']
|
|
543
|
+
"sales_channel": "amazon.com",
|
|
544
|
+
# 配送方式 [原字段 'fulfillment']
|
|
545
|
+
"fulfillment_channel": "FBA",
|
|
546
|
+
# 亚马逊配送中心代码 [原字段 'fulfillmentCenterId']
|
|
547
|
+
"fulfillment_center_id": "ORF3",
|
|
548
|
+
# 物流模式 [原字段 'logisitcsMode']
|
|
549
|
+
"logistics_mode": "USPS",
|
|
550
|
+
# 物流跟踪号 [原字段 'trackingNumber']
|
|
551
|
+
"tracking_number": "93612*****************",
|
|
552
|
+
# 结算ID [原字段 'settlementId']
|
|
553
|
+
"settlement_id": 0,
|
|
554
|
+
# 处理状态 [原字段 'processingStatus']
|
|
555
|
+
# (Open: 未结算, Closed: 已结算, Reconciled: 已对账)
|
|
556
|
+
"settlement_status": "",
|
|
557
|
+
# 资金转账状态 [原字段 'fundTransferStatus']
|
|
558
|
+
# (Succeeded: 已转账, Processing: 转账中, Failed: 失败, Unknown: 未知)
|
|
559
|
+
"transfer_status": "",
|
|
560
|
+
# 发货与结算时间差异 [原字段 'daysBetweenShipAndFiance']
|
|
561
|
+
"settlement_lag": "00天00小时00分",
|
|
562
|
+
# 亚马逊SKU
|
|
563
|
+
"msku": "SKU********",
|
|
564
|
+
# 领星本地SKU [原字段 'localSku']
|
|
565
|
+
"lsku": "LOCAL********",
|
|
566
|
+
# 领星本地商品名称 [原字段 'localName']
|
|
567
|
+
"product_name": "JBL",
|
|
568
|
+
# 领星本地品牌名称 [原字段 'brandName']
|
|
569
|
+
"brand_name": "",
|
|
570
|
+
# 领星本地分类名称 [原字段 'categoryName']
|
|
571
|
+
"category_name": "",
|
|
572
|
+
# 商品开发负责人名称 [原字段 'productDeveloper']
|
|
573
|
+
"developer_name": "",
|
|
574
|
+
# 商品负责人名称 (逗号分隔) [原字段 'listing']
|
|
575
|
+
"operator_names": "白小白",
|
|
576
|
+
# 订单商品总数量 [原字段 'quantity']
|
|
577
|
+
"order_qty": 1,
|
|
578
|
+
# 商品销售金额 [原字段 'itemPrice']
|
|
579
|
+
"sales_amt": 38.89,
|
|
580
|
+
# 商品销售金额税费 [原字段 'itemTax']
|
|
581
|
+
"sales_tax_amt": 2.72,
|
|
582
|
+
# 买家支付运费金额 [原字段 'shippingPrice']
|
|
583
|
+
"shipping_credits_amt": 0.0,
|
|
584
|
+
# 买家支付运费税费 [原字段 'shippingTax']
|
|
585
|
+
"shipping_credits_tax_amt": 0.0,
|
|
586
|
+
# 买家支付礼品包装费金额 [原字段 'giftWrapPrice']
|
|
587
|
+
"giftwrap_credits_amt": 0.0,
|
|
588
|
+
# 买家支付礼品包装费税费 [原字段 'giftWrapTax']
|
|
589
|
+
"giftwrap_credits_tax_amt": 0.0,
|
|
590
|
+
# 卖家商品促销折扣金额 [原字段 'itemPromotionDiscount']
|
|
591
|
+
"promotion_discount_amt": 0.0,
|
|
592
|
+
# 卖家商品运费折扣金额 [原字段 'shipPromotionDiscount']
|
|
593
|
+
"shipping_discount_amt": 0.0,
|
|
594
|
+
# 货币代码 [原字段 'currencyCode']
|
|
595
|
+
"currency_code": "USD",
|
|
596
|
+
# 买家国家 [原字段 'saleCountryName']
|
|
597
|
+
"buyer_country": "美国",
|
|
598
|
+
# 买家城市 [原字段 'shipCity']
|
|
599
|
+
"buyer_city": "DALTON",
|
|
600
|
+
# 买家区域 [原字段 'region']
|
|
601
|
+
"buyer_district": "GA",
|
|
602
|
+
# 买家邮编 [原字段 'shipPostalCode']
|
|
603
|
+
"buyer_postcode": "30721-7330",
|
|
604
|
+
# 订单购买时间 (本地时间) [原字段 'purchaseDateLocale']
|
|
605
|
+
"purchase_time_loc": "2025-09-03 14:18:46",
|
|
606
|
+
# 订单发货时间 (本地时间) [原字段 'shipmentsDateLocale']
|
|
607
|
+
"shipment_time_loc": "2025-09-03 21:42:31",
|
|
608
|
+
# 订单付款时间 (本地时间) [原字段 'paymentsDateLocale']
|
|
609
|
+
"payment_time_loc": "2025-09-03 21:42:31",
|
|
610
|
+
# 订单结算时间 (本地时间) [原字段 'financePostedDateLocale']
|
|
611
|
+
"settlement_time_loc": "",
|
|
612
|
+
# 资金转账时间 (本地时间) [原字段 'fundTransferDateLocale']
|
|
613
|
+
"transfer_time_loc": "",
|
|
614
|
+
# 数据更新时间 (中国时间) [原字段 'gmtModified']
|
|
615
|
+
"update_time_cnt": "2025-09-05 07:38:11",
|
|
616
|
+
},
|
|
617
|
+
...
|
|
618
|
+
]
|
|
619
|
+
}
|
|
620
|
+
```
|
|
621
|
+
"""
|
|
622
|
+
url = route.SHIPMENT_SETTLEMENT
|
|
623
|
+
# 构建参数
|
|
624
|
+
args = {
|
|
625
|
+
"sids": sids,
|
|
626
|
+
"seller_ids": seller_ids,
|
|
627
|
+
"start_date": start_date,
|
|
628
|
+
"end_date": end_date,
|
|
629
|
+
"date_type": date_type,
|
|
630
|
+
"mskus": mskus,
|
|
631
|
+
"lskus": lskus,
|
|
632
|
+
"product_names": product_names,
|
|
633
|
+
"amazon_order_ids": amazon_order_ids,
|
|
634
|
+
"shipment_ids": shipment_ids,
|
|
635
|
+
"tracking_numbers": tracking_numbers,
|
|
636
|
+
"country_codes": country_codes,
|
|
637
|
+
"offset": offset,
|
|
638
|
+
"length": length,
|
|
639
|
+
}
|
|
640
|
+
try:
|
|
641
|
+
p = param.ShipmentSettlement.model_validate(args)
|
|
642
|
+
except Exception as err:
|
|
643
|
+
raise errors.InvalidParametersError(err, url, args) from err
|
|
644
|
+
|
|
645
|
+
# 发送请求
|
|
646
|
+
data = await self._request_with_sign("POST", url, body=p.model_dump_params())
|
|
647
|
+
return schema.ShipmentSettlements.model_validate(data)
|
|
648
|
+
|
|
649
|
+
async def Receivables(
|
|
650
|
+
self,
|
|
651
|
+
settlement_date: str | datetime.date | datetime.datetime,
|
|
652
|
+
*,
|
|
653
|
+
mids: int | list[int] | None = None,
|
|
654
|
+
sids: int | list[int] | None = None,
|
|
655
|
+
archive_status: int | None = None,
|
|
656
|
+
received_state: int | None = None,
|
|
657
|
+
sort_field: RECEIVABLE_SORT_FIELD | None = None,
|
|
658
|
+
sort_type: int | None = None,
|
|
659
|
+
currency_code: str | None = None,
|
|
660
|
+
offset: int | None = None,
|
|
661
|
+
length: int | None = None,
|
|
662
|
+
) -> schema.Receivables:
|
|
663
|
+
"""查询亚马逊应收账款
|
|
664
|
+
|
|
665
|
+
## Docs
|
|
666
|
+
- 财务: [应收报告-列表查询](https://apidoc.lingxing.com/#/docs/Finance/receivableReportList)
|
|
667
|
+
|
|
668
|
+
:param settlement_date `<'str/date/datetime'>`: 结算日期
|
|
669
|
+
:param mids `<'int/list[int]/None'>`: 领星站点ID或ID列表 (Seller.mid), 默认 `None` (不筛选)
|
|
670
|
+
:param sids `<'int/list[int]/None'>`: 领星店铺ID或ID列表 (Seller.sid), 默认 `None` (不筛选)
|
|
671
|
+
:param archive_status `<'int/None'>`: 归档状态, 默认 `None` (不筛选), 可选值:
|
|
672
|
+
|
|
673
|
+
- `0`: 未归档
|
|
674
|
+
- `1`: 已归档
|
|
675
|
+
|
|
676
|
+
:param received_state `<'int/None'>`: 收款状态, 默认 `None` (不筛选), 可选值:
|
|
677
|
+
|
|
678
|
+
- `0`: 未收款
|
|
679
|
+
- `1`: 已收款
|
|
680
|
+
|
|
681
|
+
:param sort_field `<'str/None'>`: 排序字段, 默认 `None` (不排序), 可选值:
|
|
682
|
+
|
|
683
|
+
- `'opening_balance'`: 期初余额
|
|
684
|
+
- `'income'`: 收入
|
|
685
|
+
- `'refund'`: 退款
|
|
686
|
+
- `'spend'`: 支出
|
|
687
|
+
- `'other'`: 其他
|
|
688
|
+
|
|
689
|
+
:param sort_type `<'int/None'>`: 排序方式, 默认 `None` (不排序), 可选值:
|
|
690
|
+
|
|
691
|
+
- `0`: 升序
|
|
692
|
+
- `1`: 降序
|
|
693
|
+
|
|
694
|
+
:param currency_code `<'str/None'>`: 结算金额目标转换货币代码, 默认 `None` (保持原结算货币)
|
|
695
|
+
:param offset `<'int/None'>`: 分页偏移量, 默认 `None` (使用: 0)
|
|
696
|
+
:param length `<'int/None'>`: 分页长度, 默认 `None` (使用: 20)
|
|
697
|
+
:returns `<'Receivables'>`: 查询到的亚马逊应收账款结果
|
|
698
|
+
```python
|
|
699
|
+
{
|
|
700
|
+
# 状态码
|
|
701
|
+
"code": 0,
|
|
702
|
+
# 提示信息
|
|
703
|
+
"message": "success",
|
|
704
|
+
# 错误信息
|
|
705
|
+
"errors": [],
|
|
706
|
+
# 请求ID
|
|
707
|
+
"request_id": "",
|
|
708
|
+
# 响应时间
|
|
709
|
+
"response_time": "2025-08-13 19:23:04",
|
|
710
|
+
# 响应数据量
|
|
711
|
+
"response_count": 2,
|
|
712
|
+
# 总数据量
|
|
713
|
+
"total_count": 2,
|
|
714
|
+
# 响应数据
|
|
715
|
+
"data": [
|
|
716
|
+
{
|
|
717
|
+
# 领星店铺ID
|
|
718
|
+
"sid": 1,
|
|
719
|
+
# 领星店铺名称 [原字段 'storeName']
|
|
720
|
+
"seller_name": "Store-CA",
|
|
721
|
+
# 国家 (中文)
|
|
722
|
+
"country": "加拿大",
|
|
723
|
+
# 国家代码 [原字段 'countryCode']
|
|
724
|
+
"country_code": "CA",
|
|
725
|
+
# 对账状态 (0: 未对账, 1: 已对账)
|
|
726
|
+
"archive_status": 0,
|
|
727
|
+
# 对账状态描述
|
|
728
|
+
"archive_status_desc": "未对账",
|
|
729
|
+
# 应收款备注 [原字段 'remark']
|
|
730
|
+
"note": "",
|
|
731
|
+
# 初期余额 [原字段 'beginningBalanceCurrencyAmount']
|
|
732
|
+
"opening_balance": 1940.57,
|
|
733
|
+
# 收入金额 [原字段 'incomeAmount']
|
|
734
|
+
"income": 74958.81,
|
|
735
|
+
# 退费金额 [原字段 'refundAmount']
|
|
736
|
+
"refund": -2671.66,
|
|
737
|
+
# 支出金额 [原字段 'spendAmount']
|
|
738
|
+
"expense": -22988.99,
|
|
739
|
+
# 其他金额
|
|
740
|
+
"other": 0.0,
|
|
741
|
+
# 其他: 信用卡扣款金额 [原字段 'card']
|
|
742
|
+
"other_credit_card_deduction": 0.0,
|
|
743
|
+
# 其他: 其他子项金额 [原字段 'otherItem']
|
|
744
|
+
"other_item": 0.0,
|
|
745
|
+
# 转账成功金额 [原字段 'convertedSuccessAmount']
|
|
746
|
+
"transfer_success": 51612.15,
|
|
747
|
+
# 转账到账金额 [原字段 'receivedAmount']
|
|
748
|
+
"transfer_received": 0.0,
|
|
749
|
+
# 转账失败金额 [原字段 'convertedFailedAmount']
|
|
750
|
+
"transfer_failed": 0.0,
|
|
751
|
+
# 期末余额 [原字段 'endingBalance']
|
|
752
|
+
"ending_balance": -373.42,
|
|
753
|
+
# 币种代码 [原字段 'currencyCode']
|
|
754
|
+
"currency_code": "CAD",
|
|
755
|
+
# 币种符号 [原字段 'currencyIcon']
|
|
756
|
+
"currency_icon": "CA$",
|
|
757
|
+
# 结算日期 (格式: YYYY-MM) [原字段 'settlementDate']
|
|
758
|
+
"settlement_date": "2025-08",
|
|
759
|
+
},
|
|
760
|
+
...
|
|
761
|
+
]
|
|
762
|
+
}
|
|
763
|
+
```
|
|
764
|
+
"""
|
|
765
|
+
url = route.RECEIVABLES
|
|
766
|
+
# 构建参数
|
|
767
|
+
args = {
|
|
768
|
+
"settlement_date": settlement_date,
|
|
769
|
+
"mids": mids,
|
|
770
|
+
"sids": sids,
|
|
771
|
+
"archive_status": archive_status,
|
|
772
|
+
"received_state": received_state,
|
|
773
|
+
"sort_field": sort_field,
|
|
774
|
+
"sort_type": sort_type,
|
|
775
|
+
"currency_code": currency_code,
|
|
776
|
+
"offset": offset,
|
|
777
|
+
"length": length,
|
|
778
|
+
}
|
|
779
|
+
try:
|
|
780
|
+
p = param.Receivables.model_validate(args)
|
|
781
|
+
except Exception as err:
|
|
782
|
+
raise errors.InvalidParametersError(err, url, args) from err
|
|
783
|
+
|
|
784
|
+
# 发送请求
|
|
785
|
+
data = await self._request_with_sign("POST", url, body=p.model_dump_params())
|
|
786
|
+
return schema.Receivables.model_validate(data)
|
|
787
|
+
|
|
788
|
+
# . 亚马逊库存数据 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
789
|
+
async def LedgerDetail(
|
|
790
|
+
self,
|
|
791
|
+
seller_ids: str | list[str],
|
|
792
|
+
start_date: str | datetime.date | datetime.datetime,
|
|
793
|
+
end_date: str | datetime.date | datetime.datetime,
|
|
794
|
+
*,
|
|
795
|
+
asins: str | list[str] | None = None,
|
|
796
|
+
mskus: str | list[str] | None = None,
|
|
797
|
+
fnskus: str | list[str] | None = None,
|
|
798
|
+
country_codes: str | list[str] | None = None,
|
|
799
|
+
event_types: LEDGER_EVENT_TYPE | list[LEDGER_EVENT_TYPE] | None = None,
|
|
800
|
+
reference_id: int | None = None,
|
|
801
|
+
disposition: LEDGER_DISPOSITION | None = None,
|
|
802
|
+
offset: int | None = None,
|
|
803
|
+
length: int | None = None,
|
|
804
|
+
) -> schema.LedgerDetail:
|
|
805
|
+
"""查询亚马逊库存明细台账
|
|
806
|
+
|
|
807
|
+
## Docs
|
|
808
|
+
- 财务: [查询库存分类账detail数据](https://apidoc.lingxing.com/#/docs/Finance/centerOdsDetailQuery)
|
|
809
|
+
|
|
810
|
+
:param seller_ids `<'str/list[str]'>`: 亚马逊卖家ID或列表 (Seller.seller_id)
|
|
811
|
+
:param start_date `<'str/date/datetime'>`: 统计开始日期, 闭合区间
|
|
812
|
+
:param end_date `<'str/date/datetime'>`: 统计结束日期, 闭合区间
|
|
813
|
+
:param asins `<'str/list[str]/None'>`: 亚马逊ASIN或列表, 默认 `None` (不筛选)
|
|
814
|
+
:param mskus `<'str/list[str]/None'>`: 亚马逊SKU或列表, 默认 `None` (不筛选)
|
|
815
|
+
:param fnskus `<'str/list[str]/None'>`: 亚马逊FNSKU或列表, 默认 `None` (不筛选)
|
|
816
|
+
:param country_codes `<'str/list[str]/None'>`: 国家代码(库存位置)或列表, 默认 `None` (不筛选)
|
|
817
|
+
:param event_types `<'str/list[str]/None'>`: 事件类型或类型列表, 默认 `None` (不筛选), 可选值:
|
|
818
|
+
|
|
819
|
+
- `'Shipments'`
|
|
820
|
+
- `'CustomerReturns'`
|
|
821
|
+
- `'WhseTransfers'`
|
|
822
|
+
- `'Receipts'`
|
|
823
|
+
- `'VendorReturns'`
|
|
824
|
+
- `'Adjustments'`
|
|
825
|
+
|
|
826
|
+
:param reference_id `<'int/None'>`: 货物关联ID, 支持模糊查询, 默认 `None` (不筛选)
|
|
827
|
+
:param disposition `<'int/None'>`: 库存处置结果, 默认 `None` (不筛选), 可选值:
|
|
828
|
+
|
|
829
|
+
- `'SELLABLE'`
|
|
830
|
+
- `'UNSELLABLE'`
|
|
831
|
+
- `'ALL'`
|
|
832
|
+
|
|
833
|
+
:param offset `<'int/None'>`: 分页偏移量, 默认 `None` (使用: 0)
|
|
834
|
+
:param length `<'int/None'>`: 分页长度, 最大值 1000, 默认 `None` (使用: 20)
|
|
835
|
+
:returns `<'LedgerDetail'>`: 查询到的亚马逊库存明细台账结果
|
|
836
|
+
```python
|
|
837
|
+
{
|
|
838
|
+
# 状态码
|
|
839
|
+
"code": 0,
|
|
840
|
+
# 提示信息
|
|
841
|
+
"message": "success",
|
|
842
|
+
# 错误信息
|
|
843
|
+
"errors": [],
|
|
844
|
+
# 请求ID
|
|
845
|
+
"request_id": "",
|
|
846
|
+
# 响应时间
|
|
847
|
+
"response_time": "2025-08-13 19:23:04",
|
|
848
|
+
# 响应数据量
|
|
849
|
+
"response_count": 2,
|
|
850
|
+
# 总数据量
|
|
851
|
+
"total_count": 2,
|
|
852
|
+
# 响应数据
|
|
853
|
+
"data": [
|
|
854
|
+
{
|
|
855
|
+
# 同uid_idx共同构成唯一索引 [原字段 'uniqueMd5']
|
|
856
|
+
"uid": "5cdbbb**************",
|
|
857
|
+
# 同uid共同构成唯一索引 [原字段 'uniqueMd5Idx']
|
|
858
|
+
"uid_idx": 0,
|
|
859
|
+
# 货物关联ID [原字段 'referenceId']
|
|
860
|
+
"reference_id": "",
|
|
861
|
+
# 亚马逊卖家ID [原字段 'sellerId']
|
|
862
|
+
"seller_id": "A1IJ**********",
|
|
863
|
+
# 亚马逊ASIN
|
|
864
|
+
"asin": "B0D*******",
|
|
865
|
+
# 亚马逊SKU
|
|
866
|
+
"msku": "SKU*******",
|
|
867
|
+
# 亚马逊FNSKU
|
|
868
|
+
"fnsku": "X00*******",
|
|
869
|
+
# 商品标题
|
|
870
|
+
"title": "Product Title",
|
|
871
|
+
# 事件类型编码 [原字段 'eventType']
|
|
872
|
+
"event_type_code": "01",
|
|
873
|
+
# 事件类型 [原字段 'eventTypeDesc']
|
|
874
|
+
"event_type": "Shipments",
|
|
875
|
+
# 事件原因 [原字段 'reason']
|
|
876
|
+
"event_reason": "",
|
|
877
|
+
# 事件发生日期 [原字段 'date
|
|
878
|
+
"event_date": "2025-09-04",
|
|
879
|
+
# 国家代码 (库存位置)
|
|
880
|
+
"country_code": "US",
|
|
881
|
+
# 亚马逊配送中心代码 [原字段 'fulfillmentCenter']
|
|
882
|
+
"fulfillment_center_id": "RIC2",
|
|
883
|
+
# 库存处置结果编码 [原字段 'disposition']
|
|
884
|
+
"disposition_code": "01",
|
|
885
|
+
# 库存处置结果 [原字段 'dispositionDesc']
|
|
886
|
+
"disposition": "SELLABLE",
|
|
887
|
+
# 数量 [原字段 'quantity']
|
|
888
|
+
"qty": -1,
|
|
889
|
+
},
|
|
890
|
+
...
|
|
891
|
+
]
|
|
892
|
+
}
|
|
893
|
+
```
|
|
894
|
+
"""
|
|
895
|
+
url = route.LEDGER_DETAIL
|
|
896
|
+
# 构建参数
|
|
897
|
+
args = {
|
|
898
|
+
"seller_ids": seller_ids,
|
|
899
|
+
"start_date": start_date,
|
|
900
|
+
"end_date": end_date,
|
|
901
|
+
"asins": asins,
|
|
902
|
+
"mskus": mskus,
|
|
903
|
+
"fnskus": fnskus,
|
|
904
|
+
"country_codes": country_codes,
|
|
905
|
+
"event_types": event_types,
|
|
906
|
+
"reference_id": reference_id,
|
|
907
|
+
"disposition": disposition,
|
|
908
|
+
"offset": offset,
|
|
909
|
+
"length": length,
|
|
910
|
+
}
|
|
911
|
+
try:
|
|
912
|
+
p = param.LedgerDetail.model_validate(args)
|
|
913
|
+
except Exception as err:
|
|
914
|
+
raise errors.InvalidParametersError(err, url, args) from err
|
|
915
|
+
|
|
916
|
+
# 发送请求
|
|
917
|
+
data = await self._request_with_sign("POST", url, body=p.model_dump_params())
|
|
918
|
+
return schema.LedgerDetail.model_validate(data)
|
|
919
|
+
|
|
920
|
+
async def LedgerSummary(
|
|
921
|
+
self,
|
|
922
|
+
seller_ids: str | list[str],
|
|
923
|
+
query_dimension: int,
|
|
924
|
+
start_date: str | datetime.date | datetime.datetime,
|
|
925
|
+
end_date: str | datetime.date | datetime.datetime,
|
|
926
|
+
*,
|
|
927
|
+
asins: str | list[str] | None = None,
|
|
928
|
+
mskus: str | list[str] | None = None,
|
|
929
|
+
fnskus: str | list[str] | None = None,
|
|
930
|
+
country_codes: str | list[str] | None = None,
|
|
931
|
+
disposition: LEDGER_DISPOSITION | None = None,
|
|
932
|
+
offset: int | None = None,
|
|
933
|
+
length: int | None = None,
|
|
934
|
+
) -> schema.LedgerSummary:
|
|
935
|
+
"""查询亚马逊库存汇总台账
|
|
936
|
+
|
|
937
|
+
## Docs
|
|
938
|
+
- 财务: [查询库存分类账summary数据](https://apidoc.lingxing.com/#/docs/Finance/summaryQuery)
|
|
939
|
+
|
|
940
|
+
:param seller_ids `<'str/list[str]'>`: 亚马逊卖家ID或列表 (Seller.seller_id)
|
|
941
|
+
:param query_dimension `<'int'>`: 查询维度, 可选值:
|
|
942
|
+
|
|
943
|
+
- `1`: 月维度
|
|
944
|
+
- `2`: 日维度
|
|
945
|
+
|
|
946
|
+
:param start_date `<'str/date/datetime'>`: 统计开始日期, 闭合区间
|
|
947
|
+
:param end_date `<'str/date/datetime'>`: 统计结束日期, 闭合区间
|
|
948
|
+
:param asins `<'str/list[str]/None'>`: 亚马逊ASIN或列表, 默认 `None` (不筛选)
|
|
949
|
+
:param mskus `<'str/list[str]/None'>`: 亚马逊SKU或列表, 默认 `None` (不筛选)
|
|
950
|
+
:param fnskus `<'str/list[str]/None'>`: 亚马逊FNSKU或列表, 默认 `None` (不筛选)
|
|
951
|
+
:param country_codes `<'str/list[str]/None'>`: 国家代码(库存位置)或列表, 默认 `None` (不筛选)
|
|
952
|
+
:param disposition `<'int/None'>`: 库存处置结果, 默认 `None` (不筛选), 可选值:
|
|
953
|
+
|
|
954
|
+
- `'SELLABLE'`
|
|
955
|
+
- `'UNSELLABLE'`
|
|
956
|
+
- `'ALL'`
|
|
957
|
+
|
|
958
|
+
:param offset `<'int/None'>`: 分页偏移量, 默认 `None` (使用: 0)
|
|
959
|
+
:param length `<'int/None'>`: 分页长度, 最大值 1000, 默认 `None` (使用: 20)
|
|
960
|
+
:returns `<'LedgerSummary'>`: 查询到的亚马逊库存汇总台账结果
|
|
961
|
+
```python
|
|
962
|
+
{
|
|
963
|
+
# 状态码
|
|
964
|
+
"code": 0,
|
|
965
|
+
# 提示信息
|
|
966
|
+
"message": "success",
|
|
967
|
+
# 错误信息
|
|
968
|
+
"errors": [],
|
|
969
|
+
# 请求ID
|
|
970
|
+
"request_id": "",
|
|
971
|
+
# 响应时间
|
|
972
|
+
"response_time": "2025-08-13 19:23:04",
|
|
973
|
+
# 响应数据量
|
|
974
|
+
"response_count": 2,
|
|
975
|
+
# 总数据量
|
|
976
|
+
"total_count": 2,
|
|
977
|
+
# 响应数据
|
|
978
|
+
"data": [
|
|
979
|
+
{
|
|
980
|
+
# 同uid_idx共同构成唯一索引 [原字段 'uniqueMd5']
|
|
981
|
+
"uid": "1c227d2****************",
|
|
982
|
+
# 同uid共同构成唯一索引 [原字段 'uniqueMd5Idx']
|
|
983
|
+
"uid_idx": 0,
|
|
984
|
+
# 亚马逊卖家ID [原字段 'sellerId']
|
|
985
|
+
"seller_id": "A1IJI*********",
|
|
986
|
+
# 亚马逊ASIN
|
|
987
|
+
"asin": "B0D*******",
|
|
988
|
+
# 亚马逊SKU
|
|
989
|
+
"msku": "SKU*******",
|
|
990
|
+
# 亚马逊FNSKU
|
|
991
|
+
"fnsku": "X00*******",
|
|
992
|
+
# 商品标题
|
|
993
|
+
"title": "Product Title",
|
|
994
|
+
# 汇总月份/日期 [原字段 'date']
|
|
995
|
+
# (月维度: '2024-01', 日维度: '2024-01-01')
|
|
996
|
+
"summary_date": "2025-08",
|
|
997
|
+
# 国家代码 (库存位置)
|
|
998
|
+
"country_code": "US",
|
|
999
|
+
# 库存处置结果编码 [原字段 'disposition']
|
|
1000
|
+
"disposition_code": "01",
|
|
1001
|
+
# 库存处置结果 [原字段 'dispositionDesc']
|
|
1002
|
+
"disposition": "SELLABLE",
|
|
1003
|
+
# 初期库存 [原字段 'startingWarehouseBalance']
|
|
1004
|
+
"opening_balance": 676,
|
|
1005
|
+
# 调拨变动 [原字段 'warehouseTransferInOrOut']
|
|
1006
|
+
"transfer_net": -209,
|
|
1007
|
+
# 调拨在途 [原字段 'inTransitBetweenWarehouses']
|
|
1008
|
+
"transfer_in_transit": 210,
|
|
1009
|
+
# 签收入库 [原字段 'receipts']
|
|
1010
|
+
"received": 700,
|
|
1011
|
+
# 销售出库 [原字段 'customerShipments']
|
|
1012
|
+
"customer_shipment": -566,
|
|
1013
|
+
# 销售退货 [原字段 'customerReturns']
|
|
1014
|
+
"customer_returned": 4,
|
|
1015
|
+
# 卖家移除 [原字段 'vendorReturns']
|
|
1016
|
+
"seller_removal": 0,
|
|
1017
|
+
# 丢失报损 [原字段 'lost']
|
|
1018
|
+
"lost_events": -1,
|
|
1019
|
+
# 盘盈找回 [原字段 'found'
|
|
1020
|
+
"found_events": 1,
|
|
1021
|
+
# 受损调整 [原字段 'damaged']
|
|
1022
|
+
"damaged_events": 0,
|
|
1023
|
+
# 处置报废 [原字段 'disposed']
|
|
1024
|
+
"disposed_events": 0,
|
|
1025
|
+
# 其他事件变动 [原字段 'otherEvents']
|
|
1026
|
+
"other_events": 0,
|
|
1027
|
+
# 未知事件变动 [原字段 'unKnownEvents']
|
|
1028
|
+
"unknown_events": 0,
|
|
1029
|
+
# 期末库存 [原字段 'endingWareHouseBalance']
|
|
1030
|
+
"closing_balance": 605,
|
|
1031
|
+
},
|
|
1032
|
+
...
|
|
1033
|
+
]
|
|
1034
|
+
}
|
|
1035
|
+
```
|
|
1036
|
+
"""
|
|
1037
|
+
url = route.LEDGER_SUMMARY
|
|
1038
|
+
# 构建参数
|
|
1039
|
+
args = {
|
|
1040
|
+
"seller_ids": seller_ids,
|
|
1041
|
+
"query_dimension": query_dimension,
|
|
1042
|
+
"start_date": start_date,
|
|
1043
|
+
"end_date": end_date,
|
|
1044
|
+
"asins": asins,
|
|
1045
|
+
"mskus": mskus,
|
|
1046
|
+
"fnskus": fnskus,
|
|
1047
|
+
"country_codes": country_codes,
|
|
1048
|
+
"disposition": disposition,
|
|
1049
|
+
"offset": offset,
|
|
1050
|
+
"length": length,
|
|
1051
|
+
}
|
|
1052
|
+
try:
|
|
1053
|
+
p = param.LedgerSummary.model_validate(args)
|
|
1054
|
+
except Exception as err:
|
|
1055
|
+
raise errors.InvalidParametersError(err, url, args) from err
|
|
1056
|
+
|
|
1057
|
+
# 发送请求
|
|
1058
|
+
data = await self._request_with_sign("POST", url, body=p.model_dump_params())
|
|
1059
|
+
return schema.LedgerSummary.model_validate(data)
|
|
1060
|
+
|
|
1061
|
+
async def LedgerValuation(
|
|
1062
|
+
self,
|
|
1063
|
+
start_date: str | datetime.date | datetime.datetime,
|
|
1064
|
+
end_date: str | datetime.date | datetime.datetime,
|
|
1065
|
+
date_type: int,
|
|
1066
|
+
*,
|
|
1067
|
+
transaction_types: int | list[int] | None = None,
|
|
1068
|
+
transaction_numbers: str | list[str] | None = None,
|
|
1069
|
+
source_numbers: str | list[str] | None = None,
|
|
1070
|
+
warehouse_names: str | list[str] | None = None,
|
|
1071
|
+
seller_names: str | list[str] | None = None,
|
|
1072
|
+
mskus: str | list[str] | None = None,
|
|
1073
|
+
lskus: str | list[str] | None = None,
|
|
1074
|
+
dispositions: int | list[int] | None = None,
|
|
1075
|
+
offset: int | None = None,
|
|
1076
|
+
length: int | None = None,
|
|
1077
|
+
) -> schema.LedgerValuation:
|
|
1078
|
+
"""查询亚马逊库存价值台账
|
|
1079
|
+
|
|
1080
|
+
## Docs
|
|
1081
|
+
- 财务: [查询FBA成本计价流水](https://apidoc.lingxing.com/#/docs/Finance/CostStream)
|
|
1082
|
+
|
|
1083
|
+
:param start_date `<'str/date/datetime'>`: 查询开始日期
|
|
1084
|
+
:param end_date `<'str/date/datetime'>`: 查询结束日期
|
|
1085
|
+
:param date_type `<'int'>`: 日期类型, 可选值:
|
|
1086
|
+
|
|
1087
|
+
- `1`: 库存动作日期
|
|
1088
|
+
- `2`: 结算日期 (仅销售, 退货场景会存在结算日期, 其他库存动作结算日期为空)
|
|
1089
|
+
|
|
1090
|
+
:param transaction_types `<'int/list[int]/None'>`: 库存动作类型或列表, 默认 `None` (不筛选), 可选值:
|
|
1091
|
+
|
|
1092
|
+
- `1`: 期初库存-FBA上月结存
|
|
1093
|
+
- `10`: 调拨入库-FBA补货入库
|
|
1094
|
+
- `11`: 调拨入库-FBA途损补回
|
|
1095
|
+
- `12`: 调拨入库-FBA超签入库
|
|
1096
|
+
- `13`: 调拨入库-FBA超签入库 (Close后)
|
|
1097
|
+
- `14`: 调拨入库-FBA补货入库 (无发货单)
|
|
1098
|
+
- `20`: 调拨入库-FBA调仓入库
|
|
1099
|
+
- `35`: 调拨入库-FBA发货在途入库
|
|
1100
|
+
- `25`: 盘点入库-FBA盘点入库
|
|
1101
|
+
- `30`: FBA退货-FBA无源单销售退货
|
|
1102
|
+
- `31`: FBA退货-FBA有源单销售退货
|
|
1103
|
+
- `200`: 销售出库-FBA补发货销售
|
|
1104
|
+
- `201`: 销售出库-FBA多渠道销售订单
|
|
1105
|
+
- `202`: 销售出库-FBA亚马逊销售订单
|
|
1106
|
+
- `205`: 其他出库-FBA补货出库
|
|
1107
|
+
- `220`: 盘点出库-FBA盘点出库
|
|
1108
|
+
- `15`: 调拨出库-FBA调仓出库
|
|
1109
|
+
- `215`: 调拨出库-FBA移除
|
|
1110
|
+
- `225`: 调拨出库-FBA发货在途出库
|
|
1111
|
+
- `226`: 调拨出库-FBA发货途损
|
|
1112
|
+
- `227`: 调拨出库-后补发货单在途出库
|
|
1113
|
+
- `5`: 调整单- FBA对账差异入库调整
|
|
1114
|
+
- `210`: 调整单-FBA对账差异出库调整
|
|
1115
|
+
- `400`: 调整单-尾差调整
|
|
1116
|
+
- `420`: 调整单-负库存数量调整
|
|
1117
|
+
- `405`: 调整单-期初成本录入
|
|
1118
|
+
|
|
1119
|
+
:param transaction_numbers `<'str/list[str]/None'>`: 库存动作单号或列表, 默认 `None` (不筛选)
|
|
1120
|
+
:param source_numbers `<'str/list[str]/None'>`: 源头单据号或列表, 默认 `None` (不筛选)
|
|
1121
|
+
:param warehouse_names `<'str/list[str]/None'>`: 仓库名称或列表, 默认 `None` (不筛选)
|
|
1122
|
+
:param seller_names `<'str/list[str]/None'>`: 领星店铺名称或列表, 默认 `None` (不筛选)
|
|
1123
|
+
:param mskus `<'str/list[str]/None'>`: 亚马逊SKU或列表, 默认 `None` (不筛选)
|
|
1124
|
+
:param lskus `<'str/list[str]/None'>`: 领星本地SKU或列表, 默认 `None` (不筛选)
|
|
1125
|
+
:param dispositions `<'int/list[int]/None'>`: 库存处置结果或列表, 默认 `None` (不筛选), 可选值:
|
|
1126
|
+
|
|
1127
|
+
- `1`: 可用在途
|
|
1128
|
+
- `2`: 可用
|
|
1129
|
+
- `3`: 次品
|
|
1130
|
+
|
|
1131
|
+
:param offset `<'int/None'>`: 分页偏移量, 默认 `None` (使用: 0)
|
|
1132
|
+
:param length `<'int/None'>`: 分页长度, 默认 `None` (使用: 200)
|
|
1133
|
+
:returns `<'LedgerValuation'>`: 查询到的亚马逊库存价值台账结果
|
|
1134
|
+
```python
|
|
1135
|
+
{
|
|
1136
|
+
# 状态码
|
|
1137
|
+
"code": 0,
|
|
1138
|
+
# 提示信息
|
|
1139
|
+
"message": "success",
|
|
1140
|
+
# 错误信息
|
|
1141
|
+
"errors": [],
|
|
1142
|
+
# 请求ID
|
|
1143
|
+
"request_id": "",
|
|
1144
|
+
# 响应时间
|
|
1145
|
+
"response_time": "2025-08-13 19:23:04",
|
|
1146
|
+
# 响应数据量
|
|
1147
|
+
"response_count": 2,
|
|
1148
|
+
# 总数据量
|
|
1149
|
+
"total_count": 2,
|
|
1150
|
+
# 响应数据
|
|
1151
|
+
"data": [
|
|
1152
|
+
{
|
|
1153
|
+
"uid": "e1a1e****************",
|
|
1154
|
+
"transaction_type_code": "1",
|
|
1155
|
+
"transaction_type": "期初库存-FBA上月结存",
|
|
1156
|
+
"transaction_number": "",
|
|
1157
|
+
"transaction_reason": "",
|
|
1158
|
+
"source_numbers": "2025-05无源单入库,业务编号:FBA15K96M3KT,流水编号:20250500B0039T",
|
|
1159
|
+
"seller_name": "STORE-UK",
|
|
1160
|
+
"warehouse_name": "STORE-UK英国仓",
|
|
1161
|
+
"msku": "SKU*******",
|
|
1162
|
+
"lsku": "LOCAL*******",
|
|
1163
|
+
"balance_qty": 211,
|
|
1164
|
+
"purchase_unit_cost": 98.4179,
|
|
1165
|
+
"purchase_total_cost": 20766.18,
|
|
1166
|
+
"logistics_unit_cost": 0.0,
|
|
1167
|
+
"logistics_total_cost": 0.0,
|
|
1168
|
+
"other_unit_cost": 0.0,
|
|
1169
|
+
"other_total_cost": 0.0,
|
|
1170
|
+
"cost_source": "上月结存",
|
|
1171
|
+
"disposition": "可用",
|
|
1172
|
+
"source_data_time": "2025-09-10 00:14:30",
|
|
1173
|
+
"transaction_date": "2025-08-01",
|
|
1174
|
+
"data_version": "1757433678235",
|
|
1175
|
+
},
|
|
1176
|
+
...
|
|
1177
|
+
]
|
|
1178
|
+
}
|
|
1179
|
+
```
|
|
1180
|
+
"""
|
|
1181
|
+
url = route.LEDGER_VALUATION
|
|
1182
|
+
# 构建参数
|
|
1183
|
+
args = {
|
|
1184
|
+
"start_date": start_date,
|
|
1185
|
+
"end_date": end_date,
|
|
1186
|
+
"date_type": date_type,
|
|
1187
|
+
"transaction_types": transaction_types,
|
|
1188
|
+
"transaction_numbers": transaction_numbers,
|
|
1189
|
+
"source_numbers": source_numbers,
|
|
1190
|
+
"warehouse_names": warehouse_names,
|
|
1191
|
+
"seller_names": seller_names,
|
|
1192
|
+
"mskus": mskus,
|
|
1193
|
+
"lskus": lskus,
|
|
1194
|
+
"dispositions": dispositions,
|
|
1195
|
+
"offset": offset,
|
|
1196
|
+
"length": length,
|
|
1197
|
+
}
|
|
1198
|
+
try:
|
|
1199
|
+
p = param.LedgerValuation.model_validate(args)
|
|
1200
|
+
except Exception as err:
|
|
1201
|
+
raise errors.InvalidParametersError(err, url, args) from err
|
|
1202
|
+
|
|
1203
|
+
# 发送请求
|
|
1204
|
+
data = await self._request_with_sign("POST", url, body=p.model_dump_params())
|
|
1205
|
+
return schema.LedgerValuation.model_validate(data)
|
|
1206
|
+
|
|
1207
|
+
# . 亚马逊广告数据 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
1208
|
+
async def AdsInvoices(
|
|
1209
|
+
self,
|
|
1210
|
+
start_date: str | datetime.date | datetime.datetime,
|
|
1211
|
+
end_date: str | datetime.date | datetime.datetime,
|
|
1212
|
+
*,
|
|
1213
|
+
ads_type: ADS_TYPE | None = None,
|
|
1214
|
+
mids: int | list[int] | None = None,
|
|
1215
|
+
sids: int | list[int] | None = None,
|
|
1216
|
+
search_field: ADS_INVOICE_SEARCH_FIELD | None = None,
|
|
1217
|
+
search_value: str | None = None,
|
|
1218
|
+
offset: int | None = None,
|
|
1219
|
+
length: int | None = None,
|
|
1220
|
+
) -> schema.AdsInvoices:
|
|
1221
|
+
"""查询亚马逊广告发票信息
|
|
1222
|
+
|
|
1223
|
+
## Docs
|
|
1224
|
+
- 财务: [查询广告发票列表](https://apidoc.lingxing.com/#/docs/Finance/InvoiceList)
|
|
1225
|
+
|
|
1226
|
+
:param start_date `<'str/date/datetime'>`: 开具发票的开始日期, 参数来源: `AdsInvoice.invoice_date`
|
|
1227
|
+
:param end_date `<'str/date/datetime'>`: 开具发票的结束日期, 参数来源: `AdsInvoice.invoice_date`
|
|
1228
|
+
:param ads_type `<'int/None'>`: 广告类型, 默认 `None` (不筛选), 可选值:
|
|
1229
|
+
|
|
1230
|
+
- `'SP'`: 赞助产品广告 (Sponsored Products)
|
|
1231
|
+
- `'SB'`: 赞助品牌广告 (Sponsored Brands)
|
|
1232
|
+
- `'SBV'`: 赞助品牌视频广告 (Sponsored Brands Video)
|
|
1233
|
+
- `'SD'`: 赞助展示广告 (Sponsored Display)
|
|
1234
|
+
|
|
1235
|
+
:param mids `<'int/list[int]/None'>`: 领星站点ID或ID列表 (Seller.mid), 默认 `None` (不筛选)
|
|
1236
|
+
:param sids `<'int/list[int]/None'>`: 领星店铺ID或ID列表 (Seller.sid), 默认 `None` (不筛选)
|
|
1237
|
+
:param search_field `<'str/None'>`: 搜索字段, 默认 `None` (不筛选), 可选值:
|
|
1238
|
+
|
|
1239
|
+
- `'invoice_id'`: 广告发票编号
|
|
1240
|
+
- `'msku'`: 广告发票关联的亚马逊SKU
|
|
1241
|
+
- `'asin'`: 广告发票关联的商品ASIN
|
|
1242
|
+
- `'campaign_name'`: 广告发票关联的广告活动名称
|
|
1243
|
+
|
|
1244
|
+
:param search_value `<'str/None'>`: 搜索值, 默认 `None` (不筛选), 与 `search_field` 配合使用
|
|
1245
|
+
:param offset `<'int/None'>`: 分页偏移量, 默认 `None` (使用: 0)
|
|
1246
|
+
:param length `<'int/None'>`: 分页长度, 默认 `None` (使用: 20)
|
|
1247
|
+
```python
|
|
1248
|
+
{
|
|
1249
|
+
# 状态码
|
|
1250
|
+
"code": 0,
|
|
1251
|
+
# 提示信息
|
|
1252
|
+
"message": "success",
|
|
1253
|
+
# 错误信息
|
|
1254
|
+
"errors": [],
|
|
1255
|
+
# 请求ID
|
|
1256
|
+
"request_id": "",
|
|
1257
|
+
# 响应时间
|
|
1258
|
+
"response_time": "2025-08-13 19:23:04",
|
|
1259
|
+
# 响应数据量
|
|
1260
|
+
"response_count": 2,
|
|
1261
|
+
# 总数据量
|
|
1262
|
+
"total_count": 2,
|
|
1263
|
+
# 响应数据
|
|
1264
|
+
"data": [
|
|
1265
|
+
{
|
|
1266
|
+
# 领星店铺ID
|
|
1267
|
+
"sid": 1,
|
|
1268
|
+
# 领星店铺名称 [原字段 'store_name']
|
|
1269
|
+
"seller_name": "Store-DE",
|
|
1270
|
+
# 国家 (中文)
|
|
1271
|
+
"country": "德国",
|
|
1272
|
+
# 广告发票ID
|
|
1273
|
+
"invoice_id": "239**********",
|
|
1274
|
+
# 广告发票状态 [原字段 'status']
|
|
1275
|
+
"invoice_status": "PAID_IN_FULL",
|
|
1276
|
+
# 付款方式
|
|
1277
|
+
"payment_method": "UNIFIED_BILLING",
|
|
1278
|
+
# 广告花费 [原字段 'cost_amount']
|
|
1279
|
+
"ads_cost_amt": 504.75,
|
|
1280
|
+
# 税费 [原字段 'tax_amount']
|
|
1281
|
+
"tax_amt": 0.0,
|
|
1282
|
+
# 分摊费用 [原字段 'other_allocation_fee']
|
|
1283
|
+
# 总发票金额中扣除的其他费或税费,按此发票的花费占比分摊
|
|
1284
|
+
"allocation_amt": -0.35,
|
|
1285
|
+
# 广告发票总金额 [原字段 'amount']
|
|
1286
|
+
"invoice_amt": 504.4,
|
|
1287
|
+
# 账单周期开始日期 [原字段 'from_date']
|
|
1288
|
+
"billing_start_date": "2025-06-06",
|
|
1289
|
+
# 账单周期结束日期 [原字段 'to_date']
|
|
1290
|
+
"billing_end_date": "2025-06-13",
|
|
1291
|
+
# 广告发票开具日期
|
|
1292
|
+
"invoice_date": "2025-06-12",
|
|
1293
|
+
},
|
|
1294
|
+
...
|
|
1295
|
+
]
|
|
1296
|
+
}
|
|
1297
|
+
```
|
|
1298
|
+
"""
|
|
1299
|
+
url = route.ADS_INVOICES
|
|
1300
|
+
# 构建参数
|
|
1301
|
+
args = {
|
|
1302
|
+
"start_date": start_date,
|
|
1303
|
+
"end_date": end_date,
|
|
1304
|
+
"ads_type": ads_type,
|
|
1305
|
+
"mids": mids,
|
|
1306
|
+
"sids": sids,
|
|
1307
|
+
"search_field": search_field,
|
|
1308
|
+
"search_value": search_value,
|
|
1309
|
+
"offset": offset,
|
|
1310
|
+
"length": length,
|
|
1311
|
+
}
|
|
1312
|
+
try:
|
|
1313
|
+
p = param.AdsInvoices.model_validate(args)
|
|
1314
|
+
except Exception as err:
|
|
1315
|
+
raise errors.InvalidParametersError(err, url, args) from err
|
|
1316
|
+
|
|
1317
|
+
# 发送请求
|
|
1318
|
+
data = await self._request_with_sign("POST", url, body=p.model_dump_params())
|
|
1319
|
+
return schema.AdsInvoices.model_validate(data)
|
|
1320
|
+
|
|
1321
|
+
async def AdsInvoiceDetail(
|
|
1322
|
+
self, sid: int, invoice_id: str
|
|
1323
|
+
) -> schema.AdsInvoiceDetail:
|
|
1324
|
+
"""查询亚马逊广告发票详情
|
|
1325
|
+
|
|
1326
|
+
## Docs
|
|
1327
|
+
- 财务: [查询广告发票基本信息](https://apidoc.lingxing.com/#/docs/Finance/InvoiceDetail)
|
|
1328
|
+
|
|
1329
|
+
:param sid `<'int'>`: 领星店铺ID (Seller.sid)
|
|
1330
|
+
:param invoice_id `<'str'>`: 广告发票ID (AdsInvoice.invoice_id)
|
|
1331
|
+
:returns `<'AdsInvoiceDetail'>`: 查询到的亚马逊广告发票详情结果
|
|
1332
|
+
```python
|
|
1333
|
+
{
|
|
1334
|
+
# 状态码
|
|
1335
|
+
"code": 0,
|
|
1336
|
+
# 提示信息
|
|
1337
|
+
"message": "success",
|
|
1338
|
+
# 错误信息
|
|
1339
|
+
"errors": [],
|
|
1340
|
+
# 请求ID
|
|
1341
|
+
"request_id": "",
|
|
1342
|
+
# 响应时间
|
|
1343
|
+
"response_time": "2025-08-13 19:23:04",
|
|
1344
|
+
# 响应数据量
|
|
1345
|
+
"response_count": 1,
|
|
1346
|
+
# 总数据量
|
|
1347
|
+
"total_count": 1,
|
|
1348
|
+
# 响应数据
|
|
1349
|
+
"data": {
|
|
1350
|
+
# 广告发票ID
|
|
1351
|
+
"invoice_id": "2962*********",
|
|
1352
|
+
# 付款方式
|
|
1353
|
+
"payment_method": "UNIFIED_BILLING",
|
|
1354
|
+
# 广告发票总金额 [原字段 'amount']
|
|
1355
|
+
"invoice_amt": 512.77,
|
|
1356
|
+
# 币种代码
|
|
1357
|
+
"currency_code": "GBP",
|
|
1358
|
+
# 币种图标
|
|
1359
|
+
"currency_icon": "£",
|
|
1360
|
+
# 账单地址 [原字段 'address']
|
|
1361
|
+
"billing_address": "",
|
|
1362
|
+
# 账单周期开始日期 [原字段 'from_date']
|
|
1363
|
+
"billing_start_date": "2025-09-09",
|
|
1364
|
+
# 账单周期结束日期 [原字段 'to_date']
|
|
1365
|
+
"billing_end_date": "2025-09-10",
|
|
1366
|
+
# 广告发票开具日期
|
|
1367
|
+
"invoice_date": "2025-09-10",
|
|
1368
|
+
},
|
|
1369
|
+
}
|
|
1370
|
+
```
|
|
1371
|
+
"""
|
|
1372
|
+
url = route.ADS_INVOICE_DETAIL
|
|
1373
|
+
# 构建参数
|
|
1374
|
+
args = {
|
|
1375
|
+
"sid": sid,
|
|
1376
|
+
"invoice_id": invoice_id,
|
|
1377
|
+
}
|
|
1378
|
+
try:
|
|
1379
|
+
p = param.AdsInvoiceDetail.model_validate(args)
|
|
1380
|
+
except Exception as err:
|
|
1381
|
+
raise errors.InvalidParametersError(err, url, args) from err
|
|
1382
|
+
|
|
1383
|
+
# 发送请求
|
|
1384
|
+
data = await self._request_with_sign("POST", url, body=p.model_dump_params())
|
|
1385
|
+
return schema.AdsInvoiceDetail.model_validate(data)
|
|
1386
|
+
|
|
1387
|
+
async def AdsCampaignInvoices(
|
|
1388
|
+
self,
|
|
1389
|
+
sid: int,
|
|
1390
|
+
invoice_id: str,
|
|
1391
|
+
*,
|
|
1392
|
+
ads_type: ADS_TYPE | None = None,
|
|
1393
|
+
search_field: ADS_CAMPAIGN_INVOICE_SEARCH_FIELD | None = None,
|
|
1394
|
+
search_value: str | None = None,
|
|
1395
|
+
offset: int | None = None,
|
|
1396
|
+
length: int | None = None,
|
|
1397
|
+
) -> schema.AdsCampaignInvoices:
|
|
1398
|
+
"""查询亚马逊广告活动发票明细
|
|
1399
|
+
|
|
1400
|
+
## Docs
|
|
1401
|
+
- 财务: [查询广告发票活动列表](https://apidoc.lingxing.com/#/docs/Finance/InvoiceCampaignList)
|
|
1402
|
+
|
|
1403
|
+
:param sid `<'int'>`: 领星店铺ID (Seller.sid)
|
|
1404
|
+
:param invoice_id `<'str'>`: 广告发票ID (AdsInvoice.invoice_id)
|
|
1405
|
+
:param ads_type `<'int/None'>`: 广告类型, 默认 `None` (不筛选), 可选值:
|
|
1406
|
+
|
|
1407
|
+
- `'SP'`: 赞助产品广告 (Sponsored Products)
|
|
1408
|
+
- `'SB'`: 赞助品牌广告 (Sponsored Brands)
|
|
1409
|
+
- `'SBV'`: 赞助品牌视频广告 (Sponsored Brands Video)
|
|
1410
|
+
- `'SD'`: 赞助展示广告 (Sponsored Display)
|
|
1411
|
+
|
|
1412
|
+
:param search_field `<'str/None'>`: 搜索字段, 默认 `None` (不筛选), 可选值:
|
|
1413
|
+
|
|
1414
|
+
- `'item'`: 广告发票关联的商品, 如: 亚马逊SKU(SP/SD) 或 ASIN(SB/SBV)
|
|
1415
|
+
- `'campaign_name'`: 广告发票关联的广告活动名称
|
|
1416
|
+
|
|
1417
|
+
:param search_value `<'str/None'>`: 搜索值, 默认 `None` (不筛选), 与 `search_field` 配合使用
|
|
1418
|
+
:param offset `<'int/None'>`: 分页偏移量, 默认 `None` (使用: 0)
|
|
1419
|
+
:param length `<'int/None'>`: 分页长度, 默认 `None` (使用: 20)
|
|
1420
|
+
:returns `<'AdsCampaignInvoices'>`: 查询到的亚马逊广告活动发票明细结果
|
|
1421
|
+
```python
|
|
1422
|
+
{
|
|
1423
|
+
# 状态码
|
|
1424
|
+
"code": 0,
|
|
1425
|
+
# 提示信息
|
|
1426
|
+
"message": "success",
|
|
1427
|
+
# 错误信息
|
|
1428
|
+
"errors": [],
|
|
1429
|
+
# 请求ID
|
|
1430
|
+
"request_id": "",
|
|
1431
|
+
# 响应时间
|
|
1432
|
+
"response_time": "2025-08-13 19:23:04",
|
|
1433
|
+
# 响应数据量
|
|
1434
|
+
"response_count": 2,
|
|
1435
|
+
# 总数据量
|
|
1436
|
+
"total_count": 2,
|
|
1437
|
+
# 响应数据
|
|
1438
|
+
"data": [
|
|
1439
|
+
{
|
|
1440
|
+
# 广告活动ID
|
|
1441
|
+
"campaign_id": "8537**********",
|
|
1442
|
+
# 广告活动名称
|
|
1443
|
+
"campaign_name": "商品推广",
|
|
1444
|
+
# 广告数据来源 [原字段 'origin']
|
|
1445
|
+
"source": "业务报告",
|
|
1446
|
+
# 广告商品
|
|
1447
|
+
"items": ["SKU********"],
|
|
1448
|
+
# 广告类型 [原字段 'ads_type']
|
|
1449
|
+
"ad_type": "SPONSORED PRODUCTS",
|
|
1450
|
+
# 计价方式
|
|
1451
|
+
"price_type": "CPC",
|
|
1452
|
+
# 广告事件次数 [原字段 'cost_event_count']
|
|
1453
|
+
"event_count": 1,
|
|
1454
|
+
# 广告事件单次花费 [原字段 'cost_per_unit']
|
|
1455
|
+
"cost_per_event": 0.41,
|
|
1456
|
+
# 广告总花费 [原字段 'cost_amount']
|
|
1457
|
+
"cost_amt": 0.41,
|
|
1458
|
+
# 分摊费用 [原字段 'other_allocation_fee']
|
|
1459
|
+
"allocation_amt": 0.0,
|
|
1460
|
+
# 币种图标 [原字段 'currency_icon']
|
|
1461
|
+
"currency_icon": "€",
|
|
1462
|
+
},
|
|
1463
|
+
...
|
|
1464
|
+
]
|
|
1465
|
+
}
|
|
1466
|
+
```
|
|
1467
|
+
"""
|
|
1468
|
+
url = route.ADS_CAMPAIGN_INVOICES
|
|
1469
|
+
# 构建参数
|
|
1470
|
+
args = {
|
|
1471
|
+
"sid": sid,
|
|
1472
|
+
"invoice_id": invoice_id,
|
|
1473
|
+
"ads_type": ads_type,
|
|
1474
|
+
"search_field": search_field,
|
|
1475
|
+
"search_value": search_value,
|
|
1476
|
+
"offset": offset,
|
|
1477
|
+
"length": length,
|
|
1478
|
+
}
|
|
1479
|
+
try:
|
|
1480
|
+
p = param.AdsCampaignInvoices.model_validate(args)
|
|
1481
|
+
except Exception as err:
|
|
1482
|
+
raise errors.InvalidParametersError(err, url, args) from err
|
|
1483
|
+
|
|
1484
|
+
# 发送请求
|
|
1485
|
+
data = await self._request_with_sign("POST", url, body=p.model_dump_params())
|
|
1486
|
+
return schema.AdsCampaignInvoices.model_validate(data)
|
|
1487
|
+
|
|
1488
|
+
# . 亚马逊损益报告 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
1489
|
+
async def IncomeStatementSellers(
|
|
1490
|
+
self,
|
|
1491
|
+
start_date: str | datetime.date | datetime.datetime,
|
|
1492
|
+
end_date: str | datetime.date | datetime.datetime,
|
|
1493
|
+
*,
|
|
1494
|
+
query_dimension: int | None = None,
|
|
1495
|
+
mids: int | list[int] | None = None,
|
|
1496
|
+
sids: int | list[int] | None = None,
|
|
1497
|
+
transaction_status: INCOME_STATEMENT_TRANSACTION_STATUS | None = None,
|
|
1498
|
+
summarize: int | None = None,
|
|
1499
|
+
currency_code: str | None = None,
|
|
1500
|
+
offset: int | None = None,
|
|
1501
|
+
length: int | None = None,
|
|
1502
|
+
) -> schema.IncomeStatementSellers:
|
|
1503
|
+
"""查询损益报告-店铺维度
|
|
1504
|
+
|
|
1505
|
+
## Docs
|
|
1506
|
+
- 财务: [查询利润报表-店铺](https://apidoc.lingxing.com/#/docs/Finance/bdSeller)
|
|
1507
|
+
|
|
1508
|
+
:param start_date `<'str/date/datetime'>`: 统计开始日期, 闭合区间
|
|
1509
|
+
:param end_date `<'str/date/datetime'>`: 统计结束日期, 闭合区间
|
|
1510
|
+
:param query_dimension `<'int/None'>`: 查询维度, 默认 `None` (使用: 0), 可选值:
|
|
1511
|
+
|
|
1512
|
+
- `0`: 天维度, 开始和结束时间跨度不能超过31天
|
|
1513
|
+
- `1`: 月维度, 开始和结束时间跨度不能超过1个月
|
|
1514
|
+
|
|
1515
|
+
:param mids `<'int/list[int]/None'>`: 领星站点ID或ID列表 (Seller.mid), 默认 `None` (不筛选)
|
|
1516
|
+
:param sids `<'int/list[int]/None'>`: 领星店铺ID或ID列表 (Seller.sid), 默认 `None` (不筛选)
|
|
1517
|
+
:param transaction_status `<'int/None'>`: 交易状态, 默认 `None` (使用: 'Disbursed'), 可选值:
|
|
1518
|
+
|
|
1519
|
+
- `'Deferred'`: 订单未进入Transaction报告, 无法回款
|
|
1520
|
+
- `'Disbursed'`: 订单已进入Transaction报告, 可以回款
|
|
1521
|
+
- `'DisbursedAndSettled'`: 可以回款和预结算订单
|
|
1522
|
+
- `'All'`: 所有状态
|
|
1523
|
+
|
|
1524
|
+
:param summarize `<'int/None'>`: 是否返回汇总数据, 默认 `None` (使用: 0), 可选值:
|
|
1525
|
+
|
|
1526
|
+
- `0`: 返回原始数据
|
|
1527
|
+
- `1`: 返回汇总数据
|
|
1528
|
+
|
|
1529
|
+
:param currency_code `<'str/None'>`: 结算金额目标转换货币代码, 默认 `None` (保持原结算货币)
|
|
1530
|
+
:param offset `<'int/None'>`: 分页偏移量, 默认 `None` (使用: 0)
|
|
1531
|
+
:param length `<'int/None'>`: 分页长度, 最大值 10000, 默认 `None` (使用: 15)
|
|
1532
|
+
:returns `<'IncomeStatementSellers'>`: 查询到的损益报告-店铺维度结果
|
|
1533
|
+
```python
|
|
1534
|
+
{
|
|
1535
|
+
# 状态码
|
|
1536
|
+
"code": 0,
|
|
1537
|
+
# 提示信息
|
|
1538
|
+
"message": "success",
|
|
1539
|
+
# 错误信息
|
|
1540
|
+
"errors": [],
|
|
1541
|
+
# 请求ID
|
|
1542
|
+
"request_id": "",
|
|
1543
|
+
# 响应时间
|
|
1544
|
+
"response_time": "2025-08-13 19:23:04",
|
|
1545
|
+
# 响应数据量
|
|
1546
|
+
"response_count": 2,
|
|
1547
|
+
# 总数据量
|
|
1548
|
+
"total_count": 2,
|
|
1549
|
+
# 响应数据
|
|
1550
|
+
"data": [
|
|
1551
|
+
{
|
|
1552
|
+
# 币种代码 [原字段 'currencyCode']
|
|
1553
|
+
"currency_code": "USD",
|
|
1554
|
+
# 币种图标 [原字段 'currencyIcon']
|
|
1555
|
+
"currency_icon": "$",
|
|
1556
|
+
# 收入 - 总收入金额 [原字段 'grossProfitIncome']
|
|
1557
|
+
"total_income": 221568.35,
|
|
1558
|
+
# 收入 - 总销售金额 [原字段 'totalSalesAmount']
|
|
1559
|
+
"product_sales": 235906.05,
|
|
1560
|
+
# 收入 - 总销售数量 [原字段 'totalSalesQuantity']
|
|
1561
|
+
"product_sales_qty": 6715,
|
|
1562
|
+
# 收入 - 总销售退费 [原字段 'totalSalesRefunds']
|
|
1563
|
+
"product_sales_refunds": -11807.03,
|
|
1564
|
+
# 收入 - FBA销售金额 [原字段 'fbaSaleAmount']
|
|
1565
|
+
"fba_product_sales": 235906.05,
|
|
1566
|
+
# 收入 - FBA销售数量 [原字段 'fbaSalesQuantity']
|
|
1567
|
+
"fba_product_sales_qty": 6715,
|
|
1568
|
+
# 收入 - FBA销售退费 [原字段 'fbaSalesRefunds']
|
|
1569
|
+
"fba_product_sales_refunds": -11807.03,
|
|
1570
|
+
# 收入 - FBM销售金额 [原字段 'fbmSaleAmount']
|
|
1571
|
+
"fbm_product_sales": 0.0,
|
|
1572
|
+
# 收入 - FBM销售数量 [原字段 'fbmSalesQuantity']
|
|
1573
|
+
"fbm_product_sales_qty": 0,
|
|
1574
|
+
# 收入 - FBM销售退费 [原字段 'fbmSalesRefunds']
|
|
1575
|
+
"fbm_product_sales_refunds": 0.0,
|
|
1576
|
+
# 收入 - FBA库存赔付/补偿金额 [原字段 'fbaInventoryCredit']
|
|
1577
|
+
"fba_inventory_credits": 3483.66,
|
|
1578
|
+
# 收入 - FBA库存赔付/补偿数量 [原字段 'fbaInventoryCreditQuantity']
|
|
1579
|
+
"fba_inventory_credit_qty": 169,
|
|
1580
|
+
# 收入 - FBA清算收益金额 [原字段 'fbaLiquidationProceeds']
|
|
1581
|
+
"fba_liquidation_proceeds": 0.0,
|
|
1582
|
+
# 收入 - FBA清算收益调整金额 [原字段 'fbaLiquidationProceedsAdjustments']
|
|
1583
|
+
"fba_liquidation_proceeds_adj": 0.0,
|
|
1584
|
+
# 收入 - 配送运费收入金额 (买家支出) [原字段 'shippingCredits']
|
|
1585
|
+
"shipping_credits": 6595.82,
|
|
1586
|
+
# 收入 - 配送运费退款金额 (买家收入) [原字段 'shippingCreditRefunds']
|
|
1587
|
+
"shipping_credit_refunds": -354.16,
|
|
1588
|
+
# 收入 - 礼品包装费收入金额 (买家支出) [原字段 'giftWrapCredits']
|
|
1589
|
+
"giftwrap_credits": 0.0,
|
|
1590
|
+
# 收入 - 礼品包装费退款金额 (买家收入) [原字段 'giftWrapCreditRefunds']
|
|
1591
|
+
"giftwrap_credit_refunds": 0.0,
|
|
1592
|
+
# 收入 - 促销折扣金额 (卖家支出) [原字段 'promotionalRebates']
|
|
1593
|
+
"promotional_rebates": -12777.02,
|
|
1594
|
+
# 收入 - 促销折扣退款金额 (卖家收入) [原字段 'promotionalRebateRefunds']
|
|
1595
|
+
"promotional_rebate_refunds": 521.03,
|
|
1596
|
+
# 收入 - A-to-Z 保障/索赔金额 [原字段 'guaranteeClaims']
|
|
1597
|
+
"a2z_guarantee_claims": 0.0,
|
|
1598
|
+
# 收入 - 拒付金额 (拒付造成的让利(发生时为负数)) [原字段 'chargebacks']
|
|
1599
|
+
"chargebacks": 0.0,
|
|
1600
|
+
# 收入 - 亚马逊运费补偿金额 [原字段 'amazonShippingReimbursement']
|
|
1601
|
+
"amazon_shipping_reimbursement": 0.0,
|
|
1602
|
+
# 收入 - 亚马逊安全运输计划补偿金额 [原字段 'safeTReimbursement']
|
|
1603
|
+
"safe_t_reimbursement": 0.0,
|
|
1604
|
+
# 收入 - 其他补偿/赔付金额 [原字段 'reimbursements']
|
|
1605
|
+
"other_reimbursement": 0.0,
|
|
1606
|
+
# 收入 - 积分发放金额 (日本站) [原字段 'costOfPoIntegersGranted']
|
|
1607
|
+
"points_granted": 0.0,
|
|
1608
|
+
# 收入 - 积分退还金额 (日本站) [原字段 'costOfPoIntegersReturned']
|
|
1609
|
+
"points_returned": 0.0,
|
|
1610
|
+
# 收入 - 积分调整金额 (日本站) [原字段 'pointsAdjusted']
|
|
1611
|
+
"points_adjusted": 0.0,
|
|
1612
|
+
# 收入 - 货到付款金额 (COD) [原字段 'cashOnDelivery']
|
|
1613
|
+
"cash_on_delivery": 0.0,
|
|
1614
|
+
# 收入 - NetCo混合网络交易金额 [原字段 'netcoTransaction']
|
|
1615
|
+
"netco_transaction": 0.0,
|
|
1616
|
+
# 收入 - 收回/冲回金额
|
|
1617
|
+
"clawbacks": 0.0,
|
|
1618
|
+
# 收入 - 其他收入金额 [原字段 'otherInAmount']
|
|
1619
|
+
"other_income": 0.0,
|
|
1620
|
+
# 支出 - FBA销售佣金 (Referral Fee) [原字段 'platformFee']
|
|
1621
|
+
"fba_selling_fees": -19936.57,
|
|
1622
|
+
# 支出 - FBA销售佣金退款金额 [原字段 'sellingFeeRefunds']
|
|
1623
|
+
"fba_selling_fee_refunds": 1095.17,
|
|
1624
|
+
# 支出 - FBA总配送费用 [原字段 'totalFbaDeliveryFee']
|
|
1625
|
+
# (fba_fulfillment_fees + mcf_fulfillment_fees)
|
|
1626
|
+
"fba_transaction_fees": -23814.6,
|
|
1627
|
+
# 支付 - FBA配送费用 (Fulfillment Fee) [原字段 'fbaDeliveryFee']
|
|
1628
|
+
"fba_fulfillment_fees": -23769.11,
|
|
1629
|
+
# 支出 - FBA多渠道配送费用 (Multi-Channel) [原字段 'mcFbaDeliveryFee']
|
|
1630
|
+
"fba_mcf_fulfillment_fees": -45.49,
|
|
1631
|
+
# 支出 - FBA多渠道配送数量 (Multi-Channel) [原字段 'mcFbaFulfillmentFeesQuantity']
|
|
1632
|
+
"fba_mcf_fulfillment_qty": 7,
|
|
1633
|
+
# 支出 - FBA总配送费用退款金额 [原字段 'fbaTransactionFeeRefunds']
|
|
1634
|
+
"fba_transaction_fee_refunds": 120.94,
|
|
1635
|
+
# 支出 - 其他交易费用 [原字段 'otherTransactionFees']
|
|
1636
|
+
"other_transaction_fees": 0.0,
|
|
1637
|
+
# 支出 - 其他交易费用退款金额 [原字段 'otherTransactionFeeRefunds']
|
|
1638
|
+
"other_transaction_fee_refunds": 0.0,
|
|
1639
|
+
# 支出 - FBA仓储和入库服务总费用 [原字段 'totalStorageFee']
|
|
1640
|
+
"fba_inventory_and_inbound_services_fees": -484.25,
|
|
1641
|
+
# ('fba_storage_fees' 到 'awd_satellite_storage_fees_alloc' 之间的所有费用)
|
|
1642
|
+
# 支出 - FBA仓储费用 [原字段 'fbaStorageFee']
|
|
1643
|
+
"fba_storage_fees": -151.64,
|
|
1644
|
+
# 支出 - FBA仓储费用计提金额 [原字段 'fbaStorageFeeAccrual']
|
|
1645
|
+
"fba_storage_fees_accr": 0.0,
|
|
1646
|
+
# 支出 - FBA仓储费用计提调整金额 [原字段 'fbaStorageFeeAccrualDifference']
|
|
1647
|
+
"fba_storage_fees_accr_adj": 0.0,
|
|
1648
|
+
# 支出 - FBA仓储费用 (分摊) [原字段 'sharedFbaStorageFee']
|
|
1649
|
+
"fba_storage_fees_alloc": 0.01,
|
|
1650
|
+
# 支出 - FBA长期仓储费用 [原字段 'longTermStorageFee']
|
|
1651
|
+
"fba_lt_storage_fees": 0.0,
|
|
1652
|
+
# 支出 - FBA长期仓储费用计提金额 [原字段 'longTermStorageFeeAccrual']
|
|
1653
|
+
"fba_lt_storage_fees_accr": 0.0,
|
|
1654
|
+
# 支出 - FBA长期仓储费用计提调整金额 [原字段 'longTermStorageFeeAccrualDifference']
|
|
1655
|
+
"fba_lt_storage_fees_accr_adj": 0.0,
|
|
1656
|
+
# 支出 - FBA长期仓储费用 (分摊) [原字段 'sharedLongTermStorageFee']
|
|
1657
|
+
"fba_lt_storage_fees_alloc": 0.0,
|
|
1658
|
+
# 支出 - FBA仓储超储费用 (分摊) [原字段 'sharedFbaOverageFee']
|
|
1659
|
+
"fba_overage_fees_alloc": 0.0,
|
|
1660
|
+
# 支出 - FBA仓储续期费用 (分摊) [原字段 'sharedStorageRenewalBilling']
|
|
1661
|
+
"fba_storage_renewal_fees_alloc": 0.0,
|
|
1662
|
+
# 支出 - FBA仓鼠销毁费用 (分摊) [原字段 'sharedFbaDisposalFee']
|
|
1663
|
+
"fba_disposal_fees_alloc": -2.08,
|
|
1664
|
+
# 支出 - FBA仓储销毁数量 [原字段 'disposalQuantity']
|
|
1665
|
+
"fba_disposal_qty": 0,
|
|
1666
|
+
# 支出 - FBA仓储移除费用 (分摊) [原字段 'sharedFbaRemovalFee']
|
|
1667
|
+
"fba_removal_fees_alloc": -330.54,
|
|
1668
|
+
# 支出 - FBA仓储移除数量 [原字段 'removalQuantity']
|
|
1669
|
+
"fba_removal_qty": 315,
|
|
1670
|
+
# 支出 - FBA入库运输计划费用 (分摊) [原字段 'sharedFbaInboundTransportationProgramFee']
|
|
1671
|
+
"fba_inbound_transportation_program_fees_alloc": 0.0,
|
|
1672
|
+
# 支出 - FBA入库便利费用 (分摊) [原字段 'sharedFbaInboundConvenienceFee']
|
|
1673
|
+
"fba_inbound_convenience_fees_alloc": 0.0,
|
|
1674
|
+
# 支出 - FBA入库缺陷费用 (分摊) [原字段 'sharedFbaInboundDefectFee']
|
|
1675
|
+
"fba_inbound_defect_fees_alloc": 0.0,
|
|
1676
|
+
# 支出 - FBA国际入库费用 (分摊) [原字段 'sharedFbaIntegerernationalInboundFee']
|
|
1677
|
+
"fba_international_inbound_fees_alloc": 0.0,
|
|
1678
|
+
# 支出 - FBA合作承运商(入库)运费 (分摊) [原字段 'sharedAmazonPartneredCarrierShipmentFee']
|
|
1679
|
+
"fba_partnered_carrier_shipment_fees_alloc": 0.0,
|
|
1680
|
+
# 支出 - FBA客户退货处理费用 (分摊) [原字段 'sharedFbaCustomerReturnFee']
|
|
1681
|
+
"fba_customer_return_fees_alloc": 0.0,
|
|
1682
|
+
# 支出 - FBA交易退货处理费用 (分摊) [原字段 'sharedFbaTransactionCustomerReturnFee']
|
|
1683
|
+
"fba_transaction_return_fees_alloc": 0.0,
|
|
1684
|
+
# 支出 - FBA人工处理费用 (分摊) [原字段 'sharedManualProcessingFee']
|
|
1685
|
+
"fba_manual_processing_fees_alloc": 0.0,
|
|
1686
|
+
# 支出 - FBA贴标费用 (分摊) [原字段 'sharedLabelingFee']
|
|
1687
|
+
"fba_labeling_fees_alloc": 0.0,
|
|
1688
|
+
# 支出 - FBA塑封袋费用 (分摊) [原字段 'sharedPolybaggingFee']
|
|
1689
|
+
"fba_polybagging_fees_alloc": 0.0,
|
|
1690
|
+
# 支出 - FBA气泡膜费用 (分摊) [原字段 'sharedBubblewrapFee']
|
|
1691
|
+
"fba_bubblewrap_fees_alloc": 0.0,
|
|
1692
|
+
# 支出 - FBA封箱胶带费用 (分摊) [原字段 'sharedTapingFee']
|
|
1693
|
+
"fba_taping_fees_alloc": 0.0,
|
|
1694
|
+
# 支出 - FBA库存费用调整金额 (分摊) [原字段 'sharedItemFeeAdjustment']
|
|
1695
|
+
"fba_inventory_fees_adj_alloc": 0.0,
|
|
1696
|
+
# 支出 - FBA其他库存费用 (分摊) [原字段 'sharedOtherFbaInventoryFees']
|
|
1697
|
+
"other_fba_inventory_fees_alloc": 0.0,
|
|
1698
|
+
# 支出 - AWD仓储费用 (分摊) [原字段 'sharedAwdStorageFee']
|
|
1699
|
+
"awd_storage_fees_alloc": 0.0,
|
|
1700
|
+
# 支出 - AWD处理费用 (分摊) [原字段 'sharedAwdProcessingFee']
|
|
1701
|
+
"awd_processing_fees_alloc": 0.0,
|
|
1702
|
+
# 支出 - AWD运输费用 (分摊) [原字段 'sharedAwdTransportationFee']
|
|
1703
|
+
"awd_transportation_fees_alloc": 0.0,
|
|
1704
|
+
# 支出 - AWD卫星仓储费用 (分摊) [原字段 'sharedStarStorageFee']
|
|
1705
|
+
"awd_satellite_storage_fees_alloc": 0.0,
|
|
1706
|
+
# 支出 - 运输标签花费金额 [原字段 'shippingLabelPurchases']
|
|
1707
|
+
"shipping_label_purchases": 0.0,
|
|
1708
|
+
# 支出 - 运输标签退款金额 [原字段 'shippingLabelRefunds']
|
|
1709
|
+
"shipping_label_refunds": 0.0,
|
|
1710
|
+
# 支出 - 承运商运输标签花费调整金额 [原字段 'sharedCarrierShippingLabelAdjustments']
|
|
1711
|
+
"carrier_shipping_label_adj": 0.0,
|
|
1712
|
+
# 支出 - 总推广费用 (Service Fee) [原字段 'promotionFee']
|
|
1713
|
+
"promotion_fees": -679.97,
|
|
1714
|
+
# (subscription_fees_alloc + coupon_fees_alloc + deal_fees_alloc + vine_fees_alloc + early_reviewer_program_fees_alloc)
|
|
1715
|
+
# 支出 - 订阅服务费 (分摊) [原字段 'sharedSubscriptionFee']
|
|
1716
|
+
"subscription_fees_alloc": -39.99,
|
|
1717
|
+
# 支出 - 优惠券费用 (分摊) [原字段 'sharedCouponFee']
|
|
1718
|
+
"coupon_fees_alloc": -239.98,
|
|
1719
|
+
# 支出 - 秒杀费用 (分摊) [原字段 'sharedLdFee']
|
|
1720
|
+
"deal_fees_alloc": 0.0,
|
|
1721
|
+
# 支出 - Vine费用 (分摊) [原字段 'sharedVineFee']
|
|
1722
|
+
"vine_fees_alloc": -400.0,
|
|
1723
|
+
# 支出 - 早期评论人计划费用 (分摊) [原字段 'sharedEarlyReviewerProgramFee']
|
|
1724
|
+
"early_reviewer_program_fees_alloc": 0.0,
|
|
1725
|
+
# 支出 - 其他亚马逊服务费用 (分摊) (Service Fee) [原字段 'totalPlatformOtherFee']
|
|
1726
|
+
"other_service_fees_alloc": -1733.33,
|
|
1727
|
+
# 支出 - 亚马逊退款管理费用 [原字段 'refundAdministrationFees']
|
|
1728
|
+
"refund_administration_fees": -219.15,
|
|
1729
|
+
# 支出 - 总费用退款金额 [totalFeeRefunds]
|
|
1730
|
+
# (fba_selling_fee_refunds + fba_transaction_fee_refunds + refund_administration_fees)
|
|
1731
|
+
"total_fee_refunds": 996.96,
|
|
1732
|
+
# 支出 - 其他费用调整金额
|
|
1733
|
+
"adjustments": -163.14,
|
|
1734
|
+
# 支出 - 广告总花费 (Cost of Advertising) [原字段 'totalAdsCost']
|
|
1735
|
+
# (ads_sp_cost + ads_sb_cost + ads_sbv_cost + ads_sd_cost)
|
|
1736
|
+
"ads_cost": -27743.22,
|
|
1737
|
+
# 支出 - 广告总销售金额 [原字段 'totalAdsSales']
|
|
1738
|
+
"ads_sales": 142803.87,
|
|
1739
|
+
# 支出 - 广告总销售数量 [原字段 'totalAdsSalesQuantity']
|
|
1740
|
+
"ads_sales_qty": 3333,
|
|
1741
|
+
# 支出 - SP广告花费 (Sponsored Products) [原字段 'adsSpCost']
|
|
1742
|
+
"ads_sp_cost": -22291.36,
|
|
1743
|
+
# 支出 - SP广告销售金额 [原字段 'adsSpSales']
|
|
1744
|
+
"ads_sp_sales": 97531.25,
|
|
1745
|
+
# 支出 - SP广告销售数量 [原字段 'adsSpSalesQuantity']
|
|
1746
|
+
"ads_sp_sales_qty": 2305,
|
|
1747
|
+
# 支出 - SB广告花费 (Sponsored Brands) [原字段 'adsSbCost']
|
|
1748
|
+
"ads_sb_cost": -5451.86,
|
|
1749
|
+
# 支出 - SB广告销售金额 [原字段 'sharedAdsSbSales']
|
|
1750
|
+
"ads_sb_sales": 25464.72,
|
|
1751
|
+
# 支出 - SB广告销售数量 [原字段 'sharedAdsSbSalesQuantity']
|
|
1752
|
+
"ads_sb_sales_qty": 552,
|
|
1753
|
+
# 支出 - SBV广告花费 (Sponsored Brands Video) [原字段 'adsSbvCost']
|
|
1754
|
+
"ads_sbv_cost": 0.0,
|
|
1755
|
+
# 支出 - SBV广告销售金额 [原字段 'sharedAdsSbvSales']
|
|
1756
|
+
"ads_sbv_sales": 19807.9,
|
|
1757
|
+
# 支出 - SBV广告销售数量 [原字段 'sharedAdsSbvSalesQuantity']
|
|
1758
|
+
"ads_sbv_sales_qty": 476,
|
|
1759
|
+
# 支出 - SD广告花费 (Sponsored Display) [原字段 'adsSdCost']
|
|
1760
|
+
"ads_sd_cost": 0.0,
|
|
1761
|
+
# 支出 - SD广告销售金额 [原字段 'adsSdSales']
|
|
1762
|
+
"ads_sd_sales": 0.0,
|
|
1763
|
+
# 支出 - SD广告销售数量 [原字段 'adsSdSalesQuantity']
|
|
1764
|
+
"ads_sd_sales_qty": 0,
|
|
1765
|
+
# 支出 - 广告分摊费用 [原字段 'sharedCostOfAdvertising']
|
|
1766
|
+
"ads_cost_alloc": 0.0,
|
|
1767
|
+
# 支出 - 广告总退款金额 (Refund for Advertiser) [原字段 'refundForAdvertiser']
|
|
1768
|
+
"ads_cost_refunds": 0.0,
|
|
1769
|
+
# 支出 - 清算服务费 (分摊) [原字段 'sharedLiquidationsFees']
|
|
1770
|
+
"liquidation_service_fees_alloc": 0.0,
|
|
1771
|
+
# 支出 - 其他支出费用 [原字段 'others']
|
|
1772
|
+
"other_expenses": 0.0,
|
|
1773
|
+
# 支出 - 用户自定义推广总费用 [原字段 'customOrderFee']
|
|
1774
|
+
"user_promotion_fees": 0.0,
|
|
1775
|
+
# (user_promotion_principal + user_promotion_commission)
|
|
1776
|
+
# 支出 - 用户自定义推广费用本金 [原字段 'customOrderFeePrincipal']
|
|
1777
|
+
"user_promotion_principal": 0.0,
|
|
1778
|
+
# 支出 - 用户自定义推广佣金费用 [原字段 'customOrderFeeCommission']
|
|
1779
|
+
"user_promotion_commission": 0.0,
|
|
1780
|
+
# 支出 - 用户自定义其他费用 [原字段 'otherFeeStr']
|
|
1781
|
+
"user_other_fees": [],
|
|
1782
|
+
# 税费 - 总税费 [grossProfitTax]
|
|
1783
|
+
"total_tax": 0.0,
|
|
1784
|
+
# 税费 - 总销税收金额 [原字段 'totalSalesTax']
|
|
1785
|
+
# ('product_tax_collected' 到 'tcs_cgst_collected' 之间的所有税费)
|
|
1786
|
+
"sales_tax_collected": 15036.42,
|
|
1787
|
+
# 税费 - 商品销售税收金额 [原字段 'taxCollectedProduct']
|
|
1788
|
+
"product_tax_collected": 15006.18,
|
|
1789
|
+
# 税费 - 配送运费税收金额 [原字段 'taxCollectedShipping']
|
|
1790
|
+
"shipping_tax_collected": 18.58,
|
|
1791
|
+
# 税费 - 礼品包装税收金额 [原字段 'taxCollectedGiftWrap']
|
|
1792
|
+
"giftwrap_tax_collected": 0.0,
|
|
1793
|
+
# 税费 - 促销折扣税收金额 [原字段 'taxCollectedDiscount']
|
|
1794
|
+
"promotional_rebate_tax_collected": 0.0,
|
|
1795
|
+
# 税费 - VAT/GST税收金额 [原字段 'taxCollected']
|
|
1796
|
+
"vat_gst_tax_collected": 11.66,
|
|
1797
|
+
# 税费 - TCS IGST税收金额 (印度站) [原字段 'tcsIgstCollected']
|
|
1798
|
+
"tcs_igst_collected": 0.0,
|
|
1799
|
+
# 税费 - TCS SGST税收金额 (印度站) [原字段 'tcsSgstCollected']
|
|
1800
|
+
"tcs_sgst_collected": 0.0,
|
|
1801
|
+
# 税费 - TCS CGST税收金额 (印度站) [原字段 'tcsCgstCollected']
|
|
1802
|
+
"tcs_cgst_collected": 0.0,
|
|
1803
|
+
# 税费 - 总销售税代扣金额 [原字段 'salesTaxWithheld']
|
|
1804
|
+
"sales_tax_withheld": -15036.42,
|
|
1805
|
+
# 税费 - 总销售税费退款 [salesTaxRefund]
|
|
1806
|
+
"sales_tax_refunded": -784.31,
|
|
1807
|
+
# ('product_tax_refunded' 到 'sales_tax_withheld_refunded' 之间的所有税费退款)
|
|
1808
|
+
# 税费 - 商品销售税费退款金额 [原字段 'taxRefundedProduct']
|
|
1809
|
+
"product_tax_refunded": -783.0,
|
|
1810
|
+
# 税费 - 配送运费税费退款金额 [原字段 'taxRefundedShipping']
|
|
1811
|
+
"shipping_tax_refunded": -1.31,
|
|
1812
|
+
# 税费 - 礼品包装税费退款金额 [原字段 'taxRefundedGiftWrap']
|
|
1813
|
+
"giftwrap_tax_refunded": 0.0,
|
|
1814
|
+
# 税费 - 促销折扣税费退款金额 [原字段 'taxRefundedDiscount']
|
|
1815
|
+
"promotional_rebate_tax_refunded": 0.0,
|
|
1816
|
+
# 税费 - VAT/GST税费退款金额 [原字段 'taxRefunded']
|
|
1817
|
+
"vat_gst_tax_refunded": 0.0,
|
|
1818
|
+
# 税费 - TCS IGST税费退款金额 (印度站) [原字段 'tcsIgstRefunded']
|
|
1819
|
+
"tcs_igst_refunded": 0.0,
|
|
1820
|
+
# 税费 - TCS SGST税费退款金额 (印度站) [原字段 'tcsSgstRefunded']
|
|
1821
|
+
"tcs_sgst_refunded": 0.0,
|
|
1822
|
+
# 税费 - TCS CGST税费退款金额 (印度站) [原字段 'tcsCgstRefunded']
|
|
1823
|
+
"tcs_cgst_refunded": 0.0,
|
|
1824
|
+
# 税费 - 总退款税代扣金额 [原字段 'refundTaxWithheld']
|
|
1825
|
+
"refund_tax_withheld": 784.31,
|
|
1826
|
+
# 税费 - VAT进项税费金额 [原字段 'sharedComminglingVatIncome']
|
|
1827
|
+
"commingling_vat_income": 0.0,
|
|
1828
|
+
# 税费 - VAT销项税费金额 [原字段 'sharedComminglingVatExpenses']
|
|
1829
|
+
"commingling_vat_expenses": 0.0,
|
|
1830
|
+
# 税费 - TDS 194-O净额 (印度站) [原字段 'tdsSection194ONet']
|
|
1831
|
+
"tds_section_194o_net": 0.0,
|
|
1832
|
+
# 税费 - 其他税费调整 (分摊) [原字段 'sharedTaxAdjustment']
|
|
1833
|
+
"other_tax_adj_alloc": 0.0,
|
|
1834
|
+
# 成本 - 总退款数量 [原字段 'refundsQuantity']
|
|
1835
|
+
"total_refunds_qty": 329,
|
|
1836
|
+
# 成本 - 总退款率 [原字段 'refundsRate']
|
|
1837
|
+
# (total_refund_qty / (fba&fbm_product_sales_qty + fba_mcf_fulfillment_qty + fba_reshipment_qty))
|
|
1838
|
+
"total_refunds_rate": 0.0486,
|
|
1839
|
+
# 成本 - FBA退货数量 [原字段 'fbaReturnsQuantity']
|
|
1840
|
+
"fba_returns_qty": 363,
|
|
1841
|
+
# 成本 - FBA退货可售数量 [原字段 'fbaReturnsSaleableQuantity']
|
|
1842
|
+
"fba_returns_saleable_qty": 12,
|
|
1843
|
+
# 成本 - FBA退货不可售数量 [原字段 'fbaReturnsUnsaleableQuantity']
|
|
1844
|
+
"fba_returns_unsaleable_qty": 351,
|
|
1845
|
+
# 成本 - FBA退货率 [原字段 'fbaReturnsQuantityRate']
|
|
1846
|
+
# (fba_returns_qty / (fba_product_sales_qty + fba_mcf_fulfillment_qty))
|
|
1847
|
+
"fba_returns_rate": 0.054,
|
|
1848
|
+
# 成本 - 总补发/换货数量 [原字段 'totalReshipQuantity']
|
|
1849
|
+
"total_reshipment_qty": 50,
|
|
1850
|
+
# 成本 - FBA补发/换货数量 [原字段 'reshipFbaProductSalesQuantity']
|
|
1851
|
+
"fba_reshipment_qty": 47,
|
|
1852
|
+
# 成本 - FBA换货退回数量 [原字段 'reshipFbaProductSaleRefundsQuantity']
|
|
1853
|
+
"fba_reshipment_returned_qty": 3,
|
|
1854
|
+
# 成本 - FBM补发/换货数量 [原字段 'reshipFbmProductSalesQuantity']
|
|
1855
|
+
"fbm_reshipment_qty": 0,
|
|
1856
|
+
# 成本 - FBM换货退回数量 [原字段 'reshipFbmProductSaleRefundsQuantity']
|
|
1857
|
+
"fbm_reshipment_returned_qty": 0,
|
|
1858
|
+
# 成本 - 总成本数量 [原字段 'cgQuantity']
|
|
1859
|
+
# (fba&fbm_product_sales_qty + fba_mcf_fulfillment_qty + fba&fbm_reshipment_qty - fba_returns_saleable_qty)
|
|
1860
|
+
"cost_of_goods_qty": -6757,
|
|
1861
|
+
# 成本 - 总成本金额 (COGS) [原字段 'totalCost']
|
|
1862
|
+
# (purchase_cost + logistics_cost + other_costs)
|
|
1863
|
+
"cost_of_goods": -100790.7,
|
|
1864
|
+
# 成本 - 总成本占比 [原字段 'proportionOfTotalCost']
|
|
1865
|
+
"cost_of_goods_ratio": 0.4272,
|
|
1866
|
+
# 成本 - 总采购成本 (COGS) [原字段 'cgPriceTotal']
|
|
1867
|
+
"purchase_cost": -100790.7,
|
|
1868
|
+
# 成本 - 单品成本 [原字段 'cgUnitPrice']
|
|
1869
|
+
"purchase_unit_cost": 14.93,
|
|
1870
|
+
# 成本 - 采购成本占比 [原字段 'proportionOfCg']
|
|
1871
|
+
"purchase_cost_ratio": 0.4272,
|
|
1872
|
+
# 成本 - 是否有成本明细 [原字段 'hasCgPriceDetail']
|
|
1873
|
+
"has_purchase_cost_detail": 1,
|
|
1874
|
+
# 成本 - 总物流费用 [原字段 'cgTransportCostsTotal']
|
|
1875
|
+
"logistics_cost": 0.0,
|
|
1876
|
+
# 成本 - 物流单品费用 [原字段 'cgTransportUnitCosts']
|
|
1877
|
+
"logistics_unit_cost": 0.0,
|
|
1878
|
+
# 成本 - 物流费用占比 [原字段 'proportionOfCgTransport']
|
|
1879
|
+
"logistics_cost_ratio": 0.0,
|
|
1880
|
+
# 成本 - 是否有物流费用明细 [原字段 'hasCgTransportCostsDetail']
|
|
1881
|
+
"has_logistics_cost_detail": 1,
|
|
1882
|
+
# 成本 - 其他费用总金额 [原字段 'cgOtherCostsTotal']
|
|
1883
|
+
"other_costs": 0.0,
|
|
1884
|
+
# 成本 - 其他费用单品金额 [原字段 'cgOtherUnitCosts']
|
|
1885
|
+
"other_unit_cost": 0.0,
|
|
1886
|
+
# 成本 - 其他费用占比 [原字段 'proportionOfCgOtherCosts']
|
|
1887
|
+
"other_cost_ratio": 0.0,
|
|
1888
|
+
# 成本 - 是否有其他费用明细 [原字段 'hasCgOtherCostsDetail']
|
|
1889
|
+
"has_other_cost_detail": 0,
|
|
1890
|
+
# 利润 - 毛利润 [原字段 'grossProfit']
|
|
1891
|
+
"gross_profit": 47219.53,
|
|
1892
|
+
# 利润 - 毛利率 [原字段 'grossRate']
|
|
1893
|
+
"gross_profit_margin": 0.2131,
|
|
1894
|
+
# 利润 - 投资回报率 (ROI)
|
|
1895
|
+
"roi": 0.2693,
|
|
1896
|
+
# 交易状态 [原字段 'transactionStatusCode']
|
|
1897
|
+
"transaction_status": "Disbursed",
|
|
1898
|
+
# 交易状态描述 [原字段 'transactionStatus']
|
|
1899
|
+
"transaction_status_desc": "已发放",
|
|
1900
|
+
# 延迟结算状态 [原字段 'deferredSubStatusCode']
|
|
1901
|
+
"deferred_settlement_status": "Disbursed",
|
|
1902
|
+
# 延迟结算状态描述 [原字段 'deferredSubStatus']
|
|
1903
|
+
"deferred_settlement_status_desc": "",
|
|
1904
|
+
# 延迟结算总金额 [原字段 'deferredSettlementAmount']
|
|
1905
|
+
"deferred_settlement": 186019.17,
|
|
1906
|
+
# 结算小计 [原字段 'settlementSubtotal']
|
|
1907
|
+
"settlement_subtotal": 186019.17,
|
|
1908
|
+
# 报告时间 (本地时间) [原字段 'postedDateDayLocale']
|
|
1909
|
+
"report_time_loc": "",
|
|
1910
|
+
# 报告开始时间 (本地时间) [原字段 'minPostedDateDayLocale']
|
|
1911
|
+
"report_start_time_loc": "",
|
|
1912
|
+
# 报告结束时间 (本地时间) [原字段 'maxPostedDateDayLocale']
|
|
1913
|
+
"report_end_time_loc": "",
|
|
1914
|
+
# 报告日期 (本地时间) [原字段 'postedDateLocale']
|
|
1915
|
+
"report_date_loc": "2025-08",
|
|
1916
|
+
# 领星店铺ID
|
|
1917
|
+
"sid": 1,
|
|
1918
|
+
# 领星店铺名称 [原字段 'storeName']
|
|
1919
|
+
"seller_name": "Store-US",
|
|
1920
|
+
# 国家 (中文)
|
|
1921
|
+
"country": "美国",
|
|
1922
|
+
# 国家代码 [原字段 'countryCode']
|
|
1923
|
+
"country_code": "US",
|
|
1924
|
+
# 店铺负责人名称 (逗号隔开) [原字段 'sellerPrincipalRealname']
|
|
1925
|
+
"operator_names": "白小白,黑小黑",
|
|
1926
|
+
},
|
|
1927
|
+
...
|
|
1928
|
+
]
|
|
1929
|
+
}
|
|
1930
|
+
```
|
|
1931
|
+
"""
|
|
1932
|
+
url = route.INCOME_STATEMENT_SELLERS
|
|
1933
|
+
# 构建参数
|
|
1934
|
+
args = {
|
|
1935
|
+
"start_date": start_date,
|
|
1936
|
+
"end_date": end_date,
|
|
1937
|
+
"mids": mids,
|
|
1938
|
+
"sids": sids,
|
|
1939
|
+
"query_dimension": query_dimension,
|
|
1940
|
+
"transaction_status": transaction_status,
|
|
1941
|
+
"summarize": summarize,
|
|
1942
|
+
"currency_code": currency_code,
|
|
1943
|
+
"offset": offset,
|
|
1944
|
+
"length": length,
|
|
1945
|
+
}
|
|
1946
|
+
try:
|
|
1947
|
+
p = param.IncomeStatementSellers.model_validate(args)
|
|
1948
|
+
except Exception as err:
|
|
1949
|
+
raise errors.InvalidParametersError(err, url, args) from err
|
|
1950
|
+
|
|
1951
|
+
# 发送请求
|
|
1952
|
+
data = await self._request_with_sign("POST", url, body=p.model_dump_params())
|
|
1953
|
+
return schema.IncomeStatementSellers.model_validate(data)
|
|
1954
|
+
|
|
1955
|
+
async def IncomeStatementAsins(
|
|
1956
|
+
self,
|
|
1957
|
+
start_date: str | datetime.date | datetime.datetime,
|
|
1958
|
+
end_date: str | datetime.date | datetime.datetime,
|
|
1959
|
+
*,
|
|
1960
|
+
query_dimension: int | None = None,
|
|
1961
|
+
mids: int | list[int] | None = None,
|
|
1962
|
+
sids: int | list[int] | None = None,
|
|
1963
|
+
transaction_status: INCOME_STATEMENT_TRANSACTION_STATUS | None = None,
|
|
1964
|
+
summarize: int | None = None,
|
|
1965
|
+
currency_code: str | None = None,
|
|
1966
|
+
search_value: str | list[str] | None = None,
|
|
1967
|
+
offset: int | None = None,
|
|
1968
|
+
length: int | None = None,
|
|
1969
|
+
) -> schema.IncomeStatementAsins:
|
|
1970
|
+
"""查询损益报告-ASIN维度
|
|
1971
|
+
|
|
1972
|
+
## Docs
|
|
1973
|
+
- 财务: [查询利润报表-ASIN](https://apidoc.lingxing.com/#/docs/Finance/bdASIN)
|
|
1974
|
+
|
|
1975
|
+
:param start_date `<'str/date/datetime'>`: 统计开始日期, 闭合区间
|
|
1976
|
+
:param end_date `<'str/date/datetime'>`: 统计结束日期, 闭合区间
|
|
1977
|
+
:param query_dimension `<'int/None'>`: 查询维度, 默认 `None` (使用: 0), 可选值:
|
|
1978
|
+
|
|
1979
|
+
- `0`: 天维度, 开始和结束时间跨度不能超过31天
|
|
1980
|
+
- `1`: 月维度, 开始和结束时间跨度不能超过1个月
|
|
1981
|
+
|
|
1982
|
+
:param mids `<'int/list[int]/None'>`: 领星站点ID或ID列表 (Seller.mid), 默认 `None` (不筛选)
|
|
1983
|
+
:param sids `<'int/list[int]/None'>`: 领星店铺ID或ID列表 (Seller.sid), 默认 `None` (不筛选)
|
|
1984
|
+
:param transaction_status `<'int/None'>`: 交易状态, 默认 `None` (使用: 'Disbursed'), 可选值:
|
|
1985
|
+
|
|
1986
|
+
- `'Deferred'`: 订单未进入Transaction报告, 无法回款
|
|
1987
|
+
- `'Disbursed'`: 订单已进入Transaction报告, 可以回款
|
|
1988
|
+
- `'DisbursedAndSettled'`: 可以回款和预结算订单
|
|
1989
|
+
- `'All'`: 所有状态
|
|
1990
|
+
|
|
1991
|
+
:param summarize `<'int/None'>`: 是否返回汇总数据, 默认 `None` (使用: 0), 可选值:
|
|
1992
|
+
|
|
1993
|
+
- `0`: 返回原始数据
|
|
1994
|
+
- `1`: 返回汇总数据
|
|
1995
|
+
|
|
1996
|
+
:param currency_code `<'str/None'>`: 结算金额目标转换货币代码, 默认 `None` (保持原结算货币)
|
|
1997
|
+
:param search_value `<'str/list[str]/None'>`: 搜索值, 默认 `None` (不筛选), 可传入单个ASIN或ASIN列表
|
|
1998
|
+
:param offset `<'int/None'>`: 分页偏移量, 默认 `None` (使用: 0)
|
|
1999
|
+
:param length `<'int/None'>`: 分页长度, 最大值 10000, 默认 `None` (使用: 15)
|
|
2000
|
+
:returns `<'IncomeStatementAsins'>`: 查询到的损益报告-ASIN维度结果
|
|
2001
|
+
```python
|
|
2002
|
+
{
|
|
2003
|
+
# 状态码
|
|
2004
|
+
"code": 0,
|
|
2005
|
+
# 提示信息
|
|
2006
|
+
"message": "success",
|
|
2007
|
+
# 错误信息
|
|
2008
|
+
"errors": [],
|
|
2009
|
+
# 请求ID
|
|
2010
|
+
"request_id": "",
|
|
2011
|
+
# 响应时间
|
|
2012
|
+
"response_time": "2025-08-13 19:23:04",
|
|
2013
|
+
# 响应数据量
|
|
2014
|
+
"response_count": 2,
|
|
2015
|
+
# 总数据量
|
|
2016
|
+
"total_count": 2,
|
|
2017
|
+
# 响应数据
|
|
2018
|
+
"data": [
|
|
2019
|
+
{
|
|
2020
|
+
# 币种代码 [原字段 'currencyCode']
|
|
2021
|
+
"currency_code": "USD",
|
|
2022
|
+
# 币种图标 [原字段 'currencyIcon']
|
|
2023
|
+
"currency_icon": "$",
|
|
2024
|
+
# 收入 - 总收入金额 [原字段 'grossProfitIncome']
|
|
2025
|
+
"total_income": 221568.35,
|
|
2026
|
+
# 收入 - 总销售金额 [原字段 'totalSalesAmount']
|
|
2027
|
+
"product_sales": 235906.05,
|
|
2028
|
+
# 收入 - 总销售数量 [原字段 'totalSalesQuantity']
|
|
2029
|
+
"product_sales_qty": 6715,
|
|
2030
|
+
# 收入 - 总销售退费 [原字段 'totalSalesRefunds']
|
|
2031
|
+
"product_sales_refunds": -11807.03,
|
|
2032
|
+
# 收入 - FBA销售金额 [原字段 'fbaSaleAmount']
|
|
2033
|
+
"fba_product_sales": 235906.05,
|
|
2034
|
+
# 收入 - FBA销售数量 [原字段 'fbaSalesQuantity']
|
|
2035
|
+
"fba_product_sales_qty": 6715,
|
|
2036
|
+
# 收入 - FBA销售退费 [原字段 'fbaSalesRefunds']
|
|
2037
|
+
"fba_product_sales_refunds": -11807.03,
|
|
2038
|
+
# 收入 - FBM销售金额 [原字段 'fbmSaleAmount']
|
|
2039
|
+
"fbm_product_sales": 0.0,
|
|
2040
|
+
# 收入 - FBM销售数量 [原字段 'fbmSalesQuantity']
|
|
2041
|
+
"fbm_product_sales_qty": 0,
|
|
2042
|
+
# 收入 - FBM销售退费 [原字段 'fbmSalesRefunds']
|
|
2043
|
+
"fbm_product_sales_refunds": 0.0,
|
|
2044
|
+
# 收入 - FBA库存赔付/补偿金额 [原字段 'fbaInventoryCredit']
|
|
2045
|
+
"fba_inventory_credits": 3483.66,
|
|
2046
|
+
# 收入 - FBA库存赔付/补偿数量 [原字段 'fbaInventoryCreditQuantity']
|
|
2047
|
+
"fba_inventory_credit_qty": 169,
|
|
2048
|
+
# 收入 - FBA清算收益金额 [原字段 'fbaLiquidationProceeds']
|
|
2049
|
+
"fba_liquidation_proceeds": 0.0,
|
|
2050
|
+
# 收入 - FBA清算收益调整金额 [原字段 'fbaLiquidationProceedsAdjustments']
|
|
2051
|
+
"fba_liquidation_proceeds_adj": 0.0,
|
|
2052
|
+
# 收入 - 配送运费收入金额 (买家支出) [原字段 'shippingCredits']
|
|
2053
|
+
"shipping_credits": 6595.82,
|
|
2054
|
+
# 收入 - 配送运费退款金额 (买家收入) [原字段 'shippingCreditRefunds']
|
|
2055
|
+
"shipping_credit_refunds": -354.16,
|
|
2056
|
+
# 收入 - 礼品包装费收入金额 (买家支出) [原字段 'giftWrapCredits']
|
|
2057
|
+
"giftwrap_credits": 0.0,
|
|
2058
|
+
# 收入 - 礼品包装费退款金额 (买家收入) [原字段 'giftWrapCreditRefunds']
|
|
2059
|
+
"giftwrap_credit_refunds": 0.0,
|
|
2060
|
+
# 收入 - 促销折扣金额 (卖家支出) [原字段 'promotionalRebates']
|
|
2061
|
+
"promotional_rebates": -12777.02,
|
|
2062
|
+
# 收入 - 促销折扣退款金额 (卖家收入) [原字段 'promotionalRebateRefunds']
|
|
2063
|
+
"promotional_rebate_refunds": 521.03,
|
|
2064
|
+
# 收入 - A-to-Z 保障/索赔金额 [原字段 'guaranteeClaims']
|
|
2065
|
+
"a2z_guarantee_claims": 0.0,
|
|
2066
|
+
# 收入 - 拒付金额 (拒付造成的让利(发生时为负数)) [原字段 'chargebacks']
|
|
2067
|
+
"chargebacks": 0.0,
|
|
2068
|
+
# 收入 - 亚马逊运费补偿金额 [原字段 'amazonShippingReimbursement']
|
|
2069
|
+
"amazon_shipping_reimbursement": 0.0,
|
|
2070
|
+
# 收入 - 亚马逊安全运输计划补偿金额 [原字段 'safeTReimbursement']
|
|
2071
|
+
"safe_t_reimbursement": 0.0,
|
|
2072
|
+
# 收入 - 其他补偿/赔付金额 [原字段 'reimbursements']
|
|
2073
|
+
"other_reimbursement": 0.0,
|
|
2074
|
+
# 收入 - 积分发放金额 (日本站) [原字段 'costOfPoIntegersGranted']
|
|
2075
|
+
"points_granted": 0.0,
|
|
2076
|
+
# 收入 - 积分退还金额 (日本站) [原字段 'costOfPoIntegersReturned']
|
|
2077
|
+
"points_returned": 0.0,
|
|
2078
|
+
# 收入 - 积分调整金额 (日本站) [原字段 'pointsAdjusted']
|
|
2079
|
+
"points_adjusted": 0.0,
|
|
2080
|
+
# 收入 - 货到付款金额 (COD) [原字段 'cashOnDelivery']
|
|
2081
|
+
"cash_on_delivery": 0.0,
|
|
2082
|
+
# 收入 - NetCo混合网络交易金额 [原字段 'netcoTransaction']
|
|
2083
|
+
"netco_transaction": 0.0,
|
|
2084
|
+
# 收入 - 收回/冲回金额
|
|
2085
|
+
"clawbacks": 0.0,
|
|
2086
|
+
# 收入 - 其他收入金额 [原字段 'otherInAmount']
|
|
2087
|
+
"other_income": 0.0,
|
|
2088
|
+
# 支出 - FBA销售佣金 (Referral Fee) [原字段 'platformFee']
|
|
2089
|
+
"fba_selling_fees": -19936.57,
|
|
2090
|
+
# 支出 - FBA销售佣金退款金额 [原字段 'sellingFeeRefunds']
|
|
2091
|
+
"fba_selling_fee_refunds": 1095.17,
|
|
2092
|
+
# 支出 - FBA总配送费用 [原字段 'totalFbaDeliveryFee']
|
|
2093
|
+
# (fba_fulfillment_fees + mcf_fulfillment_fees)
|
|
2094
|
+
"fba_transaction_fees": -23814.6,
|
|
2095
|
+
# 支付 - FBA配送费用 (Fulfillment Fee) [原字段 'fbaDeliveryFee']
|
|
2096
|
+
"fba_fulfillment_fees": -23769.11,
|
|
2097
|
+
# 支出 - FBA多渠道配送费用 (Multi-Channel) [原字段 'mcFbaDeliveryFee']
|
|
2098
|
+
"fba_mcf_fulfillment_fees": -45.49,
|
|
2099
|
+
# 支出 - FBA多渠道配送数量 (Multi-Channel) [原字段 'mcFbaFulfillmentFeesQuantity']
|
|
2100
|
+
"fba_mcf_fulfillment_qty": 7,
|
|
2101
|
+
# 支出 - FBA总配送费用退款金额 [原字段 'fbaTransactionFeeRefunds']
|
|
2102
|
+
"fba_transaction_fee_refunds": 120.94,
|
|
2103
|
+
# 支出 - 其他交易费用 [原字段 'otherTransactionFees']
|
|
2104
|
+
"other_transaction_fees": 0.0,
|
|
2105
|
+
# 支出 - 其他交易费用退款金额 [原字段 'otherTransactionFeeRefunds']
|
|
2106
|
+
"other_transaction_fee_refunds": 0.0,
|
|
2107
|
+
# 支出 - FBA仓储和入库服务总费用 [原字段 'totalStorageFee']
|
|
2108
|
+
"fba_inventory_and_inbound_services_fees": -484.25,
|
|
2109
|
+
# ('fba_storage_fees' 到 'awd_satellite_storage_fees_alloc' 之间的所有费用)
|
|
2110
|
+
# 支出 - FBA仓储费用 [原字段 'fbaStorageFee']
|
|
2111
|
+
"fba_storage_fees": -151.64,
|
|
2112
|
+
# 支出 - FBA仓储费用计提金额 [原字段 'fbaStorageFeeAccrual']
|
|
2113
|
+
"fba_storage_fees_accr": 0.0,
|
|
2114
|
+
# 支出 - FBA仓储费用计提调整金额 [原字段 'fbaStorageFeeAccrualDifference']
|
|
2115
|
+
"fba_storage_fees_accr_adj": 0.0,
|
|
2116
|
+
# 支出 - FBA仓储费用 (分摊) [原字段 'sharedFbaStorageFee']
|
|
2117
|
+
"fba_storage_fees_alloc": 0.01,
|
|
2118
|
+
# 支出 - FBA长期仓储费用 [原字段 'longTermStorageFee']
|
|
2119
|
+
"fba_lt_storage_fees": 0.0,
|
|
2120
|
+
# 支出 - FBA长期仓储费用计提金额 [原字段 'longTermStorageFeeAccrual']
|
|
2121
|
+
"fba_lt_storage_fees_accr": 0.0,
|
|
2122
|
+
# 支出 - FBA长期仓储费用计提调整金额 [原字段 'longTermStorageFeeAccrualDifference']
|
|
2123
|
+
"fba_lt_storage_fees_accr_adj": 0.0,
|
|
2124
|
+
# 支出 - FBA长期仓储费用 (分摊) [原字段 'sharedLongTermStorageFee']
|
|
2125
|
+
"fba_lt_storage_fees_alloc": 0.0,
|
|
2126
|
+
# 支出 - FBA仓储超储费用 (分摊) [原字段 'sharedFbaOverageFee']
|
|
2127
|
+
"fba_overage_fees_alloc": 0.0,
|
|
2128
|
+
# 支出 - FBA仓储续期费用 (分摊) [原字段 'sharedStorageRenewalBilling']
|
|
2129
|
+
"fba_storage_renewal_fees_alloc": 0.0,
|
|
2130
|
+
# 支出 - FBA仓鼠销毁费用 (分摊) [原字段 'sharedFbaDisposalFee']
|
|
2131
|
+
"fba_disposal_fees_alloc": -2.08,
|
|
2132
|
+
# 支出 - FBA仓储销毁数量 [原字段 'disposalQuantity']
|
|
2133
|
+
"fba_disposal_qty": 0,
|
|
2134
|
+
# 支出 - FBA仓储移除费用 (分摊) [原字段 'sharedFbaRemovalFee']
|
|
2135
|
+
"fba_removal_fees_alloc": -330.54,
|
|
2136
|
+
# 支出 - FBA仓储移除数量 [原字段 'removalQuantity']
|
|
2137
|
+
"fba_removal_qty": 315,
|
|
2138
|
+
# 支出 - FBA入库运输计划费用 (分摊) [原字段 'sharedFbaInboundTransportationProgramFee']
|
|
2139
|
+
"fba_inbound_transportation_program_fees_alloc": 0.0,
|
|
2140
|
+
# 支出 - FBA入库便利费用 (分摊) [原字段 'sharedFbaInboundConvenienceFee']
|
|
2141
|
+
"fba_inbound_convenience_fees_alloc": 0.0,
|
|
2142
|
+
# 支出 - FBA入库缺陷费用 (分摊) [原字段 'sharedFbaInboundDefectFee']
|
|
2143
|
+
"fba_inbound_defect_fees_alloc": 0.0,
|
|
2144
|
+
# 支出 - FBA国际入库费用 (分摊) [原字段 'sharedFbaIntegerernationalInboundFee']
|
|
2145
|
+
"fba_international_inbound_fees_alloc": 0.0,
|
|
2146
|
+
# 支出 - FBA合作承运商(入库)运费 (分摊) [原字段 'sharedAmazonPartneredCarrierShipmentFee']
|
|
2147
|
+
"fba_partnered_carrier_shipment_fees_alloc": 0.0,
|
|
2148
|
+
# 支出 - FBA客户退货处理费用 (分摊) [原字段 'sharedFbaCustomerReturnFee']
|
|
2149
|
+
"fba_customer_return_fees_alloc": 0.0,
|
|
2150
|
+
# 支出 - FBA交易退货处理费用 (分摊) [原字段 'sharedFbaTransactionCustomerReturnFee']
|
|
2151
|
+
"fba_transaction_return_fees_alloc": 0.0,
|
|
2152
|
+
# 支出 - FBA人工处理费用 (分摊) [原字段 'sharedManualProcessingFee']
|
|
2153
|
+
"fba_manual_processing_fees_alloc": 0.0,
|
|
2154
|
+
# 支出 - FBA贴标费用 (分摊) [原字段 'sharedLabelingFee']
|
|
2155
|
+
"fba_labeling_fees_alloc": 0.0,
|
|
2156
|
+
# 支出 - FBA塑封袋费用 (分摊) [原字段 'sharedPolybaggingFee']
|
|
2157
|
+
"fba_polybagging_fees_alloc": 0.0,
|
|
2158
|
+
# 支出 - FBA气泡膜费用 (分摊) [原字段 'sharedBubblewrapFee']
|
|
2159
|
+
"fba_bubblewrap_fees_alloc": 0.0,
|
|
2160
|
+
# 支出 - FBA封箱胶带费用 (分摊) [原字段 'sharedTapingFee']
|
|
2161
|
+
"fba_taping_fees_alloc": 0.0,
|
|
2162
|
+
# 支出 - FBA库存费用调整金额 (分摊) [原字段 'sharedItemFeeAdjustment']
|
|
2163
|
+
"fba_inventory_fees_adj_alloc": 0.0,
|
|
2164
|
+
# 支出 - FBA其他库存费用 (分摊) [原字段 'sharedOtherFbaInventoryFees']
|
|
2165
|
+
"other_fba_inventory_fees_alloc": 0.0,
|
|
2166
|
+
# 支出 - AWD仓储费用 (分摊) [原字段 'sharedAwdStorageFee']
|
|
2167
|
+
"awd_storage_fees_alloc": 0.0,
|
|
2168
|
+
# 支出 - AWD处理费用 (分摊) [原字段 'sharedAwdProcessingFee']
|
|
2169
|
+
"awd_processing_fees_alloc": 0.0,
|
|
2170
|
+
# 支出 - AWD运输费用 (分摊) [原字段 'sharedAwdTransportationFee']
|
|
2171
|
+
"awd_transportation_fees_alloc": 0.0,
|
|
2172
|
+
# 支出 - AWD卫星仓储费用 (分摊) [原字段 'sharedStarStorageFee']
|
|
2173
|
+
"awd_satellite_storage_fees_alloc": 0.0,
|
|
2174
|
+
# 支出 - 运输标签花费金额 [原字段 'shippingLabelPurchases']
|
|
2175
|
+
"shipping_label_purchases": 0.0,
|
|
2176
|
+
# 支出 - 运输标签退款金额 [原字段 'shippingLabelRefunds']
|
|
2177
|
+
"shipping_label_refunds": 0.0,
|
|
2178
|
+
# 支出 - 承运商运输标签花费调整金额 [原字段 'sharedCarrierShippingLabelAdjustments']
|
|
2179
|
+
"carrier_shipping_label_adj": 0.0,
|
|
2180
|
+
# 支出 - 总推广费用 (Service Fee) [原字段 'promotionFee']
|
|
2181
|
+
"promotion_fees": -679.97,
|
|
2182
|
+
# (subscription_fees_alloc + coupon_fees_alloc + deal_fees_alloc + vine_fees_alloc + early_reviewer_program_fees_alloc)
|
|
2183
|
+
# 支出 - 订阅服务费 (分摊) [原字段 'sharedSubscriptionFee']
|
|
2184
|
+
"subscription_fees_alloc": -39.99,
|
|
2185
|
+
# 支出 - 优惠券费用 (分摊) [原字段 'sharedCouponFee']
|
|
2186
|
+
"coupon_fees_alloc": -239.98,
|
|
2187
|
+
# 支出 - 秒杀费用 (分摊) [原字段 'sharedLdFee']
|
|
2188
|
+
"deal_fees_alloc": 0.0,
|
|
2189
|
+
# 支出 - Vine费用 (分摊) [原字段 'sharedVineFee']
|
|
2190
|
+
"vine_fees_alloc": -400.0,
|
|
2191
|
+
# 支出 - 早期评论人计划费用 (分摊) [原字段 'sharedEarlyReviewerProgramFee']
|
|
2192
|
+
"early_reviewer_program_fees_alloc": 0.0,
|
|
2193
|
+
# 支出 - 其他亚马逊服务费用 (分摊) (Service Fee) [原字段 'totalPlatformOtherFee']
|
|
2194
|
+
"other_service_fees_alloc": -1733.33,
|
|
2195
|
+
# 支出 - 亚马逊退款管理费用 [原字段 'refundAdministrationFees']
|
|
2196
|
+
"refund_administration_fees": -219.15,
|
|
2197
|
+
# 支出 - 总费用退款金额 [totalFeeRefunds]
|
|
2198
|
+
# (fba_selling_fee_refunds + fba_transaction_fee_refunds + refund_administration_fees)
|
|
2199
|
+
"total_fee_refunds": 996.96,
|
|
2200
|
+
# 支出 - 其他费用调整金额
|
|
2201
|
+
"adjustments": -163.14,
|
|
2202
|
+
# 支出 - 广告总花费 (Cost of Advertising) [原字段 'totalAdsCost']
|
|
2203
|
+
# (ads_sp_cost + ads_sb_cost + ads_sbv_cost + ads_sd_cost)
|
|
2204
|
+
"ads_cost": -27743.22,
|
|
2205
|
+
# 支出 - 广告总销售金额 [原字段 'totalAdsSales']
|
|
2206
|
+
"ads_sales": 142803.87,
|
|
2207
|
+
# 支出 - 广告总销售数量 [原字段 'totalAdsSalesQuantity']
|
|
2208
|
+
"ads_sales_qty": 3333,
|
|
2209
|
+
# 支出 - SP广告花费 (Sponsored Products) [原字段 'adsSpCost']
|
|
2210
|
+
"ads_sp_cost": -22291.36,
|
|
2211
|
+
# 支出 - SP广告销售金额 [原字段 'adsSpSales']
|
|
2212
|
+
"ads_sp_sales": 97531.25,
|
|
2213
|
+
# 支出 - SP广告销售数量 [原字段 'adsSpSalesQuantity']
|
|
2214
|
+
"ads_sp_sales_qty": 2305,
|
|
2215
|
+
# 支出 - SB广告花费 (Sponsored Brands) [原字段 'adsSbCost']
|
|
2216
|
+
"ads_sb_cost": -5451.86,
|
|
2217
|
+
# 支出 - SB广告销售金额 [原字段 'sharedAdsSbSales']
|
|
2218
|
+
"ads_sb_sales": 25464.72,
|
|
2219
|
+
# 支出 - SB广告销售数量 [原字段 'sharedAdsSbSalesQuantity']
|
|
2220
|
+
"ads_sb_sales_qty": 552,
|
|
2221
|
+
# 支出 - SBV广告花费 (Sponsored Brands Video) [原字段 'adsSbvCost']
|
|
2222
|
+
"ads_sbv_cost": 0.0,
|
|
2223
|
+
# 支出 - SBV广告销售金额 [原字段 'sharedAdsSbvSales']
|
|
2224
|
+
"ads_sbv_sales": 19807.9,
|
|
2225
|
+
# 支出 - SBV广告销售数量 [原字段 'sharedAdsSbvSalesQuantity']
|
|
2226
|
+
"ads_sbv_sales_qty": 476,
|
|
2227
|
+
# 支出 - SD广告花费 (Sponsored Display) [原字段 'adsSdCost']
|
|
2228
|
+
"ads_sd_cost": 0.0,
|
|
2229
|
+
# 支出 - SD广告销售金额 [原字段 'adsSdSales']
|
|
2230
|
+
"ads_sd_sales": 0.0,
|
|
2231
|
+
# 支出 - SD广告销售数量 [原字段 'adsSdSalesQuantity']
|
|
2232
|
+
"ads_sd_sales_qty": 0,
|
|
2233
|
+
# 支出 - 广告分摊费用 [原字段 'sharedCostOfAdvertising']
|
|
2234
|
+
"ads_cost_alloc": 0.0,
|
|
2235
|
+
# 支出 - 广告总退款金额 (Refund for Advertiser) [原字段 'refundForAdvertiser']
|
|
2236
|
+
"ads_cost_refunds": 0.0,
|
|
2237
|
+
# 支出 - 清算服务费 (分摊) [原字段 'sharedLiquidationsFees']
|
|
2238
|
+
"liquidation_service_fees_alloc": 0.0,
|
|
2239
|
+
# 支出 - 其他支出费用 [原字段 'others']
|
|
2240
|
+
"other_expenses": 0.0,
|
|
2241
|
+
# 支出 - 用户自定义推广总费用 [原字段 'customOrderFee']
|
|
2242
|
+
"user_promotion_fees": 0.0,
|
|
2243
|
+
# (user_promotion_principal + user_promotion_commission)
|
|
2244
|
+
# 支出 - 用户自定义推广费用本金 [原字段 'customOrderFeePrincipal']
|
|
2245
|
+
"user_promotion_principal": 0.0,
|
|
2246
|
+
# 支出 - 用户自定义推广佣金费用 [原字段 'customOrderFeeCommission']
|
|
2247
|
+
"user_promotion_commission": 0.0,
|
|
2248
|
+
# 支出 - 用户自定义其他费用 [原字段 'otherFeeStr']
|
|
2249
|
+
"user_other_fees": [],
|
|
2250
|
+
# 税费 - 总税费 [grossProfitTax]
|
|
2251
|
+
"total_tax": 0.0,
|
|
2252
|
+
# 税费 - 总销税收金额 [原字段 'totalSalesTax']
|
|
2253
|
+
# ('product_tax_collected' 到 'tcs_cgst_collected' 之间的所有税费)
|
|
2254
|
+
"sales_tax_collected": 15036.42,
|
|
2255
|
+
# 税费 - 商品销售税收金额 [原字段 'taxCollectedProduct']
|
|
2256
|
+
"product_tax_collected": 15006.18,
|
|
2257
|
+
# 税费 - 配送运费税收金额 [原字段 'taxCollectedShipping']
|
|
2258
|
+
"shipping_tax_collected": 18.58,
|
|
2259
|
+
# 税费 - 礼品包装税收金额 [原字段 'taxCollectedGiftWrap']
|
|
2260
|
+
"giftwrap_tax_collected": 0.0,
|
|
2261
|
+
# 税费 - 促销折扣税收金额 [原字段 'taxCollectedDiscount']
|
|
2262
|
+
"promotional_rebate_tax_collected": 0.0,
|
|
2263
|
+
# 税费 - VAT/GST税收金额 [原字段 'taxCollected']
|
|
2264
|
+
"vat_gst_tax_collected": 11.66,
|
|
2265
|
+
# 税费 - TCS IGST税收金额 (印度站) [原字段 'tcsIgstCollected']
|
|
2266
|
+
"tcs_igst_collected": 0.0,
|
|
2267
|
+
# 税费 - TCS SGST税收金额 (印度站) [原字段 'tcsSgstCollected']
|
|
2268
|
+
"tcs_sgst_collected": 0.0,
|
|
2269
|
+
# 税费 - TCS CGST税收金额 (印度站) [原字段 'tcsCgstCollected']
|
|
2270
|
+
"tcs_cgst_collected": 0.0,
|
|
2271
|
+
# 税费 - 总销售税代扣金额 [原字段 'salesTaxWithheld']
|
|
2272
|
+
"sales_tax_withheld": -15036.42,
|
|
2273
|
+
# 税费 - 总销售税费退款 [salesTaxRefund]
|
|
2274
|
+
"sales_tax_refunded": -784.31,
|
|
2275
|
+
# ('product_tax_refunded' 到 'sales_tax_withheld_refunded' 之间的所有税费退款)
|
|
2276
|
+
# 税费 - 商品销售税费退款金额 [原字段 'taxRefundedProduct']
|
|
2277
|
+
"product_tax_refunded": -783.0,
|
|
2278
|
+
# 税费 - 配送运费税费退款金额 [原字段 'taxRefundedShipping']
|
|
2279
|
+
"shipping_tax_refunded": -1.31,
|
|
2280
|
+
# 税费 - 礼品包装税费退款金额 [原字段 'taxRefundedGiftWrap']
|
|
2281
|
+
"giftwrap_tax_refunded": 0.0,
|
|
2282
|
+
# 税费 - 促销折扣税费退款金额 [原字段 'taxRefundedDiscount']
|
|
2283
|
+
"promotional_rebate_tax_refunded": 0.0,
|
|
2284
|
+
# 税费 - VAT/GST税费退款金额 [原字段 'taxRefunded']
|
|
2285
|
+
"vat_gst_tax_refunded": 0.0,
|
|
2286
|
+
# 税费 - TCS IGST税费退款金额 (印度站) [原字段 'tcsIgstRefunded']
|
|
2287
|
+
"tcs_igst_refunded": 0.0,
|
|
2288
|
+
# 税费 - TCS SGST税费退款金额 (印度站) [原字段 'tcsSgstRefunded']
|
|
2289
|
+
"tcs_sgst_refunded": 0.0,
|
|
2290
|
+
# 税费 - TCS CGST税费退款金额 (印度站) [原字段 'tcsCgstRefunded']
|
|
2291
|
+
"tcs_cgst_refunded": 0.0,
|
|
2292
|
+
# 税费 - 总退款税代扣金额 [原字段 'refundTaxWithheld']
|
|
2293
|
+
"refund_tax_withheld": 784.31,
|
|
2294
|
+
# 税费 - VAT进项税费金额 [原字段 'sharedComminglingVatIncome']
|
|
2295
|
+
"commingling_vat_income": 0.0,
|
|
2296
|
+
# 税费 - VAT销项税费金额 [原字段 'sharedComminglingVatExpenses']
|
|
2297
|
+
"commingling_vat_expenses": 0.0,
|
|
2298
|
+
# 税费 - TDS 194-O净额 (印度站) [原字段 'tdsSection194ONet']
|
|
2299
|
+
"tds_section_194o_net": 0.0,
|
|
2300
|
+
# 税费 - 其他税费调整 (分摊) [原字段 'sharedTaxAdjustment']
|
|
2301
|
+
"other_tax_adj_alloc": 0.0,
|
|
2302
|
+
# 成本 - 总退款数量 [原字段 'refundsQuantity']
|
|
2303
|
+
"total_refunds_qty": 329,
|
|
2304
|
+
# 成本 - 总退款率 [原字段 'refundsRate']
|
|
2305
|
+
# (total_refund_qty / (fba&fbm_product_sales_qty + fba_mcf_fulfillment_qty + fba_reshipment_qty))
|
|
2306
|
+
"total_refunds_rate": 0.0486,
|
|
2307
|
+
# 成本 - FBA退货数量 [原字段 'fbaReturnsQuantity']
|
|
2308
|
+
"fba_returns_qty": 363,
|
|
2309
|
+
# 成本 - FBA退货可售数量 [原字段 'fbaReturnsSaleableQuantity']
|
|
2310
|
+
"fba_returns_saleable_qty": 12,
|
|
2311
|
+
# 成本 - FBA退货不可售数量 [原字段 'fbaReturnsUnsaleableQuantity']
|
|
2312
|
+
"fba_returns_unsaleable_qty": 351,
|
|
2313
|
+
# 成本 - FBA退货率 [原字段 'fbaReturnsQuantityRate']
|
|
2314
|
+
# (fba_returns_qty / (fba_product_sales_qty + fba_mcf_fulfillment_qty))
|
|
2315
|
+
"fba_returns_rate": 0.054,
|
|
2316
|
+
# 成本 - 总补发/换货数量 [原字段 'totalReshipQuantity']
|
|
2317
|
+
"total_reshipment_qty": 50,
|
|
2318
|
+
# 成本 - FBA补发/换货数量 [原字段 'reshipFbaProductSalesQuantity']
|
|
2319
|
+
"fba_reshipment_qty": 47,
|
|
2320
|
+
# 成本 - FBA换货退回数量 [原字段 'reshipFbaProductSaleRefundsQuantity']
|
|
2321
|
+
"fba_reshipment_returned_qty": 3,
|
|
2322
|
+
# 成本 - FBM补发/换货数量 [原字段 'reshipFbmProductSalesQuantity']
|
|
2323
|
+
"fbm_reshipment_qty": 0,
|
|
2324
|
+
# 成本 - FBM换货退回数量 [原字段 'reshipFbmProductSaleRefundsQuantity']
|
|
2325
|
+
"fbm_reshipment_returned_qty": 0,
|
|
2326
|
+
# 成本 - 总成本数量 [原字段 'cgQuantity']
|
|
2327
|
+
# (fba&fbm_product_sales_qty + fba_mcf_fulfillment_qty + fba&fbm_reshipment_qty - fba_returns_saleable_qty)
|
|
2328
|
+
"cost_of_goods_qty": -6757,
|
|
2329
|
+
# 成本 - 总成本金额 (COGS) [原字段 'totalCost']
|
|
2330
|
+
# (purchase_cost + logistics_cost + other_costs)
|
|
2331
|
+
"cost_of_goods": -100790.7,
|
|
2332
|
+
# 成本 - 总成本占比 [原字段 'proportionOfTotalCost']
|
|
2333
|
+
"cost_of_goods_ratio": 0.4272,
|
|
2334
|
+
# 成本 - 总采购成本 (COGS) [原字段 'cgPriceTotal']
|
|
2335
|
+
"purchase_cost": -100790.7,
|
|
2336
|
+
# 成本 - 单品成本 [原字段 'cgUnitPrice']
|
|
2337
|
+
"purchase_unit_cost": 14.93,
|
|
2338
|
+
# 成本 - 采购成本占比 [原字段 'proportionOfCg']
|
|
2339
|
+
"purchase_cost_ratio": 0.4272,
|
|
2340
|
+
# 成本 - 是否有成本明细 [原字段 'hasCgPriceDetail']
|
|
2341
|
+
"has_purchase_cost_detail": 1,
|
|
2342
|
+
# 成本 - 总物流费用 [原字段 'cgTransportCostsTotal']
|
|
2343
|
+
"logistics_cost": 0.0,
|
|
2344
|
+
# 成本 - 物流单品费用 [原字段 'cgTransportUnitCosts']
|
|
2345
|
+
"logistics_unit_cost": 0.0,
|
|
2346
|
+
# 成本 - 物流费用占比 [原字段 'proportionOfCgTransport']
|
|
2347
|
+
"logistics_cost_ratio": 0.0,
|
|
2348
|
+
# 成本 - 是否有物流费用明细 [原字段 'hasCgTransportCostsDetail']
|
|
2349
|
+
"has_logistics_cost_detail": 1,
|
|
2350
|
+
# 成本 - 其他费用总金额 [原字段 'cgOtherCostsTotal']
|
|
2351
|
+
"other_costs": 0.0,
|
|
2352
|
+
# 成本 - 其他费用单品金额 [原字段 'cgOtherUnitCosts']
|
|
2353
|
+
"other_unit_cost": 0.0,
|
|
2354
|
+
# 成本 - 其他费用占比 [原字段 'proportionOfCgOtherCosts']
|
|
2355
|
+
"other_cost_ratio": 0.0,
|
|
2356
|
+
# 成本 - 是否有其他费用明细 [原字段 'hasCgOtherCostsDetail']
|
|
2357
|
+
"has_other_cost_detail": 0,
|
|
2358
|
+
# 利润 - 毛利润 [原字段 'grossProfit']
|
|
2359
|
+
"gross_profit": 47219.53,
|
|
2360
|
+
# 利润 - 毛利率 [原字段 'grossRate']
|
|
2361
|
+
"gross_profit_margin": 0.2131,
|
|
2362
|
+
# 利润 - 投资回报率 (ROI)
|
|
2363
|
+
"roi": 0.2693,
|
|
2364
|
+
# 交易状态 [原字段 'transactionStatusCode']
|
|
2365
|
+
"transaction_status": "Disbursed",
|
|
2366
|
+
# 交易状态描述 [原字段 'transactionStatus']
|
|
2367
|
+
"transaction_status_desc": "已发放",
|
|
2368
|
+
# 延迟结算状态 [原字段 'deferredSubStatusCode']
|
|
2369
|
+
"deferred_settlement_status": "Disbursed",
|
|
2370
|
+
# 延迟结算状态描述 [原字段 'deferredSubStatus']
|
|
2371
|
+
"deferred_settlement_status_desc": "",
|
|
2372
|
+
# 延迟结算总金额 [原字段 'deferredSettlementAmount']
|
|
2373
|
+
"deferred_settlement": 186019.17,
|
|
2374
|
+
# 结算小计 [原字段 'settlementSubtotal']
|
|
2375
|
+
"settlement_subtotal": 186019.17,
|
|
2376
|
+
# 报告时间 (本地时间) [原字段 'postedDateDayLocale']
|
|
2377
|
+
"report_time_loc": "",
|
|
2378
|
+
# 报告开始时间 (本地时间) [原字段 'minPostedDateDayLocale']
|
|
2379
|
+
"report_start_time_loc": "",
|
|
2380
|
+
# 报告结束时间 (本地时间) [原字段 'maxPostedDateDayLocale']
|
|
2381
|
+
"report_end_time_loc": "",
|
|
2382
|
+
# 报告日期 (本地时间) [原字段 'postedDateLocale']
|
|
2383
|
+
"report_date_loc": "2025-08",
|
|
2384
|
+
# 记录ID (非业务唯一键)
|
|
2385
|
+
"id": "65545075457********",
|
|
2386
|
+
# 领星店铺ID
|
|
2387
|
+
"sid": 1,
|
|
2388
|
+
# 国家代码 [原字段 'countryCode']
|
|
2389
|
+
"country_code": "US",
|
|
2390
|
+
# ASIN关联领星店铺ID列表
|
|
2391
|
+
"sids": [1],
|
|
2392
|
+
# ASIN关联领星店铺名称列表 [原字段 'storeName']
|
|
2393
|
+
"seller_names": ["Store-US"],
|
|
2394
|
+
# ASIN关联国家列表 (中文) [原字段 'country']
|
|
2395
|
+
"countries": ["美国"],
|
|
2396
|
+
# 商品ASIN
|
|
2397
|
+
"asin": "B07*******",
|
|
2398
|
+
# 商品父ASIN [原字段 'parentAsin']
|
|
2399
|
+
"parent_asin": "B07*******",
|
|
2400
|
+
# 领星本地SKU [原字段 'localSku']
|
|
2401
|
+
"lsku": "LOCAL********",
|
|
2402
|
+
# 领星本地商品名称 [原字段 'localName']
|
|
2403
|
+
"product_name": "JBL",
|
|
2404
|
+
# 产品型号 [原字段 'model']
|
|
2405
|
+
"product_model": "KX6702",
|
|
2406
|
+
# 领星本地产品分类名称 [原字段 'categoryName']
|
|
2407
|
+
"category_name": "",
|
|
2408
|
+
# 领星本地产品品牌名称 [原字段 'brandName']
|
|
2409
|
+
"brand_name": "",
|
|
2410
|
+
# 标题 [原字段 'itemName']
|
|
2411
|
+
"title": "Product Title",
|
|
2412
|
+
# 商品略缩图链接 [原字段 'smallImageUrl']
|
|
2413
|
+
"thumbnail_url": "https://m.media-amazon.com/images/****.jpg",
|
|
2414
|
+
# ASIN开发人名称 [原字段 'productDeveloperRealname']
|
|
2415
|
+
"developer_name": "",
|
|
2416
|
+
# ASIN负责人名称 (逗号隔开) [原字段 'principalRealname']
|
|
2417
|
+
"operator_names": "白小白,黑小黑",
|
|
2418
|
+
# 商品标签IDs (逗号隔开) [原字段 'listingTagIds']
|
|
2419
|
+
"tag_ids": "907476839534375430, 907476656619287314, 907476656619287354",
|
|
2420
|
+
},
|
|
2421
|
+
...
|
|
2422
|
+
]
|
|
2423
|
+
}
|
|
2424
|
+
```
|
|
2425
|
+
"""
|
|
2426
|
+
url = route.INCOME_STATEMENT_ASINS
|
|
2427
|
+
# 构建参数
|
|
2428
|
+
args = {
|
|
2429
|
+
"start_date": start_date,
|
|
2430
|
+
"end_date": end_date,
|
|
2431
|
+
"mids": mids,
|
|
2432
|
+
"sids": sids,
|
|
2433
|
+
"query_dimension": query_dimension,
|
|
2434
|
+
"transaction_status": transaction_status,
|
|
2435
|
+
"summarize": summarize,
|
|
2436
|
+
"currency_code": currency_code,
|
|
2437
|
+
"search_field": None if search_value is None else "asin",
|
|
2438
|
+
"search_value": search_value,
|
|
2439
|
+
"offset": offset,
|
|
2440
|
+
"length": length,
|
|
2441
|
+
}
|
|
2442
|
+
try:
|
|
2443
|
+
p = param.IncomeStatement.model_validate(args)
|
|
2444
|
+
except Exception as err:
|
|
2445
|
+
raise errors.InvalidParametersError(err, url, args) from err
|
|
2446
|
+
|
|
2447
|
+
# 发送请求
|
|
2448
|
+
data = await self._request_with_sign("POST", url, body=p.model_dump_params())
|
|
2449
|
+
return schema.IncomeStatementAsins.model_validate(data)
|
|
2450
|
+
|
|
2451
|
+
async def IncomeStatementParentAsins(
|
|
2452
|
+
self,
|
|
2453
|
+
start_date: str | datetime.date | datetime.datetime,
|
|
2454
|
+
end_date: str | datetime.date | datetime.datetime,
|
|
2455
|
+
*,
|
|
2456
|
+
query_dimension: int | None = None,
|
|
2457
|
+
mids: int | list[int] | None = None,
|
|
2458
|
+
sids: int | list[int] | None = None,
|
|
2459
|
+
transaction_status: INCOME_STATEMENT_TRANSACTION_STATUS | None = None,
|
|
2460
|
+
summarize: int | None = None,
|
|
2461
|
+
currency_code: str | None = None,
|
|
2462
|
+
search_value: str | list[str] | None = None,
|
|
2463
|
+
offset: int | None = None,
|
|
2464
|
+
length: int | None = None,
|
|
2465
|
+
) -> schema.IncomeStatementAsins:
|
|
2466
|
+
"""查询损益报告-父ASIN维度
|
|
2467
|
+
|
|
2468
|
+
## Docs
|
|
2469
|
+
- 财务: [查询利润报表-父ASIN](https://apidoc.lingxing.com/#/docs/Finance/bdParentASIN)
|
|
2470
|
+
|
|
2471
|
+
:param start_date `<'str/date/datetime'>`: 统计开始日期, 闭合区间
|
|
2472
|
+
:param end_date `<'str/date/datetime'>`: 统计结束日期, 闭合区间
|
|
2473
|
+
:param query_dimension `<'int/None'>`: 查询维度, 默认 `None` (使用: 0), 可选值:
|
|
2474
|
+
|
|
2475
|
+
- `0`: 天维度, 开始和结束时间跨度不能超过31天
|
|
2476
|
+
- `1`: 月维度, 开始和结束时间跨度不能超过1个月
|
|
2477
|
+
|
|
2478
|
+
:param mids `<'int/list[int]/None'>`: 领星站点ID或ID列表 (Seller.mid), 默认 `None` (不筛选)
|
|
2479
|
+
:param sids `<'int/list[int]/None'>`: 领星店铺ID或ID列表 (Seller.sid), 默认 `None` (不筛选)
|
|
2480
|
+
:param transaction_status `<'int/None'>`: 交易状态, 默认 `None` (使用: 'Disbursed'), 可选值:
|
|
2481
|
+
|
|
2482
|
+
- `'Deferred'`: 订单未进入Transaction报告, 无法回款
|
|
2483
|
+
- `'Disbursed'`: 订单已进入Transaction报告, 可以回款
|
|
2484
|
+
- `'DisbursedAndSettled'`: 可以回款和预结算订单
|
|
2485
|
+
- `'All'`: 所有状态
|
|
2486
|
+
|
|
2487
|
+
:param summarize `<'int/None'>`: 是否返回汇总数据, 默认 `None` (使用: 0), 可选值:
|
|
2488
|
+
|
|
2489
|
+
- `0`: 返回原始数据
|
|
2490
|
+
- `1`: 返回汇总数据
|
|
2491
|
+
|
|
2492
|
+
:param currency_code `<'str/None'>`: 结算金额目标转换货币代码, 默认 `None` (保持原结算货币)
|
|
2493
|
+
:param search_value `<'str/list[str]/None'>`: 搜索值, 默认 `None` (不筛选), 可传入单个父ASIN或父ASIN列表
|
|
2494
|
+
:param offset `<'int/None'>`: 分页偏移量, 默认 `None` (使用: 0)
|
|
2495
|
+
:param length `<'int/None'>`: 分页长度, 最大值 10000, 默认 `None` (使用: 15)
|
|
2496
|
+
:return `<'IncomeStatementAsins'>`: 查询到的损益报告-父ASIN维度结果
|
|
2497
|
+
"""
|
|
2498
|
+
url = route.INCOME_STATEMENT_PARENT_ASINS
|
|
2499
|
+
# 构建参数
|
|
2500
|
+
args = {
|
|
2501
|
+
"start_date": start_date,
|
|
2502
|
+
"end_date": end_date,
|
|
2503
|
+
"mids": mids,
|
|
2504
|
+
"sids": sids,
|
|
2505
|
+
"query_dimension": query_dimension,
|
|
2506
|
+
"transaction_status": transaction_status,
|
|
2507
|
+
"summarize": summarize,
|
|
2508
|
+
"currency_code": currency_code,
|
|
2509
|
+
"search_field": None if search_value is None else "parent_asin",
|
|
2510
|
+
"search_value": search_value,
|
|
2511
|
+
"offset": offset,
|
|
2512
|
+
"length": length,
|
|
2513
|
+
}
|
|
2514
|
+
try:
|
|
2515
|
+
p = param.IncomeStatement.model_validate(args)
|
|
2516
|
+
except Exception as err:
|
|
2517
|
+
raise errors.InvalidParametersError(err, url, args) from err
|
|
2518
|
+
|
|
2519
|
+
# 发送请求
|
|
2520
|
+
data = await self._request_with_sign("POST", url, body=p.model_dump_params())
|
|
2521
|
+
return schema.IncomeStatementAsins.model_validate(data)
|
|
2522
|
+
|
|
2523
|
+
async def IncomeStatementMskus(
|
|
2524
|
+
self,
|
|
2525
|
+
start_date: str | datetime.date | datetime.datetime,
|
|
2526
|
+
end_date: str | datetime.date | datetime.datetime,
|
|
2527
|
+
*,
|
|
2528
|
+
query_dimension: int | None = None,
|
|
2529
|
+
mids: int | list[int] | None = None,
|
|
2530
|
+
sids: int | list[int] | None = None,
|
|
2531
|
+
transaction_status: INCOME_STATEMENT_TRANSACTION_STATUS | None = None,
|
|
2532
|
+
summarize: int | None = None,
|
|
2533
|
+
currency_code: str | None = None,
|
|
2534
|
+
search_value: str | list[str] | None = None,
|
|
2535
|
+
offset: int | None = None,
|
|
2536
|
+
length: int | None = None,
|
|
2537
|
+
) -> schema.IncomeStatementMskus:
|
|
2538
|
+
"""查询损益报告-亚马逊SKU维度
|
|
2539
|
+
|
|
2540
|
+
## Docs
|
|
2541
|
+
- 财务: [查询利润报表-MSKU](https://apidoc.lingxing.com/#/docs/Finance/bdMSKU)
|
|
2542
|
+
|
|
2543
|
+
:param start_date `<'str/date/datetime'>`: 统计开始日期, 闭合区间
|
|
2544
|
+
:param end_date `<'str/date/datetime'>`: 统计结束日期, 闭合区间
|
|
2545
|
+
:param query_dimension `<'int/None'>`: 查询维度, 默认 `None` (使用: 0), 可选值:
|
|
2546
|
+
|
|
2547
|
+
- `0`: 天维度, 开始和结束时间跨度不能超过31天
|
|
2548
|
+
- `1`: 月维度, 开始和结束时间跨度不能超过1个月
|
|
2549
|
+
|
|
2550
|
+
:param mids `<'int/list[int]/None'>`: 领星站点ID或ID列表 (Seller.mid), 默认 `None` (不筛选)
|
|
2551
|
+
:param sids `<'int/list[int]/None'>`: 领星店铺ID或ID列表 (Seller.sid), 默认 `None` (不筛选)
|
|
2552
|
+
:param transaction_status `<'int/None'>`: 交易状态, 默认 `None` (使用: 'Disbursed'), 可选值:
|
|
2553
|
+
|
|
2554
|
+
- `'Deferred'`: 订单未进入Transaction报告, 无法回款
|
|
2555
|
+
- `'Disbursed'`: 订单已进入Transaction报告, 可以回款
|
|
2556
|
+
- `'DisbursedAndSettled'`: 可以回款和预结算订单
|
|
2557
|
+
- `'All'`: 所有状态
|
|
2558
|
+
|
|
2559
|
+
:param summarize `<'int/None'>`: 是否返回汇总数据, 默认 `None` (使用: 0), 可选值:
|
|
2560
|
+
|
|
2561
|
+
- `0`: 返回原始数据
|
|
2562
|
+
- `1`: 返回汇总数据
|
|
2563
|
+
|
|
2564
|
+
:param currency_code `<'str/None'>`: 结算金额目标转换货币代码, 默认 `None` (保持原结算货币)
|
|
2565
|
+
:param search_value `<'str/list[str]/None'>`: 搜索值, 默认 `None` (不筛选), 可传入单个亚马逊SKU或SKU列表
|
|
2566
|
+
:param offset `<'int/None'>`: 分页偏移量, 默认 `None` (使用: 0)
|
|
2567
|
+
:param length `<'int/None'>`: 分页长度, 最大值 10000, 默认 `None` (使用: 15)
|
|
2568
|
+
:returns `<'IncomeStatementMskus'>`: 查询到的损益报告-亚马逊SKU维度结果
|
|
2569
|
+
```python
|
|
2570
|
+
{
|
|
2571
|
+
# 状态码
|
|
2572
|
+
"code": 0,
|
|
2573
|
+
# 提示信息
|
|
2574
|
+
"message": "success",
|
|
2575
|
+
# 错误信息
|
|
2576
|
+
"errors": [],
|
|
2577
|
+
# 请求ID
|
|
2578
|
+
"request_id": "",
|
|
2579
|
+
# 响应时间
|
|
2580
|
+
"response_time": "2025-08-13 19:23:04",
|
|
2581
|
+
# 响应数据量
|
|
2582
|
+
"response_count": 2,
|
|
2583
|
+
# 总数据量
|
|
2584
|
+
"total_count": 2,
|
|
2585
|
+
# 响应数据
|
|
2586
|
+
"data": [
|
|
2587
|
+
{
|
|
2588
|
+
# 币种代码 [原字段 'currencyCode']
|
|
2589
|
+
"currency_code": "USD",
|
|
2590
|
+
# 币种图标 [原字段 'currencyIcon']
|
|
2591
|
+
"currency_icon": "$",
|
|
2592
|
+
# 收入 - 总收入金额 [原字段 'grossProfitIncome']
|
|
2593
|
+
"total_income": 221568.35,
|
|
2594
|
+
# 收入 - 总销售金额 [原字段 'totalSalesAmount']
|
|
2595
|
+
"product_sales": 235906.05,
|
|
2596
|
+
# 收入 - 总销售数量 [原字段 'totalSalesQuantity']
|
|
2597
|
+
"product_sales_qty": 6715,
|
|
2598
|
+
# 收入 - 总销售退费 [原字段 'totalSalesRefunds']
|
|
2599
|
+
"product_sales_refunds": -11807.03,
|
|
2600
|
+
# 收入 - FBA销售金额 [原字段 'fbaSaleAmount']
|
|
2601
|
+
"fba_product_sales": 235906.05,
|
|
2602
|
+
# 收入 - FBA销售数量 [原字段 'fbaSalesQuantity']
|
|
2603
|
+
"fba_product_sales_qty": 6715,
|
|
2604
|
+
# 收入 - FBA销售退费 [原字段 'fbaSalesRefunds']
|
|
2605
|
+
"fba_product_sales_refunds": -11807.03,
|
|
2606
|
+
# 收入 - FBM销售金额 [原字段 'fbmSaleAmount']
|
|
2607
|
+
"fbm_product_sales": 0.0,
|
|
2608
|
+
# 收入 - FBM销售数量 [原字段 'fbmSalesQuantity']
|
|
2609
|
+
"fbm_product_sales_qty": 0,
|
|
2610
|
+
# 收入 - FBM销售退费 [原字段 'fbmSalesRefunds']
|
|
2611
|
+
"fbm_product_sales_refunds": 0.0,
|
|
2612
|
+
# 收入 - FBA库存赔付/补偿金额 [原字段 'fbaInventoryCredit']
|
|
2613
|
+
"fba_inventory_credits": 3483.66,
|
|
2614
|
+
# 收入 - FBA库存赔付/补偿数量 [原字段 'fbaInventoryCreditQuantity']
|
|
2615
|
+
"fba_inventory_credit_qty": 169,
|
|
2616
|
+
# 收入 - FBA清算收益金额 [原字段 'fbaLiquidationProceeds']
|
|
2617
|
+
"fba_liquidation_proceeds": 0.0,
|
|
2618
|
+
# 收入 - FBA清算收益调整金额 [原字段 'fbaLiquidationProceedsAdjustments']
|
|
2619
|
+
"fba_liquidation_proceeds_adj": 0.0,
|
|
2620
|
+
# 收入 - 配送运费收入金额 (买家支出) [原字段 'shippingCredits']
|
|
2621
|
+
"shipping_credits": 6595.82,
|
|
2622
|
+
# 收入 - 配送运费退款金额 (买家收入) [原字段 'shippingCreditRefunds']
|
|
2623
|
+
"shipping_credit_refunds": -354.16,
|
|
2624
|
+
# 收入 - 礼品包装费收入金额 (买家支出) [原字段 'giftWrapCredits']
|
|
2625
|
+
"giftwrap_credits": 0.0,
|
|
2626
|
+
# 收入 - 礼品包装费退款金额 (买家收入) [原字段 'giftWrapCreditRefunds']
|
|
2627
|
+
"giftwrap_credit_refunds": 0.0,
|
|
2628
|
+
# 收入 - 促销折扣金额 (卖家支出) [原字段 'promotionalRebates']
|
|
2629
|
+
"promotional_rebates": -12777.02,
|
|
2630
|
+
# 收入 - 促销折扣退款金额 (卖家收入) [原字段 'promotionalRebateRefunds']
|
|
2631
|
+
"promotional_rebate_refunds": 521.03,
|
|
2632
|
+
# 收入 - A-to-Z 保障/索赔金额 [原字段 'guaranteeClaims']
|
|
2633
|
+
"a2z_guarantee_claims": 0.0,
|
|
2634
|
+
# 收入 - 拒付金额 (拒付造成的让利(发生时为负数)) [原字段 'chargebacks']
|
|
2635
|
+
"chargebacks": 0.0,
|
|
2636
|
+
# 收入 - 亚马逊运费补偿金额 [原字段 'amazonShippingReimbursement']
|
|
2637
|
+
"amazon_shipping_reimbursement": 0.0,
|
|
2638
|
+
# 收入 - 亚马逊安全运输计划补偿金额 [原字段 'safeTReimbursement']
|
|
2639
|
+
"safe_t_reimbursement": 0.0,
|
|
2640
|
+
# 收入 - 其他补偿/赔付金额 [原字段 'reimbursements']
|
|
2641
|
+
"other_reimbursement": 0.0,
|
|
2642
|
+
# 收入 - 积分发放金额 (日本站) [原字段 'costOfPoIntegersGranted']
|
|
2643
|
+
"points_granted": 0.0,
|
|
2644
|
+
# 收入 - 积分退还金额 (日本站) [原字段 'costOfPoIntegersReturned']
|
|
2645
|
+
"points_returned": 0.0,
|
|
2646
|
+
# 收入 - 积分调整金额 (日本站) [原字段 'pointsAdjusted']
|
|
2647
|
+
"points_adjusted": 0.0,
|
|
2648
|
+
# 收入 - 货到付款金额 (COD) [原字段 'cashOnDelivery']
|
|
2649
|
+
"cash_on_delivery": 0.0,
|
|
2650
|
+
# 收入 - NetCo混合网络交易金额 [原字段 'netcoTransaction']
|
|
2651
|
+
"netco_transaction": 0.0,
|
|
2652
|
+
# 收入 - 收回/冲回金额
|
|
2653
|
+
"clawbacks": 0.0,
|
|
2654
|
+
# 收入 - 其他收入金额 [原字段 'otherInAmount']
|
|
2655
|
+
"other_income": 0.0,
|
|
2656
|
+
# 支出 - FBA销售佣金 (Referral Fee) [原字段 'platformFee']
|
|
2657
|
+
"fba_selling_fees": -19936.57,
|
|
2658
|
+
# 支出 - FBA销售佣金退款金额 [原字段 'sellingFeeRefunds']
|
|
2659
|
+
"fba_selling_fee_refunds": 1095.17,
|
|
2660
|
+
# 支出 - FBA总配送费用 [原字段 'totalFbaDeliveryFee']
|
|
2661
|
+
# (fba_fulfillment_fees + mcf_fulfillment_fees)
|
|
2662
|
+
"fba_transaction_fees": -23814.6,
|
|
2663
|
+
# 支付 - FBA配送费用 (Fulfillment Fee) [原字段 'fbaDeliveryFee']
|
|
2664
|
+
"fba_fulfillment_fees": -23769.11,
|
|
2665
|
+
# 支出 - FBA多渠道配送费用 (Multi-Channel) [原字段 'mcFbaDeliveryFee']
|
|
2666
|
+
"fba_mcf_fulfillment_fees": -45.49,
|
|
2667
|
+
# 支出 - FBA多渠道配送数量 (Multi-Channel) [原字段 'mcFbaFulfillmentFeesQuantity']
|
|
2668
|
+
"fba_mcf_fulfillment_qty": 7,
|
|
2669
|
+
# 支出 - FBA总配送费用退款金额 [原字段 'fbaTransactionFeeRefunds']
|
|
2670
|
+
"fba_transaction_fee_refunds": 120.94,
|
|
2671
|
+
# 支出 - 其他交易费用 [原字段 'otherTransactionFees']
|
|
2672
|
+
"other_transaction_fees": 0.0,
|
|
2673
|
+
# 支出 - 其他交易费用退款金额 [原字段 'otherTransactionFeeRefunds']
|
|
2674
|
+
"other_transaction_fee_refunds": 0.0,
|
|
2675
|
+
# 支出 - FBA仓储和入库服务总费用 [原字段 'totalStorageFee']
|
|
2676
|
+
"fba_inventory_and_inbound_services_fees": -484.25,
|
|
2677
|
+
# ('fba_storage_fees' 到 'awd_satellite_storage_fees_alloc' 之间的所有费用)
|
|
2678
|
+
# 支出 - FBA仓储费用 [原字段 'fbaStorageFee']
|
|
2679
|
+
"fba_storage_fees": -151.64,
|
|
2680
|
+
# 支出 - FBA仓储费用计提金额 [原字段 'fbaStorageFeeAccrual']
|
|
2681
|
+
"fba_storage_fees_accr": 0.0,
|
|
2682
|
+
# 支出 - FBA仓储费用计提调整金额 [原字段 'fbaStorageFeeAccrualDifference']
|
|
2683
|
+
"fba_storage_fees_accr_adj": 0.0,
|
|
2684
|
+
# 支出 - FBA仓储费用 (分摊) [原字段 'sharedFbaStorageFee']
|
|
2685
|
+
"fba_storage_fees_alloc": 0.01,
|
|
2686
|
+
# 支出 - FBA长期仓储费用 [原字段 'longTermStorageFee']
|
|
2687
|
+
"fba_lt_storage_fees": 0.0,
|
|
2688
|
+
# 支出 - FBA长期仓储费用计提金额 [原字段 'longTermStorageFeeAccrual']
|
|
2689
|
+
"fba_lt_storage_fees_accr": 0.0,
|
|
2690
|
+
# 支出 - FBA长期仓储费用计提调整金额 [原字段 'longTermStorageFeeAccrualDifference']
|
|
2691
|
+
"fba_lt_storage_fees_accr_adj": 0.0,
|
|
2692
|
+
# 支出 - FBA长期仓储费用 (分摊) [原字段 'sharedLongTermStorageFee']
|
|
2693
|
+
"fba_lt_storage_fees_alloc": 0.0,
|
|
2694
|
+
# 支出 - FBA仓储超储费用 (分摊) [原字段 'sharedFbaOverageFee']
|
|
2695
|
+
"fba_overage_fees_alloc": 0.0,
|
|
2696
|
+
# 支出 - FBA仓储续期费用 (分摊) [原字段 'sharedStorageRenewalBilling']
|
|
2697
|
+
"fba_storage_renewal_fees_alloc": 0.0,
|
|
2698
|
+
# 支出 - FBA仓鼠销毁费用 (分摊) [原字段 'sharedFbaDisposalFee']
|
|
2699
|
+
"fba_disposal_fees_alloc": -2.08,
|
|
2700
|
+
# 支出 - FBA仓储销毁数量 [原字段 'disposalQuantity']
|
|
2701
|
+
"fba_disposal_qty": 0,
|
|
2702
|
+
# 支出 - FBA仓储移除费用 (分摊) [原字段 'sharedFbaRemovalFee']
|
|
2703
|
+
"fba_removal_fees_alloc": -330.54,
|
|
2704
|
+
# 支出 - FBA仓储移除数量 [原字段 'removalQuantity']
|
|
2705
|
+
"fba_removal_qty": 315,
|
|
2706
|
+
# 支出 - FBA入库运输计划费用 (分摊) [原字段 'sharedFbaInboundTransportationProgramFee']
|
|
2707
|
+
"fba_inbound_transportation_program_fees_alloc": 0.0,
|
|
2708
|
+
# 支出 - FBA入库便利费用 (分摊) [原字段 'sharedFbaInboundConvenienceFee']
|
|
2709
|
+
"fba_inbound_convenience_fees_alloc": 0.0,
|
|
2710
|
+
# 支出 - FBA入库缺陷费用 (分摊) [原字段 'sharedFbaInboundDefectFee']
|
|
2711
|
+
"fba_inbound_defect_fees_alloc": 0.0,
|
|
2712
|
+
# 支出 - FBA国际入库费用 (分摊) [原字段 'sharedFbaIntegerernationalInboundFee']
|
|
2713
|
+
"fba_international_inbound_fees_alloc": 0.0,
|
|
2714
|
+
# 支出 - FBA合作承运商(入库)运费 (分摊) [原字段 'sharedAmazonPartneredCarrierShipmentFee']
|
|
2715
|
+
"fba_partnered_carrier_shipment_fees_alloc": 0.0,
|
|
2716
|
+
# 支出 - FBA客户退货处理费用 (分摊) [原字段 'sharedFbaCustomerReturnFee']
|
|
2717
|
+
"fba_customer_return_fees_alloc": 0.0,
|
|
2718
|
+
# 支出 - FBA交易退货处理费用 (分摊) [原字段 'sharedFbaTransactionCustomerReturnFee']
|
|
2719
|
+
"fba_transaction_return_fees_alloc": 0.0,
|
|
2720
|
+
# 支出 - FBA人工处理费用 (分摊) [原字段 'sharedManualProcessingFee']
|
|
2721
|
+
"fba_manual_processing_fees_alloc": 0.0,
|
|
2722
|
+
# 支出 - FBA贴标费用 (分摊) [原字段 'sharedLabelingFee']
|
|
2723
|
+
"fba_labeling_fees_alloc": 0.0,
|
|
2724
|
+
# 支出 - FBA塑封袋费用 (分摊) [原字段 'sharedPolybaggingFee']
|
|
2725
|
+
"fba_polybagging_fees_alloc": 0.0,
|
|
2726
|
+
# 支出 - FBA气泡膜费用 (分摊) [原字段 'sharedBubblewrapFee']
|
|
2727
|
+
"fba_bubblewrap_fees_alloc": 0.0,
|
|
2728
|
+
# 支出 - FBA封箱胶带费用 (分摊) [原字段 'sharedTapingFee']
|
|
2729
|
+
"fba_taping_fees_alloc": 0.0,
|
|
2730
|
+
# 支出 - FBA库存费用调整金额 (分摊) [原字段 'sharedItemFeeAdjustment']
|
|
2731
|
+
"fba_inventory_fees_adj_alloc": 0.0,
|
|
2732
|
+
# 支出 - FBA其他库存费用 (分摊) [原字段 'sharedOtherFbaInventoryFees']
|
|
2733
|
+
"other_fba_inventory_fees_alloc": 0.0,
|
|
2734
|
+
# 支出 - AWD仓储费用 (分摊) [原字段 'sharedAwdStorageFee']
|
|
2735
|
+
"awd_storage_fees_alloc": 0.0,
|
|
2736
|
+
# 支出 - AWD处理费用 (分摊) [原字段 'sharedAwdProcessingFee']
|
|
2737
|
+
"awd_processing_fees_alloc": 0.0,
|
|
2738
|
+
# 支出 - AWD运输费用 (分摊) [原字段 'sharedAwdTransportationFee']
|
|
2739
|
+
"awd_transportation_fees_alloc": 0.0,
|
|
2740
|
+
# 支出 - AWD卫星仓储费用 (分摊) [原字段 'sharedStarStorageFee']
|
|
2741
|
+
"awd_satellite_storage_fees_alloc": 0.0,
|
|
2742
|
+
# 支出 - 运输标签花费金额 [原字段 'shippingLabelPurchases']
|
|
2743
|
+
"shipping_label_purchases": 0.0,
|
|
2744
|
+
# 支出 - 运输标签退款金额 [原字段 'shippingLabelRefunds']
|
|
2745
|
+
"shipping_label_refunds": 0.0,
|
|
2746
|
+
# 支出 - 承运商运输标签花费调整金额 [原字段 'sharedCarrierShippingLabelAdjustments']
|
|
2747
|
+
"carrier_shipping_label_adj": 0.0,
|
|
2748
|
+
# 支出 - 总推广费用 (Service Fee) [原字段 'promotionFee']
|
|
2749
|
+
"promotion_fees": -679.97,
|
|
2750
|
+
# (subscription_fees_alloc + coupon_fees_alloc + deal_fees_alloc + vine_fees_alloc + early_reviewer_program_fees_alloc)
|
|
2751
|
+
# 支出 - 订阅服务费 (分摊) [原字段 'sharedSubscriptionFee']
|
|
2752
|
+
"subscription_fees_alloc": -39.99,
|
|
2753
|
+
# 支出 - 优惠券费用 (分摊) [原字段 'sharedCouponFee']
|
|
2754
|
+
"coupon_fees_alloc": -239.98,
|
|
2755
|
+
# 支出 - 秒杀费用 (分摊) [原字段 'sharedLdFee']
|
|
2756
|
+
"deal_fees_alloc": 0.0,
|
|
2757
|
+
# 支出 - Vine费用 (分摊) [原字段 'sharedVineFee']
|
|
2758
|
+
"vine_fees_alloc": -400.0,
|
|
2759
|
+
# 支出 - 早期评论人计划费用 (分摊) [原字段 'sharedEarlyReviewerProgramFee']
|
|
2760
|
+
"early_reviewer_program_fees_alloc": 0.0,
|
|
2761
|
+
# 支出 - 其他亚马逊服务费用 (分摊) (Service Fee) [原字段 'totalPlatformOtherFee']
|
|
2762
|
+
"other_service_fees_alloc": -1733.33,
|
|
2763
|
+
# 支出 - 亚马逊退款管理费用 [原字段 'refundAdministrationFees']
|
|
2764
|
+
"refund_administration_fees": -219.15,
|
|
2765
|
+
# 支出 - 总费用退款金额 [totalFeeRefunds]
|
|
2766
|
+
# (fba_selling_fee_refunds + fba_transaction_fee_refunds + refund_administration_fees)
|
|
2767
|
+
"total_fee_refunds": 996.96,
|
|
2768
|
+
# 支出 - 其他费用调整金额
|
|
2769
|
+
"adjustments": -163.14,
|
|
2770
|
+
# 支出 - 广告总花费 (Cost of Advertising) [原字段 'totalAdsCost']
|
|
2771
|
+
# (ads_sp_cost + ads_sb_cost + ads_sbv_cost + ads_sd_cost)
|
|
2772
|
+
"ads_cost": -27743.22,
|
|
2773
|
+
# 支出 - 广告总销售金额 [原字段 'totalAdsSales']
|
|
2774
|
+
"ads_sales": 142803.87,
|
|
2775
|
+
# 支出 - 广告总销售数量 [原字段 'totalAdsSalesQuantity']
|
|
2776
|
+
"ads_sales_qty": 3333,
|
|
2777
|
+
# 支出 - SP广告花费 (Sponsored Products) [原字段 'adsSpCost']
|
|
2778
|
+
"ads_sp_cost": -22291.36,
|
|
2779
|
+
# 支出 - SP广告销售金额 [原字段 'adsSpSales']
|
|
2780
|
+
"ads_sp_sales": 97531.25,
|
|
2781
|
+
# 支出 - SP广告销售数量 [原字段 'adsSpSalesQuantity']
|
|
2782
|
+
"ads_sp_sales_qty": 2305,
|
|
2783
|
+
# 支出 - SB广告花费 (Sponsored Brands) [原字段 'adsSbCost']
|
|
2784
|
+
"ads_sb_cost": -5451.86,
|
|
2785
|
+
# 支出 - SB广告销售金额 [原字段 'sharedAdsSbSales']
|
|
2786
|
+
"ads_sb_sales": 25464.72,
|
|
2787
|
+
# 支出 - SB广告销售数量 [原字段 'sharedAdsSbSalesQuantity']
|
|
2788
|
+
"ads_sb_sales_qty": 552,
|
|
2789
|
+
# 支出 - SBV广告花费 (Sponsored Brands Video) [原字段 'adsSbvCost']
|
|
2790
|
+
"ads_sbv_cost": 0.0,
|
|
2791
|
+
# 支出 - SBV广告销售金额 [原字段 'sharedAdsSbvSales']
|
|
2792
|
+
"ads_sbv_sales": 19807.9,
|
|
2793
|
+
# 支出 - SBV广告销售数量 [原字段 'sharedAdsSbvSalesQuantity']
|
|
2794
|
+
"ads_sbv_sales_qty": 476,
|
|
2795
|
+
# 支出 - SD广告花费 (Sponsored Display) [原字段 'adsSdCost']
|
|
2796
|
+
"ads_sd_cost": 0.0,
|
|
2797
|
+
# 支出 - SD广告销售金额 [原字段 'adsSdSales']
|
|
2798
|
+
"ads_sd_sales": 0.0,
|
|
2799
|
+
# 支出 - SD广告销售数量 [原字段 'adsSdSalesQuantity']
|
|
2800
|
+
"ads_sd_sales_qty": 0,
|
|
2801
|
+
# 支出 - 广告分摊费用 [原字段 'sharedCostOfAdvertising']
|
|
2802
|
+
"ads_cost_alloc": 0.0,
|
|
2803
|
+
# 支出 - 广告总退款金额 (Refund for Advertiser) [原字段 'refundForAdvertiser']
|
|
2804
|
+
"ads_cost_refunds": 0.0,
|
|
2805
|
+
# 支出 - 清算服务费 (分摊) [原字段 'sharedLiquidationsFees']
|
|
2806
|
+
"liquidation_service_fees_alloc": 0.0,
|
|
2807
|
+
# 支出 - 其他支出费用 [原字段 'others']
|
|
2808
|
+
"other_expenses": 0.0,
|
|
2809
|
+
# 支出 - 用户自定义推广总费用 [原字段 'customOrderFee']
|
|
2810
|
+
"user_promotion_fees": 0.0,
|
|
2811
|
+
# (user_promotion_principal + user_promotion_commission)
|
|
2812
|
+
# 支出 - 用户自定义推广费用本金 [原字段 'customOrderFeePrincipal']
|
|
2813
|
+
"user_promotion_principal": 0.0,
|
|
2814
|
+
# 支出 - 用户自定义推广佣金费用 [原字段 'customOrderFeeCommission']
|
|
2815
|
+
"user_promotion_commission": 0.0,
|
|
2816
|
+
# 支出 - 用户自定义其他费用 [原字段 'otherFeeStr']
|
|
2817
|
+
"user_other_fees": [],
|
|
2818
|
+
# 税费 - 总税费 [grossProfitTax]
|
|
2819
|
+
"total_tax": 0.0,
|
|
2820
|
+
# 税费 - 总销税收金额 [原字段 'totalSalesTax']
|
|
2821
|
+
# ('product_tax_collected' 到 'tcs_cgst_collected' 之间的所有税费)
|
|
2822
|
+
"sales_tax_collected": 15036.42,
|
|
2823
|
+
# 税费 - 商品销售税收金额 [原字段 'taxCollectedProduct']
|
|
2824
|
+
"product_tax_collected": 15006.18,
|
|
2825
|
+
# 税费 - 配送运费税收金额 [原字段 'taxCollectedShipping']
|
|
2826
|
+
"shipping_tax_collected": 18.58,
|
|
2827
|
+
# 税费 - 礼品包装税收金额 [原字段 'taxCollectedGiftWrap']
|
|
2828
|
+
"giftwrap_tax_collected": 0.0,
|
|
2829
|
+
# 税费 - 促销折扣税收金额 [原字段 'taxCollectedDiscount']
|
|
2830
|
+
"promotional_rebate_tax_collected": 0.0,
|
|
2831
|
+
# 税费 - VAT/GST税收金额 [原字段 'taxCollected']
|
|
2832
|
+
"vat_gst_tax_collected": 11.66,
|
|
2833
|
+
# 税费 - TCS IGST税收金额 (印度站) [原字段 'tcsIgstCollected']
|
|
2834
|
+
"tcs_igst_collected": 0.0,
|
|
2835
|
+
# 税费 - TCS SGST税收金额 (印度站) [原字段 'tcsSgstCollected']
|
|
2836
|
+
"tcs_sgst_collected": 0.0,
|
|
2837
|
+
# 税费 - TCS CGST税收金额 (印度站) [原字段 'tcsCgstCollected']
|
|
2838
|
+
"tcs_cgst_collected": 0.0,
|
|
2839
|
+
# 税费 - 总销售税代扣金额 [原字段 'salesTaxWithheld']
|
|
2840
|
+
"sales_tax_withheld": -15036.42,
|
|
2841
|
+
# 税费 - 总销售税费退款 [salesTaxRefund]
|
|
2842
|
+
"sales_tax_refunded": -784.31,
|
|
2843
|
+
# ('product_tax_refunded' 到 'sales_tax_withheld_refunded' 之间的所有税费退款)
|
|
2844
|
+
# 税费 - 商品销售税费退款金额 [原字段 'taxRefundedProduct']
|
|
2845
|
+
"product_tax_refunded": -783.0,
|
|
2846
|
+
# 税费 - 配送运费税费退款金额 [原字段 'taxRefundedShipping']
|
|
2847
|
+
"shipping_tax_refunded": -1.31,
|
|
2848
|
+
# 税费 - 礼品包装税费退款金额 [原字段 'taxRefundedGiftWrap']
|
|
2849
|
+
"giftwrap_tax_refunded": 0.0,
|
|
2850
|
+
# 税费 - 促销折扣税费退款金额 [原字段 'taxRefundedDiscount']
|
|
2851
|
+
"promotional_rebate_tax_refunded": 0.0,
|
|
2852
|
+
# 税费 - VAT/GST税费退款金额 [原字段 'taxRefunded']
|
|
2853
|
+
"vat_gst_tax_refunded": 0.0,
|
|
2854
|
+
# 税费 - TCS IGST税费退款金额 (印度站) [原字段 'tcsIgstRefunded']
|
|
2855
|
+
"tcs_igst_refunded": 0.0,
|
|
2856
|
+
# 税费 - TCS SGST税费退款金额 (印度站) [原字段 'tcsSgstRefunded']
|
|
2857
|
+
"tcs_sgst_refunded": 0.0,
|
|
2858
|
+
# 税费 - TCS CGST税费退款金额 (印度站) [原字段 'tcsCgstRefunded']
|
|
2859
|
+
"tcs_cgst_refunded": 0.0,
|
|
2860
|
+
# 税费 - 总退款税代扣金额 [原字段 'refundTaxWithheld']
|
|
2861
|
+
"refund_tax_withheld": 784.31,
|
|
2862
|
+
# 税费 - VAT进项税费金额 [原字段 'sharedComminglingVatIncome']
|
|
2863
|
+
"commingling_vat_income": 0.0,
|
|
2864
|
+
# 税费 - VAT销项税费金额 [原字段 'sharedComminglingVatExpenses']
|
|
2865
|
+
"commingling_vat_expenses": 0.0,
|
|
2866
|
+
# 税费 - TDS 194-O净额 (印度站) [原字段 'tdsSection194ONet']
|
|
2867
|
+
"tds_section_194o_net": 0.0,
|
|
2868
|
+
# 税费 - 其他税费调整 (分摊) [原字段 'sharedTaxAdjustment']
|
|
2869
|
+
"other_tax_adj_alloc": 0.0,
|
|
2870
|
+
# 成本 - 总退款数量 [原字段 'refundsQuantity']
|
|
2871
|
+
"total_refunds_qty": 329,
|
|
2872
|
+
# 成本 - 总退款率 [原字段 'refundsRate']
|
|
2873
|
+
# (total_refund_qty / (fba&fbm_product_sales_qty + fba_mcf_fulfillment_qty + fba_reshipment_qty))
|
|
2874
|
+
"total_refunds_rate": 0.0486,
|
|
2875
|
+
# 成本 - FBA退货数量 [原字段 'fbaReturnsQuantity']
|
|
2876
|
+
"fba_returns_qty": 363,
|
|
2877
|
+
# 成本 - FBA退货可售数量 [原字段 'fbaReturnsSaleableQuantity']
|
|
2878
|
+
"fba_returns_saleable_qty": 12,
|
|
2879
|
+
# 成本 - FBA退货不可售数量 [原字段 'fbaReturnsUnsaleableQuantity']
|
|
2880
|
+
"fba_returns_unsaleable_qty": 351,
|
|
2881
|
+
# 成本 - FBA退货率 [原字段 'fbaReturnsQuantityRate']
|
|
2882
|
+
# (fba_returns_qty / (fba_product_sales_qty + fba_mcf_fulfillment_qty))
|
|
2883
|
+
"fba_returns_rate": 0.054,
|
|
2884
|
+
# 成本 - 总补发/换货数量 [原字段 'totalReshipQuantity']
|
|
2885
|
+
"total_reshipment_qty": 50,
|
|
2886
|
+
# 成本 - FBA补发/换货数量 [原字段 'reshipFbaProductSalesQuantity']
|
|
2887
|
+
"fba_reshipment_qty": 47,
|
|
2888
|
+
# 成本 - FBA换货退回数量 [原字段 'reshipFbaProductSaleRefundsQuantity']
|
|
2889
|
+
"fba_reshipment_returned_qty": 3,
|
|
2890
|
+
# 成本 - FBM补发/换货数量 [原字段 'reshipFbmProductSalesQuantity']
|
|
2891
|
+
"fbm_reshipment_qty": 0,
|
|
2892
|
+
# 成本 - FBM换货退回数量 [原字段 'reshipFbmProductSaleRefundsQuantity']
|
|
2893
|
+
"fbm_reshipment_returned_qty": 0,
|
|
2894
|
+
# 成本 - 总成本数量 [原字段 'cgQuantity']
|
|
2895
|
+
# (fba&fbm_product_sales_qty + fba_mcf_fulfillment_qty + fba&fbm_reshipment_qty - fba_returns_saleable_qty)
|
|
2896
|
+
"cost_of_goods_qty": -6757,
|
|
2897
|
+
# 成本 - 总成本金额 (COGS) [原字段 'totalCost']
|
|
2898
|
+
# (purchase_cost + logistics_cost + other_costs)
|
|
2899
|
+
"cost_of_goods": -100790.7,
|
|
2900
|
+
# 成本 - 总成本占比 [原字段 'proportionOfTotalCost']
|
|
2901
|
+
"cost_of_goods_ratio": 0.4272,
|
|
2902
|
+
# 成本 - 总采购成本 (COGS) [原字段 'cgPriceTotal']
|
|
2903
|
+
"purchase_cost": -100790.7,
|
|
2904
|
+
# 成本 - 单品成本 [原字段 'cgUnitPrice']
|
|
2905
|
+
"purchase_unit_cost": 14.93,
|
|
2906
|
+
# 成本 - 采购成本占比 [原字段 'proportionOfCg']
|
|
2907
|
+
"purchase_cost_ratio": 0.4272,
|
|
2908
|
+
# 成本 - 是否有成本明细 [原字段 'hasCgPriceDetail']
|
|
2909
|
+
"has_purchase_cost_detail": 1,
|
|
2910
|
+
# 成本 - 总物流费用 [原字段 'cgTransportCostsTotal']
|
|
2911
|
+
"logistics_cost": 0.0,
|
|
2912
|
+
# 成本 - 物流单品费用 [原字段 'cgTransportUnitCosts']
|
|
2913
|
+
"logistics_unit_cost": 0.0,
|
|
2914
|
+
# 成本 - 物流费用占比 [原字段 'proportionOfCgTransport']
|
|
2915
|
+
"logistics_cost_ratio": 0.0,
|
|
2916
|
+
# 成本 - 是否有物流费用明细 [原字段 'hasCgTransportCostsDetail']
|
|
2917
|
+
"has_logistics_cost_detail": 1,
|
|
2918
|
+
# 成本 - 其他费用总金额 [原字段 'cgOtherCostsTotal']
|
|
2919
|
+
"other_costs": 0.0,
|
|
2920
|
+
# 成本 - 其他费用单品金额 [原字段 'cgOtherUnitCosts']
|
|
2921
|
+
"other_unit_cost": 0.0,
|
|
2922
|
+
# 成本 - 其他费用占比 [原字段 'proportionOfCgOtherCosts']
|
|
2923
|
+
"other_cost_ratio": 0.0,
|
|
2924
|
+
# 成本 - 是否有其他费用明细 [原字段 'hasCgOtherCostsDetail']
|
|
2925
|
+
"has_other_cost_detail": 0,
|
|
2926
|
+
# 利润 - 毛利润 [原字段 'grossProfit']
|
|
2927
|
+
"gross_profit": 47219.53,
|
|
2928
|
+
# 利润 - 毛利率 [原字段 'grossRate']
|
|
2929
|
+
"gross_profit_margin": 0.2131,
|
|
2930
|
+
# 利润 - 投资回报率 (ROI)
|
|
2931
|
+
"roi": 0.2693,
|
|
2932
|
+
# 交易状态 [原字段 'transactionStatusCode']
|
|
2933
|
+
"transaction_status": "Disbursed",
|
|
2934
|
+
# 交易状态描述 [原字段 'transactionStatus']
|
|
2935
|
+
"transaction_status_desc": "已发放",
|
|
2936
|
+
# 延迟结算状态 [原字段 'deferredSubStatusCode']
|
|
2937
|
+
"deferred_settlement_status": "Disbursed",
|
|
2938
|
+
# 延迟结算状态描述 [原字段 'deferredSubStatus']
|
|
2939
|
+
"deferred_settlement_status_desc": "",
|
|
2940
|
+
# 延迟结算总金额 [原字段 'deferredSettlementAmount']
|
|
2941
|
+
"deferred_settlement": 186019.17,
|
|
2942
|
+
# 结算小计 [原字段 'settlementSubtotal']
|
|
2943
|
+
"settlement_subtotal": 186019.17,
|
|
2944
|
+
# 报告时间 (本地时间) [原字段 'postedDateDayLocale']
|
|
2945
|
+
"report_time_loc": "",
|
|
2946
|
+
# 报告开始时间 (本地时间) [原字段 'minPostedDateDayLocale']
|
|
2947
|
+
"report_start_time_loc": "",
|
|
2948
|
+
# 报告结束时间 (本地时间) [原字段 'maxPostedDateDayLocale']
|
|
2949
|
+
"report_end_time_loc": "",
|
|
2950
|
+
# 报告日期 (本地时间) [原字段 'postedDateLocale']
|
|
2951
|
+
"report_date_loc": "2025-08",
|
|
2952
|
+
# 记录ID (非业务唯一键)
|
|
2953
|
+
"id": "65545075457********",
|
|
2954
|
+
# 领星店铺ID
|
|
2955
|
+
"sid": 1,
|
|
2956
|
+
# 领星店铺名称 [原字段 'storeName']
|
|
2957
|
+
"seller_name": "Store-US",
|
|
2958
|
+
# 国家 (中文)
|
|
2959
|
+
"country": "美国",
|
|
2960
|
+
# 国家代码 [原字段 'countryCode']
|
|
2961
|
+
"country_code": "US",
|
|
2962
|
+
# 商品ASIN
|
|
2963
|
+
"asin": "B07*******",
|
|
2964
|
+
# 商品父ASIN [原字段 'parentAsin']
|
|
2965
|
+
"parent_asin": "B08*******",
|
|
2966
|
+
# 关联的ASIN列表 [原字段 'asins']
|
|
2967
|
+
"asins": ["B07*******", "B08*******"],
|
|
2968
|
+
# 亚马逊SKU
|
|
2969
|
+
"msku": "SKU********",
|
|
2970
|
+
# 领星本地SKU [原字段 'localSku']
|
|
2971
|
+
"lsku": "LOCAL********",
|
|
2972
|
+
# 领星本地商品名称 [原字段 'localName']
|
|
2973
|
+
"product_name": "JBL",
|
|
2974
|
+
# 产品型号 [原字段 'model']
|
|
2975
|
+
"product_model": "KX6702",
|
|
2976
|
+
# 领星本地产品分类名称 [原字段 'categoryName']
|
|
2977
|
+
"category_name": "",
|
|
2978
|
+
# 领星本地产品品牌名称 [原字段 'brandName']
|
|
2979
|
+
"brand_name": "",
|
|
2980
|
+
# 标题 [原字段 'itemName']
|
|
2981
|
+
"title": "Product Title",
|
|
2982
|
+
# 商品略缩图链接 [原字段 'smallImageUrl']
|
|
2983
|
+
"thumbnail_url": "https://m.media-amazon.com/images/****.jpg",
|
|
2984
|
+
# ASIN开发人名称 [原字段 'productDeveloperRealname']
|
|
2985
|
+
"developer_name": "",
|
|
2986
|
+
# ASIN负责人名称 (逗号隔开) [原字段 'principalRealname']
|
|
2987
|
+
"operator_names": "白小白,黑小黑",
|
|
2988
|
+
# 商品标签IDs (逗号隔开) [原字段 'listingTagIds']
|
|
2989
|
+
"tag_ids": "907476839534375430, 907476656619287314, 907476656619287354",
|
|
2990
|
+
},
|
|
2991
|
+
...
|
|
2992
|
+
]
|
|
2993
|
+
}
|
|
2994
|
+
```
|
|
2995
|
+
"""
|
|
2996
|
+
url = route.INCOME_STATEMENT_MSKUS
|
|
2997
|
+
# 构建参数
|
|
2998
|
+
args = {
|
|
2999
|
+
"start_date": start_date,
|
|
3000
|
+
"end_date": end_date,
|
|
3001
|
+
"mids": mids,
|
|
3002
|
+
"sids": sids,
|
|
3003
|
+
"query_dimension": query_dimension,
|
|
3004
|
+
"transaction_status": transaction_status,
|
|
3005
|
+
"summarize": summarize,
|
|
3006
|
+
"currency_code": currency_code,
|
|
3007
|
+
"search_field": None if search_value is None else "seller_sku",
|
|
3008
|
+
"search_value": search_value,
|
|
3009
|
+
"offset": offset,
|
|
3010
|
+
"length": length,
|
|
3011
|
+
}
|
|
3012
|
+
try:
|
|
3013
|
+
p = param.IncomeStatement.model_validate(args)
|
|
3014
|
+
except Exception as err:
|
|
3015
|
+
raise errors.InvalidParametersError(err, url, args) from err
|
|
3016
|
+
|
|
3017
|
+
# 发送请求
|
|
3018
|
+
data = await self._request_with_sign("POST", url, body=p.model_dump_params())
|
|
3019
|
+
return schema.IncomeStatementMskus.model_validate(data)
|
|
3020
|
+
|
|
3021
|
+
async def IncomeStatementLskus(
|
|
3022
|
+
self,
|
|
3023
|
+
start_date: str | datetime.date | datetime.datetime,
|
|
3024
|
+
end_date: str | datetime.date | datetime.datetime,
|
|
3025
|
+
*,
|
|
3026
|
+
query_dimension: int | None = None,
|
|
3027
|
+
mids: int | list[int] | None = None,
|
|
3028
|
+
sids: int | list[int] | None = None,
|
|
3029
|
+
transaction_status: INCOME_STATEMENT_TRANSACTION_STATUS | None = None,
|
|
3030
|
+
summarize: int | None = None,
|
|
3031
|
+
currency_code: str | None = None,
|
|
3032
|
+
search_value: str | list[str] | None = None,
|
|
3033
|
+
offset: int | None = None,
|
|
3034
|
+
length: int | None = None,
|
|
3035
|
+
) -> schema.IncomeStatementLskus:
|
|
3036
|
+
"""查询损益报告-领星本地SKU维度
|
|
3037
|
+
|
|
3038
|
+
## Docs
|
|
3039
|
+
- 财务: [查询利润报表-SKU](https://apidoc.lingxing.com/#/docs/Finance/bdSKU)
|
|
3040
|
+
|
|
3041
|
+
:param start_date `<'str/date/datetime'>`: 统计开始日期, 闭合区间
|
|
3042
|
+
:param end_date `<'str/date/datetime'>`: 统计结束日期, 闭合区间
|
|
3043
|
+
:param query_dimension `<'int/None'>`: 查询维度, 默认 `None` (使用: 0), 可选值:
|
|
3044
|
+
|
|
3045
|
+
- `0`: 天维度, 开始和结束时间跨度不能超过31天
|
|
3046
|
+
- `1`: 月维度, 开始和结束时间跨度不能超过1个月
|
|
3047
|
+
|
|
3048
|
+
:param mids `<'int/list[int]/None'>`: 领星站点ID或ID列表 (Seller.mid), 默认 `None` (不筛选)
|
|
3049
|
+
:param sids `<'int/list[int]/None'>`: 领星店铺ID或ID列表 (Seller.sid), 默认 `None` (不筛选)
|
|
3050
|
+
:param transaction_status `<'int/None'>`: 交易状态, 默认 `None` (使用: 'Disbursed'), 可选值:
|
|
3051
|
+
|
|
3052
|
+
- `'Deferred'`: 订单未进入Transaction报告, 无法回款
|
|
3053
|
+
- `'Disbursed'`: 订单已进入Transaction报告, 可以回款
|
|
3054
|
+
- `'DisbursedAndSettled'`: 可以回款和预结算订单
|
|
3055
|
+
- `'All'`: 所有状态
|
|
3056
|
+
|
|
3057
|
+
:param summarize `<'int/None'>`: 是否返回汇总数据, 默认 `None` (使用: 0), 可选值:
|
|
3058
|
+
|
|
3059
|
+
- `0`: 返回原始数据
|
|
3060
|
+
- `1`: 返回汇总数据
|
|
3061
|
+
|
|
3062
|
+
:param currency_code `<'str/None'>`: 结算金额目标转换货币代码, 默认 `None` (保持原结算货币)
|
|
3063
|
+
:param search_value `<'str/list[str]/None'>`: 搜索值, 默认 `None` (不筛选), 可传入单个领星本地SKU或SKU列表
|
|
3064
|
+
:param offset `<'int/None'>`: 分页偏移量, 默认 `None` (使用: 0)
|
|
3065
|
+
:param length `<'int/None'>`: 分页长度, 最大值 10000, 默认 `None` (使用: 15)
|
|
3066
|
+
:returns `<'IncomeStatementLskus'>`: 查询到的损益报告-领星本地SKU维度结果
|
|
3067
|
+
"""
|
|
3068
|
+
url = route.INCOME_STATEMENT_LSKUS
|
|
3069
|
+
# 构建参数
|
|
3070
|
+
args = {
|
|
3071
|
+
"start_date": start_date,
|
|
3072
|
+
"end_date": end_date,
|
|
3073
|
+
"mids": mids,
|
|
3074
|
+
"sids": sids,
|
|
3075
|
+
"query_dimension": query_dimension,
|
|
3076
|
+
"transaction_status": transaction_status,
|
|
3077
|
+
"summarize": summarize,
|
|
3078
|
+
"currency_code": currency_code,
|
|
3079
|
+
"search_field": None if search_value is None else "local_sku",
|
|
3080
|
+
"search_value": search_value,
|
|
3081
|
+
"offset": offset,
|
|
3082
|
+
"length": length,
|
|
3083
|
+
}
|
|
3084
|
+
try:
|
|
3085
|
+
p = param.IncomeStatement.model_validate(args)
|
|
3086
|
+
except Exception as err:
|
|
3087
|
+
raise errors.InvalidParametersError(err, url, args) from err
|
|
3088
|
+
|
|
3089
|
+
# 发送请求
|
|
3090
|
+
data = await self._request_with_sign("POST", url, body=p.model_dump_params())
|
|
3091
|
+
return schema.IncomeStatementLskus.model_validate(data)
|