Difference between revisions of "AbleCommerce Gold Web Api"

From AbleCommerce Wiki
Jump to: navigation, search
Line 1: Line 1:
 
== Introduction ==  
 
== Introduction ==  
  
AbleCommerce Web API allows you to interact with a subset of the store data. Currently its under development and only can be used to interact with the products data. It offers post / put / delete functionality.
+
AbleCommerce Web API allows you to interact with a subset of the store data. It can be used to interact with a subset of all data including Products, Categories, Users, Orders, Order Items and Order Shipments. It offers post / put / delete functionality for these domains.
  
  
Line 12: Line 12:
 
This will list an index of all available functions. Clicking through to one of the functions shows examples. The test buttons on the help pages can be used to specify/send formatted data and read the responses. For detailed and up to date information about API usage check the integrated api help.
 
This will list an index of all available functions. Clicking through to one of the functions shows examples. The test buttons on the help pages can be used to specify/send formatted data and read the responses. For detailed and up to date information about API usage check the integrated api help.
  
 +
For the above mentioned domains mostly two controllers are available for each, one is admin and one is for retail. The admin controller requires authorization and SSL, while the retail controller works over plain HTTP and does not require authentication. However retail controller will only let you examine public data.
  
For products two controllers are available, one is admin and one is for retail. The admin controller require authorization and SSL, while the retail controller works over plain HTTP and does not require authentication. However it will only let you examine public products. Here is complete list of available functions:
+
== Version and Update History ==
 +
 
 +
A basic Web API feature was added for AbleCommerce Gold R4, and improved continuously with later releases.
 +
 
 +
For AbleCommerce Gold R7 new admin and retail controllers were added for Category domain. And following new API end points were added for Products domain:
 +
 
 +
/api/products/featured
 +
/api/products/topsellers
 +
/api/products/recentlyviewed
 +
/api/products/[productid]/related
 +
/api/products/[productid]/accessories
 +
 
 +
For AbleCommerce Gold R12 new admin and retail controllers for Users, Orders, Order Items and Order Shipments are added.
  
 
== Requirements ==
 
== Requirements ==
  
Requires IIS7 using Integrated Pipeline mode.
+
Web API requires IIS7 using Integrated Pipeline mode.
 +
 
 +
== API DETAILS ==
 +
 
 +
Each controller allow performing different operations, and detailed help is available for each controller at your store "/api/help" page. For example here we list complete list of available functions for admin and retail controllers of Product domain:
 +
 
  
 
== AdminProducts : API DETAILS ==
 
== AdminProducts : API DETAILS ==
Line 186: Line 204:
 
Description
 
Description
 
ExtendedDescription
 
ExtendedDescription
 +
</pre>
 +
 +
== List of Available Fields for Users ==
 +
<pre>
 +
Id
 +
Username
 +
Email
 +
AffiliateId
 +
IsApproved
 +
IsAnonymous
 +
IsLockedOut
 +
CreateDate
 +
LastActivityDate
 +
LastLoginDate
 +
Comment
 +
</pre>
 +
 +
== List of Available Fields for Categories and AdminCategories ==
 +
<pre>
 +
Id
 +
ParentId
 +
Name
 +
Summary
 +
Description
 +
ThumbnailUrl
 +
ThumbnailAltText
 +
MetaDescription
 +
MetaKeywords
 +
Title
 +
HtmlHead
 +
</pre>
 +
 +
== List of Available Fields for Orders ==
 +
<pre>
 +
Id
 +
OrderNumber
 +
OrderDate
 +
StoreId
 +
Store
 +
UserId
 +
UserName
 +
OrderStatus
 +
BillToFirstName
 +
BillToLastName
 +
BillToCompany
 +
BillToAddress1
 +
BillToAddress2
 +
BillToCity
 +
BillToProvince
 +
BillToPostalCode
 +
BillToCountryCode
 +
BillToPhone
 +
BillToFax
 +
BillToEmail
 +
ProductSubtotal
 +
TotalCharges
 +
TotalPayments
 +
Exported
 +
RemoteIP
 +
Referrer
 +
ShippingAmount
 +
TaxAmount
 +
</pre>
 +
 +
== List of Available Fields for Order Items ==
 +
<pre>
 +
Id
 +
OrderId
 +
OrderItemTypeId
 +
OrderShipmentId
 +
Name
 +
VariantName
 +
Sku
 +
Price
 +
Weight
 +
CostOfGoods
 +
Quantity
 +
LineMessage
 +
OrderBy
 +
GiftMessage
 +
TaxRate
 +
TaxAmount
 +
KitList
 +
IsSubscription
 +
Frequency
 +
FrequencyUnitId
 +
</pre>
 +
 +
== List of Available Fields for Order Shipments ==
 +
<pre>
 +
Id
 +
OrderId
 +
OrderNumber
 +
ShipMethod
 +
Warehouse
 +
ShipToFirstName
 +
ShipToLastName
 +
ShipToCompany
 +
ShipToAddress1
 +
ShipToAddress2
 +
ShipToCity
 +
ShipToProvince
 +
ShipToPostalCode
 +
ShipToCountry
 +
ShipToPhone
 +
ShipToFax
 +
ShipToEmail
 +
OriginCountry
 +
ShipToResidence
 +
ShipMessage
 +
ShipDate
 +
ProductSubtotal
 +
TotalCharges
 +
ShippingAmount
 
</pre>
 
</pre>
  
 
[[Category:AbleCommerce Gold]]
 
[[Category:AbleCommerce Gold]]

Revision as of 05:42, 21 April 2016

Introduction

AbleCommerce Web API allows you to interact with a subset of the store data. It can be used to interact with a subset of all data including Products, Categories, Users, Orders, Order Items and Order Shipments. It offers post / put / delete functionality for these domains.


The Web API includes a help documentation generator and test harness. The help documentation can be accessed using a URL like this:


/api/help


This will list an index of all available functions. Clicking through to one of the functions shows examples. The test buttons on the help pages can be used to specify/send formatted data and read the responses. For detailed and up to date information about API usage check the integrated api help.

For the above mentioned domains mostly two controllers are available for each, one is admin and one is for retail. The admin controller requires authorization and SSL, while the retail controller works over plain HTTP and does not require authentication. However retail controller will only let you examine public data.

Version and Update History

A basic Web API feature was added for AbleCommerce Gold R4, and improved continuously with later releases.

For AbleCommerce Gold R7 new admin and retail controllers were added for Category domain. And following new API end points were added for Products domain:

/api/products/featured /api/products/topsellers /api/products/recentlyviewed /api/products/[productid]/related /api/products/[productid]/accessories

For AbleCommerce Gold R12 new admin and retail controllers for Users, Orders, Order Items and Order Shipments are added.

Requirements

Web API requires IIS7 using Integrated Pipeline mode.

API DETAILS

Each controller allow performing different operations, and detailed help is available for each controller at your store "/api/help" page. For example here we list complete list of available functions for admin and retail controllers of Product domain:


AdminProducts : API DETAILS

GET api/AdminProducts

Method: GET

URI: api/AdminProducts

Description: Gets all products.


GET api/AdminProducts/{id}

Method: GET

URI: api/AdminProducts/{id}

Description: Gets a specific product.


Request Information: Parameters

--

Name: id

Description: Id of the product, define this parameter in the request URI.


POST api/AdminProducts

Method: POST

URI: POST api/AdminProducts

Description: Creates a product


Request Information: Parameters

--

Parameter: product

Description: The new product. Define this parameter in the request body.

POST api/AdminProducts

Method: POST

URI: api/AdminProducts/{id}

Description: Updates a product


Request Information: Parameters

--

Parameter: id

Description: The id of the product to update. Define this parameter in the request URI.


Parameter: product

Description: The updated details. Define this parameter in the request body.

DELETE api/AdminProducts/{id}

Method: DELETE

URI: api/AdminProducts/{id}

Description: Deletes a product.


Request Information: Parameters

--

Parameter: id

Description: The id of the product to delete. Define this parameter in the request URI.

Products : API DETAILS

GET api/Products

Method: GET

URI: api/Products

Description: Gets all products.


GET api/Products/{id}

Method: GET

URI: api/Products/{id}

Description: Gets a specific product.


Request Information: Parameters

--

Parameter: id

Description: The id of the product. Define this parameter in the request URI.

List of Available Fields for AdminProducts

Id
Name
Price
CostOfGoods
MSRP
Weight
Length
Width
Height
Manufacturer
Sku
ModelNumber
TaxCode
Warehouse
InStock
InStockWarningLevel
InventoryMode
ThumbnailUrl
ThumbnailAltText
ImageUrl
ImageAltText
Summary
Description
ExtendedDescription
Vendor
CreatedDate
LastModifiedDate
IsFeatured
IsProhibited
AllowReviews
AllowBackorder
ExcludeFromFeed
DisablePurchase
MinQuantity
MaxQuantity
IsGiftCertificate
WrapGroup
Visibility
Shippable

List of Available Fields for Retail Products

Id
Name
Price
MSRP
Weight
Length
Width
Height
Manufacturer
Sku
ModelNumber
ImageUrl
ImageAltText
Summary
Description
ExtendedDescription

List of Available Fields for Users

Id
Username
Email
AffiliateId
IsApproved
IsAnonymous
IsLockedOut
CreateDate
LastActivityDate
LastLoginDate
Comment

List of Available Fields for Categories and AdminCategories

Id
ParentId
Name
Summary
Description
ThumbnailUrl
ThumbnailAltText
MetaDescription
MetaKeywords
Title
HtmlHead

List of Available Fields for Orders

Id
OrderNumber
OrderDate
StoreId
Store
UserId
UserName
OrderStatus
BillToFirstName
BillToLastName
BillToCompany
BillToAddress1
BillToAddress2
BillToCity
BillToProvince
BillToPostalCode
BillToCountryCode
BillToPhone
BillToFax
BillToEmail
ProductSubtotal
TotalCharges
TotalPayments
Exported
RemoteIP
Referrer
ShippingAmount
TaxAmount

List of Available Fields for Order Items

Id
OrderId
OrderItemTypeId
OrderShipmentId
Name
VariantName
Sku
Price
Weight
CostOfGoods
Quantity
LineMessage
OrderBy
GiftMessage
TaxRate
TaxAmount
KitList
IsSubscription
Frequency
FrequencyUnitId

List of Available Fields for Order Shipments

Id
OrderId
OrderNumber
ShipMethod
Warehouse
ShipToFirstName
ShipToLastName
ShipToCompany
ShipToAddress1
ShipToAddress2
ShipToCity
ShipToProvince
ShipToPostalCode
ShipToCountry
ShipToPhone
ShipToFax
ShipToEmail
OriginCountry
ShipToResidence
ShipMessage
ShipDate
ProductSubtotal
TotalCharges
ShippingAmount