Customer Account

Customer Account records hold the contact details for a customer. A customer can have several customer bank accounts, which in turn can have several Direct Debit mandate setup, payments taken or refunds setup.

{id} donates the id of the record.

All timestamps are formatted as ISO8601 with timezone information. For API calls that allow for a timestamp to be specified, we use that exact timestamp. These timestamps look something like 2014-02-27T15:05:06.123Z.For endpoints that require dates, we expect a date string of the format YYYY-MM-DD, where an example would look like 2014-02-27.

Method Purpose
POST Create a Customer Account
PUT Update a Customer Account
GET (Singular) Return Customer Account details
GET (List) Return Customer Account details in a list

POST

Action: Create a Customer Account.
Method: POST
URL: https://api.smarterpaycloud.com/service.svc/customeraccount

Request Parameters

Property Mandatory Description
email True Maximum 100 characters - must be valid email
first_name True Maximum 50 characters
last_name True Maximum 50 characters
address_line1 True Maximum 50 characters
city True Maximum 50 characters
postal_code True Maximum 50 characters
address_line2 False Maximum 50 characters
title False Maximum 50 characters
company_name False Maximum 50 characters
country_code False 2 character Country Code (ISO 3166-1 alpha-2). If empty defaults to "GB"
state_code False 2 character US state code. Mandatory if country_code set to “US”.
custom_reference False Maximum 50 characters - Custom reference set on record
metadata False String for Custom metadata

Request Sample

{
 "Customer_Account":
  {
   "email":"test@test.com",
   "company_name":"testcompany",
   "title":"Mr",
   "first_name":"test",
   "last_name":"test",
   "address_line1":"74 test street",
   "address_line2":"test line 2",
   "city":"testcity",
   "postal_code":"Q1 TEST",
   "country_code":"GB",
   "custom_reference":"XYZ",
   "metadata":""
  }
}

Response Parameters

Property Description
address_line1 First line of address
address_line2 Second line of address
city Returns city
company_name Returns company name
country_code Returns Country Code (ISO 3166-1 alpha-2)
state_code Returns US state code, if country code set to “US”
created_at Datetime formatted as ISO8601
custom_reference Custom reference set on record
email Returns email
first_name Returns the customer first name
id Unique identifier beginning with specified prefix followed by 8 digit auto number
last_name Returns the customer last name
metadata Returns optional, custom, metadata, if set
postal_code Returns postal code
status Returns the status of the customer account
title Returns the customer title.

Response Sample

{
    "Customer_Account": {
        "address_line1": "32-36 Prospect Street",
        "address_line2": "",
        "city": "Hull",
        "company_name": "Halestorm",
        "country_code": "US",
        "state_code": "FL",
        "created_at": "2022-05-12T12:24:08Z",
        "custom_reference": "Halestorm",
        "email": "lhale@gmail.com",
        "first_name": "Lizzy",
        "id": "FTBCUST00035740",
        "last_name": "Hale",
        "postal_code": "HU2 8PX",
        "status": "active",
        "title": "",
        "metadata": ""
    }
}

Action: Update a Customer Account.
Method: PUT
URL: https://api.smarterpaycloud.com/service.svc/customeraccount/{ID}

{ID} denotes ID of record.

Request Parameters

Property Mandatory Description
email True Maximum 100 characters - must be valid email
first_name True Maximum 50 characters
last_name True Maximum 50 characters
address_line1 True Maximum 50 characters
city True Maximum 50 characters
postal_code True Maximum 50 characters
address_line2 False Maximum 50 characters
title False Maximum 50 characters
company_name False Maximum 50 characters
country_code False 2 character Country Code (ISO 3166-1 alpha-2). If empty defaults to "GB"
state_code False 2 character US state code. Mandatory if country_code set to “US”.
custom_reference False Maximum 50 characters - Custom reference set on record
metadata False String for Custom metadata

Request Sample

{
 "Customer_Account":
  {
   "email":"test@test.com",
   "company_name":"testcompany",
   "title":"Mr",
   "first_name":"test",
   "last_name":"test",
   "address_line1":"74 test street",
   "address_line2":"test line 2",
   "city":"testcity",
   "postal_code":"Q1 TEST",
   "country_code":"GB",
   "custom_reference":"XYZ",
   "metadata":""
  }
}

Response Parameters

Property Description
address_line1 First line of address
address_line2 Second line of address
city Returns city
company_name Returns company name
country_code Returns Country Code (ISO 3166-1 alpha-2)
state_code Returns US state code, if country code set to “US”
created_at Datetime formatted as ISO8601
custom_reference Custom reference set on record
email Returns email
first_name Returns the customer first name
id Unique identifier beginning with specified prefix followed by 8 digit auto number
last_name Returns the customer last name
metadata Returns optional, custom, metadata, if set
postal_code Returns postal code
status Returns the status of the customer account
title Returns the customer title.

Response Sample

{
    "Customer_Account": {
        "address_line1": "32-36 Prospect Street",
        "address_line2": "",
        "city": "Hull",
        "company_name": "Halestorm",
        "country_code": "US",
        "state_code": "FL",
        "created_at": "2022-05-12T12:24:08Z",
        "custom_reference": "Halestorm",
        "email": "lhale@gmail.com",
        "first_name": "Lizzy",
        "id": "FTBCUST00035740",
        "last_name": "Hale",
        "postal_code": "HU2 8PX",
        "status": "active",
        "title": "",
        "metadata": ""
    }
}

Action: Return Customer Account details.
Method: GET
URL: https://api.smarterpaycloud.com/service.svc/customeraccount/{ID}

{ID} denotes ID of record.

Response Parameters

Property Description
address_line1 First line of address
address_line2 Second line of address
city Returns city
company_name Returns company name
country_code Returns Country Code (ISO 3166-1 alpha-2)
state_code Returns US state code, if country code set to “US”
created_at Datetime formatted as ISO8601
custom_reference Custom reference set on record
email Returns email
first_name Returns the customer first name
id Unique identifier beginning with specified prefix followed by 8 digit auto number
last_name Returns the customer last name
metadata Returns optional, custom, metadata, if set
postal_code Returns postal code
status Returns the status of the customer account
title Returns the customer title.

Response Sample

{
    "Customer_Account": {
        "address_line1": "32-36 Prospect Street",
        "address_line2": "",
        "city": "Hull",
        "company_name": "Halestorm",
        "country_code": "US",
        "state_code": "FL",
        "created_at": "2022-05-12T12:24:08Z",
        "custom_reference": "Halestorm",
        "email": "lhale@gmail.com",
        "first_name": "Lizzy",
        "id": "FTBCUST00035740",
        "last_name": "Hale",
        "postal_code": "HU2 8PX",
        "status": "active",
        "title": "",
        "metadata": ""
    }
}

Action: Return Customer Account details.
Method: GET
URL: https://api.smarterpaycloud.com/service.svc/customeraccounts

Optional Parameters and filters are available, please see below.

Response Parameters

Property Description
address_line1 First line of address
address_line2 Second line of address
city Returns city
company_name Returns company name
country_code Returns Country Code (ISO 3166-1 alpha-2)
state_code Returns US state code, if country code set to “US”
created_at Datetime formatted as ISO8601
custom_reference Custom reference set on record
email Returns email
first_name Returns the customer first name
id Unique identifier beginning with specified prefix followed by 8 digit auto number
last_name Returns the customer last name
metadata Returns optional, custom, metadata, if set
postal_code Returns postal code
status Returns the status of the customer account
title Returns the customer title.

Response Sample

{
    "Customer_Accounts": [
        {
            "address_line1": "32-36 Prospect Street",
            "address_line2": "",
            "city": "Hull",
            "company_name": "Halestorm",
            "country_code": "US",
            "state_code": "FL",
            "created_at": "2022-05-12T12:24:08Z",
            "custom_reference": "Halestorm",
            "email": "lhale@gmail.com",
            "first_name": "Lizzy",
            "id": "FTBCUST00035740",
            "last_name": "Hale",
            "postal_code": "HU2 8PX",
            "status": "active",
            "title": "",
            "metadata": ""
        },
        {
            "address_line1": "32-36 Prospect Street",
            "address_line2": "",
            "city": "Hull",
            "company_name": "Metallica",
            "country_code": "GB",
            "created_at": "2022-05-12T12:26:29Z",
            "custom_reference": "Metallica",
            "email": "jhetfield@email.com",
            "first_name": "James",
            "id": "FTBCUST00035741",
            "last_name": "Hetfield",
            "postal_code": "HU2 8PX",
            "status": "active",
            "title": "",
            "metadata": ""
            
        }
    ]
}


Optional Parameters and filters
Optional parameters can be added to the GET URL by using a “?” in front of the first parameter and “&” in front of subsequent parameters, for example https://api.smarterpaycloud.com/Service.svc/BankAccounts?limit=2&page_no=1

Parameter Description
limit Limits the number of records returned by the request. Default=40 when not specified. Minimum=1. Maximum=500.
page_no Specifies which page of records are returned by the request. Default=1 when not specified.
sort_field specifies which field to sort on. Options are: “company”,“email”,“name”,“postal_code”,“custom_reference”,“status”,“created_at” (Default when not specified).
sort_order Specifies which order to sort on. Options are asc (ascending. Default when not specified) or desc (descending).
Filter Description
billing_postal_code Filter the list using the billing_postal_code. Matches will contain the provided value.
company Filter the list using the company. Matches will contain the provided value.
created_from Filter the list with records created after the datetime supplied. Format is YYYY-MM-DD HH:MM:SS (2022-05-13 10:15:00).
created_to Filter the list with records created before the datetime supplied. Format is YYYY-MM-DD HH:MM:SS (2022-05-13 10:15:00).
custom_reference Filter the list using the custom_reference. Matches will contain the provided value.
email Filter the list using the email. Matches will contain the provided value.
id Filter the list using the id. Matches will exactly match the provided value.
name Filter the list using the name. Matches will contain the provided value.
status Filter the list using the status of the record. Can be a comma seperated list of required values. Options are “active”, “inactive”.
  • Last modified: 2023/11/22 14:50