Core APIProducts

Update sub products

puthttps://core-api.ancon.io/api/v1/Tenants/{tenantId}/Products/{productId}/SubProducts
View .mdOpenAPI

Authorization

  • Access-Tokenheaderrequired

    Tenant- or outlet-level token from the backoffice. See Get started.

Path parameters

  • tenantIdstring (uuid)required
  • productIdstring (uuid)required

Header parameters

  • correlationIdstring

    Correlation Id for the request

Request body application/json

  • addedSubProductsarray<object> | null

    List of sub products to add.

    8 fields in addedSubProducts
    • idstring (uuid) | null

      The 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) | null

      The 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 | null

      Override the price for this sub product. This price is used when is true.

      2 fields in price
      • unitPricenumber (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 | null

      Override the material cost for this sub product. This price is used when is true.

      2 fields in materialCost
      • unitPricenumber (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.

    • useOverridePriceboolean

      Set 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> | null

    List of sub products you want to update.

    8 fields in updatedSubProducts
    • idstring (uuid) | null

      The 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) | null

      The 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 | null

      Override the price for this sub product. This price is used when is true.

      2 fields in price
      • unitPricenumber (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 | null

      Override the material cost for this sub product. This price is used when is true.

      2 fields in materialCost
      • unitPricenumber (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.

    • useOverridePriceboolean

      Set 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)> | null

    List of sub product ids you want to delete.

Responses

200OKapplication/json
  • messagestring | null
400Bad Requestapplication/json
  • messagestring | null
  • errorCodestring (uuid)
  • additionalDataany | null
401Unauthorizedapplication/json
  • messagestring | null
404Not Foundapplication/json
  • messagestring | null
  • errorCodestring (uuid)