Creates a new product
Parameters
code: str
Product code (unique identifier)
description: str
Description of the product
Returns
Create
from fragment import Fragment
client = Fragment()
product = client.products.create(
code="PROD_001",
description="Premium subscription service",
)
print(product.data){
"data": {
"id": "product_1234567890",
"code": "PROD_001",
"created": "2024-01-13T00:00:00Z",
"description": "Premium subscription service",
"paid_by_roles": [
{
"id": "role_def123",
"name": "buyer"
}
],
"paid_to_roles": [
{
"id": "role_def123",
"name": "buyer"
}
],
"updateVersion": 1,
"workspaceId": "ws_1234567890"
}
}Returns Examples
{
"data": {
"id": "product_1234567890",
"code": "PROD_001",
"created": "2024-01-13T00:00:00Z",
"description": "Premium subscription service",
"paid_by_roles": [
{
"id": "role_def123",
"name": "buyer"
}
],
"paid_to_roles": [
{
"id": "role_def123",
"name": "buyer"
}
],
"updateVersion": 1,
"workspaceId": "ws_1234567890"
}
}