MyCashflow API (v1)

Download OpenAPI specification:Download

Introduction

You can use the MyCashflow API to integrate your MyCashflow online store with a number of third-party applications, for example CRMs and accounting software.

MyCashflow API is only available for the following plans:

  • Advanced
  • Pro
  • Enterprise

NOTE: MyCashflow also has support for Zapier for your more lightweight integration needs. See further info at https://support.mycashflow.com/en/user-guide/zapier.

MyCashflow API is recommended to be used in backend clients. Making API credentials public in frontend clients carries many security issues.

Get started using the API by going through the following documentation. This document will be updated whenever changes to the API are made.

Getting Started

All major versions of the API have their own endpoints. The endpoint defines the server path that receives your API requests and responds to them. The MyCashflow API endpoints are defined according to the following scheme:

https://STORENAME.mycashflow.fi/api/v1 

The last part of the endpoint address defines the targeted API version.

The API is only available over the default domain https://STORENAME.mycashflow.fi. Calls to custom domains are ignored.

Do not include a trailing slash in the request URL. The API will return an error if a trailing slash is present.

Installation and Connection

First, install the API extension on the Account » Extensions page of your store's admin panel.

Once you have installed the API extension, you need to create an API user. The API user account's credentials are used to authenticate requests to the API (further details on authentication can be found in the AUTHORIZATIONS section of each API endpoint in this document).

Responses

The MyCashflow API uses JSON to deliver any data returned by requests to the API.

Headers

All responses with content have the following HTTP headers:

  • Content-Type: application/json
  • Content-Length

Requests may return the following HTTP status response codes:

Success:

  • 200 Ok
  • 201 Created
  • 204 No content

Client error:

  • 400 Bad Request
  • 401 Unauthorized
  • 404 Not Found
  • 409 Conflict
  • 422 Unprocessable Entity

Server error:

  • 500 Internal Server Error
  • 503 Service Unavailable
  • 5xx Other connection errors

Response body

The API returns the response body for requests in JSON format – provided that the requested resource was found:

  • Details about the response will be included in the meta element.
  • The actual payload of the response is provided inside the data element.
  • In case a 422 Unprocessable Entity error was encountered while processing your request, the errors element will also be present in the response body.

Errors

MyCashflow API uses two methods of reporting errors:

  1. HTTP headers: if a requested resource was not found, or an unknown action was used, an HTTP error code will be returned.

    See section Headers of the Responses chapter for possible error codes.

  2. The errors JSON element: if the request contains errors, the response JSON will contain the errors element, which provides details about the error.

    For example, errors will be reported as JSON, if you try to add a product without a name, or insert unsupported data into certain fields.

Below is a JSON example of an error message returned by a PATCHrequest. Each field affected by errors will have its own array of error messages, with the field name as a key:

Banners

API for managing banners in a MyCashflow store

Retrieve a list of banner groups

Authorizations:
BasicAuth
query Parameters
expand
string
Value: "translations"

Comma-separated list of expandable sub-resources.

page_size
integer
Default: 50
Example: page_size=50

Determines the number of items included on a page of the response list.

page
integer
Default: 0
Example: page=2

Determines the page that is retrieved (used only in conjunction with page_size).

sort
string
Default: "id-asc"
Enum: "id-asc" "id-desc"
Example: sort=id-asc

Determines the sorting of the response list.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 1,
      • "created_at": "2013-06-19T20:41:47+03:00",
      • "updated_at": "2013-06-19T20:41:47+03:00",
      • "code": "group-code",
      • "title": "My banner group",
      • "translations": [
        ]
      }
    ],
  • "meta": {
    • "page": 1,
    • "page_size": 100,
    • "page_count": 3,
    • "item_count": 300
    }
}

Create a banner group

Authorizations:
BasicAuth
Request Body schema: application/json
required
code
string

The banner group code. Can be used to identify the banner group in theme files.

title
string

The banner group title. If present in both the root of the request body and the translations array, the translations array will take prevalence.

translations
Array of objects

Array of translations for translatable fields.

Responses

Request samples

Content type
application/json
{
  • "code": "group-code",
  • "title": "My banner group",
  • "translations": [
    • {
      • "language": "en",
      • "title": "My banner group"
      },
    • {
      • "language": "fi",
      • "title": "Banneriryhmä"
      }
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "code": "group-code",
    • "title": "My banner group",
    • "translations": [
      • {
        },
      • {
        }
      ]
    }
}

Retrieve a banner group

Authorizations:
BasicAuth
path Parameters
bannerGroupID
required
integer >= 1

Unique identifier for the banner group

query Parameters
expand
string
Value: "translations"

Comma-separated list of expandable sub-resources.

Responses

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "code": "group-code",
    • "title": "My banner group",
    • "translations": [
      • {
        },
      • {
        }
      ]
    }
}

Modify a banner group

Authorizations:
BasicAuth
path Parameters
bannerGroupID
required
integer >= 1

Unique identifier for the banner group

Request Body schema: application/json
required
code
string

The banner group code. Can be used to identify the banner group in theme files.

title
string

The banner group title. If present in both the root of the request body and the translations array, the translations array will take prevalence.

translations
Array of objects

Array of translations for translatable fields.

Responses

Request samples

Content type
application/json
{
  • "code": "group-code",
  • "title": "My banner group",
  • "translations": [
    • {
      • "language": "en",
      • "title": "My banner group"
      },
    • {
      • "language": "fi",
      • "title": "Banneriryhmä"
      }
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "code": "group-code",
    • "title": "My banner group",
    • "translations": [
      • {
        },
      • {
        }
      ]
    }
}

Delete a banner group

Authorizations:
BasicAuth
path Parameters
bannerGroupID
required
integer >= 1

Unique identifier for the banner group

Responses

Response samples

Content type
application/json
{
  • "error": "<error message>",
  • "description": "<error description>"
}

Retrieve a list of banners.

Authorizations:
BasicAuth
query Parameters
expand
string
Enum: "translations" "visibilities"

Comma-separated list of expandable sub-resources.

page_size
integer
Default: 50
Example: page_size=50

Determines the number of items included on a page of the response list.

page
integer
Default: 0
Example: page=2

Determines the page that is retrieved (used only in conjunction with page_size).

sort
string
Default: "id-asc"
Enum: "id-asc" "id-desc"
Example: sort=id-asc

Determines the sorting of the response list.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 1,
      • "created_at": "2013-06-19T20:41:47+03:00",
      • "updated_at": "2013-06-19T20:41:47+03:00",
      • "group_id": 4,
      • "sort": 1,
      • "code": "new-discounts",
      • "title": "New discounts for the summer",
      • "content": "<p>We have some exciting stuff for you this summer!</p>",
      • "visible_from": "2013-06-19T20:41:47+03:00",
      • "visible_to": "2014-06-19T20:41:47+03:00",
      • "file": "discounts.jpg",
      • "link": "/campaigns/43",
      • "translations": [
        ]
      }
    ],
  • "meta": {
    • "page": 1,
    • "page_size": 100,
    • "page_count": 3,
    • "item_count": 300
    }
}

Create a banner

Authorizations:
BasicAuth
Request Body schema: application/json
required
group_id
integer

The ID of the banner group this banner belongs to

sort
integer

A number that represents the banner's position in the banner group relative to other banners.

code
string

The banner's individual code. Set in the banner form's Codename field.

title
string

The banner's title. If present in both the root of the request body and the translations array, the translations array will take prevalence.

content
string

The banner's text/HTML content. If present in both the root of the request body and the translations array, the translations array will take prevalence.

visible_from
string <date-time>

The date when the banner becomes visible in the store.

visible_to
string <date-time>

The date when the banner is hidden.

file
string

The banner image. Enter only the filename of the image. The image file must reside in the store's file archive, and cannot be sent in the same request, with which you create or update a banner. The default path of the images is the files/tuotekuvat directory.

link
string

The banner link. If present in both the root of the request body and the translations array, the translations array will take prevalence.

translations
Array of objects

An array of translation objects that contain content for any multilingual fields of the banner.

Responses

Request samples

Content type
application/json
{
  • "group_id": 4,
  • "sort": 1,
  • "code": "new-discounts",
  • "title": "New discounts for the summer",
  • "content": "<p>We have some exciting stuff for you this summer!</p>",
  • "visible_from": "2013-06-19T20:41:47+03:00",
  • "visible_to": "2014-06-19T20:41:47+03:00",
  • "file": "discounts.jpg",
  • "link": "/campaigns/43",
  • "translations": [
    • {
      • "language": "en",
      • "title": "Fresh discounts just for this week",
      • "content": "<p>We publish new discounts every week.</p>",
      • "link": "/campaign/42"
      },
    • {
      • "language": "fi",
      • "title": "Uusia tarjouksia vain tälle viikolle.",
      • "content": "<p>Julkaisemme uusia tarjouksia joka viikko.</p>",
      • "link": "/campaign/43"
      }
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "group_id": 4,
    • "sort": 1,
    • "code": "new-discounts",
    • "title": "New discounts for the summer",
    • "content": "<p>We have some exciting stuff for you this summer!</p>",
    • "visible_from": "2013-06-19T20:41:47+03:00",
    • "visible_to": "2014-06-19T20:41:47+03:00",
    • "file": "discounts.jpg",
    • "link": "/campaigns/43",
    • "translations": [
      • {
        },
      • {
        }
      ]
    }
}

Retrieve a banner

Authorizations:
BasicAuth
path Parameters
bannerID
required
integer >= 1

Unique identifier for the banner

query Parameters
expand
string
Enum: "translations" "visibilities"

Comma-separated list of expandable sub-resources.

Responses

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "group_id": 4,
    • "sort": 1,
    • "code": "new-discounts",
    • "title": "New discounts for the summer",
    • "content": "<p>We have some exciting stuff for you this summer!</p>",
    • "visible_from": "2013-06-19T20:41:47+03:00",
    • "visible_to": "2014-06-19T20:41:47+03:00",
    • "file": "discounts.jpg",
    • "link": "/campaigns/43",
    • "translations": [
      • {
        },
      • {
        }
      ]
    }
}

Modify a banner

Authorizations:
BasicAuth
path Parameters
bannerID
required
integer >= 1

Unique identifier for the banner

Request Body schema: application/json
required
group_id
integer

The ID of the banner group this banner belongs to

sort
integer

A number that represents the banner's position in the banner group relative to other banners.

code
string

The banner's individual code. Set in the banner form's Codename field.

title
string

The banner's title. If present in both the root of the request body and the translations array, the translations array will take prevalence.

content
string

The banner's text/HTML content. If present in both the root of the request body and the translations array, the translations array will take prevalence.

visible_from
string <date-time>

The date when the banner becomes visible in the store.

visible_to
string <date-time>

The date when the banner is hidden.

file
string

The banner image. Enter only the filename of the image. The image file must reside in the store's file archive, and cannot be sent in the same request, with which you create or update a banner. The default path of the images is the files/tuotekuvat directory.

link
string

The banner link. If present in both the root of the request body and the translations array, the translations array will take prevalence.

translations
Array of objects

An array of translation objects that contain content for any multilingual fields of the banner.

Responses

Request samples

Content type
application/json
{
  • "group_id": 4,
  • "sort": 1,
  • "code": "new-discounts",
  • "title": "New discounts for the summer",
  • "content": "<p>We have some exciting stuff for you this summer!</p>",
  • "visible_from": "2013-06-19T20:41:47+03:00",
  • "visible_to": "2014-06-19T20:41:47+03:00",
  • "file": "discounts.jpg",
  • "link": "/campaigns/43",
  • "translations": [
    • {
      • "language": "en",
      • "title": "Fresh discounts just for this week",
      • "content": "<p>We publish new discounts every week.</p>",
      • "link": "/campaign/42"
      },
    • {
      • "language": "fi",
      • "title": "Uusia tarjouksia vain tälle viikolle.",
      • "content": "<p>Julkaisemme uusia tarjouksia joka viikko.</p>",
      • "link": "/campaign/43"
      }
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "group_id": 4,
    • "sort": 1,
    • "code": "new-discounts",
    • "title": "New discounts for the summer",
    • "content": "<p>We have some exciting stuff for you this summer!</p>",
    • "visible_from": "2013-06-19T20:41:47+03:00",
    • "visible_to": "2014-06-19T20:41:47+03:00",
    • "file": "discounts.jpg",
    • "link": "/campaigns/43",
    • "translations": [
      • {
        },
      • {
        }
      ]
    }
}

Delete a banner

Authorizations:
BasicAuth
path Parameters
bannerID
required
integer >= 1

Unique identifier for the banner

Responses

Response samples

Content type
application/json
{
  • "error": "<error message>",
  • "description": "<error description>"
}

Retrieve a banner designated by its banner code

Authorizations:
BasicAuth
path Parameters
bannerCode
required
string
Example: bannerCode

Banner code

query Parameters
expand
string
Enum: "translations" "visibilities"

Comma-separated list of expandable sub-resources.

Responses

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "group_id": 4,
    • "sort": 1,
    • "code": "new-discounts",
    • "title": "New discounts for the summer",
    • "content": "<p>We have some exciting stuff for you this summer!</p>",
    • "visible_from": "2013-06-19T20:41:47+03:00",
    • "visible_to": "2014-06-19T20:41:47+03:00",
    • "file": "discounts.jpg",
    • "link": "/campaigns/43",
    • "translations": [
      • {
        },
      • {
        }
      ]
    }
}

Modify a banner designated by its banner code

Authorizations:
BasicAuth
path Parameters
bannerCode
required
string
Example: bannerCode

Banner code

Request Body schema: application/json
required
group_id
integer

The ID of the banner group this banner belongs to

sort
integer

A number that represents the banner's position in the banner group relative to other banners.

code
string

The banner's individual code. Set in the banner form's Codename field.

title
string

The banner's title. If present in both the root of the request body and the translations array, the translations array will take prevalence.

content
string

The banner's text/HTML content. If present in both the root of the request body and the translations array, the translations array will take prevalence.

visible_from
string <date-time>

The date when the banner becomes visible in the store.

visible_to
string <date-time>

The date when the banner is hidden.

file
string

The banner image. Enter only the filename of the image. The image file must reside in the store's file archive, and cannot be sent in the same request, with which you create or update a banner. The default path of the images is the files/tuotekuvat directory.

link
string

The banner link. If present in both the root of the request body and the translations array, the translations array will take prevalence.

translations
Array of objects

An array of translation objects that contain content for any multilingual fields of the banner.

Responses

Request samples

Content type
application/json
{
  • "group_id": 4,
  • "sort": 1,
  • "code": "new-discounts",
  • "title": "New discounts for the summer",
  • "content": "<p>We have some exciting stuff for you this summer!</p>",
  • "visible_from": "2013-06-19T20:41:47+03:00",
  • "visible_to": "2014-06-19T20:41:47+03:00",
  • "file": "discounts.jpg",
  • "link": "/campaigns/43",
  • "translations": [
    • {
      • "language": "en",
      • "title": "Fresh discounts just for this week",
      • "content": "<p>We publish new discounts every week.</p>",
      • "link": "/campaign/42"
      },
    • {
      • "language": "fi",
      • "title": "Uusia tarjouksia vain tälle viikolle.",
      • "content": "<p>Julkaisemme uusia tarjouksia joka viikko.</p>",
      • "link": "/campaign/43"
      }
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "group_id": 4,
    • "sort": 1,
    • "code": "new-discounts",
    • "title": "New discounts for the summer",
    • "content": "<p>We have some exciting stuff for you this summer!</p>",
    • "visible_from": "2013-06-19T20:41:47+03:00",
    • "visible_to": "2014-06-19T20:41:47+03:00",
    • "file": "discounts.jpg",
    • "link": "/campaigns/43",
    • "translations": [
      • {
        },
      • {
        }
      ]
    }
}

Delete a banner designated by its banner code

Authorizations:
BasicAuth
path Parameters
bannerCode
required
string
Example: bannerCode

Banner code

Responses

Response samples

Content type
application/json
{
  • "error": "<error message>",
  • "description": "<error description>"
}

Brands

API for managing brands in a MyCashflow store

Retrieve a list of brands

Authorizations:
BasicAuth
query Parameters
expand
string
Value: "translations"

Comma-separated list of expandable sub-resources.

page_size
integer
Default: 50
Example: page_size=50

Determines the number of items included on a page of the response list.

page
integer
Default: 0
Example: page=2

Determines the page that is retrieved (used only in conjunction with page_size).

sort
string
Default: "id-asc"
Enum: "id-asc" "id-desc"
Example: sort=id-asc

Determines the sorting of the response list.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 1,
      • "created_at": "2013-06-19T20:41:47+03:00",
      • "updated_at": "2013-06-19T20:41:47+03:00",
      • "name": "Bernard's",
      • "description": "Quality clothes from Bernard's",
      • "seo_title": "Document title",
      • "seo_page_title": "Page title",
      • "seo_meta_description": "Meta description",
      • "translations": [
        ],
      • "visibilities": [
        ]
      }
    ],
  • "meta": {
    • "page": 1,
    • "page_size": 100,
    • "page_count": 3,
    • "item_count": 300
    }
}

Create a brand

Authorizations:
BasicAuth
Request Body schema: application/json
required
name
required
string

The brand name

description
string

The brand description. Accepts HTML content.

seo_title
string (seo_title)

The SEO document title. Shown, for example, in Google search results as the title.

seo_page_title
string (seo_page_title)

The SEO page title. Shown on the page, in place of the usual page title, if set.

seo_meta_description
string (seo_meta_description)

The SEO meta description. Shown, for example, in Google search results as the page description.

translations
Array of objects

An array of translation objects that contain content for any multilingual fields of the brand.

Responses

Request samples

Content type
application/json
{
  • "name": "Bernard's",
  • "description": "Quality clothes from Bernard's",
  • "seo_title": "Document title",
  • "seo_page_title": "Page title",
  • "seo_meta_description": "Meta description",
  • "translations": [
    • {
      • "language": "en",
      • "description": "<p>We publish new discounts every week.</p>",
      • "seo_title": "Bernard's products",
      • "seo_page_title": "Bernard's",
      • "seo_meta_description": "Finest Bernard's products"
      },
    • {
      • "language": "fi",
      • "description": "<p>Julkaisemme uusia tarjouksia joka viikko.</p>",
      • "seo_title": "Bernard's-tuotteet",
      • "seo_page_title": "Bernard's",
      • "seo_meta_description": "Hienoimmat Bernard's-tuotteet"
      }
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "name": "Bernard's",
    • "description": "Quality clothes from Bernard's",
    • "seo_title": "Document title",
    • "seo_page_title": "Page title",
    • "seo_meta_description": "Meta description",
    • "translations": [
      • {
        },
      • {
        }
      ],
    • "visibilities": [
      • {
        },
      • {
        }
      ]
    }
}

Retrieve a brand

Authorizations:
BasicAuth
path Parameters
brandID
required
integer >= 1

Unique identifier for the brand

query Parameters
expand
string
Value: "translations"

Comma-separated list of expandable sub-resources.

Responses

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "name": "Bernard's",
    • "description": "Quality clothes from Bernard's",
    • "seo_title": "Document title",
    • "seo_page_title": "Page title",
    • "seo_meta_description": "Meta description",
    • "translations": [
      • {
        },
      • {
        }
      ],
    • "visibilities": [
      • {
        },
      • {
        }
      ]
    }
}

Modify a brand

Authorizations:
BasicAuth
path Parameters
brandID
required
integer >= 1

Unique identifier for the brand

Request Body schema: application/json
required
name
string

The brand name

description
string

The brand description. Accepts HTML content.

seo_title
string (seo_title)

The SEO document title. Shown, for example, in Google search results as the title.

seo_page_title
string (seo_page_title)

The SEO page title. Shown on the page, in place of the usual page title, if set.

seo_meta_description
string (seo_meta_description)

The SEO meta description. Shown, for example, in Google search results as the page description.

translations
Array of objects

An array of translation objects that contain content for any multilingual fields of the brand.

Responses

Request samples

Content type
application/json
{
  • "name": "Bernard's",
  • "description": "Quality clothes from Bernard's",
  • "seo_title": "Document title",
  • "seo_page_title": "Page title",
  • "seo_meta_description": "Meta description",
  • "translations": [
    • {
      • "language": "en",
      • "description": "<p>We publish new discounts every week.</p>",
      • "seo_title": "Bernard's products",
      • "seo_page_title": "Bernard's",
      • "seo_meta_description": "Finest Bernard's products"
      },
    • {
      • "language": "fi",
      • "description": "<p>Julkaisemme uusia tarjouksia joka viikko.</p>",
      • "seo_title": "Bernard's-tuotteet",
      • "seo_page_title": "Bernard's",
      • "seo_meta_description": "Hienoimmat Bernard's-tuotteet"
      }
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "name": "Bernard's",
    • "description": "Quality clothes from Bernard's",
    • "seo_title": "Document title",
    • "seo_page_title": "Page title",
    • "seo_meta_description": "Meta description",
    • "translations": [
      • {
        },
      • {
        }
      ],
    • "visibilities": [
      • {
        },
      • {
        }
      ]
    }
}

Delete a brand

Authorizations:
BasicAuth
path Parameters
brandID
required
integer >= 1

Unique identifier for the brand

Responses

Response samples

Content type
application/json
{
  • "error": "<error message>",
  • "description": "<error description>"
}

Campaigns

API for managing campaigns in a MyCashflow store

Retrieve a list of campaigns

Authorizations:
BasicAuth
query Parameters
expand
string
Enum: "prices" "translations" "visibilities"

Comma-separated list of expandable sub-resources.

page_size
integer
Default: 50
Example: page_size=50

Determines the number of items included on a page of the response list.

page
integer
Default: 0
Example: page=2

Determines the page that is retrieved (used only in conjunction with page_size).

sort
string
Default: "id-asc"
Enum: "id-asc" "id-desc"
Example: sort=id-asc

Determines the sorting of the response list.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 1,
      • "created_at": "2013-06-19T20:41:47+03:00",
      • "updated_at": "2013-06-19T20:41:47+03:00",
      • "published": true,
      • "conditions": {
        },
      • "discounts": {
        },
      • "page": {
        },
      • "translations": [
        ]
      }
    ],
  • "meta": {
    • "page": 1,
    • "page_size": 100,
    • "page_count": 3,
    • "item_count": 300
    }
}

Retrieve a campaign

Authorizations:
BasicAuth
path Parameters
campaignID
required
integer >= 1

Unique identifier for the campaign

query Parameters
expand
string
Enum: "prices" "translations" "visibilities"

Comma-separated list of expandable sub-resources.

Responses

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "published": true,
    • "conditions": {
      • "time": {
        },
      • "code": "ALE123",
      • "customers": {
        }
      },
    • "discounts": {
      • "products": {
        },
      • "free_shipping": {
        },
      • "discount_row": {
        }
      },
    • "page": {
      • "description": "<p>All product -25 % for the summer. Act now, don't miss out!</p>",
      • "enabled": true,
      • "image": "image.png",
      • "link": "/category/6",
      • "pinned": false,
      • "template": "campaign/campaign-alternative"
      },
    • "translations": [
      • {
        },
      • {
        }
      ]
    }
}

Modify a campaign

Authorizations:
BasicAuth
path Parameters
campaignID
required
integer >= 1

Unique identifier for the campaign

Request Body schema: application/json
required
published
boolean

Determines whether the campaign is published or not. With the value true the campaign is published in the versions that are selected in the campaign settings.

translations
Array of objects

Responses

Request samples

Content type
application/json
{
  • "published": true,
  • "translations": [
    • {
      • "language": "fi",
      • "name": "Macbook-ale",
      • "description": "Kaikki Macbookit nyt -50 %",
      • "seo_title": "Päivin putiikin Macbook-ale",
      • "seo_page_title": "Kaikki Macbookit nyt -50 %",
      • "seo_meta_description": "Osta Macbook puoleen hintaan"
      },
    • {
      • "language": "en",
      • "name": "Macbook sale!",
      • "description": "All Macbooks now at -50 %",
      • "seo_title": "Macbook sale at Päivi's boutique",
      • "seo_page_title": "All Macbooks now -50 %",
      • "seo_meta_description": "Get your Macbook at half the price."
      }
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "published": true,
    • "conditions": {
      • "time": {
        },
      • "code": "ALE123",
      • "customers": {
        }
      },
    • "discounts": {
      • "products": {
        },
      • "free_shipping": {
        },
      • "discount_row": {
        }
      },
    • "page": {
      • "description": "<p>All product -25 % for the summer. Act now, don't miss out!</p>",
      • "enabled": true,
      • "image": "image.png",
      • "link": "/category/6",
      • "pinned": false,
      • "template": "campaign/campaign-alternative"
      },
    • "translations": [
      • {
        },
      • {
        }
      ]
    }
}

Change campaign prices

Update the discount prices of campaign products.

NOTE: The product discount row is identified by using a combination of the resource id and quantity.

For example

  • to change the price of a variation, use a combination of product_id, variation_id and quantity,
  • for product downloads, use product_id, download_id and quantity.
Authorizations:
BasicAuth
path Parameters
campaignID
required
integer >= 1

Unique identifier for the campaign

Request Body schema: application/json
required
Array
object

Responses

Request samples

Content type
application/json
[
  • {
    • "product_id": 4,
    • "price": 39.99
    },
  • {
    • "product_id": 5,
    • "variation_id": 3,
    • "price": 39.99,
    • "order_limit": 3
    },
  • {
    • "product_id": 4,
    • "download_id": 2,
    • "quantity": 3,
    • "price": 39.99
    }
]

Response samples

Content type
application/json
{
  • "data": [
    • [
      • {
        },
      • {
        },
      • {
        }
      ]
    ]
}

Delete campaign prices

Remove a product discount from a campaign.

NOTE: The product discount row is identified by using a combination of the resource id and quantity.

For example

  • to remove the price of a variation, use a combination of product_id, variation_id and quantity,
  • for product downloads, use product_id, download_id and quantity.
Authorizations:
BasicAuth
path Parameters
campaignID
required
integer >= 1

Unique identifier for the campaign

Responses

Response samples

Content type
application/json
{
  • "error": "<error message>",
  • "description": "<error description>"
}

Categories

API for managing categories in a MyCashflow store

Retrieve a list of categories

Authorizations:
BasicAuth
query Parameters
expand
string
Enum: "translations" "visibilities"

Comma-separated list of expandable sub-resources.

page_size
integer
Default: 50
Example: page_size=50

Determines the number of items included on a page of the response list.

page
integer
Default: 0
Example: page=2

Determines the page that is retrieved (used only in conjunction with page_size).

sort
string
Default: "id-asc"
Enum: "id-asc" "id-desc"
Example: sort=id-asc

Determines the sorting of the response list.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 1,
      • "created_at": "2013-06-19T20:41:47+03:00",
      • "updated_at": "2013-06-19T20:41:47+03:00",
      • "parent_id": 1,
      • "parent_sort": 4,
      • "name": "Pants",
      • "description": "<p>Category description content</p>",
      • "default_template": "category-front",
      • "external_id": 56,
      • "translations": [
        ]
      }
    ],
  • "meta": {
    • "page": 1,
    • "page_size": 100,
    • "page_count": 3,
    • "item_count": 300
    }
}

Create a product category

Authorizations:
BasicAuth
Request Body schema: application/json
required
parent_id
required
integer

The parent category's ID

parent_sort
integer

An integer that determines the category's location relative to the parent category's other child categories

name
required
string

You can provide the name of the category in either the main POST / PATCH body or in the translations array, when managing multilingual content.

description
string

The category description.

default_template
string
Enum: "category-front" "product-list" "homepage"

The display type of the product category

external_id
integer

The category's ID in an external system

translations
Array of objects

An array of translation objects, which contain content for any multilingual fields of the category.

Responses

Request samples

Content type
application/json
{
  • "parent_id": 1,
  • "parent_sort": 4,
  • "name": "Pants",
  • "description": "<p>Category description content</p>",
  • "default_template": "category-front",
  • "external_id": 56,
  • "translations": [
    • {
      • "language": "fi",
      • "name": "Kengät",
      • "description": "Hyviä kenkiä"
      },
    • {
      • "language": "en",
      • "name": "Shoes",
      • "description": "Nice shoes"
      }
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "parent_id": 1,
    • "parent_sort": 4,
    • "name": "Pants",
    • "description": "<p>Category description content</p>",
    • "default_template": "category-front",
    • "external_id": 56,
    • "translations": [
      • {
        },
      • {
        }
      ]
    }
}

Retrieve a category

Authorizations:
BasicAuth
path Parameters
categoryID
required
integer >= 1

Unique identifier for the category

query Parameters
expand
string
Enum: "translations" "visibilities"

Comma-separated list of expandable sub-resources.

Responses

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "parent_id": 1,
    • "parent_sort": 4,
    • "name": "Pants",
    • "description": "<p>Category description content</p>",
    • "default_template": "category-front",
    • "external_id": 56,
    • "translations": [
      • {
        },
      • {
        }
      ]
    }
}

Modify a product category

Authorizations:
BasicAuth
path Parameters
categoryID
required
integer >= 1

Unique identifier for the category

Request Body schema: application/json
required
parent_id
integer

The parent category's ID

parent_sort
integer

An integer that determines the category's location relative to the parent category's other child categories

name
string

You can provide the name of the category in either the main POST / PATCH body or in the translations array, when managing multilingual content.

description
string

The category description.

default_template
string
Enum: "category-front" "product-list" "homepage"

The display type of the product category

external_id
integer

The category's ID in an external system

translations
Array of objects

An array of translation objects, which contain content for any multilingual fields of the category.

Responses

Request samples

Content type
application/json
{
  • "parent_id": 1,
  • "parent_sort": 4,
  • "name": "Pants",
  • "description": "<p>Category description content</p>",
  • "default_template": "category-front",
  • "external_id": 56,
  • "translations": [
    • {
      • "language": "fi",
      • "name": "Kengät",
      • "description": "Hyviä kenkiä"
      },
    • {
      • "language": "en",
      • "name": "Shoes",
      • "description": "Nice shoes"
      }
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "parent_id": 1,
    • "parent_sort": 4,
    • "name": "Pants",
    • "description": "<p>Category description content</p>",
    • "default_template": "category-front",
    • "external_id": 56,
    • "translations": [
      • {
        },
      • {
        }
      ]
    }
}

Delete a product category

Authorizations:
BasicAuth
path Parameters
categoryID
required
integer >= 1

Unique identifier for the category

Responses

Response samples

Content type
application/json
{
  • "error": "<error message>",
  • "description": "<error description>"
}

Retrieve a category by its external ID

Authorizations:
BasicAuth
path Parameters
externalID
required
string

The category's external ID

query Parameters
expand
string
Enum: "translations" "visibilities"

Comma-separated list of expandable sub-resources.

Responses

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "parent_id": 1,
    • "parent_sort": 4,
    • "name": "Pants",
    • "description": "<p>Category description content</p>",
    • "default_template": "category-front",
    • "external_id": 56,
    • "translations": [
      • {
        },
      • {
        }
      ]
    }
}

Modify a category designated by its external ID

Authorizations:
BasicAuth
path Parameters
externalID
required
string

The category's external ID

Request Body schema: application/json
required
parent_id
integer

The parent category's ID

parent_sort
integer

An integer that determines the category's location relative to the parent category's other child categories

name
string

You can provide the name of the category in either the main POST / PATCH body or in the translations array, when managing multilingual content.

description
string

The category description.

default_template
string
Enum: "category-front" "product-list" "homepage"

The display type of the product category

external_id
integer

The category's ID in an external system

translations
Array of objects

An array of translation objects, which contain content for any multilingual fields of the category.

Responses

Request samples

Content type
application/json
{
  • "parent_id": 1,
  • "parent_sort": 4,
  • "name": "Pants",
  • "description": "<p>Category description content</p>",
  • "default_template": "category-front",
  • "external_id": 56,
  • "translations": [
    • {
      • "language": "fi",
      • "name": "Kengät",
      • "description": "Hyviä kenkiä"
      },
    • {
      • "language": "en",
      • "name": "Shoes",
      • "description": "Nice shoes"
      }
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "parent_id": 1,
    • "parent_sort": 4,
    • "name": "Pants",
    • "description": "<p>Category description content</p>",
    • "default_template": "category-front",
    • "external_id": 56,
    • "translations": [
      • {
        },
      • {
        }
      ]
    }
}

Retrieve a list of a category's subcategories

Authorizations:
BasicAuth
path Parameters
categoryID
required
integer >= 1

Unique identifier for the category

query Parameters
expand
string
Enum: "translations" "visibilities"

Comma-separated list of expandable sub-resources.

page_size
integer
Default: 50
Example: page_size=50

Determines the number of items included on a page of the response list.

page
integer
Default: 0
Example: page=2

Determines the page that is retrieved (used only in conjunction with page_size).

sort
string
Default: "id-asc"
Enum: "id-asc" "id-desc"
Example: sort=id-asc

Determines the sorting of the response list.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 1,
      • "created_at": "2013-06-19T20:41:47+03:00",
      • "updated_at": "2013-06-19T20:41:47+03:00",
      • "parent_id": 1,
      • "parent_sort": 4,
      • "name": "Pants",
      • "description": "<p>Category description content</p>",
      • "default_template": "category-front",
      • "external_id": 56,
      • "translations": [
        ]
      }
    ],
  • "meta": {
    • "page": 1,
    • "page_size": 100,
    • "page_count": 3,
    • "item_count": 300
    }
}

Retrieve a list of a category's visibilities

Authorizations:
BasicAuth
path Parameters
categoryID
required
integer >= 1

Unique identifier for the category

query Parameters
page_size
integer
Default: 50
Example: page_size=50

Determines the number of items included on a page of the response list.

page
integer
Default: 0
Example: page=2

Determines the page that is retrieved (used only in conjunction with page_size).

sort
string
Default: "id-asc"
Enum: "id-asc" "id-desc"
Example: sort=id-asc

Determines the sorting of the response list.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "version_id": 1,
      • "is_visible": false
      }
    ]
}

Modify a category's visibilities.

Authorizations:
BasicAuth
path Parameters
categoryID
required
integer >= 1

Unique identifier for the category

Request Body schema: application/json
required
Array
version_id
integer >= 1

ID of the version, where the item's visibility is toggled.

is_visible
boolean

Determines whether the item is visible in the designated version.

Responses

Request samples

Content type
application/json
[
  • {
    • "version_id": 1,
    • "is_visible": false
    }
]

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "version_id": 1,
      • "is_visible": false
      }
    ]
}

Customers

API for managing customers in a MyCashflow store

Retrieve a list of customer groups

Authorizations:
BasicAuth
query Parameters
expand
string
Enum: "translations" "customer_links"

Comma-separated list of expandable sub-resources.

page_size
integer
Default: 50
Example: page_size=50

Determines the number of items included on a page of the response list.

page
integer
Default: 0
Example: page=2

Determines the page that is retrieved (used only in conjunction with page_size).

sort
string
Default: "id-asc"
Enum: "id-asc" "id-desc"
Example: sort=id-asc

Determines the sorting of the response list.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 1,
      • "created_at": "2013-06-19T20:41:47+03:00",
      • "updated_at": "2013-06-19T20:41:47+03:00",
      • "name": "Jälleenmyyjät",
      • "customer_links": [
        ]
      }
    ],
  • "meta": {
    • "page": 1,
    • "page_size": 100,
    • "page_count": 3,
    • "item_count": 300
    }
}

Create a customer group

Authorizations:
BasicAuth
Request Body schema: application/json
required
name
required
string

Name of the customer group

Responses

Request samples

Content type
application/json
{
  • "name": "Jälleenmyyjät"
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "name": "Jälleenmyyjät",
    • "customer_links": [
      • {
        },
      • {
        }
      ]
    }
}

Retrieve a customer group

Authorizations:
BasicAuth
path Parameters
customerGroupID
required
integer >= 1

Unique identifier for the customer group

query Parameters
expand
string
Enum: "translations" "customer_links"

Comma-separated list of expandable sub-resources.

Responses

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "name": "Jälleenmyyjät",
    • "customer_links": [
      • {
        },
      • {
        }
      ]
    }
}

Modify a customer group

Authorizations:
BasicAuth
path Parameters
customerGroupID
required
integer >= 1

Unique identifier for the customer group

Request Body schema: application/json
required
name
string

Name of the customer group

Responses

Request samples

Content type
application/json
{
  • "name": "Jälleenmyyjät"
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "name": "Jälleenmyyjät",
    • "customer_links": [
      • {
        },
      • {
        }
      ]
    }
}

Delete a customer group

Authorizations:
BasicAuth
path Parameters
customerGroupID
required
integer >= 1

Unique identifier for the customer group

Responses

Response samples

Content type
application/json
{
  • "error": "<error message>",
  • "description": "<error description>"
}

Remove a customer from a customer group

Authorizations:
BasicAuth
path Parameters
customerGroupID
required
integer >= 1

Unique identifier for the customer group

customerID
required
integer >= 1

Unique identifier for the customer

Responses

Response samples

Content type
application/json
{
  • "error": "<error message>",
  • "description": "<error description>"
}

Retrieve a list of customers

Authorizations:
BasicAuth
query Parameters
expand
string
Value: "customer_groups"

Comma-separated list of expandable sub-resources.

created_at-from
string <date-time>
Example: created_at-from=2017-06-14T20:45:52+03:00

Retrieve customer accounts that have been created on or after the specified date and time. You can provide the datetime value in any of these three following formats:

  • YYYY-MM-DD: 2017-06-14 - YYYY-MM-DDTHH:MM:SS: 2017-06-14T20:45:52 - 1703044631 (Unix timestamp)
created_at-to
string <date-time>
Example: created_at-to=2017-06-14T20:45:52+03:00

Retrieve customer accounts that have been created on or before the specified date and time. You can provide the datetime value in any of these three following formats:

  • YYYY-MM-DD: 2017-06-14 - YYYY-MM-DDTHH:MM:SS: 2017-06-14T20:45:52 - 1703044631 (Unix timestamp)
updated_at-from
string <date-time>
Example: updated_at-from=2017-06-14T20:45:52

Retrieve customer accounts that have been updated on or after the specified date and time. You can provide the datetime value in any of these three following formats:

  • YYYY-MM-DD: 2017-06-14 - YYYY-MM-DDTHH:MM:SS: 2017-06-14T20:45:52 - 1703044631 (Unix timestamp)
updated_at-to
string <date-time>
Example: updated_at-to=2017-06-14T20:45:52

Retrieve customer accounts that have been updated on or before the specified date and time. You can provide the datetime value in any of these three following formats:

  • YYYY-MM-DD: 2017-06-14 - YYYY-MM-DDTHH:MM:SS: 2017-06-14T20:45:52 - 1703044631 (Unix timestamp)
last_login_at-from
string <date-time>
Example: last_login_at-from=2017-06-14T20:45:52

Retrieve customer accounts that have most recently logged in on or after the specified date and time. You can provide the datetime value in any of these three following formats:

  • YYYY-MM-DD: 2017-06-14 - YYYY-MM-DDTHH:MM:SS: 2017-06-14T20:45:52 - 1703044631 (Unix timestamp)
last_login_at-to
string <date-time>
Example: last_login_at-to=2017-06-14T20:45:52

Retrieve customer accounts that have most recently logged in on or before the specified date and time. You can provide the datetime value in any of these three following formats:

  • YYYY-MM-DD: 2017-06-14 - YYYY-MM-DDTHH:MM:SS: 2017-06-14T20:45:52 - 1703044631 (Unix timestamp)
page_size
integer
Default: 50
Example: page_size=50

Determines the number of items included on a page of the response list.

page
integer
Default: 0
Example: page=2

Determines the page that is retrieved (used only in conjunction with page_size).

sort
string
Default: "id-asc"
Enum: "id-asc" "id-desc"
Example: sort=id-asc

Determines the sorting of the response list.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 1,
      • "created_at": "2013-06-19T20:41:47+03:00",
      • "updated_at": "2013-06-19T20:41:47+03:00",
      • "first_name": "Example",
      • "last_name": "Customer",
      • "login_allowed": true,
      • "company": "Example Company Inc.",
      • "vat_code": "1234567-6",
      • "street_address": "Example street 2",
      • "postal_code": "00100",
      • "city": "Helsinki",
      • "country": "FI",
      • "phone": "05012312312",
      • "email": "mail@domain.fi",
      • "version_id": 4,
      • "language": "fi",
      • "email_subscription": true,
      • "einvoice_address": {
        },
      • "sms_subscription": false,
      • "customer_groups": [
        ]
      }
    ],
  • "meta": {
    • "page": 1,
    • "page_size": 100,
    • "page_count": 3,
    • "item_count": 300
    }
}

Create a new customer account

Authorizations:
BasicAuth
Request Body schema: application/json
required
first_name
required
string

The customer's first name

last_name
required
string

The customer's last name

login_allowed
required
boolean

true = enable customer to login to your store with.

company
string

The customer's company

vat_code
string

The customer's VAT code. Required if company is provided. Validated against the EU's VIES database.

street_address
required
string

Street address

postal_code
required
string

Postal code

city
required
string

City

country
required
string

Country code

phone
string

Phone number

email
required
string

Email address

language
string

The customer's language code

Responses

Request samples

Content type
application/json
{
  • "first_name": "Example",
  • "last_name": "Customer",
  • "login_allowed": true,
  • "company": "Example Company Inc.",
  • "vat_code": "1234567-6",
  • "street_address": "Example street 2",
  • "postal_code": "00100",
  • "city": "Helsinki",
  • "country": "FI",
  • "phone": "05012312312",
  • "email": "mail@domain.fi",
  • "language": "fi"
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "first_name": "Example",
    • "last_name": "Customer",
    • "login_allowed": true,
    • "company": "Example Company Inc.",
    • "vat_code": "1234567-6",
    • "street_address": "Example street 2",
    • "postal_code": "00100",
    • "city": "Helsinki",
    • "country": "FI",
    • "phone": "05012312312",
    • "email": "mail@domain.fi",
    • "version_id": 4,
    • "language": "fi",
    • "email_subscription": true,
    • "einvoice_address": {
      • "edi_code": "003721315706",
      • "operator_code": "E204503"
      },
    • "sms_subscription": false,
    • "customer_groups": [
      • {
        },
      • {
        }
      ]
    }
}

Retrieve a customer

Authorizations:
BasicAuth
path Parameters
customerID
required
integer >= 1

Unique identifier for the customer

query Parameters
expand
string
Value: "customer_groups"

Comma-separated list of expandable sub-resources.

Responses

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "first_name": "Example",
    • "last_name": "Customer",
    • "login_allowed": true,
    • "company": "Example Company Inc.",
    • "vat_code": "1234567-6",
    • "street_address": "Example street 2",
    • "postal_code": "00100",
    • "city": "Helsinki",
    • "country": "FI",
    • "phone": "05012312312",
    • "email": "mail@domain.fi",
    • "version_id": 4,
    • "language": "fi",
    • "email_subscription": true,
    • "einvoice_address": {
      • "edi_code": "003721315706",
      • "operator_code": "E204503"
      },
    • "sms_subscription": false,
    • "customer_groups": [
      • {
        },
      • {
        }
      ]
    }
}

Modify a customer's details

Authorizations:
BasicAuth
path Parameters
customerID
required
integer >= 1

Unique identifier for the customer

Request Body schema: application/json
required
first_name
string

The customer's first name

last_name
string

The customer's last name

login_allowed
boolean

true = enable customer to login to your store with.

company
string

The customer's company

vat_code
string

The customer's VAT code. Required if company is provided. Validated against the EU's VIES database.

street_address
string

Street address

postal_code
string

Postal code

city
string

City

country
string

Country code

phone
string

Phone number

email
string

Email address

language
string

The customer's language code

Responses

Request samples

Content type
application/json
{
  • "first_name": "Example",
  • "last_name": "Customer",
  • "login_allowed": true,
  • "company": "Example Company Inc.",
  • "vat_code": "1234567-6",
  • "street_address": "Example street 2",
  • "postal_code": "00100",
  • "city": "Helsinki",
  • "country": "FI",
  • "phone": "05012312312",
  • "email": "mail@domain.fi",
  • "language": "fi"
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "first_name": "Example",
    • "last_name": "Customer",
    • "login_allowed": true,
    • "company": "Example Company Inc.",
    • "vat_code": "1234567-6",
    • "street_address": "Example street 2",
    • "postal_code": "00100",
    • "city": "Helsinki",
    • "country": "FI",
    • "phone": "05012312312",
    • "email": "mail@domain.fi",
    • "version_id": 4,
    • "language": "fi",
    • "email_subscription": true,
    • "einvoice_address": {
      • "edi_code": "003721315706",
      • "operator_code": "E204503"
      },
    • "sms_subscription": false,
    • "customer_groups": [
      • {
        },
      • {
        }
      ]
    }
}

Delete a customer account

Authorizations:
BasicAuth
path Parameters
customerID
required
integer >= 1

Unique identifier for the customer

Responses

Response samples

Content type
application/json
{
  • "error": "<error message>",
  • "description": "<error description>"
}

Retrieve a customer's shipping addresses

Authorizations:
BasicAuth
path Parameters
customerID
required
integer >= 1

Unique identifier for the customer

query Parameters
page_size
integer
Default: 50
Example: page_size=50

Determines the number of items included on a page of the response list.

page
integer
Default: 0
Example: page=2

Determines the page that is retrieved (used only in conjunction with page_size).

sort
string
Default: "id-asc"
Enum: "id-asc" "id-desc"
Example: sort=id-asc

Determines the sorting of the response list.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 1,
      • "created_at": "2013-06-19T20:41:47+03:00",
      • "updated_at": "2013-06-19T20:41:47+03:00",
      • "customer_id": 2,
      • "primary": false,
      • "email": "mail@example.com",
      • "company": "Pulse247 Oy",
      • "first_name": "Example",
      • "last_name": "Customer",
      • "street_address": "Kaivokatu 12",
      • "street_name": "Moussaouistraat",
      • "street_number": "22",
      • "house_extension": "b",
      • "postal_code": "00100",
      • "city": "Helsinki",
      • "country": "fi",
      • "phone": "+3585012312312"
      }
    ]
}

Retrieve a customer designated by their email address

Authorizations:
BasicAuth
path Parameters
email
required
string

The customer's email address

query Parameters
expand
string
Value: "customer_groups"

Comma-separated list of expandable sub-resources.

Responses

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "first_name": "Example",
    • "last_name": "Customer",
    • "login_allowed": true,
    • "company": "Example Company Inc.",
    • "vat_code": "1234567-6",
    • "street_address": "Example street 2",
    • "postal_code": "00100",
    • "city": "Helsinki",
    • "country": "FI",
    • "phone": "05012312312",
    • "email": "mail@domain.fi",
    • "version_id": 4,
    • "language": "fi",
    • "email_subscription": true,
    • "einvoice_address": {
      • "edi_code": "003721315706",
      • "operator_code": "E204503"
      },
    • "sms_subscription": false,
    • "customer_groups": [
      • {
        },
      • {
        }
      ]
    }
}

Delete a customer account designated by their email address

Authorizations:
BasicAuth
path Parameters
email
required
string

The customer's email address

Responses

Response samples

Content type
application/json
{
  • "error": "<error message>",
  • "description": "<error description>"
}

Retrieve a customer by their external ID

Authorizations:
BasicAuth
path Parameters
externalID
required
string

The customer's ID in an external system

query Parameters
expand
string
Value: "customer_groups"

Comma-separated list of expandable sub-resources.

Responses

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "first_name": "Example",
    • "last_name": "Customer",
    • "login_allowed": true,
    • "company": "Example Company Inc.",
    • "vat_code": "1234567-6",
    • "street_address": "Example street 2",
    • "postal_code": "00100",
    • "city": "Helsinki",
    • "country": "FI",
    • "phone": "05012312312",
    • "email": "mail@domain.fi",
    • "version_id": 4,
    • "language": "fi",
    • "email_subscription": true,
    • "einvoice_address": {
      • "edi_code": "003721315706",
      • "operator_code": "E204503"
      },
    • "sms_subscription": false,
    • "customer_groups": [
      • {
        },
      • {
        }
      ]
    }
}

Delete a customer account designated by their external ID

Authorizations:
BasicAuth
path Parameters
externalID
required
string

The customer's ID in an external system

Responses

Response samples

Content type
application/json
{
  • "error": "<error message>",
  • "description": "<error description>"
}

Email Subscribers

API for managing email subscribers in a MyCashflow store

Retrieve a list of email subscribers

Authorizations:
BasicAuth
query Parameters
page_size
integer
Default: 50
Example: page_size=50

Determines the number of items included on a page of the response list.

page
integer
Default: 0
Example: page=2

Determines the page that is retrieved (used only in conjunction with page_size).

sort
string
Default: "id-asc"
Enum: "id-asc" "id-desc"
Example: sort=id-asc

Determines the sorting of the response list.

updated_at-from
string <date-time>
Example: updated_at-from=2017-06-14T20:45:52

Filters subscribers whose details have been updated at or after the specified date and time.' You can provide the datetime value in any of these three following formats:

  • YYYY-MM-DD: 2017-06-14 - YYYY-MM-DDTHH:MM:SS: 2017-06-14T20:45:52 - 1703044631 (Unix timestamp)
updated_at-to
string <date-time>
Example: updated_at-to=2017-06-14T20:45:52

Filters subscribers whose details have been updated at or before the specified date and time.' You can provide the datetime value in any of these three following formats:

  • YYYY-MM-DD: 2017-06-14 - YYYY-MM-DDTHH:MM:SS: 2017-06-14T20:45:52 - 1703044631 (Unix timestamp)

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 1,
      • "created_at": "2013-06-19T20:41:47+03:00",
      • "updated_at": "2013-06-19T20:41:47+03:00",
      • "email": "mail@example.com",
      • "version_id": 5,
      • "language": "fi",
      • "country": "fi",
      • "subscribed_at": "2016-02-25T11:31:39+02:00",
      • "unsubscribed_at": "2016-02-25T11:31:39+02:00"
      }
    ],
  • "meta": {
    • "page": 1,
    • "page_size": 100,
    • "page_count": 3,
    • "item_count": 300
    }
}

Add a new subscriber to your mailing list

Authorizations:
BasicAuth
Request Body schema: application/json
required
email
required
string

The subscriber's email address

Responses

Request samples

Content type
application/json
{
  • "email": "mail@example.com"
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 1,
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "email": "mail@example.com",
    • "version_id": 5,
    • "language": "fi",
    • "country": "fi",
    • "subscribed_at": "2016-02-25T11:31:39+02:00",
    • "unsubscribed_at": "2016-02-25T11:31:39+02:00"
    }
}

Remove a subscriber from the store's mailing list

Authorizations:
BasicAuth
path Parameters
email
required
string

The subscriber's email address

Responses

Response samples

Content type
application/json
{
  • "error": "<error message>",
  • "description": "<error description>"
}

Gift Cards

API for managing gift cards in a MyCashflow store

Retrieve a list of gift cards

Authorizations:
BasicAuth
query Parameters
page_size
integer
Default: 50
Example: page_size=50

Determines the number of items included on a page of the response list.

page
integer
Default: 0
Example: page=2

Determines the page that is retrieved (used only in conjunction with page_size).

sort
string
Default: "id-asc"
Enum: "id-asc" "id-desc"
Example: sort=id-asc

Determines the sorting of the response list.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "created_at": "2013-06-19T20:41:47+03:00",
      • "updated_at": "2013-06-19T20:41:47+03:00",
      • "expires_at": "2021-10-20",
      • "code": "DTGZRVGGYPS2YMNC",
      • "notes": "Example content",
      • "balance": 50
      }
    ],
  • "meta": {
    • "page": 1,
    • "page_size": 100,
    • "page_count": 3,
    • "item_count": 300
    }
}

Create a new gift card

If the gift card code is not provided in the POST body, a code will be automatically generated and included in the response.

Authorizations:
BasicAuth
Request Body schema: application/json
required
expires_at
string <date>

The expiry date of the gift card. Must be in the future. The gift card will expire at 0:00 am. on the given date.

code
string

The gift card code

notes
string

Internal notes for the gift card

balance
number

The gift card balance in euros

Responses

Request samples

Content type
application/json
{
  • "expires_at": "2021-10-20",
  • "code": "DTGZRVGGYPS2YMNC",
  • "notes": "Example content",
  • "balance": 50
}

Response samples

Content type
application/json
{
  • "data": {
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "expires_at": "2021-10-20",
    • "code": "DTGZRVGGYPS2YMNC",
    • "notes": "Example content",
    • "balance": 50
    }
}

Retrieve a gift card

Authorizations:
BasicAuth
path Parameters
giftCardCode
required
string

Unique gift card code The gift card code is automatically generated, when creating a gift card.

Responses

Response samples

Content type
application/json
{
  • "data": {
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "expires_at": "2021-10-20",
    • "code": "DTGZRVGGYPS2YMNC",
    • "notes": "Example content",
    • "balance": 50
    }
}

Modify a gift card

Authorizations:
BasicAuth
path Parameters
giftCardCode
required
string

Unique gift card code The gift card code is automatically generated, when creating a gift card.

Request Body schema: application/json
required
expires_at
string <date>

The expiry date of the gift card. Must be in the future. The gift card will expire at 0:00 am. on the given date.

code
string

The gift card code

notes
string

Internal notes for the gift card

balance
number

The gift card balance in euros

Responses

Request samples

Content type
application/json
{
  • "expires_at": "2021-10-20",
  • "code": "DTGZRVGGYPS2YMNC",
  • "notes": "Example content",
  • "balance": 50
}

Response samples

Content type
application/json
{
  • "data": {
    • "created_at": "2013-06-19T20:41:47+03:00",
    • "updated_at": "2013-06-19T20:41:47+03:00",
    • "expires_at": "2021-10-20",
    • "code": "DTGZRVGGYPS2YMNC",
    • "notes": "Example content",
    • "balance": 50
    }
}

Images

API for managing product images in a MyCashflow store

Retrieve a list of images

Authorizations:
BasicAuth
query Parameters
page_size
integer
Default: 50
Example: page_size=50

Determines the number of items included on a page of the response list.

page
integer
Default: 0
Example: page=2

Determines the page that is retrieved (used only in conjunction with page_size).

sort
string
Default: "id-asc"
Enum: "id-asc" "id-desc"
Example: sort=id-asc

Determines the sorting of the response list.

Responses