{"id":19622141,"url":"https://github.com/commercetools/commercetools-dotnet-sdk","last_synced_at":"2025-07-31T02:09:18.446Z","repository":{"id":38414189,"uuid":"58733248","full_name":"commercetools/commercetools-dotnet-sdk","owner":"commercetools","description":"The e-commerce SDK from commercetools running on the .NET platform","archived":false,"fork":false,"pushed_at":"2022-12-08T02:14:32.000Z","size":14050,"stargazers_count":8,"open_issues_count":3,"forks_count":14,"subscribers_count":85,"default_branch":"master","last_synced_at":"2025-07-29T03:12:35.971Z","etag":null,"topics":["audit-sdk","commercetools","commercetools-dotnet-sdk","commercetools-sdk","dotnet","dotnet-sdk","sdk"],"latest_commit_sha":null,"homepage":"https://docs.commercetools.com/sdk/dotnet-sdk#net-sdk","language":"C#","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/commercetools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-05-13T11:21:12.000Z","updated_at":"2022-06-28T08:37:17.000Z","dependencies_parsed_at":"2023-01-24T09:15:42.300Z","dependency_job_id":null,"html_url":"https://github.com/commercetools/commercetools-dotnet-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/commercetools/commercetools-dotnet-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-dotnet-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-dotnet-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-dotnet-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-dotnet-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commercetools","download_url":"https://codeload.github.com/commercetools/commercetools-dotnet-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-dotnet-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267976596,"owners_count":24174970,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["audit-sdk","commercetools","commercetools-dotnet-sdk","commercetools-sdk","dotnet","dotnet-sdk","sdk"],"created_at":"2024-11-11T11:26:10.723Z","updated_at":"2025-07-31T02:09:18.385Z","avatar_url":"https://github.com/commercetools.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# commercetools-dotnet-sdk\n\n:warning: **This Composable Commerce .NET SDK is deprecated effective `1st September 2021.`, We recommend to use our [.NET Core SDK V2](https://docs.commercetools.com/sdk/dotnet-sdk#net-core-sdk-v2).\n\n[![Travis Build Status](https://travis-ci.org/commercetools/commercetools-dotnet-sdk.svg?branch=master)](https://travis-ci.org/commercetools/commercetools-dotnet-sdk)\n[![AppVeyor Build Status](https://img.shields.io/appveyor/ci/commercetools/commercetools-dotnet-sdk.svg)](https://ci.appveyor.com/project/commercetools/commercetools-dotnet-sdk)\n[![NuGet Version and Downloads count](https://buildstats.info/nuget/commercetools.NET.SDK?includePreReleases=true)](https://www.nuget.org/packages/commercetools.NET.SDK)\n\nThe Composable Commerce SDK allows developers to work effectively by providing typesafe access to commercetools Composable Commerce in their .NET applications.\n\nFor more documentation please see [the wiki](//github.com/commercetools/commercetools-dotnet-sdk/wiki/commercetools-.NET-SDK-documentation)\n\n## Supported Platforms\n\n* .NET Standard 2.0\n\n## Using the SDK\n\nYou will need a Composable Commerce Project to use the SDK.\nIf you don't already have one, you can [create a free trial project](http://dev.commercetools.com/getting-started.html) on Composable Commerce and configure the API credentials.\n\nThe namespaces in the SDK mirror the sections of the [commercetools HTTP API](http://dev.commercetools.com/http-api.html).\nAccess to these namespaces is provided by a fluent interface on the Client class.\n\nResponses from the client are wrapped in a Response object so you can determine if the request was successful and view the error(s) returned from the API if it was not.\n\n```cs\n\nusing System;\nusing System.Threading.Tasks;\n\nusing commercetools.Common;\nusing commercetools.Products;\n\nclass Program\n{\n    static void Main(string[] args)\n    {\n        new Program().Run().Wait();\n\n        Console.WriteLine(\"Press any key to exit.\");\n        Console.ReadKey();\n    }\n\n    private async Task Run()\n    {\n        Configuration config = new Configuration(\n            \"https://auth.europe-west1.gcp.commercetools.com/oauth/token\",\n            \"https://api.europe-west1.gcp.commercetools.com\",\n            \"[your project key]\",\n            \"[your client ID]\",\n            \"[your client secret]\",\n            ProjectScope.ManageProject);\n\n        Client client = new Client(config);\n\n        Response\u003cProductQueryResult\u003e response = await client.Products().QueryProductsAsync();\n\n        if (response.Success)\n        {\n            ProductQueryResult productQueryResult = response.Result;\n\n            foreach (Product product in productQueryResult.Results)\n            {\n                Console.WriteLine(product.Id);\n            }\n        }\n        else\n        {\n            Console.WriteLine(\"{0}: {1}\", response.StatusCode, response.ReasonPhrase);\n\n            foreach (ErrorMessage errorMessage in response.Errors)\n            {\n                Console.WriteLine(\"{0}: {1}\", errorMessage.Code, errorMessage.Message);\n            }\n        }\n    }\n}\n\n```\n\nNot all API sections and representations have been implemented in the SDK. If you need to work with areas of the API that have not yet been covered, you can use the Client to make JSON requests directly. Ask the client for a JObject and you will get the entire JSON response that is returned from the API.\n\nThis code snippet will have the same output as the code snippet above:\n\n```cs\n\nResponse\u003cJObject\u003e response = await client.GetAsync\u003cJObject\u003e(\"/products\");\n\nif (response.Success)\n{\n    dynamic responseObj = response.Result;\n\n    foreach (dynamic product in responseObj.results)\n    {\n        Console.WriteLine(product.id);\n    }\n}\nelse\n{\n    Console.WriteLine(\"{0}: {1}\", response.StatusCode, response.ReasonPhrase);\n\n    foreach (ErrorMessage errorMessage in response.Errors)\n    {\n        Console.WriteLine(\"{0}: {1}\", errorMessage.Code, errorMessage.Message);\n    }\n}\n\n```\n\n## License, Contributing\n\nThis software is licenses under the MIT License, which allows commercial use and modification as well as open source collaboration.\n\nWe are warmly welcoming contributors and are happy to help out.\nTo contribute changes or improvements, please fork the repository into your account on GitHub and create a pull request.\n\n## Contribution Guidelines\n\n* The namespaces and directory names in the SDK should match up exactly with the project name in the documentation. For your contributions.\n    \u003e For Example: The namespace should be commercetools.CartDiscounts (plural) should be used rather than commercetools.CartDiscount (singular).\n\n* Only the required properties for an API entity should be used as constructor parameters in the corresponding SDK class. Parameters marked as optional in the documentation should not be required for creating a new instance of the class.\n    \u003e For Example: In the commercetools.CartDiscounts.CartDiscountDraft class, description, target, isActive, validFrom and validUntil should not be used as constructor parameters as they are not required.\n\n* Wherever applicable, try to treat objects as groups of entities and use a factory to create these groups of entities when response is being parsed.\n    \u003e For Example: The CartDiscountValue entities (AbsoluteCartDiscountValue/RelativeCartDiscountValue/GiftLineItemCartDiscountValue) are treated as a group of entities that share a common type property, Type (Relative/Absolute/GiftLineItem). These entities are created by a CartDiscountValueFactory when we parse the response from the Composable Commerce API.\n\n\n### Mac Users\n\nThe Visual Studio IDE [is available for Mac OS](https://www.visualstudio.com/vs/visual-studio-mac/) (preview version as of 2016)\n\nA more lightweight Coding Environment that also manages the .NET setup automatically for you is [Microsoft Visual Studio Code](https://code.visualstudio.com/) (free).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommercetools%2Fcommercetools-dotnet-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommercetools%2Fcommercetools-dotnet-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommercetools%2Fcommercetools-dotnet-sdk/lists"}