RegisterCustomer3 creates a Customer with an Account in Storm just like CreateCustomer. If the Customer already exists it gets updated. Customer is looked up by email. Validation is done before trying to update the Customer and the below Exceptions might be raised if any important information is missing. Customers can be updated with or without an Account. Just supply Customer.Account if an Account should be updated or created as well. The same goes for Companies. Any existing company will be updated as well. Just supply data about a Customer that needs to be updated. Any missing parts such as Addresses, Flags, Companies or Info fields that are not passed in will not be removed but just not updated.
The Customer to register. If an Account is specified it will be created as well. Customers can also be registered with or without Companies. If a supplied Company does not have an Id specified it is considered new and will be created as well. Otherwise it will be updated.
Success
Bad Request
Key: AccountAlreadyExists. Gets raised when the account already exists and it is not the same as the supplied one.
Key: CompanyAlreadyExists. Gets raised when there already exists a company with the specified organizational number/name combination.
Key: CustomerAlreadyExists. Gets raised when there already exists a Customer with the specified email.
Key: InvalidCompanyName. Gets raised if any Company.Name is missing.
Key: InvalidEmail. Gets raised if an email is supplied and it is invalid.
Key: DeliveryAddressZipMissing. Gets raised if any DeliveryAddress is supplied and it is missing a Zip code.
Key: DeliveryAddressCityMissing. Gets raised if any DeliveryAddress is supplied and it is missing a City.
Key: DeliveryAddressCountryMissing. Gets raised if any DeliveryAddress is supplied and it is missing a Country.
Key: InvoiceAddressZipMissing. Gets raised if any DeliveryAddress is supplied and it is missing a Zip code.
Key: InvoiceAddressCityMissing. Gets raised if any DeliveryAddress is supplied and it is missing a City.
Key: InvoiceAddressCountryMissing. Gets raised if any DeliveryAddress is supplied and it is missing a Country.
Internal Server Error
{- "Id": 0,
- "Key": "string",
- "Code": "string",
- "Email": "string",
- "SSN": "string",
- "FirstName": "string",
- "LastName": "string",
- "Phone": "string",
- "CellPhone": "string",
- "ReferId": 0,
- "ReferUrl": "string",
- "Account": {
- "Id": 0,
- "Key": "string",
- "LoginName": "string",
- "Name": "string",
- "Roles": [
- 0
], - "Authorizations": [
- {
- "Id": 0,
- "Value": "string",
- "Code": "string"
}
], - "IsActive": true
}, - "Companies": [
- {
- "Id": 0,
- "Key": "string",
- "Code": "string",
- "Name": "string",
- "OrgNo": "string",
- "Phone": "string",
- "ReferId": 0,
- "ReferUrl": "string",
- "DeliveryAddresses": [
- {
- "Id": 0,
- "CareOf": "string",
- "Line1": "string",
- "Line2": "string",
- "Zip": "string",
- "City": "string",
- "CountryId": 0,
- "Country": "string",
- "Region": "string",
- "IsValidated": true,
- "GlobalLocationNo": "string",
- "ShippingPhoneNumber": "string"
}
], - "InvoiceAddress": {
- "Id": 0,
- "CareOf": "string",
- "Line1": "string",
- "Line2": "string",
- "Zip": "string",
- "City": "string",
- "CountryId": 0,
- "Country": "string",
- "Region": "string",
- "IsValidated": true,
- "GlobalLocationNo": "string",
- "ShippingPhoneNumber": "string"
}, - "UseInvoiceAddressAsDeliveryAddress": true,
- "Info": [
- {
- "Id": 0,
- "Value": "string",
- "Code": "string"
}
], - "PricelistIds": [
- 0
], - "ParentId": 0,
- "DeliveryMethodIds": [
- 0
], - "PaymentMethodIds": [
- 0
], - "Email": "string",
- "Flags": [
- {
- "Id": 0,
- "Name": "string",
- "Group": 0,
- "IsSelected": true
}
], - "VatNo": "string"
}
], - "DeliveryAddresses": [
- {
- "Id": 0,
- "CareOf": "string",
- "Line1": "string",
- "Line2": "string",
- "Zip": "string",
- "City": "string",
- "CountryId": 0,
- "Country": "string",
- "Region": "string",
- "IsValidated": true,
- "GlobalLocationNo": "string",
- "ShippingPhoneNumber": "string"
}
], - "InvoiceAddress": {
- "Id": 0,
- "CareOf": "string",
- "Line1": "string",
- "Line2": "string",
- "Zip": "string",
- "City": "string",
- "CountryId": 0,
- "Country": "string",
- "Region": "string",
- "IsValidated": true,
- "GlobalLocationNo": "string",
- "ShippingPhoneNumber": "string"
}, - "Flags": [
- {
- "Id": 0,
- "Name": "string",
- "Group": 0,
- "IsSelected": true
}
], - "UseInvoiceAddressAsDeliveryAddress": true,
- "Info": [
- {
- "Id": 0,
- "Value": "string",
- "Code": "string"
}
], - "PricelistIds": [
- 0
], - "CrmId": "string",
- "IsActive": true,
- "Created": "2019-08-24T14:15:22Z",
- "Updated": "2019-08-24T14:15:22Z"
}
{- "Id": 0,
- "Key": "string",
- "Code": "string",
- "Email": "string",
- "SSN": "string",
- "FirstName": "string",
- "LastName": "string",
- "Phone": "string",
- "CellPhone": "string",
- "ReferId": 0,
- "ReferUrl": "string",
- "Account": {
- "Id": 0,
- "Key": "string",
- "LoginName": "string",
- "Name": "string",
- "Roles": [
- 0
], - "Authorizations": [
- {
- "Id": 0,
- "Value": "string",
- "Code": "string"
}
], - "IsActive": true
}, - "Companies": [
- {
- "Id": 0,
- "Key": "string",
- "Code": "string",
- "Name": "string",
- "OrgNo": "string",
- "Phone": "string",
- "ReferId": 0,
- "ReferUrl": "string",
- "DeliveryAddresses": [
- {
- "Id": 0,
- "CareOf": "string",
- "Line1": "string",
- "Line2": "string",
- "Zip": "string",
- "City": "string",
- "CountryId": 0,
- "Country": "string",
- "Region": "string",
- "IsValidated": true,
- "GlobalLocationNo": "string",
- "ShippingPhoneNumber": "string"
}
], - "InvoiceAddress": {
- "Id": 0,
- "CareOf": "string",
- "Line1": "string",
- "Line2": "string",
- "Zip": "string",
- "City": "string",
- "CountryId": 0,
- "Country": "string",
- "Region": "string",
- "IsValidated": true,
- "GlobalLocationNo": "string",
- "ShippingPhoneNumber": "string"
}, - "UseInvoiceAddressAsDeliveryAddress": true,
- "Info": [
- {
- "Id": 0,
- "Value": "string",
- "Code": "string"
}
], - "PricelistIds": [
- 0
], - "ParentId": 0,
- "DeliveryMethodIds": [
- 0
], - "PaymentMethodIds": [
- 0
], - "Email": "string",
- "Flags": [
- {
- "Id": 0,
- "Name": "string",
- "Group": 0,
- "IsSelected": true
}
], - "VatNo": "string"
}
], - "DeliveryAddresses": [
- {
- "Id": 0,
- "CareOf": "string",
- "Line1": "string",
- "Line2": "string",
- "Zip": "string",
- "City": "string",
- "CountryId": 0,
- "Country": "string",
- "Region": "string",
- "IsValidated": true,
- "GlobalLocationNo": "string",
- "ShippingPhoneNumber": "string"
}
], - "InvoiceAddress": {
- "Id": 0,
- "CareOf": "string",
- "Line1": "string",
- "Line2": "string",
- "Zip": "string",
- "City": "string",
- "CountryId": 0,
- "Country": "string",
- "Region": "string",
- "IsValidated": true,
- "GlobalLocationNo": "string",
- "ShippingPhoneNumber": "string"
}, - "Flags": [
- {
- "Id": 0,
- "Name": "string",
- "Group": 0,
- "IsSelected": true
}
], - "UseInvoiceAddressAsDeliveryAddress": true,
- "Info": [
- {
- "Id": 0,
- "Value": "string",
- "Code": "string"
}
], - "PricelistIds": [
- 0
], - "CrmId": "string",
- "IsActive": true,
- "Created": "2019-08-24T14:15:22Z",
- "Updated": "2019-08-24T14:15:22Z"
}