Difference between revisions of "AbleCommerce Gold Web Api"

From AbleCommerce Wiki
Jump to: navigation, search
Line 39: Line 39:
 
== AdminProducts : API DETAILS ==
 
== AdminProducts : API DETAILS ==
  
=== GET api/AdminProducts ===
+
=== GET api/AdminProducts/List ===
Method: GET
+
Gets all products.
  
URI: api/AdminProducts  
+
=== GET api/AdminProducts/List?id={id} ===
 +
Gets a specific product.
  
Description: Gets all products.
+
=== GET api/AdminProducts/Featured ===
 +
Gets all featured products.
  
 +
=== GET api/AdminProducts/Related?id={id} ===
 +
Gets related products.
  
=== GET api/AdminProducts/{id} ===  
+
=== GET api/AdminProducts/Accessories?id={id} ===
Method: GET
+
Gets upsell products.
  
URI: api/AdminProducts/{id}
+
=== POST api/AdminProducts/PostProduct ===
 +
Creates a product
  
Description: Gets a specific product.
+
=== PUT api/AdminProducts/PutProduct?id={id} ===
 +
Updates a product
  
 +
=== DELETE api/AdminProducts/DeleteProduct?id={id} ===
 +
Deletes a product.
  
Request Information: Parameters
+
=== GET api/AdminProducts/List/{id} ===
 +
Gets a specific product.
  
--
+
=== GET api/AdminProducts/Related/{id} ===
 +
Gets related products.
  
Name: id
+
=== GET api/AdminProducts/Accessories/{id} ===
 +
Gets upsell products.
  
Description: Id of the product, define this parameter in the request URI.
+
=== PUT api/AdminProducts/PutProduct/{id} ===
 +
Updates a product
  
 +
=== DELETE api/AdminProducts/DeleteProduct/{id} ===
 +
Deletes a product.
  
=== POST api/AdminProducts ===  
+
=== GET api/AdminProducts/{id}/List ===
Method: POST
+
Gets a specific product.
  
URI: POST api/AdminProducts
+
=== GET api/AdminProducts/{id}/Related ===
 +
Gets related products.
  
Description: Creates a product
+
=== GET api/AdminProducts/{id}/Accessories ===
 +
Gets upsell products.
  
 +
=== PUT api/AdminProducts/{id}/PutProduct ===
 +
Updates a product
  
Request Information: Parameters
+
=== DELETE api/AdminProducts/{id}/DeleteProduct ===
 +
Deletes a product.
  
--
+
=== GET api/AdminProducts ===
 +
Gets all products.
  
Parameter: product
+
=== GET api/AdminProducts/{id} ===
 +
Gets a specific product.
  
Description: The new product. Define this parameter in the request body.
 
  
=== POST api/AdminProducts ===
+
== Products : API DETAILS ==
Method: POST
+
  
URI: api/AdminProducts/{id}
+
=== GET api/Products/List ===
 +
Gets all products.
  
Description: Updates a product
+
=== GET api/Products/List?id={id} ===
 +
Gets a specific product.
  
 +
=== GET api/Products/Featured ===
 +
Gets all featured products.
  
Request Information: Parameters
+
=== GET api/Products/Featured?id={id} ===
 +
Gets a specific featured product.
  
--
+
=== GET api/Products/TopSellers ===
 +
Gets all popular products.
  
Parameter: id
+
=== GET api/Products/MostViewed ===
 +
Gets most viewed products.
  
Description: The id of the product to update. Define this parameter in the request URI.
+
=== GET api/Products/RecentlyViewed ===
 +
Gets all recently viewed products.
  
 +
=== GET api/Products/Related?id={id} ===
 +
Gets related products.
  
Parameter: product
+
=== GET api/Products/Accessories?id={id} ===
 +
Gets upsell products.
  
Description: The updated details. Define this parameter in the request body.
+
=== GET api/Products/Reviews?id={id} ===
 
+
Gets product reviews.
=== 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 ===  
+
=== GET api/Products/List/{id} ===
Method: GET
+
Gets a specific product.
  
URI: api/Products
+
=== GET api/Products/Featured/{id} ===
 +
Gets a specific featured product.
  
Description: Gets all products.
+
=== GET api/Products/Related/{id} ===
 +
Gets related products.
  
 +
=== GET api/Products/Accessories/{id} ===
 +
Gets upsell products.
  
=== GET api/Products/{id} ===  
+
=== GET api/Products/Reviews/{id} ===
Method: GET
+
Gets product reviews.
  
URI: api/Products/{id}
+
=== GET api/Products/{id}/List ===
 +
Gets a specific product.
  
Description: Gets a specific product.
+
=== GET api/Products/{id}/Featured ===
 +
Gets a specific featured product.
  
 +
=== GET api/Products/{id}/Related ===
 +
Gets related products.
  
Request Information: Parameters
+
=== GET api/Products/{id}/Accessories ===
 +
Gets upsell products.
  
--
+
=== GET api/Products/{id}/Reviews ===
 +
Gets product reviews.
  
Parameter: id
+
=== GET api/Products ===
 +
Gets all products.
  
Description: The id of the product. Define this parameter in the request URI.
+
=== GET api/Products/{id} ===
 +
Gets a specific product.
  
 
== List of Available Fields for AdminProducts ==
 
== List of Available Fields for AdminProducts ==

Revision as of 06:18, 21 April 2016

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