Use this API to manage sample rules in open collaborations, like valid time periods, or thresholds for creators to request samples. You can create, update, or deactivate rules.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Identifies the shop. Obtain it from the Get Authorized Shops API.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The product ID to which the sample rule applies. You can only assign one sample rule for one product_id. Only the most recent API call will take effect.
The sample rule settings to apply to the specified product. Use activate_status to create, update, or deactivate the rule.
object
The total quantity of the samples provided by the seller that the creators can apply for.
Whether the sample is always available for application:
- If true, the sample can be requested at any time.
- If false, the sample can only be requested during specified time periods. You must set start_time and end_time.
The start of the period during which a creator can apply for samples, as a Unix timestamp in seconds. You must specify start_time and end_time together.
The end of the period during which a creator can apply for samples, as a Unix timestamp in seconds. You must specify start_time and end_time together.
The threshold criteria that a creator must meet to be eligible to apply for the sample.
object
The creator must have a follower count greater than or equal to this value to be eligible to request the sample.
The creator must have the GMV in the past 30 days greater than this value to be eligible to request the sample.
The creator must have an average number of e-commerce video views in the past 30 days greater than or equal to this value to be eligible to request the sample.
A list of product first-level category IDs.
Use this to limit participating creators: for each creator, sort their GMV over the past 30 days by first-level product category. If the GMV of one of the categories is among the top three, the creator is eligible to participate in the event. No restriction by default.
For example, if a creator’s top three categories are [{Cellphone_ID}, {Furniture_ID}, {Food_ID}], and the value of tehis parameter is [{Food_ID}], the creator is qualified for open collaboration.
The creators whose predicted rate of posting a shoppable video or LIVE after receiving a sample.
- ALL. All creators regardless of the rate.
- LOW. The creators whose rate is above or equal to low.
- MEDIUM. The creators whose rate is above or equal to medium.
- HIGH. The creators whose rate is high.
To activate the sample rule, use ACTIVATE; to deactivate the sample rule, use DEACTIVATE.
When using ACTIVATE, you must specify the details of the rule; when using DEACTIVATE, you just need to specify product_id.
Example
{ "product_id": "123456", "sample_rule": { "sample_quota": 100, "is_sample_time_unlimited": true, "start_time": 1728552553, "end_time": 1728552553, "thresholds": { "minimum_follower_count": 2000, "minimum_gmv": 1000, "avg_ec_video_views": 5, "category_ids": [ "601152" ], "predicted_fulfillment_rank": "LOW" }, "activate_status": "ACTIVATE" }}Responses
Section titled “Responses”Success
object
Status code; 0 means success.
Success or failure message.
Request log ID.
object
Example
{ "code": 0, "data": {}, "message": "Success", "request_id": "202203070749000101890810281E8C70B7"}