Products
Add a variant to a product
Add a new variant (configuration option) to an existing product. Variants allow the same product to have different configurations, such as different durations, tiers, or sizes. Each variant can have its own offers.
Authorization
Public key Secret key x-fngs-public-key<token>
In: header
x-fngs-secret-key<token>
In: header
Path Parameters
productId*string
POST /v0/products/:productId/variants/add Parameter
Format
uuidRequest Body
application/json
POST /v0/products/:productId/variants/add Request body
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v0/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/variants/add" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "status": "success", "data": { "variant": { "object": "variant", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "internalId": null, "name": "", "description": "", "order": null } }}