E-commerce API

E-commerce Stores

Connect your E-commerce Store to Squalo to take advantage of powerful automation and personalization features and to learn more about your customers.

Steps to connect a custom made store

  1. Create a Store – Use the “Add store” method (see below). You only need to do this one (per store if you have more than 1).
  2. Add Product Categories functionality – You need to make sure that all the actions like adding a new category, changing a new category, etc. – so any changes in your store – are reflected in our app.
    This is necessary as the marketers want to create special promotions based on category information
    Do not forget to sync “hidden” categories – ie. the oness that are only visible in your admin but not on the frontend. Marketers will then use these to create special promotions, etc.
  3. Add Products functionality – here again: make sure that all changes to the products are immediately synchronized to our app so that orders, abandonded carts, etc. will show the right information.
  4. Add Product Variants functionality – if you have a product named “SuperShirt” and you have it in 3 colors and 4 sizes, then this means you will have 12 variants (also called SKUs). Example:
    • Red S
    • Red M
    • Red L
    • Red XL
    • Blue S
    • Blue M
    • Blue L
    • Blue XL
    • Green S
    • Green M
    • Green L
    • Green XL

    Name the variants only by the variant names nad DO NOT include the product name – this will be added automatically by our app.
    InventoryQuantity – it makes sense to sync the information about stock level (how many pieces of a certain variant (SKU). Marketers can then use these data to automate messages based on availability of certain products.

  5. Add Product Variant Images functionality – here you should use the Ordering parameter to choose which images go first. Lower is more important.
  6. Add Customers functionality – here again make sure that whenever a customer is changed the changes are immediately synced to our app. Marketers need these data in automations.
  7. Add Orders functionality – as before: whenever an order changes in your store sync the change to our app.
    Here give special attention to:

    • Phone – If possible sync the numbers in international format. ie. +390481980021. If you cannot then at least make sure that the Country is in the english language so that our app can prepend the right prefix. Note that all the spaces, parenthesis, hyphens, etc. will be automatically removed so do not expect to get back the same datum you posted.
    • Gateway – you should sync the information about which payment gateway you used. Marketers will the use this to prepare custom messages for different payment methods – ie. Cash on delivery vs. Credit card.
    • FinancialStatus – you should sync this information imediately as you have it/as it changes. Marketers can then prepare adequate notifications.
    • FulfilmentStatus – you should sync this information imediately as you have it/as it changes. Marketers can then prepare adequate notifications.
    • OrderUrl – this is also almost neccessary as the customer will want to check their statis from an email/SMS. You can put here the package tracking link but if you don’t have it put a link to the order page in your store.

    NOTE: Do not forget to add order lines

  8. Add Abandoned Checkout functionality – as before: whenever an abandoned cart is changed you need to update it immediately.
    Things that you should also absolutely keep in mind when implementing abandoned checkouts:

    1. You should create a new AbandonedCheckout immediately as the first product is added to the cart.
    2. When an AbandonedCheckout is “converted” in to a real order you must delete it from our app. This was the customer will not receive any abandoned chackout messages.

These are the guidelines in short. Of course if you require further assistance do no hesitate to contact our support and we will help you.

Available Methods

 

List stores

Get information about all stores in the account.

GET /ecommerce/stores

Query parameters

  • fields
    string[]
    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields
    string[]
    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
  • count
    integer
    The number of records to return. Default value is 10. Maximum value is 1000
  • offset
    integer
    Used for pagination, this it the number of records from a collection to skip. Default value is 0.

List stores

BASH

curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>&count=10&offset=0' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – E-commerce Stores

A collection of stores in the account.

  • stores
    object[]
    An array of objects, each representing a store.
  • total_items
    integer
    The total number of items matching the query regardless of pagination.
  • _links
    object[]
    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
    "stores": [
      {
        "id": "example_store",
        "list_id": "1a2df69511",
        "name": "John's Cat Hat Emporium",
        "platform": "string",
        "domain": "example.com",
        "is_syncing": true,
        "email_address": "John@squalomail.com",
        "currency_code": "USD",
        "money_format": "$",
        "primary_locale": "fr",
        "timezone": "Eastern",
        "phone": "404-444-4444",
        "address": {
          "address1": "675 Ponce de Leon Ave NE",
          "address2": "Suite 5000",
          "city": "Atlanta",
          "province": "Georgia",
          "province_code": "GA",
          "postal_code": "30308",
          "country": "United States",
          "country_code": "US",
          "longitude": -75.68903,
          "latitude": 45.427408
        },
        "connected_site": {
          "site_foreign_id": "a180c384d7db88b if created in-app, MC001 if created via API",
          "site_script": {
            "url": "https://chimpstatic.com/mcjs-connected/js/users/{user-hash}/{site-hash}.js",
            "fragment": "<script id=\"mcjs\">!function(c,h,i,m,p){m=c.createElement(h),p=c.getElementsByTagName(h)[0],m.async=1,m.src=i,p.parentNode.insertBefore(m,p)}(document,\"script\",\"https://chimpstatic.com/mcjs-connected/js/users/{user-hash}/{site-hash}.js\");</script>"
          }
        },
        "automations": {
          "abandoned_cart": {
            "is_supported": false,
            "id": "355a72bfc3",
            "status": "sending"
          },
          "abandoned_browse": {
            "is_supported": false,
            "id": "355a72bfc3",
            "status": "sending"
          }
        },
        "list_is_active": true,
        "created_at": "2015-07-15T19:28:00+00:00",
        "updated_at": "2015-07-15T19:28:00+00:00",
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "total_items": 0,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }
  

Error Response

An error generated by Squalo API

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
        "type": "https://www.squalomail.com/supporto/e-commerce-api/",
        "title": "Resource Not Found",
        "status": 404,
        "detail": "The requested resource could not be found.",
        "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }

Add store

Add a new store to your Squalo account.

POST /ecommerce/stores

Body Parameters

  • id REQUIRED
    string
    The unique identifier for the store.
  • list_id REQUIRED
    string
    The unique identifier for the list associated with the store. The list_id for a specific store cannot change.
  • name REQUIRED
    string
    The name of the store.
  • currency_code REQUIRED
    string
    The three-letter ISO 4217 code for the currency that the store accepts.
  • platform
    string
    The e-commerce platform of the store.
  • domain REQUIRED
    string
    The store domain. This parameter is required for Connected Sites and Google Ads
  • is_syncing
    boolean
    Whether to disable automations because the store is currently syncing.
  • email_address REQUIRED
    string
    The email address for the store.
  • primary_locale
    string
    The primary locale for the store. For example: en, de, etc.
  • timezone
    string
    The timezone for the store.
  • phone
    string
    The store phone number.
  • address
    string
    The store address.

Add store

BASH

  • curl -X POST \
      https://api.squalomail.com/mc/v3/ecommerce/stores \
      --user "anystring:${apikey}"' \
      -d '{"id":"","list_id":"","name":"","platform":"","domain":"","is_syncing":false,"email_address":"","currency_code":"","primary_locale":"","timezone":"","phone":"","address":{"address1":"","address2":"","city":"","province":"","province_code":"","postal_code":"","country":"","country_code":"","longitude":0,"latitude":0}}' -H "Content-Type: application/json"

 

Success Response

HTTP Status 200 – E-commerce Store

An individual store in an account.

  • id
    string
    The unique identifier for the store.
  • list_id
    string
    The unique identifier for the list that’s associated with the store. The list_id for a specific store can’t change.
  • name
    string
    The name of the store.
  • platform
    string
    The e-commerce platform of the store.
  • domain
    string
    The store domain. The store domain must be unique within a user account.
  • is_syncing
    boolean
    Whether to disable automations because the store is currently syncing.
  • email_address
    string
    The email address for the store.
  • currency_code
    string
    The three-letter ISO 4217 code for the currency that the store accepts.
  • primary_locale
    string
    The primary locale for the store. For example: en, de, etc.
  • timezone
    string
    The timezone for the store.
  • phone
    string
    The store phone number.
  • address
    object
    The store address.
  • connected_site
    object
    The Connected Site associated with the store.
  • automations
    object
    Details for the automations attached to this store.
  • list_is_active
    boolean
    The status of the list connected to the store, namely if it’s deleted or disabled.
  • created_at

    string
    The date and time the store was created in ISO 8601 format.

  • updated_at

    string
    The date and time the store was last updated in ISO 8601 format.

  • _links

    object[]
    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
  "id": "example_store",
  "list_id": "1a2df69511",
  "name": "John's Cat Hat Emporium",
  "platform": "string",
  "domain": "example.com",
  "is_syncing": true,
  "email_address": "John@squalomail.com",
  "currency_code": "USD",
  "primary_locale": "fr",
  "timezone": "Eastern",
  "phone": "404-444-4444",
  "address": {
  "address1": "675 Ponce de Leon Ave NE",
  "address2": "Suite 5000",
  "city": "Atlanta",
  "province": "Georgia",
  "province_code": "GA",
  "postal_code": "30308",
  "country": "United States",
  "country_code": "US",
  "longitude": -75.68903,
  "latitude": 45.427408
  },
  "connected_site": {
  "site_foreign_id": "a180c384d7db88b if created in-app, MC001 if created via API",
  "site_script": {
  "url": "https://chimpstatic.com/mcjs-connected/js/users/{user-hash}/{site-hash}.js",
  "fragment": "<script id=\"mcjs\">!function(c,h,i,m,p){m=c.createElement(h),p=c.getElementsByTagName(h)[0],m.async=1,m.src=i,p.parentNode.insertBefore(m,p)}(document,\"script\",\"https://chimpstatic.com/mcjs-connected/js/users/{user-hash}/{site-hash}.js\");</script>"
  }
  },
  "automations": {
  "abandoned_cart": {
  "is_supported": false,
  "id": "355a72bfc3",
  "status": "sending"
  },
  "abandoned_browse": {
  "is_supported": false,
  "id": "355a72bfc3",
  "status": "sending"
  }
  },
  "list_is_active": true,
  "created_at": "2015-07-15T19:28:00+00:00",
  "updated_at": "2015-07-15T19:28:00+00:00",
  "_links": [
  {
  "rel": "string",
  "href": "string",
  "method": "GET",
  "targetSchema": "string",
  "schema": "string"
  }
  ]
  }

Error Response

An error generated by Squalo API

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
      "type": "https://www.squalomail.com/supporto/e-commerce-api/",
      "title": "Resource Not Found",
      "status": 404,
      "detail": "The requested resource could not be found.",
      "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }
    

Get store info

Get information about a specific store.

GET /ecommerce/stores/{store_id}

Path Parameters

  • store_id REQUIRED
    string
    The store id.

Query Parameters

  • fields
    string[]
    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields
    string[]
    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Get store info

BASH

  • curl -X GET \
      'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>' \
      --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – E-commerce Store

An individual store in an account.

  • id
    string
    The unique identifier for the store.
  • list_id
    string
    The unique identifier for the list that’s associated with the store. The list_id for a specific store can’t change.
  • name
    string
    The name of the store.
  • platform
    string
    The e-commerce platform of the store.
  • domain
    string
    The store domain. The store domain must be unique within a user account.
  • is_syncing
    boolean
    Whether to disable automations because the store is currently syncing.
  • email_address
    string
    The email address for the store.
  • currency_code
    string
    The three-letter ISO 4217 code for the currency that the store accepts.
  • money_format
    string
    The currency format for the store. For example: $, £, etc.
  • primary_locale
    string
    The primary locale for the store. For example: en, de, etc.
  • timezone
    string
    The timezone for the store.
  • phone
    string

    The store phone number.

  • address
    object

    The store address.

  • connected_site
    object

    The Connected Site associated with the store.

  • automations
    object

    Details for the automations attached to this store.

  • list_is_active
    boolean

    The status of the list connected to the store, namely if it’s deleted or disabled.

  • created_at
    string

    The date and time the store was created in ISO 8601 format.

  • updated_at
    string

    The date and time the store was last updated in ISO 8601 format.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
  "id": "example_store",
  "list_id": "1a2df69511",
  "name": "John's Cat Hat Emporium",
  "platform": "string",
  "domain": "example.com",
  "is_syncing": true,
  "email_address": "John@squalomail.com",
  "currency_code": "USD",
  "money_format": "$",
  "primary_locale": "fr",
  "timezone": "Eastern",
  "phone": "404-444-4444",
  "address": {
  "address1": "675 Ponce de Leon Ave NE",
  "address2": "Suite 5000",
  "city": "Atlanta",
  "province": "Georgia",
  "province_code": "GA",
  "postal_code": "30308",
  "country": "United States",
  "country_code": "US",
  "longitude": -75.68903,
  "latitude": 45.427408
  },
  "connected_site": {
  "site_foreign_id": "a180c384d7db88b if created in-app, MC001 if created via API",
  "site_script": {
  "url": "https://chimpstatic.com/mcjs-connected/js/users/{user-hash}/{site-hash}.js",
  "fragment": "<script id=\"mcjs\">!function(c,h,i,m,p){m=c.createElement(h),p=c.getElementsByTagName(h)[0],m.async=1,m.src=i,p.parentNode.insertBefore(m,p)}(document,\"script\",\"https://chimpstatic.com/mcjs-connected/js/users/{user-hash}/{site-hash}.js\");</script>"
  }
  },
  "automations": {
  "abandoned_cart": {
  "is_supported": false,
  "id": "355a72bfc3",
  "status": "sending"
  },
  "abandoned_browse": {
  "is_supported": false,
  "id": "355a72bfc3",
  "status": "sending"
  }
  },
  "list_is_active": true,
  "created_at": "2015-07-15T19:28:00+00:00",
  "updated_at": "2015-07-15T19:28:00+00:00",
  "_links": [
  {
  "rel": "string",
  "href": "string",
  "method": "GET",
  "targetSchema": "string",
  "schema": "string"
  }
  ]
  }

Error Response

An error generated by the Squalo API

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
        "type": "https://www.squalomail.com/supporto/e-commerce-api/",
        "title": "Resource Not Found",
        "status": 404,
        "detail": "The requested resource could not be found.",
        "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }

Update store

Update a store.

PATCH /ecommerce/stores/{store_id}

Path Parameters

  • store_id REQUIRED
    string
    The store id.

Body Parameters

  • name REQUIRED
    string
    The name of the store.
  • list_id REQUIRED
    string
    The unique identifier for the list associated with the store. The list_id for a specific store cannot change.
  • platform
    string
    The e-commerce platform of the store.
  • domain REQUIRED
    string
    The store domain.
  • is_syncing
    boolean
    Whether to disable automations because the store is currently syncing.
  • email_address REQUIRED
    string
    The email address for the store.
  • currency_code REQUIRED
    string
    The three-letter ISO 4217 code for the currency that the store accepts.
  • primary_locale
    string
    The primary locale for the store. For example: en, de, etc.
  • timezone
    string
    The timezone for the store.
  • phone
    string
    The store phone number.
  • address
    object
    The store address.

Update store

BASH

  • curl -X PATCH \
      https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id} \
      --user "anystring:${apikey}"' \
      -d '{"name":"","list_id":"","platform":"","domain":"","is_syncing":false,"email_address":"","currency_code":"","primary_locale":"","timezone":"","phone":"","address":{"address1":"","address2":"","city":"","province":"","province_code":"","postal_code":"","country":"","country_code":"","longitude":0,"latitude":0}}' -H "Content-Type: application/json"

Success Response

HTTP Status 200 – E-commerce Store

An individual store in an account.

  • id
    string
    The unique identifier for the store.
  • list_id
    string
    The unique identifier for the list that’s associated with the store. The list_id for a specific store can’t change.
  • name
    string
    The name of the store.
  • platform
    string
    The e-commerce platform of the store.
  • domain
    string
    The store domain. The store domain must be unique within a user account.
  • is_syncing
    boolean
    Whether to disable automations because the store is currently syncing.
  • email_address
    string
    The email address for the store.
  • currency_code
    string
    The three-letter ISO 4217 code for the currency that the store accepts.
  • primary_locale
    string
    The primary locale for the store. For example: en, de, etc.
  • timezone
    string
    The timezone for the store.
  • phone
    string
    The store phone number.
  • address
    object
    The store address.
  • connected_site
    object
    The Connected Site associated with the store.
  • automations
    object
    Details for the automations attached to this store.
  • list_is_active
    boolean
    The status of the list connected to the store, namely if it’s deleted or disabled.
  • created_at
    string
    The date and time the store was created in ISO 8601 format.
  • updated_at
    string
    The date and time the store was last updated in ISO 8601 format.
  • _links
    object[]
    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
  "id": "example_store",
  "list_id": "1a2df69511",
  "name": "John's Cat Hat Emporium",
  "platform": "string",
  "domain": "example.com",
  "is_syncing": true,
  "email_address": "John@squalomail.com",
  "currency_code": "USD",
  "money_format": "$",
  "primary_locale": "fr",
  "timezone": "Eastern",
  "phone": "404-444-4444",
  "address": {
  "address1": "675 Ponce de Leon Ave NE",
  "address2": "Suite 5000",
  "city": "Atlanta",
  "province": "Georgia",
  "province_code": "GA",
  "postal_code": "30308",
  "country": "United States",
  "country_code": "US",
  "longitude": -75.68903,
  "latitude": 45.427408
  },
  "connected_site": {
  "site_foreign_id": "a180c384d7db88b if created in-app, MC001 if created via API",
  "site_script": {
  "url": "https://chimpstatic.com/mcjs-connected/js/users/{user-hash}/{site-hash}.js",
  "fragment": "<script id=\"mcjs\">!function(c,h,i,m,p){m=c.createElement(h),p=c.getElementsByTagName(h)[0],m.async=1,m.src=i,p.parentNode.insertBefore(m,p)}(document,\"script\",\"https://chimpstatic.com/mcjs-connected/js/users/{user-hash}/{site-hash}.js\");</script>"
  }
  },
  "automations": {
  "abandoned_cart": {
  "is_supported": false,
  "id": "355a72bfc3",
  "status": "sending"
  },
  "abandoned_browse": {
  "is_supported": false,
  "id": "355a72bfc3",
  "status": "sending"
  }
  },
  "list_is_active": true,
  "created_at": "2015-07-15T19:28:00+00:00",
  "updated_at": "2015-07-15T19:28:00+00:00",
  "_links": [
  {
  "rel": "string",
  "href": "string",
  "method": "GET",
  "targetSchema": "string",
  "schema": "string"
  }
  ]
  }

Error Response

An error generated by the Squalo API

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
      "type": "https://www.squalomail.com/supporto/e-commerce-api/",
      "title": "Resource Not Found",
      "status": 404,
      "detail": "The requested resource could not be found.",
      "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }

Delete store

Delete a store. Deleting a store will also delete any associated subresources, including Customers, Orders, Products, and Carts.

DELETE /ecommerce/stores/{store_id}

Path Parameters

  • store_id REQUIRED
    string
    The store id.

Delete store

BASH

  • curl -X DELETE \
        https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id} \
        --user "anystring:${apikey}"'

Success Response

HTTP Status 204

Empty Response

Example response

JSON

null

Error Response

An error generated by the Squalo API

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
        "type": "https://www.squalomail.com/supporto/e-commerce-api/",
        "title": "Resource Not Found",
        "status": 404,
        "detail": "The requested resource could not be found.",
        "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }

Product Categories

Categories of E-commerce items for sale in your store need to be created as Product Categories so you can then filter based on Prodcuts from these categories. Each Product Category can have many Products and each Product can be in many Product Categories.

List Categories

Get information about a store’s product categories.

GET /ecommerce/stores/{store_id}/categories

Path Parameters

  • store_idREQUIRED
    string

    The store id.

Query Parameters

  • count
    integer

    The number of records to return. Default value is 10. Maximum value is 1000

  • offset
    integer

    Used for pagination, this it the number of records from a collection to skip. Default value is 0.

     

List Categories

BASH
curl -X GET \
                'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/categories?count=10&offset=0' \
                  --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – E-Commerce Categories

A collection of a store’s products.

  • store_id
    string

    The store id.

  • categories
    object[]

    An array of objects, each representing a store category.

    Show Properties
  • total_items
    integer

    The total number of items matching the query regardless of pagination.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
                            "store_id": "string",
                            "categories": [
                            {
                            "id": "string",
                            "handle": "cat-hat",
                            "title": "Cat Hat",
                            "products": [
                            {
                            "id": "string",
                            "title": "Cat Hat",
                            "url": "string",
                            "description": "string",
                            "type": 0,
                            "vendor": 0,
                            "image_url": "string",
                            "published_at_foreign": "string",
                            "variants": [
                            {
                            "id": "string",
                            "title": "string",
                            "url": "GET",
                            "sku": "string",
                            "price": float,
                            "inventory_quantity": integer,
                            "image_url": "string",
                            "backorders": "string",
                            "visibility": "string",
                            "created_at": DateTime,
                            "updated_at": DateTime,
                            "_links": "string",
                            }
                            ],
                            "images": [
                            {
                            "id": "string",
                            "url": "string",
                            "variant_ids": [
                            "string"
                            ],
                            "_links": [
                            {
                            "rel": "string",
                            "href": "string",
                            "method": "GET",
                            "targetSchema": "string",
                            "schema": "string"
                            }
                            ]
                            }
                            ],
                            "published_at_foreign": "2015-07-15T19:28:00+00:00",
                            "_links": [
                            {
                            "rel": "string",
                            "href": "string",
                            "method": "GET",
                            "targetSchema": "string",
                            "schema": "string"
                            }
                            ]
                            }
                            ],
                            "total_items": 0,
                            "_links": [
                            {
                            "rel": "string",
                            "href": "string",
                            "method": "GET",
                            "targetSchema": "string",
                            "schema": "string"
                            }
                            ]
                            }
                            ]
                            }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
                                    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
                                    "title": "Resource Not Found",
                                    "status": 404,
                                    "detail": "The requested resource could not be found.",
                                    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
                                    }

Get Category

Get information about a specific category of the store.

GET ecommerce/stores/{store_id}/categories/{category_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • category_idREQUIRED
    string

    The id for the category of a store.

Get category

BASH
curl -X GET \
        'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/categories/{category_id}' \
          --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – E-commerce category

Information about a specific category.

    • id
      string

      A unique identifier for the category.

    • handle
      string

      The handle of this category.

title
string

The title of this category.

  • products
    object[]

    The products associated with this category.

Example response

JSON

{
                        "id": "string",
                        "handle": "string",
                        "title": "string",
                        "products": [
                        {
                        "id": "string",
                        "title": "Cat Hat",
                        "handle": "Cat Hat",
                        "url": "string",
                        "description": "string",
                        "type": 0,
                        "vendor": 0,
                        "image_url": "string",
                        "published_at_foreign": "string",
                        "variants": [
                        {
                        "id": "string",
                        "title": "string",
                        "url": "GET",
                        "sku": "string",
                        "price": float,
                        "inventory_quantity": integer,
                        "image_url": "string",
                        "backorders": "string",
                        "visibility": "string",
                        "created_at": DateTime,
                        "updated_at": DateTime,
                        "_links": "string",
                        }
                        ],
                        "images": [
                        {
                        "id": "string",
                        "url": "string",
                        "variant_ids": [
                        "string"
                        ],
                        "_links": [
                        {
                        "rel": "string",
                        "href": "string",
                        "method": "GET",
                        "targetSchema": "string",
                        "schema": "string"
                        }
                        ]
                        }
                        ],
                        "published_at_foreign": "2015-07-15T19:28:00+00:00",
                        "_links": [
                        {
                        "rel": "string",
                        "href": "string",
                        "method": "GET",
                        "targetSchema": "string",
                        "schema": "string"
                        }
                        ]
                        }
                        ],
                        }
                        ]
                        }

Example error response

JSON

{
                            "type": "https://www.squalomail.com/supporto/e-commerce-api/",
                            "title": "Resource Not Found",
                            "status": 404,
                            "detail": "The requested resource could not be found.",
                            "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
                            }

Create Category

Create a specific category of a store.

POST ecommerce/stores/{store_id}/categories

Path Parameters

  • store_idREQUIRED
    string

    The store id.

Body Parameters

  • id
    string

    The id of a category

  • handle
    string

    The handle of a category.

  • title
    string

    The title of a category

  • products_ids
    string[]

    The list of product ids associated with a category.

Create category

BASH
curl --location  --request POST \
                'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/categories' \
                  --user "anystring:${apikey}"' \  --d ' \

{
“id”: “string”,
“handle”: “cat-hat”,
“title”: “Cat Hat”,
“product_ids”: [
“string”
]
}’

Success Response

HTTP Status 200 – E-commerce category

Information about a specific category

  • id
    string

    A unique identifier for the category

  • handle
    string

    The handle of this category.

  • title
    string

    The title of this category.

  • products
    object[]

    The products associated with this category.

Example response

JSON

{
                                "id": "string",
                                "handle": "cat-hat",
                                "title": "Cat Hat",
                                "products": [
                                {
                                "id": "string",
                                "title": "cat-hat",
                                "handle": "Cat Hat",
                                "url": "string",
                                "description": "string",
                                "type": 0,
                                "vendor": 0,
                                "image_url": "string",
                                "variants": [
                                {
                                "id": "string",
                                "title": "string",
                                "url": "GET",
                                "sku": "string",
                                "price": float,
                                "inventory_quantity": integer,
                                "image_url": "string",
                                "backorders": "string",
                                "visibility": "string",
                                "created_at": DateTime,
                                "updated_at": DateTime,
                                "_links": "string",
                                }
                                "published_at_foreign": "string",
                                "images": [
                                {
                                "id": "string",
                                "url": "string",
                                "variant_ids": [
                                "string"
                                ],
                                "_links": [
                                {
                                "rel": "string",
                                "href": "string",
                                "method": "GET",
                                "targetSchema": "string",
                                "schema": "string"
                                }
                                ]
                                }
                                ],
                                "_links": [
                                {
                                "rel": "string",
                                "href": "string",
                                "method": "GET",
                                "targetSchema": "string",
                                "schema": "string"
                                }
                                ]
                                }
                                ]
                                }

Example error response

JSON

{
                                "type": "https://www.squalomail.com/supporto/e-commerce-api/",
                                "title": "Resource Not Found",
                                "status": 404,
                                "detail": "The requested resource could not be found.",
                                "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
                                }

Update Category

Update a specific category of a store.

PUT /ecommerce/stores/{store_id}/categories/{category_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • category_idREQUIRED
    string

    The id for the category of a store.

Body Parameters

  • handle
    string

    The handle of a category.

  • title
    string

    The title of a category

  • products_ids
    string[]

    The list of product ids associated with a category.

Update category

BASH
curl --location  --request POST \
                'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/categories/{category_id}' \
                  --user "anystring:${apikey}"' \  --d ' \

{
“handle”: “cat-hat”,
“title”: “Cat Hat”,
“product_ids”: [
“string”
]
}’

Success Response

HTTP Status 200 – E-commerce category

Information about a specific category

  • id
    string

    A unique identifier for the category

  • handle
    string

    The handle of this category.

  • title
    string

    The title of this category.

  • products
    object[]

    The products associated with this category.

Example response

JSON

{
                                "id": "string",
                                "handle": "cat-hat",
                                "title": "Cat Hat",
                                "products": [
                                {
                                "id": "string",
                                "title": "cat-hat",
                                "handle": "Cat Hat",
                                "url": "string",
                                "description": "string",
                                "type": 0,
                                "vendor": 0,
                                "image_url": "string",
                                "variants": [
                                {
                                "id": "string",
                                "title": "string",
                                "url": "GET",
                                "sku": "string",
                                "price": float,
                                "inventory_quantity": integer,
                                "image_url": "string",
                                "backorders": "string",
                                "visibility": "string",
                                "created_at": DateTime,
                                "updated_at": DateTime,
                                "_links": "string",
                                }
                                "published_at_foreign": "string",
                                "images": [
                                {
                                "id": "string",
                                "url": "string",
                                "variant_ids": [
                                "string"
                                ],
                                "_links": [
                                {
                                "rel": "string",
                                "href": "string",
                                "method": "GET",
                                "targetSchema": "string",
                                "schema": "string"
                                }
                                ]
                                }
                                ],
                                "_links": [
                                {
                                "rel": "string",
                                "href": "string",
                                "method": "GET",
                                "targetSchema": "string",
                                "schema": "string"
                                }
                                ]
                                }
                                ]
                                }

Example error response

JSON

{
                                "type": "https://www.squalomail.com/supporto/e-commerce-api/",
                                "title": "Resource Not Found",
                                "status": 404,
                                "detail": "The requested resource could not be found.",
                                "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
                                }

Delete Category

Delete a category from a store.

DELETE /ecommerce/stores/{store_id}categories/{category_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • category_idREQUIRED
    string

    The id for the category of a store.

Success Response

HTTP Status 204

Empty response


Products

E-commerce items for sale in your store need to be created as Products so you can add the items to a Cart or an Order. Each Product requires at least one Product Variant.

List product

Get information about a store’s products.

GET /ecommerce/stores/{store_id}/products

Path Parameters

  • store_idREQUIRED
    string

    The store id.

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • count
    integer

    The number of records to return. Default value is 10. Maximum value is 1000

  • offset
    integer

    Used for pagination, this it the number of records from a collection to skip. Default value is 0.

     

List product

BASH
curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/products?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>&count=10&offset=0' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – Products

A collection of a store’s products.

  • store_id
    string

    The store id.

  • products
    object[]

    An array of objects, each representing a store product.

    Show Properties
  • total_items
    integer

    The total number of items matching the query regardless of pagination.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "store_id": "string",
    "products": [
      {
        "id": "string",
        "title": "Cat Hat",
        "handle": "cat-hat",
        "url": "string",
        "description": "This is a cat hat.",
        "type": "Accessories",
        "vendor": "string",
        "image_url": "string",
        "variants": [
          {
            "id": "string",
            "title": "Cat Hat",
            "url": "string",
            "sku": "string",
            "price": 0,
            "inventory_quantity": 0,
            "image_url": "string",
            "backorders": "string",
            "visibility": "string",
            "created_at": "2015-07-15T19:28:00+00:00",
            "updated_at": "2015-07-15T19:28:00+00:00",
            "_links": [
              {
                "rel": "string",
                "href": "string",
                "method": "GET",
                "targetSchema": "string",
                "schema": "string"
              }
            ]
          }
        ],
        "images": [
          {
            "id": "string",
            "url": "string",
            "variant_ids": [
              "string"
            ],
            "_links": [
              {
                "rel": "string",
                "href": "string",
                "method": "GET",
                "targetSchema": "string",
                "schema": "string"
              }
            ]
          }
        ],
        "published_at_foreign": "2015-07-15T19:28:00+00:00",
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "total_items": 0,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Add product

Add a new product to a store.

POST /ecommerce/stores/{store_id}/products

Path Parameters

  • store_idREQUIRED
    string

    The store id.

Body Parameters

  • idREQUIRED
    string

    A unique identifier for the product.

  • titleREQUIRED
    string

    The title of a product.

  • variantsREQUIRED
    object[]

    An array of the product’s variants. At least one variant is required for each product. A variant can use the same id and title as the parent product.

    Show Properties
  • handle
    string

    The handle of a product.

  • url
    string

    The URL for a product.

  • description
    string

    The description of a product.

  • type
    string

    The type of product.

  • vendor
    string

    The vendor for a product.

  • image_url
    string

    The image URL for a product.

  • images
    object[]

    An array of the product’s images.

    Show Properties
  • published_at_foreign
    string

    The date and time the product was published.

     

Add product

BASH
curl -X POST \
  https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/products \
  --user "anystring:${apikey}"' \
  -d '{"id":"","title":"","handle":"","url":"","description":"","type":"","vendor":"","image_url":"","variants":[],"images":[],"published_at_foreign":""}''{"id":"","title":"","handle":"","url":"","description":"","type

Success Response

HTTP Status 200 – E-commerce Product

Information about a specific product.

  • id
    string

    A unique identifier for the product.

  • title
    string

    The title of a product.

  • handle
    string

    The handle of a product.

  • url
    string

    The URL for a product.

  • description
    string

    The description of a product.

  • type
    string

    The type of product.

  • vendor
    string

    The vendor for a product.

  • image_url
    string

    The image URL for a product.

  • variants
    object[]

    Returns up to 50 of the product’s variants. To retrieve all variants use Product Variants.

    Show Properties
  • images
    object[]

    An array of the product’s images.

    Show Properties
  • published_at_foreign
    string

    The date and time the product was published in ISO 8601 format.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "id": "string",
    "title": "Cat Hat",
    "handle": "cat-hat",
    "url": "string",
    "description": "This is a cat hat.",
    "type": "Accessories",
    "vendor": "string",
    "image_url": "string",
    "variants": [
      {
        "id": "string",
        "title": "Cat Hat",
        "url": "string",
        "sku": "string",
        "price": 0,
        "inventory_quantity": 0,
        "image_url": "string",
        "backorders": "string",
        "visibility": "string",
        "created_at": "2015-07-15T19:28:00+00:00",
        "updated_at": "2015-07-15T19:28:00+00:00",
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "images": [
      {
        "id": "string",
        "url": "string",
        "variant_ids": [
          "string"
        ],
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "published_at_foreign": "2015-07-15T19:28:00+00:00",
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Get product info

Get information about a specific product.

GET /ecommerce/stores/{store_id}/products/{product_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • product_idREQUIRED
    string

    The id for the product of a store.

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Get product info

BASH
curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/products/{product_id}?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – E-commerce Product

Information about a specific product.

  • id
    string

    A unique identifier for the product.

  • currency_code
    string

    The currency code

  • title
    string

    The title of a product.

  • handle
    string

    The handle of a product.

  • url
    string

    The URL for a product.

  • description
    string

    The description of a product.

  • type
    string

    The type of product.

  • vendor
    string

    The vendor for a product.

  • image_url
    string

    The image URL for a product.

  • variants
    object[]

    Returns up to 50 of the product’s variants. To retrieve all variants use Product Variants.

    Show Properties
  • images
    object[]

    An array of the product’s images.

    Show Properties
  • published_at_foreign
    string

    The date and time the product was published in ISO 8601 format.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "id": "string",
    "title": "Cat Hat",
    "handle": "cat-hat",
    "url": "string",
    "description": "This is a cat hat.",
    "type": "Accessories",
    "vendor": "string",
    "image_url": "string",
    "variants": [
      {
        "id": "string",
        "title": "Cat Hat",
        "url": "string",
        "sku": "string",
        "price": 0,
        "inventory_quantity": 0,
        "image_url": "string",
        "backorders": "string",
        "visibility": "string",
        "created_at": "2015-07-15T19:28:00+00:00",
        "updated_at": "2015-07-15T19:28:00+00:00",
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "images": [
      {
        "id": "string",
        "url": "string",
        "variant_ids": [
          "string"
        ],
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "published_at_foreign": "2015-07-15T19:28:00+00:00",
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the SqaloMail API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

  

Create or update product

Create a specific product or update an exhisting one.

PUT/ecommerce/stores/{store_id}/products/{product_id}

See below (same as PATCH)

Update product

Update a specific product.

PATCH /ecommerce/stores/{store_id}/products/{product_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • product_idREQUIRED
    string

    The id for the product of a store.

Body Parameters

  • title
    string

    The title of a product.

  • handle
    string

    The handle of a product.

  • url
    string

    The URL for a product.

  • description
    string

    The description of a product.

  • type
    string

    The type of product.

  • vendor
    string

    The vendor for a product.

  • image_url
    string

    The image URL for a product.

  • variants
    object[]

    An array of the product’s variants. At least one variant is required for each product. A variant can use the same id and title as the parent product.

    Show Properties
  • images
    object[]

    An array of the product’s images.

    Show Properties
  • published_at_foreign
    string

    The date and time the product was published in ISO 8601 format.

     

Update product

BASH
curl -X PATCH \
  https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/products/{product_id} \
  --user "anystring:${apikey}"' \
  -d '{"title":"","handle":"","url":"","description":"","type":"","vendor":"","image_url":"","variants":[],"images":[],"published_at_foreign":""}'

Success Response

HTTP Status 200 – E-commerce Product

Information about a specific product.

  • id
    string

    A unique identifier for the product.

  • title
    string

    The title of a product.

  • handle
    string

    The handle of a product.

  • url
    string

    The URL for a product.

  • description
    string

    The description of a product.

  • type
    string

    The type of product.

  • vendor
    string

    The vendor for a product.

  • image_url
    string

    The image URL for a product.

  • variants
    object[]

    Returns up to 50 of the product’s variants. To retrieve all variants use Product Variants.

    Show Properties
  • images
    object[]

    An array of the product’s images.

    Show Properties
  • published_at_foreign
    string

    The date and time the product was published in ISO 8601 format.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "id": "string",
    "title": "Cat Hat",
    "handle": "cat-hat",
    "url": "string",
    "description": "This is a cat hat.",
    "type": "Accessories",
    "vendor": "string",
    "image_url": "string",
    "variants": [
      {
        "id": "string",
        "title": "Cat Hat",
        "url": "string",
        "sku": "string",
        "price": 0,
        "inventory_quantity": 0,
        "image_url": "string",
        "backorders": "string",
        "visibility": "string",
        "created_at": "2015-07-15T19:28:00+00:00",
        "updated_at": "2015-07-15T19:28:00+00:00",
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "images": [
      {
        "id": "string",
        "url": "string",
        "variant_ids": [
          "string"
        ],
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "published_at_foreign": "2015-07-15T19:28:00+00:00",
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Delete product

Delete a product.

DELETE /ecommerce/stores/{store_id}/products/{product_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • product_idREQUIRED
    string

    The id for the product of a store.

Delete product

BASH
curl -X DELETE \
    https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/products/{product_id} \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 204

Empty Response

Example response

JSON

{}

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Product Images

A Product Image represents a specific product image.

List product images

Get information about a product’s images.

GET /ecommerce/stores/{store_id}/products/{product_id}/images

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • product_idREQUIRED
    string

    The id for the product of a store.

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • count
    integer

    The number of records to return. Default value is 10. Maximum value is 1000

  • offset
    integer

    Used for pagination, this it the number of records from a collection to skip. Default value is 0.

     

List product images

BASH
curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/products/{product_id}/images?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>&count=10&offset=0' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – Ecommerce Product Images

A collection of a product’s images.

  • store_id
    string

    The store id.

  • product_id
    string

    The product id.

  • images
    object[]

    An array of objects, each representing a product image resource.

    Show Properties
  • total_items
    integer

    The total number of items matching the query regardless of pagination.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "store_id": "string",
    "product_id": "string",
    "images": [
      {
        "id": "string",
        "url": "string",
        "variant_ids": [
          "string"
        ],
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "total_items": 0,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON
{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Add product image

Add a new image to the product.

POST /ecommerce/stores/{store_id}/products/{product_id}/images

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • product_idREQUIRED
    string

    The id for the product of a store.

Body Parameters

  • idREQUIRED
    string

    A unique identifier for the product image.

  • urlREQUIRED
    string

    The URL for a product image.

  • variant_ids
    string[]

    The list of product variants using the image.

     

Add product image

BASH
curl -X POST \
    https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/products/{product_id}/images \
    --user "anystring:${apikey}"' \
    -d '{"id":"","url":"","variant_ids":[]}'

Success Response

HTTP Status 200 – E-commerce Product Image

Information about a specific product image.

  • id
    string

    A unique identifier for the product image.

  • url
    string

    The URL for a product image.

  • variant_ids
    string[]

    The list of product variants using the image.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "id": "string",
    "url": "string",
    "variant_ids": [
      "string"
    ],
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Get product image info

Get information about a specific product image.

GET /ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • product_idREQUIRED
    string

    The id for the product of a store.

  • image_idREQUIRED
    string

    The id for the product image.

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

     

Get product image info

BASH
curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – E-commerce Product Image

Information about a specific product image.

  • id
    string

    A unique identifier for the product image.

  • url
    string

    The URL for a product image.

  • variant_ids
    string[]

    The list of product variants using the image.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "id": "string",
    "url": "string",
    "variant_ids": [
      "string"
    ],
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Update product image

Update a product image.

PATCH /ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • product_idREQUIRED
    string

    The id for the product of a store.

  • image_idREQUIRED
    string

    The id for the product image.

Body Parameters

  • id
    string

    A unique identifier for the product image.

  • url
    string

    The URL for a product image.

  • variant_ids
    string[]

    The list of product variants using the image.

     

Update product image

BASH
curl -X PATCH \
    https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id} \
    --user "anystring:${apikey}"' \
    -d '{"id":"","url":"","variant_ids":[]}'

 

Success Response

HTTP Status 200 – E-commerce Product Image

Information about a specific product image.

  • id
    string

    A unique identifier for the product image.

  • url
    string

    The URL for a product image.

  • variant_ids
    string[]

    The list of product variants using the image.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "id": "string",
    "url": "string",
    "variant_ids": [
      "string"
    ],
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Delete product image

Delete a product image.

DELETE /ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • product_idREQUIRED
    string

    The id for the product of a store.

  • image_idREQUIRED
    string

    The id for the product image.

     

Delete product image

BASH
curl -X DELETE \
    https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id} \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 204

Empty Response

Example response

JSON

{}

Error Response

An error generated by the Squalo API

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Product Variants

A Product Variant represents a specific item for purchase, and is contained within a parent Product. At least one Product Variant is required for each Product.

List product variants

Get information about a product’s variants.

GET /ecommerce/stores/{store_id}/products/{product_id}/variants

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • product_idREQUIRED
    string

    The id for the product of a store.

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • count
    integer

    The number of records to return. Default value is 10. Maximum value is 1000

  • offset
    integer

    Used for pagination, this it the number of records from a collection to skip. Default value is 0.

     

List product variants

BASH
curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/products/{product_id}/variants?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>&count=10&offset=0' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – Ecommerce Product Variants

A collection of a product’s variants.

  • store_id
    string

    The store id.

  • product_id
    string

    The product id.

  • variants
    object[]

    An array of objects, each representing a product’s variants.

    Show Properties
  • total_items
    integer

    The total number of items matching the query regardless of pagination.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "store_id": "string",
    "product_id": "string",
    "variants": [
      {
        "id": "string",
        "title": "Cat Hat",
        "url": "string",
        "sku": "string",
        "price": 0,
        "inventory_quantity": 0,
        "image_url": "string",
        "backorders": "string",
        "visibility": "string",
        "created_at": "2015-07-15T19:28:00+00:00",
        "updated_at": "2015-07-15T19:28:00+00:00",
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "total_items": 0,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Add product variant

Add a new variant to the product.

POST /ecommerce/stores/{store_id}/products/{product_id}/variants

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • product_idREQUIRED
    string

    The id for the product of a store.

Body Parameters

  • idREQUIRED
    string

    A unique identifier for the product variant.

  • titleREQUIRED
    string

    The title of a product variant.

  • url
    string

    The URL for a product variant.

  • sku
    string

    The stock keeping unit (SKU) of a product variant.

  • price
    number

    The price of a product variant.

  • inventory_quantity
    integer

    The inventory quantity of a product variant.

  • image_url
    string

    The image URL for a product variant.

  • backorders
    string

    The backorders of a product variant.

  • visibility
    string

    The visibility of a product variant.

     

Add product variant

BASH
curl -X POST \
  https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/products/{product_id}/variants \
  --user "anystring:${apikey}"' \
  -d '{"id":"","title":"","url":"","sku":"","price":0,"inventory_quantity":0,"image_url":"","backorders":"","visibility":""}'

Success Response

HTTP Status 200 – E-commerce Product Variant

Information about a specific product variant.

  • id
    string

    A unique identifier for the product variant.

  • title
    string

    The title of a product variant.

  • url
    string

    The URL for a product variant.

  • sku
    string

    The stock keeping unit (SKU) of a product variant.

  • price
    number

    The price of a product variant.

  • inventory_quantity
    integer

    The inventory quantity of a product variant.

  • image_url
    string

    The image URL for a product variant.

  • backorders
    string

    The backorders of a product variant.

  • visibility
    string

    The visibility of a product variant.

  • created_at
    string

    The date and time the product was created in ISO 8601 format.

  • updated_at
    string

    The date and time the product was last updated in ISO 8601 format.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
    "id": "string",
    "title": "Cat Hat",
    "url": "string",
    "sku": "string",
    "price": 0,
    "inventory_quantity": 0,
    "image_url": "string",
    "backorders": "string",
    "visibility": "string",
    "created_at": "2015-07-15T19:28:00+00:00",
    "updated_at": "2015-07-15T19:28:00+00:00",
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Get product variant info

Get information about a specific product variant.

GET /ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • product_idREQUIRED
    string

    The id for the product of a store.

  • variant_idREQUIRED
    string

    The id for the product variant.

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

     

Get product variant info

BASH
curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – E-commerce Product Variant

Information about a specific product variant.

  • id
    string

    A unique identifier for the product variant.

  • title
    string

    The title of a product variant.

  • url
    string

    The URL for a product variant.

  • sku
    string

    The stock keeping unit (SKU) of a product variant.

  • price
    number

    The price of a product variant.

  • inventory_quantity
    integer

    The inventory quantity of a product variant.

  • image_url
    string

    The image URL for a product variant.

  • backorders
    string

    The backorders of a product variant.

  • visibility
    string

    The visibility of a product variant.

  • created_at
    string

    The date and time the product was created in ISO 8601 format.

  • updated_at
    string

    The date and time the product was last updated in ISO 8601 format.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "id": "string",
    "title": "Cat Hat",
    "url": "string",
    "sku": "string",
    "price": 0,
    "inventory_quantity": 0,
    "image_url": "string",
    "backorders": "string",
    "visibility": "string",
    "created_at": "2015-07-15T19:28:00+00:00",
    "updated_at": "2015-07-15T19:28:00+00:00",
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Add or update product variant

Add or update a product variant.

PUT/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • product_idREQUIRED
    string

    The id for the product of a store.

  • variant_idREQUIRED
    string

    The id for the product variant.

Body Parameters

  • idREQUIRED
    string

    A unique identifier for the product variant.

  • titleREQUIRED
    string

    The title of a product variant.

  • url
    string

    The URL for a product variant.

  • sku
    string

    The stock keeping unit (SKU) of a product variant.

  • price
    number

    The price of a product variant.

  • inventory_quantity
    integer

    The inventory quantity of a product variant.

  • image_url
    string

    The image URL for a product variant.

  • backorders
    string

    The backorders of a product variant.

  • visibility
    string

    The visibility of a product variant

     

Add or update product variant

BASH
curl -X PUT \
  https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id} \
  --user "anystring:${apikey}"' \
  -d '{"id":"","title":"","url":"","sku":"","price":0,"inventory_quantity":0,"image_url":"","backorders":"","visibility":""}'

Success Response

HTTP Status 200 – E-commerce Product Variant

Information about a specific product variant.

  • id
    string

    A unique identifier for the product variant.

  • title
    string

    The title of a product variant.

  • url
    string

    The URL for a product variant.

  • sku
    string

    The stock keeping unit (SKU) of a product variant.

  • price
    number

    The price of a product variant.

  • inventory_quantity
    integer

    The inventory quantity of a product variant.

  • image_url
    string

    The image URL for a product variant.

  • backorders
    string

    The backorders of a product variant.

  • visibility
    string

    The visibility of a product variant.

  • created_at
    string

    The date and time the product was created in ISO 8601 format.

  • updated_at
    string

    The date and time the product was last updated in ISO 8601 format.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "id": "string",
    "title": "Cat Hat",
    "url": "string",
    "sku": "string",
    "price": 0,
    "inventory_quantity": 0,
    "image_url": "string",
    "backorders": "string",
    "visibility": "string",
    "created_at": "2015-07-15T19:28:00+00:00",
    "updated_at": "2015-07-15T19:28:00+00:00",
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Update product variant

Update a product variant.

PATCH /ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • product_idREQUIRED
    string

    The id for the product of a store.

  • variant_idREQUIRED
    string

    The id for the product variant.

Body Parameters

  • title
    string

    The title of a product variant.

  • url
    string

    The URL for a product variant.

  • sku
    string

    The stock keeping unit (SKU) of a product variant.

  • price
    number

    The price of a product variant.

  • inventory_quantity
    integer

    The inventory quantity of a product variant.

  • image_url
    string

    The image URL for a product variant.

  • backorders
    string

    The backorders of a product variant.

  • visibility
    string

    The visibility of a product variant.

     

Update product variant

BASH
curl -X PATCH \
  https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id} \
  --user "anystring:${apikey}"' \
  -d '{"title":"","url":"","sku":"","price":0,"inventory_quantity":0,"image_url":"","backorders":"","visibility":""}'

Success Response

HTTP Status 200 – E-commerce Product Variant

Information about a specific product variant.

  • id
    string

    A unique identifier for the product variant.

  • title
    string

    The title of a product variant.

  • url
    string

    The URL for a product variant.

  • sku
    string

    The stock keeping unit (SKU) of a product variant.

  • price
    number

    The price of a product variant.

  • inventory_quantity
    integer

    The inventory quantity of a product variant.

  • image_url
    string

    The image URL for a product variant.

  • backorders
    string

    The backorders of a product variant.

  • visibility
    string

    The visibility of a product variant.

  • created_at
    string

    The date and time the product was created in ISO 8601 format.

  • updated_at
    string

    The date and time the product was last updated in ISO 8601 format.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
    "id": "string",
    "title": "Cat Hat",
    "url": "string",
    "sku": "string",
    "price": 0,
    "inventory_quantity": 0,
    "image_url": "string",
    "backorders": "string",
    "visibility": "string",
    "created_at": "2015-07-15T19:28:00+00:00",
    "updated_at": "2015-07-15T19:28:00+00:00",
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
  

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Delete product variant

Delete a product variant.

DELETE /ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • product_idREQUIRED
    string

    The id for the product of a store.

  • variant_idREQUIRED
    string

    The id for the product variant.

     

Delete product variant

BASH
curl -X DELETE \
    https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id} \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 204

Empty Response

Example response

JSON

{}

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"}

Customers

Add Customers to your Store to track their orders and to view E-Commerce Data for your Squalo lists and campaigns. Each Customer is connected to a Squalo list member, so adding a Customer can also add or update a list member.

List customers

Get information about a store’s customers.

GET /ecommerce/stores/{store_id}/customers

Path Parameters

  • store_idREQUIRED
    string

    The store id.

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • count
    integer

    The number of records to return. Default value is 10. Maximum value is 1000

  • offset
    integer

    Used for pagination, this it the number of records from a collection to skip. Default value is 0.

  • email_address
    string

    Restrict the response to customers with the email address.

     

List customers

BASH
curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/customers?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>&count=10&offset=0&email_address=<SOME_STRING_VALUE>' \
    --user "anystring:${apikey}"'

 

Success Response

HTTP Status 200 – Customers

A collection of the store’s customers.

  • store_id
    string

    The store id.

  • customers
    object[]

    An array of objects, each representing a customer of a store.

    Show Properties
  • total_items
    integer

    The total number of items matching the query regardless of pagination.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "store_id": "string",
    "customers": [
      {
        "id": "string",
        "email_address": "string",
        "opt_in_status": true,
        "company": "string",
        "first_name": "string",
        "last_name": "string",
        "phone": "string",
        "orders_count": 4,
        "total_spent": 100,
        "address": {
          "address1": "675 Ponce de Leon Ave NE",
          "address2": "Suite 5000",
          "city": "Atlanta",
          "province": "Georgia",
          "province_code": "GA",
          "postal_code": "30308",
          "country": "United States",
          "country_code": "US"
        },
        "created_at": "2015-07-15T19:28:00+00:00",
        "updated_at": "2015-07-15T19:28:00+00:00",
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "total_items": 0,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Add customer

Add a new customer to a store.

POST /ecommerce/stores/{store_id}/customers

curl -X POST \
    https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/customers \
    --user "anystring:${apikey}"' \
    -d '{"id":"","email_address":"","opt_in_status":false,"company":"","first_name":"","last_name":"","phone":"","address":{"address1":"","address2":"","city":"","province":"","province_code":"","postal_code":"","country":"","country_code":""}}'
  

Success Response

  • HTTP Status 200 – E-commerce Customer

    Information about a specific customer.

    • id
      string

      A unique identifier for the customer.

    • email_address
      string

      The customer’s email address.

    • opt_in_status
      boolean

      The customer’s opt-in status. This value will never overwrite the opt-in status of a pre-existing Mailchimp list member, but will apply to list members that are added through the e-commerce API endpoints. Customers who don’t opt in to your Mailchimp list will be added as Transactional members.

    • company
      string

      The customer’s company.

    • first_name
      string

      The customer’s first name.

    • last_name
      string

      The customer’s last name.

      phone

      string

      The customer’s phone.

    • orders_count
      integer

      The customer’s total order count.

    • total_spent
      number

      The total amount the customer has spent.

    • address
      object

      The customer’s address.

  • Show Properties
  • created_at
    string

    The date and time the customer was created in ISO 8601 format.

  • updated_at
    string

    The date and time the customer was last updated in ISO 8601 format.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

    • Show Properties

Example response

JSON

{
    "id": "string",
    "email_address": "string",
    "opt_in_status": true,
    "company": "string",
    "first_name": "string",
    "last_name": "string",
    "phone": "string",
    "orders_count": 4,
    "total_spent": 100,
    "address": {
      "address1": "675 Ponce de Leon Ave NE",
      "address2": "Suite 5000",
      "city": "Atlanta",
      "province": "Georgia",
      "province_code": "GA",
      "postal_code": "30308",
      "country": "United States",
      "country_code": "US"
    },
    "created_at": "2015-07-15T19:28:00+00:00",
    "updated_at": "2015-07-15T19:28:00+00:00",
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }
  

Error Response

  • Problem Detail Document

    An error generated by the Mailchimp API.

    • type
      string

      An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

    • title
      string

      A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

    • status
      integer

      The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

    • detail
      string

      A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

    • instance
      string

      A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Error response

An error generated by the Squalo API.

  • typestringAn absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • titlestringA short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • statusintegerThe HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detailstringA human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instancestringA string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Get customer info

Get information about a specific customer.

GET /ecommerce/stores/{store_id}/customers/{customer_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • customer_idREQUIRED
    string

    The id for the customer of a store.

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Get customer info

BASH
curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/customers/{customer_id}?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – E-commerce Customer

Information about a specific customer.

  • id
    string

    A unique identifier for the customer.

  • email_address
    string

    The customer’s email address.

  • opt_in_status
    boolean

    The customer’s opt-in status. This value will never overwrite the opt-in status of a pre-existing Squalo list member, but will apply to list members that are added through the e-commerce API endpoints. Customers who don’t opt in to your Squalo list will be added as Transactional members.

  • company
    string

    The customer’s company.

  • first_name
    string

    The customer’s first name.

  • last_name
    string

    The customer’s last name.

    phone

    string

    The customer’s phone.

  • orders_count
    integer

    The customer’s total order count.

  • total_spent
    number

    The total amount the customer has spent.

  • address
    object

    The customer’s address.

     

Example response

JSON

{
    "id": "string",
    "email_address": "string",
    "opt_in_status": true,
    "company": "string",
    "first_name": "string",
    "last_name": "string",
    "phone": "string",
    "orders_count": 4,
    "total_spent": 100,
    "address": {
      "address1": "675 Ponce de Leon Ave NE",
      "address2": "Suite 5000",
      "city": "Atlanta",
      "province": "Georgia",
      "province_code": "GA",
      "postal_code": "30308",
      "country": "United States",
      "country_code": "US"
    },
    "created_at": "2015-07-15T19:28:00+00:00",
    "updated_at": "2015-07-15T19:28:00+00:00",
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Add or update customer

Add or update a customer.

PUT/ecommerce/stores/{store_id}/customers/{customer_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • customer_idREQUIRED
    string

    The id for the customer of a store.

Body Parameters

  • idREQUIRED
    string

    A unique identifier for the customer. Limited to 50 characters.

  • email_addressREQUIRED
    string

    The customer’s email address.

  • opt_in_statusREQUIRED
    boolean

    The customer’s opt-in status. This value will never overwrite the opt-in status of a pre-existing Squalo list member, but will apply to list members that are added through the e-commerce API endpoints. Customers who don’t opt in to your Squalo list will be added as Transactional members.

  • company
    string

    The customer’s company.

  • first_name
    string

    The customer’s first name.

  • last_name
    string

    The customer’s last name.

    phone
    string

    The customer’s phone.

  • address
    object

    The customer’s address.

    Show Properties

Add or update customer

BASH
curl -X PUT \
  https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/customers/{customer_id} \
  --user "anystring:${apikey}"' \
  -d '{"id":"","email_address":"","opt_in_status":false,"company":"","first_name":"","last_name":"","phone":"","address":{"address1":"","address2":"","city":"","province":"","province_code":"","postal_code":"","country":"","country_code":""}}'

Success Response

HTTP Status 200 – E-commerce Customer

Information about a specific customer.

  • id
    string

    A unique identifier for the customer.

  • email_address
    string

    The customer’s email address.

  • opt_in_status
    boolean

    The customer’s opt-in status. This value will never overwrite the opt-in status of a pre-existing Squalo list member, but will apply to list members that are added through the e-commerce API endpoints. Customers who don’t opt in to your Squalo list will be added as Transactional members.

  • company
    string

    The customer’s company.

  • first_name
    string

    The customer’s first name.

  • last_name
    string

    The customer’s last name.

    phone
    string

    The customer’s phone.

  • orders_count
    integer

    The customer’s total order count.

  • total_spent
    number

    The total amount the customer has spent.

  • address
    object

    The customer’s address.

    Show Properties
  • created_at
    string

    The date and time the customer was created in ISO 8601 format.

  • updated_at
    string

    The date and time the customer was last updated in ISO 8601 format.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "id": "string",
    "email_address": "string",
    "opt_in_status": true,
    "company": "string",
    "first_name": "string",
    "last_name": "string",
    "phone": "string",
    "orders_count": 4,
    "total_spent": 100,
    "address": {
      "address1": "675 Ponce de Leon Ave NE",
      "address2": "Suite 5000",
      "city": "Atlanta",
      "province": "Georgia",
      "province_code": "GA",
      "postal_code": "30308",
      "country": "United States",
      "country_code": "US"
    },
    "created_at": "2015-07-15T19:28:00+00:00",
    "updated_at": "2015-07-15T19:28:00+00:00",
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Update customer

Update a customer.

PATCH /ecommerce/stores/{store_id}/customers/{customer_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • customer_idREQUIRED
    string

    The id for the customer of a store.

Body Parameters

  • opt_in_status
    boolean

    The customer’s opt-in status. This value will never overwrite the opt-in status of a pre-existing Squalo list member, but will apply to list members that are added through the e-commerce API endpoints. Customers who don’t opt in to your Squalo list will be added as Transactional members.

  • company
    string

    The customer’s company.

  • first_name
    string

    The customer’s first name.

  • last_name
    string

    The customer’s last name.

    phone
    string

    The customer’s phone.

  • address
    object

    The customer’s address.

     

Update customer

BASH
curl -X PATCH \
  https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/customers/{customer_id} \
  --user "anystring:${apikey}"' \
  -d '{"opt_in_status":false,"company":"","first_name":"","last_name":"","phone":"","address":{"address1":"","address2":"","city":"","province":"","province_code":"","postal_code":"","country":"","country_code":""}}'

Success Response

HTTP Status 200 – E-commerce Customer

Information about a specific customer.

  • id
    string

    A unique identifier for the customer.

  • email_address
    string

    The customer’s email address.

  • opt_in_status
    boolean

    The customer’s opt-in status. This value will never overwrite the opt-in status of a pre-existing Squalo list member, but will apply to list members that are added through the e-commerce API endpoints. Customers who don’t opt in to your Squalo list will be added as Transactional members.

  • company
    string

    The customer’s company.

  • first_name
    string

    The customer’s first name.

  • last_name
    string

    The customer’s last name.

    phone
    string

    The customer’s phone.

  • orders_count
    integer

    The customer’s total order count.

  • total_spent
    number

    The total amount the customer has spent.

  • address
    object

    The customer’s address.

    Show Properties
  • created_at
    string

    The date and time the customer was created in ISO 8601 format.

  • updated_at
    string

    The date and time the customer was last updated in ISO 8601 format.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "id": "string",
    "email_address": "string",
    "opt_in_status": true,
    "company": "string",
    "first_name": "string",
    "last_name": "string",
    "phone": "string",
    "orders_count": 4,
    "total_spent": 100,
    "address": {
      "address1": "675 Ponce de Leon Ave NE",
      "address2": "Suite 5000",
      "city": "Atlanta",
      "province": "Georgia",
      "province_code": "GA",
      "postal_code": "30308",
      "country": "United States",
      "country_code": "US"
    },
    "created_at": "2015-07-15T19:28:00+00:00",
    "updated_at": "2015-07-15T19:28:00+00:00",
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Delete customer

Delete a customer from a store.

DELETE /ecommerce/stores/{store_id}/customers/{customer_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • customer_idREQUIRED
    string

    The id for the customer of a store.

     

Delete customer

BASH
curl -X DELETE \
    https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/customers/{customer_id} \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 204

Empty Response

Example response

JSON

{}

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Carts

Use Carts to represent unfinished e-commerce transactions. This can be used to create an Abandoned Cart workflow, or to save a consumer’s shopping cart pending a successful Order.

List carts

Get information about a store’s carts.

GET /ecommerce/stores/{store_id}/carts

Path Parameters

  • store_idREQUIRED
    string

    The store id.

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • count
    integer

    The number of records to return. Default value is 10. Maximum value is 1000

  • F
    offset
    integer

    Used for pagination, this it the number of records from a collection to skip. Default value is 0.

List carts

BASH
curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/carts?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>&count=10&offset=0' \
    --user "anystring:${apikey}"'

 

Success Response

HTTP Status 200 – Carts

A collection of a store’s carts.

  • store_id
    string

    The store id.

  • carts
    object[]

    An array of objects, each representing a cart.

  • total_items
    integer

    The total number of items matching the query regardless of pagination.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
    "store_id": "string",
    "carts": [
      {
        "id": "string",
        "customer": {
          "id": "string",
          "email_address": "string",
          "opt_in_status": true,
          "company": "string",
          "first_name": "string",
          "last_name": "string",
          "orders_count": 4,
          "total_spent": 100,
          "address": {
            "address1": "675 Ponce de Leon Ave NE",
            "address2": "Suite 5000",
            "city": "Atlanta",
            "province": "Georgia",
            "province_code": "GA",
            "postal_code": "30308",
            "country": "United States",
            "country_code": "US"
          },
          "created_at": "2015-07-15T19:28:00+00:00",
          "updated_at": "2015-07-15T19:28:00+00:00",
          "_links": [
            {
              "rel": "string",
              "href": "string",
              "method": "GET",
              "targetSchema": "string",
              "schema": "string"
            }
          ]
        },
        "campaign_id": "839488a60b",
        "checkout_url": "string",
        "currency_code": "string",
        "order_total": 0,
        "tax_total": 0,
        "shipping_total": 0,
        "lines": [
          {
            "id": "string",
            "product_id": "string",
            "product_title": "string",
            "product_variant_id": "string",
            "product_variant_title": "string",
            "quantity": 0,
            "price": 0,
            "_links": [
              {
                "rel": "string",
                "href": "string",
                "method": "GET",
                "targetSchema": "string",
                "schema": "string"
              }
            ]
          }
        ],
        "created_at": "2015-07-15T19:28:00+00:00",
        "updated_at": "2015-07-15T19:28:00+00:00",
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "total_items": 0,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Get cart info

Add a new cart to a store.

GET /ecommerce/stores/{store_id}/cart/{cart_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • cart_idREQUIRED
    string

    The cart id.

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • count
    integer

    The number of records to return. Default value is 10. Maximum value is 1000

  • F
    offset
    integer

    Used for pagination, this it the number of records from a collection to skip. Default value is 0.

Get cart info

BASH
curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/carts/{cart_id}?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – E-commerce Cart

Information about a specific cart.

    • id
      string

      A unique identifier for the cart.

    • customer
      object

      Information about a specific customer.

    • campaign_id
      string

      A string that uniquely identifies the campaign associated with a cart.

    • checkout_url
      string

      The URL for the cart. This parameter is required for Abandoned Cart automations.

    • currency_code
      string

      The three-letter ISO 4217 code for the currency that the cart uses.

    • order_total
      number

      The order total for the cart.

    • tax_total
      number

      The total tax for the cart.

    • discount_total
      number

      The total discount for the cart.

    • phone
      string

      The phone number related to the cart.

    • custom_field_1
      string

      A custom field that can be added to the cart.

    • custom_field_2
      string

      An additional custom field that can be added to the cart.

    • custom_field_3
      string

      An additional custom field that can be added to the cart.

    • custom_field_4
      string

      An additional custom field that can be added to the cart.

    • custom_field_5
      string

      An additional custom field that can be added to the cart.

    • custom_field_6
      string

      An additional custom field that can be added to the cart.

    • custom_field_7
      string

      An additional custom field that can be added to the cart.

    • custom_field_8
      string

      An additional custom field that can be added to the cart.

    • custom_field_9
      string

      An additional custom field that can be added to the cart.

    • custom_field_10
      string

      An additional custom field that can be added to the cart.

  • lines
    object[]

    An array of the cart’s line items.

  • created_at
    string

    The date and time the cart was created in ISO 8601 format.

  • updated_at
    string

    The date and time the cart was last updated in ISO 8601 format.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
    "id": "string",
    "customer": {
      "id": "string",
      "email_address": "string",
      "opt_in_status": true,
      "company": "string",
      "first_name": "string",
      "last_name": "string",
      "orders_count": 4,
      "total_spent": 100,
      "address": {
        "address1": "675 Ponce de Leon Ave NE",
        "address2": "Suite 5000",
        "city": "Atlanta",
        "province": "Georgia",
        "province_code": "GA",
        "postal_code": "30308",
        "country": "United States",
        "country_code": "US"
      },
      "created_at": "2015-07-15T19:28:00+00:00",
      "updated_at": "2015-07-15T19:28:00+00:00",
      "_links": [
        {
          "rel": "string",
          "href": "string",
          "method": "GET",
          "targetSchema": "string",
          "schema": "string"
        }
      ]
    },
    "campaign_id": "839488a60b",
    "checkout_url": "string",
    "currency_code": "string",
    "order_total": 0,
    "tax_total": 0,
    "custom_field_1": "string",   
    "custom_field_2": "string",   
    "custom_field_3": "string",   
    "custom_field_4": "string",   
    "custom_field_5": "string",   
    "custom_field_6": "string",   
    "custom_field_7": "string",   
    "custom_field_8": "string",   
    "custom_field_9": "string",   
    "custom_field_10": "string",   
    "lines": [
      {
        "id": "string",
        "product_id": "string",
        "product_title": "string",
        "product_variant_id": "string",
        "product_variant_title": "string",
        "quantity": 0,
        "price": 0,
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "created_at": "2015-07-15T19:28:00+00:00",
    "updated_at": "2015-07-15T19:28:00+00:00",
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON
{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Add cart

Add a new cart to a store.

POST /ecommerce/stores/{store_id}/carts

See below (same as PATCH)

Add or update cart

Add a new cart to a store or update an exhisting one.

PUT/ecommerce/stores/{store_id}/carts/{cart_id}

See below (same as PATCH)

Update cart

Update a specific cart.

PATCH /ecommerce/stores/{store_id}/carts/{cart_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • cart_idREQUIRED
    string

    The id for the cart.

Body Parameters

▪ trigger_squalo_events
boolean
If set to false no SqualoEvents will be triggered – this includes, automations, Zapier integrations, Webhooks, etc.
Default: true

      • customer
        object

        Information about a specific customer. Orders for existing customers should include only the id parameter in the customer object body.

      • campaign_id
        string

        A string that uniquely identifies the campaign associated with a cart.

      • checkout_url
        string

        The URL for the cart. This parameter is required for Abandoned Cart automations.

      • currency_code
        string

        The three-letter ISO 4217 code for the currency that the cart uses.

      • order_total
        number

        The order total for the cart.

      • tax_total
        number

        The total tax for the cart.

      • discount_total
        number

        The total discount for the cart.

      • phone
        string

        The phone number related to the cart.

      • custom_field_1
        string

        A custom field that can be added to the cart.

      • custom_field_2
        string

        An additional custom field that can be added to the cart.

      • custom_field_3
        string

        An additional custom field that can be added to the cart.

      • custom_field_4
        string

        An additional custom field that can be added to the cart.

      • custom_field_5
        string

        An additional custom field that can be added to the cart.

      • custom_field_6
        string

        An additional custom field that can be added to the cart.

      • custom_field_7
        string

        An additional custom field that can be added to the cart.

      • custom_field_8
        string

        An additional custom field that can be added to the cart.

      • custom_field_9
        string

        An additional custom field that can be added to the cart.

      • custom_field_10
        string

        An additional custom field that can be added to the cart.

    • shipping_address
      object

      The shipping address for the order. It is an object with many properties. Please look AT GET to get more info.

      Show Properties
    • billing_address
      object

      The billing address for the order. It is an object with many properties. Please look AT GET to get more info.

      Show Properties
  • lines
    object[]

    An array of the cart’s line items.

Update cart

BASH

curl -X PATCH \
    https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/carts/{cart_id} \
    --user "anystring:${apikey}"' \
    -d '{"customer":{"opt_in_status":false,"company":"","first_name":"","last_name":"","address":{"address1":"","address2":"","city":"","province":"","province_code":"","postal_code":"","country":"","country_code":""}},"campaign_id":"","checkout_url":"","currency_code":"","custom_field_1":"","custom_field_2":"","custom_field_3":"","custom_field_4":"","custom_field_5":"","custom_field_6":"","custom_field_7":"","custom_field_8":"","custom_field_9":"","custom_field_10":"","order_total":0,"tax_total":0,"shipping_total":0,"shipping_address":{"name":"","address1":"","address2":"","city":"","province":"","province_code":"","postal_code":"","country":"","country_code":"","longitude":0,"latitude":0,"phone":"","company":""},"billing_address":{"name":"","address1":"","address2":"","city":"","province":"","province_code":"","postal_code":"","country":"","country_code":"","longitude":0,"latitude":0,"phone":"","company":""},"lines":[]}'

Success Response

HTTP Status 200 – E-commerce Cart

Information about a specific cart.

  • id
    string

    A unique identifier for the cart.

  • customer
    object

    Information about a specific customer.

    Show Properties
  • campaign_id
    string

    A string that uniquely identifies the campaign associated with a cart.

  • checkout_url
    string

    The URL for the cart. This parameter is required for Abandoned Cart automations.

  • currency_code
    string

    The three-letter ISO 4217 code for the currency that the cart uses.

  • order_total
    number

    The order total for the cart.

  • tax_total
    number

    The total tax for the cart.

  • shipping_total
    number

    The total extra cost of shipping if any. It will be added to order_total after taxes.

  • lines
    object[]

    An array of the cart’s line items.

    Show Properties
  • created_at
    string

    The date and time the cart was created in ISO 8601 format.

  • updated_at
    string

    The date and time the cart was last updated in ISO 8601 format.

  • shipping_address
    object

    The shipping address for the order.

    Show Properties
  • billing_address
    object

    The billing address for the order.

    Show Properties
  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
    "id": "string",
    "customer": {
      "id": "string",
      "email_address": "string",
      "opt_in_status": true,
      "company": "string",
      "first_name": "string",
      "last_name": "string",
      "orders_count": 4,
      "total_spent": 100,
      "address": {
        "address1": "675 Ponce de Leon Ave NE",
        "address2": "Suite 5000",
        "city": "Atlanta",
        "province": "Georgia",
        "province_code": "GA",
        "postal_code": "30308",
        "country": "United States",
        "country_code": "US"
      },
      "created_at": "2015-07-15T19:28:00+00:00",
      "updated_at": "2015-07-15T19:28:00+00:00",
      "_links": [
        {
          "rel": "string",
          "href": "string",
          "method": "GET",
          "targetSchema": "string",
          "schema": "string"
        }
      ]
    },
    "campaign_id": "839488a60b",
    "checkout_url": "string",
    "currency_code": "string",
    "order_total": 0,
    "tax_total": 0,
    "discount_total": 0,
    "phone": "string",
    "custom_field_1": "string",
    "custom_field_2": "string",
    "custom_field_3": "string",
    "custom_field_4": "string",
    "custom_field_5": "string",
    "custom_field_6": "string",
    "custom_field_7": "string",
    "custom_field_8": "string",
    "custom_field_9": "string",
    "custom_field_10": "string",
    "shipping_address": {
      "name": "John Doe",
      "address1": "675 Ponce de Leon Ave NE",
      "address2": "Suite 5000",
      "city": "Atlanta",
      "province": "Georgia",
      "province_code": "GA",
      "postal_code": "30308",
      "country": "United States",
      "country_code": "US",
      "longitude": -75.68903,
      "latitude": 45.427408,
      "phone": "8675309",
      "company": "string"
    },
    "billing_address": {
      "name": "John Doe",
      "address1": "675 Ponce de Leon Ave NE",
      "address2": "Suite 5000",
      "city": "Atlanta",
      "province": "Georgia",
      "province_code": "GA",
      "postal_code": "30308",
      "country": "United States",
      "country_code": "US",
      "longitude": -75.68903,
      "latitude": 45.427408,
      "phone": "8675309",
      "company": "string"
    },
    "lines": [
      {
        "id": "string",
        "product_id": "string",
        "product_title": "string",
        "product_variant_id": "string",
        "product_variant_title": "string",
        "quantity": 0,
        "price": 0,
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "created_at": "2015-07-15T19:28:00+00:00",
    "updated_at": "2015-07-15T19:28:00+00:00",
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON
{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Delete cart

Delete a cart.

DELETE /ecommerce/stores/{store_id}/carts/{cart_id}

Path Parameters

  • store_id REQUIRED
    string

    The store id

  • cart_idREQUIRED
    string

    The id for the cart.

     

Delete cart

BASH

curl -X DELETE \
    https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/carts/{cart_id} \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 204

Empty Response

Example response

JSON

{}

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON
{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Cart Lines

Each Cart contains one or more Cart Lines, which represent a specific Product Variant that a Customer has added to their shopping cart.

List cart line items

Get information about a cart’s line items.

GET /ecommerce/stores/{store_id}/carts/{cart_id}/lines

Path Parameters

  • store_id REQUIRED

    string
    The store id.

  • cart_id REQUIRED
    string
    The id for the cart.

Query Parameters

  • fields
    string[]
    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
  • exclude_fields
    string[]
    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
  • count
    integer
    The number of records to return. Default value is 10. Maximum value is 1000
  • offset
    integer
    Used for pagination, this it the number of records from a collection to skip. Default value is 0.

List cart line items

BASH

curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/carts/{cart_id}/lines?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>&count=10&offset=0' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – Cart Lines

A collection of a cart’s line items.

  • store_id
    string

    The store id.

  • cart_id
    string
    The cart id.
  • lines
    object[]
    An array of objects, each representing a cart’s line item.
  • total_items
    integer
    The total number of items matching the query regardless of pagination.
  • _links
    object[]
    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
    "store_id": "string",
    "cart_id": "string",
    "lines": [
      {
        "id": "string",
        "product_id": "string",
        "product_title": "string",
        "product_variant_id": "string",
        "product_variant_title": "string",
        "quantity": 0,
        "price": 0,
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "total_items": 0,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the API

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
        "type": "https://www.squalomail.com/supporto/e-commerce-api/",
        "title": "Resource Not Found",
        "status": 404,
        "detail": "The requested resource could not be found.",
        "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }
      

Add cart line item

Add a new line item to an existing cart.

POST /ecommerce/stores/{store_id}/carts/{cart_id}/lines

Path Parameters

  • store_id REQUIRED

    string
    The store id.

  • cart_id REQUIRED
    string
    The id for the cart.

Body Parameters

  • id REQUIRED
    string
    A unique identifier for the cart line item.
  • product_id REQUIRED
    string
    A unique identifier for the product associated with the cart line item.
  • product_variant_id REQUIRED

    string
    A unique identifier for the product variant associated with the cart line item.

  • quantity REQUIRED

    integer
    The quantity of a cart line item.

  • price REQUIRED

    number
    The price of a cart line item.

  • total_discount NOT REQUIRED

    number
    The discount in amount given to this item.

Add cart line item

BASH

curl -X POST \
    https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/carts/{cart_id}/lines \
    --user "anystring:${apikey}"' \
    -d '{"id":"","product_id":"","product_variant_id":"","quantity":0,"price":0}'

Success Response

HTTP Status 200 – E-commerce Cart Line Item

Information about a specific cart line item.

  • id
    string
    A unique identifier for the cart line item.
  • product_id
    string
    A unique identifier for the product associated with the cart line item.
  • product_title
    string
    The name of the product for the cart line item.
  • product_variant_id
    string
    A unique identifier for the product variant associated with the cart line item.
  • product_variant_title
    string
    The name of the product variant for the cart line item.
  • quantity
    integer

    The quantity of a cart line item.

  • price
    number

    The price of a cart line item.

  • total_discount
    number

    The amount of discount given.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
    "id": "string",
    "product_id": "string",
    "product_title": "string",
    "product_variant_id": "string",
    "product_variant_title": "string",
    "quantity": 0,
    "price": 0,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
        "type": "https://www.squalomail.com/supporto/e-commerce-api/",
        "title": "Resource Not Found",
        "status": 404,
        "detail": "The requested resource could not be found.",
        "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }

Get cart line item

Get information about a specific cart line item.

GET /ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}

Path Parameters

  • store_id REQUIRED

    string
    The store id.

  • cart_id REQUIRED
    string
    The id for the cart.
  • line_id REQUIRED
    string

    The id for the line item of a cart.

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Get cart line item

BASH

curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – E-commerce Cart Line Item

Information about a specific cart line item.

  • id
    string
    A unique identifier for the cart line item.
  • product_id
    string
    A unique identifier for the product associated with the cart line item.
  • product_title
    string
    The name of the product for the cart line item.
  • product_variant_id
    string
    A unique identifier for the product variant associated with the cart line item.
  • product_variant_title
    string
    The name of the product variant for the cart line item.
  • quantity
    integer

    The quantity of a cart line item.

  • price
    number

    The price of a cart line item.

  • total_discount
    number

    The amount of discount given.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
    "id": "string",
    "product_id": "string",
    "product_title": "string",
    "product_variant_id": "string",
    "product_variant_title": "string",
    "quantity": 0,
    "price": 0,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
        "type": "https://www.squalomail.com/supporto/e-commerce-api/",
        "title": "Resource Not Found",
        "status": 404,
        "detail": "The requested resource could not be found.",
        "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }

Add or update cart lines

Add a new cart lines or update an exhisting one.

PUT/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}

See below (same as PATCH)

Update cart line item

Update a specific cart line item.

PATCH /ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}

Path Parameters

  • store_id REQUIRED

    string
    The store id.

  • cart_id REQUIRED
    string
    The id for the cart.
  • line_id REQUIRED
    string

    The id for the line item of a cart.

Body Parameters

  • product_id
    string

    A unique identifier for the product associated with the cart line item

  • product_variant_id
    string
    A unique identifier for the product variant associated with the cart line item.
  • quantity
    integer
    The quantity of a cart line item.
  • price
    number

    The price of a cart line item.

  • total_discount NOT REQUIRED

    number
    The discount in amount given to this item.

Update cart line item

BASH

curl -X PATCH \
    https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id} \
    --user "anystring:${apikey}"' \
    -d '{"product_id":"","product_variant_id":"","quantity":0,"price":0}'

Success Response

HTTP Status 200 – E-commerce Cart Line Item

Information about a specific cart line item.

  • id
    string
    A unique identifier for the cart line item.
  • product_id
    string
    A unique identifier for the product associated with the cart line item.
  • product_title
    string
    The name of the product for the cart line item.
  • product_variant_id
    string
    A unique identifier for the product variant associated with the cart line item.
  • product_variant_title
    string
    The name of the product variant for the cart line item.
  • quantity
    integer

    The quantity of a cart line item.

  • price
    number

    The price of a cart line item.

  • total_discount
    number

    The discount in amount given to this item.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
    "id": "string",
    "product_id": "string",
    "product_title": "string",
    "product_variant_id": "string",
    "product_variant_title": "string",
    "quantity": 0,
    "price": 0,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
        "type": "https://www.squalomail.com/supporto/e-commerce-api/",
        "title": "Resource Not Found",
        "status": 404,
        "detail": "The requested resource could not be found.",
        "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }

Delete cart line item

Delete a specific cart line item.

DELETE /ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}

Path Parameters

  • store_id REQUIRED

    string
    The store id.

  • cart_id REQUIRED
    string
    The id for the cart.
  • line_id REQUIRED
    string

    The id for the line item of a cart.

Delete cart line item

BASH

curl -X DELETE \
    https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id} \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 204

Empty Response

Example response

JSON

{}

Error Response

An error generated by the Squalo API.

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
        "type": "https://www.squalomail.com/supporto/e-commerce-api/",
        "title": "Resource Not Found",
        "status": 404,
        "detail": "The requested resource could not be found.",
        "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }

Orders

Orders represent successful e-commerce transactions, and this data can be used to provide more detailed campaign reports, track sales, and personalize emails to your targeted consumers, and view other e-commerce data in your Squalo account.

List account orders

Get information about an account’s orders.

GET /ecommerce/orders

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • count
    integer

    The number of records to return. Default value is 10. Maximum value is 1000

  • offset
    integer

    Used for pagination, this it the number of records from a collection to skip. Default value is 0.

  • campaign_id
    string

    Restrict results to orders with a specific campaign_id value.

  • outreach_id
    string

    Restrict results to orders with a specific outreach_id value.

  • customer_id
    string

    Restrict results to orders made by a specific customer.

  • has_outreach
    boolean

    Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad.

     

List account orders

BASH
curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/orders?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>&count=10&offset=0&campaign_id=<SOME_STRING_VALUE>&outreach_id=<SOME_STRING_VALUE>&customer_id=<SOME_STRING_VALUE>&has_outreach=<SOME_BOOLEAN_VALUE>' \
    --user "anystring:${apikey}"'

 

Success Response

HTTP Status 200 – Orders

A collection of orders in an account.

  • orders
    object[]

    An array of objects, each representing an order resource.

    Show Properties
  • total_items
    integer

    The total number of items matching the query regardless of pagination.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "orders": [
      {
        "id": "string",
        "customer": {
          "id": "string",
          "email_address": "string",
          "opt_in_status": true,
          "company": "string",
          "first_name": "string",
          "last_name": "string",
          "orders_count": 4,
          "total_spent": 100,
          "address": {
            "address1": "675 Ponce de Leon Ave NE",
            "address2": "Suite 5000",
            "city": "Atlanta",
            "province": "Georgia",
            "province_code": "GA",
            "postal_code": "30308",
            "country": "United States",
            "country_code": "US"
          },
          "created_at": "2015-07-15T19:28:00+00:00",
          "updated_at": "2015-07-15T19:28:00+00:00",
          "_links": [
            {
              "rel": "string",
              "href": "string",
              "method": "GET",
              "targetSchema": "string",
              "schema": "string"
            }
          ]
        },
        "store_id": "string",
        "campaign_id": "839488a60b",
        "landing_site": "http://www.example.com?source=abc",
        "financial_status": "string",
        "fulfillment_status": "string",
        "currency_code": "string",
        "order_total": 0,
        "order_url": "string",
        "discount_total": 0,
        "tax_total": 0,
        "shipping_total": 0,
        "tracking_code": "prec",
        "processed_at_foreign": "2015-07-15T19:28:00+00:00",
        "cancelled_at_foreign": "2015-07-15T19:28:00+00:00",
        "updated_at_foreign": "2015-07-15T19:28:00+00:00",
        "shipping_address": {
          "first_name": "John",
          "last_name": "Doe",
          "name": "John Doe's place",
          "address1": "675 Ponce de Leon Ave NE",
          "address2": "Suite 5000",
          "city": "Atlanta",
          "province": "Georgia",
          "province_code": "GA",
          "postal_code": "30308",
          "country": "United States",
          "country_code": "US",
          "longitude": -75.68903,
          "latitude": 45.427408,
          "phone": "8675309",
          "company": "string"
        },
        "billing_address": {
					"first_name": "John",
          "last_name": "Doe",
          "name": "John Doe",
          "address1": "675 Ponce de Leon Ave NE",
          "address2": "Suite 5000",
          "city": "Atlanta",
          "province": "Georgia",
          "province_code": "GA",
          "postal_code": "30308",
          "country": "United States",
          "country_code": "US",
          "longitude": -75.68903,
          "latitude": 45.427408,
          "phone": "8675309",
          "company": "string"
        },
        "promos": [
          {
            "code": "string",
            "amount_discounted": 0,
            "type": "fixed"
          }
        ],
        "lines": [
          {
            "id": "string",
            "product_id": "string",
            "product_title": "string",
            "product_variant_id": "string",
            "product_variant_title": "string",
            "image_url": "string",
            "quantity": 0,
            "price": 0,
            "discount": 0,
            "_links": [
              {
                "rel": "string",
                "href": "string",
                "method": "GET",
                "targetSchema": "string",
                "schema": "string"
              }
            ]
          }
        ],
        "outreach": {
          "id": "839488a60b",
          "name": "John's Jokes",
          "type": "regular",
          "published_time": "2017-06-06T13:56:12+00:00"
        },
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "total_items": 0,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

List orders

Get information about a store’s orders.

GET /ecommerce/stores/{store_id}/orders

Path Parameters

  • store_idREQUIRED
    string

    The store id.

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • count
    integer

    The number of records to return. Default value is 10. Maximum value is 1000

  • offset
    integer

    Used for pagination, this it the number of records from a collection to skip. Default value is 0.

  • customer_id
    string

    Restrict results to orders made by a specific customer.

  • has_outreach
    boolean

    Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad.

  • campaign_id
    string

    Restrict results to orders with a specific campaign_id value.

  • outreach_id
    string

    Restrict results to orders with a specific outreach_id value.

     

List orders

BASH
curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/orders?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>&count=10&offset=0&customer_id=<SOME_STRING_VALUE>&has_outreach=<SOME_BOOLEAN_VALUE>&campaign_id=<SOME_STRING_VALUE>&outreach_id=<SOME_STRING_VALUE>' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – Orders

A collection of orders in a store.

  • store_id
    string

    The unique identifier for the store.

  • orders
    object[]

    An array of objects, each representing an order in a store.

    Show Properties
  • total_items
    integer

    The total number of items matching the query regardless of pagination.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "store_id": "string",
    "orders": [
      {
        "id": "string",
        "customer": {
          "id": "string",
          "email_address": "string",
          "opt_in_status": true,
          "company": "string",
          "first_name": "string",
          "last_name": "string",
          "orders_count": 4,
          "total_spent": 100,
          "address": {
            "address1": "675 Ponce de Leon Ave NE",
            "address2": "Suite 5000",
            "city": "Atlanta",
            "province": "Georgia",
            "province_code": "GA",
            "postal_code": "30308",
            "country": "United States",
            "country_code": "US"
          },
          "created_at": "2015-07-15T19:28:00+00:00",
          "updated_at": "2015-07-15T19:28:00+00:00",
          "_links": [
            {
              "rel": "string",
              "href": "string",
              "method": "GET",
              "targetSchema": "string",
              "schema": "string"
            }
          ]
        },
        "store_id": "string",
        "campaign_id": "839488a60b",
        "landing_site": "http://www.example.com?source=abc",
        "financial_status": "string",
        "fulfillment_status": "string",
        "currency_code": "string",
        "order_total": 0,
        "order_url": "string",
        "discount_total": 0,
        "tax_total": 0,
        "shipping_total": 0, 
        "gateway": "string",
        "custom_field_1": "string",
        "custom_field_2": "string",
        "custom_field_3": "string",
        "custom_field_4": "string",
        "custom_field_5": "string",
        "custom_field_6": "string",
        "custom_field_7": "string",
        "custom_field_8": "string",
        "custom_field_9": "string",
        "custom_field_10": "string",
        "tracking_code": "prec",
        "processed_at_foreign": "2015-07-15T19:28:00+00:00",
        "cancelled_at_foreign": "2015-07-15T19:28:00+00:00",
        "updated_at_foreign": "2015-07-15T19:28:00+00:00",
        "shipping_address": {
					"first_name": "John",
          "last_name": "Doe",
          "name": "John Doe",
          "address1": "675 Ponce de Leon Ave NE",
          "address2": "Suite 5000",
          "city": "Atlanta",
          "province": "Georgia",
          "province_code": "GA",
          "postal_code": "30308",
          "country": "United States",
          "country_code": "US",
          "longitude": -75.68903,
          "latitude": 45.427408,
          "phone": "8675309",
          "company": "string"
        },
        "billing_address": {
					"first_name": "John",
          "last_name": "Doe",
          "name": "John Doe",
          "address1": "675 Ponce de Leon Ave NE",
          "address2": "Suite 5000",
          "city": "Atlanta",
          "province": "Georgia",
          "province_code": "GA",
          "postal_code": "30308",
          "country": "United States",
          "country_code": "US",
          "longitude": -75.68903,
          "latitude": 45.427408,
          "phone": "8675309",
          "company": "string"
        },
        "promos": [
          {
            "code": "string",
            "amount_discounted": 0,
            "type": "fixed"
          }
        ],
        "lines": [
          {
            "id": "string",
            "product_id": "string",
            "product_title": "string",
            "product_variant_id": "string",
            "product_variant_title": "string",
            "image_url": "string",
            "quantity": 0,
            "price": 0,
            "discount": 0,
            "_links": [
              {
                "rel": "string",
                "href": "string",
                "method": "GET",
                "targetSchema": "string",
                "schema": "string"
              }
            ]
          }
        ],
        "outreach": {
          "id": "839488a60b",
          "name": "John's Jokes",
          "type": "regular",
          "published_time": "2017-06-06T13:56:12+00:00"
        },
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "total_items": 0,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Add order

Add a new order to a store.

POST /ecommerce/stores/{store_id}/orders

Path Parameters

  • store_idREQUIRED
    string

    The store id.

Body Parameters

  • idREQUIRED
    string

    A unique identifier for the order.

  • customerREQUIRED
    object

    Information about a specific customer. For existing customers include only the id parameter in the customer object body.

    Show Properties
  • currency_codeREQUIRED
    string

    The three-letter ISO 4217 code for the currency that the store accepts.

  • order_totalREQUIRED
    number

    The total for the order.

  • linesREQUIRED
    object[]

    An array of the order’s line items.

    Show Properties
  • campaign_id
    string

    A string that uniquely identifies the campaign for an order.

  • landing_site
    string

    The URL for the page where the buyer landed when entering the shop.

  • financial_status
    string

    The order status. Use this parameter to trigger Order Notifications.

  • fulfillment_status
    string

    The fulfillment status for the order. Use this parameter to trigger Order Notifications.

  • order_url
    string

    The URL for the order.

  • gateway
    string

    The gateway of the payment.

  • discount_total
    number

    The total amount of the discounts to be applied to the price of the order.

  • tax_total
    number

    The tax total for the order.

  • shipping_total
    number

    The shipping total for the order.

  • tracking_code
    string

    The Squalo tracking code for the order. Uses the ‘mc_tc’ parameter in E-Commerce tracking URLs. Possible value: "prec".

  • processed_at_foreign
    string

    The date and time the order was processed in ISO 8601 format.

  • cancelled_at_foreign
    string

    The date and time the order was cancelled in ISO 8601 format. Note: passing a value for this parameter will cancel the order being created.

  • updated_at_foreign
    string

    The date and time the order was updated in ISO 8601 format.

  • shipping_address
    object

    The shipping address for the order.

    Show Properties
  • billing_address
    object

    The billing address for the order.

    Show Properties
  • promos
    object[]

    The promo codes applied on the order

    Show Properties
  • outreach
    object

    The outreach associated with this order. For example, an email campaign or Facebook ad.

    Show Properties

Add order

BASH
curl -X POST \
    https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/orders \
    --user "anystring:${apikey}"' \
    -d '{"id":"","customer":{"id":"","email_address":"","opt_in_status":false,"company":"","first_name":"","last_name":"","address":{"address1":"","address2":"","city":"","province":"","province_code":"","postal_code":"","country":"","country_code":""}},"campaign_id":"","landing_site":"","financial_status":"","fulfillment_status":"","currency_code":"","order_total":0,"order_url":"","discount_total":0,"tax_total":0,"shipping_total":0,"tracking_code":"prec","processed_at_foreign":"","cancelled_at_foreign":"","updated_at_foreign":"","shipping_address":{"name":"","address1":"","address2":"","city":"","province":"","province_code":"","postal_code":"","country":"","country_code":"","longitude":0,"latitude":0,"phone":"","company":""},"billing_address":{"name":"","address1":"","address2":"","city":"","province":"","province_code":"","postal_code":"","country":"","country_code":"","longitude":0,"latitude":0,"phone":"","company":""},"promos":[],"lines":[],"outreach":{"id":""}}'

Success Response

HTTP Status 200 – E-commerce Order

Information about a specific order.

  • id
    string

    A unique identifier for the order.

  • customer
    object

    Information about a specific customer.

    Show Properties
  • store_id
    string

    The unique identifier for the store.

  • campaign_id
    string

    A string that uniquely identifies the campaign associated with an order.

  • landing_site
    string

    The URL for the page where the buyer landed when entering the shop.

  • financial_status
    string

    The order status. Use this parameter to trigger Order Notifications.

  • fulfillment_status
    string

    The fulfillment status for the order. Use this parameter to trigger Order Notifications.

  • currency_code
    string

    The three-letter ISO 4217 code for the currency that the store accepts.

  • order_total
    number

    The order total associated with an order.

  • order_url
    string

    The URL for the order.

  • discount_total
    number

    The total amount of the discounts to be applied to the price of the order.

  • tax_total
    number

    The tax total associated with an order.

  • shipping_total
    number

    The shipping total for the order.

  • gateway
    string

    The gateway of the payment.

  • tracking_code
    string

    The Squalo tracking code for the order. Uses the ‘mc_tc’ parameter in E-Commerce tracking URLs. Possible value: "prec".

  • processed_at_foreign
    string

    The date and time the order was processed in ISO 8601 format.

  • cancelled_at_foreign
    string

    The date and time the order was cancelled in ISO 8601 format.

  • updated_at_foreign
    string

    The date and time the order was updated in ISO 8601 format.

  • shipping_address
    object

    The shipping address for the order.

    Show Properties
  • billing_address
    object

    The billing address for the order.

    Show Properties
  • promos
    object[]

    The promo codes applied on the order

    Show Properties
  • lines
    object[]

    An array of the order’s line items.

    Show Properties
  • outreach
    object

    The outreach associated with this order. For example, an email campaign or Facebook ad.

    Show Properties
  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

    Show Properties

Example response

JSON

{
    "id": "string",
    "customer": {
      "id": "string",
      "email_address": "string",
      "opt_in_status": true,
      "company": "string",
      "first_name": "string",
      "last_name": "string",
      "orders_count": 4,
      "total_spent": 100,
      "address": {
        "address1": "675 Ponce de Leon Ave NE",
        "address2": "Suite 5000",
        "city": "Atlanta",
        "province": "Georgia",
        "province_code": "GA",
        "postal_code": "30308",
        "country": "United States",
        "country_code": "US"
      },
      "created_at": "2015-07-15T19:28:00+00:00",
      "updated_at": "2015-07-15T19:28:00+00:00",
      "_links": [
        {
          "rel": "string",
          "href": "string",
          "method": "GET",
          "targetSchema": "string",
          "schema": "string"
        }
      ]
    },
    "store_id": "string",
    "campaign_id": "839488a60b",
    "landing_site": "http://www.example.com?source=abc",
    "financial_status": "string",
    "fulfillment_status": "string",
    "currency_code": "string",
    "order_total": 0,
    "order_url": "string",
    "discount_total": 0,
    "tax_total": 0,
    "shipping_total": 0,
    "gateway": "string",
    "tracking_code": "prec",
    "processed_at_foreign": "2015-07-15T19:28:00+00:00",
    "cancelled_at_foreign": "2015-07-15T19:28:00+00:00",
    "updated_at_foreign": "2015-07-15T19:28:00+00:00",
    "shipping_address": {
      "name": "John Doe",
      "address1": "675 Ponce de Leon Ave NE",
      "address2": "Suite 5000",
      "city": "Atlanta",
      "province": "Georgia",
      "province_code": "GA",
      "postal_code": "30308",
      "country": "United States",
      "country_code": "US",
      "longitude": -75.68903,
      "latitude": 45.427408,
      "phone": "8675309",
      "company": "string"
    },
    "billing_address": {
      "name": "John Doe",
      "address1": "675 Ponce de Leon Ave NE",
      "address2": "Suite 5000",
      "city": "Atlanta",
      "province": "Georgia",
      "province_code": "GA",
      "postal_code": "30308",
      "country": "United States",
      "country_code": "US",
      "longitude": -75.68903,
      "latitude": 45.427408,
      "phone": "8675309",
      "company": "string"
    },
    "promos": [
      {
        "code": "string",
        "amount_discounted": 0,
        "type": "fixed"
      }
    ],
    "lines": [
      {
        "id": "string",
        "product_id": "string",
        "product_title": "string",
        "product_variant_id": "string",
        "product_variant_title": "string",
        "image_url": "string",
        "quantity": 0,
        "price": 0,
        "discount": 0,
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "outreach": {
      "id": "839488a60b",
      "name": "John's Jokes",
      "type": "regular",
      "published_time": "2017-06-06T13:56:12+00:00"
    },
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Get order info

Get information about a specific order.

GET /ecommerce/stores/{store_id}/orders/{order_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • order_idREQUIRED
    string

    The id for the order in a store.

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

     

Get order info

BASH
curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/orders/{order_id}?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – E-commerce Order

Information about a specific order.

    • id
      string

      A unique identifier for the order.

    • customer
      object

      Information about a specific customer.

      Show Properties
    • store_id
      string

      The unique identifier for the store.

    • campaign_id
      string

      A string that uniquely identifies the campaign associated with an order.

    • landing_site
      string

      The URL for the page where the buyer landed when entering the shop.

    • financial_status
      string

      The order status. Use this parameter to trigger Order Notifications.

    • fulfillment_status
      string

      The fulfillment status for the order. Use this parameter to trigger Order Notifications.

    • currency_code
      string

      The three-letter ISO 4217 code for the currency that the store accepts.

    • order_total
      number

      The order total associated with an order.

    • order_url
      string

      The URL for the order.

    • gateway
      string

      The gateway of the payment.

  • custom_field_1
    string

    A custom field that can be added to the order.

  • custom_field_2
    string

    A custom field that can be added to the order.

  • custom_field_3
    string

    A custom field that can be added to the order.

  • custom_field_4
    string

    A custom field that can be added to the order.

  • custom_field_5
    string

    A custom field that can be added to the order.

  • custom_field_6
    string

    A custom field that can be added to the order.

  • custom_field_7
    string

    A custom field that can be added to the order.

  • custom_field_8
    string

    A custom field that can be added to the order.

  • custom_field_9
    string

    A custom field that can be added to the order.

  • custom_field_10
    string

    A custom field that can be added to the order.

  • discount_total
    number

    The total amount of the discounts to be applied to the price of the order.

  • tax_total
    number

    The tax total associated with an order.

  • shipping_total
    number

    The shipping total for the order.

  • tracking_code
    string

    The Squalo tracking code for the order. Uses the ‘mc_tc’ parameter in E-Commerce tracking URLs. Possible value: "prec".

  • processed_at_foreign
    string

    The date and time the order was processed in ISO 8601 format.

  • cancelled_at_foreign
    string

    The date and time the order was cancelled in ISO 8601 format.

  • updated_at_foreign
    string

    The date and time the order was updated in ISO 8601 format.

  • shipping_address
    object

    The shipping address for the order.

    Show Properties
  • billing_address
    object

    The billing address for the order.

    Show Properties
  • promos
    object[]

    The promo codes applied on the order

    Show Properties
  • lines
    object[]

    An array of the order’s line items.

    Show Properties
  • outreach
    object

    The outreach associated with this order. For example, an email campaign or Facebook ad.

    Show Properties
  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

 

Example response

JSON

{
    "id": "string",
    "customer": {
      "id": "string",
      "email_address": "string",
      "opt_in_status": true,
      "company": "string",
      "first_name": "string",
      "last_name": "string",
      "orders_count": 4,
      "total_spent": 100,
      "address": {
        "address1": "675 Ponce de Leon Ave NE",
        "address2": "Suite 5000",
        "city": "Atlanta",
        "province": "Georgia",
        "province_code": "GA",
        "postal_code": "30308",
        "country": "United States",
        "country_code": "US"
      },
      "created_at": "2015-07-15T19:28:00+00:00",
      "updated_at": "2015-07-15T19:28:00+00:00",
      "_links": [
        {
          "rel": "string",
          "href": "string",
          "method": "GET",
          "targetSchema": "string",
          "schema": "string"
        }
      ]
    },
    "store_id": "string",
    "campaign_id": "839488a60b",
    "landing_site": "http://www.example.com?source=abc",
    "financial_status": "string",
    "fulfillment_status": "string",
    "currency_code": "string",
    "order_total": 0,
    "order_url": "string",
    "discount_total": 0,
    "tax_total": 0,
    "shipping_total": 0,
    "gateway": "string",
    "custom_field_1": "string",
    "custom_field_2": "string",
    "custom_field_3": "string",
    "custom_field_4": "string",
    "custom_field_5": "string",
    "custom_field_6": "string",
    "custom_field_7": "string",
    "custom_field_8": "string",
    "custom_field_9": "string",
    "custom_field_10": "string",
    "tracking_code": "prec",
    "processed_at_foreign": "2015-07-15T19:28:00+00:00",
    "cancelled_at_foreign": "2015-07-15T19:28:00+00:00",
    "updated_at_foreign": "2015-07-15T19:28:00+00:00",
    "shipping_address": {
      "name": "John Doe",
      "address1": "675 Ponce de Leon Ave NE",
      "address2": "Suite 5000",
      "city": "Atlanta",
      "province": "Georgia",
      "province_code": "GA",
      "postal_code": "30308",
      "country": "United States",
      "country_code": "US",
      "longitude": -75.68903,
      "latitude": 45.427408,
      "phone": "8675309",
      "company": "string"
    },
    "billing_address": {
      "name": "John Doe",
      "address1": "675 Ponce de Leon Ave NE",
      "address2": "Suite 5000",
      "city": "Atlanta",
      "province": "Georgia",
      "province_code": "GA",
      "postal_code": "30308",
      "country": "United States",
      "country_code": "US",
      "longitude": -75.68903,
      "latitude": 45.427408,
      "phone": "8675309",
      "company": "string"
    },
    "promos": [
      {
        "code": "string",
        "amount_discounted": 0,
        "type": "fixed"
      }
    ],
    "lines": [
      {
        "id": "string",
        "product_id": "string",
        "product_title": "string",
        "product_variant_id": "string",
        "product_variant_title": "string",
        "image_url": "string",
        "quantity": 0,
        "price": 0,
        "discount": 0,
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "outreach": {
      "id": "839488a60b",
      "name": "John's Jokes",
      "type": "regular",
      "published_time": "2017-06-06T13:56:12+00:00"
    },
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Create order

Create a specific order.

POST /ecommerce/stores/{store_id}/orders/{order_id}

See below (same as PATCH)

Create or update order

Create a specific order or update an exhisting one.

PUT/ecommerce/stores/{store_id}/orders/{order_id}

See below (same as PATCH)

Update order

Update a specific order.

PATCH /ecommerce/stores/{store_id}/orders/{order_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • order_idREQUIRED
    string

    The id for the order in a store.

Body Parameters

• trigger_squalo_events
boolean
If set to false no SqualoEvents will be triggered – this includes, automations, Zapier integrations, Webhooks, etc.
Default: true

  • customer
    object

    Information about a specific customer. Orders for existing customers should include only the id parameter in the customer object body.

    Show Properties
  • campaign_id
    string

    A string that uniquely identifies the campaign associated with an order.

  • landing_site
    string

    The URL for the page where the buyer landed when entering the shop.

  • financial_status
    string

    The order status. Use this parameter to trigger Order Notifications.

  • fulfillment_status
    string

    The fulfillment status for the order. Use this parameter to trigger Order Notifications.

  • currency_code
    string

    The three-letter ISO 4217 code for the currency that the store accepts.

  • order_total
    number

    The order total associated with an order.

  • order_subtotal
    number

    The order subtotal associated with an order.

  • order_url
    string

    The URL for the order.

  • discount_total
    number

    The total amount of the discounts to be applied to the price of the order.

  • tax_total
    number

    The tax total associated with an order.

  • shipping_total
    number

    The shipping total for the order.

  • gateway
    string

    The gateway of the payment.

  • tracking_code
    string

    The Squalo tracking code for the order. Uses the ‘mc_tc’ parameter in E-Commerce tracking URLs. Possible value: "prec".

  • processed_at_foreign
    string

    The date and time the order was processed in ISO 8601 format.

  • cancelled_at_foreign
    string

    The date and time the order was cancelled in ISO 8601 format. Note: passing a value for this parameter will cancel the order being edited.

  • updated_at_foreign
    string

    The date and time the order was updated in ISO 8601 format.

  • shipping_address
    object

    The shipping address for the order. It is an object with many properties. Please look AT GET to get more info.

    Show Properties
  • billing_address
    object

    The billing address for the order. It is an object with many properties. Please look AT GET to get more info.

    Show Properties
  • custom_field_1
    string

    A custom field that can be added to the order.

  • custom_field_2
    string

    A custom field that can be added to the order.

  • custom_field_3
    string

    A custom field that can be added to the order.

  • custom_field_4
    string

    A custom field that can be added to the order.

  • custom_field_5
    string

    A custom field that can be added to the order.

  • custom_field_6
    string

    A custom field that can be added to the order.

  • custom_field_7
    string

    A custom field that can be added to the order.

  • custom_field_8
    string

    A custom field that can be added to the order.

  • custom_field_9
    string

    A custom field that can be added to the order.

  • custom_field_10
    string

    A custom field that can be added to the order.

  • promos
    object[]

    The promo codes applied on the order. Note: Patch will completely replace the value of promos with the new one provided.

    Show Properties
  • lines
    object[]

    An array of the order’s line items.

    Show Properties
  • outreach
    object

    The outreach associated with this order. For example, an email campaign or Facebook ad.

     

Update order

BASH
curl -X PATCH \
  https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/orders/{order_id} \
  --user "anystring:${apikey}"' \
  -d '{"customer":{"opt_in_status":false,"company":"","first_name":"","last_name":"","address":{"address1":"","address2":"","city":"","province":"","province_code":"","postal_code":"","country":"","country_code":""}},"campaign_id":"","landing_site":"","financial_status":"","fulfillment_status":"","currency_code":"","order_total":0,"order_url":"","discount_total":0,"tax_total":0,"shipping_total":0,"tracking_code":"prec","processed_at_foreign":"","cancelled_at_foreign":"","updated_at_foreign":"","custom_field_1":"","custom_field_2":"","custom_field_3":"","custom_field_4":"","custom_field_5":"","custom_field_6":"","custom_field_7":"","custom_field_8":"","custom_field_9":"","custom_field_10":"","shipping_address":{"name":"","address1":"","address2":"","city":"","province":"","province_code":"","postal_code":"","country":"","country_code":"","longitude":0,"latitude":0,"phone":"","company":""},"billing_address":{"name":"","address1":"","address2":"","city":"","province":"","province_code":"","postal_code":"","country":"","country_code":"","longitude":0,"latitude":0,"phone":"","company":""},"promos":[],"lines":[],"outreach":{"id":""}}'

Success Response

HTTP Status 200 – E-commerce Order

Information about a specific order.

  • id
    string

    A unique identifier for the order.

  • customer
    object

    Information about a specific customer.

    Show Properties
  • store_id
    string

    The unique identifier for the store.

  • campaign_id
    string

    A string that uniquely identifies the campaign associated with an order.

  • landing_site
    string

    The URL for the page where the buyer landed when entering the shop.

  • financial_status
    string

    The order status. Use this parameter to trigger Order Notifications.

  • fulfillment_status
    string

    The fulfillment status for the order. Use this parameter to trigger Order Notifications.

  • currency_code
    string

    The three-letter ISO 4217 code for the currency that the store accepts.

  • order_total
    numberThe order total associated with an order.
  • order_subtotal
    numberThe order subtotal associated with an order.
  • order_url
    string

    The URL for the order.

  • discount_total
    number

    The total amount of the discounts to be applied to the price of the order.

  • tax_total
    number

    The tax total associated with an order.

  • shipping_total
    number

    The shipping total for the order.

  • gateway
    string

    The gateway of the payment.

  • custom_field_1
    string

    A custom field of the order.

  • custom_field_2
    string

    A custom field of the order.

  • custom_field_3
    string

    A custom field of the order.

  • custom_field_4
    string

    A custom field of the order.

  • custom_field_5
    string

    A custom field of the order.

  • custom_field_6
    string

    A custom field of the order.

  • custom_field_7
    string

    A custom field of the order.

  • custom_field_8
    string

    A custom field of the order.

  • custom_field_9
    string

    A custom field of the order.

  • custom_field_10
    string

    A custom field of the order.

  • tracking_code
    string

    The Squalo tracking code for the order. Uses the ‘mc_tc’ parameter in E-Commerce tracking URLs. Possible value: "prec".

  • processed_at_foreign
    string

    The date and time the order was processed in ISO 8601 format.

  • cancelled_at_foreign
    string

    The date and time the order was cancelled in ISO 8601 format.

  • updated_at_foreign
    string

    The date and time the order was updated in ISO 8601 format.

  • shipping_address
    object

    The shipping address for the order.

    Show Properties
  • billing_address
    object

    The billing address for the order.

    Show Properties
  • promos
    object[]

    The promo codes applied on the order

    Show Properties
  • lines
    object[]

    An array of the order’s line items.

    Show Properties
  • outreach
    object

    The outreach associated with this order. For example, an email campaign or Facebook ad.

    Show Properties
  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "id": "string",
    "customer": {
      "id": "string",
      "email_address": "string",
      "opt_in_status": true,
      "company": "string",
      "first_name": "string",
      "last_name": "string",
      "orders_count": 4,
      "total_spent": 100,
      "address": {
        "address1": "675 Ponce de Leon Ave NE",
        "address2": "Suite 5000",
        "city": "Atlanta",
        "province": "Georgia",
        "province_code": "GA",
        "postal_code": "30308",
        "country": "United States",
        "country_code": "US"
      },
      "created_at": "2015-07-15T19:28:00+00:00",
      "updated_at": "2015-07-15T19:28:00+00:00",
      "_links": [
        {
          "rel": "string",
          "href": "string",
          "method": "GET",
          "targetSchema": "string",
          "schema": "string"
        }
      ]
    },
    "store_id": "string",
    "campaign_id": "839488a60b",
    "landing_site": "http://www.example.com?source=abc",
    "financial_status": "string",
    "fulfillment_status": "string",
    "currency_code": "string",
    "order_total": 0,
    "order_subtotal": 0,
    "order_url": "string",
    "discount_total": 0,
    "tax_total": 0,
    "shipping_total": 0,
    "gateway": "string",
    "tracking_code": "prec",
    "processed_at_foreign": "2015-07-15T19:28:00+00:00",
    "cancelled_at_foreign": "2015-07-15T19:28:00+00:00",
    "updated_at_foreign": "2015-07-15T19:28:00+00:00",
    "custom_field_1": "string",
    "custom_field_2": "string",
    "custom_field_3": "string",
    "custom_field_4": "string",
    "custom_field_5": "string",
    "custom_field_6": "string",
    "custom_field_7": "string",
    "custom_field_8": "string",
    "custom_field_9": "string",
    "custom_field_10": "string",
    "shipping_address": {
      "name": "John Doe",
      "address1": "675 Ponce de Leon Ave NE",
      "address2": "Suite 5000",
      "city": "Atlanta",
      "province": "Georgia",
      "province_code": "GA",
      "postal_code": "30308",
      "country": "United States",
      "country_code": "US",
      "longitude": -75.68903,
      "latitude": 45.427408,
      "phone": "8675309",
      "company": "string"
    },
    "billing_address": {
      "name": "John Doe",
      "address1": "675 Ponce de Leon Ave NE",
      "address2": "Suite 5000",
      "city": "Atlanta",
      "province": "Georgia",
      "province_code": "GA",
      "postal_code": "30308",
      "country": "United States",
      "country_code": "US",
      "longitude": -75.68903,
      "latitude": 45.427408,
      "phone": "8675309",
      "company": "string"
    },
    "promos": [
      {
        "code": "string",
        "amount_discounted": 0,
        "type": "fixed"
      }
    ],
    "lines": [
      {
        "id": "string",
        "product_id": "string",
        "product_title": "string",
        "product_variant_id": "string",
        "product_variant_title": "string",
        "image_url": "string",
        "quantity": 0,
        "price": 0,
        "discount": 0,
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "outreach": {
      "id": "839488a60b",
      "name": "John's Jokes",
      "type": "regular",
      "published_time": "2017-06-06T13:56:12+00:00"
    },
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Delete order

Delete an order.

DELETE /ecommerce/stores/{store_id}/orders/{order_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • order_idREQUIRED
    string

    The id for the order in a store.

Delete order

BASH
curl -X DELETE \
    https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/orders/{order_id} \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 204

Empty Response

Example response

JSON

{}

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Order Lines

Each Order contains one or more Order Lines, which represent a specific Product Variant that a Customer purchases.

List order line items

Get information about an order’s line items.

GET /ecommerce/stores/{store_id}/orders/{order_id}/lines

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • order_idREQUIRED
    string

    The id for the order in a store.

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • count
    integer

    The number of records to return. Default value is 10. Maximum value is 1000

  • offset
    integer

    Used for pagination, this it the number of records from a collection to skip. Default value is 0.

     

List order line items

BASH
curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/orders/{order_id}/lines?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>&count=10&offset=0' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – Order Lines

A collection of an order’s line items.

  • store_id
    string

    The store id.

  • order_id
    string

    The order id.

  • lines
    object[]

    An array of objects, each representing an order’s line item.

    Show Properties
  • total_items
    integer

    The total number of items matching the query regardless of pagination.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "store_id": "string",
    "order_id": "string",
    "lines": [
      {
        "id": "string",
        "product_id": "string",
        "product_title": "string",
        "product_variant_id": "string",
        "product_variant_title": "string",
        "image_url": "string",
        "quantity": 0,
        "price": 0,
        "discount": 0,
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "total_items": 0,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Add order line item

Add a new line item to an existing order.

POST /ecommerce/stores/{store_id}/orders/{order_id}/lines

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • order_idREQUIRED
    string

    The id for the order in a store.

Body Parameters

  • idREQUIRED
    string

    A unique identifier for the order line item.

  • product_idREQUIRED
    string

    A unique identifier for the product associated with the order line item.

  • product_variant_idREQUIRED
    string

    A unique identifier for the product variant associated with the order line item.

  • quantityREQUIRED
    integer

    The quantity of an order line item.

  • priceREQUIRED
    number

    The price of an order line item.

  • discount
    number

    The total discount amount applied to this line item.

     

Add order line item

BASH
curl -X POST \
  https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/orders/{order_id}/lines \
  --user "anystring:${apikey}"' \
  -d '{"id":"","product_id":"","product_variant_id":"","quantity":0,"price":0,"discount":0}'

Success Response

HTTP Status 200 – E-commerce Order Line Item

Information about a specific order line.

  • id
    string

    A unique identifier for an order line item.

  • product_id
    string

    A unique identifier for the product associated with an order line item.

  • product_title
    string

    The name of the product for an order line item.

  • product_variant_id
    string

    A unique identifier for the product variant associated with an order line item.

  • product_variant_title
    string

    The name of the product variant for an order line item.

  • image_url
    string

    The image URL for a product.

  • quantity
    integer

    The order line item quantity.

  • price
    number

    The order line item price.

  • discount
    number

    The total discount amount applied to a line item.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "id": "string",
    "product_id": "string",
    "product_title": "string",
    "product_variant_id": "string",
    "product_variant_title": "string",
    "image_url": "string",
    "quantity": 0,
    "price": 0,
    "discount": 0,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Get order line item

Get information about a specific order line item.

GET /ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • order_idREQUIRED
    string

    The id for the order in a store.

  • line_idREQUIRED
    string

    The id for the line item of an order.

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

     

Get order line item

BASH
curl -X GET \
    'https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – E-commerce Order Line Item

Information about a specific order line.

  • id
    string

    A unique identifier for an order line item.

  • product_id
    string

    A unique identifier for the product associated with an order line item.

  • product_title
    string

    The name of the product for an order line item.

  • product_variant_id
    string

    A unique identifier for the product variant associated with an order line item.

  • product_variant_title
    string

    The name of the product variant for an order line item.

  • image_url
    string

    The image URL for a product.

  • quantity
    integer

    The order line item quantity.

  • price
    number

    The order line item price.

  • discount
    number

    The total discount amount applied to a line item.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "id": "string",
    "product_id": "string",
    "product_title": "string",
    "product_variant_id": "string",
    "product_variant_title": "string",
    "image_url": "string",
    "quantity": 0,
    "price": 0,
    "discount": 0,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Create or update order line

Create a specific order line or update an exhisting one.

PUT/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}

See below (same as PATCH)

Update order line item

Update a specific order line item.

PATCH /ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • order_idREQUIRED
    string

    The id for the order in a store.

  • line_idREQUIRED
    string

    The id for the line item of an order.

Body Parameters

  • product_id
    string

    A unique identifier for the product associated with the order line item.

  • product_variant_id
    string

    A unique identifier for the product variant associated with the order line item.

  • quantity
    integer

    The quantity of an order line item.

  • price
    number

    The price of an order line item.

  • discount
    number

    The total discount amount applied to this line item.

     

Update order line item

BASH
curl -X PATCH \
  https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id} \
  --user "anystring:${apikey}"' \
  -d '{"product_id":"","product_variant_id":"","quantity":0,"price":0,"discount":0}'

Success Response

HTTP Status 200 – E-commerce Order Line Item

Information about a specific order line.

  • id
    string

    A unique identifier for an order line item.

  • product_id
    string

    A unique identifier for the product associated with an order line item.

  • product_title
    string

    The name of the product for an order line item.

  • product_variant_id
    string

    A unique identifier for the product variant associated with an order line item.

  • product_variant_title
    string

    The name of the product variant for an order line item.

  • image_url
    string

    The image URL for a product.

  • quantity
    integer

    The order line item quantity.

  • price
    number

    The order line item price.

  • discount
    number

    The total discount amount applied to a line item.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

    Show Properties

Example response

JSON

{
    "id": "string",
    "product_id": "string",
    "product_title": "string",
    "product_variant_id": "string",
    "product_variant_title": "string",
    "image_url": "string",
    "quantity": 0,
    "price": 0,
    "discount": 0,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Delete order line item

Delete a specific order line item.

DELETE /ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • order_idREQUIRED
    string

    The id for the order in a store.

  • line_idREQUIRED
    string

    The id for the line item of an order.

     

Delete order line item

BASH
curl -X DELETE \
    https://api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id} \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 204

Empty Response

Example response

JSON

{}

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Lists

Your Squalo list, also known as your audience, is where you store and manage all of your contacts.

Get lists info

Get information about all lists in the account.

GET /lists

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • count
    integer

    The number of records to return. Default value is 10. Maximum value is 1000

  • offset
    integer

    Used for pagination, this it the number of records from a collection to skip. Default value is 0.

  • before_date_created
    string

    Restrict response to lists created before the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.

  • since_date_created
    string

    Restrict results to lists created after the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.

  • before_campaign_last_sent
    string

    Restrict results to lists created before the last campaign send date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.

  • since_campaign_last_sent
    string

    Restrict results to lists created after the last campaign send date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.

  • email
    string

    Restrict results to lists that include a specific subscriber’s email address.

  • sort_field
    string

    Returns files sorted by the specified field. Possible value: "date_created".

  • sort_dir
    string

    Determines the order direction for sorted results. Possible values: "ASC" or "DESC".

  • has_ecommerce_store
    boolean

    Restrict results to lists that contain an active, connected, undeleted ecommerce store.

Get lists info

BASH
curl -X GET \
    'https://.api.squalomail.com/mc/v3/lists?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>&count=10&offset=0&before_date_created=<SOME_STRING_VALUE>&since_date_created=<SOME_STRING_VALUE>&before_campaign_last_sent=<SOME_STRING_VALUE>&since_campaign_last_sent=<SOME_STRING_VALUE>&email=<SOME_STRING_VALUE>&sort_field=<SOME_STRING_VALUE>&sort_dir=<SOME_STRING_VALUE>&has_ecommerce_store=<SOME_BOOLEAN_VALUE>' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – Subscriber Lists

A collection of subscriber lists for this account. Lists contain subscribers who have opted-in to receive correspondence from you or your organization.

  • lists
    object[]

    An array of objects, each representing a list.

    Show Properties
  • total_items
    integer

    The total number of items matching the query regardless of pagination.

  • constraints
    object

    Do particular authorization constraints around this collection limit creation of new instances?

    Show Properties
  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "lists": [
      {
        "id": "string",
        "web_id": 0,
        "name": "string",
        "contact": {
          "company": "string",
          "address1": "string",
          "address2": "string",
          "city": "string",
          "state": "string",
          "zip": "string",
          "country": "string",
          "phone": "string"
        },
        "permission_reminder": "string",
        "use_archive_bar": false,
        "campaign_defaults": {
          "from_name": "string",
          "from_email": "string",
          "subject": "string",
          "language": "string"
        },
        "notify_on_subscribe": false,
        "notify_on_unsubscribe": false,
        "date_created": "2019-08-24T14:15:22Z",
        "list_rating": 0,
        "email_type_option": true,
        "subscribe_url_short": "string",
        "subscribe_url_long": "string",
        "beamer_address": "string",
        "visibility": "pub",
        "double_optin": false,
        "has_welcome": false,
        "marketing_permissions": false,
        "modules": [
          "string"
        ],
        "stats": {
          "member_count": 0,
          "total_contacts": 0,
          "unsubscribe_count": 0,
          "cleaned_count": 0,
          "member_count_since_send": 0,
          "unsubscribe_count_since_send": 0,
          "cleaned_count_since_send": 0,
          "campaign_count": 0,
          "campaign_last_sent": "2019-08-24T14:15:22Z",
          "merge_field_count": 0,
          "avg_sub_rate": 0,
          "avg_unsub_rate": 0,
          "target_sub_rate": 0,
          "open_rate": 0,
          "click_rate": 0,
          "last_sub_date": "2019-08-24T14:15:22Z",
          "last_unsub_date": "2019-08-24T14:15:22Z"
        },
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "total_items": 0,
    "constraints": {
      "may_create": true,
      "max_instances": 0,
      "current_total_instances": 0
    },
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Add list

Create a new list in your Squalo account.

POST /lists

Body Parameters

  • nameREQUIRED
    string

    The name of the list.

  • contactREQUIRED
    object

    Contact information displayed in campaign footers to comply with international spam laws.

    Show Properties
  • permission_reminderREQUIRED
    string

    The permission reminder for the list.

  • campaign_defaultsREQUIRED
    object

    Default values for campaigns created for this list.

    Show Properties
  • email_type_optionREQUIRED
    boolean

    Whether the list supports multiple formats for emails. When set to true, subscribers can choose whether they want to receive HTML or plain-text emails. When set to false, subscribers will receive HTML emails, with a plain-text alternative backup.

  • use_archive_bar
    boolean

    Whether campaigns for this list use the Archive Bar in archives by default.

  • notify_on_subscribe
    string

    The email address to send subscribe notifications to.

  • notify_on_unsubscribe
    string

    The email address to send unsubscribe notifications to.

  • visibility
    string

    Whether this list is public or private Possible values: "pub" or "prv".

  • double_optin
    boolean

    Whether or not to require the subscriber to confirm subscription via email.

  • marketing_permissions
    boolean

    Whether or not the list has marketing permissions (eg. GDPR) enabled.

     

Add list

JSON
curl -X POST \
  https://.api.squalomail.com/mc/v3/lists \
  --user "anystring:${apikey}"' \
  -d '{"name":"","contact":{"company":"","address1":"","address2":"","city":"","state":"","zip":"","country":"","phone":""},"permission_reminder":"","use_archive_bar":false,"campaign_defaults":{"from_name":"","from_email":"","subject":"","language":""},"notify_on_subscribe":"","notify_on_unsubscribe":"","email_type_option":false,"visibility":"pub","double_optin":false,"marketing_permissions":false}'

 

Success Response

HTTP Status 200 – Subscriber List

Information about a specific list.

  • id
    string

    A string that uniquely identifies this list.

  • web_id
    integer

    The ID used in the Squalo web application. View this list in your Squalo account at https://{dc}.admin.squalomail.com/lists/members/?id={web_id}.

  • name
    string

    The name of the list.

  • contact
    object

    Contact information displayed in campaign footers to comply with international spam laws.

    Show Properties
  • permission_reminder
    string

    The permission reminder for the list.

  • use_archive_bar
    boolean

    Whether campaigns for this list use the Archive Bar in archives by default.

  • campaign_defaults
    object

    Default values for campaigns created for this list.

    Show Properties
  • notify_on_subscribe
    string

    The email address to send subscribe notifications to.

  • notify_on_unsubscribe
    string

    The email address to send unsubscribe notifications to.

  • date_created
    string

    The date and time that this list was created in ISO 8601 format.

  • list_rating
    integer

    An auto-generated activity score for the list (0-5).

  • email_type_option
    boolean

    Whether the list supports multiple formats for emails. When set to true, subscribers can choose whether they want to receive HTML or plain-text emails. When set to false, subscribers will receive HTML emails, with a plain-text alternative backup.

  • subscribe_url_short
    string

    Our url shortened version of this list’s subscribe form.

  • subscribe_url_long
    string

    The full version of this list’s subscribe form (host will vary).

  • beamer_address
    string

    The list’s Email Beamer address.

  • visibility
    string

    Whether this list is public or private. Possible values: "pub" or "prv".

  • double_optin
    boolean

    Whether or not to require the subscriber to confirm subscription via email.

  • has_welcome
    boolean

    Whether or not this list has a welcome automation connected. Welcome Automations: welcomeSeries, singleWelcome, emailFollowup.

  • marketing_permissions
    boolean

    Whether or not the list has marketing permissions (eg. GDPR) enabled.

  • modules
    string[]

    Any list-specific modules installed for this list.

  • stats
    object

    Stats for the list. Many of these are cached for at least five minutes.

    Show Properties
  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "id": "string",
    "web_id": 0,
    "name": "string",
    "contact": {
      "company": "string",
      "address1": "string",
      "address2": "string",
      "city": "string",
      "state": "string",
      "zip": "string",
      "country": "string",
      "phone": "string"
    },
    "permission_reminder": "string",
    "use_archive_bar": false,
    "campaign_defaults": {
      "from_name": "string",
      "from_email": "string",
      "subject": "string",
      "language": "string"
    },
    "notify_on_subscribe": false,
    "notify_on_unsubscribe": false,
    "date_created": "2019-08-24T14:15:22Z",
    "list_rating": 0,
    "email_type_option": true,
    "subscribe_url_short": "string",
    "subscribe_url_long": "string",
    "beamer_address": "string",
    "visibility": "pub",
    "double_optin": false,
    "has_welcome": false,
    "marketing_permissions": false,
    "modules": [
      "string"
    ],
    "stats": {
      "member_count": 0,
      "total_contacts": 0,
      "unsubscribe_count": 0,
      "cleaned_count": 0,
      "member_count_since_send": 0,
      "unsubscribe_count_since_send": 0,
      "cleaned_count_since_send": 0,
      "campaign_count": 0,
      "campaign_last_sent": "2019-08-24T14:15:22Z",
      "merge_field_count": 0,
      "avg_sub_rate": 0,
      "avg_unsub_rate": 0,
      "target_sub_rate": 0,
      "open_rate": 0,
      "click_rate": 0,
      "last_sub_date": "2019-08-24T14:15:22Z",
      "last_unsub_date": "2019-08-24T14:15:22Z"
    },
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Get list info

Get information about a specific list in your Squalo account. Results include list members who have signed up but haven’t confirmed their subscription yet and unsubscribed or cleaned.

GET /lists/{list_id}

Path Parameters

  • list_idREQUIRED
    string

    The unique ID for the list.

Query Parameters

  • fields
    string[]

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • exclude_fields
    string[]

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • include_total_contacts
    boolean

    Return the total_contacts field in the stats response, which contains an approximate contact count for the given list.

     

Get list info

BASH
curl -X GET \
    'https://.api.squalomail.com/mc/v3/lists/{list_id}?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>&include_total_contacts=<SOME_BOOLEAN_VALUE>' \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – Subscriber List

Information about a specific list.

  • id
    string

    A string that uniquely identifies this list.

  • web_id
    integer

    The ID used in the Squalo web application. View this list in your Squalo account at https://{dc}.admin.squalomail.com/lists/members/?id={web_id}.

  • name
    string

    The name of the list.

  • contact
    object

    Contact information displayed in campaign footers to comply with international spam laws.

    Show Properties
  • permission_reminder
    string

    The permission reminder for the list.

  • use_archive_bar
    boolean

    Whether campaigns for this list use the Archive Bar in archives by default.

  • campaign_defaults
    object

    Default values for campaigns created for this list.

    Show Properties
  • notify_on_subscribe
    string

    The email address to send subscribe notifications to.

  • notify_on_unsubscribe
    string

    The email address to send unsubscribe notifications to.

  • date_created
    string

    The date and time that this list was created in ISO 8601 format.

  • list_rating
    integer

    An auto-generated activity score for the list (0-5).

  • email_type_option
    boolean

    Whether the list supports multiple formats for emails. When set to true, subscribers can choose whether they want to receive HTML or plain-text emails. When set to false, subscribers will receive HTML emails, with a plain-text alternative backup.

  • subscribe_url_short
    string

    Our url shortened version of this list’s subscribe form.

  • subscribe_url_long
    string

    The full version of this list’s subscribe form (host will vary).

  • beamer_address
    string

    The list’s Email Beamer address.

  • visibility
    string

    Whether this list is public or private. Possible values: "pub" or "prv".

  • double_optin
    boolean

    Whether or not to require the subscriber to confirm subscription via email.

  • has_welcome
    boolean

    Whether or not this list has a welcome automation connected. Welcome Automations: welcomeSeries, singleWelcome, emailFollowup.

  • marketing_permissions
    boolean

    Whether or not the list has marketing permissions (eg. GDPR) enabled.

  • modules
    string[]

    Any list-specific modules installed for this list.

  • stats
    object

    Stats for the list. Many of these are cached for at least five minutes.

    Show Properties
  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

     

Example response

JSON

{
    "id": "string",
    "web_id": 0,
    "name": "string",
    "contact": {
      "company": "string",
      "address1": "string",
      "address2": "string",
      "city": "string",
      "state": "string",
      "zip": "string",
      "country": "string",
      "phone": "string"
    },
    "permission_reminder": "string",
    "use_archive_bar": false,
    "campaign_defaults": {
      "from_name": "string",
      "from_email": "string",
      "subject": "string",
      "language": "string"
    },
    "notify_on_subscribe": false,
    "notify_on_unsubscribe": false,
    "date_created": "2019-08-24T14:15:22Z",
    "list_rating": 0,
    "email_type_option": true,
    "subscribe_url_short": "string",
    "subscribe_url_long": "string",
    "beamer_address": "string",
    "visibility": "pub",
    "double_optin": false,
    "has_welcome": false,
    "marketing_permissions": false,
    "modules": [
      "string"
    ],
    "stats": {
      "member_count": 0,
      "total_contacts": 0,
      "unsubscribe_count": 0,
      "cleaned_count": 0,
      "member_count_since_send": 0,
      "unsubscribe_count_since_send": 0,
      "cleaned_count_since_send": 0,
      "campaign_count": 0,
      "campaign_last_sent": "2019-08-24T14:15:22Z",
      "merge_field_count": 0,
      "avg_sub_rate": 0,
      "avg_unsub_rate": 0,
      "target_sub_rate": 0,
      "open_rate": 0,
      "click_rate": 0,
      "last_sub_date": "2019-08-24T14:15:22Z",
      "last_unsub_date": "2019-08-24T14:15:22Z"
    },
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Update lists

Update the settings for a specific list.

PATCH /lists/{list_id}

Path Parameters

  • list_idREQUIRED
    string

    The unique ID for the list.

Body Parameters

  • nameREQUIRED
    string

    The name of the list.

  • contactREQUIRED
    object

    Contact information displayed in campaign footers to comply with international spam laws.

    Show Properties
  • permission_reminderREQUIRED
    string

    The permission reminder for the list.

  • campaign_defaultsREQUIRED
    object

    Default values for campaigns created for this list.

    Show Properties
  • email_type_optionREQUIRED
    boolean

    Whether the list supports multiple formats for emails. When set to true, subscribers can choose whether they want to receive HTML or plain-text emails. When set to false, subscribers will receive HTML emails, with a plain-text alternative backup.

  • use_archive_bar
    boolean

    Whether campaigns for this list use the Archive Bar in archives by default.

  • notify_on_subscribe
    string

    The email address to send subscribe notifications to.

  • notify_on_unsubscribe
    string

    The email address to send unsubscribe notifications to.

  • visibility
    string

    Whether this list is public or private. Possible values: "pub" or "prv".

  • double_optin
    boolean

    Whether or not to require the subscriber to confirm subscription via email.

  • marketing_permissions
    boolean

    Whether or not the list has marketing permissions (eg. GDPR) enabled.

     

Update lists

BASH
curl -X PATCH \
    https://.api.squalomail.com/mc/v3/lists/{list_id} \
    --user "anystring:${apikey}"' \
    -d '{"name":"","contact":{"company":"","address1":"","address2":"","city":"","state":"","zip":"","country":"","phone":""},"permission_reminder":"","use_archive_bar":false,"campaign_defaults":{"from_name":"","from_email":"","subject":"","language":""},"notify_on_subscribe":"","notify_on_unsubscribe":"","email_type_option":false,"visibility":"pub","double_optin":false,"marketing_permissions":false}'

HTTP Status 200 – Subscriber List

Information about a specific list.

  • id
    string

    A string that uniquely identifies this list.

  • web_id
    integer

    The ID used in the Squalo web application. View this list in your Squalo account at https://{dc}.admin.squalomail.com/lists/members/?id={web_id}.

  • name
    string

    The name of the list.

  • contact
    object

    Contact information displayed in campaign footers to comply with international spam laws.

    Show Properties
  • permission_reminder
    string

    The permission reminder for the list.

  • use_archive_bar
    boolean

    Whether campaigns for this list use the Archive Bar in archives by default.

  • campaign_defaults
    object

    Default values for campaigns created for this list.

    Show Properties
  • notify_on_subscribe
    string

    The email address to send subscribe notifications to.

  • notify_on_unsubscribe
    string

    The email address to send unsubscribe notifications to.

  • date_created
    string

    The date and time that this list was created in ISO 8601 format.

  • list_rating
    integer

    An auto-generated activity score for the list (0-5).

  • email_type_option
    boolean

    Whether the list supports multiple formats for emails. When set to true, subscribers can choose whether they want to receive HTML or plain-text emails. When set to false, subscribers will receive HTML emails, with a plain-text alternative backup.

  • subscribe_url_short
    string

    Our url shortened version of this list’s subscribe form.

  • subscribe_url_long
    string

    The full version of this list’s subscribe form (host will vary).

  • beamer_address
    string

    The list’s Email Beamer address.

  • visibility
    string

    Whether this list is public or private. Possible values: "pub" or "prv".

  • double_optin
    boolean

    Whether or not to require the subscriber to confirm subscription via email.

  • has_welcome
    boolean

    Whether or not this list has a welcome automation connected. Welcome Automations: welcomeSeries, singleWelcome, emailFollowup.

  • marketing_permissions
    boolean

    Whether or not the list has marketing permissions (eg. GDPR) enabled.

  • modules
    string[]

    Any list-specific modules installed for this list.

  • stats
    object

    Stats for the list. Many of these are cached for at least five minutes.

    Show Properties
  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

    Show Properties

Example response

JSON

{
  "id": "string",
  "web_id": 0,
  "name": "string",
  "contact": {
  "company": "string",
  "address1": "string",
  "address2": "string",
  "city": "string",
  "state": "string",
  "zip": "string",
  "country": "string",
  "phone": "string"
  },
  "permission_reminder": "string",
  "use_archive_bar": false,
  "campaign_defaults": {
  "from_name": "string",
  "from_email": "string",
  "subject": "string",
  "language": "string"
  },
  "notify_on_subscribe": false,
  "notify_on_unsubscribe": false,
  "date_created": "2019-08-24T14:15:22Z",
  "list_rating": 0,
  "email_type_option": true,
  "subscribe_url_short": "string",
  "subscribe_url_long": "string",
  "beamer_address": "string",
  "visibility": "pub",
  "double_optin": false,
  "has_welcome": false,
  "marketing_permissions": false,
  "modules": [
  "string"
  ],
  "stats": {
  "member_count": 0,
  "total_contacts": 0,
  "unsubscribe_count": 0,
  "cleaned_count": 0,
  "member_count_since_send": 0,
  "unsubscribe_count_since_send": 0,
  "cleaned_count_since_send": 0,
  "campaign_count": 0,
  "campaign_last_sent": "2019-08-24T14:15:22Z",
  "merge_field_count": 0,
  "avg_sub_rate": 0,
  "avg_unsub_rate": 0,
  "target_sub_rate": 0,
  "open_rate": 0,
  "click_rate": 0,
  "last_sub_date": "2019-08-24T14:15:22Z",
  "last_unsub_date": "2019-08-24T14:15:22Z"
  },
  "_links": [
  {
  "rel": "string",
  "href": "string",
  "method": "GET",
  "targetSchema": "string",
  "schema": "string"
  }
  ]
  },
  

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Delete list

Delete a list from your Squalo account. If you delete a list, you’ll lose the list history—including subscriber activity, unsubscribes, complaints, and bounces. You’ll also lose subscribers’ email addresses, unless you exported and backed up your list.

DELETE /lists/{list_id}

Path Parameters

  • list_idREQUIRED
    string

    The unique ID for the list.

Delete list

BASH
curl -X DELETE \
    https://.api.squalomail.com/mc/v3/lists/{list_id} \
    --user "anystring:${apikey}"'

Success Response

HTTP Status 204

Empty Response

Example response

JSON

{}

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

     

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Batch subscribe or unsubscribe

Batch subscribe or unsubscribe list members.

POST /lists/{list_id}

Path Parameters

  • list_idREQUIRED
    string

    The unique ID for the list.

Query Parameters

  • skip_merge_validation
    boolean

    If skipmergevalidation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to false.

  • skip_duplicate_check
    boolean

    If skipduplicatecheck is true, we will ignore duplicates sent in the request when using the batch sub/unsub on the lists endpoint. The status of the first appearance in the request will be saved. This defaults to false.

Body Parameters

  • membersREQUIRED
    object[]

    An array of objects, each representing an email address and the subscription status for a specific list. Up to 500 members may be added or updated with each API call.

    Show Properties
  • update_existing
    boolean

    Whether this batch operation will change existing members’ subscription status.

Batch subscribe or unsubscribe

BASH
curl -X POST \
    'https://.api.squalomail.com/mc/v3/lists/{list_id}?skip_merge_validation=<SOME_BOOLEAN_VALUE>&skip_duplicate_check=<SOME_BOOLEAN_VALUE>' \
    --user "anystring:${apikey}"' \
    -d '{"members":[],"update_existing":false}'

Success Response

HTTP Status 200 – Batch update List members

Batch update list members.

  • new_members
    object[]

    An array of objects, each representing a new member that was added to the list.

    Show Properties
  • updated_members
    object[]

    An array of objects, each representing an existing list member whose subscription status was updated.

    Show Properties
  • errors
    object[]

    An array of objects, each representing an email address that could not be added to the list or updated and an error message providing more details.

    Show Properties
  • total_created
    integer

    The total number of items matching the query, irrespective of pagination.

  • total_updated
    integer

    The total number of items matching the query, irrespective of pagination.

  • error_count
    integer

    The total number of items matching the query, irrespective of pagination.

  • _links
    object[]

    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
    "new_members": [
      {
        "id": "string",
        "email_address": "string",
        "unique_email_id": "string",
        "email_type": "string",
        "status": "subscribed",
        "merge_fields": {
          "property1": null,
          "property2": null
        },
        "interests": {
          "property1": true,
          "property2": true
        },
        "stats": {
          "avg_open_rate": 0,
          "avg_click_rate": 0
        },
        "ip_signup": "string",
        "timestamp_signup": "2019-08-24T14:15:22Z",
        "ip_opt": "string",
        "timestamp_opt": "2019-08-24T14:15:22Z",
        "member_rating": 0,
        "last_changed": "2019-08-24T14:15:22Z",
        "language": "string",
        "vip": true,
        "email_client": "string",
        "location": {
          "latitude": 0,
          "longitude": 0,
          "gmtoff": 0,
          "dstoff": 0,
          "country_code": "string",
          "timezone": "string"
        },
        "last_note": {
          "note_id": 0,
          "created_at": "2019-08-24T14:15:22Z",
          "created_by": "string",
          "note": "string"
        },
        "tags_count": 0,
        "tags": [
          {
            "id": 0,
            "name": "string"
          }
        ],
        "list_id": "string",
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "updated_members": [
      {
        "id": "string",
        "email_address": "string",
        "unique_email_id": "string",
        "email_type": "string",
        "status": "subscribed",
        "merge_fields": {
          "property1": null,
          "property2": null
        },
        "interests": {
          "property1": true,
          "property2": true
        },
        "stats": {
          "avg_open_rate": 0,
          "avg_click_rate": 0
        },
        "ip_signup": "string",
        "timestamp_signup": "2019-08-24T14:15:22Z",
        "ip_opt": "string",
        "timestamp_opt": "2019-08-24T14:15:22Z",
        "member_rating": 0,
        "last_changed": "2019-08-24T14:15:22Z",
        "language": "string",
        "vip": true,
        "email_client": "string",
        "location": {
          "latitude": 0,
          "longitude": 0,
          "gmtoff": 0,
          "dstoff": 0,
          "country_code": "string",
          "timezone": "string"
        },
        "last_note": {
          "note_id": 0,
          "created_at": "2019-08-24T14:15:22Z",
          "created_by": "string",
          "note": "string"
        },
        "tags_count": 0,
        "tags": [
          {
            "id": 0,
            "name": "string"
          }
        ],
        "list_id": "string",
        "_links": [
          {
            "rel": "string",
            "href": "string",
            "method": "GET",
            "targetSchema": "string",
            "schema": "string"
          }
        ]
      }
    ],
    "errors": [
      {
        "email_address": "string",
        "error": "string",
        "error_code": "ERROR_CONTACT_EXISTS"
      }
    ],
    "total_created": 42,
    "total_updated": 42,
    "error_count": 42,
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }
  

Error Response

An error generated by the Squalo API.

  • type
    string

    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.

  • title
    string

    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.

  • status
    integer

    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.

  • detail
    string

    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.

  • instance
    string

    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

{
    "type": "https://www.squalomail.com/supporto/e-commerce-api/",
    "title": "Resource Not Found",
    "status": 404,
    "detail": "The requested resource could not be found.",
    "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
  }

Custom Events

Your can also trigger custom events. You have 2 options: either a general custom event or a custom event with abandoned cart included or a custom event with an order included.

Trigger custom event

Trigger a custom event of a given type.

POST /custom-events

Body Parameters

  • type REQUIRED – string – The type of the custom event.

Trigger Custom Event

BASH

curl -X POST \   https://.api.squalomail.com/mc/v3/custom-events \   --user "anystring:${apikey}"' \   -d '{“type”: “test”,}'

Success Response

HTTP Status 204 – No Content

Error response

An error generated by the Squalo API.

  • typestringAn absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • titlestringA short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • statusintegerThe HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detailstringA human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instancestringA string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

 

Trigger Abandoned checkout custom event

Trigger a Abandoned checkout custom event of a given type.

POST /ecommerce/stores/{storeId}/carts/{cartId}/custom-events

Body Parameters

  • type REQUIRED – string – The type of the custom event.

Trigger Abandoned checkout Custom Event

BASH

curl -X POST \   https://.api.squalomail.com/mc/v3/ecommerce/stores/{storeId}/carts/{cartId}/custom-events \   --user "anystring:${apikey}"' \   -d '{“type”: “test”,}'

Success Response

HTTP Status 204 – No Content

 

Error response

An error generated by the Squalo API.

  • typestringAn absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • titlestringA short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • statusintegerThe HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detailstringA human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instancestringA string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

 

Trigger Order custom event

Trigger a Order custom event of a given type.

POST /ecommerce/stores/{storeId}/orders/{orderId}/custom-events

Body Parameters

  • type REQUIRED – string- The type of the custom event.

Trigger Order custom Event

BASH

curl -X POST \   https://.api.squalomail.com/mc/v3/ecommerce/stores/{storeId}/orders/{orderId}/custom-events \   --user "anystring:${apikey}"' \   -d '{“type”: “test”,}'

Success Response

HTTP Status 204 – No Content

 

Error response

An error generated by the Squalo API.

  • typestringAn absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • titlestringA short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • statusintegerThe HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detailstringA human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instancestringA string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Batch Operations

Use batch operations to complete multiple operations with a single call.

List batch requests

Get a summary of batch requests that have been made.

GET /batches

Query parameters

  • fields
    string[]
    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields
    string[]
    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
  • count
    integer
    The number of records to return. Default value is 10. Maximum value is 1000
  • offset
    integer
    Used for pagination, this it the number of records from a collection to skip. Default value is 0.

List batch requests

BASH

curl -X GET \
  'https://api.squalomail.com/mc/3.0/batches?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>&count=10&offset=0' \
  --user "anystring:${apikey}"'

Success Response

HTTP Status 200 – Batch Operations

A summary of batch requests that have been made.

  • batches
    object[]
    An array of objects representing batch calls.
  • total_items
    integer
    The total number of items matching the query regardless of pagination.
  • _links
    object[]
    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
  "batches": [ 
     {
       "id": "string",
       "status": "pending",
       "total_operations": 0,
       "finished_operations": 0,
       "errored_operations": 0,
       "submitted_at": "2019-08-24T14:15:22Z",
       "completed_at": "2019-08-24T14:15:22Z",
       "response_body_url": "string",
       "response_body_url": "string",
       "_links": [ 
            {
              "rel": "string",
              "href": "string",
              "method": "GET",
              "targetSchema": "string",
              "schema": "string",
            }
         ]
       }
     ],
     "total_items": 0,
     "_links":  [,
       {
         "rel": "string",
         "href": "string",
         "method": "GET",
         "targetSchema": "string",
         "schema": "string",
       }
     ]
   }

   

Error Response

An error generated by the API

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
        "type": "https://www.squalomail.com/supporto/e-commerce-api/",
        "title": "Resource Not Found",
        "status": 404,
        "detail": "The requested resource could not be found.",
        "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }
      

Start batch operation

Begin processing a batch operations request.

POST /batches

Body Parameters

  • operations REQUIREDobject[]
    An array of objects that describes operations to perform.

Start batch operation

BASH

curl -X POST \
    https://.api.squalomail.com/mc/v3/batches \
    --user "anystring:${apikey}"' \
    -d '{"operations":[]}'

Success Response

HTTP Status 200 – Batch

The status of a batch request

  • id
    string
    A string that uniquely identifies this batch request.
  • status
    string
    The status of the batch call. Learn more about the batch operation status. Possible values: "pending", "preprocessing", "started", "finalizing", or "finished".
  • total_operations
    integer
    The total number of operations to complete as part of this batch request. For GET requests requiring pagination, each page counts as a separate operation.
  • finished_operations
    integer
    The number of completed operations. This includes operations that returned an error.
  • errored_operations
    integer
    The number of completed operations that returned an error.
  • submitted_at
    string
    The date and time when the server received the batch request in ISO 8601 format.
  • completed_at
    string
    The date and time when all operations in the batch request completed in ISO 8601 format.
  • response_body_url
    string
    The URL of the gzipped archive of the results of all the operations.
  • _links
    object[]
    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
    "id": "string",
    "status": "pending",
    "total_operations": 0,
    "finished_operations": 0,
    "errored_operations": 0,
    "submitted_at": "2019-08-24T14:15:22Z",
    "completed_at": "2019-08-24T14:15:22Z",
    "response_body_url": "string",
    "_links": [
      {
        "rel": "string",
        "href": "string",
        "method": "GET",
        "targetSchema": "string",
        "schema": "string"
      }
    ]
  }

 

Error Response

An error generated by the Squalo API.

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
        "type": "https://www.squalomail.com/supporto/e-commerce-api/",
        "title": "Resource Not Found",
        "status": 404,
        "detail": "The requested resource could not be found.",
        "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }

 

Get batch operation status

Get the status of a batch request.

GET /batches/{batch_id}

Path Parameters

  • batch_id REQUIRED
    string
    The unique id for the batch operation.

Path Parameters

  • fields
    string[]
    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields
    string[]
    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Get batch operation status

BASH

  • curl -X GET \
      'https://api.squalomail.com/mc/v3/batches/{batch_id}?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>' \
      --user "anystring:${apikey}"'}

Success Response

HTTP Status 200 – Batch

The status of a batch request

  • id

    string
    A string that uniquely identifies this batch request.

  • status
    string
    The status of the batch call. Learn more about the batch operation status. Possible values: "pending", "preprocessing", "started", "finalizing", or "finished".
  • total_operations

    integer
    The number of completed operations. This includes operations that returned an error.

  • errored_operations

    integer
    The number of completed operations that returned an error.

  • submitted_at

    string
    The date and time when the server received the batch request in ISO 8601 format.

  • completed_at

    string
    The date and time when all operations in the batch request completed in ISO 8601 format.

  • response_body_url

    string
    The URL of the gzipped archive of the results of all the operations.

  • _links

    object[]
    A list of link types and descriptions for the API schema documents.

Example response

JSON

  • {
      "id": "string",
      "status": "pending",
      "total_operations": 0,
      "finished_operations": 0,
      "errored_operations": 0,
      "submitted_at": "2019-08-24T14:15:22Z",
      "completed_at": "2019-08-24T14:15:22Z",
      "response_body_url": "string",
      "_links": [
      {
      "rel": "string",
      "href": "string",
      "method": "GET",
      "targetSchema": "string",
      "schema": "string"
      }
      ]
      }curl -X GET \
      'https://api.squalomail.com/mc/v3/batches/{batch_id}?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>' \
      --user "anystring:${apikey}"'}

Error Response

An error generated by the Squalo API.

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
      "type": "https://www.squalomail.com/supporto/e-commerce-api/",
      "title": "Resource Not Found",
      "status": 404,
      "detail": "The requested resource could not be found.",
      "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }{
      "id": "string",
      "status": "pending",
      "total_operations": 0,
      "finished_operations": 0,
      "errored_operations": 0,
      "submitted_at": "2019-08-24T14:15:22Z",
      "completed_at": "2019-08-24T14:15:22Z",
      "response_body_url": "string",
      "_links": [
      {
      "rel": "string",
      "href": "string",
      "method": "GET",
      "targetSchema": "string",
      "schema": "string"
      }
      ]
      }curl -X GET \
      'https://api.squalomail.com/mc/v3/batches/{batch_id}?fields=<SOME_ARRAY_VALUE>&exclude_fields=<SOME_ARRAY_VALUE>' \
      --user "anystring:${apikey}"'}

Delete batch request

Stops a batch request from running. Since only one batch request is run at a time, this can be used to cancel a long running request. The results of any completed operations will not be available after this call.

DELETE /batches/{batch_id}

Path Parameters

  • batch_id – REQUIRED
    string
    The unique id for the batch operation.

Delete batch request

BASH

curl -X DELETE \
https://api.squalomail.com/mc/v3/batches/{batch_id} \
--user "anystring:${apikey}"'

Success Response

HTTP Status 204

Empty Response

Example response

JSON

{}

 

Error Response

An error generated by the Squalo API.

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

{
“type”: “https://www.squalomail.com/supporto/e-commerce-api/”,
“title”: “Resource Not Found”,
“status”: 404,
“detail”: “The requested resource could not be found.”,
“instance”: “995c5cb0-3280-4a6e-808b-3b096d0bb219”
}


List Membership Webhooks

Manage webhooks for a specific Squalo list.

List webhooks

Get information about all webhooks for a specific list.

GET /lists/{list_id}/webhooks

Query parameters

  • list_id
    string
    The unique ID for the list.

Success Response

HTTP Status 200 – List Webhooks

Manage webhooks for a specific list.

  • webhooks
    object[]
    An array of objects, each representing a specific list member.
  • id
    string
    A string that uniquely identifies this webhook.
  • url
    string
    A valid URL for the Webhook.
  • events
    Object
    The events that can trigger the webhook and whether they are enabled.

    • subscribe
      boolean[]
      Whether the webhook is triggered when a list subscriber is added.
    • unsubscribe
      boolean[]
      Whether the webhook is triggered when a list member unsubscribes.
    • cleaned
      boolean[]
      Whether the webhook is triggered when a subscriber’s email address is cleaned from the list.
  • sources
    object
    The possible sources of any events that can trigger the webhook and whether they are enabled.

    • user
      boolean[]
      Whether the webhook is triggered by subscriber-initiated actions.
    • admin
      boolean[]
      Whether the webhook is triggered by admin-initiated actions in the web interface.
    • api
      boolean[]
      Whether the webhook is triggered by actions initiated via the API.
  • list_id
    string
    The unique id for the list.
  • _links
    object[]
    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
  "webhooks": [ 
     {
       "id": "string",
       "url": "http://domain.com/webhook",
       "events": {
  	     "subscribe":  true,
  	     "unsubscribe":  true,
  	     "cleaned":  true,
  },
       "sources": {
  	     "user":  true,
  	     "admin":  true,
  	     "api":  true,
  },
       "list_id": "string",
       "_links": [ 
            {
              "rel": "string",
              "href": "string",
              "method": "GET",
              "targetSchema": "string",
              "schema": "string",
            }
         ]
       }
     ],
     "total_items": 0,
     "_links":  [,
       {
         "rel": "string",
         "href": "string",
         "method": "GET",
         "targetSchema": "string",
         "schema": "string",
       }
     ]
   }
     

Error Response

An error generated by the API

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
        "type": "https://www.squalomail.com/supporto/e-commerce-api/",
        "title": "Resource Not Found",
        "status": 404,
        "detail": "The requested resource could not be found.",
        "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }
      

Add webhooks

Create a new webhook for a specific list.

POST /lists/{list_id}/webhooks

Query parameters

  • list_id
    string
    The unique ID for the list.

Body parameters

  • url
    string
    A valid URL for the Webhook.
  • events
    Object
    The events that can trigger the webhook and whether they are enabled.

    • subscribe
      boolean[]
      Whether the webhook is triggered when a list subscriber is added.
    • unsubscribe
      boolean[]
      Whether the webhook is triggered when a list member unsubscribes.
    • cleaned
      boolean[]
      Whether the webhook is triggered when a subscriber’s email address is cleaned from the list.
  • sources
    object
    The possible sources of any events that can trigger the webhook and whether they are enabled.

    • user
      boolean[]
      Whether the webhook is triggered by subscriber-initiated actions.
    • admin
      boolean[]
      Whether the webhook is triggered by admin-initiated actions in the web interface.
    • api
      boolean[]
      Whether the webhook is triggered by actions initiated via the API.

Success Response

HTTP Status 200 – List Webhooks

Manage webhooks for a specific list.

  • webhooks
    object[]
    An array of objects, each representing a specific list member.
  • id
    string
    A string that uniquely identifies this webhook.
  • url
    string
    A valid URL for the Webhook.
  • events
    Object
    The events that can trigger the webhook and whether they are enabled.

    • subscribe
      boolean[]
      Whether the webhook is triggered when a list subscriber is added.
    • unsubscribe
      boolean[]
      Whether the webhook is triggered when a list member unsubscribes.
    • cleaned
      boolean[]
      Whether the webhook is triggered when a subscriber’s email address is cleaned from the list.
  • sources
    object
    The possible sources of any events that can trigger the webhook and whether they are enabled.

    • user
      boolean[]
      Whether the webhook is triggered by subscriber-initiated actions.
    • admin
      boolean[]
      Whether the webhook is triggered by admin-initiated actions in the web interface.
    • api
      boolean[]
      Whether the webhook is triggered by actions initiated via the API.
  • list_id
    string
    The unique id for the list.
  • _links
    object[]
    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
  "webhooks": [ 
     {
       "id": "string",
       "url": "http://domain.com/webhook",
       "events": {
  	     "subscribe":  true,
  	     "unsubscribe":  true,
  	     "cleaned":  true,
  },
       "sources": {
  	     "user":  true,
  	     "admin":  true,
  	     "api":  true,
  },
       "list_id": "string",
       "_links": [ 
            {
              "rel": "string",
              "href": "string",
              "method": "GET",
              "targetSchema": "string",
              "schema": "string",
            }
         ]
       }
     ],
     "total_items": 0,
     "_links":  [,
       {
         "rel": "string",
         "href": "string",
         "method": "GET",
         "targetSchema": "string",
         "schema": "string",
       }
     ]
   }
     

Error Response

An error generated by the API

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
        "type": "https://www.squalomail.com/supporto/e-commerce-api/",
        "title": "Resource Not Found",
        "status": 404,
        "detail": "The requested resource could not be found.",
        "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }
      

Get webhook info

Get information about a specific webhook.

GET /lists/{list_id}/webhooks/{webhook_id}

Query parameters

  • list_id
    string
    The unique ID for the list.
  • webhook_id
    string
    The webhook’s id.

Success Response

HTTP Status 200 – List Webhooks

Manage webhooks for a specific list.

  • webhooks
    object[]
    An array of objects, each representing a specific list member.
  • id
    string
    A string that uniquely identifies this webhook.
  • url
    string
    A valid URL for the Webhook.
  • events
    Object
    The events that can trigger the webhook and whether they are enabled.

    • subscribe
      boolean[]
      Whether the webhook is triggered when a list subscriber is added.
    • unsubscribe
      boolean[]
      Whether the webhook is triggered when a list member unsubscribes.
    • cleaned
      boolean[]
      Whether the webhook is triggered when a subscriber’s email address is cleaned from the list.
  • sources
    object
    The possible sources of any events that can trigger the webhook and whether they are enabled.

    • user
      boolean[]
      Whether the webhook is triggered by subscriber-initiated actions.
    • admin
      boolean[]
      Whether the webhook is triggered by admin-initiated actions in the web interface.
    • api
      boolean[]
      Whether the webhook is triggered by actions initiated via the API.
  • list_id
    string
    The unique id for the list.
  • _links
    object[]
    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
  "webhooks": [ 
     {
       "id": "string",
       "url": "http://domain.com/webhook",
       "events": {
  	     "subscribe":  true,
  	     "unsubscribe":  true,
  	     "cleaned":  true,
  },
       "sources": {
  	     "user":  true,
  	     "admin":  true,
  	     "api":  true,
  },
       "list_id": "string",
       "_links": [ 
            {
              "rel": "string",
              "href": "string",
              "method": "GET",
              "targetSchema": "string",
              "schema": "string",
            }
         ]
       }
     ],
     "total_items": 0,
     "_links":  [,
       {
         "rel": "string",
         "href": "string",
         "method": "GET",
         "targetSchema": "string",
         "schema": "string",
       }
     ]
   }
     

Error Response

An error generated by the API

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
        "type": "https://www.squalomail.com/supporto/e-commerce-api/",
        "title": "Resource Not Found",
        "status": 404,
        "detail": "The requested resource could not be found.",
        "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }
      

Delete webhook

Delete a specific webhook.

DELETE /lists/{list_id}/webhooks/{webhook_id}

Query parameters

  • list_id
    string
    The unique ID for the list.
  • webhook_id
    string
    The webhook’s id.

Success Response

HTTP Status 204

Empty response

Example response

JSON

{}

     

Error Response

An error generated by the API

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
        "type": "https://www.squalomail.com/supporto/e-commerce-api/",
        "title": "Resource Not Found",
        "status": 404,
        "detail": "The requested resource could not be found.",
        "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }
      

Update webhooks

Update the settings for an existing webhook.

PATCH /lists/{list_id}/webhooks

Query parameters

  • list_id
    string
    The unique ID for the list.
  • webhook_id
    string
    The webhook’s id.

Body parameters

  • url
    string
    A valid URL for the Webhook.
  • events
    Object
    The events that can trigger the webhook and whether they are enabled.

    • subscribe
      boolean[]
      Whether the webhook is triggered when a list subscriber is added.
    • unsubscribe
      boolean[]
      Whether the webhook is triggered when a list member unsubscribes.
    • cleaned
      boolean[]
      Whether the webhook is triggered when a subscriber’s email address is cleaned from the list.
  • sources
    object
    The possible sources of any events that can trigger the webhook and whether they are enabled.

    • user
      boolean[]
      Whether the webhook is triggered by subscriber-initiated actions.
    • admin
      boolean[]
      Whether the webhook is triggered by admin-initiated actions in the web interface.
    • api
      boolean[]
      Whether the webhook is triggered by actions initiated via the API.

Success Response

HTTP Status 200 – List Webhooks

Manage webhooks for a specific list.

  • webhooks
    object[]
    An array of objects, each representing a specific list member.
  • id
    string
    A string that uniquely identifies this webhook.
  • url
    string
    A valid URL for the Webhook.
  • events
    Object
    The events that can trigger the webhook and whether they are enabled.

    • subscribe
      boolean[]
      Whether the webhook is triggered when a list subscriber is added.
    • unsubscribe
      boolean[]
      Whether the webhook is triggered when a list member unsubscribes.
    • cleaned
      boolean[]
      Whether the webhook is triggered when a subscriber’s email address is cleaned from the list.
  • sources
    object
    The possible sources of any events that can trigger the webhook and whether they are enabled.

    • user
      boolean[]
      Whether the webhook is triggered by subscriber-initiated actions.
    • admin
      boolean[]
      Whether the webhook is triggered by admin-initiated actions in the web interface.
    • api
      boolean[]
      Whether the webhook is triggered by actions initiated via the API.
  • list_id
    string
    The unique id for the list.
  • _links
    object[]
    A list of link types and descriptions for the API schema documents.

Example response

JSON

{
  "webhooks": [ 
     {
       "id": "string",
       "url": "http://domain.com/webhook",
       "events": {
  	     "subscribe":  true,
  	     "unsubscribe":  true,
  	     "cleaned":  true,
  },
       "sources": {
  	     "user":  true,
  	     "admin":  true,
  	     "api":  true,
  },
       "list_id": "string",
       "_links": [ 
            {
              "rel": "string",
              "href": "string",
              "method": "GET",
              "targetSchema": "string",
              "schema": "string",
            }
         ]
       }
     ],
     "total_items": 0,
     "_links":  [,
       {
         "rel": "string",
         "href": "string",
         "method": "GET",
         "targetSchema": "string",
         "schema": "string",
       }
     ]
   }

Error Response

An error generated by the API

  • type
    string
    An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
  • title
    string
    A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
  • status
    integer
    The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
  • detail
    string
    A human-readable explanation specific to this occurrence of the problem
  • instance
    string
    A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

Example error response

JSON

  • {
        "type": "https://www.squalomail.com/supporto/e-commerce-api/",
        "title": "Resource Not Found",
        "status": 404,
        "detail": "The requested resource could not be found.",
        "instance": "995c5cb0-3280-4a6e-808b-3b096d0bb219"
      }
    

 

 


Batch Webhooks

Manage webhooks for batch operations.

List batch webhooks

Get all webhooks that have been configured for batches.

GET/batch-webhooks

Success Response

HTTP Status 200 – Batch Webhooks

Manage webhooks for batch requests.

  • webhooks
    object[]
    An array of objects, each representing a Batch Webhook.Properties

    • id
      string
      A string that uniquely identifies this Batch Webhook.
    • URL
      string
      A valid URL for the Webhook.
    • _links
      object[]
      A list of link types and descriptions for the API schema documents.
      Properties

      • rel
        string
        As with an HTML ‘rel’ attribute, this describes the type of link.
      • href
        string
        This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      • method
        string
        The HTTP method that should be used when accessing the URL defined in ‘href’. Possible values: “GET”, “POST”, “PUT”, “PATCH”, “DELETE”, “OPTIONS”, or “HEAD”.
      • targetSchema
        string
        For GETs, this is a URL representing the schema that the response should conform to.
      • schema
        string
        For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
    • total_items
      integer
      The total number of items matching the query regardless of pagination.
      Properties

      • rel
        string
        As with an HTML ‘rel’ attribute, this describes the type of link.
      • href
        string
        This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      • method
        string
        The HTTP method that should be used when accessing the URL defined in ‘href’. Possible values: “GET”, “POST”, “PUT”, “PATCH”, “DELETE”, “OPTIONS”, or “HEAD”.
      • targetSchema
        string
        For GETs, this is a URL representing the schema that the response should conform to.
      • schema
        string
        For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

 

Example response

JSON

[
{
  "webhooks": [
    {
      "id": "string",
      "url": "http://yourdomain.com/webhook",
      "_links": [
        {
          "rel": "string",
          "href": "string",
          "method": "GET",
          "targetSchema": "string",
          "schema": "string"
        }
      ]
    }
  ],
  "total_items": 0,
  "_links": [
    {
      "rel": "string",
      "href": "string",
      "method": "GET",
      "targetSchema": "string",
      "schema": "string"
    }
  ]
}
  

Add batch webhook

Configure a webhook that will fire whenever any batch request completes processing. You may only have a maximum of 20 batch webhooks.

POST/batch-webhooks

Body Parameters

  • url REQUIRED
    string
    A valid URL for the Webhook.

Success Response

HTTP Status 200 – Batch Webhook
A webhook configured for batch status updates.

  • id
    string
    A string that uniquely identifies this Batch Webhook.
  • url
    string
    A valid URL for the Webhook.
  • _links
    object[]
    A list of link types and descriptions for the API schema documents.
    Properties

    • rel
      string
      As with an HTML ‘rel’ attribute, this describes the type of link.
    • href
      string
      This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
    • method
      string
      The HTTP method that should be used when accessing the URL defined in ‘href’. Possible values: “GET”, “POST”, “PUT”, “PATCH”, “DELETE”, “OPTIONS”, or “HEAD”.
    • targetSchema
      string
      For GETs, this is a URL representing the schema that the response should conform to.
    • schema
      string
      For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

Example response

JSON

[
{
  "id": "string",
  "url": "http://yourdomain.com/webhook",
  "_links": [
    {
      "rel": "string",
      "href": "string",
      "method": "GET",
      "targetSchema": "string",
      "schema": "string"
    }
  ]
}
  

Get batch webhook info

Get information about a specific batch webhook.

GET/batch-webhooks/{batch_webhook_id}

Path Parameters

  • batch_webhook_id REQUIRED
    string
    The unique id for the batch webhook.
  • 
    

Success Response

HTTP Status 200 – Batch Webhook
A webhook configured for batch status updates.

  • id
    string
    A string that uniquely identifies this Batch Webhook.
  • url
    string
    A valid URL for the Webhook.
  • _links
    object[]
    A list of link types and descriptions for the API schema documents.
    Properties

    • rel
      string
      As with an HTML ‘rel’ attribute, this describes the type of link.
    • href
      string
      This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
    • method
      string
      The HTTP method that should be used when accessing the URL defined in ‘href’. Possible values: “GET”, “POST”, “PUT”, “PATCH”, “DELETE”, “OPTIONS”, or “HEAD”.
    • targetSchema
      string
      For GETs, this is a URL representing the schema that the response should conform to.
    • schema
      string
      For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

 

Example response

JSON

[
{
  "id": "string",
  "url": "http://yourdomain.com/webhook",
  "_links": [
    {
      "rel": "string",
      "href": "string",
      "method": "GET",
      "targetSchema": "string",
      "schema": "string"
    }
  ]
}
  
  • 
    

Update batch webhook info

Update a webhook that will fire whenever any batch request completes processing.

PATCH/batch-webhooks/{batch_webhook_id}

Path Parameters

  • batch_webhook_id REQUIRED
    string
    The unique id for the batch webhook.
  • 
    

Body Parameters

  • url
    string
    A valid URL for the Webhook.

Success Response

HTTP Status 200 – Batch Webhook
A webhook configured for batch status updates.

  • id
    string
    A string that uniquely identifies this Batch Webhook.
  • url
    string
    A valid URL for the Webhook.
  • _links
    object[]
    A list of link types and descriptions for the API schema documents.
    Properties

    • rel
      string
      As with an HTML ‘rel’ attribute, this describes the type of link.
    • href
      string
      This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
    • method
      string
      The HTTP method that should be used when accessing the URL defined in ‘href’. Possible values: “GET”, “POST”, “PUT”, “PATCH”, “DELETE”, “OPTIONS”, or “HEAD”.
    • targetSchema
      string
      For GETs, this is a URL representing the schema that the response should conform to.
    • schema
      string
      For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

 

Example response

JSON

[
{
  "id": "string",
  "url": "http://yourdomain.com/webhook",
  "_links": [
    {
      "rel": "string",
      "href": "string",
      "method": "GET",
      "targetSchema": "string",
      "schema": "string"
    }
  ]
}
  

Delete batch webhook info

Remove a batch webhook. Webhooks will no longer be sent to the given URL.

DELETE/batch-webhooks/{batch_webhook_id}

Path Parameters

  • batch_webhook_id REQUIRED
    string
    The unique id for the batch webhook.
  • 
    

Body Parameters

  • url
    string
    A valid URL for the Webhook.

Success Response

  • HTTP Status 204

    Empty Response

 

Subscription Webhooks

Webhook registration

Squalo supports API calls to your software solution when an SUBSCRIBE or UNSUBSCRIBE event is triggered in Squalo.

NOTE: Filters and automations do NOT trigger webhooks. You can trigger webhooks in automations by adding with the appropriate action.

To receive these calls you need to register webhooks the following way:

List all registered webhooks

###
# @name members / webhooks / Get all
# @no-log
GET https://api.squalomail.com/mc/v3/members/webhooks
Authorization: apikey {{apiKey}}
Content-Type: application/json

Get info about a single registered webhook

###
# @name members / webhooks / Get single
# @no-log
GET https://api.squalomail.com/mc/v3/members/webhooks/8093e2af-d579-4c0a-8d46-033bf604a60e
Authorization: apikey {{apiKey}}
Content-Type: application/json

Register webhook

###
# @name members / webhooks / put
# @no-log
PUT https://api.squalomail.com/mc/v3/members/webhooks/8093e2af-d579-4c0a-8d46-033bf604a60e
Authorization: apikey {{apiKey}}
Content-Type: application/json

{
    "url": "https://webhook.site/7fbc6360-2d68-4162-88fe-7659bfc2cb0a",
    "unsubscribed": true,
    "subscribed": true
}

Update a webhook

POST https://api.squalomail.com/mc/v3/members/webhooks
Authorization: apikey {{apiKey}}
Content-Type: application/json

{
    "url": "https://webhook.site/66615868-ca98-4709-ae28-8dfd8f6d639a",
    "unsubscribed": false,
    "subscribed": false
}

Delete a webhook

###
# @name members / webhooks / DELETE
# @no-log
DELETE https://api.squalomail.com/mc/v3/members/webhooks/8093e2af-d579-4c0a-8d46-033bf604a60e
Authorization: apikey {{apiKey}}

Callback format

type=unsubscribe&fired_at=2024-09-10T07:49:39Z&data[id]=583129&data[email]=test@example.org&data[email_type]=html&data[web_id]=583129&data[merges][company_address]=value

there are following fields:
* type - unsubscribe/subscribe - shows event type
* fired_at - DateTime of when webhook was triggered
* data - contains a dictionary of following fields: email, email_type, web_id, merges.
* data[merges] - contas a dictionary of custom fields.