# Product Addon
The following example demonstrates how to create a deposit fee for products.
1. Creating a Deposit: Product Addon Resource
- Function: This API Resource allows the creation of deposits in the system.
- Data: All necessary data for each deposit is defined here, such as amount, type, VAT.
2. Linking Deposit with Product: Product Addon Product Relation Resource
Function`: This API Resource is responsible for linking deposits and products.
Opportunity: It allows adding the appropriate deposit to a given product.
# Step 1.
Creating a deposit
Request
method: | POST |
url: | http://shopname.api.myshoprenter.hu/productAddons |
headers: |
Accept:application/json Content-Type:application/json |
{
"sku": "BETETDIJ01",
"name": "1L Üveg Betétdíj",
"type": "DEPOSIT_FEE",
"price": "50.0000",
"taxRate": "",
"required": "1",
"autoScaling": "1",
"separatedItem": "1",
"quantityModifiable": "0"
}
# Step 2.
Linking Deposit with Product:
Request
method: | POST |
url: | http://shopname.api.myshoprenter.hu/productAddonProductRelations/cmVsYXRlZFByb2R1Y3QtcHJvZHVjdF9pZD0yNDUxJnJlbGF0ZWRfaWQ9MzAxMg== |
headers: |
Accept:application/json Content-Type:application/json |
Request
{
"product": {
"id": "cHJvZHVjdC1wcm9kdWN0X2lkPTI0NTE="
},
"productAddon": {
"id": "cHJvZHVjdC1wcm9kdWN0X2lkPTMwMTI="
}
}