*เนื้อหานี้แปลโดยใช้ AI (เวอร์ชัน Beta) และอาจมีข้อผิดพลาด หากต้องการดูหน้านี้เป็นภาษาอังกฤษ ให้คลิกที่นี่

CreatorStoreProduct

แทนที่ผลิตภัณฑ์ในร้านค้าผู้สร้าง ทรัพยากรนี้ใช้จัดการการจัดจำหน่ายและราคาของสินทรัพย์ในร้านค้าผู้สร้าง

คุณลักษณะ

pathstring

เส้นทางทรัพยากรของผลิตภัณฑ์ร้านค้าผู้สร้าง

รูปแบบ: creator-store-products/{creator_store_product_id}.

basePriceobject

ราคาฐานของผลิตภัณฑ์สำหรับข้อมูลเพิ่มเติมดูที่ เงินแต่ละประเภทผลิตภัณฑ์ (เช่น pluginAssetId ) สนับสนุนชุดราคาที่กำหนดได้ขณะนี้สนับสนุนเฉพาะการตั้งราคาฐานใน USD เท่านั้น

ขึ้นอยู่กับประเภทแต่ละผลิตภัณฑ์ร้านค้าผู้สร้างมีราคาที่สนับสนุนคงที่; ดูคุณสมบัติ productType สำหรับรายการทั้งหมดตัวอย่างเช่น เพื่อตั้งราคาของปลั๊กอินเป็น $4.99 ใช้ราคาฐานต่อไปนี้:


"basePrice": {
"currencyCode": "USD",
"quantity": {
"significand": 4990000000,
"exponent": -9
}
}

หมายเหตุ: อัตราการเพิ่มขึ้น ต้อง เป็น -9 และตัวเลขที่สำคัญต้องอยู่ในรูปแบบนี้ รูปแบบ เดซิมอล ที่เหมาะสมคือ significand * 10^exponent

หากต้องการตั้งราคาปลั๊กอินเป็น $0 (คือฟรี) ใช้ตัวเลือกต่อไปนี้ base_price


"basePrice": {
"currencyCode": "USD",
"quantity": {
"significand": 0,
"exponent": 0
}
}

หมายเหตุ: คุณยังต้องตั้ง currencyCode เป็น USD แม้สำหรับผลิตภัณฑ์ฟรี

ราคาซื้อจริงจะขึ้นอยู่กับราคาฐานนี้ แต่มักจะแตกต่างเล็กน้อยเนื่องจากการพิจารณาเฉพาะท้องถิ่น

ตั้งค่านี้เป็นศูนย์เพื่อทำให้ผลิตภัณฑ์ฟรี.

purchasePriceobject

ราคาซื้อที่มีประสิทธิภาพสำหรับผู้ใช้หลังจากหักลบปัจจัยเฉพาะท้องถิ่น.

publishedboolean

ว่าผู้ขายตั้งใจจะจัดจำหน่ายผลิตภัณฑ์ร้านค้าผู้สร้างบนร้านค้าผู้สร้างหรือไม่ผู้ขายอาจตั้งใจจะจัดจำหน่ายผลิตภัณฑ์ แต่เนื่องจากข้อจำกัดบางอย่างในตัวผู้ขายหรือผลิตภัณฑ์ร้านค้าสร้างสรรค์รากฐาน ผลิตภัณฑ์อาจไม่สามารถซื้อได้ดู restrictions และ purchasable สำหรับรายละเอียดเพิ่มเติม.

restrictionsarray<enum>
เอาต์พุตเท่านั้น

ข้อจำกัดที่ใช้กับผลิตภัณฑ์ ผลิตภัณฑ์สามารถมีข้อจำกัดหลายข้อที่ใช้งานในเวลาเดียวกันได้

มูลค่าที่เป็นไปได้:

| ค่า | คําอธิบาย | | --- | --- | | RESTRICTION_UNSPECIFIED | ข้อจํากัดที่ไม่ระบุ| | SOLD_ITEM_RESTRICTED | รายการที่ขายถูกจำกัดโดย Roblox รายละเอียดอาจจะมีอยู่โดยการค้นหารายการนั้นโดยตรง| | SELLER_TEMPORARILY_RESTRICTED | ผลิตภัณฑ์ถูกจำกัดเพราะบัญชีของผู้ขายถูกจำกัดชั่วคราวโดย Roblox| | SELLER_PERMANENTLY_RESTRICTED | ผลิตภัณฑ์ถูกจำกัดเพราะบัญชีของผู้ขายถูกจำกัดอย่างถาวรโดย Roblox| | SELLER_NO_LONGER_ACTIVE | ผลิตภัณฑ์ถูกจำกัดเพราะบัญชีของผู้ขายถูกลบหรือไม่ได้ใช้งานอีกต่อไปแล้ว |. ค่าที่เป็นไปได้:

purchasableboolean
เอาต์พุตเท่านั้น

ว่าผลิตภัณฑ์จะซื้อได้หรือไม่

เพื่อให้ค่านี้เป็นจริง published จะต้องเป็นจริงและ restrictions จะต้องว่างเปล่าหากค่านี้เป็นเท็จผลิตภัณฑ์อาจไม่ถูกซื้อโดยผู้ใช้รายใด.

หนึ่งในรายการต่อไปนี้สำหรับseller:

userSellerstring
เอาต์พุตเท่านั้น

ผู้ใช้ Roblox ขายผลิตภัณฑ์.

groupSellerstring
เอาต์พุตเท่านั้น

กลุ่ม Roblox ขายผลิตภัณฑ์.

หนึ่งในรายการต่อไปนี้สำหรับproductType:

modelAssetIdstring
ไม่สามารถเปลี่ยนแปลงได้

ผลิตภัณฑ์ร้านค้าผู้สร้างเป็นรูปแบบที่มีรหัสสินทรัพย์นี้.

pluginAssetIdstring
ไม่สามารถเปลี่ยนแปลงได้

ผลิตภัณฑ์ร้านค้าผู้สร้างเป็นปลั๊กอินที่มีรหัสสินทรัพย์นี้

รองรับราคาฐานใน USD: $0, $4.99, $5.99, $6.99, $7.99, $8.99, $9.99, $10.99, $11.99, $12.99, $13.99, $14.99, $15.99, $16.99, $17.99, $18.99, $19.99, $24.99, $29.99, $34.99, $39.99, $44.99, $49.99, $59.99, $69.99, $79.99, $89.99, $99.99, $149.99, $199.99, $249.99.

audioAssetIdstring
ไม่สามารถเปลี่ยนแปลงได้

ผลิตภัณฑ์ร้านค้าผู้สร้างเป็นไฟล์เสียงที่มีรหัสสินทรัพย์นี้.

decalAssetIdstring
ไม่สามารถเปลี่ยนแปลงได้

ผลิตภัณฑ์ร้านค้าผู้สร้างเป็นสติกเกอร์ที่มีรหัสสินทรัพย์นี้.

meshPartAssetIdstring
ไม่สามารถเปลี่ยนแปลงได้

ผลิตภัณฑ์ร้านค้าผู้สร้างเป็นส่วนตาข่ายที่มีรหัสสินทรัพย์นี้.

videoAssetIdstring
ไม่สามารถเปลี่ยนแปลงได้

ผลิตภัณฑ์ร้านค้าผู้สร้างเป็นวิดีโอที่มีรหัสสินทรัพย์นี้.

fontFamilyAssetIdstring
ไม่สามารถเปลี่ยนแปลงได้

ผลิตภัณฑ์ร้านค้าผู้สร้างเป็นครอบครัวฟอนต์ที่มีรหัสสินทรัพย์นี้.

URL หลัก

https://apis.roblox.com
แหล่งข้อมูล CreatorStoreProduct

{
"path": "creator-store-products/123",
"basePrice": {
"currencyCode": "string",
"quantity": {
"significand": "integer",
"exponent": "integer"
}
},
"purchasePrice": {
"currencyCode": "string",
"quantity": {
"significand": "integer",
"exponent": "integer"
}
},
"published": true,
"restrictions": [
"RESTRICTION_UNSPECIFIED"
],
"purchasable": true,
"userSeller": "string",
"modelAssetId": "string"
}

CreatorStoreProduct

สร้างผลิตภัณฑ์ร้านค้าผู้สร้าง
เวอร์ชัน Beta

POST /cloud/v2/creator-store-products

เพิ่มผลิตภัณฑ์ร้านค้าผู้สร้างใช้วิธีนี้เฉพาะถ้าผลิตภัณฑ์ของคุณไม่เคยถูกจัดจำหน่ายบนร้านค้าผู้สร้าง; มิฉะนั้นให้ใช้วิธี PATCH เพื่ออัปเดตผลิตภัณฑ์

ขอบเขต
creator-store-product:write
คำขอเนื้อหาคำขอCreatorStoreProduct
การตอบกลับCreatorStoreProduct
POST /cloud/v2/creator-store-products

curl -L -X POST 'https://apis.roblox.com/cloud/v2/creator-store-products' \
-H 'x-api-key: {your-api-key}' \
-H 'Content-Type: application/json' \
--data '{
"basePrice": {
"currencyCode": "string",
"quantity": {
"significand": "integer",
"exponent": "integer"
}
},
"purchasePrice": {
"currencyCode": "string",
"quantity": {
"significand": "integer",
"exponent": "integer"
}
},
"published": true
}'
การตอบกลับ

{
"path": "creator-store-products/123",
"basePrice": {
"currencyCode": "string",
"quantity": {
"significand": "integer",
"exponent": "integer"
}
},
"purchasePrice": {
"currencyCode": "string",
"quantity": {
"significand": "integer",
"exponent": "integer"
}
},
"published": true,
"restrictions": [
"RESTRICTION_UNSPECIFIED"
],
"purchasable": true,
"userSeller": "string",
"modelAssetId": "string"
}

CreatorStoreProduct

รับผลิตภัณฑ์ร้านค้าผู้สร้าง
เวอร์ชัน Beta

GET /cloud/v2/creator-store-products/{creator_store_product_id}

รับผลิตภัณฑ์ร้านค้าผู้สร้าง

ขอบเขต
creator-store-product:read
คำขอพารามิเตอร์เส้นทาง
creator_store_product_idstring
จำเป็นต้องมี

ID ร้านค้าผู้สร้างผลิตภัณฑ์.

การตอบกลับCreatorStoreProduct
GET /cloud/v2/creator-store-products/{creator_store_product_id}

curl -L -X GET 'https://apis.roblox.com/cloud/v2/creator-store-products/{creator_store_product_id}' \
-H 'x-api-key: {your-api-key}'
การตอบกลับ

{
"path": "creator-store-products/123",
"basePrice": {
"currencyCode": "string",
"quantity": {
"significand": "integer",
"exponent": "integer"
}
},
"purchasePrice": {
"currencyCode": "string",
"quantity": {
"significand": "integer",
"exponent": "integer"
}
},
"published": true,
"restrictions": [
"RESTRICTION_UNSPECIFIED"
],
"purchasable": true,
"userSeller": "string",
"modelAssetId": "string"
}

CreatorStoreProduct

อัปเดตผลิตภัณฑ์ร้านค้าผู้สร้าง
เวอร์ชัน Beta

PATCH /cloud/v2/creator-store-products/{creator_store_product_id}

อัปเดตผลิตภัณฑ์ร้านค้าผู้สร้าง

ขอบเขต
creator-store-product:write
คำขอพารามิเตอร์เส้นทาง
creator_store_product_idstring
จำเป็นต้องมี

ID ร้านค้าผู้สร้างผลิตภัณฑ์.

พารามิเตอร์คิวรี
updateMaskstring

รายการฟิลด์ที่จะอัปเดต. สตริงนี้มีรูปแบบ FieldMask

allowMissingboolean

หากตั้งค่าเป็นจริงและไม่พบผลิตภัณฑ์ร้านค้าผู้สร้าง ผลิตภัณฑ์ร้านค้าผู้สร้างจะถูกสร้างขึ้น ในสถานการณ์นี้ update_mask จะถูกเพิกเฉย.

เนื้อหาคำขอCreatorStoreProduct
การตอบกลับCreatorStoreProduct
PATCH /cloud/v2/creator-store-products/{creator_store_product_id}

curl -L -X PATCH 'https://apis.roblox.com/cloud/v2/creator-store-products/{creator_store_product_id}?updateMask={string}&allowMissing={boolean}' \
-H 'x-api-key: {your-api-key}' \
-H 'Content-Type: application/json' \
--data '{
"basePrice": {
"currencyCode": "string",
"quantity": {
"significand": "integer",
"exponent": "integer"
}
},
"purchasePrice": {
"currencyCode": "string",
"quantity": {
"significand": "integer",
"exponent": "integer"
}
},
"published": true
}'
การตอบกลับ

{
"path": "creator-store-products/123",
"basePrice": {
"currencyCode": "string",
"quantity": {
"significand": "integer",
"exponent": "integer"
}
},
"purchasePrice": {
"currencyCode": "string",
"quantity": {
"significand": "integer",
"exponent": "integer"
}
},
"published": true,
"restrictions": [
"RESTRICTION_UNSPECIFIED"
],
"purchasable": true,
"userSeller": "string",
"modelAssetId": "string"
}