API Notifications

From Developer's API

(Difference between revisions)
(API Notifications Overview)
Line 1: Line 1:
The 1ShoppingCart notification system sends messages via https of new events<sup>1</sup> that have taken place on your 1ShoppingCart merchant account. A message is created in XML and sent to a user configurable URL. The notification data can then be used to call the API and retrieve specific information, such as the details of a new order.
+
The 1ShoppingCart notification system sends messages via https of new events<sup>[[#1]]</sup> that have taken place on your 1ShoppingCart merchant account. A message is created in XML and sent to a user configurable URL. The notification data can then be used to call the API and retrieve specific information, such as the details of a new order.
  
 
===API Notifications Overview===
 
===API Notifications Overview===
Line 6: Line 6:
  
 
=====Diagram Explained=====
 
=====Diagram Explained=====
# When a new event<sup>1</sup> is generated in your merchant account a notification token is prepared and sent over https to your notification url
+
# When a new event<sup>[[#1]]</sup> is generated in your merchant account a notification token is prepared and sent over https to your notification url
 
# The notification request sent from the 1ShoppingCart API contains XML in the request body and holds the event type and token within its nodes
 
# The notification request sent from the 1ShoppingCart API contains XML in the request body and holds the event type and token within its nodes
 
# Parse the event type and token values from the XML then call the API wrapper method corresponding to the event type to retrieve the detailed information
 
# Parse the event type and token values from the XML then call the API wrapper method corresponding to the event type to retrieve the detailed information

Revision as of 17:02, 26 May 2008

The 1ShoppingCart notification system sends messages via https of new events#1 that have taken place on your 1ShoppingCart merchant account. A message is created in XML and sent to a user configurable URL. The notification data can then be used to call the API and retrieve specific information, such as the details of a new order.

API Notifications Overview

The following diagram shows the typical flow of data when the 1ShoppingCart API sends new event notification.

ApiNotificationProcess.jpg

Diagram Explained
  1. When a new event#1 is generated in your merchant account a notification token is prepared and sent over https to your notification url
  2. The notification request sent from the 1ShoppingCart API contains XML in the request body and holds the event type and token within its nodes
  3. Parse the event type and token values from the XML then call the API wrapper method corresponding to the event type to retrieve the detailed information
  4. The API wrapper will prepare the request to the 1ShoppingCart API and send the request over http
  5. The API will parse out the merchant id, merchant key and token value from the request and prepare the requested data.
  6. The API will send the prepared data back over https to the API wrapper
  7. The API wrapper received the requested data back from the API as XML
  8. The notification listener receives the XML data from the API wrapper where it can verify the success attribute of the response node
  9. Add functionality to support your business processes. for example you can parse the ShippingInfo node and prepare shipping labels.


1 Currently the following events support API notification:

  • New orders

New Orders