Update sub products
https://core-api.ancon.io/api/v1/Tenants/{tenantId}/Products/{productId}/SubProductsAuthorization
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
addedSubProductsarray<object> | nullList of sub products to add.
8 fields in
addedSubProductsidstring (uuid) | nullThe id of the sub product that you want to edit. Set this to null when adding new sub products.
productIdstring (uuid)The id of the product that you want to use as a sub product.
productVariantIdstring (uuid) | nullThe optional id of a specific product variant that you want to use. Usually this is set. If it's not set then the POS user will get a popup to pick a specific variant to add the check.
priceobject | nullOverride the price for this sub product. This price is used when
is true. 2 fields in
priceunitPricenumber (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 | nullOverride the material cost for this sub product. This price is used when
is true. 2 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.
useOverridePricebooleanSet this to true if you want to use a overrided price.
positioninteger (int32)The position of this sub product, this is used to sort sub products on check, tickets, receipts etc.
quantitynumber (double)This is the quantity of the sub product to be added to the check. min 1, max 99.
updatedSubProductsarray<object> | nullList of sub products you want to update.
8 fields in
updatedSubProductsidstring (uuid) | nullThe id of the sub product that you want to edit. Set this to null when adding new sub products.
productIdstring (uuid)The id of the product that you want to use as a sub product.
productVariantIdstring (uuid) | nullThe optional id of a specific product variant that you want to use. Usually this is set. If it's not set then the POS user will get a popup to pick a specific variant to add the check.
priceobject | nullOverride the price for this sub product. This price is used when
is true. 2 fields in
priceunitPricenumber (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 | nullOverride the material cost for this sub product. This price is used when
is true. 2 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.
useOverridePricebooleanSet this to true if you want to use a overrided price.
positioninteger (int32)The position of this sub product, this is used to sort sub products on check, tickets, receipts etc.
quantitynumber (double)This is the quantity of the sub product to be added to the check. min 1, max 99.
deletedSubProductsarray<string (uuid)> | nullList of sub product ids you want to delete.
Responses
200OK
messagestring | null
400Bad Request
messagestring | nullerrorCodestring (uuid)additionalDataany | null
401Unauthorized
messagestring | null
404Not Found
messagestring | nullerrorCodestring (uuid)