There is possibility to edit surcharge parameters related to order item. For that purpose, there is in get order item detail endpoint attribute specificSurchargeParameters which returned adjusted surcharge parameters data (see order item detail endpoint)
This mean that surchargeParameters attribute in order detail is persistent and any adjustment in surcharge parameters appears in specificSurchargeParameters
This endpoint purpose is to add surcharge parameter in relation within order item.
You have to send one of attributes parameterCode with valueIndex or name. Cant send this attributes together.
If you post parameterCode and valueIndex, there will be validation, if surcharge parameter exits and if can be related
to order item's product and price (if not send) will be added from surcharge parameter itself.
Otherwise you can send attribute name instead, which could have any form, but has to be unique. If price is not send,
than it will be set to 0.00.
- Mock serverhttps://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/orders/{code}/item/{id}/surcharge-parameters
- https://api.myshoptet.comhttps://api.myshoptet.com/api/orders/{code}/item/{id}/surcharge-parameters
- shoptetAccessToken
- shoptetPrivateApiToken
- object
- object (2)
curl -i -X POST \
https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/orders/2018000012/item/3120/surcharge-parameters \
-H 'Content-Type: application/json' \
-H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
-d '{
"data": {
"parameterCode": "pp-1",
"valueIndex": "hodnota-01",
"price": "21.00"
}
}'{ "data": { "order": { … } }, "errors": [ { … } ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }