Customers | Update Customer Profile

Customer Profile Update Endpoint

This document provides instructions on using the set_customer_update_profile endpoint to update existing customer profiles in the API server's database. This includes updating various customer details and preferences.

API Endpoint for Customer Profile Update

This API call is essential for updating the details of existing customers in the system.

Customer Profile Update Process

To update a customer's profile, use the set_customer_update_profile API call. The process involves authenticating with the API and submitting the details that need to be updated for the customer.

Endpoint and Method

  • Endpoint: https://easycms.fi/public_api/set_customer_update_profile/
  • Method: POST

Mandatory Parameters | Payload

To update a customer profile, the following parameters are mandatory:

  • email: The email address of the customer whose profile is being updated.
  • customer_password: The current password of the customer's account.

Optional Parameters for Profile Update

Other customer details can be updated as needed. If a field is not passed, the existing value will remain unchanged.

  • language_id: (integer) The language ID of the customer. This can be fetched from the /get_languages.php endpoint.
  • language: (string) Preferred language of the customer, represented by a language code can be fetched from the /get_languages.php endpoint.
  • parent_id: (integer) Identifier for the parent entity of the customer, if applicable.
  • visible: (integer) Indicates if the customer is visible in the system.
  • firstname: (string) Full name of the customer.
  • lastname: (string) Trade name of the customer.
  • phone_prefix: (string) Country or area code for the primary phone number.
  • phone_full: (string) Full primary phone number including the prefix.
  • phone: (string) Primary phone number without the prefix.
  • phone2_prefix: (string) Country or area code for the secondary phone number.
  • phone2_full: (string) Full secondary phone number including the prefix.
  • phone2: (string) Secondary phone number without the prefix.
  • password: (string) Encrypted password for the customer's account.
  • company: (string) Name of the company associated with the customer.
  • business_id: (string) Business identifier or registration number of the company.
  • address: (string) Primary address of the customer.
  • address2: (string) Secondary address of the customer.
  • city_id: (string) Identifier for the city associated with the primary address. This can be fetched from the /get_cities.php endpoint.
  • postal: (string) Postal or ZIP code for the primary address.
  • state: (boolean/string) State or region for the primary address.
  • country_id: (string) Identifier for the country of the primary address. This can be fetched from the /get_countries.php endpoint.
  • different_shipping_address: (integer) 0 for no or 1 for yes | Indicates if the shipping address is different from the primary address.
  • shipping_address: (string) Shipping address, if different from the primary address.
  • shipping_postal: (string) Postal or ZIP code for the shipping address.
  • shipping_city_id: (string) Identifier for the city of the shipping address.
  • shipping_country_id: (string) Identifier for the country of the shipping address.
  • shipping_state: (string) State or region for the shipping address.
  • delivery_contact_person: (string) Name of the contact person for delivery purposes.
  • phone3_prefix: (string) Country or area code for an alternative phone number.
  • phone3: (string) Alternative phone number without the prefix.
  • phone3_full: (string) Full alternative phone number including the prefix.
  • ordering_email: (string) Email address for ordering purposes.
  • ordering_phone_prefix: (string) Country or area code for the ordering phone number.
  • ordering_phone: (string) Ordering phone number without the prefix.
  • ordering_phone_full: (string) Full ordering phone number including the prefix.
  • billing_email: (string) Email address for billing purposes.
  • billing_phone_prefix: (string) Country or area code for the billing phone number.
  • billing_phone: (string) Billing phone number without the prefix.
  • billing_phone_full: (string) Full billing phone number including the prefix.
  • newsletter: (integer) Indicates if the customer is subscribed to newsletters.
  • agreement: (string) Indicates if the customer has agreed to terms and conditions.
  • login_ip: (array) List of IP addresses used by the customer for login.
  • vouchers_used: (array) List of voucher codes used by the customer.
  • registration_date: (string) Date and time when the customer registered.
  • maxdebt: (integer) Maximum debt limit for the customer.
  • fax: (string) Fax number of the customer.
  • notes: (string) Notes or comments about the customer.
  • curdebt: (integer) Current debt amount of the customer.
  • isvip: (integer) Indicates if the customer is classified as a VIP.
  • discount: (integer) Discount rate applicable to the customer.
  • payment_period: (string) Payment period term for the customer.
  • available_payment_methods: (array) List of available payment methods for the customer.
  • note: (string) Additional note regarding the customer.
  • website: (string) Website associated with the customer or their company.
  • identifier: (string) A unique identifier for the customer.
  • intermediator: (string) Indicates the intermediator involved with the customer.
  • crcustomer_id: (string) A unique customer relationship identifier.
  • image: (string/null) Link or reference to the customer's image. 'null' if no image is associated.
  • firebase_token: (string) Firebase token associated with the customer.

Notes

  • The email and customer_password fields are mandatory for identifying and authenticating the customer.
  • Only include additional fields in the payload if an update or change is required for those specific details.
  • Ensure the confidentiality of the customer_password during the update process.



Call Examples in Different Languages


curl -X POST 'https://easycms.fi/public_api/set_customer_update_profile' \
-H 'Authorization1: TOKEN' \
-d 'email=example@mail.com&customer_Password=ExamplePass123&language_id=1&customer_id=CUST12345&parent_id=789&number=456&visible=yes&language=en&firstname=John&lastname=Doe&phone_prefix=+1&phone_full=+11234567890&phone=1234567890&phone2_prefix=+1&phone2_full=+19876543210&phone2=9876543210&password=EncryptedPass123&company=ExampleCompany&business_id=12345678&address=123 Main St&address2=456 Secondary St&city_id=1234&postal=12345&state=ExampleState&country_id=US&different_shipping_address=0'

$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => "https://easycms.fi/public_api/set_customer_update_profile",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => http_build_query([
    'email' => 'example@mail.com', 
    'customer_Password' => 'ExamplePass123', 
    'language_id' => 1, 
    'customer_id' => 'CUST12345',
    'parent_id' => 789,
    'number' => 456,
    'visible' => 'yes',
    'language' => 'en',
    'firstname' => 'John',
    'lastname' => 'Doe',
    'phone_prefix' => '+1',
    'phone_full' => '+11234567890',
    'phone' => '1234567890',
    'phone2_prefix' => '+1',
    'phone2_full' => '+19876543210',
    'phone2' => '9876543210',
    'password' => 'EncryptedPass123',
    'company' => 'ExampleCompany',
    'business_id' => '12345678',
    'address' => '123 Main St',
    'address2' => '456 Secondary St',
    'city_id' => '1234',
    'postal' => '12345',
    'state' => 'ExampleState',
    'country_id' => 'US',
    'different_shipping_address' => 0
  ]),
  CURLOPT_HTTPHEADER => array("Authorization1: TOKEN"),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;

import requests
url = "https://easycms.fi/public_api/set_customer_update_profile"
headers = {"Authorization1": "TOKEN"}
payload = {
  'email': 'example@mail.com', 
  'customer_Password': 'ExamplePass123', 
  'language_id': 1, 
  'customer_id': 'CUST12345',
  'parent_id': 789,
  'number': 456,
  'visible': 'yes',
  'language': 'en',
  'firstname': 'John',
  'lastname': 'Doe',
  'phone_prefix': '+1',
  'phone_full': '+11234567890',
  'phone': '1234567890',
  'phone2_prefix': '+1',
  'phone2_full': '+19876543210',
  'phone2': '9876543210',
  'password': 'EncryptedPass123',
  'company': 'ExampleCompany',
  'business_id': '12345678',
  'address': '123 Main St',
  'address2': '456 Secondary St',
  'city_id': '1234',
  'postal': '12345',
  'state': 'ExampleState',
  'country_id': 'US',
  'different_shipping_address': 0
}
response = requests.post(url, headers=headers, data=payload)
print(response.text)

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://easycms.fi/public_api/set_customer_update_profile"))
    .headers("Authorization1", "TOKEN")
    .POST(HttpRequest.BodyPublishers.ofString("email=example@mail.com&customer_Password=ExamplePass123&language_id=1&customer_id=CUST12345&parent_id=789&number=456&visible=yes&language=en&firstname=John&lastname=Doe&phone_prefix=+1&phone_full=+11234567890&phone=1234567890&phone2_prefix=+1&phone2_full=+19876543210&phone2=9876543210&password=EncryptedPass123&company=ExampleCompany&business_id=12345678&address=123 Main St&address2=456 Secondary St&city_id=1234&postal=12345&state=ExampleState&country_id=US&different_shipping_address=0"))
    .build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());

const https = require('https');
const data = new URLSearchParams({ 
  email: 'example@mail.com', 
  customer_Password: 'ExamplePass123', 
  language_id: 1, 
  customer_id: 'CUST12345',
  parent_id: 789,
  number: 456,
  visible: 'yes',
  language: 'en',
  firstname: 'John',
  lastname: 'Doe',
  phone_prefix: '+1',
  phone_full: '+11234567890',
  phone: '1234567890',
  phone2_prefix: '+1',
  phone2_full: '+19876543210',
  phone2: '9876543210',
  password: 'EncryptedPass123',
  company: 'ExampleCompany',
  business_id: '12345678',
  address: '123 Main St',
  address2: '456 Secondary St',
  city_id: '1234',
  postal: '12345',
  state: 'ExampleState',
  country_id: 'US',
  different_shipping_address: 0
}).toString();
const options = {
  hostname: 'prolasku.fi',
  path: '/public_api/set_customer_update_profile',
  method: 'POST',
  headers: {
    'Authorization1': 'TOKEN',
    'Content-Type': 'application/x-www-form-urlencoded',
    'Content-Length': data.length
  }
};
const req = https.request(options, (res) => {
  let responseData = '';
  res.on('data', (chunk) => { responseData += chunk; });
  res.on('end', () => { console.log(responseData); });
});
req.on('error', (e) => { console.error(e); });
req.write(data);
req.end();

import React, { useEffect, useState } from 'react';
function App() {
  const [categoryData, setCategoryData] = useState('');
  useEffect(() => {
    const fetchData = async () => {
      try {
        const response = await fetch('https://easycms.fi/public_api/set_customer_update_profile', {
          method: 'POST',
          headers: {'Authorization1': 'TOKEN', 'Content-Type': 'application/x-www-form-urlencoded'},
          body: new URLSearchParams({
            email: 'example@mail.com', 
            customer_Password: 'ExamplePass123', 
            language_id: 1, 
            customer_id: 'CUST12345',
            parent_id: 789,
            number: 456,
            visible: 'yes',
            language: 'en',
            firstname: 'John',
            lastname: 'Doe',
            phone_prefix: '+1',
            phone_full: '+11234567890',
            phone: '1234567890',
            phone2_prefix: '+1',
            phone2_full: '+19876543210',
            phone2: '9876543210',
            password: 'EncryptedPass123',
            company: 'ExampleCompany',
            business_id: '12345678',
            address: '123 Main St',
            address2: '456 Secondary St',
            city_id: '1234',
            postal: '12345',
            state: 'ExampleState',
            country_id: 'US',
            different_shipping_address: 0
          }).toString()
        });
        const data = await response.text();
        setCategoryData(data);
      } catch (error) {
        console.error(error);
      }
    };
    fetchData();
  }, []);
  return (
{categoryData}
); } export default App;

// Kotlin example requires using a third-party library like OkHttp for POST requests with a body
// Kotlin Example using OkHttp for POST request
import okhttp3.OkHttpClient
import okhttp3.FormBody
import okhttp3.Request

fun main() {
    val client = OkHttpClient()

    val formBody = FormBody.Builder()
        .add("email", "example@mail.com")
        .add("customer_Password", "ExamplePass123")
        .add("language_id", "1")
        .add("customer_id", "CUST12345")
        .add("parent_id", "789")
        .add("number", "456")
        .add("visible", "yes")
        .add("language", "en")
        .add("firstname", "John")
        .add("lastname", "Doe")
        .add("phone_prefix", "+1")
        .add("phone_full", "+11234567890")
        .add("phone", "1234567890")
        .add("phone2_prefix", "+1")
        .add("phone2_full", "+19876543210")
        .add("phone2", "9876543210")
        .add("password", "EncryptedPass123")
        .add("company", "ExampleCompany")
        .add("business_id", "12345678")
        .add("address", "123 Main St")
        .add("address2", "456 Secondary St")
        .add("city_id", "1234")
        .add("postal", "12345")
        .add("state", "ExampleState")
        .add("country_id", "US")
        .add("different_shipping_address", "0")
        .build()

    val request = Request.Builder()
        .url("https://easycms.fi/public_api/set_customer_update_profile")
        .post(formBody)
        .addHeader("Authorization1", "TOKEN")
        .build()

    client.newCall(request).execute().use { response ->
        if (!response.isSuccessful) throw IOException("Unexpected code $response")

        println(response.body?.string())
    }
}

using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        var token = "TOKEN";
        var content = new FormUrlEncodedContent(new[]
        {
            new KeyValuePair("email", "example@mail.com"),
            new KeyValuePair("customer_Password", "ExamplePass123"),
            new KeyValuePair("language_id", "1"),
            new KeyValuePair("customer_id", "CUST12345"),
            new KeyValuePair("parent_id", "789"),
            new KeyValuePair("number", "456"),
            new KeyValuePair("visible", "yes"),
            new KeyValuePair("language", "en"),
            new KeyValuePair("firstname", "John"),
            new KeyValuePair("lastname", "Doe"),
            new KeyValuePair("phone_prefix", "+1"),
            new KeyValuePair("phone_full", "+11234567890"),
            new KeyValuePair("phone", "1234567890"),
            new KeyValuePair("phone2_prefix", "+1"),
            new KeyValuePair("phone2_full", "+19876543210"),
            new KeyValuePair("phone2", "9876543210"),
            new KeyValuePair("password", "EncryptedPass123"),
            new KeyValuePair("company", "ExampleCompany"),
            new KeyValuePair("business_id", "12345678"),
            new KeyValuePair("address", "123 Main St"),
            new KeyValuePair("address2", "456 Secondary St"),
            new KeyValuePair("city_id", "1234"),
            new KeyValuePair("postal", "12345"),
            new KeyValuePair("state", "ExampleState"),
            new KeyValuePair("country_id", "US"),
            new KeyValuePair("different_shipping_address", "0")
        });

        using (var httpClient = new HttpClient())
        {
            httpClient.DefaultRequestHeaders.Add("Authorization1", token);
            var response = await httpClient.PostAsync("https://easycms.fi/public_api/set_customer_update_profile", content);
            if (response.IsSuccessStatusCode)
            {
                var responseData = await response.Content.ReadAsStringAsync();
                Console.WriteLine(responseData);
            }
            else
            {
                Console.WriteLine($"Error: {response.StatusCode}");
            }
        }
    }
}




Handling Endpoint Results

When you make a request to the endpoint, you receive a JSON response containing various keys and values. Here's an explanation of the response keys and their meanings:


# Customer Registration API Response Output Object Breakdown

This document details the breakdown of the customer data output object received from the API server. Each field in the JSON response is explained for a comprehensive understanding.

## Fields Overview

The response object includes various fields that provide detailed information about a customer. Here are the descriptions of each field:

### `customer_id`
- **Type:** String
- **Description:** Unique identifier for the customer.
- **Example:** `"361"`

### `parent_id`
- **Type:** Integer
- **Description:** Identifier for the parent entity of the customer, if applicable. Zero often indicates no parent entity.
- **Example:** `0`

### `number`
- **Type:** Integer
- **Description:** A numerical identifier or code for the customer. Often used for internal purposes.
- **Example:** `0`

### `visible`
- **Type:** String
- **Description:** Indicates if the customer is visible in the system. "1" for visible, "0" for not visible.
- **Example:** `"1"`

### `language`
- **Type:** String
- **Description:** Preferred language of the customer, represented by a language code.
- **Example:** `"en_gb"`

### `language_id`
- **Type:** String
- **Description:** Identifier for the customer's preferred language.
- **Example:** `"2"`

### `firstname`
- **Type:** String
- **Description:** Full name of the customer. It has been adapted to include the full name instead of the traditional first name.
- **Example:** `"Full name"`

### `lastname`
- **Type:** String
- **Description:** Trade name of the customer. This field has evolved to represent the customer's trade name.
- **Example:** `"Trade name"`

### `phone_prefix`
- **Type:** String
- **Description:** Country or area code for the primary phone number.
- **Example:** `"358"`

### `phone_full`
- **Type:** String
- **Description:** Full primary phone number including the prefix.
- **Example:** `"0931588830"`

### `phone`
- **Type:** String
- **Description:** Primary phone number without the prefix.
- **Example:** `"0931588830"`

### `phone2_prefix`
- **Type:** String
- **Description:** Country or area code for the secondary phone number.
- **Example:** `"0"`

### `phone2_full`
- **Type:** String
- **Description:** Full secondary phone number including the prefix.
- **Example:** `"0"`

### `phone2`
- **Type:** String
- **Description:** Secondary phone number without the prefix.
- **Example:** `"0"`

### `email`
- **Type:** String
- **Description:** Email address of the customer.
- **Example:** `"customer@mail.com"`

### `password`
- **Type:** String
- **Description:** Encrypted password for the customer's account.
- **Example:** Encrypted string

### `company`
- **Type:** String
- **Description:** Name of the company associated with the customer.
- **Example:** `"Company Oy"`

### `business_id`
- **Type:** String
- **Description:** Business identifier or registration number of the company.
- **Example:** `"1234567-8"`

### `address`
- **Type:** String
- **Description:** Primary address of the customer.
- **Example:** `"Tataritsu 26"`

### `address2`
- **Type:** String
- **Description:** Secondary address of the customer.
- **Example:** `"0"`

### `city_id`
- **Type:** String
- **Description:** Identifier for the city associated with the primary address.
- **Example:** `"1"`

### `postal`
- **Type:** String
- **Description:** Postal or ZIP code for the primary address.
- **Example:** `"00510"`

### `state`
- **Type:** Boolean/String
- **Description:** State or region for the primary address. Returns `false` if not applicable.
- **Example:** `false`

### `country_id`
- **Type:** String
- **Description:** Identifier for the country of the primary address.
- **Example:** `"40"`

### `different_shipping_address`
- **Type:** String
- **Description:** Indicates if the shipping address is different from the primary address. "1" for yes, "0" for no.
- **Example:** `"1"`

### `shipping_address`
- **Type:** String
- **Description:** Shipping address, if different from the primary address.
- **Example:** `"Tataritsu 26"`

### `shipping_postal`
- **Type:** String
- **Description:** Postal or ZIP code for the shipping address.
- **Example:** `"00510"`

### `shipping_city_id`
- **Type:** String
- **Description:** Identifier for the city of the shipping address.
- **Example:** `"1"`

### `shipping_country_id`
- **Type:** String
- **Description:** Identifier for the country of the shipping address.
- **Example:** `"40"`

### `shipping_state`
- **Type:** String
- **Description:** State or region for the shipping address.
- **Example:** `"0"`

### `delivery_contact_person`
- **Type:** String
- **Description:** Name of the contact person for delivery purposes.
- **Example:** `"Delivery person's name"`

### `phone3_prefix`
- **Type:** String
- **Description:** Country or area code for an alternative phone number.
- **Example:** `"358"`

### `phone3`
- **Type:** String
- **Description:** Alternative phone number without the prefix.
- **Example:** `"0"`

### `phone3_full`
- **Type:** String
- **Description:** Full alternative phone number including the prefix.
- **Example:** `"0"`

### `ordering_email`
- **Type:** String
- **Description:** Email address for ordering purposes.
- **Example:** `"ordering@mail.com"`

### `ordering_phone_prefix`
- **Type:** String
- **Description:** Country or area code for the ordering phone number.
- **Example:** `"0"`

### `ordering_phone`
- **Type:** String
- **Description:** Ordering phone number without the prefix.
- **Example:** `"0931588830"`

### `ordering_phone_full`
- **Type:** String
- **Description:** Full ordering phone number including the prefix.
- **Example:** `"0931588830"`

### `billing_email`
- **Type:** String
- **Description:** Email address for billing purposes.
- **Example:** `"billing@mail.com"`

### `billing_phone_prefix`
- **Type:** String
- **Description:** Country or area code for the billing phone number.
- **Example:** `"0"`

### `billing_phone`
- **Type:** String
- **Description:** Billing phone number without the prefix.
- **Example:** `"0931588830"`

### `billing_phone_full`
- **Type:** String
- **Description:** Full billing phone number including the prefix.
- **Example:** `"0931588830"`

### `newsletter`
- **Type:** Integer
- **Description:** Indicates if the customer is subscribed to newsletters. "1" for subscribed, "0" for not subscribed.
- **Example:** `0`

### `agreement`
- **Type:** String
- **Description:** Indicates if the customer has agreed to terms, conditions, or agreements. "1" for agreed, "0" for not agreed.
- **Example:** `"0"`

### `login_ip`
- **Type:** Array
- **Description:** List of IP addresses used by the customer for login. Empty if not available.
- **Example:** `[]`

### `vouchers_used`
- **Type:** Array
- **Description:** List of voucher codes used by the customer. Empty if not available.
- **Example:** `[]`

### `registration_date`
- **Type:** String
- **Description:** Date and time when the customer registered.
- **Example:** `"2024-01-01 12:14:22"`

### `maxdebt`
- **Type:** Integer
- **Description:** Maximum debt limit for the customer. "0" often indicates no limit or not applicable.
- **Example:** `0`

### `fax`
- **Type:** String
- **Description:** Fax number of the customer. "0" often indicates no fax number.
- **Example:** `"0"`

### `notes`
- **Type:** String
- **Description:** Notes or comments about the customer.
- **Example:** `"WooCommerce website signup"`

### `curdebt`
- **Type:** Integer
- **Description:** Current debt amount of the customer, if applicable. "0" often indicates no debt.
- **Example:** `0`

### `isvip`
- **Type:** Integer
- **Description:** Indicates if the customer is classified as a VIP. "1" for yes, "0" for no.
- **Example:** `0`

### `discount`
- **Type:** Integer
- **Description:** Discount rate (in percentage) applicable to the customer.
- **Example:** `30`

### `payment_period`
- **Type:** Integer
- **Description:** Payment period term for the customer, typically expressed in days.
- **Example:** `"14"`

### `available_payment_methods`
- **Type:** Array
- **Description:** List of available payment methods for the customer. "0" can indicate default or unspecified method.
- **Example:** `["0"]`
- **List of available Payment Methods** You can fetch a list of available payment methods available using end point [/get_payment_methods](get_payment_methods.php).

### `note`
- **Type:** String
- **Description:** Additional note regarding the customer.
- **Example:** `"WooCommerce website signup"`

### `website`
- **Type:** String
- **Description:** Website associated with the customer or their company.
- **Example:** `"www.customerdomain.tld"`

### `identifier`
- **Type:** String
- **Description:** An e-invoice unique identifier for the customer, often used for internal invoicing. "" can indicate a default or unspecified value.
- **Example:** `"0"`

### `intermediator`
- **Type:** String
- **Description:** An e-invoice intermediator or agent involved with the customer's e-invoicing. "" can signify no intermediator.
- **Example:** `"0"`

### `crcustomer_id`
- **Type:** String
- **Description:** A unique customer relationship identifier, possibly used for linking with external systems such as cashregisters.
- **Example:** `"b9c61156-0156-443b-9b33-c958f876faab"`

### `image`
- **Type:** String
- **Description:** Link or reference to the customer's image. "null" indicates no image is associated.
- **Example:** `"null"`

### `firebase_token`
- **Type:** String
- **Description:** Firebase token associated with the customer's mobile app notifications, typically for push notifications or authentication purposes.
- **Example:** `"0"`

    

{
    "OUTPUT": {
        "0": {
            "customer_id": "361",
            "parent_id": 0,
            "number": 0,
            "visible": "1",
            "language": "en_gb",
            "language_id": "2",
            "firstname": "Full name",
            "lastname": "Trade name", // this has been changed during time to customer's trade name and firstname parameter is used as fullname
            "phone_prefix": "358",
            "phone_full": "0931588830",
            "phone": "0931588830",
            "phone2_prefix": "0",
            "phone2_full": "0",
            "phone2": "0",
            "email": "customer@mail.com",
            "password": "$6$rounds=10000$easyCMS$sbLcp5XiDUazMLbtUoZtb1rXzl3T6/eMtY4qiG1oT9fnkvrre8AKHpWp9u/bq2Cz5h.5XX2XA/AAz784VunFN.",
            "company": "Company Oy",
            "business_id": "1234567-8",
            "address": "Tataritsu 26",
            "address2": "0",
            "city_id": "1",
            "postal": "00510",
            "state": false,
            "country_id": "40",
            "different_shipping_address": "1",
            "shipping_address": "Tataritsu 26",
            "shipping_postal": "00510",
            "shipping_city_id": "1",
            "shipping_country_id": "40",
            "shipping_state": "0",
            "delivery_contact_person": "Delivery person's name",
            "phone3_prefix": "358",
            "phone3": "0",
            "phone3_full": "0",
            "ordering_email": "ordering@mail.com",
            "ordering_phone_prefix": "0",
            "ordering_phone": "0931588830",
            "ordering_phone_full": "0931588830",
            "billing_email": "billing@mail.com",
            "billing_phone_prefix": "0",
            "billing_phone": "0931588830",
            "billing_phone_full": "0931588830",
            "newsletter": 0,
            "agreement": "0",
            "login_ip": [],
            "vouchers_used": [],
            "registration_date": "2024-01-01 12:14:22",
            "maxdebt": 0,
            "fax": "0",
            "notes": "WooCommerce website signup",
            "curdebt": 0,
            "isvip": 0,
            "discount": 30,
            "payment_period": "14",
            "available_payment_methods": [
                "0"
            ],
            "note": "WooCommerce website signup",
            "website": "www.customerdomain.tld",
            "identifier": "0",
            "intermediator": "0",
            "crcustomer_id": "b9c61156-0156-443b-9b33-c958f876faab",
            "image": "null",
            "firebase_token": "0"
        },
        "response_type": "success",
        "message": "Data inserted successfully"
    }
}
    

Error Handling

Here are the possible error messages and their meanings:

  • UN-AUTHORIZED - _user_name_password_is_set_but_wrong_value!: Incorrect username or password.
  • email_is_not_valid: Incorrect email format or email does not exist or email server not responding based on API server's email verification module.
  • this_account_does_not_exist_or_your_credentials_do_not_match_this_account: The account doesn't exist or mismatched credentials.
  • UN-AUTHORIZED - header is set but the header value is not correct!: Incorrect authorization header value.
  • Maximum query size is 1 rows per query: Exceeded maximum limit of 1 rows per query.