native_integrations

Description

This link relationship returns a collection of resources. You can easily paginate through this collection using the hypermedia links provided and the link relationships of first, prev, next, and last. Scroll down to view a representation of a single resource embedded within this collection.

Interact with this resource

To interact with this resource and see it in the context of the API, you can utilise Postman or your Terminal/Console to perform requests. If you have a Foxy store, you can also use the API browser in the admin to interact with resources connected to your store.

Actions

GET
View a list of native_integrations
POST
Create a new native_integration
HEAD
Get just the header response
OPTIONS
Get a response explaining which HTTP methods are supported

Example Representation

{
  "_links": {
    "curies": [
      {
        "name": "fx",
        "href": "https://api.foxycart.com/rels/{rel}",
        "templated": true
      }
    ],
    "self": {
      "href": "...",
      "title": "This Collection"
    },
    "first": {
      "href": "...?offset=0",
      "title": "First Page of this Collection"
    },
    "prev": {
      "href": "...?offset=0",
      "title": "Previous Page of this Collection"
    },
    "next": {
      "href": "...?offset=0",
      "title": "Next Page of this Collection"
    },
    "last": {
      "href": "...?offset=0",
      "title": "Last Page of this Collection"
    }
  },
  "_embedded": {
    "fx:native_integrations": [...]
  },
  "total_items": "5",
  "returned_items": 5,
  "limit": 20,
  "offset": 0
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="...">
  <link rel="self" href="..." title="This Collection"/>
  <link rel="first" href="...?offset=0" title="First Page of this Collection"/>
  <link rel="prev" href="...?offset=0" title="Previous Page of this Collection"/>
  <link rel="next" href="...?offset=0" title="Next Page of this Collection"/>
  <link rel="last" href="...?offset=0" title="Last Page of this Collection"/>
  <resource href="..." rel="https://api.foxycart.com/rels/native_integration">
  ...
  </resource>
  <total_items>5</total_items>
  <returned_items>5</returned_items>
  <limit>20</limit>
  <offset>0</offset>
</resource>
{
    "properties": {
        "total_items": "5",
        "returned_items": 5,
        "limit": 20,
        "offset": 0
    },
    "entities": [...],
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "..."
        },
        {
            "rel": [
                "first"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "prev"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "next"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "last"
            ],
            "href": "...?offset=0"
        }
    ],
    "actions": [
    ]
}

Embedded Resource: native_integration

Description

A native integration represents a third party system natively integrated with Foxy which requires configuration settings and credentials.

Currently supported native integrations:

  • Avalara
    The config for Avalara should be a JSON string which includes the following values:
    • service_url: Your Avalara Service URL. If in test mode, it should be https://development.avalara.net. If in production, it should be https://avatax.avalara.net unless a different service_url has been provided to you by Avalara.
    • id: Your Avalara Account Number. Be sure to use either a development or production value based on service_url.
    • key: Your Avalara Licsense Key. Be sure to use either a development or production value based on service_url.
    • company_code: The Company Code configured in your Avalara Account. Be sure to use either a development or production value based on service_url.
    • use_ava_tax: (Boolean) true or false to use Avalara for live tax rates.
    • enable_colorado_delivery_fee: (Boolean) true or false to enable or disable the Colorado Delivery Fee
    • create_invoice: (Boolean) true or false. When using automatic tax calculations, after each completed transaction, if you'd like to commit those details to Avalara as a Committed Sales Invoice, check this box.
    • use_address_validation: (Boolean) true or false. Validate customer addresses prior to completing the transaction which ensures you get more accurate tax and shipping rate calculations.
    • address_validation_countries: An array of country codes. Currently supports US and CA only.
    • category_to_product_tax_code_mappings: An associative array (aka hash, object) of Foxy category codes to AvaTax tax codes (which typically look something like PS081258). If left empty, the category code will be sent to AvaTax instead.
  • TaxJar
    The config for TaxJar should be a JSON string which includes the following values:
    • api_token: Enter your SmartCalcs API Token obtained from TaxJar.
    • category_to_product_tax_code_mappings: (JSON) For each category in your store, you can set up a mapping to TaxJar's product tax codes to ensure the proper values are sent to TaxJar for the products in the categories you configure here.
    • create_invoice: (Boolean) true or false. When using automatic tax calculations, after each completed transaction, if you'd like to commit those details to Avalara as a Committed Sales Invoice, check this box.
  • ONESOURCE
    The config for ONESOURCE should be a JSON string which includes the following values:
    • service_url: Please enter the ONESOURCE service URL you want to connect to.
    • external_company_id: A required external company ID mapping to the Determination company owning the audit data.
    • calling_system_number: A unique identifier for your ERP system. The combination of Calling System Number, Host System, and Unique Invoice Number form a unique key for an invoice in the Audit Database.
    • from_city: This city should match the postal code and country you have configured in your settings.
    • host_system: A unique name for your ERP system. The combination of Calling System Number, Host System, and Unique Invoice Number form a unique key for an invoice in the Audit Database.
    • company_role: The role the company plays in a given transaction: Buyer (B), Middleman (M), or Seller (S). Each role results in different transaction tax and reporting requirements.
    • part_number_product_option: If you use a custom product option name to specify your part number such as sku or isbn, enter that name here here. You can also set it to code to use the standard product code attribute.
    • product_order_priority: The PRODUCT_CODE field in ONESOURCE is populated via the FoxyCart category code. The first shippable product will have the RELATED_LINE_NUMBER associated with it. To control which product is listed first, add a comma-separated list of FoxyCart category codes here based on the order priority you'd like. For example, if you put test5, test1, test0 here, and all of those product category codes represent shippable items, then test5 will be listed before test1 or test0 and will have the RELATED_LINE_NUMBER shipping line applied to it.
    • audit_settings: When completing a transaction, use this setting to determine if the information sent to Onesource will be audited and reported. Valid values include capture_only, auth_and_capture, and never.
  • Webhook
    The config for Webhooks should be a JSON string which includes the following values:
    • service: (String) Can be either json, legacy_xml, webflow or zapier
      json
      • title: (String) A descriptive title to give this webhook to identify it.
      • encryption_key: (String) This value is used as they key to encrypt the and verify the payload sent for the webhook.
      • url: (String) The absolute URL (beginning with https:// or http://) that this webhook should be sent to.
      • events: (Array) A list of of the events that this webhook is subscribed to (currently transaction/created and subscription/cancelled).
      • version: (Integer) The version of the webhook, currently 1.
      legacy_xml
      • title: (String) A descriptive title to give this webhook to identify it.
      • url: (String) The absolute URL (beginning with https:// or http://) that this webhook should be sent to.
      • events: (Array) A list of of the events that this webhook is subscribed to (currently only transaction/created).
      • version: (Integer) The version of the webhook, currently 1.
      webflow
      • site_id: (String) The Site ID of your Webflow site
      • site_name: (String) The name of your Webflow site.
      • collection_id: (String) The ID of the collection that products are stored in.
      • collection_name: (String) The name of your products collection.
      • sku_field_id: (String) The ID of the code field in your products collection.
      • sku_field_name: (String) The name of the code field in your products collection
      • inventory_field_id: (String) The ID of the inventory field in your products collection.
      • inventory_field_name: (String) The name of the inventory field in your products collection.
      • auth: (String) The OAuth Auth Bearer token for your Webflow site.
      • events: (Array) A list of of the events that this webhook is subscribed to (currently only transaction/created).
      • version: (Integer) The version of the webhook, currently 1.
      zapier (read only)
      Note: Zapier service types are read only and can not be created or modified through the API. Zapier webhooks need to be created from zapier.com
      • event: (String) The event this Zapier zap is subscribed to.
      • url: (String) The Zapier webhook subscription URL.

Interact with this resource

To interact with this resource and see it in the context of the API, you can utilise Postman or your Terminal/Console to perform requests. If you have a Foxy store, you can also use the API browser in the admin to interact with resources connected to your store.

Actions

GET
View a native_integration
PATCH
Update a native_integration (send only the properties you want to modify)
PUT
Replace a native_integration (send the entire representation)
DELETE
Delete a native_integration
HEAD
Get just the header response
OPTIONS
Get a response explaining which HTTP methods are supported

Properties

Property Description Type Constraints
provider The identifier string of this provider. String Required. avalara, taxjar, onesource, webhook
config A JSON string containing the configuration values and credentials for this native integration. JSON Required. 1000 characters or less.
date_created The date this resource was created. Date Read only
date_modified The date this resource was last modified. Date Read only

Example Representation

{
    {
        "_links": {
            "curies": [
                {
                    "name": "fx",
                    "href": "https://api.foxycart.com/rels/{rel}",
                    "templated": true
                }
            ],
            "self": {
                "href": "https://api.foxycart.com/native_integrations/5",
                "title": "This Native Integration"
            },
            "fx:store": {
                "href": "https://api.foxycart.com/stores/66",
                "title": "This Store"
            }
        },
        "provider": "webhook",
        "config": "{\"service\":\"json\",\"encryption_key\":\"1T6478TKJ9S5BHB73K0NTGDZ824X3HZ2\",\"title\":\"My JSON Webhook\",\"version\":1,\"url\":\"https:\\/\\/www.example.com\\/webhook.php\",\"events\":[\"transaction\\/created\"]}",
        "date_created": "2018-01-01T04:30:53-0700",
        "date_modified": "2018-01-01T04:30:53-0700"
    },
    "_links": {
        "curies": [
            {
                "name": "fx",
                "href": "https://api.foxycart.com/rels/{rel}",
                "templated": true
            }
        ],
        "self": {
            "href": "https://api.foxycart.com/native_integrations/4",
            "title": "This Native Integration"
        },
        "fx:store": {
            "href": "https://api.foxycart.com/stores/66",
            "title": "This Store"
        },
        "fx:taxes": {
            "href": "https://api.foxycart.com/stores/66/taxes?service_provider=avalara",
            "title": "Taxes using this Native Integration as the service provider"
        }
    },
    "provider": "avalara",
    "config": "{\"service_url\":\"https://development.avalara.net/\",\"id\":\"12345678\",\"key\":\"ASDFJASDFKJASDFKJ\",\"company_code\":\"CompanyCode\",\"use_ava_tax\":true,\"create_invoice\":true,\"use_address_validation\":false,\"address_validation_countries\":[],\"category_to_product_tax_code_mappings\":{\"1005\":\"PS081258\",\"955\":\"qweasz2\",\"956\":\"\",\"2425\":\"\"}}",
    "date_created": "2016-03-24T11:02:40-0700",
    "date_modified": "2016-03-31T12:15:41-0700"
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="https://api.foxycart.com/native_integrations/4" rel="https://api.foxycart.com/rels/native_integration">
  <link rel="self" href="https://api.foxycart.com/native_integrations/4" title="This Native Integration"/>
  <link rel="https://api.foxycart.com/rels/store" href="https://api.foxycart.com/stores/66" title="This Store"/>
  <link rel="https://api.foxycart.com/rels/taxes" href="https://api.foxycart.com/stores/66/taxes?service_provider=avalara" title="Taxes using this Native Integration as the service provider"/>
  <provider>avalara</provider>
  <config>{&amp;quot;service_url&amp;quot;:&amp;quot;https:\/\/development.avalara.net&amp;quot;,&amp;quot;id&amp;quot;:&amp;quot;12345678&amp;quot;,&amp;quot;key&amp;quot;:&amp;quot;ASDFJASDFKJASDFKJ&amp;quot;,&amp;quot;company_code&amp;quot;:&amp;quot;CompanyCode&amp;quot;,&amp;quot;use_ava_tax&amp;quot;:true,&amp;quot;create_invoice&amp;quot;:true,&amp;quot;use_address_validation&amp;quot;:true,&amp;quot;address_validation_countries&amp;quot;:[&amp;quot;US&amp;quot;,&amp;quot;CA&amp;quot;]}</config>
  <date_created>2016-03-24T11:02:40-0700</date_created>
  <date_modified>2016-03-31T12:15:41-0700</date_modified>
</resource>
{
    "class": [
        "native_integration"
    ],
    "properties": {
        "provider": "avalara",
        "config": "{\"service_url\":\"https:\\/\\/development.avalara.net\",\"id\":\"12345678\",\"key\":\"ASDFJASDFKJASDFKJ\",\"company_code\":\"CompanyCode\",\"use_ava_tax\":true,\"create_invoice\":true,\"use_address_validation\":true,\"address_validation_countries\":[\"US\",\"CA\"]}",
        "date_created": "2016-03-24T11:02:40-0700",
        "date_modified": "2016-03-31T12:15:41-0700"
    },
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "https://api.foxycart.com/native_integrations/4"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/store"
            ],
            "href": "https://api.foxycart.com/stores/66"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/taxes"
            ],
            "href": "https://api.foxycart.com/stores/66/taxes?service_provider=avalara"
        }
    ],
    "actions": [
    ]
}

Conditional Link Relationsips

If this Native Integration is associated with other resources, a link relationship for those resources using this integration will show up. As an example, the Avalara integration will includes a taxes link relationship for all the taxes using this native integration as the service provider.

Zoomable Resources

This resource has no linked resources which can be "zoomed" in on, filtered and embedded within this resource.