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

PropertyTypeRequiredType parameterDefault valueDescription
chainIdIntegertruepath parameter

Example request

POST https://publicapi-providers.ulysescloud.com:9797/public/api/v1/con/chain/1/customer


Body


FieldTypeRequiredDescription
idintfalseUnique identifier for the Customer.
namestringtrueName of the Customer.
customerDocumentListList of CustomerDocumenttrue
customerEmailListList of CustomerEmailfalse
customerAddressListList of CustomerAddressfalse
customerPhoneListList of CustomerPhonefalse
profileTypeProfileTypefalse
customerCustomFieldValueListList of CustomerCustomFieldValuefalse
customerLoyaltyListList of CustomerLoyaltyfalse
chainVipLevelchainVipLevelfalseOnly 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

PropertyTypeRequiredDescription
ResponseApiMessageResponseApiMessagetrueDescription of the response of the success operation

Example response

{
  "httpStatus": "201",
  "userMessage": "Success",
  "technicalMessage": "Success customer created",
  "errorCode": "0",
  "id": 1	
}