{"id":17617498,"url":"https://github.com/gowizzard/sevdesk","last_synced_at":"2025-06-14T13:33:08.955Z","repository":{"id":64302731,"uuid":"314868057","full_name":"gowizzard/sevdesk","owner":"gowizzard","description":"A little library for the sevDesk RestAPI. To create invoices and positions.","archived":false,"fork":false,"pushed_at":"2021-08-08T09:51:06.000Z","size":90,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T22:08:04.370Z","etag":null,"topics":["golang","invoice","sevdesk"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gowizzard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-21T17:39:06.000Z","updated_at":"2024-10-23T14:10:07.000Z","dependencies_parsed_at":"2023-01-15T09:45:17.648Z","dependency_job_id":null,"html_url":"https://github.com/gowizzard/sevdesk","commit_stats":null,"previous_names":["jojojojonas/sevdesk"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gowizzard%2Fsevdesk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gowizzard%2Fsevdesk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gowizzard%2Fsevdesk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gowizzard%2Fsevdesk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gowizzard","download_url":"https://codeload.github.com/gowizzard/sevdesk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248788924,"owners_count":21161727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","invoice","sevdesk"],"created_at":"2024-10-22T19:14:12.406Z","updated_at":"2025-04-13T22:08:09.217Z","avatar_url":"https://github.com/gowizzard.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## sevDesk GO Lang\nWith this small library we want to simplify the handling of the sevDesk Api. Currently you can only create invoices and add invoices via ID single positions.\n\n## Install\n\n```console\ngo get github.com/gowizzard/sevdesk\n```\n\n## How to use?\nYou can currently only create invoices and items in the invoices. For this purpose, sevDesk provides some parameters that are currently not well documented.\n\n## Get invoices\nIt is now possible to read out the invoices. This is done in a very simple way. You use the following function with your user token and get back an object with slices.\n\n```go\ninvoices, err := sevdesk.Invoices(\"token\")\nif err != nil {\nfmt.Println(\"Error: \", err)\n}\n\nfmt.Println(invoices)\n```\n\n## Create invoice\nHere you will find an example how to create a new invoice in sevDesk.\n\n```go\ninvoice, err := sevdesk.NewInvoice(sevdesk.Invoice{\"contactID\", \"address\", \"invoiceDate\", \"status\", \"invoiceType\", \"contactPerson\", \"subject\", \"headText\", \"footText\", \"token\"})\nif err != nil {\n    fmt.Println(\"Error: \", err)\n}\n\t\n// Return the invoice id\nfmt.Println(invoice.Objects.ID)\n```\n\n## Create new position in an invoice\nHere is an example how to create a new position in an existing invoice.You need the ID of the invoice and of course the contact ID. You also need the parameter that distinguishes between pcs, hours or %.\n\nFor this I have worked it all out as follows. The funny thing is that the ID does not start with 0 but with 1:\n\n**1 = Stk, 2 = m², 3 = m, 4 = kg, 5 = t, 6 = lfm, 7 = pauschal, 8 = m³, 9 = Std, 10 = km, 11 = %, 12 = Tag(e), 13 = l**\n\nIn sevDesk the price is transferred in gross, therefore we have added a calculation of the gross value to the function. So you set the net value + the VAT in the function.\n\n```go\nposition, err := sevdesk.NewPosition(sevdesk.Position{\"45\", \"1\", \"16\", \"Backups\", \"Backups of all Websites\", \"9\", \"invoiceID\", \"token\"})\nif err != nil {\n    fmt.Println(\"Error: \", err)\n}\n\n// Return the invoice id\nfmt.Println(position.Objects.ID)\n```\n\n## Send invoice via email\nSo that you can send your invoices directly there is now a new function. You can adjust several parameters like email, CC, BCC, subject and a text.\n\nWhen using this function, an email is sent directly to the specified email address and the invoice is attached as a PDF.\n\n```go\n// Send email\nemail, err := sevdesk.SendInvoiceEmail(sevdesk.InvoiceEmail{invoice.Objects.ID, \"email\", \"subject\", \"text\", \"cc\", \"bcc\", \"token\"})\nif err != nil {\n    fmt.Println(err)\n}\n```\n\n## Send invoice for download\nIn order to download an invoice, the status must first be changed to sent. You can do this with the following function.\n\n```go\nsendInvoice, err := sevdesk.SendInvoicePDF(sevdesk.SendInvoice{invoice.Objects.ID, \"VPDF\", \"false\", \"token\"})\nif err != nil {\nfmt.Println(err)\n}\n```\n\n## Downlaod invoice\nWhen the invoice has been marked as sent, it can be downloaded. The data will be returned as bytes.\n\n```go\ndownload, err := sevdesk.DownloadInvoicePDF(sevdesk.DownloadInvoice{invoice.Objects.ID, \"true\", \"true\", \"token\"})\nif err != nil {\n    fmt.Println(err)\n}\n```\n\n## Get contacts\n\nIf you want to read out all customers, then it goes as follows:\n\n```go\ncontacts, err := sevdesk.Contacts(\"token\")\nif err != nil {\n\tfmt.Println(\"Error: \", err)\n}\n```\n\n## Set new contact\n\nIf you want to set a new Contact, then this goes as follows. Some attributes are needed for this. The category[id] must be set. The best is a 3. Otherwise the other fields are free. The token must be specified of course.\n\n```go\ncontact, err := sevdesk.NewContact(sevdesk.Contact{\"Name\", \"Name2\", \"Surname\", \"Familyname\", \"Vat number\", \"Tax number\", \"Bank account\", \"Bank number\", \"CategoryID\", \"token\"})\nif err != nil {\n\tfmt.Println(\"Error: \", err)\n}\n```\n\n## Add information\n\nFor each newly created contact, additional information about the contact can be added. Like an email, a phone number or a website. The CategorieID is very important. You can find it here.\n\n**The key represents what type it is (1: Private, 2: Work, 3. Fax, 4. Mobil, 5. empty, 6. Autobox, 7. Newsletter, 8. Invoice address)**\n\n### Add address\n\nIf you want to add an address, this is how to do it:\n\n```go\naddress, err := sevdesk.NewAddress(sevdesk.Address{\"Street\", \"Zip\", \"City\", \"ContactID\", \"Token\"})\nif err != nil {\n\tfmt.Println(\"Error: \", err)\n}\n```\n \n### Add email\n\nIf you want to add an email, then this goes as follows:\n\n```go\nemail, err := sevdesk.NewEmail(sevdesk.Communication{\"Key\", \"Value\", \"ContactID\", \"Token\"})\nif err != nil {\n    fmt.Println(\"Error: \", err)\n}\n```\n\n### Add phone\n\nIf you want to add a phone number, this is how to do it:\n\n```go\nphone, err := sevdesk.NewPhone(sevdesk.Communication{\"Key\", \"Value\", \"ContactID\", \"Token\"})\nif err != nil {\n    fmt.Println(\"Error: \", err)\n}\n```\n\n### Add mobile\n\nIf you want to add a mobile number, this is how to do it:\n\n```go\nmobile, err := sevdesk.NewMobile(sevdesk.Communication{\"Key\", \"Value\", \"ContactID\", \"Token\"})\nif err != nil {\n    fmt.Println(\"Error: \", err)\n}\n```\n\n### Add website\n\nIf you want to add a website, this is how to do it:\n\n```go\nwebsite, err := sevdesk.NewWebsite(sevdesk.Communication{\"Key\", \"Value\", \"ContactID\", \"Token\"})\nif err != nil {\n    fmt.Println(\"Error: \", err)\n}\n```\n\n## Help\nIf you have any questions or comments, please contact us by e-mail at [jonas.kwiedor@jj-ideenschmiede.de](mailto:jonas.kwiedor@jj-ideenschmiede.de)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgowizzard%2Fsevdesk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgowizzard%2Fsevdesk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgowizzard%2Fsevdesk/lists"}