Skip to content

Credit note from invoice creation

Request

Creating credit note from existing invoice.

This endpoint has several sections, which are only sent when requested in the include parameter (see Section on demand).

Value | Section

--------|------

surchargeParameters| Item surcharge parameters

It will create a credit note from the given invoice. It will automatically take all invoice items and add them to the credit note. If you want to add just some items from the invoice or different amount, use the parameter items. This parameter will allow you to generate credit note only with provided items.

Security
shoptetAccessToken or shoptetPrivateApiToken
Path
codestringrequired

Code of invoice

Example:2018000004
Query
includestring

Sections to include

Example:include=surchargeParameters
Headers
Content-Typestringrequired
Default:"application/json"
Bodyapplication/json
dataobjectrequired
curl -i -X POST \
  'https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/invoices/2018000004/credit-note?include=surchargeParameters' \
  -H 'Content-Type: application/json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "creditNoteCode": "0000000099",
      "varSymbol": 2021000021,
      "dueDate": "2017-04-04",
      "taxDate": "2017-04-04",
      "constSymbol": "0308",
      "specSymbol": 201323134,
      "billingMethodId": 1,
      "orderCode": "201323134",
      "useItemIds": [
        0
      ],
      "items": [
        {
          "invoiceItemId": 231,
          "amount": "1.000"
        }
      ],
      "reasonRemark": "Order cancellation"
    }
  }'

Responses

Created

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