Add new Customer [POST]
Operation
Creates a new customer in the system.
POST
https://{environment}.ulysescloud.com/public/api/{version}/con/chain/{chainId}/customer
Request
Property | Type | Required | Type parameter | Default value | Description |
---|---|---|---|---|---|
chainId | Integer | true | path parameter |
Example request
POST https://publicapi-providers.ulysescloud.com:9797/public/api/v1/con/chain/1/customer
Body
Field Type Required Description id int false Unique identifier for the Customer. name string true Name of the Customer. customerDocumentList List of CustomerDocument true customerEmailList List of CustomerEmail false customerAddressList List of CustomerAddress false customerPhoneList List of CustomerPhone false profileType ProfileType false customerCustomFieldValueList List of CustomerCustomFieldValue false customerLoyaltyList List of CustomerLoyalty false chainVipLevel chainVipLevel false Only for get/list. Not for save/update/delete.
Example
The example that will be sent in the operation
{ "name": "Bénédicte Ferguson, Gregory", "customerDocumentList": [ { "primary": true, "documentType": { "id": 5, "code": "D", "name": "National identity document", "nameI18n": "National identity document" }, "number": "DOC 8", "givenName": "Gregory", "surName": "Bénédicte", "secondSurName": "Ferguson", "genderType": { "id": 1, "code": "M", "name": "Male", "nameI18n": "Male" }, "birthDate": "2000-01-01", "birthCountryCode": "ES", "birthPlace": "East Saint Louis", "effectiveDate": "2015-06-15", "expireDate": "2024-01-01", "street": null, "city": null, "stateProvName": "Illinois", "stateProvCode": null, "countryCode": "NI", "postalCode": "62205", "nationalityCountryCode": "NI", "countryOfIssuanceCode": "NI", "ocr": null, "remark": "Document Remark" } ], "customerEmailList": [ { "primary": true, "emailAddressType": { "id": 1, "code": "1", "name": "Personal", "nameI18n": "Personal" }, "email": "gfergusonbo@wordpress.org", "remark": null } ], "customerAddressList": [ { "primary": true, "communicationLocationType": { "id": 1, "code": "1", "name": "Home", "nameI18n": "Home" }, "street": "246 Fulton Alley", "city": "East Saint Louis", "stateProvName": "Illinois", "stateProvCode": null, "postalCode": "62205", "countryCode": "VG", "remark": "Address Remark" } ], "customerPhoneList": [ { "primary": true, "phoneLocationType": { "id": 6, "code": "6", "name": "Home", "nameI18n": "Home" }, "phoneTechType": { "id": 1, "code": "1", "name": "Voice", "nameI18n": "Voice" }, "countryAccessCode": "+34", "areaCityCode": "B", "phoneNumber": "1-(618)701-4152", "extension": "1", "remark": "Phone Remark" } ], "allowMarketing": true, "allowThirdParty": false, "remark": "Customer Remarks", "profileType": { "id": 1, "code": "1", "name": "Customer", "nameI18n": "Customer", "colorCode": "#757575" }, "customerCustomFieldValueList": [ { "code": "SMOKER", "name": "Smoker", "customFieldId": 1, "booleanValue": true, "numberValue": null, "stringValue": null, "dateValue": null, "selectValue": null, "multiSelectValueList": null }, { "code": "PET", "name": "Pet", "customFieldId": 2, "booleanValue": null, "numberValue": null, "stringValue": null, "dateValue": null, "selectValue": null, "multiSelectValueList": null }, { "code": "DISABILITYPERCENTAGE", "name": "DisabilityPercentage", "customFieldId": 3, "booleanValue": null, "numberValue": 0.000000, "stringValue": null, "dateValue": null, "selectValue": null, "multiSelectValueList": null }, { "code": "HOBBIES", "name": "Hobbies", "customFieldId": 4, "booleanValue": null, "numberValue": null, "stringValue": null, "dateValue": null, "selectValue": null, "multiSelectValueList": null } ], "customerLoyaltyList": [ { "chainLoyalty": { "id": 1, "programId": "IB", "name": "IberiaPlus", "propertyLoyaltyList": [ { "id": 1, "active": true, "inactiveReason": null } ] }, "membershipId": "33333333333A" } ] }
Response
Property | Type | Required | Description |
---|---|---|---|
ResponseApiMessage | ResponseApiMessage | true | Description of the response of the success operation |
Example response
{ "httpStatus": "201", "userMessage": "Success", "technicalMessage": "Success customer created", "errorCode": "0", "id": 1 }