List Integrations

Request

To get a list of integrations for your store, make the following request:

GET https://spreeecommerce.com/api/stores/YOUR_STORE_ID/integrations

Response

Status: 200 OK
[
  {
    "id": "5279322c84a816b42e000010",
    "name": "dotcom",
    "display": "Dotcom Distribution",
    "description": "Order fulfillment and tracking using Dotcom Distribution",
    "help": "https://spreeecommerce.com/integration/dotcom_integration.html",
    "url": "http://ep-rlm.spree.fm",
    "category": "distribution",
    "services": [
      {
        "name": "send_shipment",
        "path": "/send_shipment",
        "description": "Send shipment details to Dotcom on completion",
        "requires": {
          "parameters": [
            {
              "name": "api_key",
              "description": "Dotcom Distribution API key",
              "data_type": "string"
            },
            {
              "name": "password",
              "description": "Dotcom Distribution password",
              "data_type": "string"
            },
            {
              "name": "shipping_lookup",
              "description": "Spree to Dotcom Distribution mapping",
              "data_type": "list"
            }
          ]
        },
        "recommends": {
          "messages": [
            "shipment=>ready"
          ]
        },
        "produces": {
        }
      }
    ],
    "error_messages": [
    ],
    "icon_url": "dotcom.png",
    "store_id": null
  }
]

Create An Integration

Request

To create a new integration through the API, make the following request:

POST https://spreeecommerce.com/api/stores/YOUR_STORE_ID/integrations

Here is an example of the parameters you are required to send along with this request in order to create a new integration:

{
  "integration": {
    "name": "custom_endpoint",
    "url": "http://custom-endpoint.com",
    "category": "custom"
  }
}

or you can pass the parameters through in the URL string as follows:

POST https://spreeecommerce.com/api/stores/YOUR_STORE_ID/integrations?
     integration[name]=custom_endpoint&integration[category]=custom&
     integration[url]=http://custom-endpoint.com

While the category is required, it can be set to anything you want. This is only used for your reference.

Response

Status: 201 Created
{
  "id": "527a68b384a816fb91000001",
  "name": "custom_endpoint",
  "display": null,
  "description": null,
  "help": null,
  "url": "http://custom-endpoint.com",
  "category": "custom",
  "error_messages": null,
  "icon_url": null,
  "store_id": "YOUR_STORE_ID"
}
x Spree Conf NYC 2014

Want to learn more about Spree?

Early Bird is 50% Off (Ends 12/31)

Learn More