Skip to content

Order item surcharge parameters insertion

Request

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.

Security
shoptetAccessToken or shoptetPrivateApiToken
Path
codestringrequired

order code

Example:2018000012
idintegerrequired

order item id

Example:3120
Headers
Content-Typestringrequired
Default:"application/json"
Bodyapplication/json
dataobjectrequired
One of:
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"
    }
  }'

Responses

OK

Bodyapplication/json
dataobjectrequired
errorsArray of objects or null(Errors)required
metadataobject(Metadata)required
Response
{ "data": { "order": {} }, "errors": [ {} ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }