If you've landed here, you probably want this page instead: http://wiki.foxycart.com/v/0.0.0/hypermedia_api
If you happened to stumble on this page, you can safely ignore it. :)
This is our playground for documenting the current status of the REST API we're building out. It currently supports application/hal+json (shown here), application/hal+xml, and application/vnd.siren+json.
Note: first request to api-sandbox.foxycart.com should fail asking for the required FOXYCART-API-VERSION: 1 header…
HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 ) curl -X GET -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" https://api-sandbox.foxycart.com/
HTTP/1.1 200 OK Date: Thu, 01 Nov 2012 15:42:48 GMT Connection: close cache-control: private, must-revalidate link: <https://api-sandbox.foxycart.com/>;rel="self";title="Your API starting point." link: <https://api-sandbox.foxycart.com/resources>;rel="https://api.foxycart.com/rels/resources";title="Various resources used for determing valid input values." link: <https://api-sandbox.foxycart.com/rels>;rel="https://api.foxycart.com/rels";title="Custom Link Relationships supported by this API." link: <https://api-sandbox.foxycart.com/clients>;rel="https://api.foxycart.com/rels/create_client";title="Create a client via POST." link: <https://api-sandbox.foxycart.com/oauth/token>;rel="https://api.foxycart.com/rels/token";title="The OAuth endpoint for obtaining a new access_token using an existing refresh_token. Post www-form-url-encoded data as follows: grant_type=refresh_token&refresh_token={refresh_token}&client_id={client_id}";type="application/json" Content-Type: application/hal+json ETag: W/"74a3f5a4a7560cf5c2ab44f4a99658d7e244b1b8" Content-Length: 1448
{ "_links":{ "self":{ "href":"https:\/\/api-sandbox.foxycart.com\/", "title":"Your API starting point." }, "https:\/\/api.foxycart.com\/rels\/resources":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources", "title":"Various resources used for determing valid input values." }, "https:\/\/api.foxycart.com\/rels":{ "href":"https:\/\/api-sandbox.foxycart.com\/rels", "title":"Custom Link Relationships supported by this API." }, "https:\/\/api.foxycart.com\/rels\/create_client":{ "href":"https:\/\/api-sandbox.foxycart.com\/clients", "title":"Create a client via POST." }, "https:\/\/api.foxycart.com\/rels\/token":{ "href":"https:\/\/api-sandbox.foxycart.com\/oauth\/token", "title":"The OAuth endpoint for obtaining a new access_token using an existing refresh_token. Post www-form-url-encoded data as follows: grant_type=refresh_token&refresh_token={refresh_token}&client_id={client_id}", "type":"application\/json" } }, "message":"Welcome to the FoxyCart API! Our hope is to be as self-documenting and RESTful as possible. Please let us know if you have any questions by posting in our forum http:\/\/forum.foxycart.com or emailing us at helpdesk@foxycart.com. As a last resort, you could read the documentation at http:\/\/wiki.foxycart.com. Your first action should be to create an OAuth Client, then a user, followed by a store." }
HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 ) curl -X GET -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" https://api-sandbox.foxycart.com/resources
HTTP/1.1 200 OK Date: Thu, 01 Nov 2012 15:42:48 GMT Connection: close cache-control: private, must-revalidate link: <https://api-sandbox.foxycart.com/resources>;rel="self";title="API resources home" link: <https://api-sandbox.foxycart.com/resources/checkout_types>;rel="https://api.foxycart.com/rels/checkout_types";title="List of valid checkout type values for the Store resource checkout_type setting." link: <https://api-sandbox.foxycart.com/resources/customer_password_hash_types>;rel="https://api.foxycart.com/rels/customer_password_hash_types";title="List of valid customer password hash type values for the Store resource customer_password_hash_type setting." link: <https://api-sandbox.foxycart.com/resources/default_templates>;rel="https://api.foxycart.com/rels/default_templates";title="Get default templates for the cart, checkout, receipt and email." link: <https://api-sandbox.foxycart.com/resources/languages>;rel="https://api.foxycart.com/rels/languages";title="List of valid language values for the Store resource language setting." link: <https://api-sandbox.foxycart.com/resources/language_strings>;rel="https://api.foxycart.com/rels/language_strings";title="List of the default language strings that can be overriden." link: <https://api-sandbox.foxycart.com/resources/locales>;rel="https://api.foxycart.com/rels/locales";title="List of all supported locales." link: <https://api-sandbox.foxycart.com/resources/payment_method_gateway_types>;rel="https://api.foxycart.com/rels/payment_method_gateway_types";title="List of supported Payment Method Gateways and valid entries for that resource's type setting." link: <https://api-sandbox.foxycart.com/resources/shipping_methods>;rel="https://api.foxycart.com/rels/shipping_methods";title="The shipping carriers used when configuring live shipping rates." link: <https://api-sandbox.foxycart.com/resources/shipping_address_types>;rel="https://api.foxycart.com/rels/shipping_address_types";title="List of valid address type values for the Store resource shipping_address_type setting." link: <https://api-sandbox.foxycart.com/resources/countries>;rel="https://api.foxycart.com/rels/countries";title="List of valid country values for any country setting such as the Store resource store_country." link: <https://api-sandbox.foxycart.com/resources/regions>;rel="https://api.foxycart.com/rels/regions";title="List of valid state values for the Store resource store_state setting. It defaults to US states, but you can filter for other country states using ?country_code=<valid country code>" link: <https://api-sandbox.foxycart.com/resources/store_versions>;rel="https://api.foxycart.com/rels/store_versions";title="Store versions available along with their changelog details." link: <https://api-sandbox.foxycart.com/resources/timezones>;rel="https://api.foxycart.com/rels/timezones";title="List of valid timezones for the store resource timezone setting." Content-Type: application/hal+json ETag: W/"5186be8b648396ebc76f967b0ee205d825d94339" Content-Length: 3422
{ "_links":{ "self":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources", "title":"API resources home" }, "https:\/\/api.foxycart.com\/rels\/checkout_types":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/checkout_types", "title":"List of valid checkout type values for the Store resource checkout_type setting." }, "https:\/\/api.foxycart.com\/rels\/customer_password_hash_types":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/customer_password_hash_types", "title":"List of valid customer password hash type values for the Store resource customer_password_hash_type setting." }, "https:\/\/api.foxycart.com\/rels\/default_templates":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/default_templates", "title":"Get default templates for the cart, checkout, receipt and email." }, "https:\/\/api.foxycart.com\/rels\/languages":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/languages", "title":"List of valid language values for the Store resource language setting." }, "https:\/\/api.foxycart.com\/rels\/language_strings":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/language_strings", "title":"List of the default language strings that can be overriden." }, "https:\/\/api.foxycart.com\/rels\/locales":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/locales", "title":"List of all supported locales." }, "https:\/\/api.foxycart.com\/rels\/payment_method_gateway_types":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/payment_method_gateway_types", "title":"List of supported Payment Method Gateways and valid entries for that resource's type setting." }, "https:\/\/api.foxycart.com\/rels\/shipping_methods":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/shipping_methods", "title":"The shipping carriers used when configuring live shipping rates." }, "https:\/\/api.foxycart.com\/rels\/shipping_address_types":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/shipping_address_types", "title":"List of valid address type values for the Store resource shipping_address_type setting." }, "https:\/\/api.foxycart.com\/rels\/countries":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/countries", "title":"List of valid country values for any country setting such as the Store resource store_country." }, "https:\/\/api.foxycart.com\/rels\/regions":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/regions", "title":"List of valid state values for the Store resource store_state setting. It defaults to US states, but you can filter for other country states using ?country_code=<valid country code>" }, "https:\/\/api.foxycart.com\/rels\/store_versions":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/store_versions", "title":"Store versions available along with their changelog details." }, "https:\/\/api.foxycart.com\/rels\/timezones":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/timezones", "title":"List of valid timezones for the store resource timezone setting." } }, "message":"Listed here are links to various resources for determining default values for resource inputs along with other helpful API information." }
HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 ) curl -X GET -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" https://api-sandbox.foxycart.com/resources/regions?country_code=CA
HTTP/1.1 200 OK Date: Thu, 01 Nov 2012 15:42:48 GMT Connection: close cache-control: private, must-revalidate link: <https://api-sandbox.foxycart.com/resources/regions>;rel="self";title="List of valid state values for the Store resource store_state setting. It defaults to US states, but you can filter for other country states using ?country_code=<valid country code>" link: <https://api-sandbox.foxycart.com/resources/countries>;rel="https://api.foxycart.com/rels/store_countries";title="List of valid country values for any country setting such as the Store resource store_country." link: <https://api-sandbox.foxycart.com/resources>;rel="https://api.foxycart.com/rels/resources";title="API resources home" Content-Type: application/hal+json ETag: W/"f667f95c1424fbeae297ab0b22b644f7959e3a8a" Content-Length: 2523
{ "_links":{ "self":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/regions", "title":"List of valid state values for the Store resource store_state setting. It defaults to US states, but you can filter for other country states using ?country_code=<valid country code>" }, "https:\/\/api.foxycart.com\/rels\/store_countries":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/countries", "title":"List of valid country values for any country setting such as the Store resource store_country." }, "https:\/\/api.foxycart.com\/rels\/resources":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources", "title":"API resources home" } }, "message":"The values listed here are the correct values for the Store store_state field for the given country code. The values are listed in the format value => description. When dynamically building form options, pass in a value as a url attribute named \"selected\". If no values are specified, any store_state value can be used for this country code.", "values":{ "AB":"Alberta", "BC":"British Columbia", "MB":"Manitoba", "NB":"New Brunswick", "NF":"Newfoundland", "NT":"Northwest Territories", "NS":"Nova Scotia", "NU":"Nunavut", "ON":"Ontario", "PE":"Prince Edward Island", "QC":"Quebec", "SK":"Saskatchewan", "YT":"Yukon Territory" }, "alternate_values":{ "AB":[ ], "BC":[ "la Colombie-Britannique" ], "MB":[ ], "NB":[ "Nouveau-Brunswick" ], "NF":[ ], "NT":[ ], "NS":[ "Nouvelle-\u00c9cosse", "Alba Nuadh" ], "NU":[ ], "ON":[ ], "PE":[ "\u00cele-du-Prince-\u00c9douard", "Eilean a' Phrionnsa" ], "QC":[ "Qu\u00e9bec" ], "SK":[ ], "YT":[ ] }, "options":"<option value=\"AB\">Alberta<\/option>\n<option value=\"BC\">British Columbia<\/option>\n<option value=\"MB\">Manitoba<\/option>\n<option value=\"NB\">New Brunswick<\/option>\n<option value=\"NF\">Newfoundland<\/option>\n<option value=\"NT\">Northwest Territories<\/option>\n<option value=\"NS\">Nova Scotia<\/option>\n<option value=\"NU\">Nunavut<\/option>\n<option value=\"ON\">Ontario<\/option>\n<option value=\"PE\">Prince Edward Island<\/option>\n<option value=\"QC\">Quebec<\/option>\n<option value=\"SK\">Saskatchewan<\/option>\n<option value=\"YT\">Yukon Territory<\/option>\n" }
HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 ) curl -X GET -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" https://api-sandbox.foxycart.com/rels
HTTP/1.1 200 OK Transfer-Encoding: chunked Date: Thu, 01 Nov 2012 15:42:48 GMT Connection: close cache-control: private, must-revalidate link: <https://api.foxycart.com/rels>;rel="self";title="Link Relations Home" link: <https://api.foxycart.com/rels/applied_taxes>;rel="https://api.foxycart.com/rels/applied_taxes";title="The taxes applied to this transaction.";type="text/html" link: <https://api.foxycart.com/rels/attributes>;rel="https://api.foxycart.com/rels/attributes";title="The attributes associated with this resource.";type="text/html" link: <https://api.foxycart.com/rels/billing_addresses>;rel="https://api.foxycart.com/rels/billing_addresses";title="The billing addresses associated with this resource. These are historical addresses after a transaction takes place.";type="text/html" link: <https://api.foxycart.com/rels/cart>;rel="https://api.foxycart.com/rels/cart";title="The cart associated with this resource.";type="text/html" link: <https://api.foxycart.com/rels/cart_template>;rel="https://api.foxycart.com/rels/cart_template";title="The cart template for this template set.";type="text/html" link: <https://api.foxycart.com/rels/cart_templates>;rel="https://api.foxycart.com/rels/cart_templates";title="All the cart templates for this store.";type="text/html" link: <https://api.foxycart.com/rels/checkout_template>;rel="https://api.foxycart.com/rels/checkout_template";title="The checkout template for this template set.";type="text/html" link: <https://api.foxycart.com/rels/checkout_templates>;rel="https://api.foxycart.com/rels/checkout_templates";title="All the checkout templates for this store.";type="text/html" link: <https://api.foxycart.com/rels/checkout_types>;rel="https://api.foxycart.com/rels/checkout_types";title="List of valid checkout type values for the Store resource checkout_type setting.";type="text/html" link: <https://api.foxycart.com/rels/client>;rel="https://api.foxycart.com/rels/client";title="The OAuth client you are connecting to the API as based on your OAuth token.";type="text/html" link: <https://api.foxycart.com/rels/countries>;rel="https://api.foxycart.com/rels/countries";title="List of valid country values for any country setting such as the Store resource store_country.";type="text/html" link: <https://api.foxycart.com/rels/coupon_codes>;rel="https://api.foxycart.com/rels/coupon_codes";title="Coupon codes associated with this coupon.";type="text/html" link: <https://api.foxycart.com/rels/coupon_product_categories>;rel="https://api.foxycart.com/rels/coupon_product_categories";title="Valid product categories for this coupon";type="text/html" link: <https://api.foxycart.com/rels/coupon>;rel="https://api.foxycart.com/rels/coupon";title="The coupon this resource is associated with";type="text/html" link: <https://api.foxycart.com/rels/create_client>;rel="https://api.foxycart.com/rels/create_client";title="From the API home page, if you have not yet created an OAuth client, posting here will create one.";type="text/html" link: <https://api.foxycart.com/rels/create_user>;rel="https://api.foxycart.com/rels/create_user";title="From a client resource, if you have not yet created a FoxyCart user, posting here will create one.";type="text/html" link: <https://api.foxycart.com/rels/customer>;rel="https://api.foxycart.com/rels/customer";title="The customer associated with this resource.";type="text/html" link: <https://api.foxycart.com/rels/customer_address>;rel="https://api.foxycart.com/rels/customer_address";title="The customer address associated with this resource.";type="text/html" link: <https://api.foxycart.com/rels/customer_addresses>;rel="https://api.foxycart.com/rels/customer_addresses";title="All of the addresses associated with a customer.";type="text/html" link: <https://api.foxycart.com/rels/customer_password_hash_types>;rel="https://api.foxycart.com/rels/customer_password_hash_types";title="List of valid customer password hash type values for the Store resource customer_password_hash_type setting.";type="text/html" link: <https://api.foxycart.com/rels/custom_fields>;rel="https://api.foxycart.com/rels/custom_fields";title="The custom fields for this transaction or shipping address.";type="text/html" link: <https://api.foxycart.com/rels/default_billing_address>;rel="https://api.foxycart.com/rels/default_billing_address";title="The default billing address for a given customer.";type="text/html" link: <https://api.foxycart.com/rels/default_shipping_address>;rel="https://api.foxycart.com/rels/default_shipping_address";title="The default shipping address for a given customer.";type="text/html" link: <https://api.foxycart.com/rels/default_payment_method>;rel="https://api.foxycart.com/rels/default_payment_method";title="The default payment method for a given customer.";type="text/html" link: <https://api.foxycart.com/rels/default_templates>;rel="https://api.foxycart.com/rels/default_templates";title="Get default templates for the cart, checkout, receipt and email.";type="text/html" link: <https://api.foxycart.com/rels/downloadable_product_categories>;rel="https://api.foxycart.com/rels/downloadable_product_categories";title="Product categories that are configured for downloadable product delivery.";type="text/html" link: <https://api.foxycart.com/rels/downloadable>;rel="https://api.foxycart.com/rels/downloadable";title="A downloadable product associated with this resource.";type="text/html" link: <https://api.foxycart.com/rels/discounts>;rel="https://api.foxycart.com/rels/discounts";title="The discounts applied for this transaction.";type="text/html" link: <https://api.foxycart.com/rels/discount_product_category>;rel="https://api.foxycart.com/rels/discount_product_category";title="If a product option is associated with a category disocunt, this will reference that category.";type="text/html" link: <https://api.foxycart.com/rels/email_template>;rel="https://api.foxycart.com/rels/email_template";title="The email template for this template set.";type="text/html" link: <https://api.foxycart.com/rels/email_templates>;rel="https://api.foxycart.com/rels/email_templates";title="The email templates associated with a store.";type="text/html" link: <https://api.foxycart.com/rels/error_entry>;rel="https://api.foxycart.com/rels/error_entry";title="Log entries of all errors for your store.";type="text/html" link: <https://api.foxycart.com/rels/languages>;rel="https://api.foxycart.com/rels/languages";title="List of valid language values for the Store resource language setting.";type="text/html" link: <https://api.foxycart.com/rels/language_overrides>;rel="https://api.foxycart.com/rels/language_overrides";title="List all the language overrides for this store.";type="text/html" link: <https://api.foxycart.com/rels/language_strings>;rel="https://api.foxycart.com/rels/language_strings";title="List of the default language strings that can be overriden.";type="text/html" link: <https://api.foxycart.com/rels/last_transaction>;rel="https://api.foxycart.com/rels/last_transaction";title="The last transaction that successfully ran for this subscription.";type="text/html" link: <https://api.foxycart.com/rels/locales>;rel="https://api.foxycart.com/rels/locales";title="List of all supported locales.";type="text/html" link: <https://api.foxycart.com/rels/payments>;rel="https://api.foxycart.com/rels/payments";title="The payments used to pay for this transaction.";type="text/html" link: <https://api.foxycart.com/rels/payment_method_sets>;rel="https://api.foxycart.com/rels/payment_method_sets";title="Payment method set associated with this resource. A payment method set is a grouping of payment method options such as the payment gateway and minfraud settings.";type="text/html" link: <https://api.foxycart.com/rels/payment_method_gateway>;rel="https://api.foxycart.com/rels/payment_method_gateway";title="The payment method gateway configuration settings for a payment method set.";type="text/html" link: <https://api.foxycart.com/rels/payment_method_gateway_types>;rel="https://api.foxycart.com/rels/payment_method_gateway_types";title="List of supported Payment Method Gateways and valid entries for that resource's type setting.";type="text/html" link: <https://api.foxycart.com/rels/payment_method_paypal_express>;rel="https://api.foxycart.com/rels/payment_method_paypal_express";title="The PayPal Express configuration settings for a payment method set.";type="text/html" link: <https://api.foxycart.com/rels/payment_method_minfraud>;rel="https://api.foxycart.com/rels/payment_method_minfraud";title="The minfraud configuration settings for a payment method set.";type="text/html" link: <https://api.foxycart.com/rels/product>;rel="https://api.foxycart.com/rels/product";title="A product associated with this resource.";type="text/html" link: <https://api.foxycart.com/rels/products>;rel="https://api.foxycart.com/rels/products";title="The products associated with this transaction.";type="text/html" link: <https://api.foxycart.com/rels/product_categories>;rel="https://api.foxycart.com/rels/product_categories";title="Product categories for this store.";type="text/html" link: <https://api.foxycart.com/rels/product_category>;rel="https://api.foxycart.com/rels/product_category";title="The product category this resource is associated with.";type="text/html" link: <https://api.foxycart.com/rels/product_options>;rel="https://api.foxycart.com/rels/product_options";title="The product options associated with this product.";type="text/html" link: <https://api.foxycart.com/rels/receipt>;rel="https://api.foxycart.com/rels/receipt";title="HTML receipt for this transaction.";type="text/html" link: <https://api.foxycart.com/rels/receipt_template>;rel="https://api.foxycart.com/rels/receipt_template";title="The receipt template for this template set.";type="text/html" link: <https://api.foxycart.com/rels/receipt_templates>;rel="https://api.foxycart.com/rels/receipt_templates";title="All the receipt templates for this store.";type="text/html" link: <https://api.foxycart.com/rels/regions>;rel="https://api.foxycart.com/rels/regions";title="List of valid state values for the Store resource store_state setting. It defaults to US states, but you can filter for other country states using ?country_code=<valid country code>";type="text/html" link: <https://api.foxycart.com/rels/resources>;rel="https://api.foxycart.com/rels/resources";title="Resources and resource values that are available to this API such as timezones, password hash types, supported languages, country codes, etc.";type="text/html" link: <https://api.foxycart.com/rels/shipping_container>;rel="https://api.foxycart.com/rels/shipping_container";title="A specific shipping containers used when configuring live shipping rates.";type="text/html" link: <https://api.foxycart.com/rels/shipping_containers>;rel="https://api.foxycart.com/rels/shipping_containers";title="The shipping containers used when configuring live shipping rates.";type="text/html" link: <https://api.foxycart.com/rels/shipping_drop_type>;rel="https://api.foxycart.com/rels/shipping_drop_type";title="A specific shipping drop type used when configuring live shipping rates.";type="text/html" link: <https://api.foxycart.com/rels/shipping_drop_types>;rel="https://api.foxycart.com/rels/shipping_drop_types";title="The shipping drop types used when configuring live shipping rates.";type="text/html" link: <https://api.foxycart.com/rels/shipping_method>;rel="https://api.foxycart.com/rels/shipping_method";title="A specific shipping carrier used when configuring live shipping rates.";type="text/html" link: <https://api.foxycart.com/rels/shipping_methods>;rel="https://api.foxycart.com/rels/shipping_methods";title="The shipping carriers used when configuring live shipping rates.";type="text/html" link: <https://api.foxycart.com/rels/shipping_service>;rel="https://api.foxycart.com/rels/shipping_service";title="A specific shipping service offered by the shipping carrier used when configuring live shipping rates.";type="text/html" link: <https://api.foxycart.com/rels/shipping_services>;rel="https://api.foxycart.com/rels/shipping_services";title="The shipping services offered by the shipping carriers used when configuring live shipping rates.";type="text/html" link: <https://api.foxycart.com/rels/shipping_address>;rel="https://api.foxycart.com/rels/shipping_address";title="The shipping address associated with this resource. These are historical addresses after a transaction takes place.";type="text/html" link: <https://api.foxycart.com/rels/shipping_addresses>;rel="https://api.foxycart.com/rels/shipping_addresses";title="The shipto addresses associated with this resource. These are historical addresses after a transaction takes place.";type="text/html" link: <https://api.foxycart.com/rels/shipping_address_custom_fields>;rel="https://api.foxycart.com/rels/shipping_address_custom_fields";title="The shipping address custom fields for this shipping address.";type="text/html" link: <https://api.foxycart.com/rels/shipping_address_types>;rel="https://api.foxycart.com/rels/shipping_address_types";title="List of valid address type values for the Store resource shipping_address_type setting.";type="text/html" link: <https://api.foxycart.com/rels/store>;rel="https://api.foxycart.com/rels/store";title="The FoxyCart store you have access to based on your OAuth token.";type="text/html" link: <https://api.foxycart.com/rels/stores>;rel="https://api.foxycart.com/rels/stores";title="The FoxyCart stores for the connected user.";type="text/html" link: <https://api.foxycart.com/rels/store_version>;rel="https://api.foxycart.com/rels/store_version";title="This store version.";type="text/html" link: <https://api.foxycart.com/rels/store_versions>;rel="https://api.foxycart.com/rels/store_versions";title="Store versions available along with their changelog details.";type="text/html" link: <https://api.foxycart.com/rels/subscription>;rel="https://api.foxycart.com/rels/subscription";title="The subscription associated with this resource.";type="text/html" link: <https://api.foxycart.com/rels/subscriptions>;rel="https://api.foxycart.com/rels/subscriptions";title="The subscriptions for this store or customer.";type="text/html" link: <https://api.foxycart.com/rels/subscription_settings>;rel="https://api.foxycart.com/rels/subscription_settings";title="The subscription configuration settings for a given store.";type="text/html" link: <https://api.foxycart.com/rels/template_sets>;rel="https://api.foxycart.com/rels/template_sets";title="The template set a template is associated with or the template sets for a given store";type="text/html" link: <https://api.foxycart.com/rels/timezones>;rel="https://api.foxycart.com/rels/timezones";title="List of valid timezones for the store resource timezone setting.";type="text/html" link: <https://api.foxycart.com/rels/token>;rel="https://api.foxycart.com/rels/token";title="The OAuth endpoint for obtaining a new access_token using an existing refresh_token. Post www-form-url-encoded data as follows: grant_type=refresh_token&refresh_token={refresh_token}&client_id={client_id}";type="text/html" link: <https://api.foxycart.com/rels/transaction>;rel="https://api.foxycart.com/rels/transaction";title="The transaction associated with this resource.";type="text/html" link: <https://api.foxycart.com/rels/transaction_template>;rel="https://api.foxycart.com/rels/transaction_template";title="The transaction template for this subscription. Modifying this template will modify the subscription for the next time it processes.";type="text/html" link: <https://api.foxycart.com/rels/user>;rel="https://api.foxycart.com/rels/user";title="The FoxyCart admin user you are connecting to the API as based on your OAuth token.";type="text/html" link: <https://api.foxycart.com/rels/users>;rel="https://api.foxycart.com/rels/users";title="All the FoxyCart users that have access to this store.";type="text/html" link: <https://api.foxycart.com/rels/user_accesses>;rel="https://api.foxycart.com/rels/user_accesses";title="This references all access records that give a FoxyCart user access to a FoxyCart store. When viewed from a user, it will display other user access records that user has and when viewed from a store, it will display what other user access records for that store.";type="text/html" Content-Type: application/hal+json ETag: W/"8739602554c7f3241958e3cc9b57fdecb474d508"
{ "_links":{ "self":{ "href":"https:\/\/api.foxycart.com\/rels", "title":"Link Relations Home" }, "https:\/\/api.foxycart.com\/rels\/applied_taxes":{ "href":"https:\/\/api.foxycart.com\/rels\/applied_taxes", "title":"The taxes applied to this transaction.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/attributes":{ "href":"https:\/\/api.foxycart.com\/rels\/attributes", "title":"The attributes associated with this resource.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/billing_addresses":{ "href":"https:\/\/api.foxycart.com\/rels\/billing_addresses", "title":"The billing addresses associated with this resource. These are historical addresses after a transaction takes place.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/cart":{ "href":"https:\/\/api.foxycart.com\/rels\/cart", "title":"The cart associated with this resource.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/cart_template":{ "href":"https:\/\/api.foxycart.com\/rels\/cart_template", "title":"The cart template for this template set.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/cart_templates":{ "href":"https:\/\/api.foxycart.com\/rels\/cart_templates", "title":"All the cart templates for this store.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/checkout_template":{ "href":"https:\/\/api.foxycart.com\/rels\/checkout_template", "title":"The checkout template for this template set.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/checkout_templates":{ "href":"https:\/\/api.foxycart.com\/rels\/checkout_templates", "title":"All the checkout templates for this store.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/checkout_types":{ "href":"https:\/\/api.foxycart.com\/rels\/checkout_types", "title":"List of valid checkout type values for the Store resource checkout_type setting.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/client":{ "href":"https:\/\/api.foxycart.com\/rels\/client", "title":"The OAuth client you are connecting to the API as based on your OAuth token.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/countries":{ "href":"https:\/\/api.foxycart.com\/rels\/countries", "title":"List of valid country values for any country setting such as the Store resource store_country.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/coupon_codes":{ "href":"https:\/\/api.foxycart.com\/rels\/coupon_codes", "title":"Coupon codes associated with this coupon.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/coupon_product_categories":{ "href":"https:\/\/api.foxycart.com\/rels\/coupon_product_categories", "title":"Valid product categories for this coupon", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/coupon":{ "href":"https:\/\/api.foxycart.com\/rels\/coupon", "title":"The coupon this resource is associated with", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/create_client":{ "href":"https:\/\/api.foxycart.com\/rels\/create_client", "title":"From the API home page, if you have not yet created an OAuth client, posting here will create one.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/create_user":{ "href":"https:\/\/api.foxycart.com\/rels\/create_user", "title":"From a client resource, if you have not yet created a FoxyCart user, posting here will create one.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/customer":{ "href":"https:\/\/api.foxycart.com\/rels\/customer", "title":"The customer associated with this resource.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/customer_address":{ "href":"https:\/\/api.foxycart.com\/rels\/customer_address", "title":"The customer address associated with this resource.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/customer_addresses":{ "href":"https:\/\/api.foxycart.com\/rels\/customer_addresses", "title":"All of the addresses associated with a customer.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/customer_password_hash_types":{ "href":"https:\/\/api.foxycart.com\/rels\/customer_password_hash_types", "title":"List of valid customer password hash type values for the Store resource customer_password_hash_type setting.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/custom_fields":{ "href":"https:\/\/api.foxycart.com\/rels\/custom_fields", "title":"The custom fields for this transaction or shipping address.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/default_billing_address":{ "href":"https:\/\/api.foxycart.com\/rels\/default_billing_address", "title":"The default billing address for a given customer.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/default_shipping_address":{ "href":"https:\/\/api.foxycart.com\/rels\/default_shipping_address", "title":"The default shipping address for a given customer.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/default_payment_method":{ "href":"https:\/\/api.foxycart.com\/rels\/default_payment_method", "title":"The default payment method for a given customer.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/default_templates":{ "href":"https:\/\/api.foxycart.com\/rels\/default_templates", "title":"Get default templates for the cart, checkout, receipt and email.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/downloadable_product_categories":{ "href":"https:\/\/api.foxycart.com\/rels\/downloadable_product_categories", "title":"Product categories that are configured for downloadable product delivery.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/downloadable":{ "href":"https:\/\/api.foxycart.com\/rels\/downloadable", "title":"A downloadable product associated with this resource.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/discounts":{ "href":"https:\/\/api.foxycart.com\/rels\/discounts", "title":"The discounts applied for this transaction.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/discount_product_category":{ "href":"https:\/\/api.foxycart.com\/rels\/discount_product_category", "title":"If a product option is associated with a category disocunt, this will reference that category.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/email_template":{ "href":"https:\/\/api.foxycart.com\/rels\/email_template", "title":"The email template for this template set.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/email_templates":{ "href":"https:\/\/api.foxycart.com\/rels\/email_templates", "title":"The email templates associated with a store.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/error_entry":{ "href":"https:\/\/api.foxycart.com\/rels\/error_entry", "title":"Log entries of all errors for your store.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/languages":{ "href":"https:\/\/api.foxycart.com\/rels\/languages", "title":"List of valid language values for the Store resource language setting.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/language_overrides":{ "href":"https:\/\/api.foxycart.com\/rels\/language_overrides", "title":"List all the language overrides for this store.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/language_strings":{ "href":"https:\/\/api.foxycart.com\/rels\/language_strings", "title":"List of the default language strings that can be overriden.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/last_transaction":{ "href":"https:\/\/api.foxycart.com\/rels\/last_transaction", "title":"The last transaction that successfully ran for this subscription.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/locales":{ "href":"https:\/\/api.foxycart.com\/rels\/locales", "title":"List of all supported locales.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/payments":{ "href":"https:\/\/api.foxycart.com\/rels\/payments", "title":"The payments used to pay for this transaction.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/payment_method_sets":{ "href":"https:\/\/api.foxycart.com\/rels\/payment_method_sets", "title":"Payment method set associated with this resource. A payment method set is a grouping of payment method options such as the payment gateway and minfraud settings.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/payment_method_gateway":{ "href":"https:\/\/api.foxycart.com\/rels\/payment_method_gateway", "title":"The payment method gateway configuration settings for a payment method set.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/payment_method_gateway_types":{ "href":"https:\/\/api.foxycart.com\/rels\/payment_method_gateway_types", "title":"List of supported Payment Method Gateways and valid entries for that resource's type setting.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/payment_method_paypal_express":{ "href":"https:\/\/api.foxycart.com\/rels\/payment_method_paypal_express", "title":"The PayPal Express configuration settings for a payment method set.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/payment_method_minfraud":{ "href":"https:\/\/api.foxycart.com\/rels\/payment_method_minfraud", "title":"The minfraud configuration settings for a payment method set.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/product":{ "href":"https:\/\/api.foxycart.com\/rels\/product", "title":"A product associated with this resource.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/products":{ "href":"https:\/\/api.foxycart.com\/rels\/products", "title":"The products associated with this transaction.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/product_categories":{ "href":"https:\/\/api.foxycart.com\/rels\/product_categories", "title":"Product categories for this store.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/product_category":{ "href":"https:\/\/api.foxycart.com\/rels\/product_category", "title":"The product category this resource is associated with.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/product_options":{ "href":"https:\/\/api.foxycart.com\/rels\/product_options", "title":"The product options associated with this product.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/receipt":{ "href":"https:\/\/api.foxycart.com\/rels\/receipt", "title":"HTML receipt for this transaction.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/receipt_template":{ "href":"https:\/\/api.foxycart.com\/rels\/receipt_template", "title":"The receipt template for this template set.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/receipt_templates":{ "href":"https:\/\/api.foxycart.com\/rels\/receipt_templates", "title":"All the receipt templates for this store.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/regions":{ "href":"https:\/\/api.foxycart.com\/rels\/regions", "title":"List of valid state values for the Store resource store_state setting. It defaults to US states, but you can filter for other country states using ?country_code=<valid country code>", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/resources":{ "href":"https:\/\/api.foxycart.com\/rels\/resources", "title":"Resources and resource values that are available to this API such as timezones, password hash types, supported languages, country codes, etc.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/shipping_container":{ "href":"https:\/\/api.foxycart.com\/rels\/shipping_container", "title":"A specific shipping containers used when configuring live shipping rates.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/shipping_containers":{ "href":"https:\/\/api.foxycart.com\/rels\/shipping_containers", "title":"The shipping containers used when configuring live shipping rates.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/shipping_drop_type":{ "href":"https:\/\/api.foxycart.com\/rels\/shipping_drop_type", "title":"A specific shipping drop type used when configuring live shipping rates.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/shipping_drop_types":{ "href":"https:\/\/api.foxycart.com\/rels\/shipping_drop_types", "title":"The shipping drop types used when configuring live shipping rates.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/shipping_method":{ "href":"https:\/\/api.foxycart.com\/rels\/shipping_method", "title":"A specific shipping carrier used when configuring live shipping rates.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/shipping_methods":{ "href":"https:\/\/api.foxycart.com\/rels\/shipping_methods", "title":"The shipping carriers used when configuring live shipping rates.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/shipping_service":{ "href":"https:\/\/api.foxycart.com\/rels\/shipping_service", "title":"A specific shipping service offered by the shipping carrier used when configuring live shipping rates.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/shipping_services":{ "href":"https:\/\/api.foxycart.com\/rels\/shipping_services", "title":"The shipping services offered by the shipping carriers used when configuring live shipping rates.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/shipping_address":{ "href":"https:\/\/api.foxycart.com\/rels\/shipping_address", "title":"The shipping address associated with this resource. These are historical addresses after a transaction takes place.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/shipping_addresses":{ "href":"https:\/\/api.foxycart.com\/rels\/shipping_addresses", "title":"The shipto addresses associated with this resource. These are historical addresses after a transaction takes place.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/shipping_address_custom_fields":{ "href":"https:\/\/api.foxycart.com\/rels\/shipping_address_custom_fields", "title":"The shipping address custom fields for this shipping address.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/shipping_address_types":{ "href":"https:\/\/api.foxycart.com\/rels\/shipping_address_types", "title":"List of valid address type values for the Store resource shipping_address_type setting.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/store":{ "href":"https:\/\/api.foxycart.com\/rels\/store", "title":"The FoxyCart store you have access to based on your OAuth token.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/stores":{ "href":"https:\/\/api.foxycart.com\/rels\/stores", "title":"The FoxyCart stores for the connected user.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/store_version":{ "href":"https:\/\/api.foxycart.com\/rels\/store_version", "title":"This store version.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/store_versions":{ "href":"https:\/\/api.foxycart.com\/rels\/store_versions", "title":"Store versions available along with their changelog details.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/subscription":{ "href":"https:\/\/api.foxycart.com\/rels\/subscription", "title":"The subscription associated with this resource.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/subscriptions":{ "href":"https:\/\/api.foxycart.com\/rels\/subscriptions", "title":"The subscriptions for this store or customer.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/subscription_settings":{ "href":"https:\/\/api.foxycart.com\/rels\/subscription_settings", "title":"The subscription configuration settings for a given store.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/template_sets":{ "href":"https:\/\/api.foxycart.com\/rels\/template_sets", "title":"The template set a template is associated with or the template sets for a given store", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/timezones":{ "href":"https:\/\/api.foxycart.com\/rels\/timezones", "title":"List of valid timezones for the store resource timezone setting.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/token":{ "href":"https:\/\/api.foxycart.com\/rels\/token", "title":"The OAuth endpoint for obtaining a new access_token using an existing refresh_token. Post www-form-url-encoded data as follows: grant_type=refresh_token&refresh_token={refresh_token}&client_id={client_id}", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/transaction":{ "href":"https:\/\/api.foxycart.com\/rels\/transaction", "title":"The transaction associated with this resource.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/transaction_template":{ "href":"https:\/\/api.foxycart.com\/rels\/transaction_template", "title":"The transaction template for this subscription. Modifying this template will modify the subscription for the next time it processes.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/user":{ "href":"https:\/\/api.foxycart.com\/rels\/user", "title":"The FoxyCart admin user you are connecting to the API as based on your OAuth token.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/users":{ "href":"https:\/\/api.foxycart.com\/rels\/users", "title":"All the FoxyCart users that have access to this store.", "type":"text\/html" }, "https:\/\/api.foxycart.com\/rels\/user_accesses":{ "href":"https:\/\/api.foxycart.com\/rels\/user_accesses", "title":"This references all access records that give a FoxyCart user access to a FoxyCart store. When viewed from a user, it will display other user access records that user has and when viewed from a store, it will display what other user access records for that store.", "type":"text\/html" } } }
HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 ) curl -X GET -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" https://api-sandbox.foxycart.com/rels/client
HTTP/1.1 200 OK Date: Thu, 01 Nov 2012 15:42:48 GMT Connection: close cache-control: private, must-revalidate Content-Type: text/html; charset=UTF-8 ETag: W/"f9432801fd32c7b18c265cace6408cbf6e250f7f" Content-Length: 612
<!DOCTYPE html> <html> <head> <title>FoxyCart Hypermedia API</title> </head> <body> <h1 class="page-header">client <small>relation</small></h1> <p>The OAuth client you are connecting to the API as based on your OAuth token.</p> <h2>client</h2> <h2>Properties</h2> <ul> <li>client_id</li><li>client_secret</li><li>redirect_uri</li><li>javascript_origin_uri</li><li>project_name</li><li>project_description</li><li>company_name</li><li>company_url</li><li>company_logo</li><li>contact_name</li><li>contact_email</li><li>contact_phone</li> </ul> </body> </html>
HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 ) curl -X POST -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" https://api-sandbox.foxycart.com/clients
HTTP/1.1 400 Bad Request Date: Thu, 01 Nov 2012 15:42:48 GMT Connection: close cache-control: private, must-revalidate Content-Type: application/vnd.foxycart.com.error+json ETag: W/"f5be91f442edfc4cb88caf2696c854bf0e643a49" Content-Length: 546
{ "error":"request_data_invalid", "message":"redirect_uri can't be blank, redirect_uri is too short (minimum is 1 characters), project_name can't be blank, project_name is too short (minimum is 1 characters), company_name can't be blank, company_name is too short (minimum is 1 characters), contact_name can't be blank, contact_name is too short (minimum is 1 characters), contact_email can't be blank, contact_email is too short (minimum is 1 characters), contact_phone can't be blank, contact_phone is too short (minimum is 1 characters)" }
DATA: {"redirect_uri":"http:\/\/example.com","project_name":"my_project_670843419","project_description":"some_awesome_project","company_name":"foobar","contact_name":"me","contact_email":"test@example.com","contact_phone":"123456789"} HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 ) curl -X POST -d "{^"redirect_uri^":^"http:\/\/example.com^",^"project_name^":^"my_project_670843419^",^"project_description^":^"some_awesome_project^",^"company_name^":^"foobar^",^"contact_name^":^"me^",^"contact_email^":^"test@example.com^",^"contact_phone^":^"123456789^"}" -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" https://api-sandbox.foxycart.com/clients
HTTP/1.1 201 Created Date: Thu, 01 Nov 2012 15:42:48 GMT Connection: close cache-control: private, must-revalidate location: https://api-sandbox.foxycart.com/clients/864 link: <https://api-sandbox.foxycart.com/clients/864>;rel="self";title="my_project_670843419" link: <https://api-sandbox.foxycart.com/clients/864/attributes>;rel="https://api.foxycart.com/rels/attributes";title="Attributes for This Client" Content-Type: application/hal+json ETag: W/"287062a7d80cb912704a7349e44ff757198a3b80" Content-Length: 578
{ "_links":{ "self":{ "href":"https:\/\/api-sandbox.foxycart.com\/clients\/864", "title":"my_project_670843419" }, "https:\/\/api.foxycart.com\/rels\/attributes":{ "href":"https:\/\/api-sandbox.foxycart.com\/clients\/864\/attributes", "title":"Attributes for This Client" } }, "message":"client 864 created successfully.", "token":{ "access_token":"bce87c9630ba15829506281fa121c80b", "expires_in":3600, "token_type":"bearer", "scope":"client_full_access", "refresh_token":"001f9579b0de191244f9d0dc3e79c18e" } }
HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 [3] => Authorization: Bearer bce87c9630ba15829506281fa121c80b ) curl -X GET -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" -H "Authorization: Bearer bce87c9630ba15829506281fa121c80b" https://api-sandbox.foxycart.com/
HTTP/1.1 200 OK Date: Thu, 01 Nov 2012 15:42:48 GMT Connection: close cache-control: private, must-revalidate link: <https://api-sandbox.foxycart.com/>;rel="self";title="Your API starting point." link: <https://api-sandbox.foxycart.com/resources>;rel="https://api.foxycart.com/rels/resources";title="Various resources used for determing valid input values." link: <https://api-sandbox.foxycart.com/rels>;rel="https://api.foxycart.com/rels";title="Custom Link Relationships supported by this API." link: <https://api-sandbox.foxycart.com/clients/864>;rel="https://api.foxycart.com/rels/client";title="The current client for your authentication token" link: <https://api-sandbox.foxycart.com/users>;rel="https://api.foxycart.com/rels/create_user";title="Create a User via POST" link: <https://api-sandbox.foxycart.com/oauth/token>;rel="https://api.foxycart.com/rels/token";title="The OAuth endpoint for obtaining a new access_token using an existing refresh_token. Post www-form-url-encoded data as follows: grant_type=refresh_token&refresh_token={refresh_token}&client_id={client_id}";type="application/json" Content-Type: application/hal+json ETag: W/"74a3f5a4a7560cf5c2ab44f4a99658d7e244b1b8" Content-Length: 1626
{ "_links":{ "self":{ "href":"https:\/\/api-sandbox.foxycart.com\/", "title":"Your API starting point." }, "https:\/\/api.foxycart.com\/rels\/resources":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources", "title":"Various resources used for determing valid input values." }, "https:\/\/api.foxycart.com\/rels":{ "href":"https:\/\/api-sandbox.foxycart.com\/rels", "title":"Custom Link Relationships supported by this API." }, "https:\/\/api.foxycart.com\/rels\/client":{ "href":"https:\/\/api-sandbox.foxycart.com\/clients\/864", "title":"The current client for your authentication token" }, "https:\/\/api.foxycart.com\/rels\/create_user":{ "href":"https:\/\/api-sandbox.foxycart.com\/users", "title":"Create a User via POST" }, "https:\/\/api.foxycart.com\/rels\/token":{ "href":"https:\/\/api-sandbox.foxycart.com\/oauth\/token", "title":"The OAuth endpoint for obtaining a new access_token using an existing refresh_token. Post www-form-url-encoded data as follows: grant_type=refresh_token&refresh_token={refresh_token}&client_id={client_id}", "type":"application\/json" } }, "message":"Welcome to the FoxyCart API! Our hope is to be as self-documenting and RESTful as possible. Please let us know if you have any questions by posting in our forum http:\/\/forum.foxycart.com or emailing us at helpdesk@foxycart.com. As a last resort, you could read the documentation at http:\/\/wiki.foxycart.com. Your first action should be to create an OAuth Client, then a user, followed by a store." }
HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 [3] => Authorization: Bearer bce87c9630ba15829506281fa121c80b ) curl -X GET -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" -H "Authorization: Bearer bce87c9630ba15829506281fa121c80b" https://api-sandbox.foxycart.com/clients/864
HTTP/1.1 200 OK Date: Thu, 01 Nov 2012 15:42:48 GMT Connection: close cache-control: private, must-revalidate link: <https://api-sandbox.foxycart.com/clients/864>;rel="self";title="my_project_670843419" link: <https://api-sandbox.foxycart.com/clients/864/attributes>;rel="https://api.foxycart.com/rels/attributes";title="Attributes for This Client" Content-Type: application/hal+json ETag: W/"5d5134f61a0a93a3e3127ce0c3113c8f3726b462" Content-Length: 746
{ "_links":{ "self":{ "href":"https:\/\/api-sandbox.foxycart.com\/clients\/864", "title":"my_project_670843419" }, "https:\/\/api.foxycart.com\/rels\/attributes":{ "href":"https:\/\/api-sandbox.foxycart.com\/clients\/864\/attributes", "title":"Attributes for This Client" } }, "client_id":"client_5qXGtr9j5ySzHEckBZWb", "client_secret":"WyELYzdgNUUNbHpyYnLXQurnYuCvjtw6S6HKvQRe", "redirect_uri":"http:\/\/example.com", "javascript_origin_uri":"", "project_name":"my_project_670843419", "project_description":"some_awesome_project", "company_name":"foobar", "company_url":"", "company_logo":"", "contact_name":"me", "contact_email":"test@example.com", "contact_phone":"123456789" }
HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 [3] => Authorization: Bearer bce87c9630ba15829506281fa121c80b ) curl -X POST -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" -H "Authorization: Bearer bce87c9630ba15829506281fa121c80b" https://api-sandbox.foxycart.com/users
HTTP/1.1 400 Bad Request Date: Thu, 01 Nov 2012 15:42:49 GMT Connection: close cache-control: private, must-revalidate Content-Type: application/vnd.foxycart.com.error+json ETag: W/"5fc4a0147782da769801c5f3c24181998d3d5a3b" Content-Length: 290
{ "error":"request_data_invalid", "message":"first_name can't be blank, first_name is too short (minimum is 1 characters), last_name can't be blank, last_name is too short (minimum is 1 characters), email can't be blank, email is too short (minimum is 1 characters), email is invalid" }
DATA: {"first_name":"foo","last_name":"bar","email":"example_38204456@example.com"} HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 [3] => Authorization: Bearer bce87c9630ba15829506281fa121c80b ) curl -X POST -d "{^"first_name^":^"foo^",^"last_name^":^"bar^",^"email^":^"example_38204456@example.com^"}" -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" -H "Authorization: Bearer bce87c9630ba15829506281fa121c80b" https://api-sandbox.foxycart.com/users
HTTP/1.1 201 Created Date: Thu, 01 Nov 2012 15:42:49 GMT Connection: close cache-control: private, must-revalidate location: https://api-sandbox.foxycart.com/users/9438 link: <https://api-sandbox.foxycart.com/users/9438>;rel="self";title="This User" link: <https://api-sandbox.foxycart.com/users/9438/attributes>;rel="https://api.foxycart.com/rels/attributes";title="Attributes for This User" link: <https://api-sandbox.foxycart.com/users/9438/stores>;rel="https://api.foxycart.com/rels/stores";title="Stores for This User" Content-Type: application/hal+json ETag: W/"83f156d3620c91bdfc232e2c4b3d451a3ded880d" Content-Length: 724
{ "_links":{ "self":{ "href":"https:\/\/api-sandbox.foxycart.com\/users\/9438", "title":"This User" }, "https:\/\/api.foxycart.com\/rels\/attributes":{ "href":"https:\/\/api-sandbox.foxycart.com\/users\/9438\/attributes", "title":"Attributes for This User" }, "https:\/\/api.foxycart.com\/rels\/stores":{ "href":"https:\/\/api-sandbox.foxycart.com\/users\/9438\/stores", "title":"Stores for This User" } }, "message":"user 9438 created successfully.", "token":{ "access_token":"2e9c461879d7eba3351ebcf2421fc82a", "expires_in":3600, "token_type":"bearer", "scope":"user_full_access", "refresh_token":"1cc0b1b80ba5bc099a8bfd5710aecf91" } }
HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 [3] => Authorization: Bearer bce87c9630ba15829506281fa121c80b ) curl -X GET -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" -H "Authorization: Bearer bce87c9630ba15829506281fa121c80b" https://api-sandbox.foxycart.com/users/9438
HTTP/1.1 200 OK Date: Thu, 01 Nov 2012 15:42:49 GMT Connection: close cache-control: private, must-revalidate link: <https://api-sandbox.foxycart.com/users/9438>;rel="self";title="This User" link: <https://api-sandbox.foxycart.com/users/9438/attributes>;rel="https://api.foxycart.com/rels/attributes";title="Attributes for This User" link: <https://api-sandbox.foxycart.com/users/9438/stores>;rel="https://api.foxycart.com/rels/stores";title="Stores for This User" Content-Type: application/hal+json last-modified: Thu, 01 Nov 2012 08:42:49 -0700 ETag: W/"5b814fc260e4403ef0329a6eca6bd54096f53933" Content-Length: 764
{ "_links":{ "self":{ "href":"https:\/\/api-sandbox.foxycart.com\/users\/9438", "title":"This User" }, "https:\/\/api.foxycart.com\/rels\/attributes":{ "href":"https:\/\/api-sandbox.foxycart.com\/users\/9438\/attributes", "title":"Attributes for This User" }, "https:\/\/api.foxycart.com\/rels\/stores":{ "href":"https:\/\/api-sandbox.foxycart.com\/users\/9438\/stores", "title":"Stores for This User" } }, "first_name":"foo", "last_name":"bar", "email":"example_38204456@example.com", "phone":null, "affiliate_id":0, "is_developer":null, "is_designer":null, "is_merchant":null, "is_active":0, "date_created":"2012-11-01T08:42:49-0700", "date_modified":"2012-11-01T08:42:49-0700" }
HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 [3] => Authorization: Bearer 2e9c461879d7eba3351ebcf2421fc82a ) curl -X POST -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" -H "Authorization: Bearer 2e9c461879d7eba3351ebcf2421fc82a" https://api-sandbox.foxycart.com/users/9438/stores
HTTP/1.1 400 Bad Request Date: Thu, 01 Nov 2012 15:42:49 GMT Connection: close cache-control: private, must-revalidate Content-Type: application/vnd.foxycart.com.error+json ETag: W/"073f5c92846013f3a36b95fa73225acc1500fe8b" Content-Length: 690
{ "error":"request_data_invalid", "message":"store_name can't be blank, store_name is too short (minimum is 1 characters), store_domain can't be blank, store_domain is invalid, store_domain is invalid, store_url can't be blank, store_url is too short (minimum is 1 characters), store_url is invalid, store_email can't be blank, store_email is too short (minimum is 1 characters), store_email is not a valid email address or does not contain a list of valid email addresses., store_postal_code can't be blank, store_country can't be blank, store_country is the wrong length (should be 2 characters), store_country is invalid. Please see \/resources\/store_countries for valid entries." }
DATA: {"store_name":"foo","store_domain":"foo520202381bar","store_url":"http:\/\/example.com","store_email":"example@example.com","store_postal_code":"92646","store_country":"US"} HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 [3] => Authorization: Bearer 2e9c461879d7eba3351ebcf2421fc82a ) curl -X POST -d "{^"store_name^":^"foo^",^"store_domain^":^"foo520202381bar^",^"store_url^":^"http:\/\/example.com^",^"store_email^":^"example@example.com^",^"store_postal_code^":^"92646^",^"store_country^":^"US^"}" -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" -H "Authorization: Bearer 2e9c461879d7eba3351ebcf2421fc82a" https://api-sandbox.foxycart.com/users/9438/stores
HTTP/1.1 400 Bad Request Date: Thu, 01 Nov 2012 15:42:49 GMT Connection: close cache-control: private, must-revalidate Content-Type: application/vnd.foxycart.com.error+json ETag: W/"b447c940b7087acfa73b776cf7ff05592faa1b40" Content-Length: 152
{ "error":"request_data_invalid", "message":"store_state is invalid. Please see \/resources\/store_countries\/US\/store_states for valid entries." }
DATA: {"store_name":"foo","store_domain":"foo957003041bar","store_url":"http:\/\/example.com","store_email":"example@example.com","store_postal_code":"92646","store_country":"US","store_state":"CA"} HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 [3] => Authorization: Bearer 2e9c461879d7eba3351ebcf2421fc82a ) curl -X POST -d "{^"store_name^":^"foo^",^"store_domain^":^"foo957003041bar^",^"store_url^":^"http:\/\/example.com^",^"store_email^":^"example@example.com^",^"store_postal_code^":^"92646^",^"store_country^":^"US^",^"store_state^":^"CA^"}" -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" -H "Authorization: Bearer 2e9c461879d7eba3351ebcf2421fc82a" https://api-sandbox.foxycart.com/users/9438/stores
HTTP/1.1 201 Created Date: Thu, 01 Nov 2012 15:42:49 GMT Connection: close cache-control: private, must-revalidate location: https://api-sandbox.foxycart.com/stores/10710 link: <https://api-sandbox.foxycart.com/stores/10710>;rel="self";title="This Store" link: <https://api-sandbox.foxycart.com/stores/10710/attributes>;rel="https://api.foxycart.com/rels/attributes";title="Attributes for This Store" link: <https://api-sandbox.foxycart.com/resources/store_versions/22>;rel="https://api.foxycart.com/rels/store_version";title="This store version" link: <https://api-sandbox.foxycart.com/stores/10710/users>;rel="https://api.foxycart.com/rels/users";title="Users for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/user_accesses>;rel="https://api.foxycart.com/rels/user_accesses";title="User Access for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/customers>;rel="https://api.foxycart.com/rels/customers";title="Customers for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/carts>;rel="https://api.foxycart.com/rels/carts";title="Carts for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/transactions>;rel="https://api.foxycart.com/rels/transactions";title="Transactions for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/subscriptions>;rel="https://api.foxycart.com/rels/subscriptions";title="Subscriptions for This Store" link: <https://api-sandbox.foxycart.com/store_subscription_settings/10710>;rel="https://api.foxycart.com/rels/subscription_settings";title="Subscription Settings for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/product_categories>;rel="https://api.foxycart.com/rels/product_categories";title="Product Categories for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/taxes>;rel="https://api.foxycart.com/rels/taxes";title="Taxes for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/payment_method_sets>;rel="https://api.foxycart.com/rels/payment_method_sets";title="Payment Method Sets for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/coupons>;rel="https://api.foxycart.com/rels/coupons";title="Coupons for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/template_sets>;rel="https://api.foxycart.com/rels/template_sets";title="Template Sets for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/cart_templates>;rel="https://api.foxycart.com/rels/cart_templates";title="Cart Templates for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/cart_include_templates>;rel="https://api.foxycart.com/rels/cart_include_templates";title="Cart Include Templates for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/checkout_templates>;rel="https://api.foxycart.com/rels/checkout_templates";title="Checkout Templates for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/receipt_templates>;rel="https://api.foxycart.com/rels/receipt_templates";title="Receipt Templates for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/email_templates>;rel="https://api.foxycart.com/rels/email_templates";title="Email Templates for This Store" Content-Type: application/hal+json ETag: W/"7699da53d9226581b52dc6c527bb48cd91599924" Content-Length: 3964
{ "_links":{ "self":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710", "title":"This Store" }, "https:\/\/api.foxycart.com\/rels\/attributes":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/attributes", "title":"Attributes for This Store" }, "https:\/\/api.foxycart.com\/rels\/store_version":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/store_versions\/22", "title":"This store version" }, "https:\/\/api.foxycart.com\/rels\/users":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/users", "title":"Users for This Store" }, "https:\/\/api.foxycart.com\/rels\/user_accesses":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/user_accesses", "title":"User Access for This Store" }, "https:\/\/api.foxycart.com\/rels\/customers":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/customers", "title":"Customers for This Store" }, "https:\/\/api.foxycart.com\/rels\/carts":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/carts", "title":"Carts for This Store" }, "https:\/\/api.foxycart.com\/rels\/transactions":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/transactions", "title":"Transactions for This Store" }, "https:\/\/api.foxycart.com\/rels\/subscriptions":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/subscriptions", "title":"Subscriptions for This Store" }, "https:\/\/api.foxycart.com\/rels\/subscription_settings":{ "href":"https:\/\/api-sandbox.foxycart.com\/store_subscription_settings\/10710", "title":"Subscription Settings for This Store" }, "https:\/\/api.foxycart.com\/rels\/product_categories":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/product_categories", "title":"Product Categories for This Store" }, "https:\/\/api.foxycart.com\/rels\/taxes":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/taxes", "title":"Taxes for This Store" }, "https:\/\/api.foxycart.com\/rels\/payment_method_sets":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/payment_method_sets", "title":"Payment Method Sets for This Store" }, "https:\/\/api.foxycart.com\/rels\/coupons":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/coupons", "title":"Coupons for This Store" }, "https:\/\/api.foxycart.com\/rels\/template_sets":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/template_sets", "title":"Template Sets for This Store" }, "https:\/\/api.foxycart.com\/rels\/cart_templates":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/cart_templates", "title":"Cart Templates for This Store" }, "https:\/\/api.foxycart.com\/rels\/cart_include_templates":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/cart_include_templates", "title":"Cart Include Templates for This Store" }, "https:\/\/api.foxycart.com\/rels\/checkout_templates":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/checkout_templates", "title":"Checkout Templates for This Store" }, "https:\/\/api.foxycart.com\/rels\/receipt_templates":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/receipt_templates", "title":"Receipt Templates for This Store" }, "https:\/\/api.foxycart.com\/rels\/email_templates":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/email_templates", "title":"Email Templates for This Store" } }, "message":"store 10710 created successfully.", "token":{ "access_token":"de23196a9d7f1fa0b97b621535223b8b", "expires_in":3600, "token_type":"bearer", "scope":"store_id_10710 full_access", "refresh_token":"2b126548fd23fdb7e973b3304addab36" } }
HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 [3] => Authorization: Bearer de23196a9d7f1fa0b97b621535223b8b ) curl -X GET -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" -H "Authorization: Bearer de23196a9d7f1fa0b97b621535223b8b" https://api-sandbox.foxycart.com/stores/10710
HTTP/1.1 200 OK Date: Thu, 01 Nov 2012 15:42:49 GMT Connection: close cache-control: private, must-revalidate link: <https://api-sandbox.foxycart.com/stores/10710>;rel="self";title="This Store" link: <https://api-sandbox.foxycart.com/stores/10710/attributes>;rel="https://api.foxycart.com/rels/attributes";title="Attributes for This Store" link: <https://api-sandbox.foxycart.com/resources/store_versions/22>;rel="https://api.foxycart.com/rels/store_version";title="This store version" link: <https://api-sandbox.foxycart.com/stores/10710/users>;rel="https://api.foxycart.com/rels/users";title="Users for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/user_accesses>;rel="https://api.foxycart.com/rels/user_accesses";title="User Access for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/customers>;rel="https://api.foxycart.com/rels/customers";title="Customers for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/carts>;rel="https://api.foxycart.com/rels/carts";title="Carts for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/transactions>;rel="https://api.foxycart.com/rels/transactions";title="Transactions for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/subscriptions>;rel="https://api.foxycart.com/rels/subscriptions";title="Subscriptions for This Store" link: <https://api-sandbox.foxycart.com/store_subscription_settings/10710>;rel="https://api.foxycart.com/rels/subscription_settings";title="Subscription Settings for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/product_categories>;rel="https://api.foxycart.com/rels/product_categories";title="Product Categories for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/taxes>;rel="https://api.foxycart.com/rels/taxes";title="Taxes for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/payment_method_sets>;rel="https://api.foxycart.com/rels/payment_method_sets";title="Payment Method Sets for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/coupons>;rel="https://api.foxycart.com/rels/coupons";title="Coupons for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/template_sets>;rel="https://api.foxycart.com/rels/template_sets";title="Template Sets for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/cart_templates>;rel="https://api.foxycart.com/rels/cart_templates";title="Cart Templates for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/cart_include_templates>;rel="https://api.foxycart.com/rels/cart_include_templates";title="Cart Include Templates for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/checkout_templates>;rel="https://api.foxycart.com/rels/checkout_templates";title="Checkout Templates for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/receipt_templates>;rel="https://api.foxycart.com/rels/receipt_templates";title="Receipt Templates for This Store" link: <https://api-sandbox.foxycart.com/stores/10710/email_templates>;rel="https://api.foxycart.com/rels/email_templates";title="Email Templates for This Store" Content-Type: application/hal+json last-modified: Thu, 01 Nov 2012 08:42:49 -0700 ETag: W/"63f531fdac6cc1d78f73b88f9b7ae14215bc1ef2" Content-Length: 4917
{ "_links":{ "self":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710", "title":"This Store" }, "https:\/\/api.foxycart.com\/rels\/attributes":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/attributes", "title":"Attributes for This Store" }, "https:\/\/api.foxycart.com\/rels\/store_version":{ "href":"https:\/\/api-sandbox.foxycart.com\/resources\/store_versions\/22", "title":"This store version" }, "https:\/\/api.foxycart.com\/rels\/users":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/users", "title":"Users for This Store" }, "https:\/\/api.foxycart.com\/rels\/user_accesses":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/user_accesses", "title":"User Access for This Store" }, "https:\/\/api.foxycart.com\/rels\/customers":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/customers", "title":"Customers for This Store" }, "https:\/\/api.foxycart.com\/rels\/carts":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/carts", "title":"Carts for This Store" }, "https:\/\/api.foxycart.com\/rels\/transactions":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/transactions", "title":"Transactions for This Store" }, "https:\/\/api.foxycart.com\/rels\/subscriptions":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/subscriptions", "title":"Subscriptions for This Store" }, "https:\/\/api.foxycart.com\/rels\/subscription_settings":{ "href":"https:\/\/api-sandbox.foxycart.com\/store_subscription_settings\/10710", "title":"Subscription Settings for This Store" }, "https:\/\/api.foxycart.com\/rels\/product_categories":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/product_categories", "title":"Product Categories for This Store" }, "https:\/\/api.foxycart.com\/rels\/taxes":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/taxes", "title":"Taxes for This Store" }, "https:\/\/api.foxycart.com\/rels\/payment_method_sets":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/payment_method_sets", "title":"Payment Method Sets for This Store" }, "https:\/\/api.foxycart.com\/rels\/coupons":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/coupons", "title":"Coupons for This Store" }, "https:\/\/api.foxycart.com\/rels\/template_sets":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/template_sets", "title":"Template Sets for This Store" }, "https:\/\/api.foxycart.com\/rels\/cart_templates":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/cart_templates", "title":"Cart Templates for This Store" }, "https:\/\/api.foxycart.com\/rels\/cart_include_templates":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/cart_include_templates", "title":"Cart Include Templates for This Store" }, "https:\/\/api.foxycart.com\/rels\/checkout_templates":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/checkout_templates", "title":"Checkout Templates for This Store" }, "https:\/\/api.foxycart.com\/rels\/receipt_templates":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/receipt_templates", "title":"Receipt Templates for This Store" }, "https:\/\/api.foxycart.com\/rels\/email_templates":{ "href":"https:\/\/api-sandbox.foxycart.com\/stores\/10710\/email_templates", "title":"Email Templates for This Store" } }, "store_version_uri":"https:\/\/api-sandbox.foxycart.com\/resources\/store_versions\/22", "store_name":"foo", "store_domain":"foo957003041bar", "use_remote_domain":0, "store_url":"http:\/\/example.com\/", "receipt_continue_url":null, "store_email":"example@example.com", "from_email":null, "store_postal_code":"92646", "store_state":"CA", "store_country":"US", "locale_code":"en_US", "hide_currency_symbol":0, "hide_decimal_characters":0, "use_international_currency_symbol":0, "language":"english.inc.php", "logo_url":null, "checkout_type":"default_account", "bcc_on_receipt_email":1, "use_data_feed":0, "data_feed_url":null, "data_feed_key":null, "use_cart_validation":0, "use_shared_authentication":0, "shared_authentication_url":null, "use_email_dns":0, "customer_password_hash_type":"phpass", "customer_password_hash_config":"8", "features_multiship":0, "shipping_address_type":"residential", "timezone":"America\/Los_Angeles", "unified_order_entry_password":null, "affiliate_id":0, "minfraud_score_threshold":0, "is_active":0, "first_payment_date":null, "date_created":"2012-11-01T08:42:49-0700", "date_modified":"2012-11-01T08:42:49-0700" }
HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 [3] => Authorization: Bearer 2e9c461879d7eba3351ebcf2421fc82a ) curl -X POST -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" -H "Authorization: Bearer 2e9c461879d7eba3351ebcf2421fc82a" https://api-sandbox.foxycart.com/users/9438/attributes
HTTP/1.1 400 Bad Request Date: Thu, 01 Nov 2012 15:42:49 GMT Connection: close cache-control: private, must-revalidate Content-Type: application/vnd.foxycart.com.error+json ETag: W/"53d69fd7dee2c4c42a3fcfc5af32d3458ed3f332" Content-Length: 184
{ "error":"request_data_invalid", "message":"name can't be blank, name is too short (minimum is 1 characters), value can't be blank, value is too short (minimum is 1 characters)" }
DATA: {"name":"name=test_attribute_17635751","value":"awesome"} HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 [3] => Authorization: Bearer 2e9c461879d7eba3351ebcf2421fc82a ) curl -X POST -d "{^"name^":^"name=test_attribute_17635751^",^"value^":^"awesome^"}" -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" -H "Authorization: Bearer 2e9c461879d7eba3351ebcf2421fc82a" https://api-sandbox.foxycart.com/users/9438/attributes
HTTP/1.1 201 Created Date: Thu, 01 Nov 2012 15:42:49 GMT Connection: close cache-control: private, must-revalidate location: https://api-sandbox.foxycart.com/user_attributes/10046 link: <https://api-sandbox.foxycart.com/user_attributes/10046>;rel="self";title="This user attribute" link: <https://api-sandbox.foxycart.com/users/9438>;rel="https://api.foxycart.com/rels/user";title="This User" Content-Type: application/hal+json ETag: W/"8f5d0a367d7571fea1c7045508e15fd2e530b19c" Content-Length: 345
{ "_links":{ "self":{ "href":"https:\/\/api-sandbox.foxycart.com\/user_attributes\/10046", "title":"This user attribute" }, "https:\/\/api.foxycart.com\/rels\/user":{ "href":"https:\/\/api-sandbox.foxycart.com\/users\/9438", "title":"This User" } }, "message":"attribute 10046 created successfully." }
HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 [3] => Authorization: Bearer 2e9c461879d7eba3351ebcf2421fc82a ) curl -X GET -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" -H "Authorization: Bearer 2e9c461879d7eba3351ebcf2421fc82a" https://api-sandbox.foxycart.com/user_attributes/10046
HTTP/1.1 200 OK Date: Thu, 01 Nov 2012 15:42:49 GMT Connection: close cache-control: private, must-revalidate link: <https://api-sandbox.foxycart.com/user_attributes/10046>;rel="self";title="This user attribute" link: <https://api-sandbox.foxycart.com/users/9438>;rel="https://api.foxycart.com/rels/user";title="This User" Content-Type: application/hal+json last-modified: Thu, 01 Nov 2012 08:42:49 -0700 ETag: W/"652188ae4f6b642a1531f555d9644de15938d9ae" Content-Length: 471
{ "_links":{ "self":{ "href":"https:\/\/api-sandbox.foxycart.com\/user_attributes\/10046", "title":"This user attribute" }, "https:\/\/api.foxycart.com\/rels\/user":{ "href":"https:\/\/api-sandbox.foxycart.com\/users\/9438", "title":"This User" } }, "visibility":"private", "name":"name=test_attribute_17635751", "value":"awesome", "date_created":"2012-11-01T08:42:49-0700", "date_modified":"2012-11-01T08:42:49-0700" }
DATA: {"value":"awesomer"} HEADERS: Array ( [0] => Accept: application/hal+json [1] => Content-Type: application/json [2] => FOXYCART-API-VERSION: 1 [3] => Authorization: Bearer 2e9c461879d7eba3351ebcf2421fc82a ) curl -X PATCH -d "{^"value^":^"awesomer^"}" -H "Accept: application/hal+json" -H "Content-Type: application/json" -H "FOXYCART-API-VERSION: 1" -H "Authorization: Bearer 2e9c461879d7eba3351ebcf2421fc82a" https://api-sandbox.foxycart.com/user_attributes/10046
HTTP/1.1 200 OK Date: Thu, 01 Nov 2012 15:42:50 GMT Connection: close cache-control: private, must-revalidate link: <https://api-sandbox.foxycart.com/user_attributes/10046>;rel="self";title="This user attribute" link: <https://api-sandbox.foxycart.com/users/9438>;rel="https://api.foxycart.com/rels/user";title="This User" Content-Type: application/hal+json last-modified: Thu, 01 Nov 2012 08:42:50 -0700 ETag: W/"5efb2d10ee83c3e36b5ee39b4e1d756ebcc3b0b1" Content-Length: 472
{ "_links":{ "self":{ "href":"https:\/\/api-sandbox.foxycart.com\/user_attributes\/10046", "title":"This user attribute" }, "https:\/\/api.foxycart.com\/rels\/user":{ "href":"https:\/\/api-sandbox.foxycart.com\/users\/9438", "title":"This User" } }, "visibility":"private", "name":"name=test_attribute_17635751", "value":"awesomer", "date_created":"2012-11-01T08:42:49-0700", "date_modified":"2012-11-01T08:42:50-0700" }