Skip to content

Commit fa5a259

Browse files
author
Lars Steiger
committed
Initial version
1 parent 1fa5146 commit fa5a259

File tree

4 files changed

+136
-3
lines changed

4 files changed

+136
-3
lines changed

README.mdown

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,32 @@
1-
# About FastSpring #
2-
[FastSpring](http://www.fastspring.com) offers an innovative e-commerce engine designed to overcome ease of use, customer service, and cost issues that have plagued software e-commerce companies. We employ a customer-driven, iterative and collaborative Agile development process.
1+
FastSpring API
2+
==============
3+
4+
The FastSpring API follows the REST principles as much as possible. Check out our wrappers and API endpoint documentations below.
5+
6+
7+
Wrappers and example code
8+
-------------------------
9+
10+
* [Ruby](http://github.com/fastspring/fastspring-ruby)
11+
* [PHP](http://github.com/fastspring/fastspring-php)
12+
13+
14+
Authentication
15+
--------------
16+
17+
All requests require authentication. This can be either through HTTP Basic authentication or URL parameters. This is secure since all requests use SSL. [More...](http://github.com/fastspring/fastspring-api/blob/master/sections/authentication.md)
18+
19+
20+
Making a request
21+
---------------
22+
23+
* All URLs start with `https://api.fastspring.com/company/{company}` and must be made through SSL (HTTPS). Plain HTTP requests will be rejected.
24+
* Make sure to set the `Content-Type` header to `application/xml` for `PUT` and `POST` requests which will identify the format of the data being sent.
25+
* Check out our API endpoints below for further details
26+
27+
28+
API Endpoints
29+
-------------
30+
31+
* [Subscriptions](http://github.com/fastspring/fastspring-api/blob/master/sections/subscriptions.mdown)
32+
* [Orders](http://github.com/fastspring/fastspring-api/blob/master/sections/orders.mdown)

sections/authentication.mdown

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Authentication
2+
==============
3+
4+
Authentication is managed using URL parameters, and is based on the users setup in your FastSpring account. Generally we recommend that you create a new user specifically for the purpose of using the API, rather than using a personal user account. All requests require authentication.
5+
6+
Example: `https://api.fastspring.com/company/{company}/...?user={username}&pass={password}`
7+
8+
9+
Basic Auth (recommended)
10+
------------------------
11+
12+
We recommend to use Basic Auth as alternative to URL parameters. This is especially useful for POST/PUT requests.
13+
14+
Example: `curl -i -X PUT -H 'Content-Type: application/xml' -u {username}:{password} -d "..." https://api.fastspring.com/...`
15+
16+
17+
Company, Username, Password
18+
---------------------------
19+
20+
As noted in the example, each request will require 3 key pieces of authentication information:
21+
22+
* `{company}` is the case sensitive Company ID which you use to login to SpringBoard.
23+
* `{username}` is the case sensitive username of the special API user you created via SpringBoard.
24+
* `{password}` is the case sensitive password of the API user.

sections/orders.mdown

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
Orders
2+
======
3+
4+
Get order
5+
---------
6+
7+
Returns an order identified by its reference.
8+
9+
`GET /company/{company}/order/{reference}`
10+
11+
```<order>
12+
<reference/>
13+
<status>open | request | requested | acceptance | accepted | fulfillment | fulfilled | completion | completed | canceled | failed</status>
14+
<statusChanged>2010-08-15T00:00:00.000Z</statusChanged>
15+
<test>true | false</test>
16+
<due>2010-08-15T00:00:00.000Z</due>
17+
<currency/>
18+
<referrer/>
19+
<originIp/>
20+
<total>0.0</total>
21+
<tax>0.0</tax>
22+
<shipping>0.0</shipping>
23+
<sourceName/>
24+
<sourceKey/>
25+
<sourceCampaign/>
26+
<customer>
27+
<firstName/>
28+
<lastName/>
29+
<company/>
30+
<email/>
31+
<phoneNumber/>
32+
</customer>
33+
<purchaser>
34+
<firstName/>
35+
<lastName/>
36+
<company/>
37+
<email/>
38+
<phoneNumber/>
39+
</purchaser>
40+
<address>
41+
<addressLine1/>
42+
<addressLine2/>
43+
<city/>
44+
<region/>
45+
<regionCustom/>
46+
<postalCode/>
47+
<country/>
48+
</address>
49+
<orderItems>
50+
<orderItem>
51+
<productDisplay/>
52+
<productName/>
53+
<quantity>0</quantity>
54+
<subscriptionReference/>
55+
</orderItem>
56+
</orderItems>
57+
<payments>
58+
<payment>
59+
<status>open | request | requested | acceptance | accepted | fulfillment | fulfilled | completion | completed | canceled | failed</status>
60+
<statusChanged>2010-08-15T00:00:00.000Z</statusChanged>
61+
<methodType>paypal | creditcard | test | bank | check | purchase-order | free</methodType>
62+
<declinedReason>internal-error | unsupported-country | expired-card | declined | risk | processor-risk | connection | unknown | cc-address-verification | cc-cvv | voice-auth</declinedReason>
63+
<currency/>
64+
<total>0.0</total>
65+
</payment>
66+
</payments>
67+
</order>```
68+
69+
70+
Generate coupon
71+
---------------
72+
73+
Generates a new random coupon. The random coupon set is identified by its custom prefix, which was specified when creating the coupon. A maximum of 10,000 coupons may be generated each day.
74+
75+
`POST /company/{company}/coupon/{prefix}/generate`
76+
77+
```<couponCode>
78+
<code/>
79+
</couponCode>```

sections/subscriptions.mdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Returns a single subscription identified by its reference. You can get that refe
3434
<end>2010-08-15Z</end>
3535
</subscription>```
3636
37-
Example: `curl -i -X GET -H 'Content-Type: application/xml' -u {username}:{password} https://api.fastspring.com/company/{company}/subscription/{reference}`
37+
Example: `curl -i -X GET -u {username}:{password} https://api.fastspring.com/company/{company}/subscription/{reference}`
3838
3939
4040
Update subscription

0 commit comments

Comments
 (0)