Customer
Version 1.0
The Customers Entity is the hub for managing customer interactions in our platform. It captures key details, from contact information to purchase history, fostering personalized experiences. Serving as the nerve center, it ensures seamless communication and engagement, contributing to a well-coordinated marketplace. By organizing data meticulously, it empowers merchants to tailor services, build brand loyalty, and enhance overall customer satisfaction, establishing trust and reliability in the marketplace.
Customer Entity
- Name
id
- Type
- string Required
- Description
Every customer is assigned a unique identifier - an unsigned 64-bit integer known as the Customer ID. This specific number is exclusive and distinct across the entire Qooly platform, ensuring an unparalleled level of uniqueness for each customer.
- Name
first_name
- Type
- string Required
- Description
The first name of the customer, providing personal identification.
- Name
last_name
- Type
- string Required
- Description
The last name of the customer, complementing the personal identification.
- Name
email
- Type
- string Required
- Description
The email address of the customer, serving as a primary contact point.
- Name
email_verified
- Type
- boolean Required
- Description
Indicates whether the customer's email address has been verified.
- Name
phone
- Type
- string
- Description
The phone number of the customer, offering an alternative contact method.
- Name
address
- Type
- string
- Description
The address of the customer, including details such as street, city, state, and postal code.
- Name
orders_count
- Type
- integer Required
- Description
This property indicates the total number of orders placed by the customer.
- Name
total_spent
- Type
- decimal Required
- Description
This property indicates the total amount spent by the customer across all orders.
- Name
connections_id
- Type
- foreignId Required
- Description
This property indicates the connection associated with the customer. It serves as a unique identifier, specific to each connection (e.g., Amazon, Shopify) in Qooly's system.
- Name
marketing_consent_id
- Type
- foreignId Required
- Description
This property indicates the marketing consent status of the customer. It serves as a unique identifier for marketing consent preferences.
- Name
default_address_id
- Type
- foreignId
- Description
The ID of the default address associated with the customer. This is a foreign ID referring to the Address Entity.
- Name
original_customer_data
- Type
- json
- Description
This property indicates the original customer data.
- Name
created_at
- Type
- timestamp
- Description
This property indicates the time in ISO_8601 when the customer was created.
- Name
updated_at
- Type
- timestamp
- Description
This property indicates the time in ISO_8601 when the customer was last updated.
- Name
created_by
- Type
- foreignId
- Description
This property indicates the user who created the customer.
- Name
updated_by
- Type
- foreignId
- Description
This property indicates the user who updated the customer recently.
The Customer resource
{
"id": "789012345",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"email_verified": true,
"phone": "+1234567890",
"address": "456 Main St, Citytown, CA, 54321, US",
"orders_count": 5,
"total_spent": 500.75,
"default_address_id": "123",
"connections_id": "987654321",
"marketing_consent_id": "654321",
"original_customer_data": {
"customer_group": "VIP",
"loyalty_points": 150
},
"created_at": "2024-01-10T08:30:00Z",
"updated_at": "2024-01-16T12:15:00Z",
"created_by": "789012345",
"updated_by": "123456789"
}
Create a single customer
This endpoint allows you to create a single customer.
Required Fields
- Name
first_name
- Type
- string Required
- Description
- Name
last_name
- Type
- string Required
- Description
- Name
email
- Type
- string Required
- Description
- Name
email_verified
- Type
- boolean
- Description
Default: false
- Name
phone
- Type
- string
- Description
- Name
address
- Type
- string
- Description
- Name
orders_count
- Type
- integer
- Description
Default: 0
- Name
total_spent
- Type
- decimal
- Description
Default: 0.0
- Name
default_address_id
- Type
- string
- Description
- Name
connections_id
- Type
- foreignId
- Description
- Name
marketing_consent_id
- Type
- foreignId
- Description
- Name
original_customer_data
- Type
- json
- Description
Examples
Create a single customer
curl --request POST \
--url https://api.qooly.io/v1/customers \
--header 'Content-Type: application/json' \
--data '{
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"address": "456 Main St, Citytown, CA, 54321, US"
}'
Create a single customer
curl --request POST \
--url https://api.qooly.io/v1/customers \
--header 'Content-Type: application/json' \
--data '{
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"address": "456 Main St, Citytown, CA, 54321, US"
}'
{
"id": "789012345",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"email_verified": false,
"phone": "+1234567890",
"address": "456 Main St, Citytown, CA, 54321, US",
"orders_count": 0,
"total_spent": 0.0,
"default_address_id": null,
"connections_id": null,
"marketing_consent_id": null,
"original_customer_data": {},
"created_at": "2024-01-19T10:45:00Z",
"created_by": null,
}
Retrieve a single customer
This endpoint allows you to retrieve a single customer.
Required Parameters
- Name
id
- Type
- string Required
- Description
Examples
Retrieve a single customer
curl --request GET \
--url https://api.qooly.io/v1/customers/789012345
Retrieve a single customer
curl --request GET \
--url https://api.qooly.io/v1/customers/789012345
{
"id": "789012345",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"email_verified": false,
"phone": "+1234567890",
"address": "456 Main St, Citytown, CA, 54321, US",
"orders_count": 0,
"total_spent": 0.0,
"default_address_id": null,
"connections_id": null,
"marketing_consent_id": null,
"original_customer_data": {},
"created_at": "2024-01-19T10:45:00Z",
"created_by": null,
"updated_at": "2024-01-19T10:45:00Z",
"updated_by": null
}
Retrieve a single customer
This endpoint allows you to retrieve a single customer.
Required Parameters
- Name
id
- Type
- string Required
- Description
Examples
Retrieve a single customer
curl --request GET \
--url https://api.qooly.io/v1/customers/789012345
Retrieve a single customer
curl --request GET \
--url https://api.qooly.io/v1/customers/789012345
{
"id": "789012345",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"email_verified": false,
"phone": "+1234567890",
"address": "456 Main St, Citytown, CA, 54321, US",
"orders_count": 0,
"total_spent": 0.0,
"default_address_id": null,
"connections_id": null,
"marketing_consent_id": null,
"original_customer_data": {},
"created_at": "2024-01-19T10:45:00Z",
"created_by": null,
"updated_at": "2024-01-19T10:45:00Z",
"updated_by": null
}
Update a single customer
This endpoint allows you to update a single customer.
Required Parameters
- Name
id
- Type
- string Required
- Description
Examples
Update a single customer
curl --request PATCH \
--url https://api.qooly.io/v1/customers/789012345 \
--header 'Content-Type: application/json' \
--data '{
"first_name": "UpdatedJohn",
"last_name": "UpdatedDoe",
"email": "updated.john.doe@example.com"
}'
Update a single customer
curl --request PATCH \
--url https://api.qooly.io/v1/customers/789012345 \
--header 'Content-Type: application/json' \
--data '{
"phone": "+9876543210",
"address": "789 Updated St, Updatedtown, CA, 54321, US",
"email_verified": true,
"orders_count": 2,
"total_spent": 300.0,
"default_address_id": "987654321",
"connections_id": "111222333",
"marketing_consent_id": "444555666",
"original_customer_data": {
"additional_field": "additional_value"
}
}'
Update a single customer
curl --request PATCH \
--url https://api.qooly.io/v1/customers/789012345 \
--header 'Content-Type: application/json' \
--data '{
"first_name": "UpdatedJohn"
}'
{
"id": "789012345",
"first_name": "UpdatedJohn",
"last_name": "UpdatedDoe",
"email": "updated.john.doe@example.com",
"email_verified": true,
"phone": "+9876543210",
"address": "789 Updated St, Updatedtown, CA, 54321, US",
"orders_count": 2,
"total_spent": 300.0,
"default_address_id": "987654321",
"connections_id": "111222333",
"marketing_consent_id": "444555666",
"original_customer_data": {
"additional_field": "additional_value"
},
"created_at": "2024-01-19T10:45:00Z",
"created_by": null,
"updated_at": "2024-01-19T14:30:00Z",
"updated_by": "789012345"
}
Delete a single customer
This endpoint allows you to delete a single customer.
Required Parameters
- Name
id
- Type
- string Required
- Description
Examples
Delete a single customer
curl --request DELETE \
--url https://api.qooly.io/v1/customers/789012345
Delete a single customer
curl --request DELETE \
--url https://api.qooly.io/v1/customers/789012345
{}