E-commerce API

Batch Operations

Use batch operations to complete multiple operations with a single call.

List batch requests

GET /batches

Get a summary of batch requests that have been made.

 

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",       "_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

Problem Detail Document

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

POST/batches

Begin processing a batch operations request.

Body Parameters

  • operations REQUIREDobject[]
    An array of objects that describes operations to perform.

Start batch operation

BASH

curl -X POST \
  https://${dc}.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

Problem Detail Document

An error generated by the SqualoMail 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/batches/{batch_id}

Get the status of a batch request.

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

Problem Detail Document

An error generated by the SqualoMail 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

DELETE/batches/{batch_id}

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.

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

Problem Detail Document

An error generated by the SqualoMail 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”
}

E-commerce Stores

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

List stores

GET/ecommerce/stores

Get information about all stores in the account.

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://${dc}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": "Freddie's Cat Hat Emporium",
      "platform": "string",
      "domain": "example.com",
      "is_syncing": true,
      "email_address": "freddie@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

Problem Detail Document

An error generated by SqualoMail 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

POST/ecommerce/stores

Add a new store to your SqualoMail account.

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
    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
    string
    The email address for the store.
  • 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
    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":"","money_format":"","primary_locale":"","timezone":"","phone":"","address":{"address1":"","address2":"","city":"","province":"","province_code":"","postal_code":"","country":"","country_code":"","longitude":0,"latitude":0}}'

 

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": "Freddie's Cat Hat Emporium",
"platform": "string",
"domain": "example.com",
"is_syncing": true,
"email_address": "freddie@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

Problem Detail Document

An error generated by SqualoMail 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/ecommerce/stores/{store_id}

Get information about a specific store.

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": "Freddie's Cat Hat Emporium",
"platform": "string",
"domain": "example.com",
"is_syncing": true,
"email_address": "freddie@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

Problem Detail Document

An error generated by the SqualoMail 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

PATCH/ecommerce/stores/{store_id}

Update a store.

Path Parameters

  • store_id REQUIRED
    string
    The store id.

Body Parameters

  • name
    string
    The name of the store.
  • platform
    string
    The e-commerce platform of the store.
  • domain
    string
    The store domain.
  • 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.

Update store

BASH

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

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": "Freddie's Cat Hat Emporium",
"platform": "string",
"domain": "example.com",
"is_syncing": true,
"email_address": "freddie@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

Problem Detail Document

An error generated by the SqualoMail 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/ecommerce/stores/{store_id}

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

Path Parameters

  • store_id REQUIRED
    string
    The store id.

Delete store

BASH

  • curl -X DELETE \
      https://${dc}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

Problem Detail Document

An error generated by the SqualoMail 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"
    }

E-COMMERCE STORES

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/ecommerce/stores/{store_id}/carts/{cart_id}/lines

Get information about a cart’s line items.

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://${dc}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

Problem Detail Document

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

POST/batches

Begin processing a batch operations request.

Body Parameters

  • operations REQUIRED
    object[]
    An array of objects that describes operations to perform problem type.

Start batch operation

BASH

curl -X POST \
  https://${dc}.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

Problem Detail Document

An error generated by the SqualoMail 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

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

Add a new line item to an existing cart.

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.

Add cart line item

BASH

curl -X POST \
  https://${dc}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.

  • _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

Problem Detail Document

An error generated by the SqualoMail 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/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}

Get information about a specific cart line item.

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://${dc}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.

  • _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

Problem Detail Document

An error generated by the SqualoMail 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 cart line item

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

Update a specific cart line item.

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.

Update cart line item

BASH

curl -X PATCH \
  https://${dc}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.

  • _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

Problem Detail Document

An error generated by the SqualoMail 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/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}

Delete a specific cart line item.

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://${dc}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

Problem Detail Document

An error generated by the SqualoMail 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"
    }

E-COMMERCE STORES

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/ecommerce/stores/{store_id}/carts

Get information about a store’s 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

  • 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://${dc}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,
      "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

Problem Detail Document

An error generated by the SqualoMail 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"
}

Body Parameters

  • id REQUIRED
    string

    A unique identifier for the cart.

  • customer REQUIRED
    object

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

  • currency_code REQUIRED
    string

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

  • order_total REQUIRED
    number

    The order total for the cart.

  • lines REQUIRED
    object[]

    An array of the cart’s line items.

  • campaign_id
    string

    A string that uniquely identifies the campaign for a cart.

  • checkout_url
    string

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

  • tax_total
    number

    The total tax for the cart.

Add cart

BASH
curl -X POST \
  https://${dc}api.squalomail.com/mc/v3/ecommerce/stores/{store_id}/carts \
  --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":"","checkout_url":"","currency_code":"","order_total":0,"tax_total":0,"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.

  • 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.

  • 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,
  "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

Problem Detail Document

An error generated by the SqualoMail 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 infoCollapse

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

Get information about a specific cart.

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • cart_idREQUIRED
    string

    The id for the 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 info

BASH
curl -X GET \
  'https://${dc}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.

  • 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,
  "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

Problem Detail Document

An error generated by the SqualoMail 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 cart

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

Update a specific cart.

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • cart_idREQUIRED
    string

    The id for the cart.

Body Parameters

  • 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.

  • lines
    object[]

    An array of the cart’s line items.

Update cart

BASH

curl -X PATCH \
  https://${dc}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":"","order_total":0,"tax_total":0,"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.

  • 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.

  • _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,
  "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

Problem Detail Document

An error generated by the SqualoMail 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"
}

Success Response

HTTP Status 204

Empty Response

Example response

JSON

{}

Error Response

Problem Detail Document

An error generated by the SqualoMail 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"
}

E-COMMERCE STORES

Customers

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

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://${dc}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",
      "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

Problem Detail Document

An error generated by the SqualoMail 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"
}

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 SqualoMail 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 SqualoMail 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.

  • 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",
  "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 SqualoMail 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"
}

ath 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 SqualoMail 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 SqualoMail 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.

  • 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":"","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 SqualoMail 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 SqualoMail 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.

  • 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",
  "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 SqualoMail 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"
}

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 SqualoMail 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 SqualoMail 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.

  • 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",
  "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 SqualoMail 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"
}

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://${dc}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

Problem Detail Document

An error generated by the SqualoMail 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"
}

E-COMMERCE STORES

Order Lines

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

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

Problem Detail Document

An error generated by the SqualoMail 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"
}

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

Problem Detail Document

An error generated by the SqualoMail 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"
}

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

Problem Detail Document

An error generated by the SqualoMail 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"
}

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

Problem Detail Document

An error generated by the SqualoMail 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"
}

Success Response

HTTP Status 204

Empty Response

Example response

JSON

{}

Error Response

Problem Detail Document

An error generated by the SqualoMail 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"
}

E-COMMERCE STORES

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 SqualoMail account.

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": {
        "name": "Freddie Chimpenheimer",
        "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": "Freddie Chimpenheimer",
        "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": "Freddie'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

Problem Detail Document

An error generated by the SqualoMail 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"
}

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,
      "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": "Freddie Chimpenheimer",
        "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": "Freddie Chimpenheimer",
        "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": "Freddie'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

Problem Detail Document

An error generated by the SqualoMail 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"
}

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.

  • 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 SqualoMail 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://${dc}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.

  • tracking_code
    string

    The SqualoMail 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,
  "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": "Freddie Chimpenheimer",
    "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": "Freddie Chimpenheimer",
    "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": "Freddie'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

Problem Detail Document

An error generated by the SqualoMail 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"
}

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.

  • tracking_code
    string

    The SqualoMail 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,
  "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": "Freddie Chimpenheimer",
    "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": "Freddie Chimpenheimer",
    "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": "Freddie'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

Problem Detail Document

An error generated by the SqualoMail 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"
}

Path Parameters

  • store_idREQUIRED
    string

    The store id.

  • order_idREQUIRED
    string

    The id for the order in a store.

Body Parameters

  • 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_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.

  • tracking_code
    string

    The SqualoMail 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.

    Show Properties
  • billing_address
    object

    The billing address for the order.

    Show Properties
  • 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":"","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.

  • tracking_code
    string

    The SqualoMail 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,
  "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": "Freddie Chimpenheimer",
    "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": "Freddie Chimpenheimer",
    "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": "Freddie'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

Problem Detail Document

An error generated by the SqualoMail 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/ecommerce/stores/{store_id}/orders/{order_id}

Delete an order.

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://${dc}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

Problem Detail Document

An error generated by the SqualoMail 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"
}

E-COMMERCE STORES

Product Images

A Product Image represents a specific product image.

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

Problem Detail Document

An error generated by the SqualoMail 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"
}

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

Problem Detail Document

An error generated by the SqualoMail 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"
}

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

Problem Detail Document

An error generated by the Squalomail 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"
}

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

Problem Detail Document

An error generated by the SqualoMail 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"
}

Success Response

HTTP Status 204

Empty Response

Example response

JSON

{}

Error Response

Problem Detail Document

An error generated by the SqualoMail 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"
}

E-COMMERCE STORES

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.

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

Problem Detail Document

An error generated by the SqualoMail 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

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

Add a new variant to the product.

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

Problem Detail Document

An error generated by the SqualoMail 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"
}

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

Problem Detail Document

An error generated by the Squalomail 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"
}

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

Problem Detail Document

An error generated by the SqualoMail 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"
}

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

Problem Detail Document

An error generated by the SqualoMail 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"
}

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",
      "currency_code": "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

Problem Detail Document

An error generated by the SqualoMail 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"
}

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",
  "currency_code": "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

Problem Detail Document

An error generated by the Squalomail 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"
}

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",
  "currency_code": "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

Problem Detail Document

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"
}

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",
  "currency_code": "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

Problem Detail Document

An error generated by the SqualoMail 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"
}

Success Response

HTTP Status 204

Empty Response

Example response

JSON

{}

Error Response

Problem Detail Document

An error generated by the SqualoMail 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/Audiences

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

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

Problem Detail Document

An error generated by the SqualoMail 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"
}

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 SqualoMail web application. View this list in your SqualoMail 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

Problem Detail Document

An error generated by the SqualoMail 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

BASH
curl -X GET \
  'https://${dc}.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 SqualoMail web application. View this list in your SqualoMail 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