Skip to content

Edit Open Collaboration Sample Rule

POST
/affiliate_seller/202410/open_collaborations/sample_rules

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.

shop_cipher
required
string

Identifies the shop. Obtain it from the Get Authorized Shops API.

Media typeapplication/json
object
product_id
required

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.

string
sample_rule

The sample rule settings to apply to the specified product. Use activate_status to create, update, or deactivate the rule.

object
sample_quota

The total quantity of the samples provided by the seller that the creators can apply for.

integer format: int64
is_sample_time_unlimited

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.
boolean
start_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.

integer format: int64
end_time

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.

integer format: int64
thresholds

The threshold criteria that a creator must meet to be eligible to apply for the sample.

object
minimum_follower_count

The creator must have a follower count greater than or equal to this value to be eligible to request the sample.

integer format: int64
minimum_gmv

The creator must have the GMV in the past 30 days greater than this value to be eligible to request the sample.

integer format: int64
avg_ec_video_views

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.

integer format: int64
category_ids

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.

Array<string>
predicted_fulfillment_rank

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.
string
activate_status
required

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.

string
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"
}
}

Success

Media typeapplication/json
object
code

Status code; 0 means success.

integer format: int64
message

Success or failure message.

string
request_id

Request log ID.

string
data
object
Example
{
"code": 0,
"data": {},
"message": "Success",
"request_id": "202203070749000101890810281E8C70B7"
}