Create product variant
post
https://core-api.ancon.io/api/v1/Tenants/{tenantId}/Products/{productId}/variantsAuthorization
Access-TokenheaderrequiredTenant- or outlet-level token from the backoffice. See Get started.
Path parameters
tenantIdstring (uuid)requiredproductIdstring (uuid)required
Header parameters
correlationIdstringCorrelation Id for the request
Request body
namestringrequiredisMainProductVariantbooleanrequiredisOpenPricebooleanrequiredvariantPriceobjectrequired2 fields in
variantPriceunitPricenumber (double)Gets or sets the price per unit. For example 10 per piece. Or 50 per cl. It depends on the unit of the product.
additionalPricenumber (double)Gets or sets the additional price. For example 50 per cl + 10 additional price.
materialCostobject | null2 fields in
materialCostunitPricenumber (double)Gets or sets the price per unit. For example 10 per piece. Or 50 per cl. It depends on the unit of the product.
additionalPricenumber (double)Gets or sets the additional price. For example 50 per cl + 10 additional price.
positioninteger (int32)required
Responses
201Created
400Bad Request
messagestring | nullerrorCodestring (uuid)additionalDataany | null
401Unauthorized
messagestring | null
404Not Found
messagestring | nullerrorCodestring (uuid)