Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of https://github.com/FastSpring/fastspring-api

  • Loading branch information...
commit 44dcc551ee1a5afc0e1734b72fba1e2c303351f6 2 parents 5884688 + 5213320
Lars Steiger steiger authored
1  README.mdown
View
@@ -32,3 +32,4 @@ API Endpoints
* [Subscriptions](http://github.com/fastspring/fastspring-api/blob/master/sections/subscriptions.mdown)
* [Orders](http://github.com/fastspring/fastspring-api/blob/master/sections/orders.mdown)
+* [Miscellaneous](http://github.com/fastspring/fastspring-api/blob/master/sections/misc.mdown)
13 sections/misc.mdown
View
@@ -0,0 +1,13 @@
+
+Generate coupon
+---------------
+
+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.
+
+`POST /company/{company}/coupon/{prefix}/generate`
+
+``` xml
+<couponCode>
+ <code/>
+</couponCode>
+```
40 sections/orders.mdown
View
@@ -15,6 +15,7 @@ Returns an order identified by its reference.
<statusChanged>2010-08-15T00:00:00.000Z</statusChanged>
<test>true | false</test>
<due>2010-08-15T00:00:00.000Z</due>
+ <returnStatus>none | partial | full</returnStatus>
<currency/>
<referrer/>
<originIp/>
@@ -68,16 +69,37 @@ Returns an order identified by its reference.
</order>
```
+Search orders
+-------------
-Generate coupon
----------------
+Search orders in the entire company. The query string is case-insensitive and can be any of the following:
+ * Exact order reference. Example: ABC123-123-123
+ * Customer last name (full or 'starts with'). Example: doe
+ * Customer company name (full or 'starts with'). Example: abc
+ * Full customer email address. Example: doe@abc.com
+ * Customer email domain name, beginning with an "@" sign. Example: @abc.com
+ * Last 5 digits of a credit card number (credit card orders only). Example: 54321
+ * Last 4 digits of a credit card number (credit card orders only). Example: 4321
+ * Specific coupon code. Example search phrase: coupon XYZ123
+ * Exact referrer. Example: referrer abc
-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.
-
-`POST /company/{company}/coupon/{prefix}/generate`
+`GET /company/{company}/orders/search?query={query string}`
``` xml
-<couponCode>
- <code/>
-</couponCode>
-```
+<orders>
+ <order>
+ <reference/>
+ <status>open | request | requested | acceptance | accepted | fulfillment | fulfilled | completion | completed | canceled | failed</status>
+ <statusChanged>2010-08-15T00:00:00.000Z</statusChanged>
+ <test>true | false</test>
+ <returnStatus>none | partial | full</returnStatus>
+ <customer>
+ <firstName/>
+ <lastName/>
+ <company/>
+ <email/>
+ <phoneNumber/>
+ </customer>
+ </order>
+</orders>
+```
46 sections/subscriptions.mdown
View
@@ -31,6 +31,7 @@ Returns a single subscription identified by its reference. You can get that refe
<productName/>
<tags/>
<quantity>0</quantity>
+ <coupon/>
<nextPeriodDate>2010-08-15Z</nextPeriodDate>
<end>2010-08-15Z</end>
</subscription>
@@ -63,23 +64,6 @@ Updates an existing subscription. All elements are optional.
`PUT /company/{company}/subscription/{reference}`
-``` xml
-<subscription>
- <firstName></firstName>
- <lastName></lastName>
- <company></company>
- <email></email>
- <phoneNumber></phoneNumber>
- <productPath></productPath>
- <quantity></quantity>
- <tags></tags>
- <no-end-date/>
- <coupon></coupon>
- <discount-duration></discount-duration>
- <proration></proration>
-</subscription>
-```
-
* Returns `200: OK` on success. The response contains updated subscription data. See [Get Subscription](#get-subscription).
* Returns `403: Forbidden` if un-canceling isn't possible anymore.
* Returns `400: Bad Request` if the request was invalid. The response will contain a detailed description.
@@ -100,33 +84,7 @@ The delete action causes the cancellation of a subscription at next period.
`DELETE /company/{company}/subscription/{reference}`
-``` xml
-<subscription>
- <status>active | inactive</status>
- <statusChanged>2010-08-15T00:00:00.000Z</statusChanged>
- <statusReason>canceled-non-payment | completed | canceled</statusReason>
- <cancelable>true | false</cancelable>
- <reference/>
- <test>true | false</test>
- <referrer/>
- <sourceName/>
- <sourceKey/>
- <sourceCampaign/>
- <customer>
- <firstName/>
- <lastName/>
- <company/>
- <email/>
- <phoneNumber/>
- </customer>
- <customerUrl/>
- <productName/>
- <tags/>
- <quantity>0</quantity>
- <nextPeriodDate>2010-08-15Z</nextPeriodDate>
- <end>2010-08-15Z</end>
-</subscription>
-```
+Returns HTTP status code 200 on success.
Example:
Please sign in to comment.
Something went wrong with that request. Please try again.