curl --request POST \
--url https://api-dev.narrative.io/admin/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sku": "general-storage",
"sku_type": {
"category": "storage"
},
"payable_company_id": 1,
"name": "name",
"cloud_platform": {
"platform": "aws",
"region": "us-east-1"
},
"unit": "bytes",
"default_rate": {
"type": "per_unit",
"unit_price": {
"type": "test-price",
"currency": "USD",
"price_in_micro_cents": 1
}
},
"status": "active"
}
'{
"id": "cd98bbb6-1086-4aea-9b5f-8ba39671a659",
"sku": "general-storage",
"sku_type": {
"category": "storage"
},
"payable_company_id": 1,
"name": "name",
"cloud_platform": {
"region": "us-east-1",
"platform": "aws"
},
"unit": "bytes",
"default_rate": {
"type": "per_unit",
"unit_price": {
"value": 1,
"expressed_in": "cents",
"currency": "USD"
}
},
"status": "active",
"created_at": "2023-02-13T12:55:24.104Z",
"created_by_user_id": 1,
"updated_at": "2023-02-13T12:55:24.104Z",
"updated_by_user_id": 1
}Create a new product.
curl --request POST \
--url https://api-dev.narrative.io/admin/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sku": "general-storage",
"sku_type": {
"category": "storage"
},
"payable_company_id": 1,
"name": "name",
"cloud_platform": {
"platform": "aws",
"region": "us-east-1"
},
"unit": "bytes",
"default_rate": {
"type": "per_unit",
"unit_price": {
"type": "test-price",
"currency": "USD",
"price_in_micro_cents": 1
}
},
"status": "active"
}
'{
"id": "cd98bbb6-1086-4aea-9b5f-8ba39671a659",
"sku": "general-storage",
"sku_type": {
"category": "storage"
},
"payable_company_id": 1,
"name": "name",
"cloud_platform": {
"region": "us-east-1",
"platform": "aws"
},
"unit": "bytes",
"default_rate": {
"type": "per_unit",
"unit_price": {
"value": 1,
"expressed_in": "cents",
"currency": "USD"
}
},
"status": "active",
"created_at": "2023-02-13T12:55:24.104Z",
"created_by_user_id": 1,
"updated_at": "2023-02-13T12:55:24.104Z",
"updated_by_user_id": 1
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
SKU for product
Sku Type (json object, category filed is mandatory)
Show child attributes
Payable company id
Product name
Product rate
Show child attributes
active, archived Optional description of a product
Cloud Platform (json object)
Show child attributes
OK
UUID
SKU for product
Sku Type (json object, category filed is mandatory)
Show child attributes
Payable company id
Product rate
Show child attributes
active, archived Cloud Platform (json object)
Show child attributes
123
123