{"id":18733208,"url":"https://github.com/jjideenschmiede/gosendcloud","last_synced_at":"2026-01-22T18:05:49.079Z","repository":{"id":43378486,"uuid":"432121722","full_name":"jjideenschmiede/gosendcloud","owner":"jjideenschmiede","description":"Our library to use the sendcloud API endpoints in golang.","archived":false,"fork":false,"pushed_at":"2022-03-04T11:07:48.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T15:46:21.854Z","etag":null,"topics":["golang","golang-library","sendcloud","sendcloud-api"],"latest_commit_sha":null,"homepage":"https://docs.sendcloud.sc/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jjideenschmiede.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-26T09:26:22.000Z","updated_at":"2021-12-03T09:16:19.000Z","dependencies_parsed_at":"2022-09-01T11:51:05.441Z","dependency_job_id":null,"html_url":"https://github.com/jjideenschmiede/gosendcloud","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjideenschmiede%2Fgosendcloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjideenschmiede%2Fgosendcloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjideenschmiede%2Fgosendcloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjideenschmiede%2Fgosendcloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jjideenschmiede","download_url":"https://codeload.github.com/jjideenschmiede/gosendcloud/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239605124,"owners_count":19666998,"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","golang-library","sendcloud","sendcloud-api"],"created_at":"2024-11-07T15:09:01.841Z","updated_at":"2026-01-22T18:05:49.030Z","avatar_url":"https://github.com/jjideenschmiede.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gosendcloud\n\n[![GitHub go.mod Go version of a Go module](https://img.shields.io/github/go-mod/go-version/jjideenschmiede/gosendcloud.svg)](https://golang.org/) [![Go](https://github.com/jjideenschmiede/gosendcloud/actions/workflows/go.yml/badge.svg)](https://github.com/jjideenschmiede/gosendcloud/actions/workflows/go.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/jjideenschmiede/gosendcloud)](https://goreportcard.com/report/github.com/jjideenschmiede/gosendcloud) [![Go Doc](https://godoc.org/github.com/jjideenschmiede/gosendcloud?status.svg)](https://pkg.go.dev/github.com/jjideenschmiede/gosendcloud) ![Lines of code](https://img.shields.io/tokei/lines/github/jjideenschmiede/gosendcloud) [![Developed with \u003c3](https://img.shields.io/badge/Developed%20with-%3C3-19ABFF)](https://jj-dev.de/)\n\nWith this library it should be possible to interact with the endpoints of the sendcloud API via golang functions. Since we can not implement this library project-specific completely, you are welcome to extend it with us.\n\n## Install\n\n```console\ngo get github.com/jjideenschmiede/gosendcloud\n```\n\n## How to use?\n\n### Create a Parcel\n\nIf a new dispatch note is to be created, then this can be done directly with the following function. You can find more information about the structure of the request in the [sendcloud documentation](https://docs.sendcloud.sc/api/v2/shipping/#create-a-parcel).\n\n```go\n// Define request\nr := gosendcloud.Request{\n    PublicKey: \"\",\n    SecretKey: \"\",\n}\n\n// Define request body\nbody := gosendcloud.CreateAParcelBody{\n    Parcel: gosendcloud.CreateAParcelBodyParcel{\n        Name:         \"Jonas Kwiedor\",\n        CompanyName:  \"J\u0026J Ideenschmiede GmbH\",\n        Address:      \"Mercatorstraße\",\n        HouseNumber:  \"32a\",\n        City:         \"Geesthacht\",\n        PostalCode:   \"21502\",\n        Telephone:    \"+4941528903730\",\n        RequestLabel: true,\n        Email:        \"info@jj-ideenschmiede.de\",\n        Country:      \"DE\",\n        Shipment: gosendcloud.CreateAParcelBodyShipment{\n            Id: 8,\n        },\n        Weight:                     \"10.000\",\n        OrderNumber:                \"41267142142\",\n        InsuredValue:               2000,\n        TotalOrderValueCurrency:    \"EUR\",\n        TotalOrderValue:            \"24.99\",\n        Quantity:                   1,\n        ShippingMethodCheckoutName: \"DPD\",\n    },\n}\n\n// Create a new parcel\ncreate, err := gosendcloud.CreateAParcel(body, r)\nif err != nil {\n    log.Fatalln(err)\n} else {\n    log.Println(create)\n}\n```\n\n### Inserting shipments into an integration\n\nIf you want to create an order via an integration, then you can do this as follows. You can find more information about the structure of the request in the [sendcloud documentation](https://docs.sendcloud.sc/api/v2/shipping/#inserting-shipments-into-an-integration).\n\n```go\n// Define request\nr := gosendcloud.Request{\n    PublicKey: \"\",\n    SecretKey: \"\",\n}\n\n// Define request body\nvar body []gosendcloud.InsertingShipmentsBody\n\nbody = append(body, gosendcloud.InsertingShipmentsBody{\n    Address:             \"Insulindelaan\",\n    Address2:            \"\",\n    City:                \"Eindhoven\",\n    CompanyName:         \"Sendcloud\",\n    Country:             \"NL\",\n    CreatedAt:           \"2021-12-02T10:00:00.555309+00:00\",\n    Currency:            \"EUR\",\n    CustomsInvoiceNr:    \"\",\n    CustomsShipmentType: 2,\n    Email:               \"info@jj-development.de\",\n    ExternalOrderId:     \"1234521226\",\n    ExternalShipmentId:  nil,\n    HouseNumber:         \"115\",\n    Name:                \"Kwiedor\",\n    OrderNumber:         \"414124124214214\",\n    OrderStatus: \u0026gosendcloud.InsertingShipmentsBodyOrderStatus{\n        Id:      \"fulfilled\",\n        Message: \"Fulfilled\",\n    },\n    ParcelItems: []gosendcloud.InsertingShipmentsBodyParcelItems{},\n    PaymentStatus: \u0026gosendcloud.InsertingShipmentsBodyPaymentStatus{\n        Id:      \"paid\",\n        Message: \"Paid\",\n    },\n    PostalCode:                 \"5642 CV\",\n    SenderAddress:              1,\n    ShippingMethod:             111,\n    ShippingMethodCheckoutName: \"DPD Classic\",\n    Telephone:                  \"+31612345678\",\n    ToPostNumber:               \"\",\n    ToServicePoint:             nil,\n    ToState:                    nil,\n    TotalOrderValue:            \"13.99\",\n    UpdatedAt:                  \"2021-12-02T11:01:47.505309+00:00\",\n    Weight:                     \"0.300\",\n    Width:                      \"40.00\",\n    Height:                     \"30.00\",\n    Length:                     \"50.00\",\n    Shipments:                  nil,\n    CheckoutPayload:            nil,\n})\n\n// Add a parcel item\nbody[0].ParcelItems = append(body[0].ParcelItems, gosendcloud.InsertingShipmentsBodyParcelItems{\n    Description:   \"T-Shirt\",\n    HsCode:        \"\",\n    OriginCountry: \"\",\n    ProductId:     \"a_random_id\",\n    Properties:    map[string]interface{}{},\n    Quantity:      2,\n    Sku:           \"a_random_sku\",\n    Value:         \"300\",\n    Weight:        \"0.300\",\n})\n\n// Inserting a new shipment\ninsert, err := gosendcloud.InsertingShipments(198416, body, r)\nif err != nil {\n    log.Fatalln(err)\n} else {\n    log.Println(insert)\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjideenschmiede%2Fgosendcloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjjideenschmiede%2Fgosendcloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjideenschmiede%2Fgosendcloud/lists"}