AbleCommerce Gold Web Api

From AbleCommerce Wiki
Revision as of 06:19, 21 April 2016 by Naveed (Talk | contribs)

Jump to: navigation, search

Contents

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/List

Gets all products.

GET api/AdminProducts/List?id={id}

Gets a specific product.

GET api/AdminProducts/Featured

Gets all featured products.

GET api/AdminProducts/Related?id={id}

Gets related products.

GET api/AdminProducts/Accessories?id={id}

Gets upsell products.

POST api/AdminProducts/PostProduct

Creates a product

PUT api/AdminProducts/PutProduct?id={id}

Updates a product

DELETE api/AdminProducts/DeleteProduct?id={id}

Deletes a product.

GET api/AdminProducts/List/{id}

Gets a specific product.

GET api/AdminProducts/Related/{id}

Gets related products.

GET api/AdminProducts/Accessories/{id}

Gets upsell products.

PUT api/AdminProducts/PutProduct/{id}

Updates a product

DELETE api/AdminProducts/DeleteProduct/{id}

Deletes a product.

GET api/AdminProducts/{id}/List

Gets a specific product.

GET api/AdminProducts/{id}/Related

Gets related products.

GET api/AdminProducts/{id}/Accessories

Gets upsell products.

PUT api/AdminProducts/{id}/PutProduct

Updates a product

DELETE api/AdminProducts/{id}/DeleteProduct

Deletes a product.

GET api/AdminProducts

Gets all products.

GET api/AdminProducts/{id}

Gets a specific product.


Products : API DETAILS

GET api/Products/List

Gets all products.

GET api/Products/List?id={id}

Gets a specific product.

GET api/Products/Featured

Gets all featured products.

GET api/Products/Featured?id={id}

Gets a specific featured product.

GET api/Products/TopSellers

Gets all popular products.

GET api/Products/MostViewed

Gets most viewed products.

GET api/Products/RecentlyViewed

Gets all recently viewed products.

GET api/Products/Related?id={id}

Gets related products.

GET api/Products/Accessories?id={id}

Gets upsell products.

GET api/Products/Reviews?id={id}

Gets product reviews.

GET api/Products/List/{id}

Gets a specific product.

GET api/Products/Featured/{id}

Gets a specific featured product.

GET api/Products/Related/{id}

Gets related products.

GET api/Products/Accessories/{id}

Gets upsell products.

GET api/Products/Reviews/{id}

Gets product reviews.

GET api/Products/{id}/List

Gets a specific product.

GET api/Products/{id}/Featured

Gets a specific featured product.

GET api/Products/{id}/Related

Gets related products.

GET api/Products/{id}/Accessories

Gets upsell products.

GET api/Products/{id}/Reviews

Gets product reviews.

GET api/Products

Gets all products.

GET api/Products/{id}

Gets a specific product.

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