How-to Guide - Rest API - CRM
Introduction
Search Customer
This service allows to get a list of customers matching the search criteria.
Request
Request Service URL
POST /customers/search
Request Tokens
There are no request tokens.
Request Parameters
There are no request parameters.
Request Body
Element | Mandatory / Optional | Type | Description |
---|---|---|---|
searchCustomers | Mandatory | Complex Type | The root request element. |
forename | Optional | Text Value Filter | A filter for 'Forename'. |
surname | Optional | Text Value Filter | A filter for 'Surname'. |
address | Optional | Text Value Filter | A filter for 'Address'. |
postcode | Optional | Text Value Filter | A filter for 'PostCode'. |
Optional | Text Value Filter | A filter for 'Email'. | |
phone | Optional | Text Value Filter | A filter for 'Phone'. |
panOrReversePan | Optional | Text Value Filter | A filter for 'Loyalty Number'. |
distinct | Optional | boolean | Whether to list distinct Customers or not. |
maxRows | Optional | int | Maximum number of items to return. |
orderByColumns | Optional | Complex Type (Multiple Entries) | Can be used to order the results using a given column. |
orderByColumns → core:propertyName | Optional | string | The column name to order the results by. |
orderByColumns → core:sortOrder | Optional | string | The sorting order 'ASCENDING' or 'DESCENDING'. |
pageInfo | Optional | Complex Type | Page information to be provided if results are required as a paginated list. |
pageInfo → core:rowOffset | Optional | int | The row offset required of the pagination. |
pageInfo → core:rowCount | Optional | int | The row count required of the pagination. |
suppressDefaultOrderBy | Optional | boolean | Whether to override the default ordering. |
Response
Response Headers
There are no response headers.
Response Body
The response would contain all the elements of the request body and in addition would contain the customersList element that contains the search results.
Element | Type | Description |
---|---|---|
customersList | Complex Type | A single element returned from the search with details of customers matching the search criteria. |
customerNumber | long | The customer number of the customer. |
customerTitle | string | The title of the customer. |
customerForename | string | The first name of the customer. |
customerSurname | string | The surname of the customer. |
addressStreet1 | string | The street address of the customer. |
addressStreet2 | string | The line 2 of the Street Address of the customer. |
addressStreet3 | string | The line 3 of the Street Address of the customer. |
addressTown | string | The town name of the customer’s address. |
addressProvince | string | The province name of the customer’s address. |
addressPostCode | string | The postcode of the customer’s address. |
privacyLevel | int | The customer's privacy level. |
phoneNumber | string | The phone number of the customer. |
emailAddress | string | The email address of the customer. |
Request & Response Examples
Request:
Customer search using Name, Postcode and Phone Number as Amelia, SG143AG and 0777906111 respectively:
Request
POST: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/search
Body: {
"criteria" : {
"forename" : {
"id" : "Forename",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"messageBaseName" : "CRM/CustomerMaintenanceMessages",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : true,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false
},
"surname" : {
"id" : "Surname",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"messageBaseName" : "CRM/CustomerMaintenanceMessages",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : true,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false
},
"address" : {
"id" : "Address",
"forceApplicable" : false,
"orColumns" : true,
"comparisonOperator" : "STARTS_WITH",
"messageBaseName" : "CRM/CustomerMaintenanceMessages",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : true,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ { } ]
},
"postcode" : {
"id" : "SearchPostCode",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"messageBaseName" : "CRM/CustomerMaintenanceMessages",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : true,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ {
"value" : "SG143AG"
} ]
},
"email" : {
"id" : "Email",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"messageBaseName" : "CRM/CustomerMaintenanceMessages",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ { } ]
},
"panOrReversePan" : {
"filters" : [ {
"@type" : "MatchTextValueFilter",
"id" : "Pan",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"messageBaseName" : "CRM/CustomerMaintenanceMessages",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ { } ]
}, {
"@type" : "ReversePanFilter",
"id" : "ReversePan",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ { } ]
} ],
"orFilters" : true,
"forceApplicable" : false,
"id" : "PanOrReversePan",
"fuzzyLevel" : 4
},
"phone" : {
"id" : "Phone",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"messageBaseName" : "CRM/CustomerMaintenanceMessages",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ {
"value" : "0777906111"
} ]
},
"nameSearch" : {
"id" : "NameSearch",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"messageBaseName" : "CRM/CustomerMaintenanceMessages",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : true,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ {
"value" : "Amelia"
} ]
},
"orderByColumns" : [ {
"propertyName" : "customerName.surname",
"sortOrder" : "ASCENDING"
}, {
"propertyName" : "customerName.forename",
"sortOrder" : "ASCENDING"
} ],
"suppressDefaultOrderBy" : false,
"maxRows" : 500,
"distinct" : false,
"pageInfo" : {
"rowOffset" : 0,
"rowCount" : 8,
"totalRowCountLimit" : 0
}
},
"pageSize" : 8
}
Response
Following is the response for above Search Customer request:
Response
Body: {
"criteria" : {
"forename" : {
"id" : "Forename",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"messageBaseName" : "CRM/CustomerMaintenanceMessages",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : true,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false
},
"surname" : {
"id" : "Surname",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"messageBaseName" : "CRM/CustomerMaintenanceMessages",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : true,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false
},
"address" : {
"id" : "Address",
"forceApplicable" : false,
"orColumns" : true,
"comparisonOperator" : "STARTS_WITH",
"messageBaseName" : "CRM/CustomerMaintenanceMessages",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : true,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ { } ]
},
"postcode" : {
"id" : "SearchPostCode",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"messageBaseName" : "CRM/CustomerMaintenanceMessages",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : true,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ {
"value" : "SG143AG"
} ]
},
"email" : {
"id" : "Email",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"messageBaseName" : "CRM/CustomerMaintenanceMessages",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ { } ]
},
"panOrReversePan" : {
"filters" : [ {
"@type" : "MatchTextValueFilter",
"id" : "Pan",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"messageBaseName" : "CRM/CustomerMaintenanceMessages",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ { } ]
}, {
"@type" : "ReversePanFilter",
"id" : "ReversePan",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ { } ]
} ],
"orFilters" : true,
"forceApplicable" : false,
"id" : "PanOrReversePan",
"fuzzyLevel" : 4
},
"phone" : {
"id" : "Phone",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"messageBaseName" : "CRM/CustomerMaintenanceMessages",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ {
"value" : "0777906111"
} ]
},
"nameSearch" : {
"id" : "NameSearch",
"forceApplicable" : false,
"orColumns" : true,
"comparisonOperator" : "STARTS_WITH",
"messageBaseName" : "CRM/CustomerMaintenanceMessages",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : true,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ {
"value" : "AMELIA"
}, {
"value" : "AMELIA"
} ]
},
"pageInfo" : {
"rowOffset" : 0,
"rowCount" : 8,
"totalRowCountLimit" : 0
},
"orderByColumns" : [ {
"propertyName" : "customerName.surname",
"sortOrder" : "ASCENDING"
}, {
"propertyName" : "customerName.forename",
"sortOrder" : "ASCENDING"
} ],
"maxRows" : 500,
"suppressDefaultOrderBy" : false,
"distinct" : true
},
"customersList" : [ {
"customerNumber" : "100",
"customerTitle" : "Mrs",
"customerForename" : "Amelia",
"customerSurname" : "Baldwin",
"addressStreet1" : "137 Newport Road",
"addressTown" : "Carmel",
"addressPostCode" : "SG14 3AG",
"pan" : "14420000",
"privacyLevel" : 0,
"phoneNumber" : "0777906111",
"emailAddress" : "abaldwin@enactordata.co",
"additionalData" : {
"mapImplClass" : "java.util.LinkedHashMap"
}
} ]
}
Load Customer Details
This service will load all the details of a customer.
Request
Request Service URL
GET /customers/load/{customerNumber}
Request Tokens
- customerNumber - Customer number that is to be searched.
Request Parameters
There are no request parameters.
Request Body
There is no request body.
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
customer | Complex Type | Object that contains the customer’s details. |
addresses | Complex Type | Object that contains all the addresses of the requested customer. |
contactable | boolen | If set to true customer is contactable. |
noChildren | Int | Number of children of the requested customer. |
customerNumber | String | The unique number of the requested customer. |
emailAddresses | Complex Type | Object that contains all the email addresses of the requested customer. |
phoneNumbers | Complex Type | Object that contains all the phone numbers of the requested customer. |
customerName | Complex Type | Object that contains all the customer’s name details of the requested customer. |
employeeKey | Complex Type | Object that contains all the employee related details of the requested customer. |
lastUpdated | DateTime | The last updated date and time of the requested customer. |
customerType | Complex Type | Object that contains all the customer type related details of the requested customer. |
createdBy | Complex Type | Object that contains the created by user’s details of the requested customer. |
createdAt | Complex Type | Object that contains the created at user’s details of the requested customer. |
status | String | The current status of the requested customer. |
Request & Response Examples
Request
Request to load customer details of the customer with the customer number 100:
GET: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/load/100
Response
Following is an example response for Load Customer Details request:
Response
Body: {
"customer" : {
"addresses" : [ {
"@type" : "address",
"country" : "United Kingdom",
"countryCodeId" : {
"countryId" : "GBR",
"id" : "GBR"
},
"isPreferred" : true,
"isActive" : false,
"status" : "ACTIVE",
"typeId" : {
"contactTypeId" : "ADDRESS_HOME",
"id" : "ADDRESS_HOME"
},
"postCode" : "SG14 3AG",
"street1" : "137 Newport Road",
"town" : "Carmel",
"isTemplate" : false,
"lastUpdated" : 1729601843000,
"addressReferenceId" : "bb36:1b2aadb5d71:ef5efbd7-:69b14aea4b151737"
} ],
"contactable" : false,
"noChildren" : 0,
"customerNumber" : "100",
"emailAddresses" : [ {
"emailAddress" : "abaldwin@enactordata.co",
"lastUpdated" : 1729601843000,
"preferred" : true,
"status" : "ACTIVE",
"typeId" : {
"contactTypeId" : "EMAIL_HOME",
"id" : "EMAIL_HOME"
},
"active" : true,
"emailAddressReferenceId" : "9ef7-:a8826dac381:785586d2-:8bf8ba3a4eb123e5"
} ],
"phoneNumbers" : [ {
"lastUpdated" : 1729601843000,
"number" : "0777906111",
"preferred" : true,
"typeId" : {
"contactTypeId" : "PHONE_MOBILE",
"id" : "PHONE_MOBILE"
},
"active" : false,
"phoneNumberReferenceId" : "4742-:73fea305291:a385e2e3-:36fdb721d0a2335c"
}, {
"lastUpdated" : 1729601843000,
"number" : "0741203067",
"preferred" : false,
"typeId" : {
"contactTypeId" : "PHONE_WORK",
"id" : "PHONE_WORK"
},
"active" : false,
"phoneNumberReferenceId" : "e632-:73fea305291:a385e2e3-:36fdb721d0a2335c"
} ],
"customerName" : {
"surname" : "Baldwin",
"forename" : "Amelia",
"initials" : "AB",
"title" : "Mrs",
"sex" : "FEMALE",
"dateOfBirth" : 539222400000
},
"employeeKey" : { },
"lastUpdated" : 1729601843000,
"customerType" : { },
"createdBy" : { },
"createdAt" : { },
"status" : "Active"
}
}
Get Customer Details
This service will get all the basic details of a customer which includes personal details, contact details, jobs, loyalty details, customer groups and appointments.
Request
Request Service URL
GET /customers/details/{customerNumber}
Request Tokens
- customerNumber - Customer number that is to be searched.
Request Parameters
There are no request parameters.
Request Body
There is no request body.
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
contactMethodList | Complex Type | List of selected Contact Methods. |
contactMethodList → description | String | The description of the contact methods. Usually, the values will be: - In Store - Letter - Phone |
contactMethodList → type | String | The contact type of the communication preferences. Default is set to 'METHOD'. |
contactMethodList → contactTypeId | String | This is set according to the preference details: - METHOD_EMAIL - METHOD_IN_STORE - METHOD_LETTER - METHOD_PHONE |
CustomerCustomerGroupList | Complex Type | Details of the customer group that the customer is associated to. |
customerLoyaltyDetailResponse | Complex Type | Details of the loyalty details of the customer who has been retrieved. |
customerLoyaltyDetailResponse → accountId | String | The customer’s Loyalty Account details. |
customerLoyaltyDetailResponse → customerNumber | Long | The customer number of the customer found. |
customerLoyaltyDetailResponse → lastTransactionDate | DateTime | The date of the last transaction that contained the customer loyalty account. |
customerLoyaltyDetailResponse → lastTransactionDesc | String | The description of the last transaction that contained the customer loyalty account. |
customerLoyaltyDetailResponse → lastTransactionValue | String | The value of the last transaction that contained the customer loyalty account. |
customerLoyaltyDetailResponse → rewardNumber | String | The loyalty card number of the selected customer. |
customerLoyaltyDetailResponse → accountStatusId | String | The Loyalty account status ID of the selected customer. Default values: - Active - New - Suspended - Closed Setting this value is not a POS functionality. |
customerLoyaltyDetailResponse → accountStatusDesc | String | The Loyalty account status description of the selected customer. Default values: - Active - New - Suspended - Closed Setting this value is not a POS functionality. The POS will only display the status which was saved from the EM. |
customerLoyaltyDetailResponse → rewardTier | String | The Loyalty Scheme Tier ID details will be displayed. This is based on the loyalty schema selection during loyalty customer creation. Not a POS CRM function; only displays created details. |
customerLoyaltyDetailResponse → rewardTierDesc | String | The Loyalty Scheme Tier Description will be displayed. This is based on the loyalty tier selection during loyalty customer creation. Not a POS CRM function; only displays created details. |
customerLoyaltyDetailResponse → redemptionBalance | Int | The redemption balance amount of the loyalty customer. |
customerLoyaltyDetailResponse → loyaltySchemeId | String | The Loyalty Scheme ID will be displayed. Based on loyalty schema selection during customer creation. Not a POS CRM function; only displays created details. |
customerLoyaltyDetailResponse → loyaltySchemeDesc | String | The Loyalty Scheme Description will be displayed. Based on loyalty tier selection during customer creation. Not a POS CRM function; only displays created details. |
latestContact | Complex Type | Not applicable to CRM POS Functions. |
latestContact → contactDate | DateTime | Not applicable to CRM POS Functions. |
latestContact → referenceId | String | Not applicable to CRM POS Functions. |
latestContact → referenceType | String | Not applicable to CRM POS Functions. |
latestContact → reasonId | String | Not applicable to CRM POS Functions. |
latestContact → reasonId → reasonId | String | Not applicable to CRM POS Functions. |
latestContact → reasonId → regionId | String | Not applicable to CRM POS Functions. |
latestContact → deviceId | String | Not applicable to CRM POS Functions. |
latestContact → locationId | String | Not applicable to CRM POS Functions. |
latestContact → subject | String | Not applicable to CRM POS Functions. |
latestContact → contactHistoryId | String | Not applicable to CRM POS Functions. |
latestContact → customerContactTypeId | String | Not applicable to CRM POS Functions. |
latestContact → customerId | String | Not applicable to CRM POS Functions. |
latestContact → description | String | Not applicable to CRM POS Functions. |
latestContact → lastUpdated | String | Not applicable to CRM POS Functions. |
latestContact → userId | String | Not applicable to CRM POS Functions. |
Request & Response Examples
Request
Request to get customer details of the customer with the customer number 100:
GET: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/details/100
Response
Following is the response for above get customer details request:
Response
Body: {
"contactMethodList" : [ {
"description" : "Email",
"type" : "METHOD",
"contactTypeId" : "METHOD_EMAIL"
}, {
"description" : "In Store",
"type" : "METHOD",
"contactTypeId" : "METHOD_IN_STORE"
}, {
"description" : "Letter",
"type" : "METHOD",
"contactTypeId" : "METHOD_LETTER"
}, {
"description" : "Phone",
"type" : "METHOD",
"contactTypeId" : "METHOD_PHONE"
} ],
"customerCustomerGroupList" : [ {
"customerNumber" : "100",
"groupTypeId" : "customerGroup",
"groupId" : "VIP",
"groupHierarchyId" : "CUSTOMER",
"variantGroupTypeId" : "region",
"variantGroupId" : "All",
"variantGroupHierarchyId" : "All"
} ],
"customerLoyaltyDetailResponse" : {
"accountId" : "200",
"customerNumber" : "100",
"lastTransactionDate" : 1729784368000,
"lastTransactionDesc" : "Televisions",
"lastTransactionValue" : -27500,
"rewardNumber" : "14420000",
"accountStatusId" : "ACTIVE",
"accountStatusDesc" : "ACTIVE",
"rewardTier" : "UK3",
"rewardTierDesc" : "Gold",
"pointsBalance" : 2396,
"redemptionBalance" : 479200,
"pointsDate" : 1729699953000,
"loyaltySchemeId" : "LOYALTY_UK",
"loyaltySchemeDesc" : "Loyalty Scheme UK"
},
"latestAppointment" : {
"contactTypeId" : { },
"customerId" : {
"id" : "100"
},
"entryId" : "45d7-:3970f59b291:f9e98a42-:b433cc074d5bad2c",
"subject" : "test app",
"type" : "customerAppointment",
"hidden" : false,
"lastUpdated" : 1729687227000,
"dateTimeCreated" : 1729687226215,
"ownerId" : "000101",
"details" : "test details",
"date" : {
"endTime" : {
"hour" : 14,
"minute" : 0,
"second" : 0
},
"recurrenceType" : "NONE",
"startDate" : 1729724400000,
"startTime" : {
"hour" : 13,
"minute" : 40,
"second" : 0
}
}
},
"latestContact" : {
"contactDate" : 1729784368000,
"referenceType" : "RetailTransaction",
"reasonId" : {
"regionId" : { }
},
"deviceId" : {
"id" : "mpos5@0005.enactor"
},
"locationId" : {
"id" : "0005"
},
"subject" : "Normal Retail Sale Transaction",
"contactHistoryId" : "0af6-:cb7733eb291:35be3f14-:dcca75e60357a978",
"customerContactTypeId" : {
"contactTypeId" : "STORE_SALE",
"id" : "STORE_SALE"
},
"customerId" : {
"id" : "100"
},
"description" : "Normal Retail Sale Transaction",
"lastUpdated" : 1729768270000,
"userId" : {
"id" : "000101"
}
}
}
Get Customer Relationships
This service will allow to load the relationship details of a customer.
Request
Request Service URL
GET /customers/relationships?customerNumber={customerNumber}
Request Tokens
- customerNumber - Customer number that is to be searched.
Request Parameters
There are no request parameters.
Request Body
There is no request body.
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
CustomerNumber | Long | The Customer number of the Customer found. |
CustomerRelationshipEntry | Complex Type | A complex element with the Customer relationship details. |
CustomerRelationshipEntry → relatedCustomerNumber | String | The Customer number of the related Customer. |
CustomerRelationshipEntry → relatedCustomerTitle | String | The title of the related Customer. |
CustomerRelationshipEntry → relatedCustomerForename | String | The first name of the related Customer. |
CustomerRelationshipEntry → relatedCustomerSurname | String | The surname of the related Customer. |
CustomerRelationshipEntry → relationshipTypeId | String | Type of the relationship to the Customer, which will be one of the following: - Child - Marriage - Parent - Sibling |
CustomerRelationshipEntry → relationshipId | Not applicable to CRM POS Functions. |
Request & Response Examples
Request
Request to get customer relationship details of the customer with the customer number 100:
GET: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/relationships?customerNumber=100
Response
Following is an example response for Get Customer Relationships request:
Response
Body: {
"customerNumber" : "100",
"customerRelationshipEntry" : [ {
"relatedCustomerNumber" : "101",
"relatedCustomerTitle" : "Mr",
"relatedCustomerForename" : "Benjamin",
"relatedCustomerSurname" : "Dobson",
"relationshipTypeId" : "PARENT",
"relationshipId" : "51-:996d681c291:32f6ddc1:978fb366c039e017"
} ]
}
Save Customer Relationships
This service allows saving the relationship details of a customer.
Request
Request Service URL
POST /customers/relationships
Request Tokens
There are no request tokens.
Request Parameters
There are no request parameters.
Request Body
Element | Mandatory / Optional | Type | Description |
---|---|---|---|
user | Complex Type | Contains user entity details of the requesting user. | |
entity | Complex Type | Contains address, customerId, name, related customer, relationshipId and relationshipTypeId details of the new entity to be saved as the new relationship. | |
entity → address | Complex Type | Set of addresses of the Customer. | |
entity → customerId | Complex Type | Contains the ID of the customer. | |
entity → name | Complex Type | Contains customer name related details. | |
entity → relatedCustomerKey | Complex Type | Contains the ID of the related customer whose relationship is to be changed. | |
entity → relationshipId | String | Not applicable to CRM POS Functions. | |
entity → relationshipTypeId | Complex Type | Type of the relationship to the Customer, which will be one of the following: - Child - Marriage - Parent - Sibling | |
noPop | N/A | Not applicable to CRM POS Functions. | |
deviceKey | N/A | Not applicable to CRM POS Functions. | |
locationKey | N/A | Not applicable to CRM POS Functions. | |
lacale | N/A | Not applicable to CRM POS Functions. | |
lacale → language | N/A | Not applicable to CRM POS Functions. | |
lacale → country | N/A | Not applicable to CRM POS Functions. | |
lacale → variant | N/A | Not applicable to CRM POS Functions. | |
lacale → description | N/A | Not applicable to CRM POS Functions. | |
lacale → lastUpdated | N/A | Not applicable to CRM POS Functions. | |
isNewRelationship | Boolean | False if this is an update of an existing relationship, else true for a new relationship. | |
updateTime | DateTime | Time that the relationship is saved. | |
oldEntity | Complex Type | Contains address, customerId, name, related customer, relationshipId and relationshipTypeId details of the old entity before saving new relationship. | |
oldEntity → address | Complex Type | Set of addresses of the Customer. | |
oldEntity → customerId | Complex Type | Contains the ID of the customer. | |
oldEntity → name | Complex Type | Contains customer name related details. | |
oldEntity → relatedCustomerKey | Complex Type | Contains the ID of the related customer whose relationship is to be changed. | |
oldEntity → relationshipId | String | Not applicable to CRM POS Functions. | |
oldEntity → relationshipTypeId | Complex Type | Type of the relationship to the Customer, which will be one of the following: - Child - Marriage - Parent - Sibling |
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
entity | Complex Type | Contains address, customerId, name, related customer, relationshipId and relationshipTypeId details of the new entity saved as the new relationship. |
entity → address | Complex Type | Set of addresses of the Customer. |
entity → customerId | Complex Type | Contains the ID of the customer. |
entity → lastUpdated | DateTime | Date time that the relationship is saved. |
entity → name | Complex Type | Contains customer name related details. |
entity → relatedCustomerKey | Complex Type | Contains the ID of the related customer whose relationship is to be changed. |
entity → relationshipId | String | Not applicable to CRM POS Functions. |
entity → relationshipTypeId | Complex Type | Type of the relationship to the Customer, which will be one of the following: - Child - Marriage - Parent - Sibling |
Request & Response Examples
Request
Request to save customer relationship details of the customer 100 as spouse of customer 101:
Request
POST: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/relationships
Body: {
"user" : {
"dateTimeActivated" : 1621279842000,
"displayName" : "Hertford Manager..",
"password" : "0niK+/LyM4lD8acxR7KI3UBbUfaI+OJBHF9EZsCLh4w=Bc1d3NgSOCg=",
"shortId" : "00010100",
"userId" : "000101",
"accessTimePeriods" : [ {
"timePeriod" : {
"dayOfWeek" : 1
}
}, {
"timePeriod" : {
"dayOfWeek" : 2
}
}, {
"timePeriod" : {
"dayOfWeek" : 3
}
}, {
"timePeriod" : {
"dayOfWeek" : 4
}
}, {
"timePeriod" : {
"dayOfWeek" : 5
}
}, {
"timePeriod" : {
"dayOfWeek" : 6
}
}, {
"timePeriod" : {
"dayOfWeek" : 7
}
} ],
"lastUpdated" : 1731949126000,
"templateKey" : {
"id" : "STORE_MANAGER_UK"
},
"isTemplate" : false,
"disallowMultiLocationSignOn" : false,
"cardSignOnOnly" : false,
"skipPasswordIfCard" : true,
"inactivityDelay" : 500,
"maintenanceInactivityDelay" : 1000,
"localeId" : {
"country" : "GB",
"id" : "en"
},
"locationId" : {
"id" : "0001"
},
"forceChangePassword" : false,
"strongPassword" : false,
"forceAlphaNumericPassword" : false,
"forceMixedCasePassword" : false,
"minimumPasswordLength" : 1,
"maximumPasswordLength" : 8,
"roleId" : [ {
"roleId" : "POS_CASH_MAN",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "SALES_ASSISTANT",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "LOYALTY",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "RETURNS",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "CRM-POS",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "ASSIST_MANAGER",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "CENTRAL_INVENTORY",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "GIFTCARD",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "STORE_INVENTORY",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "MANAGER",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
} ],
"trainingMode" : false,
"address" : {
"countryCodeId" : { },
"typeId" : { },
"isTemplate" : false
},
"userName" : {
"surname" : "Hertford Manager",
"forename" : "000101",
"initials" : "JS",
"dateOfBirth" : -120096000000
},
"teamId" : {
"id" : "TEAM"
},
"disallowLockingMultiplePos" : false,
"preventPasswordSimilarToUserId" : false,
"emailAccountName" : "enactor_test@outlook.com",
"emailEncryptedPassword" : "smG+rsrfBuKrdaJPv30rhg==",
"emailAddress" : "enactor_test@outlook.com"
},
"entity" : {
"address" : {
"countryCodeId" : { },
"typeId" : { },
"isTemplate" : false
},
"customerId" : {
"id" : "100"
},
"name" : {
"surname" : "Dobson",
"forename" : "Benjamin",
"initials" : "BD",
"title" : "Mr",
"sex" : "MALE"
},
"relatedCustomerKey" : {
"id" : "101"
},
"relationshipId" : "51-:996d681c291:32f6ddc1:978fb366c039e017",
"relationshipTypeId" : {
"id" : "MARRIAGE"
}
},
"noPop" : false,
"deviceKey" : {
"id" : "pos9@0005.enactor"
},
"locationKey" : {
"id" : "0005"
},
"lacale" : {
"language" : "en",
"country" : "GB",
"description" : "English (UK)",
"lastUpdated" : 1727775153703
},
"isNewRelationship" : false,
"updateTime" : 1732774370175,
"oldEntity" : {
"address" : {
"countryCodeId" : { },
"typeId" : { },
"isTemplate" : false
},
"customerId" : {
"id" : "100"
},
"name" : {
"surname" : "Dobson",
"forename" : "Benjamin",
"title" : "Mr"
},
"relatedCustomerKey" : {
"id" : "101"
},
"relationshipId" : "51-:996d681c291:32f6ddc1:978fb366c039e017",
"relationshipTypeId" : {
"id" : "PARENT"
}
}
}
Response
Following is an example response for Save Customer Relationships request where customer 100 is saved as a spouse of customer 101:
Response
Body: {
"entity" : {
"address" : {
"countryCodeId" : { },
"typeId" : { },
"isTemplate" : false
},
"customerId" : {
"id" : "100"
},
"lastUpdated" : 1732774371000,
"name" : {
"surname" : "Dobson",
"forename" : "Benjamin",
"initials" : "BD",
"title" : "Mr",
"sex" : "MALE"
},
"relatedCustomerKey" : {
"id" : "101"
},
"relationshipId" : "51-:996d681c291:32f6ddc1:978fb366c039e017",
"relationshipTypeId" : {
"id" : "MARRIAGE"
}
}
}
Get Affiliated Customer
This service will get all the details of the affiliated customers associated to the requested user.
Request
Request Service URL
POST /customers/affiliatedCustomers/search
Request Tokens
There are no request tokens.
Request Parameters
There are no request parameters.
Request Body
Element | Mandatory / Optional | Type | Description |
---|---|---|---|
userKey | Mandatory | Complex Type | Contains the ID of the POS user. |
criteria | Optional | Complex Type | Contains filter criteria options. |
criteria → suppressDefaultOrderBy | Optional | boolean | Whether to override the default ordering. |
criteria → maxRows | Optional | int | Maximum number of rows to return. |
criteria → distinct | Optional | boolean | Whether to return only the distinct values. |
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
list | Complex Type | Provides a list of the customers affiliated with the requested user. |
propertyNames | Complex Type | The names of the properties that are part of the response. |
Request & Response Examples
Request
Request to get affiliated customer details of the user with the user ID of 000101:
Request
POST: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/affiliatedCustomers/search
Body: {
"userKey" : {
"id" : "000101"
},
"criteria" : {
"suppressDefaultOrderBy" : false,
"maxRows" : 0,
"distinct" : false
}
}
Response
Following is an example response for Get Affiliated Customer request:
Response
Body: {
"list" : [ {
"key" : {
"@type" : "customerKey",
"id" : "100"
},
"data" : {
"Temporary" : false,
"Primary" : true,
"customerName.title" : "Mrs",
"Method" : "DIRECT",
"customerNumber" : "100",
"customerName.forename" : "Amelia",
"customerName.surname" : "Baldwin",
"LoyaltyPAN" : "14420000"
}
}, {
"key" : {
"@type" : "customerKey",
"id" : "100"
},
"data" : {
"Temporary" : false,
"Primary" : false,
"customerName.title" : "Mrs",
"Method" : "TEAM",
"customerNumber" : "100",
"TeamID" : "TEAM",
"customerName.forename" : "Amelia",
"customerName.surname" : "Baldwin",
"LoyaltyPAN" : "14420000"
}
} ],
"propertyNames" : [ "customerNumber", "customerName.title", "customerName.forename", "customerName.surname", "Primary", "Method", "TeamID", "Temporary", "ReplacedUserID", "LoyaltyPAN" ]
}
Get Address Book
This service retrieves the basic details of a customer which includes personal details, contact details, jobs, loyalty details, customer groups and appointments.
Request
Request Service URL
POST /customers/messages/addressBookEntries/search
Request Tokens
There are no request tokens.
Request Parameters
There are no request parameters.
Request Body
Element | Mandatory / Optional | Type | Description |
---|---|---|---|
criteria | Optional | Complex Type | Contains the filter criteria of forename, surname, and email address. |
criteria → foreName | Optional | Complex Type | Contains forename related search properties. |
criteria → surName | Optional | Complex Type | Contains surname related search properties. |
criteria → emailAddress | Optional | Complex Type | Contains email address related search properties. |
id | Optional | String | Not applicable to CRM POS Functions. |
forceApplicable | Optional | boolean | Not applicable to CRM POS Functions. |
orColumns | Optional | boolean | Not applicable to CRM POS Functions. |
comparisonOperator | Optional | String | The operator used to compare the fields. Following is the list of possible values: - EQUALS - NOT_EQUALS - GREATER_THAN - LESS_THAN - GREATER_THAN_OR_EQUALS - LESS_THAN_OR_EQUALS - STARTS_WITH - CONTAINS - IN - NOT_IN |
orNull | Optional | boolean | Not applicable to CRM POS Functions. |
width | Optional | Int | Not applicable to CRM POS Functions. (Max length - 20) |
useValueForAllProperties | Optional | boolean | Not applicable to CRM POS Functions. |
caseInsensitive | Optional | boolean | Not applicable to CRM POS Functions. |
submitOnChange | Optional | boolean | Not applicable to CRM POS Functions. |
disabled | Optional | boolean | Not applicable to CRM POS Functions. |
hidden | Optional | boolean | Not applicable to CRM POS Functions. |
fuzzyLevel | Optional | Int | Not applicable to CRM POS Functions. (Max length - 4) |
customQueryFilter | Optional | boolean | Not applicable to CRM POS Functions. |
defaultValue | Optional | Object | Not applicable to CRM POS Functions. |
supportValues | Optional | Complex Type | The values to be passed in for comparison. |
criteria → suppressDefaultOrderBy | Optional | boolean | Whether to override the default ordering. |
criteria → maxRows | Optional | int | Maximum number of rows to return. |
criteria → distinct | Optional | boolean | Whether to return only the distinct values. |
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
addressBookItemList | Complex Type | List of address book item results as requested. |
addressBookItemList → entryId | String | Unique of the address book entry. |
addressBookItemList → forename | String | Forename of the address book entry. |
addressBookItemList → surname | String | Surname of the address book entry. |
addressBookItemList → emailAddress | String | Email address of the address book entry. |
Request & Response Examples
Request
Request to get address book details of the first name search as 'Amelia':
Request
POST: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/messages/addressBookEntries/search
Body: {
"criteria" : {
"foreName" : {
"id" : "Forename",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ {
"value" : "Amelia"
} ]
},
"surName" : {
"id" : "Surname",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ { } ]
},
"emailAddress" : {
"id" : "EmailAddress",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ { } ]
},
"suppressDefaultOrderBy" : false,
"maxRows" : 0,
"distinct" : false
}
}
Response
Following is an example response to Get Address Book for forename of 'Amelia' request:
Body: {
"addressBookItemList" : [ {
"entryId" : "d6b1:f16f312b291:dba443f5:f788641c17748768",
"foreName" : "Amelia",
"surName" : "Baldwin",
"emailAddress" : "abaldwin@enactordata.co"
} ]
}
Contact History Search
This request is used to get the list of contact history information between a particular Customer and the operator.
Request Service URL
POST /customers/contactHistory/search
Request Tokens
There are no request tokens.
Request Parameters
There are no request parameters.
Request Body
Element | Mandatory / Optional | Type | Description |
---|---|---|---|
contactHistorySearch | Mandatory | Complex Type | The root request element. |
contactHistorySearch → criteria | Optional | Complex Type | The search criteria used in the request. |
contactHistorySearch → criteria → distinct | Optional | boolean | Whether to return only the distinct values. |
contactHistorySearch → criteria → maxRows | Optional | int | Maximum number of rows to return. |
contactHistorySearch → criteria → pageInfo | Optional | Complex Type | Page information to be provided if results are required as a paginated list. |
contactHistorySearch → criteria → pageInfo → rowOffset | Optional | int | The row offset required of the pagination. |
contactHistorySearch → criteria → pageInfo → rowCount | Optional | int | The row count required of the pagination. |
contactHistorySearch → criteria → pageInfo → totalRowCountLimit | Optional | int | The row limit count required per page. |
contactHistorySearch → criteria → suppressDefaultOrderBy | Optional | boolean | Whether to override the default ordering. |
contactHistorySearch → criteria → CustomerNumber | Optional | long | The Customer number of the customer history that needs to be found. |
contactHistorySearch → criteria → CustomerNumber → id | Optional | long | The ID of the Customer this history belongs to. |
contactHistorySearch → criteria → CustomerNumber → forceApplicable | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → CustomerNumber → orColumns | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → CustomerNumber → comparisonOperator | Optional | String | The operator used to compare the fields. Default is EQUALS for POS. Possible values: EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN_OR_EQUALS, STARTS_WITH, CONTAINS, IN, NOT_IN. |
contactHistorySearch → criteria → CustomerNumber → orNull | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → CustomerNumber → width | Optional | Int (Max length - 20) | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → CustomerNumber → useValueForAllProperties | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → CustomerNumber → caseInsensitive | Optional | boolean | Whether the comparisons should be case insensitive. Default is false. |
contactHistorySearch → criteria → CustomerNumber → submitOnChange | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → CustomerNumber → disabled | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → CustomerNumber → hidden | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → CustomerNumber → fuzzyLevel | Optional | Int (Max length - 4) | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → CustomerNumber → customQueryFilter | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → CustomerNumber → defaultValue | Optional | Object | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → CustomerNumber → supportValues | Optional | Complex Type | The values to be passed in for comparison. |
contactHistorySearch → criteria → CustomerNumber → valueRequired | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → userId | Optional | string | The user ID of the user who is requesting the Customer history. |
contactHistorySearch → criteria → userId → id | Optional | String | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → userId → forceApplicable | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → userId → orColumns | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → userId → comparisonOperator | Optional | String | The operator used to compare the fields. Possible values: EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN_OR_EQUALS, STARTS_WITH, CONTAINS, IN, NOT_IN. |
contactHistorySearch → criteria → userId → orNull | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → userId → width | Optional | Int (Max length - 20) | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → userId → useValueForAllProperties | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → userId → caseInsensitive | Optional | boolean | Whether the comparisons should be case insensitive. Default is false. |
contactHistorySearch → criteria → userId → submitOnChange | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → userId → disabled | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → userId → hidden | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → userId → fuzzyLevel | Optional | Int (Max length - 4) | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → userId → customQueryFilter | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → userId → valueRequired | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → <retail:contactTypeId xsi:type="core:TextValueFilter"> | Optional | Not applicable to CRM POS Functions. | |
contactHistorySearch → criteria → id | Optional | Not applicable to CRM POS Functions. | |
contactHistorySearch → criteria → forceApplicable | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → orColumns | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → comparisonOperator | Optional | String | The operator used to compare the fields. Possible values: EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN_OR_EQUALS, STARTS_WITH, CONTAINS, IN, NOT_IN. |
contactHistorySearch → criteria → orNull | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → width | Optional | Int (Max length - 20) | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → contactHistorySearch → criteria → useValueForAllProperties | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → caseInsensitive | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → submitOnChange | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → disabled | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → hidden | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → fuzzyLevel | Optional | Int (Max length - 4) | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → customQueryFilter | Optional | boolean | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → defaultValue | Optional | Object | Not applicable to CRM POS Functions. |
contactHistorySearch → criteria → supportValues | Optional | Complex Type | The values to be passed in for comparison. |
contactHistorySearch → criteria → valueRequired | Optional | boolean | Not applicable to CRM POS Functions. |
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
contactHistorySearchResponse | Complex Type | The list details of the transaction history for the searched criteria |
contactHistorySearchResponse → contactHistoryItem | Not applicable to CRM POS Functions. | |
contactHistorySearchResponse → contactHistoryItem → contactRef | Not applicable to CRM POS Functions. | |
contactHistorySearchResponse → contactHistoryItem → contactRefType | Not applicable to CRM POS Functions. | |
contactHistorySearchResponse → contactHistoryItem → subject | Not applicable to CRM POS Functions. | |
contactHistorySearchResponse → contactHistoryItem → typeId | String | Not applicable to CRM POS Functions. |
contactHistorySearchResponse → contactHistoryItem → contactDate | DateTime | The details of the date and time that the history belongs to. |
contactHistorySearchResponse → contactHistoryItem → userId | string | The user ID of the user who is requesting the Customer history. |
contactHistorySearchResponse → contactHistoryItem → CustomerNumber | long | The Customer number the history belongs to. |
contactHistorySearchResponse → contactHistoryItem → CustomerForename | string | The first name of the Customer. |
contactHistorySearchResponse → contactHistoryItem → CustomerSurname | string | The surname of the Customer. |
contactHistorySearchResponse → contactHistoryItem → CustomerContactHistoryId | N/A | Not applicable to CRM POS Functions. |
Request & Response Examples
Request
Request for Contact History Search for customer with the customer ID 100:
Request
REST
POST: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/contactHistory/search
Body: {
"criteria" : {
"customerNumber" : {
"id" : "CustomerNumber",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"defaultValue" : "100",
"valueRequired" : false,
"supportValues" : [ {
"value" : "100"
} ]
},
"userId" : {
"id" : "UserId",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "EQUALS",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false
},
"contactTypeId" : {
"id" : "ContactTypeId",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "NOT_EQUALS",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"defaultValue" : "STORE_SALE",
"valueRequired" : false,
"supportValues" : [ {
"value" : "STORE_SALE"
} ]
},
"suppressDefaultOrderBy" : false,
"pageInfo" : {
"rowOffset" : 0,
"rowCount" : 10,
"totalRowCountLimit" : 0
},
"maxRows" : 0,
"distinct" : false
}
}
Response
Following is an example response for Contact History Search request:
Response
Body: {
"contactHistoryItem" : [ {
"typeId" : "PHONE_C_APPOINT",
"contactDate" : 1731571135000,
"userId" : "000101",
"customerNumber" : "100",
"customerForename" : "Amelia",
"customerSurname" : "Baldwin",
"customerContactHistoryId" : "24d4-:98fb3592391:46e0ba73-:042ede3a751f05c6"
}, {
"contactRef" : "c27ff461-07d9-4a68-8ff2-03f7642285d5",
"contactRefType" : "OUTBOUND_EMAIL",
"subject" : "Your Receipt",
"typeId" : "CUST_OUTBOUND_EMAIL",
"contactDate" : 1729848408000,
"userId" : "RECEIPTS",
"customerNumber" : "100",
"customerForename" : "Amelia",
"customerSurname" : "Baldwin",
"customerContactHistoryId" : "2167-:09c6cf2c291:ad11fbc:9b5f6a069c1f7a52"
}, {
"typeId" : "PHONE_C_APPOINT",
"contactDate" : 1729771933000,
"userId" : "000101",
"customerNumber" : "100",
"customerForename" : "Amelia",
"customerSurname" : "Baldwin",
"customerContactHistoryId" : "8356-:200404eb291:4b7e37a5-:d7525327113e3781"
}, {
"typeId" : "PHONE_C_APPOINT",
"contactDate" : 1729771821000,
"userId" : "000101",
"customerNumber" : "100",
"customerForename" : "Amelia",
"customerSurname" : "Baldwin",
"customerContactHistoryId" : "3956-:200404eb291:4b7e37a5-:d7525327113e3781"
}, {
"subject" : "CALL CLIENT",
"typeId" : "PHONE_C_APPOINT",
"contactDate" : 1729771763000,
"userId" : "000101",
"customerNumber" : "100",
"customerForename" : "Amelia",
"customerSurname" : "Baldwin",
"customerContactHistoryId" : "3b66-:200404eb291:4b7e37a5-:d7525327113e3781"
}, {
"contactRefType" : "RetailTransaction",
"subject" : "Normal Retail Sale Transaction",
"typeId" : "LOYALTY_REGISTRATION",
"contactDate" : 1727865179000,
"userId" : "000101",
"customerNumber" : "100",
"customerForename" : "Amelia",
"customerSurname" : "Baldwin",
"customerContactHistoryId" : "2d94-:8e9b2db4291:a407f215:86405e5ab5acef90"
} ]
}
Save Customers
This API is used to save customers from the CRM screen.
Request
Request Service URL
POST /customers/customerDetails
Request Tokens
There are no request tokens.
Request Parameters
There are no request parameters.
Request Body
Element | Mandatory / Optional | Type | Description |
---|---|---|---|
customer | Optional | Complex Type | A complex element with the new Customer details. |
customer → addresses | Optional | Complex Type | Set of addresses of the Customer. |
customer → dateCreated | Optional | Datetime | The date and the time that the Customer was created. |
customer → emailAddresses | Optional | Complex Type | The email address of the Customer. |
customer → phoneNumbers | Optional | Complex Type | The phone number of the Customer. |
customer → CustomerName | Optional | Complex Type | The name of the Customer. |
customer → CustomerName → surname | Optional | String (max length - 100) | The family name of the Customer. |
customer → CustomerName → forename | Optional | String (max length - 100) | The first name of the Customer. |
customer → CustomerName → title | Optional | String (max length - 10) | The title of the Customer. |
customer → employeeKey | Optional | N/A | Not applicable for CRM POS Functions. |
customer → CustomerType | Optional | String (max length - 20) | Not applicable to CRM POS Functions. |
customer → createdBy | Optional | N/A | Not applicable to CRM POS Functions. |
customer → createdAt | Optional | N/A | Not applicable to CRM POS Functions. |
customer → status | Optional | String (Max length - 15) | Default is set to 'Captured' for the customers created using the POS. |
customer → source | Optional | String | The ID of the Device used to create the customer. |
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
retail: CustomerNumber | String | The service will return the CustomerNumber of the newly saved Customer as the response. |
Request & Response Examples
Request
Request to create and save a new customer:
Request
POST: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/customerDetails
Body: {
"customer" : {
"addresses" : [ {
"@type" : "address",
"countryCodeId" : { },
"isPreferred" : true,
"typeId" : { },
"postCode" : "DT2 3PH",
"street1" : "37 Thompsons Lane",
"town" : "Melbury Sampford",
"isTemplate" : false
} ],
"dateCreated" : 1734414110438,
"emailAddresses" : [ {
"emailAddress" : "drake.parker@enactor.data",
"typeId" : { }
} ],
"phoneNumbers" : [ {
"number" : "0776249912",
"typeId" : { }
} ],
"customerName" : {
"surname" : "Parker",
"forename" : "Drake",
"title" : "Mr"
},
"employeeKey" : { },
"customerType" : {
"id" : "RETAIL"
},
"organisation" : "Enactor",
"createdBy" : { },
"createdAt" : { },
"status" : "Captured",
"source" : "pos9@0005.enactor"
}
}
Response
Following is an example response for Save Customers request:
Body: {
"customerNumber" : "20"
}
Update Customers
This API is used to update customers from the CRM screen.
Request
Request Service URL
PUT /customers/customerDetails
Request Tokens
There are no request tokens.
Request Parameters
There are no request parameters.
Request Body
Element | Mandatory / Optional | Type | Description |
---|---|---|---|
customer | Optional | Complex Type | A complex element with the new Customer details. |
customer → addresses | Optional | Complex Type | Set of addresses of the Customer. |
customer → dateCreated | Optional | Datetime | The date and the time that the Customer was created. |
customer → emailAddresses | Optional | Complex Type | The email address of the Customer. |
customer → phoneNumbers | Optional | Complex Type | The phone number of the Customer. |
customer → CustomerName | Optional | Complex Type | The name of the Customer. |
customer → CustomerName → surname | Optional | String (max length - 100) | The family name of the Customer. |
customer → CustomerName → forename | Optional | String (max length - 100) | The first name of the Customer. |
customer → CustomerName → title | Optional | String (max length - 10) | The title of the Customer. |
customer → employeeKey | Optional | N/A | Not applicable for CRM POS Functions. |
customer → CustomerType | Optional | String (max length - 20) | Not applicable to CRM POS Functions. |
customer → createdBy | Optional | N/A | Not applicable to CRM POS Functions. |
customer → createdAt | Optional | N/A | Not applicable to CRM POS Functions. |
customer → status | Optional | String (Max length - 15) | Default is set to 'Captured' for the customers created using the POS. |
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
retail: CustomerNumber | String | The service will return the CustomerNumber of the updated Customer as the response. |
Request & Response Examples
Request
Request to update customer details of the customer with the customer number 100:
Response
Following is an example response for Update Customers request:
Body: {
"customerNumber" : "100"
}
Get Customer Notes
This operation can be used to retrieve Notes that have been recorded against a customer.
Request
Request Service URL
POST /customers/notes/search
Request Tokens
There are no request tokens.
Request Parameters
There are no request parameters.
Request Body
Element | Mandatory / Optional | Type | Description |
---|---|---|---|
getCustomerNotes → entityName | Optional | Complex Type | Contains the details of Customer Notes. |
getCustomerNotes → entityNamespace | Optional | N/A | Not applicable for POS. |
getCustomerNotes → criteria | Optional | Complex Type | The same criteria used in the request. |
getCustomerNotes → criteria → distinct | Optional | boolean | Whether to return only the distinct values. |
getCustomerNotes → criteria → maxRows | Optional | int | Maximum rows to return. |
getCustomerNotes → criteria → suppressDefaultOrderBy | Optional | boolean | Whether to override the default ordering. |
getCustomerNotes → criteria → CustomerNumber | Optional | long | The Customer number that the notes belong to. |
getCustomerNotes → criteria → CustomerNumber → id | Optional | Customer ID that the notes will be saved to. | |
getCustomerNotes → criteria → CustomerNumber → forceApplicable | Optional | boolean | Not applicable for POS. |
getCustomerNotes → criteria → CustomerNumber → orColumns | Optional | boolean | Not applicable for POS. |
getCustomerNotes → criteria → CustomerNumber → comparisonOperator | Optional | String | The operator used to compare the fields. Possible values: EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN_OR_EQUALS, STARTS_WITH, CONTAINS, IN, NOT_IN |
getCustomerNotes → criteria → CustomerNumber → orNull | Optional | boolean | Not applicable for POS. |
getCustomerNotes → criteria → CustomerNumber → width | Optional | int (Max length - 20) | Not applicable for POS. |
getCustomerNotes → criteria → CustomerNumber → useValueForAllProperties | Optional | boolean | Not applicable for POS. |
getCustomerNotes → criteria → CustomerNumber → caseInsensitive | Optional | boolean | Whether the comparisons should be case insensitive. Not applicable for POS. |
getCustomerNotes → criteria → CustomerNumber → submitOnChange | Optional | boolean | Not applicable for POS. |
getCustomerNotes → criteria → CustomerNumber → disabled | Optional | boolean | Not applicable for POS. |
getCustomerNotes → criteria → CustomerNumber → hidden | Optional | boolean | Not applicable for POS. |
getCustomerNotes → criteria → CustomerNumber → fuzzyLevel | Optional | int (Max length - 4) | Not applicable for POS. |
getCustomerNotes → criteria → CustomerNumber → customQueryFilter | Optional | boolean | Not applicable for POS. |
getCustomerNotes → criteria → CustomerNumber → defaultValue | Optional | Object | Not applicable for POS. |
getCustomerNotes → criteria → CustomerNumber → supportValues | Optional | Complex Type | The values to be passed in for comparison. |
getCustomerNotes → criteria → CustomerNumber → valueRequired | Optional | boolean | Not applicable for POS. |
getCustomerNotes → listName | Optional | Not applicable for POS. |
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
getCustomerNotesResponse | Complex Type | Details of the Notes that are added in the preference screen. |
getCustomerNotesResponse → list | Complex Type | Details of the Notes that are added in the preference screen. |
getCustomerNotesResponse → list → userId | string | The user ID of the user who is updating this preference. |
getCustomerNotesResponse → list → CustomerId | long | The Customer ID the preference belongs to. |
getCustomerNotesResponse → list → noteDate | DateTime | The date and time that the Note is created. |
getCustomerNotesResponse → list → lastUpdated | DateTime | The last updated time of the customer communication preference. |
getCustomerNotesResponse → list → noteId | String | Note ID for identification purposes. Not applicable to CRM POS Functions. |
getCustomerNotesResponse → list → notes | String | Contains the details of the Customer Notes. |
getCustomerNotesResponse → criteria | Complex Type | The search criteria used in the request. |
getCustomerNotesResponse → criteria → distinct | boolean | Whether to return only the distinct values. |
getCustomerNotesResponse → criteria → maxRows | int | Maximum number of rows to return. |
getCustomerNotesResponse → criteria → suppressDefaultOrderBy | boolean | Whether to override the default ordering. |
Request & Response Examples
Request
Request to get customer notes of the customer with the customer number 100:
Request
POST /customers/notes/search
Body: {
"entityName" : "customerNote",
"entityNamespace" : "http://www.enactor.com/crm",
"criteria" : {
"customerNumber" : {
"id" : "CustomerNumber",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "EQUALS",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"defaultValue" : "100",
"valueRequired" : false,
"supportValues" : [ {
"value" : "100"
} ]
},
"suppressDefaultOrderBy" : false,
"maxRows" : 0,
"distinct" : false
},
"listName" : "listAll"
}
Response
Following is an example response for Get Customer Notes request:
Response
Body: {
"list" : [ {
"userId" : {
"id" : "000101"
},
"customerId" : {
"id" : "100"
},
"isPrivate" : false,
"lastUpdated" : 1731911602000,
"noteId" : "7a5:e8cde1d3391:fac8e68:a5b1bd6614df3610",
"notes" : "Amelia's Note"
} ],
"criteria" : {
"maxRows" : 0,
"suppressDefaultOrderBy" : false,
"distinct" : false
}
}
Save Customer Note
This operation can be used to save Notes for a Customer.
Request
Request Service URL
POST /customers/notes
Request Tokens
There are no request tokens.
Request Parameters
There are no request parameters.
Request Body
Element | Mandatory / Optional | Type | Description |
---|---|---|---|
customerNote | Mandatory | Complex Type | Contains the details of the Customer Note. |
customerNote → userId | Optional | Complex Type | Contains the ID of the user saving the customer note. |
customerNote → customerId | Optional | Complex Type | Contains the ID of the customer for whom the customer note is being saved. |
customerNote → isPrivate | Optional | boolean | Whether to have this note private or not. |
customerNote → noteDate | Optional | DateTime | Date and Time that the customer note is saved. |
customerNote → notes | Optional | String | The content of the customer note. |
customerNote → user | Optional | Complex Type | Contains the details of the user creating the Customer Note. |
customerNote → userLocale | Optional | Complex Type | Contains the locale details of the user creating the Customer Note. |
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
customerNote | Complex Type | Contains the details of the Customer Note. |
customerNote → userId | Complex Type | Contains the ID of the user saving the customer note. |
customerNote → customerId | Complex Type | Contains the ID of the customer for whom the customer note is being saved. |
customerNote → isPrivate | boolean | Whether to have this note private or not. |
customerNote → noteDate | DateTime | Date and Time that the customer note is saved. |
customerNote → lastUpdated | DateTime | Date and Time that the customer note is updated. |
customerNote → noteId | String | Unique Note ID of the customer note. |
customerNote → notes | String | The content of the customer note. |
Request & Response Examples
Request
Request to save a customer note for the customer with the ID of 100:
Request
POST: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/notes
Body: {
"customerNote" : {
"userId" : {
"id" : "000101"
},
"customerId" : {
"id" : "100"
},
"isPrivate" : false,
"noteDate" : 1731609000000,
"notes" : "Amelia's Note 2"
},
"user" : {
"dateTimeActivated" : 1621279842000,
"displayName" : "Hertford Manager",
"password" : "ldI4ZAuBxXAG3nj97KKXqUEH7u8uiJ1zV5VhoDpjYAM=4B0kYhNANWA=",
"userId" : "000101",
"accessTimePeriods" : [ {
"timePeriod" : {
"dayOfWeek" : 1
}
}, {
"timePeriod" : {
"dayOfWeek" : 2
}
}, {
"timePeriod" : {
"dayOfWeek" : 3
}
}, {
"timePeriod" : {
"dayOfWeek" : 4
}
}, {
"timePeriod" : {
"dayOfWeek" : 5
}
}, {
"timePeriod" : {
"dayOfWeek" : 6
}
}, {
"timePeriod" : {
"dayOfWeek" : 7
}
} ],
"lastUpdated" : 1731044169485,
"templateKey" : {
"id" : "STORE_MANAGER_UK"
},
"isTemplate" : false,
"disallowMultiLocationSignOn" : false,
"cardSignOnOnly" : false,
"skipPasswordIfCard" : false,
"inactivityDelay" : 500,
"maintenanceInactivityDelay" : 1000,
"localeId" : {
"country" : "GB",
"id" : "en"
},
"locationId" : {
"id" : "0001"
},
"forceChangePassword" : false,
"strongPassword" : false,
"forceAlphaNumericPassword" : false,
"forceMixedCasePassword" : false,
"minimumPasswordLength" : 2,
"maximumPasswordLength" : 8,
"roleId" : [ {
"roleId" : "POS_CASH_MAN",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "SALES_ASSISTANT",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "LOYALTY",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "RETURNS",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "CRM-POS",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "ASSIST_MANAGER",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "CENTRAL_INVENTORY",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "GIFTCARD",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "STORE_INVENTORY",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "MANAGER",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
} ],
"trainingMode" : false,
"address" : {
"countryCodeId" : { },
"typeId" : { },
"isTemplate" : false
},
"userName" : {
"surname" : "Hertford Manager",
"forename" : "000101",
"initials" : "JS"
},
"disallowLockingMultiplePos" : false,
"preventPasswordSimilarToUserId" : false,
"emailEncryptedPassword" : "smG+rsrfBuKrdaJPv30rhg==",
"emailAccountName" : "enactor_test@outlook.com",
"emailAddress" : "enactor_test@outlook.com"
},
"userLocale" : {
"language" : "en",
"country" : "GB",
"description" : "English (UK)",
"lastUpdated" : 1730914930573
}
}
Response
Following is an example response for Save Customer Notes request:
Body: {
"customerNote" : {
"userId" : {
"id" : "000101"
},
"customerId" : {
"id" : "100"
},
"isPrivate" : false,
"noteDate" : 1731609000000,
"lastUpdated" : 1731911669000,
"noteId" : "e8a-:ec36e1d3391:3210deb1-:03de649c3d8cbdd5",
"notes" : "Amelia's Note 2"
}
}
Get Customer Preferences
This operation can be used to retrieve preference values for a Customer.
Request
Request Service URL
POST /customers/preferences/search
Request Tokens
There are no request tokens.
Request Parameters
There are no request parameters.
Request Body
Element | Mandatory / Optional | Type | Description |
---|---|---|---|
getCustomerPreferences → criteria | Optional | Complex Type | The Search criteria details. |
getCustomerPreferences → criteria → distinct | Optional | boolean | Whether to return only the distinct values. |
getCustomerPreferences → criteria → maxRows | Optional | int | Maximum number of rows to return. |
getCustomerPreferences → criteria → suppressDefaultOrderBy | Optional | boolean | Whether to override the default ordering. |
getCustomerPreferences → criteria → CustomerId | Optional | Text Value Filter | This is an element to filter the results by Customer ID. If not provided, all preferences are returned. |
getCustomerPreferences → criteria → CustomerId → id | Optional | String | The core:id of the TextValueFilter should be equal to 'CustomerNumber'. |
getCustomerPreferences → criteria → CustomerId → forceApplicable | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerPreferences → criteria → CustomerId → orColumns | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerPreferences → criteria → CustomerId → comparisonOperator | Optional | String | The operator used to compare the fields. Valid values: EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN_OR_EQUALS, STARTS_WITH, CONTAINS, IN, NOT_IN |
getCustomerPreferences → criteria → CustomerId → orNull | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerPreferences → criteria → CustomerId → width | Optional | int (Max length - 20) | Not applicable to CRM POS Functions. |
getCustomerPreferences → criteria → CustomerId → useValueForAllProperties | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerPreferences → criteria → CustomerId → caseInsensitive | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerPreferences → criteria → CustomerId → submitOnChange | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerPreferences → criteria → CustomerId → disabled | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerPreferences → criteria → CustomerId → hidden | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerPreferences → criteria → CustomerId → fuzzyLevel | Optional | int (Max length - 4) | Not applicable to CRM POS Functions. |
getCustomerPreferences → criteria → CustomerId → customQueryFilter | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerPreferences → criteria → CustomerId → defaultValue | Optional | Object | Not applicable to CRM POS Functions. |
getCustomerPreferences → criteria → CustomerId → supportValues | Optional | Complex Type | The values to be passed in for comparison. |
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
customerPreferenceEntry | Complex Type | Object containing the customer preferences details including created, optionPathId, optionSetId, customerId, lastUpdated, preferenceId and value of the preference. |
Request & Response Examples
Request
Request to get customer preferences of the customer with the customer number 100:
Request
POST: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/preferences/search
Body: {
"criteria" : {
"customerId" : {
"id" : "CustomerNumber",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "EQUALS",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"defaultValue" : "100",
"valueRequired" : false,
"supportValues" : [ {
"value" : "100"
} ]
},
"maxRows" : 0,
"distinct" : false,
"suppressDefaultOrderBy" : false
}
}
Response
Following is an example response for Get Customer Preferences request:
Response
Body: {
"customerPreferenceEntry" : [ {
"created" : 1734502846000,
"optionPathId" : "VS",
"optionSetId" : {
"optionSetId" : "CUSTOMER_PREF1",
"type" : "customerPreferenceOptionSet",
"groupId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
},
"customerId" : {
"id" : "100"
},
"lastUpdated" : 1734502861000,
"preferenceId" : "e2e-:4b85c97d391:6220d735-:c5e90fac83025722",
"value" : [ {
"id" : "VS"
} ]
} ]
}
Save Customer Preference
This operation can be used to save preference values of a Customer.
Request
Request Service URL
POST /customers/preferences
Request Tokens
There are no request tokens.
Request Parameters
There are no request parameters.
Request Body
Request Body
Element | Mandatory / Optional | Type | Description |
---|---|---|---|
customerPreferences | Optional | Complex Type | Object containing the customer preferences details including created, optionPathId. optionSetId, customerId and value of the preference. |
locale | Optional | Complex Type | Object containing the locale related details of the preference. |
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
customerPreferences | Complex Type | Object containing the customer preferences details including created, optionPathId, optionSetId, customerId and value of the preference. |
locale | Complex Type | Object containing the locale related details of the preference. |
Request & Response Examples
Request
Request to save customer preferences of the customer with the customer number 100:
Request
POST: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/preferences/search
Body: {
"customerPreference" : {
"created" : 1734502846652,
"optionPathId" : "VS",
"optionSetId" : {
"optionSetId" : "CUSTOMER_PREF1",
"type" : "customerPreferenceOptionSet",
"groupId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
},
"customerId" : {
"id" : "100"
},
"value" : [ {
"id" : "VS"
} ]
},
"locale" : {
"language" : "en",
"country" : "GB",
"description" : "English (UK)",
"lastUpdated" : 1727775153703
}
}
Response
Following is an example response for Save Customer Preferences request:
Response
Body: {
"customerPreference" : {
"created" : 1734502846652,
"optionPathId" : "VS",
"optionSetId" : {
"optionSetId" : "CUSTOMER_PREF1",
"type" : "customerPreferenceOptionSet",
"groupId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
},
"customerId" : {
"id" : "100"
},
"lastUpdated" : 1734502861000,
"preferenceId" : "e2e-:4b85c97d391:6220d735-:c5e90fac83025722",
"value" : [ {
"id" : "VS"
} ]
}
}
Get Customer Key Dates
This operation can be used to retrieve the dates of special occasions that have been recorded for a Customer.
Request
Request Service URL
POST /customers/pos/keyDates/search
Request Tokens
There are no request tokens.
Request Parameters
There are no request parameters.
Request Body
Element | Mandatory / Optional | Type | Description |
---|---|---|---|
getCustomerKeyDates → criteria | Optional | Complex Type | The Search criteria details. |
getCustomerKeyDates → criteria → distinct | Optional | boolean | Whether to return only the distinct values. |
getCustomerKeyDates → criteria → maxRows | Optional | int | Maximum number of items to return. |
getCustomerKeyDates → criteria → suppressDefaultOrderBy | Optional | boolean | Whether to override the default ordering. |
getCustomerKeyDates → criteria → CustomerNumber | Optional | long | The Customer number of the Customer found. |
getCustomerKeyDates → criteria → CustomerNumber → id | Optional | The Customer ID of the Customer found. | |
getCustomerKeyDates → criteria → CustomerNumber → forceApplicable | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerKeyDates → criteria → CustomerNumber → orColumns | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerKeyDates → criteria → CustomerNumber → comparisonOperator | Optional | String | TThe operator used to compare the fields. Following is the list of possible values. EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN_OR_EQUALS, STARTS_WITH, CONTAINS, IN, NOT_IN |
getCustomerKeyDates → criteria → CustomerNumber → orNull | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerKeyDates → criteria → CustomerNumber → width | Optional | int (Max length - 20) | Not applicable to CRM POS Functions. |
getCustomerKeyDates → criteria → CustomerNumber → useValueForAllProperties | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerKeyDates → criteria → CustomerNumber → caseInsensitive | Optional | boolean | Whether comparisons should be case insensitive. Default is false. |
getCustomerKeyDates → criteria → CustomerNumber → submitOnChange | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerKeyDates → criteria → CustomerNumber → disabled | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerKeyDates → criteria → CustomerNumber → hidden | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerKeyDates → criteria → CustomerNumber → fuzzyLevel | Optional | int (Max length - 4) | Not applicable to CRM POS Functions. |
getCustomerKeyDates → criteria → CustomerNumber → customQueryFilter | Optional | boolean | Not applicable to CRM POS Functions. |
getCustomerKeyDates → criteria → CustomerNumber → defaultValue | Optional | Object | Not applicable to CRM POS Functions. |
getCustomerKeyDates → criteria → CustomerNumber → supportValues | Optional | Complex Type | The values to be passed in for comparison. |
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
getCustomerKeyDatesResponse → CustomerKeyDates | DateTime | The key date of the customer is saved. |
getCustomerKeyDatesResponse → CustomerKeyDates → CustomerId | Text Value Filter | This is an element to filter the results by Customer ID. If this is not provided, preferences for all the Customers will be returned. The core:id of the TextValueFilter should be equal to 'CustomerNumber'. |
getCustomerKeyDatesResponse → CustomerKeyDates → details | String | The event details that have been saved for the customer. |
getCustomerKeyDatesResponse → CustomerKeyDates → generateReminder | Boolean | Defaults to False. If true, a reminder will be generated for that particular date. |
getCustomerKeyDatesResponse → CustomerKeyDates → generateReminder | Not applicable to CRM POS Functions. | |
getCustomerKeyDatesResponse → CustomerKeyDates → generateReminder → recurrenceType | Not applicable to CRM POS Functions. | |
getCustomerKeyDatesResponse → CustomerKeyDates → generateReminder → startDate | Not applicable to CRM POS Functions. | |
getCustomerKeyDatesResponse → CustomerKeyDates → keyDateId | Not applicable to CRM POS Functions. | |
getCustomerKeyDatesResponse → CustomerKeyDates → CustomerKeyDateTypeId | Not applicable to CRM POS Functions. | |
getCustomerKeyDatesResponse → CustomerKeyDates → lastUpdated | Datetime | Not applicable to CRM POS Functions. |
getCustomerKeyDatesResponse → CustomerKeyDates → createdBy | Not applicable to CRM POS Functions. | |
getCustomerKeyDatesResponse → CustomerKeyDates → creationDate | Not applicable to CRM POS Functions. | |
getCustomerKeyDatesResponse → CustomerKeyDates → amendedBy | Not applicable to CRM POS Functions. |
Request & Response Examples
Request
Request to get customer preferences of the customer with the customer number 100:
Request
POST: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/pos/keyDates/search
Body: {
"criteria" : {
"customerNumber" : {
"id" : "CustomerNumber",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "EQUALS",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"defaultValue" : "100",
"valueRequired" : false,
"supportValues" : [ {
"value" : "100"
} ]
},
"suppressDefaultOrderBy" : false,
"maxRows" : 0,
"distinct" : false
}
}
Response
Following is an example response for Get Customer Key Dates request:
Response
Body: {
"customerKeyDates" : [ {
"customerId" : {
"id" : "100"
},
"generateReminder" : false,
"keyDate" : {
"recurrenceType" : "ANNUALLY",
"startDate" : 1730851200000
},
"keyDateId" : "2d03:669b8740391:569fd927:1cec0394c2165ae8",
"customerKeyDateTypeId" : {
"id" : "ANNIVERSARY"
},
"lastUpdated" : 1730968502000,
"createdBy" : "000101",
"creationDate" : 1730968278000,
"amendedBy" : "HJAWAHIR",
"amendmentDate" : 1730968496000
}, {
"customerId" : {
"id" : "100"
},
"details" : "Birthday",
"generateReminder" : false,
"keyDate" : {
"recurrenceType" : "NONE",
"startDate" : 1733509800000
},
"keyDateId" : "50d3:e50ffc99391:aa7e32a2-:72b4909a0a1f79e3",
"customerKeyDateTypeId" : { },
"lastUpdated" : 1734502526000,
"createdBy" : "000101",
"creationDate" : 1734502520000,
"amendedBy" : "000101"
} ]
}
Save Customer Key Date
This operation can be used to retrieve the dates of special occasions that have been recorded for a Customer.
Request
Request Service URL
POST /customers/pos/keyDates
Request Tokens
There are no request tokens.
Request Parameters
There are no request parameters.
Request Body
Element | Mandatory / Optional | Type | Description |
---|---|---|---|
customerKeyDate | Optional | Complex Type | Object containing the customer key date details. |
user | Optional | Complex Type | Contains the details of the user creating the customer key dates. |
locale | Optional | Complex Type | Object containing the locale related details of the key dates. |
Response
Response Headers
There are no response headers.
Response Body
The body will be empty if the request is a success.
Request & Response Examples
Request
Request to save key date of the customer with the customer number 100:
Request
POST: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/pos/keyDates/search
Body: {
"customerKeyDate" : {
"customerId" : {
"id" : "100"
},
"details" : "Birthday",
"generateReminder" : false,
"keyDate" : {
"recurrenceType" : "ANNUALLY",
"startDate" : 1734460200000
},
"customerKeyDateTypeId" : { },
"createdBy" : "000101",
"creationDate" : 1734504233179,
"amendedBy" : "000101"
},
"user" : {
"dateTimeActivated" : 1621279842000,
"displayName" : "Hertford Manager..",
"password" : "lNBrhb6ALqsxA3DWMAe/zgW5cy6o+8TEXeU2oY2G0rQ=lQ4KSvqYhYk=",
"shortId" : "00010100",
"userId" : "000101",
"accessTimePeriods" : [ {
"timePeriod" : {
"dayOfWeek" : 1
}
}, {
"timePeriod" : {
"dayOfWeek" : 2
}
}, {
"timePeriod" : {
"dayOfWeek" : 3
}
}, {
"timePeriod" : {
"dayOfWeek" : 4
}
}, {
"timePeriod" : {
"dayOfWeek" : 5
}
}, {
"timePeriod" : {
"dayOfWeek" : 6
}
}, {
"timePeriod" : {
"dayOfWeek" : 7
}
} ],
"lastUpdated" : 1733464456896,
"templateKey" : {
"id" : "STORE_MANAGER_UK"
},
"isTemplate" : false,
"disallowMultiLocationSignOn" : false,
"cardSignOnOnly" : false,
"skipPasswordIfCard" : true,
"inactivityDelay" : 500,
"maintenanceInactivityDelay" : 1000,
"localeId" : {
"country" : "GB",
"id" : "en"
},
"locationId" : {
"id" : "0001"
},
"forceChangePassword" : false,
"strongPassword" : false,
"forceAlphaNumericPassword" : false,
"forceMixedCasePassword" : false,
"minimumPasswordLength" : 1,
"maximumPasswordLength" : 8,
"roleId" : [ {
"roleId" : "POS_CASH_MAN",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "SALES_ASSISTANT",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "LOYALTY",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "RETURNS",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "CRM-POS",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "ASSIST_MANAGER",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "CENTRAL_INVENTORY",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "GIFTCARD",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "STORE_INVENTORY",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "TAX_REFUND",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "MANAGER",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
} ],
"trainingMode" : false,
"address" : {
"countryCodeId" : { },
"typeId" : { },
"isTemplate" : false
},
"userName" : {
"surname" : "Hertford Manager",
"forename" : "000101",
"initials" : "JS",
"dateOfBirth" : 1584057600000
},
"teamId" : {
"id" : "TEAM"
},
"disallowLockingMultiplePos" : false,
"preventPasswordSimilarToUserId" : false,
"emailAddress" : "enactor.test@gmail.com",
"emailAccountName" : "enactor.test@gmail.com",
"emailEncryptedPassword" : "smG+rsrfBuKrdaJPv30rhg=="
},
"locale" : {
"language" : "en",
"country" : "GB",
"description" : "English (UK)",
"lastUpdated" : 1727775153703
}
}
Response
Response to save key date of the customer with the customer number 100:
The body will be empty if the request is a success.
Customer Transaction History Search
This request is used to search for completed transactions for a specific Customer.
Request
Request Service URL
GET /customers/transactions
Request Tokens
There are no request tokens.
Request Parameters
There are no request parameters.
Request Body
There is no request body. The customer ID is passed as the subject header.
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
retail:CustomerTransactionSearchResponse | Complex Type | The root request element. |
retail:CustomerTransactionList | Complex Type | Contains the transaction list according to the search criteria. |
retail:CustomerTransactionList → currentPage | int | The page currently returned in case of pagination. |
retail:CustomerTransactionList → pageSize | int | Number of items returned per page. |
retail:CustomerTransactionList → totalPages | int | Total number of pages available. |
retail:CustomerTransactionList → totalRows | int | Total number of rows available. |
retail:CustomerTransactionList → elements | Complex Type | Contains the transaction information list according to the search criteria. |
retail:CustomerTransactionList → elements → elements | Complex Type | A single element returned from the search with details of a found Customer transaction. |
retail:CustomerTransactionList → elements → elements → CustomerNumber | long | The Customer number of the Customer transaction found. |
retail:CustomerTransactionList → elements → elements → applicationId | String | The associated application type which the transaction was started with. |
retail:CustomerTransactionList → elements → elements → transactionId | String | The Transaction ID number details. |
retail:CustomerTransactionList → elements → elements → transactionTypeId | String | The Processed Transaction type which can be Sales or Order. |
retail:CustomerTransactionList → elements → elements → locationId | String | The location ID which the transaction took place. |
retail:CustomerTransactionList → elements → elements → transactionDate | DateTime | Transaction date when the transaction was recorded. |
retail:CustomerTransactionList → elements → elements → value | string | Transaction value of the transaction that was recorded. |
retail:CustomerTransactionList → elements → elements → description | string | Transaction description of the transaction that was recorded. |
retail:CustomerTransactionList → elements → elements → loyaltyPoints | string | The loyalty points earned when the transaction completed. |
retail:CustomerTransactionList → elements → elements → locationDescription | Not applicable to CRM POS Functions. |
Request & Response Examples
Request
Request for customer transaction history:
GET: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/transactions
Response
Following is an example response for Customer Transaction History Search request:
Response
Body: {
"customerTransactionList" : [ {
"customerNumber" : "100",
"applicationId" : "POS",
"transactionId" : "00050796000742412171527115",
"transactionTypeId" : "Sale",
"locationId" : "0005",
"transactionDate" : 1734449315000,
"value" : 58333,
"description" : "Televisions",
"loyaltyPoints" : 0
}, {
"customerNumber" : "100",
"applicationId" : "POS",
"transactionId" : "00010013001422412171352460",
"transactionTypeId" : "Sale",
"locationId" : "0001",
"transactionDate" : 1734443611000,
"value" : 29330,
"description" : "Drones",
"loyaltyPoints" : 586
}, {
"customerNumber" : "100",
"applicationId" : "POS",
"transactionId" : "00010013001342412161043340",
"transactionTypeId" : "Refund",
"locationId" : "0001",
"transactionDate" : 1734346340000,
"value" : -41900,
"description" : "Drones",
"loyaltyPoints" : 0
} ]
}
Customer Transaction History Enquiry
This operation is used to retrieve the details of a completed transaction for a Customer.
Request
Request Service URL
GET /customers/transactions/{transactionId}
Request Tokens
- transactionId – Transaction that is to be retrieved.
Request Parameters
There are no request parameters.
Request Body
There is no request body. The customer ID is passed as the subject header.
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
CustomerTransactionDetailsList → lineNumber | Complex Type | The line item which was included in the transaction. |
CustomerTransactionDetailsList → quantity | String | Total quantity value of the items in the transaction. |
CustomerTransactionDetailsList → effectiveNetValue | String | The effective net value of the items in the transaction. |
CustomerTransactionDetailsList → salesPerson | String | The ID of the Salesperson who completed the transaction. |
CustomerTransactionDetailsList → productId | String | The product ID which has been added in the transaction. |
CustomerTransactionDetailsList → description | String | The product description which has been added in the transaction. |
CustomerTransactionDetailsList → loyaltyPoints | String | The Loyalty points value earned in the transaction. |
CustomerTransactionDetailsList → criteria | Complex Type | |
CustomerTransactionDetailsList → criteria → distinct | boolean | Whether to list distinct Customers or not. |
CustomerTransactionDetailsList → criteria → maxRows | int | Maximum number of items to return. |
CustomerTransactionDetailsList → criteria → suppressDefaultOrderBy | boolean | Whether to override the default ordering. |
CustomerTransactionDetailsList → criteria → transactionId | String | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → transactionId → id | boolean | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → transactionId → forceApplicable | boolean | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → transactionId → orColumns | boolean | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → transactionId → comparisonOperator | String | The operator used to compare the fields. Possible values: EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN_OR_EQUALS, STARTS_WITH, CONTAINS, IN, NOT_IN |
CustomerTransactionDetailsList → criteria → transactionId → orNull | boolean | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → transactionId → width | int (Max length - 20) | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → transactionId → useValueForAllProperties | boolean | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → transactionId → caseInsensitive | boolean | Whether the comparisons should be case insensitive. Default is false. |
CustomerTransactionDetailsList → criteria → transactionId → submitOnChange | boolean | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → transactionId → disabled | boolean | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → transactionId → hidden | boolean | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → transactionId → fuzzyLevel | int (Max length - 4) | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → transactionId → customQueryFilter | boolean | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → transactionId → defaultValue | Object | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → transactionId → supportValues | Complex Type | The values to be passed in for comparison. |
CustomerTransactionDetailsList → criteria → transactionId → supportValues → Values | int (Max length - 20) | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → type | Not applicable to CRM POS Functions. | |
CustomerTransactionDetailsList → criteria → type → id | Not applicable to CRM POS Functions. | |
CustomerTransactionDetailsList → criteria → type → forceApplicable | boolean | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → type → orColumns | boolean | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → type → comparisonOperator | String | The operator used to compare the fields. Possible values: EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN_OR_EQUALS, STARTS_WITH, CONTAINS, IN, NOT_IN |
CustomerTransactionDetailsList → criteria → type → orNull | boolean | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → type → width | int (Max length - 20) | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → type → useValueForAllProperties | boolean | Not applicable to CRM POS Functions. |
CustomerTransactionDetailsList → criteria → type → caseInsensitive | boolean | Whether the comparisons should be case insensitive. Default is false. |
CustomerTransactionDetailsList → criteria → type → submitOnChange | boolean | |
CustomerTransactionDetailsList → criteria → type → disabled | boolean | |
CustomerTransactionDetailsList → criteria → type → hidden | boolean | |
CustomerTransactionDetailsList → criteria → type → fuzzyLevel | int (Max length - 4) | |
CustomerTransactionDetailsList → criteria → type → customQueryFilter | boolean | |
CustomerTransactionDetailsList → criteria → type → supportValues | Complex Type | The values to be passed in for comparison. |
CustomerTransactionDetailsList → criteria → type → supportValues → value | ||
CustomerTransactionDetailsList → criteria → type → valueRequired | boolean |
Request & Response Examples
Request
Request for customer transaction enquiry:
GET: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/transactions/00030106000932410101645319
Response
Following is an example response for Customer Transaction History Enquiry request:
Response
Body: {
"customerTransactionDetailsList" : [ {
"lineNumber" : "1",
"quantity" : 1.0,
"effectiveNetValue" : 29900,
"salesPerson" : "000101",
"productId" : "500100",
"description" : "JVC LT-40CA890 Android TV 40\"",
"loyaltyPoints" : 299
}, {
"lineNumber" : "2",
"quantity" : 0.0,
"effectiveNetValue" : -29900,
"salesPerson" : "000101",
"description" : "Cash",
"loyaltyPoints" : 0
} ],
"criteria" : {
"transactionId" : {
"id" : "TransactionId",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "EQUALS",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ {
"value" : "00030106000932410101645319"
} ]
},
"type" : {
"id" : "Type",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "EQUALS",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false,
"supportValues" : [ { } ]
},
"maxRows" : 0,
"suppressDefaultOrderBy" : false,
"distinct" : false
}
}
Save Contact History
This operation can save contact records for a Customer.
Request Service URL
POST /customers/contactHistory
Request Tokens
There are no request tokens.
Request Parameters
There are no request parameters.
Request Body
Element | Mandatory / Optional | Type | Description |
---|---|---|---|
saveContactHistory → CustomerContactHistory | Optional | Complex Type | Contains the contact history details for the customer. |
saveContactHistory → CustomerContactHistory → contactDate | Optional | DateTime | The date of the contact history. |
saveContactHistory → CustomerContactHistory → reasonId | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → CustomerContactHistory → deviceId | Optional | String | Not applicable to CRM POS Functions. |
saveContactHistory → CustomerContactHistory → locationId | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → CustomerContactHistory → subject | Optional | String | The subject details of the contact history details. |
saveContactHistory → CustomerContactHistory → CustomerContactTypeId | Optional | String | Dropdown of the customer contact types configured. Default is Appointment. Values: Appointment, Complaint, General, Pre-Sale, Sale |
saveContactHistory → CustomerContactHistory → CustomerId | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → CustomerContactHistory → description | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → CustomerContactHistory → userId | Optional | String | Not applicable to CRM POS Functions. |
saveContactHistory → user | Mandatory | Not applicable to CRM POS Functions. | |
saveContactHistory → user → dateTimeActivated | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → cardSignOnOnly | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → skipPasswordIfCard | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → displayName | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → employeeId | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → locationId | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → password | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → passwordLastChanged | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → forceChangePassword | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → strongPassword | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → previousPasswords | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → shortId | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → address | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → address → countryCodeId | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → address → typeId | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → address → isTemplate | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → userId | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → userName | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → userName → surname | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → userName → forename | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → userName → initials | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → timePeriod | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → timePeriod → dayOfWeek | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → singleSignOnUserId | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → singleSignOnCommonName | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → lastUpdated | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → fiscalUserReference | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → templateKey | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → isTemplate | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → associatedLocationRestrictions | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → emailAccountName | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → emailAddress | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → user → emailEncryptedPassword | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → userLocale | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → userLocale → language | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → userLocale → country | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → userLocale → variant | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → userLocale → description | Optional | Not applicable to CRM POS Functions. | |
saveContactHistory → userLocale → lastUpdated | Optional | Not applicable to CRM POS Functions. |
Response
Response Headers
There are no response headers.
Response Body
Element | Type | Description |
---|---|---|
saveContactHistoryResponse → CustomerContactHistory | Complex Type | Contains the Contact History Details. |
saveContactHistoryResponse → CustomerContactHistory → contactDate | DateTime | The date and the time that the contact history details were recorded. |
saveContactHistoryResponse → CustomerContactHistory → reasonId | Not applicable to CRM POS Functions. | |
saveContactHistoryResponse → CustomerContactHistory → reasonId → reasonId | Not applicable to CRM POS Functions. | |
saveContactHistoryResponse → CustomerContactHistory → reasonId → regionId | Not applicable to CRM POS Functions. | |
saveContactHistoryResponse → CustomerContactHistory → deviceId | Not applicable to CRM POS Functions. | |
saveContactHistoryResponse → CustomerContactHistory → locationId | Not applicable to CRM POS Functions. | |
saveContactHistoryResponse → CustomerContactHistory → subject | String | The Subject details of the contact history. |
saveContactHistoryResponse → CustomerContactHistory → contactHistoryId | Not applicable to CRM POS Functions. | |
saveContactHistoryResponse → CustomerContactHistory → CustomerContactTypeId | String | The Contact type that is recorded. |
saveContactHistoryResponse → CustomerContactHistory → CustomerId | Not applicable to CRM POS Functions. | |
saveContactHistoryResponse → CustomerContactHistory → description | Not applicable to CRM POS Functions. | |
saveContactHistoryResponse → CustomerContactHistory → lastUpdated | Not applicable to CRM POS Functions. | |
saveContactHistoryResponse → CustomerContactHistory → userId | Not applicable to CRM POS Functions. | |
saveContactHistoryResponse → errorMessage → fieldErrors | Not applicable to CRM POS Functions. | |
saveContactHistoryResponse → errorMessage → fieldErrorsWithContext | Not applicable to CRM POS Functions. | |
saveContactHistoryResponse → errorMessage → pageErrors | Not applicable to CRM POS Functions. |
Request & Response Examples
Request
Request for save contact history:
Request
POST: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/customers/contactHistory
Body: {
"customerContactHistory" : {
"contactDate" : 1734507240231,
"reasonId" : {
"regionId" : {
"groupTypeId" : "region"
}
},
"deviceId" : {
"id" : "pos9@0005.enactor"
},
"locationId" : { },
"subject" : "Meeting",
"customerContactTypeId" : {
"contactTypeId" : "PHONE_C_APPOINT",
"id" : "PHONE_C_APPOINT"
},
"customerId" : {
"id" : "100"
},
"description" : "Discussion on TVs.",
"userId" : {
"id" : "000101"
}
},
"user" : {
"dateTimeActivated" : 1621279842000,
"displayName" : "Hertford Manager..",
"password" : "lNBrhb6ALqsxA3DWMAe/zgW5cy6o+8TEXeU2oY2G0rQ=lQ4KSvqYhYk=",
"shortId" : "00010100",
"userId" : "000101",
"accessTimePeriods" : [ {
"timePeriod" : {
"dayOfWeek" : 1
}
}, {
"timePeriod" : {
"dayOfWeek" : 2
}
}, {
"timePeriod" : {
"dayOfWeek" : 3
}
}, {
"timePeriod" : {
"dayOfWeek" : 4
}
}, {
"timePeriod" : {
"dayOfWeek" : 5
}
}, {
"timePeriod" : {
"dayOfWeek" : 6
}
}, {
"timePeriod" : {
"dayOfWeek" : 7
}
} ],
"lastUpdated" : 1733464456896,
"templateKey" : {
"id" : "STORE_MANAGER_UK"
},
"isTemplate" : false,
"disallowMultiLocationSignOn" : false,
"cardSignOnOnly" : false,
"skipPasswordIfCard" : true,
"inactivityDelay" : 500,
"maintenanceInactivityDelay" : 1000,
"localeId" : {
"country" : "GB",
"id" : "en"
},
"locationId" : {
"id" : "0001"
},
"forceChangePassword" : false,
"strongPassword" : false,
"forceAlphaNumericPassword" : false,
"forceMixedCasePassword" : false,
"minimumPasswordLength" : 1,
"maximumPasswordLength" : 8,
"roleId" : [ {
"roleId" : "POS_CASH_MAN",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "SALES_ASSISTANT",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "LOYALTY",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "RETURNS",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "CRM-POS",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "ASSIST_MANAGER",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "CENTRAL_INVENTORY",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "GIFTCARD",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "STORE_INVENTORY",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "TAX_REFUND",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
}, {
"roleId" : "MANAGER",
"regionId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "All",
"id" : "All"
}
} ],
"trainingMode" : false,
"address" : {
"countryCodeId" : { },
"typeId" : { },
"isTemplate" : false
},
"userName" : {
"surname" : "Hertford Manager",
"forename" : "000101",
"initials" : "JS",
"dateOfBirth" : 1584057600000
},
"teamId" : {
"id" : "TEAM"
},
"disallowLockingMultiplePos" : false,
"preventPasswordSimilarToUserId" : false,
"emailAddress" : "enactor.test@gmail.com",
"emailAccountName" : "enactor.test@gmail.com",
"emailEncryptedPassword" : "smG+rsrfBuKrdaJPv30rhg=="
},
"userLocale" : {
"language" : "en",
"country" : "GB",
"description" : "English (UK)",
"lastUpdated" : 1727775153703
}
}
Response
Following is an example response for Save Contact History request:
Response
Body: {
"customerContactHistory" : {
"contactDate" : 1734507240231,
"reasonId" : {
"regionId" : {
"groupTypeId" : "region"
}
},
"deviceId" : {
"id" : "pos9@0005.enactor"
},
"locationId" : { },
"subject" : "Meeting",
"contactHistoryId" : "5271:4b85c97d391:6220d735-:c5e90fac83025722",
"customerContactTypeId" : {
"contactTypeId" : "PHONE_C_APPOINT",
"id" : "PHONE_C_APPOINT"
},
"customerId" : {
"id" : "100"
},
"description" : "Discussion on TVs.",
"lastUpdated" : 1734507471652,
"userId" : {
"id" : "000101"
}
}
}