From 35334e0eb4a55506fac65d7fac917adce3f326fd Mon Sep 17 00:00:00 2001 From: Simon Lukas <60503970+Plaenkler@users.noreply.github.com> Date: Mon, 30 Dec 2024 11:23:31 +0100 Subject: [PATCH 01/13] [UPD] Basic structure --- README.md | 27 +++++++++++++++++++++++++-- client/client.go | 1 + examples/authenticate/authenticate.go | 5 +++++ go.mod | 3 +++ 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 client/client.go create mode 100644 examples/authenticate/authenticate.go create mode 100644 go.mod diff --git a/README.md b/README.md index 51c7db2..e98260f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,25 @@ -# sevdesk -sevDesk API SDK +# 📖 sevDesk + +[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) +[![Linters](https://github.com/Plaenkler/sevDesk/actions/workflows/linters.yml/badge.svg)](https://github.com/Plaenkler/sevDesk/actions/workflows/linters.yml) +[![Go Reference](https://pkg.go.dev/badge/github.com/Plaenkler/sevDesk.svg)](https://pkg.go.dev/github.com/Plaenkler/sevDesk) +[![Support me](https://img.shields.io/badge/Support%20me%20%E2%98%95-orange.svg)](https://www.buymeacoffee.com/Plaenkler) + +Plaenkler/sevDesk enables HTTP requests to be made to the [sevDesk API](https://api.sevdesk.de/). The library abstracts the constructs and allows developers to interact with the sevDesk API through a convenient and intuitive interface. + +
+ | + |
Component | Description |
---|---|
HTTP-Methods |
|
URL of the API | https://my.sevdesk.de/api/v1 |
URI of the resource | The resource to query. For example contacts in sevdesk: /Contact Which will result in the following complete URL: https://my.sevdesk.de/api/v1/Contact |
Query parameters | Are attached by using the connectives ? and & in the URL. |
Request headers | Typical request headers are for example:
|
Response headers | Typical response headers are for example:
|
Request body | Mostly required in POST and PUT requests. Often the request body contains json, in our case, it also accepts url-encoded data. |
Parameter | Description |
---|---|
embed | Will extend some of the returned data. A brief example can be found below. |
countAll | \"countAll=true\" returns the number of items |
Parameter | Description |
---|---|
limit | Limits the number of entries that are returned. Most useful in GET requests which will most likely deliver big sets of data like country or currency lists. In this case, you can bypass the default limitation on returned entries by providing a high number. |
offset | Specifies a certain offset for the data that will be returned. As an example, you can specify \"offset=2\" if you want all entries except for the first two. |
https://my.sevdesk.de/api/v1/Invoice?offset=20&limit=10
format
could be replaced with json
or xml
format
could be replaced with json
or x-www-form-urlencoded
Status code | Description |
---|---|
200 OK | The request was successful |
201 Created | Most likely to be found in the response of a POST request. This code indicates that the desired resource was successfully created. |
Status code | Description |
---|---|
400 Bad request | The request you sent is most likely syntactically incorrect. You should check if the parameters in the request body or the url are correct. |
401 Unauthorized | The authentication failed. Most likely caused by a missing or wrong API token. |
403 Forbidden | You do not have the permission the access the resource which is requested. |
404 Not found | The resource you specified does not exist. |
500 Internal server error | An internal server error has occurred. Normally this means that something went wrong on our side. However, sometimes this error will appear if we missed to catch an error which is normally a 400 status code! |
X-Version
that should be filled with the desired version.default
X-Version | Description |
---|---|
default | Should always reference the oldest version. If a specific resource is updated with a new version, then the default version stays the same until the old version is deleted |
1.0 ... 1.9 | Our incrementally version for each resource independent Important: A resource can be available via default but not 1.0 |
taxType = default
, taxType = eu
and / or taxType = ss
, these tax types will automatically be mapped to the new tax rules for a transition period, but you have to make sure the taxRate used in positions is within the allowed ones (you may use the [ReceiptGuidance endpoint](#tag/Voucher/operation/forAllAccounts) for that), otherwise the API will return a validation error (HTTP status code 422). For [orders](#tag/Order), [invoices](#tag/Invoice), [vouchers](#tag/Voucher) and [credit notes](#tag/CreditNote) that were created within sevdesk-Update 2.0 the response will change in all endpoints in which these objects are returned.VAT Rule | New Property | Allowed taxRate in positions | Old property (deprecated) |
---|---|---|---|
Umsatzsteuerpflichtige Umsätze | 'taxRule': 1 |
| 'taxType': 'default' |
Ausfuhren | 'taxRule': 2 |
| - |
Innergemeinschaftliche Lieferungen | 'taxRule': 3 |
| 'taxType': 'eu' |
Steuerfreie Umsätze §4 UStG | 'taxRule': 4 |
| - |
Reverse Charge gem. §13b UStG | 'taxRule': 5 |
| - |
Nicht im Inland steuerbare Leistung Not available for:
| 'taxRule': 17 |
| 'taxType': 'noteu' |
VAT Rule | New Property | Allowed taxRate in positions | Old property (deprecated) |
---|---|---|---|
Innergemeinschaftliche Erwerbe | 'taxRule': 8 |
| - |
Vorsteuerabziehbare Aufwendungen | 'taxRule': 9 |
| 'taxType': 'default' |
Nicht vorsteuerabziehbare Aufwendungen | 'taxRule': 10 |
| - |
Reverse Charge gem. §13b Abs. 2 UStG mit Vorsteuerabzug 0% (19%) | 'taxRule': 12 |
| - |
Reverse Charge gem. §13b UStG ohne Vorsteuerabzug 0% (19%) | 'taxRule': 13 |
| - |
Reverse Charge gem. §13b Abs. 1 EU Umsätze 0% (19%) | 'taxRule': 14 |
| - |
VAT Rule | New Property | Allowed taxRate in positions | Old property (deprecated) |
---|---|---|---|
Steuer nicht erhoben nach §19UStG | 'taxRule': 11 |
| 'taxType': 'ss' |
VAT Rule | New Property | Allowed taxRate in positions | Old property (deprecated) |
---|---|---|---|
Nicht vorsteuerabziehbare Aufwendungen | 'taxRule': 10 |
| 'taxType': 'ss' |
Reverse Charge gem. §13b UStG ohne Vorsteuerabzug 0% (19%) | 'taxRule': 13 |
| - |
DRAFT (50)
or UNPAID / DUE (100)
are possible when creating a new voucher. Use the [/api/v1/Voucher/{voucherId}/bookAmount endpoint](#tag/Voucher/operation/bookVoucher) to set a voucher to paidcustom
does not work anymoreDRAFT (100)
without a contact does not work anymoreinvoiceType: 'AR'
) and partial invoices (invoiceType: 'TR'
) can only be created with the tax rule 'Umsatzsteuerpflichtige Umsätze (taxRule: 1)'(for Regelbesteuerer) or 'Steuer nicht erhoben nach §19 UStG (taxRule: 11)'(for Kleinunternehmer)invoiceType: 'MA'
) with the value of property reminderCharge
greater than 0 does not work anymoreinvoiceType: 'AR'
), a partial invoice (invoiceType: 'TR'
) or a final invoice (invoiceType: 'ER'
) with a currency deviating from the clients defaultCurrency
is not possible anymoreDRAFT (100)
and can not be changed manually. Use the matching endpoints (e.g. [sendViaEmail](#tag/Invoice/operation/sendInvoiceViaEMail)) to automatically change the status accordinglyenshrined
is now only possible by using the [enshrine endpoint](#tag/CheckAccountTransaction/operation/checkAccountTransactionEnshrine)DRAFT (100)
. \n### New endpoint [Invoice/{invoiceId}/resetToOpen](#tag/Invoice/operation/invoiceResetToOpen)\n This new endpoint can be used to reset the status of an invoice to OPEN (200)
. \n### New endpoint [Invoice/{invoiceId}/enshrine]((#tag/Invoice/operation/invoiceEnshrine))\n The enshrine endpoint is now used to set the property enshrined
. This operation CAN NOT be undone due to legal reasons! \n## Credit Notes\n The changes to the vat rules also apply here. Check the documentation of voucher above as the changes are the same. \n### General stricter validation in PUT and POST endpoints\n We added stricter validation to ensure only correct credit notes are created which than can be further processed in sevdesk. Due to the move from taxTypes/taxSets to taxRules you need to check the compatibility of the taxRules in combination with the tax rates. Following use cases do not work anymore or have changed: deliveryDateUntil
) for an invoice that has a date of delivery (deliveryDateUntil
) is no longer possibledeliveryDateUntil
) for an invoice that has no date of delivery (deliveryDateUntil
) is no longer possibledeliveryDateUntil
) that is before the date of delivery (deliveryDateUntil
) of the invoice is no longer possibleinvoiceType: 'AR'
) or partial invoice (invoiceType: 'TR'
) is no longer possiblebookingCategory
other than UNDERACHIEVEMENT
is no longer possibleDRAFT (100)
and can not be changed manually. Use the matching endpoints (e.g. [sendViaEmail](#tag/CreditNote/operation/sendCreditNoteViaEMail)) to automatically change the status accordinglyDRAFT (100)
. You can find the documentation [here](#tag/CreditNote/operation/creditNoteResetToDraft). \n### New endpoint CreditNote/{creditNoteId}/resetToOpen\n This new endpoint can be used to reset the status of a credit note to OPEN (200)
. You can find the documentation [here](#tag/CreditNote/operation/creditNoteResetToOpen). \n### New endpoint CreditNote/{creditNoteId}/enshrine\n [The enshrine endpoint](#tag/CreditNote/operation/creditNoteEnshrine) is now used to set the property enshrined
. This operation CAN NOT be undone due to legal reasons!\n## Parts\n \n### General stricter validation in PUT and POST endpoints\n Following use cases do not work anymore or have changed: Attribute | Contact Type | Description | Attribute Type |
---|---|---|---|
name | Organisations | The name of an organisation | String |
surename | Individuals | The first name of an individual (yes, we know...) | String |
familyname | Individuals | The last name of an individual | String |
name2 | Individuals | The middle name (or name-suffix) of an individual | String |
category | Organisations, Individuals | The category of the contact | Nested object (Category) |
defaultCashbackTime | Organisations, Individuals | Time frame in which a cashback is granted to the customer if he pays an invoice | Integer |
defaultCashbackPercent | Organisations, Individuals | Percentage of which the price of an invoice is reduced if paid in above time frame | Double |
taxNumber | Organisations, Individuals | Tax number of the contact. | String |
excemptVat | Organisations, Individuals | Defines if the contact is free of vat | Boolean |
defaultTimeToPay | Organisations, Individuals | The default time this end customer has to pay invoices | Integer |
bankNumber | Organisations, Individuals | The bank number of the contact | Integer |
birthday | Individuals | The birthday | Unix-Timestamp |
vatNumber | Organisations, Individuals | The vat number | String |
defaultDiscountAmount | Organisations, Individuals | A default discount amount this contact gets | Double |
defaultDiscountPercentage | Organisations, Individuals | Define if the value in defaultDiscountAmount is regarded as a percentage. | Boolean |
gender | Individuals | Gender (m,w, or your own definition) | String |
academicTitle | Individuals | Academic title of the contact | String |
description | Organisations, Individuals | A description for the contact | String (can contain some html) |
titel | Individuals | Position an individual holds in an organisation | String |
parent | Individuals | The organisation to which this individual belongs | Nested object (Contact) |
customerNumber | Organisations, Individuals | The customer number of the contact. | String |
bankAccount | Organisations, Individuals | The bank account number | String |
Filter | Description |
---|---|
depth=1 | Retrieve organisations AND persons. This attribute is not active as default, so if you don't specify it as true, you will only get organisations. |
category[id]={id}&category[objectName]=Category | Only retrieve all contacts with id as a category |
city={cityName} | Only retrieve all contacts with cityName as a city |
tags[x][id]={id}&tags[x][objectName]=Tag | Only retrieve all contacts with id as a tag. You can specify multiple tags by adding more array entries. |
customerNumber={number} | Only retrieve all contacts with number as a customer number |
parent[id]={id}&parent[objectName]=Contact | Only retrieve all contacts with id as a parent organisation |
name={name} | Only retrieve all contacts with name as a name, surename or familyname |
zip={zipCode} | Only retrieve all contacts with zipCode as a zip |
country[id]={id}&country[objectName]=StaticCountry | Only retrieve all contacts with id as a country |
createBefore={timestamp} | Only retrieve all contacts created before timestamp |
createAfter={timestamp} | Only retrieve all contacts created after timestamp |
updateBefore={timestamp} | Only retrieve all contacts updated last before timestamp |
updateAfter={timestamp} | Only retrieve all contacts updated last after timestamp |
orderByCustomerNumber={ASC/DESC} | Order all contacts after customer number in ASC/DESC order |
Booking Category | Description | Abbreviation |
---|---|---|
Provision | Not supported in sevdesk-Update 2.0. The credit note is a provision. | PROVISION |
Assigned royalty | Not supported in sevdesk-Update 2.0. The credit note is a assigned royalty. | ROYALTY_ASSIGNED |
Unassigned royalty | Not supported in sevdesk-Update 2.0. The credit note is a unassigned royalty. | ROYALTY_UNASSIGNED |
Underachievement of invoice | The Credit Note is a underachievement of an invoice or voucher. If this is the case, you need to provide the ID of this invoice or voucher in the attribute refSrcInvoice or refSrcVoucher ! | UNDERACHIEVEMENT |
To be booked on special account | Not supported in sevdesk-Update 2.0. The Credit Note should be booked on a special account. If this is the case, you need to provide the ID of this account in the attribute accountingType! | ACCOUNTING_TYPE |
Credit note status | Meaning | Status code |
---|---|---|
Draft | The credit note is still a draft. It has not been sent to the end-customer and can still be changed. | 100 |
Open / Delivered | The credit note has been sent to the end-customer. | 200 |
Partially paid | The credit note has been partially paid. | 1000 |
Paid | The credit note has been paid. | 1000 |
Attribute | Credit Note Type | Description | Attribute Type |
---|---|---|---|
taxType | Any | Use this in sevdesk-Update 1.0 (instead of taxRule). Defines the vat-regulation. Can be:
| String |
taxSet | Any | Use this in sevdesk-Update 1.0 (instead of taxRule). Use for custom defined vat-regulations. Requires "taxType": "custom" | Integer |
taxRule | Any | Use this in sevdesk-Update 2.0 (replaces taxType / taxSet). Defines the vat-regulation. For "Regelbesteuerung" it can be one of:
"taxRule": {"id": "1", "objectName": "TaxRule"} | Nested object (TaxRule) |
accountingType | Any | The account on which this credit note should be booked. This attribute has to be used in case the booking category ACCOUNTING_TYPE is used. | Integer |
refSrcInvoice | Any | The invoice from which the underachievement originates. This attribute has to be used if "bookingCategory": "UNDERACHIEVEMENT" is used.We recommend to use /CreditNote/Factory/createFromInvoice to create a credit note for an invoices. | Integer |
refSrcVoucher | Any | Not supported in sevdesk-Update 2.0. The voucher from which the underachievement originates. This attribute has to be used in case the booking category UNDERACHIEVEMENT is used.We recommend to use /CreditNote/Factory/createFromVoucher to create a credit note for an invoices. | Integer |
currency | Any | Currency of the credit note. Needs to be currency code according to ISO-4217. | String |
taxText | Any | Text describing the vat regulation you chose. A common text of our German customers would be: Umsatzsteuer ausweisen or zzgl. Umsatzsteuer 19% | String |
taxRate | Any | This is not used anymore. Use the taxRate of the individual positions instead. | Integer |
contactPerson | Any | The sevdesk user which acts as a contact person for this credit note. | Nested object (SevUser) |
smallSettlement | Any | If the sevdesk account is falling under the small entrepreneur scheme the credit notes must't contain any vat. If this is the case, this attribute should be true, otherwise false. | Boolean |
creditNoteDate | Any | The credit note date. | Date / Timestamp |
status | Any | The credit note status. | Integer |
showNet | Any | This attribute determines, if the price you give the credit note positions will be regarded as gross or net. If true, the price attribute will hold the net value, otherwise the gross value, as described in the section above. | Boolean |
enshrined | Any | Enshrined credit notes cannot be changed. Can only be set via /CreditNote/{creditNoteId}/enshrine. This operation cannot be undone. | Date / Timestamp |
customerInternalNote | Any | You can use this attribute to provide a note for the credit note. It can be used for reference numbers, order numbers or other important information. | String |
address | Any | Holds the complete address to which the credit note is directed. You can use line brakes to separate the different address parts. | String |
deliveryDate | Any | The delivery date of the credit note. This can also be a date range if you provide another timestamp for deliveryDateUntil. | Timestamp |
deliveryDateUntil | Any | You can provide a value here if you want the delivery date to be a date range and you have already given a timestamp to deliveryDate. | Timestamp |
sendType | Any | Is set when using [CreditNote/{creditNoteId}/sendBy](#tag/CreditNote/operation/creditNoteSendBy) / [CreditNote/{creditNoteId}/sendViaEmail](#tag/CreditNote/operation/sendCreditNoteViaEMail). Valid types are: VPR (printed), VPDF (downloaded), VM (mailed), VP (postal). | String |
creditNoteNumber | Any | The credit note number. | String |
contact | Any | The end-customer to which the credit note is directed. | Nested object (Contact) |
header | Any | The credit note header. Usually consists of the credit note number and a prefix. | String |
headText | Any | A head text for the credit note. Can contain certain html tags. | String |
footText | Any | A foot text for the credit note. Can contain certain html tags. | String |
payDate | Any | The date the credit note has been paid. | Timestamp |
costCentre | Any | A cost centre for the credit note. | Nested object (CostCentre) |
sendDate | Any | The date the credit note has been sent to the end-customer. | Timestamp |
bookingCategory | Any | The booking category of the credit note. Must be UNDERACHIEVEMENT in sevdesk-Update 2.0. | String |
Filter | Description |
---|---|
creditNoteNumber={number} | Only retrieve all credit notes with number as a credit note number |
onlyEnshrined=true | Only retrieve all credit notes which are enshrined |
tags[x][id]={id}&tags[x][objectName]=Tag | Only retrieve all credit notes with id as a tag. You can specify multiple tags by adding more array entries. |
status={status} | Only retrieve credit notes of a given status |
delinquent=true | Only retrieve delinquent (due) credit notes |
notdelinquent=true | Only retrieve credit notes which are not delinquent (due) |
customerIntenalNote={note} | Only retrieve all credit notes with note as a customer internal note |
origin[id]={id}&origin[objectName]=ModelName | Only retrieve all credit notes with id as an origin |
costCentre[id]={id}&costCentre[objectName]=CostCentre | Only retrieve all credit notes with id as a cost centre. |
contact[id]={id}&contact[objectName]=Contact | Only retrieve all credit notes with id as a contact |
startDate={timestamp} | Only retrieve all credit notes where credit note date is bigger than timestamp |
endDate={timestamp} | Only retrieve all credit notes where credit note date is smaller than timestamp If startDate and endDate are both supplied, you will get all credit notes in the defined range |
day={timestamp} | Only retrieve all credit notes where credit note date falls on the day of timestamp |
header={header} | Only retrieve all credit notes with header as a header |
headerSearch={header} | Only retrieve all credit notes of which the header is like header |
paymentMethod[id]={id}&paymentMethod[objectName]=PaymentMethod | Only retrieve all credit notes with id as a payment method |
headerOrNumber={headerOrNumber} | Only retrieve all credit notes of which the header or credit note number is like headerOrNumber |
headerStartsWith={headerStart} | Only retrieve all credit notes of which the header starts with headerStart |
globalSearch={searchTerm} | Search for credit notes related to searchTerm |
orderByCreditNoteNumber={ASC/DESC} | Order all credit notes after credit note number in ASC/DESC order |
partiallyPaid=true | Retrieve all credit notes which are partially paid |
orderByDueDate=true | Retrieve all credit notes ordered by their due date |
orderByDueTime=true | Retrieve all credit notes ordered by their due time |
orderByDebit=true | Retrieve all credit notes ordered by their debit |
creditNoteNumberGreater={number} | Only retrieve all credit notes of which the credit note number is bigger than number |
creditNoteNumberNumberSmaller={number} | Only retrieve all credit notes of which the credit note number is smaller than number |
startAmount={amount} | Only retrieve all credit notes of which the (net/gross) sum is larger or equal amount |
endAmount={amount} | Only retrieve all credit notes of which the (net/gross) sum is smaller or equal amount |
Attribute | Description | Attribute Type |
---|---|---|
taxRate | The tax rate of the position. | Double |
unity | The unity in which one item is measured. | Nested object (Unity) |
quantity | The quantity of items. | Double |
creditNote | The creditNote to which the position belongs. | Nested object (CreditNote) |
text | A text describing the position. | String |
positionNumber | The number of the position if there are multiple positions in a credit note. Needs to start with zero and is incremented for every new position. If you want to order them differently, you can change their position numbers to your needs. | Integer |
name | The name of the item in the position. | String |
price | The price for one unit of the item in the position. | Double |
part | You can define a part from your sevdesk inventory here. Please be aware, you will still need to provide the name, price and everything else as this will not automatically be generated. | Nested object (Part) |
{"creditNote": { "id": 0, "objectName": "CreditNote", "mapAll": true},
"creditNotePos":[{...}]
"creditNote": { "id": 0, "objectName": "CreditNote", "mapAll": true},
"creditNotePos":[{"id": 0, ...}]
Attribute | Invoice Type | Description | Attribute Type |
---|---|---|---|
taxType | Any | Use this in sevdesk-Update 1.0 (instead of taxRule). Defines the vat-regulation. Can be:
| String |
taxSet | Any | Use this in sevdesk-Update 1.0 (instead of taxRule). Use for custom defined vat-regulations. Requires "taxType": "custom" | Integer |
taxRule | Any | Use this in sevdesk-Update 2.0 (replaces taxType / taxSet). Defines the vat-regulation. For "Regelbesteuerung" it can be one of:
"taxRule": {"id": "1", "objectName": "TaxRule"} | Nested object (TaxRule) |
currency | Any | Currency of the invoice. Needs to be currency code according to ISO-4217. | String |
taxText | Any | Text describing the vat regulation you chose. A common text of our German customers would be: Umsatzsteuer ausweisen or zzgl. Umsatzsteuer 19% | String |
taxRate | Any | This is not used anymore. Use the taxRate of the individual positions instead. | Integer |
contactPerson | Any | The sevdesk user which acts as a contact person for this invoice. | Nested object (SevUser) |
smallSettlement | Any | If the sevdesk account is falling under the small entrepreneur scheme the invoices must't contain any vat. If this is the case, this attribute should be true, otherwise false. | Boolean |
invoiceDate | Any | The invoice date.
+
+ **Requirements:**
+ * For final invoices ("invoiceType" = "ER" ), the invoiceDate must be later than or equal to the invoiceDate of related advance ("invoiceType" = "AR" ) / partial ("invoiceType" = "TR" ) invoices. | Date / Timestamp |
status | Any | The invoice status. | Integer |
showNet | Any | This attribute determines, if the price you give the invoice positions will be regarded as gross or net. If true, the price attribute will hold the net value, otherwise the gross value, as described in the section above. | Boolean |
discount | Any | If the end-customer gets a discount if he pays the invoice in a given time, you can specify the percentage of the discount here. Should this be the case, you will need to provide a value for the attribute discountTime too, otherwise there is no time given and the end-customer won't get a discount. If you don't want this, just leave this attribute at zero. | Integer |
discountTime | Any | If a value other than zero is used for the discount attribute you need to specify the amount of days for which the discount is granted. | Integer |
enshrined | Any | Enshrined invoices cannot be changed. Can only be set via /Invoice/{invoiceId}/enshrine. This operation cannot be undone. | Date / Timestamp |
customerInternalNote | Any | You can use this attribute to provide a note for the invoice. It can be used for reference numbers, order numbers or other important information. | String |
address | Any | Holds the complete address to which the invoice is directed. You can use line brakes to separate the different address parts. | String |
deliveryDate | Any | The delivery date of the invoice. This can also be a date range if you provide another timestamp for deliveryDateUntil. | Timestamp |
deliveryDateUntil | Any | You can provide a value here if you want the delivery date to be a date range and you have already given a timestamp to deliveryDate. | Timestamp |
sendType | Any | Is set when using [Invoice/{invoiceId}/sendBy](#tag/Invoice/operation/invoiceSendBy) / [Invoice/{invoiceId}/sendViaEmail](#tag/Invoice/operation/sendInvoiceViaEMail). Valid types are: VPR (printed), VPDF (downloaded), VM (mailed), VP (postal). | String |
origin | Any | You can specify the object from which an invoice originated, like an order. Just provide the ID of this object. | Integer |
invoiceNumber | Any | The invoice number. | String |
contact | Any | The end-customer to which the invoice is directed. Please note, you need to provide a contact if the invoice has any other status than 100. | Nested object (Contact) |
header | Any | The invoice header. Usually consists of the invoice number and a prefix. | String |
headText | Any | A head text for the invoice. Can contain certain html tags. | String |
footText | Any | A foot text for the invoice. Can contain certain html tags. | String |
timeToPay | Any | The time the end-customer has to pay the invoice in days. | Integer |
payDate | Any | The date the end-customer has paid the invoice. | Timestamp |
paymentMethod | Any | The payment method for the invoice. Needs the ID of a specified payment method. | Integer |
costCentre | Any | A cost centre for the invoice. | Nested object (CostCentre) |
sendDate | Any | The date the invoice was sent to the end-customer. | Timestamp |
invoiceType |
| The invoice type. | String |
dunningLevel | Reminders | The dunning level. Starts with 1 (Payment reminder) and should be incremented by one every time another reminder is sent. | Integer |
reminderDeadline | Reminders | The deadline for the next reminder. | Timestamp |
reminderDebit | Reminders | The reminder debit. | Double |
reminderTotal | Reminders | The total reminder amount. | Double |
reminderCharge | Reminders | The additional reminder charge. | Double |
accountIntervall | Recurring Invoices | The interval in which recurring invoices are due. | ISO-8601 Duration |
accountNextInvoice | Recurring Invoices | The date when the next invoice is due. | Timestamp |
propertyIsEInvoice | e-invoice | If true, the invoice will be created as e-invoice. To create a valid e-invoice some extra data are required
sevClient
contact
invoice
| boolean |
https://my.sevdesk.de/api/v1/SevSequence/Factory/getByType?objectType=Invoice&type=RE
Invoice Type | Description | Abbreviation |
---|---|---|
Normal invoice | A normal invoice which documents a simple selling process. | RE |
Recurring invoice | An invoice which generates normal invoices with the same values regularly in fixed time frames (every month, year, ...). | WKR |
Cancellation invoice | An invoice which cancels another already created normal invoice. | SR |
Reminder invoice | An invoice which gets created if the end-customer failed to pay a normal invoice in a given time frame. Often includes some kind of reminder fee. | MA |
Part invoice | Part of a complete invoice. All part invoices together result in the complete invoice. Often used if the end-customer can partly pay for items or services. | TR |
Final invoice | The final invoice of all part invoices which completes the invoice. After the final invoice is paid by the end-customer, the selling process is complete. | ER |
Invoice status | Meaning | Status code |
---|---|---|
Deactivated recurring invoice | The invoice is a deactivated recurring invoice. This status code is only relevant for recurring invoices. | 50 |
Draft | The invoice is still a draft. It has not been sent to the end-customer and can still be changed. | 100 |
Open / Due | The invoice has been sent to the end-customer. It is either shown as open if the pay date is not exceeded or due if it is. | 200 |
Partially paid | The invoice has been partially paid. This means, that it is linked to a transaction on some payment account in sevdesk. This status was introduced with Release 4.181 (June 13, 2024). Invoices that were partially paid before that release will have the status "Open" ( "status": "200" ). In that case use [Invoice/{invoiceId}/getIsPartiallyPaid](#tag/Invoice/operation/getIsInvoicePartiallyPaid) instead of checking the status directly. | 750 |
Paid | The invoice has been paid. This means, that it is linked to a transaction on some payment account in sevdesk. | 1000 |
propertyIsEInvoice
to true
When propertyIsEInvoice
is set an XML is embedded inside the PDF. Embedding the XML into the PDF is called ZUGFeRD. If you just need the XML (XRechnung) you can get it by calling [Invoice/{invoiceId}/getXml](#tag/Invoice/operation/invoiceGetXml). Both XML files are identical.
+
+ # How to book an invoice
+ Booking the invoice with a transaction is probably the most important part in the bookkeeping process.Filter | Description |
---|---|
partiallyPaid=true | Retrieve all invoices which are partially paid |
orderByDebit=true | Retrieve all invoices ordered by their debit |
orderByDueTime=true | Retrieve all invoices ordered by their due time |
showAll=true | Retrieve all invoices of all types |
invoiceNumber={number} | Only retrieve all invoices with number as a invoice number |
delinquent=true | Only retrieve delinquent (due) invoices |
notdelinquent=true | Only retrieve invoices which are not delinquent (due) |
tags[x][id]={id}&tags[x][objectName]=Tag | Only retrieve all invoices with id as a tag. You can specify multiple tags by adding more array entries. |
costCentre[id]={id}&costCentre[objectName]=CostCentre | Only retrieve all invoices with id as a cost centre. |
status={status} | Only retrieve invoices of a given status |
createBefore={timestamp} | Only retrieve all invoices created before timestamp |
createAfter={timestamp} | Only retrieve all invoices created after timestamp |
updateBefore={timestamp} | Only retrieve all invoices updated last before timestamp |
updateAfter={timestamp} | Only retrieve all invoices updated last after timestamp |
contact[id]={id}&contact[objectName]=Contact | Only retrieve all invoices with id as a contact |
orderByDueDate=true | Retrieve all invoices ordered by their due date |
customerIntenalNote={note} | Only retrieve all invoices with note as a customer internal note |
day={timestamp} | Only retrieve all invoices where invoice date falls on the day of timestamp |
startDate={timestamp} | Only retrieve all invoices where invoice date is bigger than timestamp |
endDate={timestamp} | Only retrieve all invoices where invoice date is smaller than timestamp If startDate and endDate are both supplied, you will get all invoices in the defined range |
header={header} | Only retrieve all invoices with header as a header |
onlyDunned=true | Retrieve all invoices which are dunned |
showWkr=all | Retrieve all recurring invoices |
showMa=all | Retrieve all invoices which are payment reminders |
origin[id]={id}&origin[objectName]=ModelName | Only retrieve all invoices with id as an origin |
invoiceType={type} | Only retrieve all invoices with type as an invoice type |
paymentMethod[id]={id}&paymentMethod[objectName]=PaymentMethod | Only retrieve all invoices with id as a payment method |
headerSearch={header} | Only retrieve all invoices of which the header is like header |
headerStartsWith={headerStart} | Only retrieve all invoices of which the header starts with headerStart |
headerOrNumber={headerOrNumber} | Only retrieve all invoices of which the header or invoice number is like headerOrNumber |
globalSearch={searchTerm} | Search for invoices related to searchTerm |
orderByInvoiceNumber={ASC/DESC} | Order all invoices after invoice number in ASC/DESC order |
invoiceNumberGreater={number} | Only retrieve all invoices of which the invoice number is bigger than number |
invoiceNumberSmaller={number} | Only retrieve all invoices of which the invoice number is smaller than number |
sendType={type} | Only retrieve all invoices with type as a send type |
fulltextSearch={text} | Search for invoices, positions or contact with text as a text |
Attribute | Description | Attribute Type |
---|---|---|
taxRate | The tax rate of the position. | Double |
unity | The unity in which one item is measured. | Nested object (Unity) |
quantity | The quantity of items. | Double |
invoice | The invoice to which the position belongs. | Nested object (Invoice) |
discount | A discount amount for the specific position. | Double |
text | A text describing the position. | String |
positionNumber | The number of the position if there are multiple positions in an invoice. Needs to start with zero and is incremented for every new position. If you want to order them differently, you can change their position numbers to your needs. | Integer |
name | The name of the item in the position. | String |
price | The price for one unit of the item in the position. | Double |
part | You can define a part from your sevdesk inventory here. Please be aware, you will still need to provide the name, price and everything else as this will not automatically be generated. | Nested object (Part) |
{"invoice": { "id": 0, "objectName": "Invoice", "mapAll": true},
"invoicePos":[{...}]
"invoice": { "id": 0, "objectName": "Invoice", "mapAll": true},
"invoicePos":[{"id": 0, ...}]
German | de_DE |
German(Autria) | de_AT |
German(Swiss) | de_CH |
English | en_US |
Spanish | es_ES |
French | fr_FR |
Italian | id_IT |
Greek | el_GR |
Show PayPal icon | A |
Show link | B |
Disable Paypal | C |
PayPal as Strig | D |
Order Type | Description | Abbreviation |
---|---|---|
Estimate / Proposal | A normal order which documents a simple estimation / proposal for an end-customer. | AN |
Order confirmation | A confirmation for an estimate / proposal. | AB |
Delivery note | A confirmation that goods from an estimate / proposal have been sent. | LI |
Order status | Meaning | Status code |
---|---|---|
Draft | The order is still a draft. It has not been sent to the end-customer and can still be changed. | 100 |
Delivered | The order has been sent to the end-customer. | 200 |
Rejected / Cancelled | The order has been rejected by the end-customer. | 300 |
Accepted | The order has been accepted by the end-customer. | 500 |
Partially Calculated | An invoice for parts of the order (but not the full order) has been created. | 750 |
Calculated | The order has been calculated. One or more invoices have been created covering the whole order. | 1000 |
Attribute | Description | Attribute Type |
---|---|---|
taxType | Use this in sevdesk-Update 1.0 (instead of taxRule). Defines the vat-regulation. Can be:
| String |
taxSet | Use this in sevdesk-Update 1.0 (instead of taxRule). Use for custom defined vat-regulations. Requires "taxType": "custom" | Integer |
taxRule | Use this in sevdesk-Update 2.0 (replaces taxType / taxSet). Defines the vat-regulation. For "Regelbesteuerung" it can be one of:
"taxRule": {"id": "1", "objectName": "TaxRule"} | Nested object (TaxRule) |
currency | Currency of the order. Needs to be currency code according to ISO-4217. | String |
version | Version of the order. Can be used if you have multiple drafts for the same order. Should start with 0. | Integer |
taxText | Text describing the vat regulation you chose. A common text of our German customers would be: Umsatzsteuer ausweisen or zzgl. Umsatzsteuer 19% | String |
taxRate | This is not used anymore. Use the taxRate of the individual positions instead. | Integer |
contactPerson | The sevdesk user which acts as a contact person for this order. | Nested object (SevUser) |
smallSettlement | If the sevdesk account is falling under the small entrepreneur scheme the order must't contain any vat. If this is the case, this attribute should be true, otherwise false. | Boolean |
orderDate | The order date. | Date / Timestamp |
status | The order status. | Integer |
showNet | This attribute determines, if the price you give the order positions will be regarded as gross or net. If true, the price attribute will hold the net value, otherwise the gross value. | Boolean |
customerInternalNote | You can use this attribute to provide a note for the order. It can be used for reference numbers, order numbers or other important information. | String |
address | Holds the complete address to which the order is directed. You can use line brakes to separate the different address parts. | String |
sendType | If you don't plan to send the order over another endpoint like /Order/sendViaEmail or Order/sendBy but instead give it the status "200" directly, you need to specify a send type here. Valid types are: VPR (printed), VPDF (downloaded), VM (mailed), VP (postal). | String |
origin | You can specify the object from which an order originated. Just provide the ID of this object. | Integer |
typeOrigin | Specifies the object name of the object from which an order originated. Most likely Order or Invoice. | String |
orderNumber | The order number. | String |
contact | The end-customer to which the order is directed. | Nested object (Contact) |
header | The order header. Usually consists of the order number and a prefix. | String |
headText | A head text for the order. Can contain certain html tags. | String |
footText | A foot text for the order. Can contain certain html tags. | String |
paymentTerms | The payment terms for the order. | Integer |
deliveryTerms | The delivery terms for the order. | Integer |
sendDate | The date the order was sent to the end-customer. | Timestamp |
orderType | The order type. | String |
Filter | Description |
---|---|
orderNumber={number} | Only retrieve all orders with number as a order number |
tags[x][id]={id}&tags[x][objectName]=Tag | Only retrieve all orders with id as a tag. You can specify multiple tags by adding more array entries. |
status={status} | Only retrieve orders of a given status |
createBefore={timestamp} | Only retrieve all orders created before timestamp |
createAfter={timestamp} | Only retrieve all orders created after timestamp |
updateBefore={timestamp} | Only retrieve all orders updated last before timestamp |
updateAfter={timestamp} | Only retrieve all orders updated last after timestamp |
contact[id]={id}&contact[objectName]=Contact | Only retrieve all orders with id as a contact |
startDate={timestamp} | Only retrieve all orders where order date is bigger than timestamp |
endDate={timestamp} | Only retrieve all orders where order date is smaller than timestamp If startDate and endDate are both supplied, you will get all orders in the defined range |
orderType={type} | Only retrieve all orders with type as an order type |
headerSearch={header} | Only retrieve all orders of which the header is like header |
globalSearch={searchTerm} | Search for orders related to searchTerm |
orderByOrderNumber={ASC/DESC} | Order all orders after order number in ASC/DESC order |
orderNumberGreater={number} | Only retrieve all orders of which the order number is bigger than number |
orderNumberNumberSmaller={number} | Only retrieve all orders of which the order number is smaller than number |
startAmount={amount} | Only retrieve all orders of which the (net/gross) sum is larger or equal amount |
endAmount={amount} | Only retrieve all orders of which the (net/gross) sum is smaller or equal amount |
Attribute | Description | Attribute Type |
---|---|---|
taxRate | The tax rate of the position. | Double |
unity | The unity in which one item is measured. | Nested object (Unity) |
quantity | The quantity of items. | Double |
order | The order to which the position belongs. | Nested object (Order) |
discount | A discount amount for the specific position. | Double |
text | A text describing the position. | String |
positionNumber | The number of the position if there are multiple positions in an order. Needs to start with zero and is incremented for every new position. If you want to order them differently, you can change their position numbers to your needs. | Integer |
name | The name of the item in the position. | String |
price | The price for one unit of the item in the position. | Double |
part | You can define a part from your sevdesk inventory here. Please be aware, you will still need to provide the name, price and everything else as this will not automatically be generated. | Nested object (Part) |
Attribute | Voucher Type | Description | Attribute Type |
---|---|---|---|
taxType | Any | Use this in sevdesk-Update 1.0 (instead of taxRule). Defines the vat-regulation for the voucher Can be:
| String |
taxSet | Any | Use this in sevdesk-Update 1.0 (instead of taxRule). If you supplied "taxType": "custom" you can specify which tax set should be used. | Nested object (TaxSet) |
taxRule | Any | Use this in sevdesk-Update 2.0 (instead of taxType / taxSet). Defines the vat-regulation for the voucher For "Regelbesteuerung" it can be one of:
"taxRule": {"id": "1", "objectName": "TaxRule"} Depending on the use case (revenue or expense), you can find the right TaxRule via one of the Account Guidance endpoints: | Nested object (TaxRule) |
voucherType | Any | The type of the voucher. Most likely VOU but RV is also valid. | String |
voucherDate | Any | The voucher date. | Date / Timestamp |
deliveryDate | Any | The delivery date of the voucher. This can also be a date range if you provide another value for deliveryDateUntil. | Date / Timestamp |
deliveryDateUntil | Any | You can provide a value here if you want the delivery date to be a date range and you have already given a value to deliveryDate. | Date / Timestamp |
status | Any | The voucher status. Notable values are 50 (draft) and 100 (finished), see below for the full list. | Integer |
creditDebit | Any | Defines if the voucher is a credit (expense) or debit (revenue) document. If you supply C as the value, the voucher is a credit. You bought something. If you supply D as the value, the voucher is a debit. You sold something. | String |
enshrined | Any | Enshrined vouchers cannot be changed. Can only be set via /Voucher/{voucherId}/enshrine. This operation cannot be undone. | Date / Timestamp |
paymentDeadline | Any | The payment deadline of the voucher. If this date is exceeded, the voucher will be shown as due. | Date / Timestamp |
supplier | Any | The supplier or customer to which the voucher is directed. Note that you must provide either the supplier object or a supplierName. | Nested object (Contact) |
supplierName | Any | The name of the supplier or customer used for the voucher. | String |
description | Any | The voucher number or voucher description. | String |
document | Any | The document of the voucher. | Nested object (Document) |
payDate | Any | The date the voucher was paid. | Date / Timestamp |
costCentre | Any | A cost centre for the voucher. | Nested object (CostCentre) |
currency | Any | The currency, defaults to the system currency when not set. Example value: EUR | String |
recurringInterval | Recurring Vouchers | The interval in which vouchers are to be created. Possible values are:
| String |
recurringIntervall deprecated | Recurring Vouchers | Values will be mapped to recurringInterval, deprecated because it would not allow values < 1 month. | Integer |
recurringStartDate | Recurring Vouchers | The date when the recurring vouchers start. | Date / Timestamp |
recurringNextVoucher | Recurring Vouchers | The date when the next voucher is due. When creating RV documents you will usually set this to the same date as recurringStartDate. | Date / Timestamp |
recurringLastVoucher | Recurring Vouchers | The date the last previous voucher was generated. | Date / Timestamp |
recurringEndDate | Recurring Vouchers | The date the generation of recurring vouchers ends. | Date / Timestamp |
Voucher Type | Description | Abbreviation |
---|---|---|
Normal voucher | A normal voucher which documents a simple selling process. | VOU |
Recurring voucher | A voucher which generates normal vouchers with the same values regularly in fixed time frames (every month, year, ...). | RV |
Voucher status | Meaning | Status code |
---|---|---|
Draft | The voucher is still a draft. It has not been marked as completed and can still be changed. | 50 |
Unpaid / Due | The voucher has been completed but not paid. It is either shown as unpaid if the pay date is not exceeded or due if it is. | 100 |
Transferred | The voucher has been used to create a payment in sevdesk and is waiting for the import of the bank transaction to set it to paid. | 150 |
Partially paid | The voucher has been partially paid. There are linked transactions or payments. | 750 |
Paid | The voucher has been paid by the end-customer or the sevdesk customer. This means, that it is linked to a transaction on some payment account in sevdesk. | 1000 |
Filter | Description |
---|---|
accountingType[id]={id}&accountingType[objectName]=AccountingType | Only retrieve all vouchers which contain at least one position using id as an accounting type. |
withoutCatering=true | Retrieve all vouchers except catering vouchers. |
year={year} | Only retrieve all vouchers with a voucher date in year. |
month={month} | Only retrieve all vouchers with a voucher date in month. Can be combined with a year. |
descriptionLike={description} | Only retrieve all vouchers with a description containing description. |
creditDebit={C/D} | Supply C to only retrieve credit vouchers and D to only retrieve debit vouchers. |
supplierName={name} | Only retrieve all vouchers with a supplier having a name like name. |
commentLike={comment} | Only retrieve all vouchers having a position with a comment like comment. |
searchCommentOrDescription={text} | Only retrieve all vouchers having a position with comment like text or a description like text. |
contact[id]={id}&contact[objectName]=Contact | Only retrieve all vouchers with id as a contact |
createBefore={timestamp} | Only retrieve all vouchers created before timestamp |
createAfter={timestamp} | Only retrieve all vouchers created after timestamp |
updateBefore={timestamp} | Only retrieve all vouchers updated last before timestamp |
updateAfter={timestamp} | Only retrieve all vouchers updated last after timestamp |
startDate={timestamp} | Only retrieve all vouchers where voucher date is bigger than timestamp |
endDate={timestamp} | Only retrieve all vouchers where voucher date is smaller than timestamp If startDate and endDate are both supplied, you will get all vouchers in the defined range. |
object[id]={id}&object[objectName]={objectName} | Only retrieve all vouchers with a linked object with ID id and objectName as object name. |
startPayDate={timestamp} | Only retrieve all vouchers where pay date is bigger than timestamp |
endPayDate={timestamp} | Only retrieve all vouchers where pay date is smaller than timestamp If startPayDate and endPayDate are both supplied, you will get all vouchers in the defined range. |
status={status} | Only retrieve vouchers of a given status |
orderByDebit=true | Retrieve all vouchers ordered by their debit |
costCentre[id]={id}&costCentre[objectName]=CostCentre | Only retrieve all vouchers with id as a cost centre. |
voucherType={type} | Only retrieve all vouchers with type as a voucher type |
origin[id]={id}&origin[objectName]=ModelName | Only retrieve all vouchers with id as an origin |
globalSearch={searchTerm} | Search for vouchers related to searchTerm |
contactOrObject[id]={id}&contactOrObject[objectName]={objectName} | Only retrieve all vouchers with a linked object or a contact with ID id and objectName as object name. |
orderByVoucherNumber={ASC/DESC} | Order all vouchers after voucher number in ASC/DESC order |
delinquent=true | Only retrieve delinquent (due) vouchers |
hasDocument=true | Only retrieve vouchers which have an attached document |
noRv=true | Only retrieve vouchers which are not of type RV |
tags[x][id]={id}&tags[x][objectName]=Tag | Only retrieve all vouchers with id as a tag. You can specify multiple tags by adding more array entries. |
startAmount={amount} | Only retrieve all vouchers with a sum bigger than amount. If your provided amount is negative, it will retrieve all vouchers with a sum smaller than amount. |
endAmount={amount} | Only retrieve all vouchers with a sum smaller than amount. If your provided amount is negative, it will retrieve all vouchers with a sum bigger than amount. If startAmount and endAmount are both supplied, you will get all vouchers in the defined range. |
fulltextSearch={text} | Search for vouchers, positions or contact with text as a text |
fulltextSearchObjects={object1, object2, ...} | Enables different objects to search in with the fulltextSearch. |
Attribute | Description | Attribute Type |
---|---|---|
sumGross or sumNet | The sum of the voucher position. You may provider both values. | Double |
taxRate | The tax rate of the voucher position. | Double |
voucher | The voucher to which the position belongs. | Nested object (Voucher) |
comment | A comment describing the position. | String |
net | Define if the sum you provided is inclusive (false) or exclusive vat (true). All positions must be either net or gross, a mixture of the two is not possible. | Boolean |
accountDatev | Use this in sevdesk-Update 2.0 (replaces accountingType). The account datev (booking account) for the voucher position. | Nested object (AccountDatev) |
accountingType | The accounting type (booking account) for the voucher position. | Nested object (AccountingType) |
https://my.sevdesk.de/api/v1/Invoice?tags[0][id]={tagId}&tags[0][objectName]=Tag
UNDERACHIEVEMENT
in sevdesk-Update 2.0.**
+ type: string
+ enum:
+ - PROVISION
+ - ROYALTY_ASSIGNED
+ - ROYALTY_UNASSIGNED
+ - UNDERACHIEVEMENT
+ - ACCOUNTING_TYPE
+ example: PROVISION
+ nullable: false
+ currency:
+ description: >-
+ Currency used in the creditNote. Needs to be currency code according
+ to ISO-4217
+ type: string
+ example: EUR
+ nullable: false
+ sumNet:
+ description: Net sum of the creditNote
+ type: number
+ format: float
+ readOnly: true
+ nullable: false
+ sumTax:
+ description: Tax sum of the creditNote
+ type: number
+ format: float
+ readOnly: true
+ nullable: false
+ sumGross:
+ description: Gross sum of the creditNote
+ type: number
+ format: float
+ readOnly: true
+ nullable: false
+ sumDiscounts:
+ description: Sum of all discounts in the creditNote
+ type: number
+ format: float
+ readOnly: true
+ nullable: false
+ sumNetForeignCurrency:
+ description: Net sum of the creditNote in the foreign currency
+ type: number
+ format: float
+ readOnly: true
+ nullable: false
+ sumTaxForeignCurrency:
+ description: Tax sum of the creditNote in the foreign currency
+ type: number
+ format: float
+ readOnly: true
+ nullable: false
+ sumGrossForeignCurrency:
+ description: Gross sum of the creditNote in the foreign currency
+ type: number
+ format: float
+ readOnly: true
+ nullable: false
+ sumDiscountsForeignCurrency:
+ description: Discounts sum of the creditNote in the foreign currency
+ type: number
+ format: float
+ readOnly: true
+ nullable: false
+ customerInternalNote:
+ description: >-
+ Internal note of the customer. Contains data entered into field
+ 'Referenz/Bestellnummer'
+ type: string
+ nullable: true
+ showNet:
+ description: >-
+ If true, the net amount of each position will be shown on the
+ creditNote. Otherwise gross amount
+ type: boolean
+ example: 1
+ nullable: false
+ sendType:
+ description: "Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the\r\n * API-Overview to understand how this attribute can be used before using it!"
+ type: string
+ enum:
+ - VPR
+ - VPDF
+ - VM
+ - VP
+ nullable: true
+ type: object
+ Model_creditNotePos:
+ title: creditNote position model
+ description: creditNote position model
+ required:
+ - unity
+ - taxRate
+ - quantity
+ - mapAll
+ - objectName
+ properties:
+ id:
+ description: The creditNote position id.
+ type: integer
+ readOnly: true
+ nullable: true
+ objectName:
+ description: The creditNote position object name
+ type: string
+ nullable: false
+ example: CreditNotePos
+ mapAll:
+ type: boolean
+ nullable: false
+ create:
+ description: Date of creditNote position creation
+ type: string
+ readOnly: true
+ example: '2023-04-18T15:45:38+02:00'
+ update:
+ description: Date of last creditNote position update
+ type: string
+ readOnly: true
+ example: '2023-04-18T15:45:38+02:00'
+ creditNote:
+ description: >-
+ The creditNote to which the position belongs. Required if you want to create/update an
+ credit note position for an existing credit note"
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: Unique identifier of the creditNote
+ type: integer
+ objectName:
+ description: Model name, which is 'creditNote'
+ type: string
+ example: creditNote
+ type: object
+ part:
+ description: Part from your inventory which is used in the position.
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: Unique identifier of the part
+ type: integer
+ objectName:
+ description: Model name, which is 'Part'
+ type: string
+ example: Part
+ type: object
+ quantity:
+ description: Quantity of the article/part
+ type: number
+ format: float
+ example: 1
+ nullable: false
+ price:
+ description: >-
+ Price of the article/part. Is either gross or net, depending on the
+ sevdesk account setting.
+ type: number
+ format: float
+ example: 100
+ nullable: true
+ priceNet:
+ description: Net price of the part
+ type: number
+ format: float
+ readOnly: true
+ nullable: true
+ priceTax:
+ description: Tax on the price of the part
+ type: number
+ format: float
+ example: 19
+ nullable: true
+ priceGross:
+ description: Gross price of the part
+ type: number
+ format: float
+ example: 119
+ nullable: true
+ name:
+ description: Name of the article/part.
+ type: string
+ example: Dragonglass
+ nullable: true
+ unity:
+ description: The unit in which the positions part is measured
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: Unique identifier of the unit
+ type: integer
+ objectName:
+ description: Model name, which is 'Unity'
+ type: string
+ example: Unity
+ type: object
+ sevClient:
+ description: >-
+ Client to which creditNote position belongs. Will be filled
+ automatically
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: Unique identifier of the client
+ type: integer
+ objectName:
+ description: Model name, which is 'SevClient'
+ type: string
+ example: SevClient
+ type: object
+ readOnly: true
+ positionNumber:
+ description: >-
+ Position number of your position. Can be used to creditNote multiple
+ positions.
+ type: integer
+ example: 1
+ nullable: true
+ text:
+ description: A text describing your position.
+ type: string
+ nullable: true
+ discount:
+ description: An optional discount of the position.
+ type: number
+ format: float
+ nullable: true
+ optional:
+ description: Defines if the position is optional.
+ type: boolean
+ nullable: true
+ taxRate:
+ description: Tax rate of the position.
+ type: number
+ format: float
+ example: 19
+ nullable: false
+ sumDiscount:
+ description: Discount sum of the position
+ type: number
+ format: float
+ readOnly: true
+ nullable: true
+ type: object
+ saveCreditNote:
+ type: object
+ required:
+ - creditNote
+ - creditNotePos
+ properties:
+ creditNote:
+ $ref: '#/components/schemas/Model_creditNote'
+ creditNotePosSave:
+ type: array
+ items:
+ $ref: '#/components/schemas/Model_creditNotePos'
+ creditNotePosDelete:
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: Id of credit note position
+ type: integer
+ objectName:
+ description: Object name of credit note position
+ type: string
+ default: null
+ discountSave:
+ required:
+ - discount
+ - text
+ - percentage
+ - value
+ - objectName
+ - mapAll
+ properties:
+ discount:
+ description: Defines if this is a discount or a surcharge
+ type: boolean
+ example: true
+ text:
+ description: A text for your discount
+ type: string
+ percentage:
+ description: Defines if this is a percentage or an absolute discount
+ type: boolean
+ value:
+ description: Value of the discount
+ type: number
+ objectName:
+ description: Object name of the discount
+ type: string
+ example: Discounts
+ mapAll:
+ description: Internal param
+ type: boolean
+ example: true
+ default: null
+ discountDelete:
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: ID of discount to delete
+ type: integer
+ objectName:
+ description: Object name of discount
+ type: string
+ example: Discounts
+ default: null
+ Model_creditNotePosResponse:
+ title: creditNote position model
+ description: creditNote position model
+ required:
+ - creditNote
+ - unity
+ - taxRate
+ - quantity
+ properties:
+ id:
+ description: The creditNote position id
+ type: string
+ example: '1'
+ readOnly: true
+ nullable: false
+ objectName:
+ description: The creditNote position object name
+ type: string
+ readOnly: true
+ nullable: false
+ example: CreditNotePos
+ create:
+ description: Date of creditNote position creation
+ type: string
+ readOnly: true
+ example: '2023-04-18T15:45:38+02:00'
+ update:
+ description: Date of last creditNote position update
+ type: string
+ readOnly: true
+ example: '2023-04-18T15:45:38+02:00'
+ creditNote:
+ description: The creditNote to which the position belongs.
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: Unique identifier of the creditNote
+ type: string
+ example: '1'
+ objectName:
+ description: Model name, which is 'creditNote'
+ type: string
+ example: creditNote
+ type: object
+ part:
+ description: Part from your inventory which is used in the position.
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: Unique identifier of the part
+ type: string
+ example: '1'
+ objectName:
+ description: Model name, which is 'Part'
+ type: string
+ example: Part
+ type: object
+ quantity:
+ description: Quantity of the article/part
+ type: string
+ example: '1'
+ nullable: false
+ price:
+ description: >-
+ Price of the article/part. Is either gross or net, depending on the
+ sevdesk account setting.
+ type: string
+ example: '100'
+ nullable: true
+ priceNet:
+ description: Net price of the part
+ type: string
+ example: '100'
+ readOnly: true
+ nullable: true
+ priceTax:
+ description: Tax on the price of the part
+ type: string
+ example: '19'
+ nullable: true
+ priceGross:
+ description: Gross price of the part
+ type: string
+ example: '119'
+ nullable: true
+ name:
+ description: Name of the article/part.
+ type: string
+ example: Dragonglass
+ nullable: true
+ unity:
+ description: The unit in which the positions part is measured
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: Unique identifier of the unit
+ type: string
+ example: '1'
+ objectName:
+ description: Model name, which is 'Unity'
+ type: string
+ example: Unity
+ type: object
+ sevClient:
+ description: >-
+ Client to which creditNote position belongs. Will be filled
+ automatically
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: Unique identifier of the client
+ type: string
+ example: '1'
+ objectName:
+ description: Model name, which is 'SevClient'
+ type: string
+ example: SevClient
+ type: object
+ readOnly: true
+ positionNumber:
+ description: >-
+ Position number of your position. Can be used to creditNote multiple
+ positions.
+ type: string
+ example: '1'
+ nullable: true
+ text:
+ description: A text describing your position.
+ type: string
+ nullable: true
+ discount:
+ description: An optional discount of the position.
+ type: string
+ example: '0'
+ nullable: true
+ optional:
+ description: Defines if the position is optional.
+ type: boolean
+ nullable: true
+ taxRate:
+ description: Tax rate of the position.
+ type: string
+ example: '19'
+ nullable: false
+ sumDiscount:
+ description: Discount sum of the position
+ type: string
+ example: '0'
+ readOnly: true
+ nullable: true
+ type: object
+ saveCreditNoteResponse:
+ type: object
+ properties:
+ creditNote:
+ $ref: '#/components/schemas/Model_creditNoteResponse'
+ creditNotePos:
+ type: array
+ items:
+ $ref: '#/components/schemas/Model_creditNotePosResponse'
+ Model_discountsResponse:
+ properties:
+ id:
+ description: The id of the discount
+ type: integer
+ example: 1234
+ objectName:
+ description: Model name, which is 'Discounts'
+ type: string
+ example: Discounts
+ create:
+ description: Date of discount creation
+ type: string
+ example: '2023-03-15T13:46:33+01:00'
+ update:
+ description: Date of last discount update
+ type: string
+ example: '2023-03-15T13:46:33+01:00'
+ sevClient:
+ description: Client to which the discount belongs
+ type: string
+ example: '1234'
+ discount:
+ description: >-
+ Indicates that this is a discount or a surcharge (0 = surcharge, 1 =
+ discount)
+ type: string
+ example: '1'
+ text:
+ description: A text describing your position.
+ type: string
+ example: Info about the discount
+ percentage:
+ description: Defines if this is a percentage or an absolute discount
+ type: string
+ example: '1'
+ value:
+ description: Value of the discount
+ type: string
+ example: '5'
+ isNet:
+ description: Defines is the Discount net or gross (0 = net, 1 = gross)
+ type: string
+ example: '0'
+ Model_creditNoteUpdate:
+ title: creditNote model
+ description: creditNote model
+ properties:
+ id:
+ description: The creditNote id
+ type: integer
+ readOnly: true
+ nullable: false
+ objectName:
+ description: The creditNote object name
+ type: string
+ readOnly: true
+ nullable: false
+ create:
+ description: Date of creditNote creation
+ type: string
+ format: date-time
+ readOnly: true
+ example: '2023-04-18T15:45:38+02:00'
+ update:
+ description: Date of last creditNote update
+ type: string
+ format: date-time
+ readOnly: true
+ example: '2023-04-18T15:45:38+02:00'
+ creditNoteNumber:
+ description: The creditNote number
+ type: string
+ example: GU-1000
+ nullable: true
+ contact:
+ description: The contact used in the creditNote
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: Unique identifier of the contact
+ type: integer
+ objectName:
+ description: Model name, which is 'Contact'
+ type: string
+ example: Contact
+ type: object
+ nullable: true
+ creditNoteDate:
+ description: Needs to be provided as timestamp or dd.mm.yyyy
+ type: string
+ format: date-time
+ example: 01.01.2020
+ nullable: false
+ status:
+ description: "Please have a look in \r\n status of credit note\r\n to see what the different status codes mean"
+ type: string
+ enum:
+ - '100'
+ - '200'
+ - '750'
+ - '1000'
+ example: '100'
+ nullable: false
+ header:
+ description: Normally consist of prefix plus the creditNote number
+ type: string
+ example: My GU-1000
+ nullable: true
+ headText:
+ description: Certain html tags can be used here to format your text
+ type: string
+ nullable: true
+ footText:
+ description: Certain html tags can be used here to format your text
+ type: string
+ nullable: true
+ addressCountry:
+ description: Can be omitted as complete address is defined in address attribute
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: Unique identifier of the country
+ type: integer
+ example: 1
+ objectName:
+ description: Model name, which is 'StaticCountry'
+ type: string
+ example: StaticCountry
+ type: object
+ nullable: true
+ createUser:
+ description: Will be filled automatically by our system and can't be changed
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: Unique identifier of the user
+ type: integer
+ objectName:
+ description: Model name, which is 'SevUser'
+ type: string
+ example: SevUser
+ type: object
+ readOnly: true
+ sevClient:
+ description: Client to which creditNote belongs. Will be filled automatically
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: Unique identifier of the client
+ type: integer
+ objectName:
+ description: Model name, which is 'SevClient'
+ type: string
+ example: SevClient
+ type: object
+ readOnly: true
+ deliveryDate:
+ description: >-
+ Timestamp. This can also be a date range if you also use the
+ attribute deliveryDateUntil
+ type: string
+ format: date-time
+ example: '2023-04-18T15:45:38+02:00'
+ nullable: false
+ smallSettlement:
+ description: "Defines if the client uses the small settlement scheme.\r\n If yes, the creditNote must not contain any vat"
+ type: boolean
+ example: 0
+ nullable: true
+ contactPerson:
+ description: The user who acts as a contact person for the creditNote
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: Unique identifier of the user
+ type: integer
+ objectName:
+ description: Model name, which is 'SevUser'
+ type: string
+ example: SevUser
+ type: object
+ nullable: true
+ taxRate:
+ description: >-
+ This is not used anymore. Use the taxRate of the individual
+ positions instead.
+ type: number
+ format: float
+ example: 0
+ nullable: true
+ taxRule:
+ description: '**Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**'
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: |-
+ **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**
+
+ Defines the vat-regulation.
+ For "Regelbesteuerung" it can be one of:
+ - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"`
+ - `2` - Ausfuhren - allowedTaxRates: 0.0
+ - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"`
+ - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0
+ - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0
+ - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"`
+
+ For small business owner ("Kleinunternehmer") it can be:
+ - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"`
+ type: string
+ enum:
+ - '1'
+ - '2'
+ - '3'
+ - '4'
+ - '5'
+ - '11'
+ objectName:
+ description: Name of the object. Must always be TaxRule
+ type: string
+ enum:
+ - TaxRule
+ type: object
+ nullable: false
+ taxSet:
+ description: >-
+ **Use this in sevdesk-Update 1.0 (instead of taxRule).**
+
+
+ Tax set of the creditNote. Needs to be added if you chose the tax
+ type custom
+ required:
+ - id
+ - objectName
+ properties:
+ id:
+ description: Unique identifier of the object
+ type: integer
+ objectName:
+ description: Model name, which is 'TaxSet'
+ type: string
+ example: TaxSet
+ type: object
+ nullable: true
+ taxText:
+ description: A common tax text would be 'Umsatzsteuer 19%'
+ type: string
+ example: Umsatzsteuer 19%
+ nullable: true
+ taxType:
+ description: >-
+ **Use this in sevdesk-Update 1.0 (instead of taxRule).**
+
+
+ Tax type of the creditNote.
+
+ There are four tax types:
+
+ 1. default - Umsatzsteuer ausweisen
+
+ 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische
+ Union)
+
+ 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb
+ EU, z. B. Schweiz)
+
+ 4. custom - Using custom tax set
+
+ 5. ss - Not subject to VAT according to §19 1 UStG
+
+ Tax rates are heavily connected to the tax type used.
+ type: string
+ example: default
+ nullable: true
+ sendDate:
+ description: The date the creditNote was sent to the customer
+ type: string
+ format: date-time
+ example: 01.01.2020
+ nullable: true
+ address:
+ description: "Complete address of the recipient including name, street, city, zip and country.UNDERACHIEVEMENT
in sevdesk-Update 2.0.**
+ BookingCategory ModelCreditNoteBookingCategory `json:"bookingCategory"`
+
+ // Contact The contact used in the creditNote
+ Contact struct {
+ // Id Unique identifier of the contact
+ Id int `json:"id"`
+
+ // ObjectName Model name, which is 'Contact'
+ ObjectName string `json:"objectName"`
+ } `json:"contact"`
+
+ // ContactPerson The user who acts as a contact person for the creditNote
+ ContactPerson struct {
+ // Id Unique identifier of the user
+ Id int `json:"id"`
+
+ // ObjectName Model name, which is 'SevUser'
+ ObjectName string `json:"objectName"`
+ } `json:"contactPerson"`
+
+ // Create Date of creditNote creation
+ Create *time.Time `json:"create,omitempty"`
+
+ // CreateUser Will be filled automatically by our system and can't be changed
+ CreateUser *struct {
+ // Id Unique identifier of the user
+ Id int `json:"id"`
+
+ // ObjectName Model name, which is 'SevUser'
+ ObjectName string `json:"objectName"`
+ } `json:"createUser,omitempty"`
+
+ // CreditNoteDate Needs to be provided as timestamp or dd.mm.yyyy
+ CreditNoteDate time.Time `json:"creditNoteDate"`
+
+ // CreditNoteNumber The creditNote number
+ CreditNoteNumber string `json:"creditNoteNumber"`
+
+ // Currency Currency used in the creditNote. Needs to be currency code according to ISO-4217
+ Currency string `json:"currency"`
+
+ // CustomerInternalNote Internal note of the customer. Contains data entered into field 'Referenz/Bestellnummer'
+ CustomerInternalNote *string `json:"customerInternalNote"`
+
+ // FootText Certain html tags can be used here to format your text
+ FootText *string `json:"footText"`
+
+ // HeadText Certain html tags can be used here to format your text
+ HeadText *string `json:"headText"`
+
+ // Header Normally consist of prefix plus the creditNote number
+ Header string `json:"header"`
+
+ // Id The creditNote id. Required if you want to create/update an credit note position for an existing credit note"
+ Id *int `json:"id,omitempty"`
+ MapAll bool `json:"mapAll"`
+
+ // ObjectName The creditNote object name
+ ObjectName string `json:"objectName"`
+
+ // SendDate The date the creditNote was sent to the customer
+ SendDate *time.Time `json:"sendDate"`
+
+ // SendType Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the
+ // * API-Overview to understand how this attribute can be used before using it!
+ SendType *ModelCreditNoteSendType `json:"sendType"`
+
+ // SevClient Client to which creditNote belongs. Will be filled automatically
+ SevClient *struct {
+ // Id Unique identifier of the client
+ Id int `json:"id"`
+
+ // ObjectName Model name, which is 'SevClient'
+ ObjectName string `json:"objectName"`
+ } `json:"sevClient,omitempty"`
+
+ // ShowNet If true, the net amount of each position will be shown on the creditNote. Otherwise gross amount
+ ShowNet *bool `json:"showNet,omitempty"`
+
+ // SmallSettlement Defines if the client uses the small settlement scheme.
+ // If yes, the creditNote must not contain any vat
+ SmallSettlement *bool `json:"smallSettlement"`
+
+ // Status Please have a look in
+ // status of credit note
+ // to see what the different status codes mean
+ Status ModelCreditNoteStatus `json:"status"`
+
+ // SumDiscounts Sum of all discounts in the creditNote
+ SumDiscounts *float32 `json:"sumDiscounts,omitempty"`
+
+ // SumDiscountsForeignCurrency Discounts sum of the creditNote in the foreign currency
+ SumDiscountsForeignCurrency *float32 `json:"sumDiscountsForeignCurrency,omitempty"`
+
+ // SumGross Gross sum of the creditNote
+ SumGross *float32 `json:"sumGross,omitempty"`
+
+ // SumGrossForeignCurrency Gross sum of the creditNote in the foreign currency
+ SumGrossForeignCurrency *float32 `json:"sumGrossForeignCurrency,omitempty"`
+
+ // SumNet Net sum of the creditNote
+ SumNet *float32 `json:"sumNet,omitempty"`
+
+ // SumNetForeignCurrency Net sum of the creditNote in the foreign currency
+ SumNetForeignCurrency *float32 `json:"sumNetForeignCurrency,omitempty"`
+
+ // SumTax Tax sum of the creditNote
+ SumTax *float32 `json:"sumTax,omitempty"`
+
+ // SumTaxForeignCurrency Tax sum of the creditNote in the foreign currency
+ SumTaxForeignCurrency *float32 `json:"sumTaxForeignCurrency,omitempty"`
+
+ // TaxRate This is not used anymore. Use the taxRate of the individual positions instead.
+ TaxRate float32 `json:"taxRate"`
+
+ // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**
+ TaxRule struct {
+ // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**
+ //
+ // Defines the vat-regulation.
+ // For "Regelbesteuerung" it can be one of:
+ // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"`
+ // - `2` - Ausfuhren - allowedTaxRates: 0.0
+ // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"`
+ // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0
+ // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0
+ // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"`
+ //
+ // For small business owner ("Kleinunternehmer") it can be:
+ // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"`
+ Id ModelCreditNoteTaxRuleId `json:"id"`
+
+ // ObjectName Name of the object. Must always be TaxRule
+ ObjectName ModelCreditNoteTaxRuleObjectName `json:"objectName"`
+ } `json:"taxRule"`
+
+ // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).**
+ //
+ // Tax set of the creditNote. Needs to be added if you chose the tax type custom
+ TaxSet *struct {
+ // Id Unique identifier of the object
+ Id int `json:"id"`
+
+ // ObjectName Model name, which is 'TaxSet'
+ ObjectName string `json:"objectName"`
+ } `json:"taxSet"`
+
+ // TaxText A common tax text would be 'Umsatzsteuer 19%'
+ TaxText string `json:"taxText"`
+
+ // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).**
+ //
+ // Tax type of the creditNote.
+ // There are four tax types:
+ // 1. default - Umsatzsteuer ausweisen
+ // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union)
+ // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz)
+ // 4. custom - Using custom tax set
+ // 5. ss - Not subject to VAT according to §19 1 UStG
+ // Tax rates are heavily connected to the tax type used.
+ TaxType string `json:"taxType"`
+
+ // Update Date of last creditNote update
+ Update *time.Time `json:"update,omitempty"`
+}
+
+// ModelCreditNoteBookingCategory Defines the booking category, for more information see the section [Credit note booking categories](#tag/CreditNote/Credit-note-booking-categories)
+//
+// The booking category of the credit note.
+//
+// **Must be UNDERACHIEVEMENT
in sevdesk-Update 2.0.**
+type ModelCreditNoteBookingCategory string
+
+// ModelCreditNoteSendType Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the
+// - API-Overview to understand how this attribute can be used before using it!
+type ModelCreditNoteSendType string
+
+// ModelCreditNoteStatus Please have a look in
+//
+// status of credit note
+// to see what the different status codes mean
+type ModelCreditNoteStatus string
+
+// ModelCreditNoteTaxRuleId **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**
+//
+// Defines the vat-regulation.
+// For "Regelbesteuerung" it can be one of:
+// - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"`
+// - `2` - Ausfuhren - allowedTaxRates: 0.0
+// - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"`
+// - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0
+// - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0
+// - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"`
+//
+// For small business owner ("Kleinunternehmer") it can be:
+// - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"`
+type ModelCreditNoteTaxRuleId string
+
+// ModelCreditNoteTaxRuleObjectName Name of the object. Must always be TaxRule
+type ModelCreditNoteTaxRuleObjectName string
+
+// ModelCreditNotePos creditNote position model
+type ModelCreditNotePos struct {
+ // Create Date of creditNote position creation
+ Create *string `json:"create,omitempty"`
+
+ // CreditNote The creditNote to which the position belongs. Required if you want to create/update an credit note position for an existing credit note"
+ CreditNote *struct {
+ // Id Unique identifier of the creditNote
+ Id int `json:"id"`
+
+ // ObjectName Model name, which is 'creditNote'
+ ObjectName string `json:"objectName"`
+ } `json:"creditNote,omitempty"`
+
+ // Discount An optional discount of the position.
+ Discount *float32 `json:"discount"`
+
+ // Id The creditNote position id.
+ Id *int `json:"id"`
+ MapAll bool `json:"mapAll"`
+
+ // Name Name of the article/part.
+ Name *string `json:"name"`
+
+ // ObjectName The creditNote position object name
+ ObjectName string `json:"objectName"`
+
+ // Optional Defines if the position is optional.
+ Optional *bool `json:"optional"`
+
+ // Part Part from your inventory which is used in the position.
+ Part *struct {
+ // Id Unique identifier of the part
+ Id int `json:"id"`
+
+ // ObjectName Model name, which is 'Part'
+ ObjectName string `json:"objectName"`
+ } `json:"part,omitempty"`
+
+ // PositionNumber Position number of your position. Can be used to creditNote multiple positions.
+ PositionNumber *int `json:"positionNumber"`
+
+ // Price Price of the article/part. Is either gross or net, depending on the sevdesk account setting.
+ Price *float32 `json:"price"`
+
+ // PriceGross Gross price of the part
+ PriceGross *float32 `json:"priceGross"`
+
+ // PriceNet Net price of the part
+ PriceNet *float32 `json:"priceNet"`
+
+ // PriceTax Tax on the price of the part
+ PriceTax *float32 `json:"priceTax"`
+
+ // Quantity Quantity of the article/part
+ Quantity float32 `json:"quantity"`
+
+ // SevClient Client to which creditNote position belongs. Will be filled automatically
+ SevClient *struct {
+ // Id Unique identifier of the client
+ Id int `json:"id"`
+
+ // ObjectName Model name, which is 'SevClient'
+ ObjectName string `json:"objectName"`
+ } `json:"sevClient,omitempty"`
+
+ // SumDiscount Discount sum of the position
+ SumDiscount *float32 `json:"sumDiscount"`
+
+ // TaxRate Tax rate of the position.
+ TaxRate float32 `json:"taxRate"`
+
+ // Text A text describing your position.
+ Text *string `json:"text"`
+
+ // Unity The unit in which the positions part is measured
+ Unity struct {
+ // Id Unique identifier of the unit
+ Id int `json:"id"`
+
+ // ObjectName Model name, which is 'Unity'
+ ObjectName string `json:"objectName"`
+ } `json:"unity"`
+
+ // Update Date of last creditNote position update
+ Update *string `json:"update,omitempty"`
+}
+
+// ModelCreditNotePosResponse creditNote position model
+type ModelCreditNotePosResponse struct {
+ // Create Date of creditNote position creation
+ Create *string `json:"create,omitempty"`
+
+ // CreditNote The creditNote to which the position belongs.
+ CreditNote struct {
+ // Id Unique identifier of the creditNote
+ Id string `json:"id"`
+
+ // ObjectName Model name, which is 'creditNote'
+ ObjectName string `json:"objectName"`
+ } `json:"creditNote"`
+
+ // Discount An optional discount of the position.
+ Discount *string `json:"discount"`
+
+ // Id The creditNote position id
+ Id *string `json:"id,omitempty"`
+
+ // Name Name of the article/part.
+ Name *string `json:"name"`
+
+ // ObjectName The creditNote position object name
+ ObjectName *string `json:"objectName,omitempty"`
+
+ // Optional Defines if the position is optional.
+ Optional *bool `json:"optional"`
+
+ // Part Part from your inventory which is used in the position.
+ Part *struct {
+ // Id Unique identifier of the part
+ Id string `json:"id"`
+
+ // ObjectName Model name, which is 'Part'
+ ObjectName string `json:"objectName"`
+ } `json:"part,omitempty"`
+
+ // PositionNumber Position number of your position. Can be used to creditNote multiple positions.
+ PositionNumber *string `json:"positionNumber"`
+
+ // Price Price of the article/part. Is either gross or net, depending on the sevdesk account setting.
+ Price *string `json:"price"`
+
+ // PriceGross Gross price of the part
+ PriceGross *string `json:"priceGross"`
+
+ // PriceNet Net price of the part
+ PriceNet *string `json:"priceNet"`
+
+ // PriceTax Tax on the price of the part
+ PriceTax *string `json:"priceTax"`
+
+ // Quantity Quantity of the article/part
+ Quantity string `json:"quantity"`
+
+ // SevClient Client to which creditNote position belongs. Will be filled automatically
+ SevClient *struct {
+ // Id Unique identifier of the client
+ Id string `json:"id"`
+
+ // ObjectName Model name, which is 'SevClient'
+ ObjectName string `json:"objectName"`
+ } `json:"sevClient,omitempty"`
+
+ // SumDiscount Discount sum of the position
+ SumDiscount *string `json:"sumDiscount"`
+
+ // TaxRate Tax rate of the position.
+ TaxRate string `json:"taxRate"`
+
+ // Text A text describing your position.
+ Text *string `json:"text"`
+
+ // Unity The unit in which the positions part is measured
+ Unity struct {
+ // Id Unique identifier of the unit
+ Id string `json:"id"`
+
+ // ObjectName Model name, which is 'Unity'
+ ObjectName string `json:"objectName"`
+ } `json:"unity"`
+
+ // Update Date of last creditNote position update
+ Update *string `json:"update,omitempty"`
+}
+
+// ModelCreditNoteResponse creditNote model
+type ModelCreditNoteResponse struct {
+ // Address Complete address of the recipient including name, street, city, zip and country.- | - |