v1

latestOpenAPI 3.0.02026-07-1315476656.4 KB
CreditNote

Create a new creditNote

The list of parameters starts with the credit note array.<br> This array contains all required attributes for a complete credit note.<br> Most of the attributes are covered in the credit note attribute list, there are only two parameters standing out, namely <b>mapAll</b> and <b>objectName</b>.<br> These are just needed for our system and you always need to provide them.<br> The list of parameters then continues with the credit note position array.<br> With this array you have the possibility to add multiple positions at once.<br> In the example it only contains one position, again together with the parameters <b>mapAll</b> and <b>objectName</b>, however, you can add more credit note positions by extending the array.<br> So if you wanted to add another position, you would add the same list of parameters with an incremented array index of "1" instead of "0".<br><br> The list ends with the five parameters creditNotePosDelete, discountSave, discountDelete, takeDefaultAddress and forCashRegister.<br> They only play a minor role if you only want to create a credit note but we will shortly explain what they can do.<br> With creditNotePosDelete you have to option to delete credit note positions as this request can also be used to update credit notes.<br> Both discount parameters are deprecated and have no use for credit notes, however they need to be provided in case you want to use the following two parameters.<br> With takeDefaultAddress you can specify that the first address of the contact you are using for the credit note is taken for the credit note address attribute automatically, so you don't need to provide the address yourself.<br> Finally, the forCashRegister parameter needs to be set to <b>true</b> if your credit note is to be booked on the cash register.<br> If you want to know more about these parameters, for example if you want to use this request to update credit notes, feel free to contact our support.<br> Finally, after covering all parameters, they only important information left, is that the order of the last five attributes always needs to be kept.<br> You will also always need to provide all of them, as otherwise the request won't work properly.

post/CreditNote/Factory/saveCreditNote

Request body

Example request

{
  "creditNote": {
    "objectName": "CreditNote",
    "create": "2023-04-18T15:45:38+02:00",
    "update": "2023-04-18T15:45:38+02:00",
    "creditNoteNumber": "GU-1000",
    "contact": {
      "objectName": "Contact"
    },
    "creditNoteDate": "22.02.2022",
    "status": "100",
    "header": "My GU-1000",
    "addressCountry": {
      "id": 1,
      "objectName": "StaticCountry"
    },
    "createUser": {
      "objectName": "SevUser"
    },
    "sevClient": {
      "objectName": "SevClient"
    },
    "contactPerson": {
      "objectName": "SevUser"
    },
    "taxSet": {
      "objectName": "TaxSet"
    },
    "taxText": "Umsatzsteuer 19%",
    "taxType": "default",
    "sendDate": "01.01.2020",
    "bookingCategory": "PROVISION",
    "currency": "EUR"
  },
  "creditNotePosSave": [
    {
      "objectName": "CreditNotePos",
      "create": "2023-04-18T15:45:38+02:00",
      "update": "2023-04-18T15:45:38+02:00",
      "creditNote": {
        "objectName": "creditNote"
      },
      "part": {
        "objectName": "Part"
      },
      "quantity": 1,
      "price": 100,
      "priceTax": 19,
      "priceGross": 119,
      "name": "Dragonglass",
      "unity": {
        "objectName": "Unity"
      },
      "sevClient": {
        "objectName": "SevClient"
      },
      "positionNumber": 1,
      "taxRate": 19
    }
  ],
  "discountSave": {
    "discount": true,
    "objectName": "Discounts",
    "mapAll": true
  },
  "discountDelete": {
    "objectName": "Discounts"
  }
}

Response

Created - Returns created credit note

Example response

{
  "creditNote": {
    "id": "1",
    "objectName": "CreditNote",
    "create": "2023-04-18T15:45:38+02:00",
    "update": "2023-04-18T15:45:38+02:00",
    "creditNoteNumber": "GU-1000",
    "contact": {
      "id": "1",
      "objectName": "Contact"
    },
    "creditNoteDate": "2023-04-18T15:45:38+02:00",
    "status": "100",
    "header": "My GU-1000",
    "addressCountry": {
      "id": "1",
      "objectName": "StaticCountry"
    },
    "createUser": {
      "id": "1",
      "objectName": "SevUser"
    },
    "sevClient": {
      "id": "1",
      "objectName": "SevClient"
    },
    "deliveryDate": "2023-04-18T15:45:38+02:00",
    "contactPerson": {
      "id": "1",
      "objectName": "SevUser"
    },
    "taxRate": "0",
    "taxSet": {
      "id": "1",
      "objectName": "TaxSet"
    },
    "taxText": "Umsatzsteuer 19%",
    "taxType": "default",
    "sendDate": "2023-04-18T15:45:38+02:00",
    "currency": "EUR",
    "sumNet": "0",
    "sumTax": "0",
    "sumGross": "0",
    "sumDiscounts": "0",
    "sumNetForeignCurrency": "0",
    "sumTaxForeignCurrency": "0",
    "sumGrossForeignCurrency": "0",
    "sumDiscountsForeignCurrency": "0"
  },
  "creditNotePos": [
    {
      "id": "1",
      "objectName": "CreditNotePos",
      "create": "2023-04-18T15:45:38+02:00",
      "update": "2023-04-18T15:45:38+02:00",
      "creditNote": {
        "id": "1",
        "objectName": "creditNote"
      },
      "part": {
        "id": "1",
        "objectName": "Part"
      },
      "quantity": "1",
      "price": "100",
      "priceNet": "100",
      "priceTax": "19",
      "priceGross": "119",
      "name": "Dragonglass",
      "unity": {
        "id": "1",
        "objectName": "Unity"
      },
      "sevClient": {
        "id": "1",
        "objectName": "SevClient"
      },
      "positionNumber": "1",
      "discount": "0",
      "taxRate": "19",
      "sumDiscount": "0"
    }
  ]
}