Submit Online Transactions and Online Returns
The Online Transactions API allows you to record external sales and returns with SimpleConsign, such as those placed via an ecommerce site. Version 1 of this API only recorded sales, did not record returns, and did not record the external e-commerce order/invoice number. Version 2 of this API introduced the ability to do returns. To do returns, you must record the order/invoice number (orderNumber) on both the sale and the return. Any sale without an orderNumber cannot be returned later. The only difference between version 1 and 2 of the API is whether you include the order type and orderNumber or not. Version 1 API calls will continue to work with the Version 2 API, with the exception about returns noted above.To submit a transaction, submit a POST request to
This URL receives a JSON post, the request will look like this:
Make sure you set the Accept and Content-Type HTTP headers to "application/json" when making the HTTP request.
Online Sale Transaction of two SKUs with different quantities for online order/invoice # "1234".
"key":"Your API key here",
Online Return Transaction of one SKU with a quantity of 2 items for online order/invoice # "1234"
"key":"Your API key here",
How Traxia Handles Money Values
You must follow this same pattern when sending nonTaxableSaleTotal, taxableSaleTotal, tax and price to the Online Transaction and Online Return API. Please convert your dollars to cents when calling the API. If not, then your dollar value of 42.42 will be sent to SimpleConsign, be divided by 100, and become .4242 and not 42.42.
A successful transaction will get a response like this:
If an error occurred you will get an error response like this:
"error": "error message here"
We highly recommend that you check the API responses for error conditions, and not assume that the call will work. The following errors are possible:
- invalid API key
- too many API requests in the last ten minutes
- this location's price plan is not authorized for API access
- could not find item with SKU
- taxableSaleTotal and nonTaxableSaleTotal is $0.00
- transaction item is missing a SKU
- total of items price does not match transaction sub total
- taxableSaleTotal is greater than zero, but no tax was collected
- taxableSaleTotal is zero, but tax was collected
- transaction type must be either 'SALE' or 'RETURN' (triggered only if the type or orderNumber fields are included in the data)
- a unique order/invoice number (orderNumber) from the remote service must be provided (triggered only if the type or orderNumber fields are included in the data)
- the type of transaction (SALE or RETURN) must be provided for an orderNumber
- an online SALE transaction already exists for the provided orderNumber
- could not find original online SALE transaction for the provided orderNumber to be returned