David Widaman
posted this on July 01, 2011 06:10 pm
The Topspin Order API is a way to read and write order data to and from the Topspin platform. This allows you to customize order fulfillment, reading and writing order data to and from the Topspin platform. For example, as an artist you might want to mark orders shipped and notify fans from a custom fulfillment application without having to login to the Topspin Manager.
If you are implementing this yourself, read the documentation below. If you need to hire a developer to integrate the Topspin API, please refer to our Topspin partners pages
.
The Topspin Orders API is a REST web-service that consists of a set of callable methods. Using the API, you can view and update order and SKU
data. Specifically, you can perform the following actions:
Typical Offers API integrations follow the following steps:
The way the integration typically works is as follows:
The major gotchas and things to know in this process are:
Several code samples can be downloaded:
You will need to use HTTP authentication to access the API. To get an API key please make a request here:https://app.topspin.net/account/artisthelp![]()
Use your Topspin email login as your username and the API key as your password.
The API is a REST service. This allows you to create a request URL string that will work in your web browser, the command line, and in your code using such tools as cURL, WGET or any HTTP library that will support HTTP authentication.
The base URL for the request will look like:
Followed by the method call:
Each method will use either a POST or GET method. Please set Content Type to: application/x-www-form-urlencoded.
Query parameters are passed to the method either in a URL string for GET or in a data block for POST. Multiple parameters are separated by an ampersand (&). URL strings should be properly URL encoded.
Responses are returned as JSON strings. For more information on JSON, see http://www.json.org
.
Empty Response
http://pastie.org/pastes/2152579
|
Method
|
URL
|
HTTP Method
|
Function
|
| View Orders | /api/v1/order | POST | returns list of order details |
| Update Orders | /api/v1/order/update | POST | update individual orders |
| View SKUs | /api/v1/sku | POST | returns all SKUs created by the artist |
| Update SKUs | /api/v1/sku/update | POST | update SKUs |
Returns a list of order details.
Search - JSON Object to be passed with a "filter" key/value pair AND/OR a "term" key/value pair.
Required: None. If no parameters are passed, search will default to:
Filter Options:
Pagination Options:
Term Keys:
Return all orders where Spin Name contains "Test Spin 123"
Return all orders where Spin Name contains "Only" AND Order Date is 2008-10-30
Return all digital orders where Spin Name contains "Only" AND Order Date is 2008-10-30
Example Response
Field Descriptions:
Update individual orders
NOTE: Orders that are marked "shipped" and over 15 days old can not be updated.
NOTE: "tracking_type" and "tracking_code" must be edited simultaneously.
|
Parameter
|
Values
|
Description
|
|
| shipped | string | Allowed: "pending", "shipped". Marks order as shipped or still pending shipment. | |
| shipping_date | string - YYYY-MM-DD | Date order was shipped. | |
| tracking_code | string | carrier-generated Code used to track package. | |
| tracking_type | string | Allowed: "DHL", "FEDEX", "UPS", "USPS", "Other". Carrier used to ship. | |
Optional Parameters
If you would like to notify fans that order status has changed, pass the optional email_on_update=true parameter.
Example:
https://app.topspin.net/api/v1/order/update?email_on_update=true![]()
Example Request
Example Response
Response will contain:
View SKUs
Returns all SKUs currently available in any of an artist's active campaign.
Parameters
Update individual SKUs
| id | Name | desc | uploaded | Size | Downloads | ||
|---|---|---|---|---|---|---|---|
| 1 | 274 | Order API Client (Ruby) | Tue 19 of Oct., 2010 21:03 EDT by abozanich | 9.15 Kb | 30 | ||
| 2 | 113 | Topspin Orders API Client in C# | Mon 22 of Feb., 2010 14:07 EST by kwehner | 3.44 Kb | 77 | ||
| 3 | 112 | C# Data structure definitions for Topspin Orders API | Mon 22 of Feb., 2010 14:06 EST by kwehner | 1.54 Kb | 44 | ||
| 4 | 16 | Order API Sample | Mon 16 of Nov., 2009 13:45 EST by tread | 1.20 Kb | 232 |