Skip to content

shervinw/Snipcart.API

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Welcome to the .NET Snipcart SDK

Snipcart API, supporting .NET Standard 1.3+

Reference

See the Snipcart API Reference docs.

Installation

Install Snipcart.API via NuGet

Coming soon

Usage

Initialise the Snipcart client

using Snipcart;
using Snipcart.Models;
SnipcartClient client = new SnipcartClient("[your api key here]");

You can obtain your secret API key from the API Keys section in the Dashboard.

Get Request Example

Orders orders = client.GetOrdersAsync(new OrdersRequestOptions() { status = OrderStatus.Shipped }).Result;
if (orders.IsSuccessStatusCode) //returned 200, 201, 204
{
    //do stuff
}
else
{
    var errormessage = orders.message;
    var statuscode = orders.statuscode;
    var errors = orders.errors.parameter;
}

Update Request Example

Order order = client.UpdateOrderAsync("[order token/guid]", 
	new OrderPutOptions() { trackingUrl = "http://test.com" }).Result;

Implemented endpoints

* GET /orders
* GET /orders/{token}
* PUT /orders/{token}
* GET /subscriptions
* GET /subscriptions/{id}
* GET /subscriptions/{id}/invoices
* DELETE /subscriptions/{id}
* POST /subscriptions/{id}/pause
* POST /subscriptions/{id}/resume
* GET /orders/{token}/notifications
* POST /orders/{token}/notifications
* GET /orders/{token}/refunds
* GET /orders/{token}/refunds/{id}
* POST /orders/{token}/refunds
* GET /customers
* GET /customers/{id}
* GET /customers/{id}/orders
* GET /discounts
* GET /discounts/{id}
* POST /discounts
* PUT /discounts/{id}
* DELETE /discounts/{id}
* GET /usersessions/{token}
* GET /products
* GET /products/{id}
* POST /products
* PUT /products/{id}
* DELETE /products/{id}
* GET /carts/abandoned
* GET /carts/abandoned/{token}

Contribution Guidelines

Contributions are more than welcome. If you'd like to submit a pull request, it's best to start with an issue to describe what you'd like to build.

About

Snipcart.API is an async .NET client for Snipcarts e-commerce platform.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages