Customer
Customer authentication, profile management, orders, and wishlist
Register a new customer
Authorization
ApiKeyAuth API key is automatically provided for demo requests in the playground
In: header
Header Parameters
The visitor's IP address. Storefronts call the API from their own server, so forward the visitor IP here for the per-visitor rate limit to apply to the real visitor. Without it only the non-IP limits apply.
Request Body
application/json
1 <= length1 <= lengthemailPassword (minimum 8 characters)
8 <= lengthResponse Body
application/json
application/json
application/json
application/json
curl -X POST "https://test.putiikkipalvelu.fi/api/storefront/v1/customer/(auth)/register" \ -H "Content-Type: application/json" \ -d '{ "firstName": "John", "lastName": "Doe", "email": "john@example.com", "password": "securePassword123" }'{
"success": true,
"customer": {
"id": "clx123customer",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"createdAt": "2024-01-15T10:00:00.000Z",
"emailVerified": "2024-01-15T12:00:00.000Z"
},
"message": "Account created. Please check your email to verify."
}{
"error": "Error message"
}{
"error": "Email already registered in this store"
}{
"error": "Error message"
}Log in a customer
Authorization
ApiKeyAuth API key is automatically provided for demo requests in the playground
In: header
Header Parameters
Guest cart ID to merge into user's cart after login
The visitor's IP address. Storefronts call the API from their own server, so forward the visitor IP here for the per-visitor rate limit to apply to the real visitor. Without it only the non-IP limits apply.
Request Body
application/json
emailResponse Body
application/json
application/json
application/json
application/json
curl -X POST "https://test.putiikkipalvelu.fi/api/storefront/v1/customer/(auth)/login" \ -H "Content-Type: application/json" \ -d '{ "email": "john@example.com", "password": "securePassword123" }'{
"success": true,
"customer": {
"id": "clx123customer",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"createdAt": "2024-01-15T10:00:00.000Z",
"emailVerified": "2024-01-15T12:00:00.000Z"
},
"message": "Login successful",
"sessionId": "abc123def456session...",
"expiresAt": "2024-01-22T10:00:00.000Z"
}{
"error": "Invalid email or password"
}{
"error": "Email not verified",
"requiresVerification": true,
"customerId": "clx123customer"
}{
"error": "Error message"
}Log out a customer
Authorization
ApiKeyAuth API key is automatically provided for demo requests in the playground
In: header
Header Parameters
Customer's session token
Response Body
application/json
application/json
curl -X POST "https://test.putiikkipalvelu.fi/api/storefront/v1/customer/(auth)/logout" \ -H "x-session-id: string"{
"success": true,
"message": "Logout successful",
"cartId": "550e8400-e29b-41d4-a716-446655440000"
}{
"error": "No active session found"
}Get current customer
Authorization
ApiKeyAuth API key is automatically provided for demo requests in the playground
In: header
Header Parameters
Customer's session token
Response Body
application/json
application/json
curl -X GET "https://test.putiikkipalvelu.fi/api/storefront/v1/customer/(auth)/get-user" \ -H "x-session-id: string"{
"success": true,
"customer": {
"id": "clx123customer",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"createdAt": "2024-01-15T10:00:00.000Z",
"emailVerified": "2024-01-15T12:00:00.000Z"
}
}{
"error": "Unauthorized: Invalid or expired session"
}Verify customer email
Authorization
ApiKeyAuth API key is automatically provided for demo requests in the playground
In: header
Query Parameters
Email verification token from registration email
Response Body
application/json
application/json
curl -X GET "https://test.putiikkipalvelu.fi/api/storefront/v1/customer/(auth)/verify-email?token=string"{
"success": true,
"message": "Email verified successfully. You can now log in."
}{
"error": "Invalid or expired verification token"
}Resend verification email
Authorization
ApiKeyAuth API key is automatically provided for demo requests in the playground
In: header
Header Parameters
The visitor's IP address. Storefronts call the API from their own server, so forward the visitor IP here for the per-visitor rate limit to apply to the real visitor. Without it only the non-IP limits apply.
Request Body
application/json
Customer ID from failed login response
uuidResponse Body
application/json
application/json
application/json
curl -X POST "https://test.putiikkipalvelu.fi/api/storefront/v1/customer/(auth)/resend-verification" \ -H "Content-Type: application/json" \ -d '{ "customerId": "clx123customer" }'{
"success": true,
"message": "Verification email sent."
}{
"error": "Customer not found or already verified"
}{
"error": "Error message"
}Request password reset
Authorization
ApiKeyAuth API key is automatically provided for demo requests in the playground
In: header
Request Body
application/json
Customer's email address
emailResponse Body
application/json
application/json
application/json
curl -X POST "https://test.putiikkipalvelu.fi/api/storefront/v1/customer/(auth)/forgot-password" \ -H "Content-Type: application/json" \ -d '{ "email": "john@example.com" }'{
"success": true,
"message": "If an account exists with that email, password reset instructions have been sent."
}{
"error": "Validation error",
"details": {
"email": {
"_errors": [
"Invalid email format"
]
}
}
}{
"error": "Too many password reset attempts. Please try again later."
}Reset password with token
Authorization
ApiKeyAuth API key is automatically provided for demo requests in the playground
In: header
Request Body
application/json
Password reset token from email link
New password (minimum 8 characters)
password8 <= lengthResponse Body
application/json
application/json
curl -X POST "https://test.putiikkipalvelu.fi/api/storefront/v1/customer/(auth)/reset-password" \ -H "Content-Type: application/json" \ -d '{ "token": "a1b2c3d4e5f6...", "password": "newSecurePassword123" }'{
"success": true,
"message": "Password reset successful. You can now log in with your new password."
}{
"error": "Invalid or expired reset token"
}Update customer profile
Authorization
ApiKeyAuth API key is automatically provided for demo requests in the playground
In: header
Header Parameters
Customer's session token
Request Body
application/json
emailThe customer's current password. Required only when email changes.
Response Body
application/json
application/json
application/json
curl -X PATCH "https://test.putiikkipalvelu.fi/api/storefront/v1/customer/edit-user" \ -H "x-session-id: string" \ -H "Content-Type: application/json" \ -d '{}'{
"message": "Customer updated successfully",
"customer": {
"id": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"createdAt": "2019-08-24T14:15:22Z"
}
}{
"error": "Email is already taken by another customer"
}{
"error": "Error message"
}Delete customer account
Authorization
ApiKeyAuth API key is automatically provided for demo requests in the playground
In: header
Header Parameters
Customer's session token
Response Body
application/json
application/json
curl -X DELETE "https://test.putiikkipalvelu.fi/api/storefront/v1/customer/delete-user" \ -H "x-session-id: string"{
"message": "Customer deleted successfully"
}{
"error": "Error message"
}Get customer orders
Authorization
ApiKeyAuth API key is automatically provided for demo requests in the playground
In: header
Path Parameters
Customer ID
Header Parameters
Customer's session token
Response Body
application/json
application/json
curl -X GET "https://test.putiikkipalvelu.fi/api/storefront/v1/customer/get-orders/string" \ -H "x-session-id: string"{
"success": true,
"orders": [
{
"id": "string",
"orderNumber": "ORD-2024-001",
"totalAmount": 5999,
"status": "DELIVERED",
"createdAt": "2019-08-24T14:15:22Z",
"OrderLineItems": [
{
"id": "string",
"itemType": "PRODUCT",
"quantity": 0,
"price": 0,
"totalAmount": 0,
"productCode": "string",
"name": "string",
"vatRate": 0,
"product": {
"id": "string",
"name": "string",
"images": [
"http://example.com"
],
"slug": "string",
"variationId": "string",
"optionName": "string",
"optionValue": "string",
"isShipping": true,
"unavailable": true
}
}
],
"orderShipmentMethod": {
"name": "Posti - Paketti",
"price": 590,
"vatRate": 25.5,
"logo": "http://example.com"
},
"hasDigitalDownloads": false
}
]
}{
"error": "Error message"
}Get customer wishlist
Authorization
ApiKeyAuth API key is automatically provided for demo requests in the playground
In: header
Header Parameters
Customer's session token
Response Body
application/json
application/json
curl -X GET "https://test.putiikkipalvelu.fi/api/storefront/v1/customer/wishlist" \ -H "x-session-id: string"{
"items": [
{
"id": "string",
"customerId": "string",
"productId": "string",
"variationId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"product": {
"id": "string",
"name": "string",
"slug": "string",
"description": "string",
"images": [
"http://example.com"
],
"price": 0,
"salePrice": 0,
"salePercent": "string",
"saleStartDate": "2019-08-24T14:15:22Z",
"saleEndDate": "2019-08-24T14:15:22Z",
"quantity": 0,
"sku": "string",
"status": "ACTIVE"
},
"variation": {
"id": "string",
"sku": "string",
"price": 0,
"salePrice": 0,
"quantity": 0,
"images": [
"http://example.com"
],
"options": [
{
"id": "string",
"value": "Large",
"optionType": {
"id": "string",
"name": "Size"
}
}
]
}
}
]
}{
"error": "Error message"
}Add item to wishlist
Authorization
ApiKeyAuth API key is automatically provided for demo requests in the playground
In: header
Header Parameters
Customer's session token
Request Body
application/json
Product ID to add
Variation ID (optional, for products with variations)
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://test.putiikkipalvelu.fi/api/storefront/v1/customer/wishlist" \ -H "x-session-id: string" \ -H "Content-Type: application/json" \ -d '{ "productId": "clx123abc" }'{
"message": "Product added to wishlist"
}{
"error": "Error message"
}{
"error": "Error message"
}{
"error": "Product already in wishlist"
}Remove item from wishlist
Authorization
ApiKeyAuth API key is automatically provided for demo requests in the playground
In: header
Header Parameters
Customer's session token
Request Body
application/json
Product ID to remove
Variation ID (must match if item was added with variation)
Response Body
application/json
application/json
application/json
application/json
curl -X DELETE "https://test.putiikkipalvelu.fi/api/storefront/v1/customer/wishlist" \ -H "x-session-id: string" \ -H "Content-Type: application/json" \ -d '{ "productId": "clx123abc" }'{
"message": "Item removed from wishlist"
}{
"error": "Error message"
}{
"error": "Error message"
}{
"error": "Item not found in wishlist"
}