Creates a Customer in Storm. Validation is done before trying to create the Customer and the listed Exceptions might be raised if any important information is missing. Customers can be created with or without an Account. Just supply Customer.Account if an Account should be created as well. The same goes for Companies, but here existing Companies are ok.
The Customer to create. If an Account is specified it will be created as well. Customers can also be created with or without Companies. If a supplied Company does not have an Id specified it is considered new and will be created as well.
Success
Bad Request
Key: AccountAlreadyExists. Gets raised when the account already exists, if Account is supplied.
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"
}