Documentation You are here: start » v » 1.0 » api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
v:1.0:api [2012/08/17 22:53] – adding example of how to change a customer email foxybrettv:1.0:api [2015/12/01 18:12] – [The FoxyCart API] foxyluke
Line 1: Line 1:
 ====== The FoxyCart API ====== ====== The FoxyCart API ======
  
 +<WRAP TIP>
 +__**NOTE: This XML API will be deprecated**__
 +Though this legacy XML API works and will continue to function in the future, it will not see any new functionality. We recommend any new integrations are built on top of our new Hypermedia API: https://api.foxycart.com/
 +</WRAP>
 ===== Before You Get Started With the API ===== ===== Before You Get Started With the API =====
 Like any API, FoxyCart's API is geared towards advanced users only. If you're not comfortable with programming, you should probably get familiar with your language of choice first or look for professional assistance. Never test on a live store, as you can certainly create problems that could impact your customers or your revenue. Like any API, FoxyCart's API is geared towards advanced users only. If you're not comfortable with programming, you should probably get familiar with your language of choice first or look for professional assistance. Never test on a live store, as you can certainly create problems that could impact your customers or your revenue.
Line 142: Line 146:
   : **Filter Options:** ''customer_id_filter'', ''customer_email_filter'', ''customer_first_name_filter'', ''customer_last_name_filter'', ''customer_state_filter''. Use an asterisk (''*'') when filtering to do partial matches.   : **Filter Options:** ''customer_id_filter'', ''customer_email_filter'', ''customer_first_name_filter'', ''customer_last_name_filter'', ''customer_state_filter''. Use an asterisk (''*'') when filtering to do partial matches.
   ; ''customer_address_get''   ; ''customer_address_get''
-  : **Required Fields:** ''customer_id'' //or// ''customer_email''+  : **Required Fields:*
 +    * ''customer_id'' //or// ''customer_email'' 
 +    * ''address_id'' //or// ''address_name'' (''address_name'' is the shipto name assigned to each multi-ship address (as specified in the add to cart), a customers default shipping address is recorded as "Me")
   : **Notes:** Only applicable for stores using multi-ship.   : **Notes:** Only applicable for stores using multi-ship.
   ; ''customer_address_save''   ; ''customer_address_save''
-  : **Required Fields:** ''customer_id'' //or// ''customer_email''+  : **Required Fields:*
 +    * ''customer_id'' //or// ''customer_email'' 
 +    * ''address_id'' //or// ''address_name'' (''address_name'' is the shipto name assigned to each multi-ship address (as specified in the add to cart), a customers default shipping address is recorded as "Me")
   : **Notes:** Only applicable for stores using multi-ship.   : **Notes:** Only applicable for stores using multi-ship.
 +  : **Record Fields:** ''address_name'', ''shipto_first_name'', ''shipto_last_name'', ''shipto_company'', ''shipto_address1'', ''shipto_address2'', ''shipto_city'', ''shipto_state'', ''shipto_postal_code'', ''shipto_country''
   ; ''attribute_save''   ; ''attribute_save''
   : **Notes:** See the ''attribute_save'' documentation under the [[#store|store]] API section.   : **Notes:** See the ''attribute_save'' documentation under the [[#store|store]] API section.
Line 162: Line 171:
   * The ''customer_password_hash'' value: If you do not have the password in cleartext but would like to update the password, pass in ''customer_password_hash'' //and// the ''customer_password_salt'' (if applicable per your store's [[.:customers#synchronizing_users_and_passwords|password hashing method]]. Whether you pass in a ''customer_password'' or a ''customer_password_hash'', the end result is the same: A hashed password will be returned on ''_get'' requests for the ''customer_password'' field.   * The ''customer_password_hash'' value: If you do not have the password in cleartext but would like to update the password, pass in ''customer_password_hash'' //and// the ''customer_password_salt'' (if applicable per your store's [[.:customers#synchronizing_users_and_passwords|password hashing method]]. Whether you pass in a ''customer_password'' or a ''customer_password_hash'', the end result is the same: A hashed password will be returned on ''_get'' requests for the ''customer_password'' field.
   * The ''cc_number'' field will return a //masked// card number if a payment method is saved. Otherwise it will be empty.   * The ''cc_number'' field will return a //masked// card number if a payment method is saved. Otherwise it will be empty.
- 
 ==== Transactions ==== ==== Transactions ====
   ; ''transaction_get''   ; ''transaction_get''
Line 170: Line 178:
     * ''transaction_date_filter_begin'' (YYYY-MM-DD), ''transaction_date_filter_end'' (YYYY-MM-DD)     * ''transaction_date_filter_begin'' (YYYY-MM-DD), ''transaction_date_filter_end'' (YYYY-MM-DD)
     * ''is_test_filter'', ''hide_transaction_filter'', ''data_is_fed_filter'' (0 or 1), ''id_filter'', ''order_total_filter'', ''coupon_code_filter''     * ''is_test_filter'', ''hide_transaction_filter'', ''data_is_fed_filter'' (0 or 1), ''id_filter'', ''order_total_filter'', ''coupon_code_filter''
-    * ''customer_id_filter'', ''customer_email_filter'', ''customer_first_name_filter'', ''customer_last_name_filter'', ''customer_state_filter'', ''shipping_state_filter'', ''customer_ip_filter''+    * ''customer_id_filter'', ''customer_email_filter'', ''customer_first_name_filter'', ''customer_last_name_filter'', ''customer_state_filter'', ''customer_country_filter'', ''shipping_state_filter'', ''shipping_country_filter'', ''customer_ip_filter''
     * ''product_code_filter'', ''product_name_filter'', ''product_option_name_filter'', ''product_option_value_filter'', ''attribute_name_filter'', ''attribute_value_filter''     * ''product_code_filter'', ''product_name_filter'', ''product_option_name_filter'', ''product_option_value_filter'', ''attribute_name_filter'', ''attribute_value_filter''
     * ''custom_field_name_filter'', ''custom_field_value_filter'' allow filtering based on //transaction// (not product) custom fields (as entered on the checkout).     * ''custom_field_name_filter'', ''custom_field_value_filter'' allow filtering based on //transaction// (not product) custom fields (as entered on the checkout).
-    * ''category'' +    * ''category_filter'' 
-    * ''sub_token''+    * ''sub_token_filter''
     * Use an asterisk (''*'') when filtering to do partial matches.     * Use an asterisk (''*'') when filtering to do partial matches.
  
Line 190: Line 198:
   ; ''attribute_delete''   ; ''attribute_delete''
   : **Notes:** See the ''attribute_delete'' documentation under the [[#store|store]] API section.   : **Notes:** See the ''attribute_delete'' documentation under the [[#store|store]] API section.
- +   
-  ==== Subscriptions ====+==== Subscriptions ====
   ; ''subscription_get''   ; ''subscription_get''
   : **Required Fields:** ''sub_token'' (either the token by itself or the complete ''sub_token'' URL)   : **Required Fields:** ''sub_token'' (either the token by itself or the complete ''sub_token'' URL)

Site Tools