Skip to main content

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

ElementMandatory / OptionalTypeDescription
searchCustomersMandatoryComplex TypeThe root request element.
forenameOptionalText Value FilterA filter for 'Forename'.
surnameOptionalText Value FilterA filter for 'Surname'.
addressOptionalText Value FilterA filter for 'Address'.
postcodeOptionalText Value FilterA filter for 'PostCode'.
emailOptionalText Value FilterA filter for 'Email'.
phoneOptionalText Value FilterA filter for 'Phone'.
panOrReversePanOptionalText Value FilterA filter for 'Loyalty Number'.
distinctOptionalbooleanWhether to list distinct Customers or not.
maxRowsOptionalintMaximum number of items to return.
orderByColumnsOptionalComplex Type (Multiple Entries)Can be used to order the results using a given column.
orderByColumns → core:propertyNameOptionalstringThe column name to order the results by.
orderByColumns → core:sortOrderOptionalstringThe sorting order 'ASCENDING' or 'DESCENDING'.
pageInfoOptionalComplex TypePage information to be provided if results are required as a paginated list.
pageInfo → core:rowOffsetOptionalintThe row offset required of the pagination.
pageInfo → core:rowCountOptionalintThe row count required of the pagination.
suppressDefaultOrderByOptionalbooleanWhether 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.

ElementTypeDescription
customersListComplex TypeA single element returned from the search with details of customers matching the search criteria.
customerNumberlongThe customer number of the customer.
customerTitlestringThe title of the customer.
customerForenamestringThe first name of the customer.
customerSurnamestringThe surname of the customer.
addressStreet1stringThe street address of the customer.
addressStreet2stringThe line 2 of the Street Address of the customer.
addressStreet3stringThe line 3 of the Street Address of the customer.
addressTownstringThe town name of the customer’s address.
addressProvincestringThe province name of the customer’s address.
addressPostCodestringThe postcode of the customer’s address.
privacyLevelintThe customer's privacy level.
phoneNumberstringThe phone number of the customer.
emailAddressstringThe 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

ElementTypeDescription
customerComplex TypeObject that contains the customer’s details.
addressesComplex TypeObject that contains all the addresses of the requested customer.
contactableboolenIf set to true customer is contactable.
noChildrenIntNumber of children of the requested customer.
customerNumberStringThe unique number of the requested customer.
emailAddressesComplex TypeObject that contains all the email addresses of the requested customer.
phoneNumbersComplex TypeObject that contains all the phone numbers of the requested customer.
customerNameComplex TypeObject that contains all the customer’s name details of the requested customer.
employeeKeyComplex TypeObject that contains all the employee related details of the requested customer.
lastUpdatedDateTimeThe last updated date and time of the requested customer.
customerTypeComplex TypeObject that contains all the customer type related details of the requested customer.
createdByComplex TypeObject that contains the created by user’s details of the requested customer.
createdAtComplex TypeObject that contains the created at user’s details of the requested customer.
statusStringThe 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

ElementTypeDescription
contactMethodListComplex TypeList of selected Contact Methods.
contactMethodList → descriptionStringThe description of the contact methods. Usually, the values will be:
- Email
- In Store
- Letter
- Phone
contactMethodList → typeStringThe contact type of the communication preferences. Default is set to 'METHOD'.
contactMethodList → contactTypeIdStringThis is set according to the preference details:
- METHOD_EMAIL
- METHOD_IN_STORE
- METHOD_LETTER
- METHOD_PHONE
CustomerCustomerGroupListComplex TypeDetails of the customer group that the customer is associated to.
customerLoyaltyDetailResponseComplex TypeDetails of the loyalty details of the customer who has been retrieved.
customerLoyaltyDetailResponse → accountIdStringThe customer’s Loyalty Account details.
customerLoyaltyDetailResponse → customerNumberLongThe customer number of the customer found.
customerLoyaltyDetailResponse → lastTransactionDateDateTimeThe date of the last transaction that contained the customer loyalty account.
customerLoyaltyDetailResponse → lastTransactionDescStringThe description of the last transaction that contained the customer loyalty account.
customerLoyaltyDetailResponse → lastTransactionValueStringThe value of the last transaction that contained the customer loyalty account.
customerLoyaltyDetailResponse → rewardNumberStringThe loyalty card number of the selected customer.
customerLoyaltyDetailResponse → accountStatusIdStringThe Loyalty account status ID of the selected customer. Default values:
- Active
- New
- Suspended
- Closed
Setting this value is not a POS functionality.
customerLoyaltyDetailResponse → accountStatusDescStringThe 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 → rewardTierStringThe 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 → rewardTierDescStringThe 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 → redemptionBalanceIntThe redemption balance amount of the loyalty customer.
customerLoyaltyDetailResponse → loyaltySchemeIdStringThe Loyalty Scheme ID will be displayed. Based on loyalty schema selection during customer creation. Not a POS CRM function; only displays created details.
customerLoyaltyDetailResponse → loyaltySchemeDescStringThe Loyalty Scheme Description will be displayed. Based on loyalty tier selection during customer creation. Not a POS CRM function; only displays created details.
latestContactComplex TypeNot applicable to CRM POS Functions.
latestContact → contactDateDateTimeNot applicable to CRM POS Functions.
latestContact → referenceIdStringNot applicable to CRM POS Functions.
latestContact → referenceTypeStringNot applicable to CRM POS Functions.
latestContact → reasonIdStringNot applicable to CRM POS Functions.
latestContact → reasonId → reasonIdStringNot applicable to CRM POS Functions.
latestContact → reasonId → regionIdStringNot applicable to CRM POS Functions.
latestContact → deviceIdStringNot applicable to CRM POS Functions.
latestContact → locationIdStringNot applicable to CRM POS Functions.
latestContact → subjectStringNot applicable to CRM POS Functions.
latestContact → contactHistoryIdStringNot applicable to CRM POS Functions.
latestContact → customerContactTypeIdStringNot applicable to CRM POS Functions.
latestContact → customerIdStringNot applicable to CRM POS Functions.
latestContact → descriptionStringNot applicable to CRM POS Functions.
latestContact → lastUpdatedStringNot applicable to CRM POS Functions.
latestContact → userIdStringNot 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

ElementTypeDescription
CustomerNumberLongThe Customer number of the Customer found.
CustomerRelationshipEntryComplex TypeA complex element with the Customer relationship details.
CustomerRelationshipEntry → relatedCustomerNumberStringThe Customer number of the related Customer.
CustomerRelationshipEntry → relatedCustomerTitleStringThe title of the related Customer.
CustomerRelationshipEntry → relatedCustomerForenameStringThe first name of the related Customer.
CustomerRelationshipEntry → relatedCustomerSurnameStringThe surname of the related Customer.
CustomerRelationshipEntry → relationshipTypeIdStringType of the relationship to the Customer, which will be one of the following:
- Child
- Marriage
- Parent
- Sibling
CustomerRelationshipEntry → relationshipIdNot 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

ElementMandatory / OptionalTypeDescription
userComplex TypeContains user entity details of the requesting user.
entityComplex TypeContains address, customerId, name, related customer, relationshipId and relationshipTypeId details of the new entity to be saved as the new relationship.
entity → addressComplex TypeSet of addresses of the Customer.
entity → customerIdComplex TypeContains the ID of the customer.
entity → nameComplex TypeContains customer name related details.
entity → relatedCustomerKeyComplex TypeContains the ID of the related customer whose relationship is to be changed.
entity → relationshipIdStringNot applicable to CRM POS Functions.
entity → relationshipTypeIdComplex TypeType of the relationship to the Customer, which will be one of the following:
- Child
- Marriage
- Parent
- Sibling
noPopN/ANot applicable to CRM POS Functions.
deviceKeyN/ANot applicable to CRM POS Functions.
locationKeyN/ANot applicable to CRM POS Functions.
lacaleN/ANot applicable to CRM POS Functions.
lacale → languageN/ANot applicable to CRM POS Functions.
lacale → countryN/ANot applicable to CRM POS Functions.
lacale → variantN/ANot applicable to CRM POS Functions.
lacale → descriptionN/ANot applicable to CRM POS Functions.
lacale → lastUpdatedN/ANot applicable to CRM POS Functions.
isNewRelationshipBooleanFalse if this is an update of an existing relationship, else true for a new relationship.
updateTimeDateTimeTime that the relationship is saved.
oldEntityComplex TypeContains address, customerId, name, related customer, relationshipId and relationshipTypeId details of the old entity before saving new relationship.
oldEntity → addressComplex TypeSet of addresses of the Customer.
oldEntity → customerIdComplex TypeContains the ID of the customer.
oldEntity → nameComplex TypeContains customer name related details.
oldEntity → relatedCustomerKeyComplex TypeContains the ID of the related customer whose relationship is to be changed.
oldEntity → relationshipIdStringNot applicable to CRM POS Functions.
oldEntity → relationshipTypeIdComplex TypeType 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

ElementTypeDescription
entityComplex TypeContains address, customerId, name, related customer, relationshipId and relationshipTypeId details of the new entity saved as the new relationship.
entity → addressComplex TypeSet of addresses of the Customer.
entity → customerIdComplex TypeContains the ID of the customer.
entity → lastUpdatedDateTimeDate time that the relationship is saved.
entity → nameComplex TypeContains customer name related details.
entity → relatedCustomerKeyComplex TypeContains the ID of the related customer whose relationship is to be changed.
entity → relationshipIdStringNot applicable to CRM POS Functions.
entity → relationshipTypeIdComplex TypeType 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

ElementMandatory / OptionalTypeDescription
userKeyMandatoryComplex TypeContains the ID of the POS user.
criteriaOptionalComplex TypeContains filter criteria options.
criteria → suppressDefaultOrderByOptionalbooleanWhether to override the default ordering.
criteria → maxRowsOptionalintMaximum number of rows to return.
criteria → distinctOptionalbooleanWhether to return only the distinct values.

Response

Response Headers

There are no response headers.

Response Body

ElementTypeDescription
listComplex TypeProvides a list of the customers affiliated with the requested user.
propertyNamesComplex TypeThe 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

ElementMandatory / OptionalTypeDescription
criteriaOptionalComplex TypeContains the filter criteria of forename, surname, and email address.
criteria → foreNameOptionalComplex TypeContains forename related search properties.
criteria → surNameOptionalComplex TypeContains surname related search properties.
criteria → emailAddressOptionalComplex TypeContains email address related search properties.
idOptionalStringNot applicable to CRM POS Functions.
forceApplicableOptionalbooleanNot applicable to CRM POS Functions.
orColumnsOptionalbooleanNot applicable to CRM POS Functions.
comparisonOperatorOptionalStringThe 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
orNullOptionalbooleanNot applicable to CRM POS Functions.
widthOptionalIntNot applicable to CRM POS Functions. (Max length - 20)
useValueForAllPropertiesOptionalbooleanNot applicable to CRM POS Functions.
caseInsensitiveOptionalbooleanNot applicable to CRM POS Functions.
submitOnChangeOptionalbooleanNot applicable to CRM POS Functions.
disabledOptionalbooleanNot applicable to CRM POS Functions.
hiddenOptionalbooleanNot applicable to CRM POS Functions.
fuzzyLevelOptionalIntNot applicable to CRM POS Functions. (Max length - 4)
customQueryFilterOptionalbooleanNot applicable to CRM POS Functions.
defaultValueOptionalObjectNot applicable to CRM POS Functions.
supportValuesOptionalComplex TypeThe values to be passed in for comparison.
criteria → suppressDefaultOrderByOptionalbooleanWhether to override the default ordering.
criteria → maxRowsOptionalintMaximum number of rows to return.
criteria → distinctOptionalbooleanWhether to return only the distinct values.

Response

Response Headers

There are no response headers.

Response Body

ElementTypeDescription
addressBookItemListComplex TypeList of address book item results as requested.
addressBookItemList → entryIdStringUnique of the address book entry.
addressBookItemList → forenameStringForename of the address book entry.
addressBookItemList → surnameStringSurname of the address book entry.
addressBookItemList → emailAddressStringEmail 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"
} ]
}

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

ElementMandatory / OptionalTypeDescription
contactHistorySearchMandatoryComplex TypeThe root request element.
contactHistorySearch → criteriaOptionalComplex TypeThe search criteria used in the request.
contactHistorySearch → criteria → distinctOptionalbooleanWhether to return only the distinct values.
contactHistorySearch → criteria → maxRowsOptionalintMaximum number of rows to return.
contactHistorySearch → criteria → pageInfoOptionalComplex TypePage information to be provided if results are required as a paginated list.
contactHistorySearch → criteria → pageInfo → rowOffsetOptionalintThe row offset required of the pagination.
contactHistorySearch → criteria → pageInfo → rowCountOptionalintThe row count required of the pagination.
contactHistorySearch → criteria → pageInfo → totalRowCountLimitOptionalintThe row limit count required per page.
contactHistorySearch → criteria → suppressDefaultOrderByOptionalbooleanWhether to override the default ordering.
contactHistorySearch → criteria → CustomerNumberOptionallongThe Customer number of the customer history that needs to be found.
contactHistorySearch → criteria → CustomerNumber → idOptionallongThe ID of the Customer this history belongs to.
contactHistorySearch → criteria → CustomerNumber → forceApplicableOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → CustomerNumber → orColumnsOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → CustomerNumber → comparisonOperatorOptionalStringThe 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 → orNullOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → CustomerNumber → widthOptionalInt (Max length - 20)Not applicable to CRM POS Functions.
contactHistorySearch → criteria → CustomerNumber → useValueForAllPropertiesOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → CustomerNumber → caseInsensitiveOptionalbooleanWhether the comparisons should be case insensitive. Default is false.
contactHistorySearch → criteria → CustomerNumber → submitOnChangeOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → CustomerNumber → disabledOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → CustomerNumber → hiddenOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → CustomerNumber → fuzzyLevelOptionalInt (Max length - 4)Not applicable to CRM POS Functions.
contactHistorySearch → criteria → CustomerNumber → customQueryFilterOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → CustomerNumber → defaultValueOptionalObjectNot applicable to CRM POS Functions.
contactHistorySearch → criteria → CustomerNumber → supportValuesOptionalComplex TypeThe values to be passed in for comparison.
contactHistorySearch → criteria → CustomerNumber → valueRequiredOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → userIdOptionalstringThe user ID of the user who is requesting the Customer history.
contactHistorySearch → criteria → userId → idOptionalStringNot applicable to CRM POS Functions.
contactHistorySearch → criteria → userId → forceApplicableOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → userId → orColumnsOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → userId → comparisonOperatorOptionalStringThe 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 → orNullOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → userId → widthOptionalInt (Max length - 20)Not applicable to CRM POS Functions.
contactHistorySearch → criteria → userId → useValueForAllPropertiesOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → userId → caseInsensitiveOptionalbooleanWhether the comparisons should be case insensitive. Default is false.
contactHistorySearch → criteria → userId → submitOnChangeOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → userId → disabledOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → userId → hiddenOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → userId → fuzzyLevelOptionalInt (Max length - 4)Not applicable to CRM POS Functions.
contactHistorySearch → criteria → userId → customQueryFilterOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → userId → valueRequiredOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → <retail:contactTypeId xsi:type="core:TextValueFilter">OptionalNot applicable to CRM POS Functions.
contactHistorySearch → criteria → idOptionalNot applicable to CRM POS Functions.
contactHistorySearch → criteria → forceApplicableOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → orColumnsOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → comparisonOperatorOptionalStringThe 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 → orNullOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → widthOptionalInt (Max length - 20)Not applicable to CRM POS Functions.
contactHistorySearch → criteria → contactHistorySearch → criteria → useValueForAllPropertiesOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → caseInsensitiveOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → submitOnChangeOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → disabledOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → hiddenOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → fuzzyLevelOptionalInt (Max length - 4)Not applicable to CRM POS Functions.
contactHistorySearch → criteria → customQueryFilterOptionalbooleanNot applicable to CRM POS Functions.
contactHistorySearch → criteria → defaultValueOptionalObjectNot applicable to CRM POS Functions.
contactHistorySearch → criteria → supportValuesOptionalComplex TypeThe values to be passed in for comparison.
contactHistorySearch → criteria → valueRequiredOptionalbooleanNot applicable to CRM POS Functions.

Response

Response Headers

There are no response headers.

Response Body

ElementTypeDescription
contactHistorySearchResponseComplex TypeThe list details of the transaction history for the searched criteria
contactHistorySearchResponse → contactHistoryItemNot applicable to CRM POS Functions.
contactHistorySearchResponse → contactHistoryItem → contactRefNot applicable to CRM POS Functions.
contactHistorySearchResponse → contactHistoryItem → contactRefTypeNot applicable to CRM POS Functions.
contactHistorySearchResponse → contactHistoryItem → subjectNot applicable to CRM POS Functions.
contactHistorySearchResponse → contactHistoryItem → typeIdStringNot applicable to CRM POS Functions.
contactHistorySearchResponse → contactHistoryItem → contactDateDateTimeThe details of the date and time that the history belongs to.
contactHistorySearchResponse → contactHistoryItem → userIdstringThe user ID of the user who is requesting the Customer history.
contactHistorySearchResponse → contactHistoryItem → CustomerNumberlongThe Customer number the history belongs to.
contactHistorySearchResponse → contactHistoryItem → CustomerForenamestringThe first name of the Customer.
contactHistorySearchResponse → contactHistoryItem → CustomerSurnamestringThe surname of the Customer.
contactHistorySearchResponse → contactHistoryItem → CustomerContactHistoryIdN/ANot 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

ElementMandatory / OptionalTypeDescription
customerOptionalComplex TypeA complex element with the new Customer details.
customer → addressesOptionalComplex TypeSet of addresses of the Customer.
customer → dateCreatedOptionalDatetimeThe date and the time that the Customer was created.
customer → emailAddressesOptionalComplex TypeThe email address of the Customer.
customer → phoneNumbersOptionalComplex TypeThe phone number of the Customer.
customer → CustomerNameOptionalComplex TypeThe name of the Customer.
customer → CustomerName → surnameOptionalString (max length - 100)The family name of the Customer.
customer → CustomerName → forenameOptionalString (max length - 100)The first name of the Customer.
customer → CustomerName → titleOptionalString (max length - 10)The title of the Customer.
customer → employeeKeyOptionalN/ANot applicable for CRM POS Functions.
customer → CustomerTypeOptionalString (max length - 20)Not applicable to CRM POS Functions.
customer → createdByOptionalN/ANot applicable to CRM POS Functions.
customer → createdAtOptionalN/ANot applicable to CRM POS Functions.
customer → statusOptionalString (Max length - 15)Default is set to 'Captured' for the customers created using the POS.
customer → sourceOptionalStringThe ID of the Device used to create the customer.

Response

Response Headers

There are no response headers.

Response Body

ElementTypeDescription
retail: CustomerNumberStringThe 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

ElementMandatory / OptionalTypeDescription
customerOptionalComplex TypeA complex element with the new Customer details.
customer → addressesOptionalComplex TypeSet of addresses of the Customer.
customer → dateCreatedOptionalDatetimeThe date and the time that the Customer was created.
customer → emailAddressesOptionalComplex TypeThe email address of the Customer.
customer → phoneNumbersOptionalComplex TypeThe phone number of the Customer.
customer → CustomerNameOptionalComplex TypeThe name of the Customer.
customer → CustomerName → surnameOptionalString (max length - 100)The family name of the Customer.
customer → CustomerName → forenameOptionalString (max length - 100)The first name of the Customer.
customer → CustomerName → titleOptionalString (max length - 10)The title of the Customer.
customer → employeeKeyOptionalN/ANot applicable for CRM POS Functions.
customer → CustomerTypeOptionalString (max length - 20)Not applicable to CRM POS Functions.
customer → createdByOptionalN/ANot applicable to CRM POS Functions.
customer → createdAtOptionalN/ANot applicable to CRM POS Functions.
customer → statusOptionalString (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

ElementTypeDescription
retail: CustomerNumberStringThe 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

ElementMandatory / OptionalTypeDescription
getCustomerNotes → entityNameOptionalComplex TypeContains the details of Customer Notes.
getCustomerNotes → entityNamespaceOptionalN/ANot applicable for POS.
getCustomerNotes → criteriaOptionalComplex TypeThe same criteria used in the request.
getCustomerNotes → criteria → distinctOptionalbooleanWhether to return only the distinct values.
getCustomerNotes → criteria → maxRowsOptionalintMaximum rows to return.
getCustomerNotes → criteria → suppressDefaultOrderByOptionalbooleanWhether to override the default ordering.
getCustomerNotes → criteria → CustomerNumberOptionallongThe Customer number that the notes belong to.
getCustomerNotes → criteria → CustomerNumber → idOptionalCustomer ID that the notes will be saved to.
getCustomerNotes → criteria → CustomerNumber → forceApplicableOptionalbooleanNot applicable for POS.
getCustomerNotes → criteria → CustomerNumber → orColumnsOptionalbooleanNot applicable for POS.
getCustomerNotes → criteria → CustomerNumber → comparisonOperatorOptionalStringThe 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 → orNullOptionalbooleanNot applicable for POS.
getCustomerNotes → criteria → CustomerNumber → widthOptionalint (Max length - 20)Not applicable for POS.
getCustomerNotes → criteria → CustomerNumber → useValueForAllPropertiesOptionalbooleanNot applicable for POS.
getCustomerNotes → criteria → CustomerNumber → caseInsensitiveOptionalbooleanWhether the comparisons should be case insensitive. Not applicable for POS.
getCustomerNotes → criteria → CustomerNumber → submitOnChangeOptionalbooleanNot applicable for POS.
getCustomerNotes → criteria → CustomerNumber → disabledOptionalbooleanNot applicable for POS.
getCustomerNotes → criteria → CustomerNumber → hiddenOptionalbooleanNot applicable for POS.
getCustomerNotes → criteria → CustomerNumber → fuzzyLevelOptionalint (Max length - 4)Not applicable for POS.
getCustomerNotes → criteria → CustomerNumber → customQueryFilterOptionalbooleanNot applicable for POS.
getCustomerNotes → criteria → CustomerNumber → defaultValueOptionalObjectNot applicable for POS.
getCustomerNotes → criteria → CustomerNumber → supportValuesOptionalComplex TypeThe values to be passed in for comparison.
getCustomerNotes → criteria → CustomerNumber → valueRequiredOptionalbooleanNot applicable for POS.
getCustomerNotes → listNameOptionalNot applicable for POS.

Response

Response Headers

There are no response headers.

Response Body

ElementTypeDescription
getCustomerNotesResponseComplex TypeDetails of the Notes that are added in the preference screen.
getCustomerNotesResponse → listComplex TypeDetails of the Notes that are added in the preference screen.
getCustomerNotesResponse → list → userIdstringThe user ID of the user who is updating this preference.
getCustomerNotesResponse → list → CustomerIdlongThe Customer ID the preference belongs to.
getCustomerNotesResponse → list → noteDateDateTimeThe date and time that the Note is created.
getCustomerNotesResponse → list → lastUpdatedDateTimeThe last updated time of the customer communication preference.
getCustomerNotesResponse → list → noteIdStringNote ID for identification purposes. Not applicable to CRM POS Functions.
getCustomerNotesResponse → list → notesStringContains the details of the Customer Notes.
getCustomerNotesResponse → criteriaComplex TypeThe search criteria used in the request.
getCustomerNotesResponse → criteria → distinctbooleanWhether to return only the distinct values.
getCustomerNotesResponse → criteria → maxRowsintMaximum number of rows to return.
getCustomerNotesResponse → criteria → suppressDefaultOrderBybooleanWhether 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

ElementMandatory / OptionalTypeDescription
customerNoteMandatoryComplex TypeContains the details of the Customer Note.
customerNote → userIdOptionalComplex TypeContains the ID of the user saving the customer note.
customerNote → customerIdOptionalComplex TypeContains the ID of the customer for whom the customer note is being saved.
customerNote → isPrivateOptionalbooleanWhether to have this note private or not.
customerNote → noteDateOptionalDateTimeDate and Time that the customer note is saved.
customerNote → notesOptionalStringThe content of the customer note.
customerNote → userOptionalComplex TypeContains the details of the user creating the Customer Note.
customerNote → userLocaleOptionalComplex TypeContains the locale details of the user creating the Customer Note.

Response

Response Headers

There are no response headers.

Response Body

ElementTypeDescription
customerNoteComplex TypeContains the details of the Customer Note.
customerNote → userIdComplex TypeContains the ID of the user saving the customer note.
customerNote → customerIdComplex TypeContains the ID of the customer for whom the customer note is being saved.
customerNote → isPrivatebooleanWhether to have this note private or not.
customerNote → noteDateDateTimeDate and Time that the customer note is saved.
customerNote → lastUpdatedDateTimeDate and Time that the customer note is updated.
customerNote → noteIdStringUnique Note ID of the customer note.
customerNote → notesStringThe 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

ElementMandatory / OptionalTypeDescription
getCustomerPreferences → criteriaOptionalComplex TypeThe Search criteria details.
getCustomerPreferences → criteria → distinctOptionalbooleanWhether to return only the distinct values.
getCustomerPreferences → criteria → maxRowsOptionalintMaximum number of rows to return.
getCustomerPreferences → criteria → suppressDefaultOrderByOptionalbooleanWhether to override the default ordering.
getCustomerPreferences → criteria → CustomerIdOptionalText Value FilterThis is an element to filter the results by Customer ID. If not provided, all preferences are returned.
getCustomerPreferences → criteria → CustomerId → idOptionalStringThe core:id of the TextValueFilter should be equal to 'CustomerNumber'.
getCustomerPreferences → criteria → CustomerId → forceApplicableOptionalbooleanNot applicable to CRM POS Functions.
getCustomerPreferences → criteria → CustomerId → orColumnsOptionalbooleanNot applicable to CRM POS Functions.
getCustomerPreferences → criteria → CustomerId → comparisonOperatorOptionalStringThe 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 → orNullOptionalbooleanNot applicable to CRM POS Functions.
getCustomerPreferences → criteria → CustomerId → widthOptionalint (Max length - 20)Not applicable to CRM POS Functions.
getCustomerPreferences → criteria → CustomerId → useValueForAllPropertiesOptionalbooleanNot applicable to CRM POS Functions.
getCustomerPreferences → criteria → CustomerId → caseInsensitiveOptionalbooleanNot applicable to CRM POS Functions.
getCustomerPreferences → criteria → CustomerId → submitOnChangeOptionalbooleanNot applicable to CRM POS Functions.
getCustomerPreferences → criteria → CustomerId → disabledOptionalbooleanNot applicable to CRM POS Functions.
getCustomerPreferences → criteria → CustomerId → hiddenOptionalbooleanNot applicable to CRM POS Functions.
getCustomerPreferences → criteria → CustomerId → fuzzyLevelOptionalint (Max length - 4)Not applicable to CRM POS Functions.
getCustomerPreferences → criteria → CustomerId → customQueryFilterOptionalbooleanNot applicable to CRM POS Functions.
getCustomerPreferences → criteria → CustomerId → defaultValueOptionalObjectNot applicable to CRM POS Functions.
getCustomerPreferences → criteria → CustomerId → supportValuesOptionalComplex TypeThe values to be passed in for comparison.

Response

Response Headers

There are no response headers.

Response Body

ElementTypeDescription
customerPreferenceEntryComplex TypeObject 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

ElementMandatory / OptionalTypeDescription
customerPreferencesOptionalComplex TypeObject containing the customer preferences details including created, optionPathId. optionSetId, customerId and value of the preference.
localeOptionalComplex TypeObject containing the locale related details of the preference.

Response

Response Headers

There are no response headers.

Response Body

ElementTypeDescription
customerPreferencesComplex TypeObject containing the customer preferences details including created, optionPathId, optionSetId, customerId and value of the preference.
localeComplex TypeObject 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

ElementMandatory / OptionalTypeDescription
getCustomerKeyDates → criteriaOptionalComplex TypeThe Search criteria details.
getCustomerKeyDates → criteria → distinctOptionalbooleanWhether to return only the distinct values.
getCustomerKeyDates → criteria → maxRowsOptionalintMaximum number of items to return.
getCustomerKeyDates → criteria → suppressDefaultOrderByOptionalbooleanWhether to override the default ordering.
getCustomerKeyDates → criteria → CustomerNumberOptionallongThe Customer number of the Customer found.
getCustomerKeyDates → criteria → CustomerNumber → idOptionalThe Customer ID of the Customer found.
getCustomerKeyDates → criteria → CustomerNumber → forceApplicableOptionalbooleanNot applicable to CRM POS Functions.
getCustomerKeyDates → criteria → CustomerNumber → orColumnsOptionalbooleanNot applicable to CRM POS Functions.
getCustomerKeyDates → criteria → CustomerNumber → comparisonOperatorOptionalStringTThe 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 → orNullOptionalbooleanNot applicable to CRM POS Functions.
getCustomerKeyDates → criteria → CustomerNumber → widthOptionalint (Max length - 20)Not applicable to CRM POS Functions.
getCustomerKeyDates → criteria → CustomerNumber → useValueForAllPropertiesOptionalbooleanNot applicable to CRM POS Functions.
getCustomerKeyDates → criteria → CustomerNumber → caseInsensitiveOptionalbooleanWhether comparisons should be case insensitive. Default is false.
getCustomerKeyDates → criteria → CustomerNumber → submitOnChangeOptionalbooleanNot applicable to CRM POS Functions.
getCustomerKeyDates → criteria → CustomerNumber → disabledOptionalbooleanNot applicable to CRM POS Functions.
getCustomerKeyDates → criteria → CustomerNumber → hiddenOptionalbooleanNot applicable to CRM POS Functions.
getCustomerKeyDates → criteria → CustomerNumber → fuzzyLevelOptionalint (Max length - 4)Not applicable to CRM POS Functions.
getCustomerKeyDates → criteria → CustomerNumber → customQueryFilterOptionalbooleanNot applicable to CRM POS Functions.
getCustomerKeyDates → criteria → CustomerNumber → defaultValueOptionalObjectNot applicable to CRM POS Functions.
getCustomerKeyDates → criteria → CustomerNumber → supportValuesOptionalComplex TypeThe values to be passed in for comparison.

Response

Response Headers

There are no response headers.

Response Body

ElementTypeDescription
getCustomerKeyDatesResponse → CustomerKeyDatesDateTimeThe key date of the customer is saved.
getCustomerKeyDatesResponse → CustomerKeyDates → CustomerIdText Value FilterThis 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 → detailsStringThe event details that have been saved for the customer.
getCustomerKeyDatesResponse → CustomerKeyDates → generateReminderBooleanDefaults to False. If true, a reminder will be generated for that particular date.
getCustomerKeyDatesResponse → CustomerKeyDates → generateReminderNot applicable to CRM POS Functions.
getCustomerKeyDatesResponse → CustomerKeyDates → generateReminder → recurrenceTypeNot applicable to CRM POS Functions.
getCustomerKeyDatesResponse → CustomerKeyDates → generateReminder → startDateNot applicable to CRM POS Functions.
getCustomerKeyDatesResponse → CustomerKeyDates → keyDateIdNot applicable to CRM POS Functions.
getCustomerKeyDatesResponse → CustomerKeyDates → CustomerKeyDateTypeIdNot applicable to CRM POS Functions.
getCustomerKeyDatesResponse → CustomerKeyDates → lastUpdatedDatetimeNot applicable to CRM POS Functions.
getCustomerKeyDatesResponse → CustomerKeyDates → createdByNot applicable to CRM POS Functions.
getCustomerKeyDatesResponse → CustomerKeyDates → creationDateNot applicable to CRM POS Functions.
getCustomerKeyDatesResponse → CustomerKeyDates → amendedByNot 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

ElementMandatory / OptionalTypeDescription
customerKeyDateOptionalComplex TypeObject containing the customer key date details.
userOptionalComplex TypeContains the details of the user creating the customer key dates.
localeOptionalComplex TypeObject 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.

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

ElementTypeDescription
retail:CustomerTransactionSearchResponseComplex TypeThe root request element.
retail:CustomerTransactionListComplex TypeContains the transaction list according to the search criteria.
retail:CustomerTransactionList → currentPageintThe page currently returned in case of pagination.
retail:CustomerTransactionList → pageSizeintNumber of items returned per page.
retail:CustomerTransactionList → totalPagesintTotal number of pages available.
retail:CustomerTransactionList → totalRowsintTotal number of rows available.
retail:CustomerTransactionList → elementsComplex TypeContains the transaction information list according to the search criteria.
retail:CustomerTransactionList → elements → elementsComplex TypeA single element returned from the search with details of a found Customer transaction.
retail:CustomerTransactionList → elements → elements → CustomerNumberlongThe Customer number of the Customer transaction found.
retail:CustomerTransactionList → elements → elements → applicationIdStringThe associated application type which the transaction was started with.
retail:CustomerTransactionList → elements → elements → transactionIdStringThe Transaction ID number details.
retail:CustomerTransactionList → elements → elements → transactionTypeIdStringThe Processed Transaction type which can be Sales or Order.
retail:CustomerTransactionList → elements → elements → locationIdStringThe location ID which the transaction took place.
retail:CustomerTransactionList → elements → elements → transactionDateDateTimeTransaction date when the transaction was recorded.
retail:CustomerTransactionList → elements → elements → valuestringTransaction value of the transaction that was recorded.
retail:CustomerTransactionList → elements → elements → descriptionstringTransaction description of the transaction that was recorded.
retail:CustomerTransactionList → elements → elements → loyaltyPointsstringThe loyalty points earned when the transaction completed.
retail:CustomerTransactionList → elements → elements → locationDescriptionNot 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

ElementTypeDescription
CustomerTransactionDetailsList → lineNumberComplex TypeThe line item which was included in the transaction.
CustomerTransactionDetailsList → quantityStringTotal quantity value of the items in the transaction.
CustomerTransactionDetailsList → effectiveNetValueStringThe effective net value of the items in the transaction.
CustomerTransactionDetailsList → salesPersonStringThe ID of the Salesperson who completed the transaction.
CustomerTransactionDetailsList → productIdStringThe product ID which has been added in the transaction.
CustomerTransactionDetailsList → descriptionStringThe product description which has been added in the transaction.
CustomerTransactionDetailsList → loyaltyPointsStringThe Loyalty points value earned in the transaction.
CustomerTransactionDetailsList → criteriaComplex Type
CustomerTransactionDetailsList → criteria → distinctbooleanWhether to list distinct Customers or not.
CustomerTransactionDetailsList → criteria → maxRowsintMaximum number of items to return.
CustomerTransactionDetailsList → criteria → suppressDefaultOrderBybooleanWhether to override the default ordering.
CustomerTransactionDetailsList → criteria → transactionIdStringNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → transactionId → idbooleanNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → transactionId → forceApplicablebooleanNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → transactionId → orColumnsbooleanNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → transactionId → comparisonOperatorStringThe 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 → orNullbooleanNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → transactionId → widthint (Max length - 20)Not applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → transactionId → useValueForAllPropertiesbooleanNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → transactionId → caseInsensitivebooleanWhether the comparisons should be case insensitive. Default is false.
CustomerTransactionDetailsList → criteria → transactionId → submitOnChangebooleanNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → transactionId → disabledbooleanNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → transactionId → hiddenbooleanNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → transactionId → fuzzyLevelint (Max length - 4)Not applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → transactionId → customQueryFilterbooleanNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → transactionId → defaultValueObjectNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → transactionId → supportValuesComplex TypeThe values to be passed in for comparison.
CustomerTransactionDetailsList → criteria → transactionId → supportValues → Valuesint (Max length - 20)Not applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → typeNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → type → idNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → type → forceApplicablebooleanNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → type → orColumnsbooleanNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → type → comparisonOperatorStringThe 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 → orNullbooleanNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → type → widthint (Max length - 20)Not applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → type → useValueForAllPropertiesbooleanNot applicable to CRM POS Functions.
CustomerTransactionDetailsList → criteria → type → caseInsensitivebooleanWhether the comparisons should be case insensitive. Default is false.
CustomerTransactionDetailsList → criteria → type → submitOnChangeboolean
CustomerTransactionDetailsList → criteria → type → disabledboolean
CustomerTransactionDetailsList → criteria → type → hiddenboolean
CustomerTransactionDetailsList → criteria → type → fuzzyLevelint (Max length - 4)
CustomerTransactionDetailsList → criteria → type → customQueryFilterboolean
CustomerTransactionDetailsList → criteria → type → supportValuesComplex TypeThe values to be passed in for comparison.
CustomerTransactionDetailsList → criteria → type → supportValues → value
CustomerTransactionDetailsList → criteria → type → valueRequiredboolean

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

ElementMandatory / OptionalTypeDescription
saveContactHistory → CustomerContactHistoryOptionalComplex TypeContains the contact history details for the customer.
saveContactHistory → CustomerContactHistory → contactDateOptionalDateTimeThe date of the contact history.
saveContactHistory → CustomerContactHistory → reasonIdOptionalNot applicable to CRM POS Functions.
saveContactHistory → CustomerContactHistory → deviceIdOptionalStringNot applicable to CRM POS Functions.
saveContactHistory → CustomerContactHistory → locationIdOptionalNot applicable to CRM POS Functions.
saveContactHistory → CustomerContactHistory → subjectOptionalStringThe subject details of the contact history details.
saveContactHistory → CustomerContactHistory → CustomerContactTypeIdOptionalStringDropdown of the customer contact types configured. Default is Appointment. Values: Appointment, Complaint, General, Pre-Sale, Sale
saveContactHistory → CustomerContactHistory → CustomerIdOptionalNot applicable to CRM POS Functions.
saveContactHistory → CustomerContactHistory → descriptionOptionalNot applicable to CRM POS Functions.
saveContactHistory → CustomerContactHistory → userIdOptionalStringNot applicable to CRM POS Functions.
saveContactHistory → userMandatoryNot applicable to CRM POS Functions.
saveContactHistory → user → dateTimeActivatedOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → cardSignOnOnlyOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → skipPasswordIfCardOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → displayNameOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → employeeIdOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → locationIdOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → passwordOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → passwordLastChangedOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → forceChangePasswordOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → strongPasswordOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → previousPasswordsOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → shortIdOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → addressOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → address → countryCodeIdOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → address → typeIdOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → address → isTemplateOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → userIdOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → userNameOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → userName → surnameOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → userName → forenameOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → userName → initialsOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → timePeriodOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → timePeriod → dayOfWeekOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → singleSignOnUserIdOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → singleSignOnCommonNameOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → lastUpdatedOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → fiscalUserReferenceOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → templateKeyOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → isTemplateOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → associatedLocationRestrictionsOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → emailAccountNameOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → emailAddressOptionalNot applicable to CRM POS Functions.
saveContactHistory → user → emailEncryptedPasswordOptionalNot applicable to CRM POS Functions.
saveContactHistory → userLocaleOptionalNot applicable to CRM POS Functions.
saveContactHistory → userLocale → languageOptionalNot applicable to CRM POS Functions.
saveContactHistory → userLocale → countryOptionalNot applicable to CRM POS Functions.
saveContactHistory → userLocale → variantOptionalNot applicable to CRM POS Functions.
saveContactHistory → userLocale → descriptionOptionalNot applicable to CRM POS Functions.
saveContactHistory → userLocale → lastUpdatedOptionalNot applicable to CRM POS Functions.

Response

Response Headers

There are no response headers.

Response Body

ElementTypeDescription
saveContactHistoryResponse → CustomerContactHistoryComplex TypeContains the Contact History Details.
saveContactHistoryResponse → CustomerContactHistory → contactDateDateTimeThe date and the time that the contact history details were recorded.
saveContactHistoryResponse → CustomerContactHistory → reasonIdNot applicable to CRM POS Functions.
saveContactHistoryResponse → CustomerContactHistory → reasonId → reasonIdNot applicable to CRM POS Functions.
saveContactHistoryResponse → CustomerContactHistory → reasonId → regionIdNot applicable to CRM POS Functions.
saveContactHistoryResponse → CustomerContactHistory → deviceIdNot applicable to CRM POS Functions.
saveContactHistoryResponse → CustomerContactHistory → locationIdNot applicable to CRM POS Functions.
saveContactHistoryResponse → CustomerContactHistory → subjectStringThe Subject details of the contact history.
saveContactHistoryResponse → CustomerContactHistory → contactHistoryIdNot applicable to CRM POS Functions.
saveContactHistoryResponse → CustomerContactHistory → CustomerContactTypeIdStringThe Contact type that is recorded.
saveContactHistoryResponse → CustomerContactHistory → CustomerIdNot applicable to CRM POS Functions.
saveContactHistoryResponse → CustomerContactHistory → descriptionNot applicable to CRM POS Functions.
saveContactHistoryResponse → CustomerContactHistory → lastUpdatedNot applicable to CRM POS Functions.
saveContactHistoryResponse → CustomerContactHistory → userIdNot applicable to CRM POS Functions.
saveContactHistoryResponse → errorMessage → fieldErrorsNot applicable to CRM POS Functions.
saveContactHistoryResponse → errorMessage → fieldErrorsWithContextNot applicable to CRM POS Functions.
saveContactHistoryResponse → errorMessage → pageErrorsNot 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"
}
}
}