ebay-api 8.1.0 → 8.2.0
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.
- package/README.md +2 -2
- package/dist/api/restful/sell/account/index.d.ts +83 -2
- package/dist/api/restful/sell/account/index.js +135 -5
- package/dist/ebay-api.min.mjs +1 -1
- package/dist/types/restfulTypes.d.ts +7 -0
- package/lib/api/restful/sell/account/index.d.ts +83 -2
- package/lib/api/restful/sell/account/index.js +135 -5
- package/lib/ebay-api.min.js +1 -1
- package/lib/types/restfulTypes.d.ts +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ It supports `client credentials grant` and `authorization code grant` \(Auth'N'A
|
|
|
21
21
|
|
|
22
22
|
## Changelog
|
|
23
23
|
|
|
24
|
-
* `v8.
|
|
24
|
+
* `v8.2.0` is the latest release.
|
|
25
25
|
* See [here](https://github.com/hendt/ebay-api/blob/master/CHANGELOG.md) for the full changelog.
|
|
26
26
|
|
|
27
27
|
## Implementation status
|
|
@@ -34,7 +34,7 @@ It supports `client credentials grant` and `authorization code grant` \(Auth'N'A
|
|
|
34
34
|
| **Commerce API** | ✔ Catalog API<br>✔ Charity API `v1.2.0`<br>✔ Identity API<br>✔ Notification API `v1.2.0`<br>✔ Taxonomy API `v1.0.0`<br>✔ Translation API `v1_beta.1.4` |
|
|
35
35
|
| **Developer API** | ✔ Analytics API |
|
|
36
36
|
| **Post Order API** | ✔ Cancellation API<br>✔ Case Management API<br>✔ Inquiry API<br>✔ Return API |
|
|
37
|
-
| **Sell API** | ✔ Account API `v1.
|
|
37
|
+
| **Sell API** | ✔ Account API `v1.9.0`<br>✔ Analytics API `v1.3.0`<br>✔ Compliance API `v1.4.1`<br>✔ Feed API<br>✔ Finance API `v1.9.0`<br>✔ Fulfillment API `v1.19.10`<br>✔ Inventory API `v1.14.0`<br>✔ Listing API<br>✔ Logistics API<br>✔ Marketing API `v1.10.0`<br>✔ Metadata API<br>✔ Negotiation API `v1.1.0`<br>✔ Recommendation API `v1.1.0` |
|
|
38
38
|
|
|
39
39
|
### Traditional API
|
|
40
40
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Restful from '../../index.js';
|
|
2
|
-
import { FulfillmentPolicyRequest, PaymentPolicyRequest, Program, ReturnPolicyRequest, SalesTaxBase } from '../../../../types/index.js';
|
|
3
1
|
import { PaymentsProgramType } from '../../../../enums/index.js';
|
|
2
|
+
import { CustomPolicyCreateRequest, CustomPolicyRequest, FulfillmentPolicyRequest, InventoryLocation, InventoryLocationFull, PaymentPolicyRequest, Program, ReturnPolicyRequest, SalesTaxBase } from '../../../../types/index.js';
|
|
3
|
+
import Restful from '../../index.js';
|
|
4
4
|
/**
|
|
5
5
|
* The <b>Account API</b> gives sellers the ability to configure their eBay seller accounts,
|
|
6
6
|
* including the seller's policies (the Fulfillment Policy, Payment Policy, and Return Policy),
|
|
@@ -9,6 +9,27 @@ import { PaymentsProgramType } from '../../../../enums/index.js';
|
|
|
9
9
|
export default class Account extends Restful {
|
|
10
10
|
static id: string;
|
|
11
11
|
get basePath(): string;
|
|
12
|
+
/**
|
|
13
|
+
* This method retrieves the list of custom policies specified by the <b>policy_types</b> query parameter for the selected eBay marketplace.
|
|
14
|
+
* @param policyTypes This query parameter specifies the type of custom policies to be returned.
|
|
15
|
+
*/
|
|
16
|
+
getCustomPolicies(policyTypes: string): Promise<any>;
|
|
17
|
+
/**
|
|
18
|
+
* This method creates a new custom policy in which a seller specifies their terms for complying with local governmental regulations.
|
|
19
|
+
* @param body Request to create a new Custom Policy.
|
|
20
|
+
*/
|
|
21
|
+
createCustomPolicy(body: CustomPolicyCreateRequest): Promise<any>;
|
|
22
|
+
/**
|
|
23
|
+
* This method retrieves the custom policy specified by the <b>custom_policy_id</b> path parameter for the selected eBay marketplace.
|
|
24
|
+
* @param customPolicyId This path parameter is the unique custom policy identifier for the policy to be returned.
|
|
25
|
+
*/
|
|
26
|
+
getCustomPolicy(customPolicyId: string): Promise<any>;
|
|
27
|
+
/**
|
|
28
|
+
* This method updates an existing custom policy specified by the <b>custom_policy_id</b> path parameter for the selected marketplace.
|
|
29
|
+
* @param customPolicyId This path parameter is the unique custom policy identifier for the policy to be returned.
|
|
30
|
+
* @param body Request to update a current custom policy.
|
|
31
|
+
*/
|
|
32
|
+
updateCustomPolicy(customPolicyId: string, body: CustomPolicyRequest): Promise<any>;
|
|
12
33
|
/**
|
|
13
34
|
* This method retrieves all the fulfillment policies configured for the marketplace you specify using the
|
|
14
35
|
* marketplace_id query parameter.
|
|
@@ -210,8 +231,68 @@ export default class Account extends Restful {
|
|
|
210
231
|
* tax table you want to retrieve.
|
|
211
232
|
*/
|
|
212
233
|
getSalesTaxes(countryCode: string): Promise<any>;
|
|
234
|
+
/**
|
|
235
|
+
* This method retrieves a list of subscriptions associated with the seller account.
|
|
236
|
+
* @param limit This field is for future use.
|
|
237
|
+
* @param continuationToken This field is for future use.
|
|
238
|
+
*/
|
|
239
|
+
getSubscription({ limit, continuationToken }?: {
|
|
240
|
+
limit?: string;
|
|
241
|
+
continuationToken?: string;
|
|
242
|
+
}): Promise<any>;
|
|
213
243
|
/**
|
|
214
244
|
* his method is used by sellers onboarded for eBay managed payments, or sellers who are currently going through, or who are eligible for onboarding for eBay managed payments.
|
|
215
245
|
*/
|
|
216
246
|
getKYC(): Promise<any>;
|
|
247
|
+
/**
|
|
248
|
+
* This method allows developers to check the seller eligibility status for eBay advertising programs.
|
|
249
|
+
* @param programTypes A comma-separated list of eBay advertising programs.
|
|
250
|
+
*/
|
|
251
|
+
getAdvertisingEligibility(programTypes?: string): Promise<any>;
|
|
252
|
+
/**
|
|
253
|
+
* This call retrieves all defined details of the inventory location that is specified by the <b>merchantLocationKey</b> path parameter.
|
|
254
|
+
* @param merchantLocationKey A unique merchant-defined key (ID) for an inventory location.
|
|
255
|
+
*/
|
|
256
|
+
getInventoryLocation(merchantLocationKey: string): Promise<any>;
|
|
257
|
+
/**
|
|
258
|
+
* <p>Use this call to create a new inventory location.
|
|
259
|
+
* @param merchantLocationKey A unique, merchant-defined key (ID) for an inventory location.
|
|
260
|
+
* @param body Inventory Location details
|
|
261
|
+
*/
|
|
262
|
+
createInventoryLocation(merchantLocationKey: string, body: InventoryLocationFull): Promise<any>;
|
|
263
|
+
/**
|
|
264
|
+
* <p>This call deletes the inventory location that is specified in the <code>merchantLocationKey</code> path parameter.
|
|
265
|
+
* @param merchantLocationKey
|
|
266
|
+
*/
|
|
267
|
+
deleteInventoryLocation(merchantLocationKey: string): Promise<any>;
|
|
268
|
+
/**
|
|
269
|
+
* <p>This call disables the inventory location that is specified in the <code>merchantLocationKey</code> path parameter.
|
|
270
|
+
* @param merchantLocationKey A unique merchant-defined key (ID) for an inventory location.
|
|
271
|
+
*/
|
|
272
|
+
disableInventoryLocation(merchantLocationKey: string): Promise<any>;
|
|
273
|
+
/**
|
|
274
|
+
* <p>This call enables a disabled inventory location that is specified in the <code>merchantLocationKey</code> path parameter.
|
|
275
|
+
* @param merchantLocationKey A unique merchant-defined key (ID) for an inventory location.
|
|
276
|
+
*/
|
|
277
|
+
enableInventoryLocation(merchantLocationKey: string): Promise<any>;
|
|
278
|
+
/**
|
|
279
|
+
* This call retrieves all defined details for every inventory location associated with the seller's account.
|
|
280
|
+
* @param limit The value passed in this query parameter sets the maximum number of records to return per page of data.
|
|
281
|
+
* @param offset Specifies the number of locations to skip in the result set before returning the first location in the paginated response.
|
|
282
|
+
*/
|
|
283
|
+
getInventoryLocations({ limit, offset }?: {
|
|
284
|
+
limit?: number;
|
|
285
|
+
offset?: number;
|
|
286
|
+
}): Promise<any>;
|
|
287
|
+
/**
|
|
288
|
+
* <p>Use this call to update non-physical location details for an existing inventory location.
|
|
289
|
+
* @param merchantLocationKey A unique merchant-defined key (ID) for an inventory location.
|
|
290
|
+
* @param body The inventory location details to be updated (other than the address and geo co-ordinates).
|
|
291
|
+
*/
|
|
292
|
+
updateInventoryLocation(merchantLocationKey: string, body: InventoryLocation): Promise<any>;
|
|
293
|
+
/**
|
|
294
|
+
* This method retrieves all the sales tax jurisdictions for the country that you specify in the <b>countryCode</b> path parameter.
|
|
295
|
+
* @param countryCode This path parameter specifies the two-letter <a href="https://www.iso.org/iso-3166-country-codes.html " title="https://www.iso.org " target="_blank">ISO 3166</a> country code for the country whose jurisdictions you want to retrieve. eBay provides sales tax jurisdiction information for Canada and the United States.
|
|
296
|
+
*/
|
|
297
|
+
getSalesTaxJurisdictions(countryCode: string): Promise<any>;
|
|
217
298
|
}
|
|
@@ -8,6 +8,41 @@ export default class Account extends Restful {
|
|
|
8
8
|
get basePath() {
|
|
9
9
|
return '/sell/account/v1';
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* This method retrieves the list of custom policies specified by the <b>policy_types</b> query parameter for the selected eBay marketplace.
|
|
13
|
+
* @param policyTypes This query parameter specifies the type of custom policies to be returned.
|
|
14
|
+
*/
|
|
15
|
+
getCustomPolicies(policyTypes) {
|
|
16
|
+
return this.get(`/custom_policy/`, {
|
|
17
|
+
params: {
|
|
18
|
+
policy_types: policyTypes
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* This method creates a new custom policy in which a seller specifies their terms for complying with local governmental regulations.
|
|
24
|
+
* @param body Request to create a new Custom Policy.
|
|
25
|
+
*/
|
|
26
|
+
createCustomPolicy(body) {
|
|
27
|
+
return this.post(`/custom_policy/`, body);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* This method retrieves the custom policy specified by the <b>custom_policy_id</b> path parameter for the selected eBay marketplace.
|
|
31
|
+
* @param customPolicyId This path parameter is the unique custom policy identifier for the policy to be returned.
|
|
32
|
+
*/
|
|
33
|
+
getCustomPolicy(customPolicyId) {
|
|
34
|
+
customPolicyId = encodeURIComponent(customPolicyId);
|
|
35
|
+
return this.get(`/custom_policy/${customPolicyId}`);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* This method updates an existing custom policy specified by the <b>custom_policy_id</b> path parameter for the selected marketplace.
|
|
39
|
+
* @param customPolicyId This path parameter is the unique custom policy identifier for the policy to be returned.
|
|
40
|
+
* @param body Request to update a current custom policy.
|
|
41
|
+
*/
|
|
42
|
+
updateCustomPolicy(customPolicyId, body) {
|
|
43
|
+
customPolicyId = encodeURIComponent(customPolicyId);
|
|
44
|
+
return this.put(`/custom_policy/${customPolicyId}`, body);
|
|
45
|
+
}
|
|
11
46
|
/**
|
|
12
47
|
* This method retrieves all the fulfillment policies configured for the marketplace you specify using the
|
|
13
48
|
* marketplace_id query parameter.
|
|
@@ -28,7 +63,7 @@ export default class Account extends Restful {
|
|
|
28
63
|
* @param body Request to create a seller account fulfillment policy.
|
|
29
64
|
*/
|
|
30
65
|
createFulfillmentPolicy(body) {
|
|
31
|
-
return this.post(`/fulfillment_policy
|
|
66
|
+
return this.post(`/fulfillment_policy/`, body);
|
|
32
67
|
}
|
|
33
68
|
/**
|
|
34
69
|
* This method updates an existing fulfillment policy.
|
|
@@ -37,8 +72,8 @@ export default class Account extends Restful {
|
|
|
37
72
|
* @param body Request to create a seller account fulfillment policy.
|
|
38
73
|
*/
|
|
39
74
|
updateFulfillmentPolicy(fulfillmentPolicyId, body) {
|
|
40
|
-
|
|
41
|
-
return this.put(`/fulfillment_policy/${
|
|
75
|
+
fulfillmentPolicyId = encodeURIComponent(fulfillmentPolicyId);
|
|
76
|
+
return this.put(`/fulfillment_policy/${fulfillmentPolicyId}`, body);
|
|
42
77
|
}
|
|
43
78
|
/**
|
|
44
79
|
* This method deletes a fulfillment policy.
|
|
@@ -46,8 +81,8 @@ export default class Account extends Restful {
|
|
|
46
81
|
* @param fulfillmentPolicyId This path parameter specifies the ID of the fulfillment policy to delete.
|
|
47
82
|
*/
|
|
48
83
|
deleteFulfillmentPolicy(fulfillmentPolicyId) {
|
|
49
|
-
|
|
50
|
-
return this.delete(`/fulfillment_policy/${
|
|
84
|
+
fulfillmentPolicyId = encodeURIComponent(fulfillmentPolicyId);
|
|
85
|
+
return this.delete(`/fulfillment_policy/${fulfillmentPolicyId}`);
|
|
51
86
|
}
|
|
52
87
|
/**
|
|
53
88
|
* This method retrieves the complete details of a fulfillment policy.
|
|
@@ -320,11 +355,106 @@ export default class Account extends Restful {
|
|
|
320
355
|
}
|
|
321
356
|
});
|
|
322
357
|
}
|
|
358
|
+
/**
|
|
359
|
+
* This method retrieves a list of subscriptions associated with the seller account.
|
|
360
|
+
* @param limit This field is for future use.
|
|
361
|
+
* @param continuationToken This field is for future use.
|
|
362
|
+
*/
|
|
363
|
+
getSubscription({ limit, continuationToken } = {}) {
|
|
364
|
+
return this.get(`/subscription`, {
|
|
365
|
+
params: {
|
|
366
|
+
limit,
|
|
367
|
+
continuation_token: continuationToken
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
}
|
|
323
371
|
/**
|
|
324
372
|
* his method is used by sellers onboarded for eBay managed payments, or sellers who are currently going through, or who are eligible for onboarding for eBay managed payments.
|
|
325
373
|
*/
|
|
326
374
|
getKYC() {
|
|
327
375
|
return this.get(`/kyc`);
|
|
328
376
|
}
|
|
377
|
+
/**
|
|
378
|
+
* This method allows developers to check the seller eligibility status for eBay advertising programs.
|
|
379
|
+
* @param programTypes A comma-separated list of eBay advertising programs.
|
|
380
|
+
*/
|
|
381
|
+
getAdvertisingEligibility(programTypes) {
|
|
382
|
+
return this.get(`/advertising_eligibility`, {
|
|
383
|
+
params: {
|
|
384
|
+
program_types: programTypes
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* This call retrieves all defined details of the inventory location that is specified by the <b>merchantLocationKey</b> path parameter.
|
|
390
|
+
* @param merchantLocationKey A unique merchant-defined key (ID) for an inventory location.
|
|
391
|
+
*/
|
|
392
|
+
getInventoryLocation(merchantLocationKey) {
|
|
393
|
+
merchantLocationKey = encodeURIComponent(merchantLocationKey);
|
|
394
|
+
return this.get(`/location/${merchantLocationKey}`);
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* <p>Use this call to create a new inventory location.
|
|
398
|
+
* @param merchantLocationKey A unique, merchant-defined key (ID) for an inventory location.
|
|
399
|
+
* @param body Inventory Location details
|
|
400
|
+
*/
|
|
401
|
+
createInventoryLocation(merchantLocationKey, body) {
|
|
402
|
+
merchantLocationKey = encodeURIComponent(merchantLocationKey);
|
|
403
|
+
return this.post(`/location/${merchantLocationKey}`, body);
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* <p>This call deletes the inventory location that is specified in the <code>merchantLocationKey</code> path parameter.
|
|
407
|
+
* @param merchantLocationKey
|
|
408
|
+
*/
|
|
409
|
+
deleteInventoryLocation(merchantLocationKey) {
|
|
410
|
+
merchantLocationKey = encodeURIComponent(merchantLocationKey);
|
|
411
|
+
return this.delete(`/location/${merchantLocationKey}`);
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* <p>This call disables the inventory location that is specified in the <code>merchantLocationKey</code> path parameter.
|
|
415
|
+
* @param merchantLocationKey A unique merchant-defined key (ID) for an inventory location.
|
|
416
|
+
*/
|
|
417
|
+
disableInventoryLocation(merchantLocationKey) {
|
|
418
|
+
merchantLocationKey = encodeURIComponent(merchantLocationKey);
|
|
419
|
+
return this.post(`/location/${merchantLocationKey}/disable`);
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* <p>This call enables a disabled inventory location that is specified in the <code>merchantLocationKey</code> path parameter.
|
|
423
|
+
* @param merchantLocationKey A unique merchant-defined key (ID) for an inventory location.
|
|
424
|
+
*/
|
|
425
|
+
enableInventoryLocation(merchantLocationKey) {
|
|
426
|
+
merchantLocationKey = encodeURIComponent(merchantLocationKey);
|
|
427
|
+
return this.post(`/location/${merchantLocationKey}/enable`);
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* This call retrieves all defined details for every inventory location associated with the seller's account.
|
|
431
|
+
* @param limit The value passed in this query parameter sets the maximum number of records to return per page of data.
|
|
432
|
+
* @param offset Specifies the number of locations to skip in the result set before returning the first location in the paginated response.
|
|
433
|
+
*/
|
|
434
|
+
getInventoryLocations({ limit, offset } = {}) {
|
|
435
|
+
return this.get(`/location`, {
|
|
436
|
+
params: {
|
|
437
|
+
limit,
|
|
438
|
+
offset
|
|
439
|
+
}
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* <p>Use this call to update non-physical location details for an existing inventory location.
|
|
444
|
+
* @param merchantLocationKey A unique merchant-defined key (ID) for an inventory location.
|
|
445
|
+
* @param body The inventory location details to be updated (other than the address and geo co-ordinates).
|
|
446
|
+
*/
|
|
447
|
+
updateInventoryLocation(merchantLocationKey, body) {
|
|
448
|
+
merchantLocationKey = encodeURIComponent(merchantLocationKey);
|
|
449
|
+
return this.post(`/location/${merchantLocationKey}/update_location_details`, body);
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* This method retrieves all the sales tax jurisdictions for the country that you specify in the <b>countryCode</b> path parameter.
|
|
453
|
+
* @param countryCode This path parameter specifies the two-letter <a href="https://www.iso.org/iso-3166-country-codes.html " title="https://www.iso.org " target="_blank">ISO 3166</a> country code for the country whose jurisdictions you want to retrieve. eBay provides sales tax jurisdiction information for Canada and the United States.
|
|
454
|
+
*/
|
|
455
|
+
getSalesTaxJurisdictions(countryCode) {
|
|
456
|
+
countryCode = encodeURIComponent(countryCode);
|
|
457
|
+
return this.get(`/country/${countryCode}/sales_tax_jurisdiction`);
|
|
458
|
+
}
|
|
329
459
|
}
|
|
330
460
|
Account.id = 'Account';
|