Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] TikTok Shop API Upgrade to v202309 #31

Merged
merged 15 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,14 @@

<summary>[展开查看]</summary>

- Release 3.1.0 (2024-05-15)

- **新增**:接入新版本 API(即 v202309 API)。

- **新增**:新增反序列化 Webhook 事件相关的工具方法。

- **变更**:独立化旧版本 API。

- Release 3.0.0 (2024-03-04)

- **新增**:新增获取商品库存列表接口。
Expand Down
119 changes: 119 additions & 0 deletions docs/TikTokGlobalShop/Basic_LegacyAPI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
## Legacy API (pre-v202309)

Legacy API versions (pre-v202309) will no longer be supported or maintained from 2024-06-30 and will be retired on 2024-12-31.

New apps should use v202309 exclusively and not legacy versions.

Since version v3.1.0 in this SDK, We have isolated the legacy versions API. If you are still using them, please follow below:

```csharp
using SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.ExtendedSDK.Legacy;

var options = new TikTokShopLegacyClientOptions()
{
AppKey = "${APP_KEY}",
AppSecret = "${APP_SECRET}}"
};
var client = new TikTokShopLegacyClientBuilder.Create(options).Build();
```

---

### APIs

<details>

<summary>[View Details]</summary>

- Authorization
- Get Access Token: `AuthGetToken`
- Refresh Access Token: `AuthRefreshToken`
- Shop
- Get Authorized Shop: `ShopGetAuthorizedShopList`
- Seller
- Get Active Shop List: `SellerGetGlobalActiveShopList`
- Check Global Product Mode: `SellerCheckGlobalProductMode`
- Product
- Upload File: `ProductUploadFile`
- Upload Image: `ProductUploadImage`
- Create Product: `ProductCreateProduct`
- Delete Product: `ProductDeleteProducts`
- Edit Product: `ProductUpdateProduct`
- Update Stock: `ProductUpdateProductStock`
- Get Product List: `ProductSearchProducts`
- Get Product Detail: `ProductGetProductDetail`
- Get Product Stock: `ProductGetProductStocks`
- Deactivate Product: `ProductDeactivateProducts`
- Activate Product: `ProductActivateProducts`
- Recover Deleted Product: `ProductRecoverProducts`
- Update Price: `ProductUpdateProductPrice`
- Get Categories: `ProductGetCategoryList`
- Get Brands: `ProductGetBrandList`
- Create Brand: `ProductCreateBrand`
- Get Attributes: `ProductGetAttributeList`
- Get Category Rule: `ProductGetCategoryRules`
- Category Recommended: `ProductRecommendCategory`
- Pre-check for Operating Product: `ProductPrecheck`
- Order
- Get Order Detail: `OrderGetOrderDetail`
- Get Order List: `OrderSearchOrders`
- Ship Order: `OrderShipOrder`
- Fulfillment
- Verify Order Split: `FulfillmentVerifyOrderSplit`
- Confirm Order Split: `FulfillmentConfirmOrderSplit`
- Search Pre Combine Package: `FulfillmentSearchPreCombinePackages`
- Get Package Shipping Document: `FulfillmentGetShippingDocument`
- Update Package Shipping Info: `FulfillmentUpdateShippingInfo`
- Get Package Shipping Info: `FulfillmentGetShippingInfo`
- Search Package: `FulfillmentSearchPackages`
- Ship Package: `FulfillmentShipPackage`
- Get Package Pickup Config: `FulfillmentGetPackagePickupConfigList`
- Remove Package Order: `FulfillmentRemovePackageOrders`
- Confirm Precombine Package: `FulfillmentConfirmPreCombinePackage`
- Get Package Detail: `FulfillmentGetPackageDetail`
- Fulfillment Upload Image: `FulfillmentUploadImage`
- Update Package Delivery Status: `FulfillmentUpdatePackageDeliveryStatus`
- Fulfillment Upload File: `FulfillmentUploadFile`
- Batch Ship Packages: `FulfillmentBatchShipPackage`
- Get Shipping Service: `FulfillmentGetShippingService`
- Create Label: `FulfillmentCreateLabel`
- Logistics
- Get Subscribed Delivery Options: `LogisticsGetSubscribedDeliveryOptions`
- Update Shipping Info: `LogisticsUpdateShippingInfo`
- Get Shipping Document: `LogisticsGetShippingDocument`
- Get Shipping Provider: `LogisticsGetShippingProviderList`
- Get Shipping Info: `LogisticsGetShippingInfo`
- Get Warehouse List: `LogisticsGetWarehouseList`
- Reverse
- Reject Reverse Request: `ReverseRejectReverseRequest`
- Get Reverse Order List: `ReverseSearchReverseOrders`
- Confirm Reverse Request: `ReverseConfirmReverseRequest`
- Cancel Order: `ReverseCancelOrder`
- Get Reject Reason List: `ReverseGetRejectReasonList`
- Finance
- Get Settlements: `FinanceSearchSettlements`
- Get Transactions: `FinanceSearchTransactions`
- Get Order Settlements: `FinanceGetOrderSettlementList`
- Global Product
- Create Global Product: `GlobalProductCreateProduct`
- Get Global Product List: `GlobalProductSearchProducts`
- Get Global Product Detail: `GlobalProductGetProductDetail`
- Publish Global Product: `GlobalProductPublishProduct`
- Update Global Product Price: `GlobalProductUpdateProductPrice`
- Get Global Categories: `GlobalProductGetCategoryList`
- Edit Global Product: `GlobalProductUpdateProduct`
- Get Global Attributes: `GlobalProductGetAttributeList`
- Get Global Category Rule: `GlobalProductGetCategoryRules`
- Delete Global Product: `GlobalProductDeleteProducts`
- Promotion
- Update Basic Information: `PromotionUpdateActivity`
- Get Promotion List: `PromotionSearchActivities`
- Deactivate Promotion: `PromotionDeactivateActivity`
- Remove Promotion Item: `PromotionRemoveActivityItems`
- Get Promotion Details: `PromotionGetActivityDetail`
- Add/Update Discount Item: `PromotionAddOrUpdateActivityItems`
- Add Promotion: `PromotionCreateActivity`
- Supply Chain
- Package Fulfillment Data Sync: `SupplyChainSyncPackageFulfillmentData`

</details>
180 changes: 103 additions & 77 deletions docs/TikTokGlobalShop/Basic_ModelDefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,99 +10,125 @@ Naming Policies:

### APIs

Notes: The following catalog is consistent with the catalog structure of [TikTokShop Partner Center API Reference](https://partner.tiktokshop.com/docv2/page/6632a7434585a502e1cb5591).

<details>

<summary>[View Details]</summary>

- Authorization
- Authentication
- Get Access Token: `AuthGetToken`
- Refresh Access Token: `AuthRefreshToken`
- Shop
- Get Authorized Shop: `ShopGetAuthorizedShopList`
- Authorization
- Get Authorized Shops: `AuthorizationGetShops`
- Event
- Get Shop Webhooks: `EventGetWebhooks`
- Update Shop Webhook: `EventUpdateWebhook`
- Delete Shop Webhook: `EventDeleteWebhook`
- Seller
- Get Active Shop List: `SellerGetGlobalActiveShopList`
- Check Global Product Mode: `SellerCheckGlobalProductMode`
- Product
- Upload File: `ProductUploadFile`
- Upload Image: `ProductUploadImage`
- Get Seller Permissions: `SellerGetPermissions`
- Get Active Shops: `SellerGetShops`
- Products
- Get Brands: `ProductGetBrands`
- Create Custom Brands: `ProductCreateBrand`
- Get Categories: `ProductGetCategories`
- Get Category Rules: `ProductGetCategoryRules`
- Get Attributes: `ProductGetCategoryAttributes`
- Recommend Categories: `ProductRecommendCategories`
- Upload Product Image: `ProductUploadImage`
- Upload Product File: `ProductUploadFile`
- Create Product: `ProductCreateProduct`
- Delete Product: `ProductDeleteProducts`
- Partial Edit Product: `ProductUpdateProductPartial`
- Edit Product: `ProductUpdateProduct`
- Update Stock: `ProductUpdateProductStock`
- Get Product List: `ProductSearchProducts`
- Get Product Detail: `ProductGetProductDetail`
- Get Product Stock: `ProductGetProductStocks`
- Deactivate Product: `ProductDeactivateProducts`
- Activate Product: `ProductActivateProducts`
- Recover Deleted Product: `ProductRecoverProducts`
- Update Inventory: `ProductUpdateProductInventory`
- Update Price: `ProductUpdateProductPrice`
- Get Categories: `ProductGetCategoryList`
- Get Brands: `ProductGetBrandList`
- Create Brand: `ProductCreateBrand`
- Get Attributes: `ProductGetAttributeList`
- Get Category Rule: `ProductGetCategoryRules`
- Category Recommended: `ProductRecommendCategory`
- Pre-check for Operating Product: `ProductPrecheck`
- Order
- Get Order Detail: `OrderGetOrderDetail`
- Activate Products: `ProductActivateProducts`
- Deactivate Products: `ProductDeactivateProducts`
- Delete Products: `ProductDeleteProducts`
- Recover Products: `ProductRecoverProducts`
- Get Product: `ProductGetProductDetail`
- Inventory Search: `ProductGetInventories`
- Get Global Categories: `ProductGetGlobalCategories`
- Get Global Category Rules: `ProductGetGlobalCategoryRules`
- Get Global Attributes: `ProductGetGlobalCategoryAttributes`
- Recommend Global Categories: `ProductRecommendGlobalCategories`
- Create Global Product: `ProductCreateGlobalProduct`
- Publish Global Product: `ProductPublishGlobalProduct`
- Update Global Inventory: `ProductUpdateGlobalProductInventory`
- Get Global Product: `ProductGetGlobalProductDetail`
- Edit Global Product: `ProductUpdateGlobalProduct`
- Delete Global Products: `ProductDeleteGlobalProducts`
- Check Product Listing: `ProductCreateProductListingCheck`
- Check Listing Prerequisites: `ProductGetPrerequisites`
- Search Global Products: `ProductSearchGlobalProducts`
- Search Products: `ProductSearchProducts`
- Listing Schemas: `ProductGetListingSchemas`
- Orders
- Get Order List: `OrderSearchOrders`
- Ship Order: `OrderShipOrder`
- Get Order Detail: `OrderBatchGetOrderDetail`
- Fulfillment
- Verify Order Split: `FulfillmentVerifyOrderSplit`
- Confirm Order Split: `FulfillmentConfirmOrderSplit`
- Search Pre Combine Package: `FulfillmentSearchPreCombinePackages`
- Get Package Shipping Document: `FulfillmentGetShippingDocument`
- Update Package Shipping Info: `FulfillmentUpdateShippingInfo`
- Get Package Shipping Info: `FulfillmentGetShippingInfo`
- Search Package: `FulfillmentSearchPackages`
- Ship Package: `FulfillmentShipPackage`
- Get Package Pickup Config: `FulfillmentGetPackagePickupConfigList`
- Remove Package Order: `FulfillmentRemovePackageOrders`
- Confirm Precombine Package: `FulfillmentConfirmPreCombinePackage`
- Get Package Detail: `FulfillmentGetPackageDetail`
- Fulfillment Upload Image: `FulfillmentUploadImage`
- Update Package Delivery Status: `FulfillmentUpdatePackageDeliveryStatus`
- Fulfillment Upload File: `FulfillmentUploadFile`
- Batch Ship Packages: `FulfillmentBatchShipPackage`
- Get Shipping Service: `FulfillmentGetShippingService`
- Create Label: `FulfillmentCreateLabel`
- Get Package Shipping Document: `FulfillmentGetPackageShippingDocuments`
- Get Package Handover Time Slots: `FulfillmentGetPackageHandoverTimeSlots`
- Get Tracking: `FulfillmentGetOrderTracking`
- Update Package Shipping Info: `FulfillmentUpdatePackageShippingInfo`
- Update Package Delivery Status: `FulfillmentBatchUpdatePackagesDeliveryStatus`
- Get Order Split Attributes: `FulfillmentGetOrderSplitAttributes`
- Split Orders: `FulfillmentSplitOrder`
- Search Combinable Packages: `FulfillmentSearchCombinablePackages`
- Combine Package: `FulfillmentCombinePackage`
- Uncombine Packages: `FulfillmentUncombinePackage`
- Mark Package As Shipped: `FulfillmentUpdateOrderPackages`
- Ship Package: `FulfillmentShipPackage`
- Batch Ship Packages: `FulfillmentBatchShipPackages`
- Fulfillment Upload Delivery Image: `FulfillmentUploadImage`
- Fulfillment Upload Delivery File: `FulfillmentUploadFile`
- Get Eligible Shipping Service: `FulfillmentSearchOrderShippingServices`
- Create Packages: `FulfillmentCreatePackage`
- Update Shipping Info: `FulfillmentUpdateOrderShippingInfo`
- Return and Refund
- Search Cancellations: `ReturnRefundSearchCancellations`
- Approve Cancellation: `ReturnRefundApproveCancellation`
- Reject Cancellation: `ReturnRefundRejectCancellation`
- Search Returns: `ReturnRefundSearchReturns`
- Approve Return: `ReturnRefundApproveReturn`
- Reject Return: `ReturnRefundRejectReturn`
- Get Aftersale Eligibility: `ReturnRefundGetOrderAftersaleEligibility`
- Get Reject Reasons: `ReturnRefundGetRejectReasons`
- Calculate Refund: `ReturnRefundCalculateRefund`
- Get Return Records: `ReturnRefundGetReturnRecords`
- Cancel Order: `ReturnRefundCreateCancellation`
- Create Return: `ReturnRefundCreateReturn`
- Logistics
- Get Subscribed Delivery Options: `LogisticsGetSubscribedDeliveryOptions`
- Update Shipping Info: `LogisticsUpdateShippingInfo`
- Get Shipping Document: `LogisticsGetShippingDocument`
- Get Shipping Provider: `LogisticsGetShippingProviderList`
- Get Shipping Info: `LogisticsGetShippingInfo`
- Get Warehouse List: `LogisticsGetWarehouseList`
- Reverse
- Reject Reverse Request: `ReverseRejectReverseRequest`
- Get Reverse Order List: `ReverseSearchReverseOrders`
- Confirm Reverse Request: `ReverseConfirmReverseRequest`
- Cancel Order: `ReverseCancelOrder`
- Get Reject Reason List: `ReverseGetRejectReasonList`
- Finance
- Get Settlements: `FinanceSearchSettlements`
- Get Transactions: `FinanceSearchTransactions`
- Get Order Settlements: `FinanceGetOrderSettlementList`
- Global Product
- Create Global Product: `GlobalProductCreateProduct`
- Get Global Product List: `GlobalProductSearchProducts`
- Get Global Product Detail: `GlobalProductGetProductDetail`
- Publish Global Product: `GlobalProductPublishProduct`
- Update Global Product Price: `GlobalProductUpdateProductPrice`
- Get Global Categories: `GlobalProductGetCategoryList`
- Edit Global Product: `GlobalProductUpdateProduct`
- Get Global Attributes: `GlobalProductGetAttributeList`
- Get Global Category Rule: `GlobalProductGetCategoryRules`
- Delete Global Product: `GlobalProductDeleteProducts`
- Get Warehouse Delivery Options: `LogisticsGetWarehouseDeliveryOptions`
- Get Warehouse List: `LogisticsGetWarehouses`
- Get Shipping Providers: `LogisticsGetDeliveryOptionShippingProviders`
- Get Global Seller Warehouse: `LogisticsGetGlobalWarehouses`
- Promotion
- Update Basic Information: `PromotionUpdateActivity`
- Get Promotion List: `PromotionSearchActivities`
- Deactivate Promotion: `PromotionDeactivateActivity`
- Remove Promotion Item: `PromotionRemoveActivityItems`
- Get Promotion Details: `PromotionGetActivityDetail`
- Add/Update Discount Item: `PromotionAddOrUpdateActivityItems`
- Add Promotion: `PromotionCreateActivity`
- Create Activity: `PromotionCreateActivity`
- Update Activity Product: `PromotionUpdateActivityProducts`
- Remove Activity Product: `PromotionDeleteActivityProducts`
- Search Activities: `PromotionSearchActivities`
- Get Activity: `PromotionGetActivityDetail`
- Update Activity: `PromotionUpdateActivity`
- Deactivate Activity: `PromotionDeactivateActivity`
- Finance
- Get Order Statement Transactions: `FinanceGetOrderStatementTransactions`
- Get Statement Transactions: `FinanceGetStatementTransactions`
- Get Withdrawals: `FinanceGetWithdrawals`
- Get Statements: `FinanceGetStatements`
- Get Payments: `FinanceGetPayments`
- Customer Service
- Get Conversation Messages: `CustomerServiceGetConversationMessages`
- Get Conversations: `CustomerServiceGetConversations`
- Send Message: `CustomerServiceCreateConversationMessage`
- Get Agent Settings: `CustomerServiceGetAgentSettings`
- Update Agent Settings: `CustomerServiceUpdateAgentSettings`
- Upload Buyer Messages Image: `CustomerServiceUploadImage`
- Read Message: `CustomerServiceReadConversationMessage`
- Create Conversation: `CustomerServiceCreateConversation`
- Supply Chain
- Package Fulfillment Data Sync: `SupplyChainSyncPackageFulfillmentData`
- Confirm Package Shipment: `SupplyChainSyncPackages`

</details>
9 changes: 6 additions & 3 deletions docs/TikTokGlobalShop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ using SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models;
/* Example: Get Order List */
var request = new OrderSearchOrdersRequest()
{
ShopId = "${SHOP_ID}"
AccessToken = "${ACCESS_TOKEN}",
ShopCipher = "${SHOP_CIPHER}",
};
var response = await client.ExecuteOrderSearchOrdersAsync(request);
if (response.IsSuccessful())
Expand All @@ -59,8 +60,8 @@ if (response.IsSuccessful())
}
else
{
Console.WriteLine("ErrorCode: " + response.ErrorCode);
Console.WriteLine("ErrorMessage: " + response.ErrorMessage);
Console.WriteLine("Code: " + response.Code);
Console.WriteLine("Message: " + response.Message);
}
```

Expand All @@ -69,3 +70,5 @@ else
## Basic Usage

- [API Reference Manual](./Basic_ModelDefinition.md)

- [Legacy API (pre-v202309)](./Basic_LegacyAPI.md)
Loading
Loading