Create a customer
Creates a new Customer with the provided CustomerViewModel. Available to the roles: csp, reseller
Headers
-
The domain used to access the portal.
-
X-Correlation-Id string(UUID)
This header is optional and by setting it you can correlate the audit logs made by this request.
Body
The customer info to create the customer.
-
id string(uuid)
The GUID identifier for the customer.
-
The name of the company. This may be up to 255 characters.
-
taxId string | null
The company tax Id. This may be up to 255 characters.
-
The company country code in the ISO 3166-1 alpha-2 standard.
-
The company address line 1. This may be up to 255 characters.
-
addressLine2 string | null
The company address line 2. This may be up to 255 characters.
-
The company city. This may be up to 255 characters.
-
The company State. This may be up to 255 characters.
-
The company ZIP. This may be up to 30 characters.
-
The company primary contact first name. This may be up to 255 characters.
-
middleName string | null
The company primary contact middle name. This may be up to 255 characters.
-
The company primary contact last name. This may be up to 255 characters.
-
The company primary contact email. This may be up to 255 characters.
-
The company primary contact phone. This may be up to 30 characters.
-
internalIdentifier string | null
The customer internal identifier. This may be up to 255 characters.
-
resellerId string(uuid) | null
The reseller identifier. If this value is set a relation between this customer and the reseller will be created, if null a direct relation between the CSP and the customer will be created instead.
-
The provider customers. A list containing the info about this customer in one or more provider instances.
-
customerAssociations array[object] | null
The list of partners associated to a customer
curl \
-X POST https://app-cloudcockpitapi-prod-01.azurewebsites.net/v1/Customers \
-H "Content-Type: application/json" \
-H "X-Tenant: portal.cloudcockpit.com" \
-H "Authorization: Bearer eyJ0eXAiO..." \
-H "X-Correlation-Id: string" \
-d '{"id":"string","companyName":"string","taxId":"string","country":"PT","addressLine1":"string","addressLine2":"string","city":"string","state":"string","zip":"string","firstName":"string","middleName":"string","lastName":"string","email":"string","phone":"string","internalIdentifier":"string","resellerId":"string","providerCustomers":{"cb3cd15b-1d6e-45be-b493-c71549cbfd87":{"margin":{"value":10.6,"marginRule":{"name":"markup"}},"offerTypeMargins":{"Value":{"license":{"Value":10,"MarginRule":{"Name":"markup"}}}},"providerCustomerId":"f574cf12-a7d6-43fe-9663-1af97b04e5ab","providerInstanceId":"cb3cd15b-1d6e-45be-b493-c71549cbfd87","providerCustomerData":"{\"Domain\":\"TestDomain\",\"CredentialsEmail\":\"test@email.com\",\"AcceptedMCA\":true,\"AgreementDate\":\"2022-12-28T00:00:00Z\",\"KeepPrimaryInformation\":true,\"FirstName\":\"Test\",\"LastName\":\"Test\",\"Email\":\"test@email.com\",\"Phone\":\"921231231\",\"DefaultCulture\":\"en-US\",\"Language\":\"en\",\"AssociatedPartnerId\":null,\"Qualifications\":[],\"EnableGDAP\":true}"}},"customerAssociations":[{"resellerId":"string","name":"string"}]}'
# Headers
X-Tenant: portal.cloudcockpit.com
Authorization: Bearer eyJ0eXAiO...
X-Correlation-Id: string
# Payload
{
"id": "string",
"companyName": "string",
"taxId": "string",
"country": "PT",
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"state": "string",
"zip": "string",
"firstName": "string",
"middleName": "string",
"lastName": "string",
"email": "string",
"phone": "string",
"internalIdentifier": "string",
"resellerId": "string",
"providerCustomers": {
"cb3cd15b-1d6e-45be-b493-c71549cbfd87": {
"margin": {
"value": 10.6,
"marginRule": {
"name": "markup"
}
},
"offerTypeMargins": {
"Value": {
"license": {
"Value": 10,
"MarginRule": {
"Name": "markup"
}
}
}
},
"providerCustomerId": "f574cf12-a7d6-43fe-9663-1af97b04e5ab",
"providerInstanceId": "cb3cd15b-1d6e-45be-b493-c71549cbfd87",
"providerCustomerData": "{\"Domain\":\"TestDomain\",\"CredentialsEmail\":\"test@email.com\",\"AcceptedMCA\":true,\"AgreementDate\":\"2022-12-28T00:00:00Z\",\"KeepPrimaryInformation\":true,\"FirstName\":\"Test\",\"LastName\":\"Test\",\"Email\":\"test@email.com\",\"Phone\":\"921231231\",\"DefaultCulture\":\"en-US\",\"Language\":\"en\",\"AssociatedPartnerId\":null,\"Qualifications\":[],\"EnableGDAP\":true}"
}
},
"customerAssociations": [
{
"resellerId": "string",
"name": "string"
}
]
}
string
string
string
string
{
"statusCode": 42,
"type": "string",
"description": "string",
"correlationId": "string",
"errors": [
{
"propertyName": "string",
"description": [
"string"
]
}
]
}
{
"statusCode": 42,
"type": "string",
"description": "string",
"correlationId": "string",
"errors": [
{
"propertyName": "string",
"description": [
"string"
]
}
]
}
{
"statusCode": 42,
"type": "string",
"description": "string",
"correlationId": "string",
"errors": [
{
"propertyName": "string",
"description": [
"string"
]
}
]
}
{
"statusCode": 42,
"type": "string",
"description": "string",
"correlationId": "string",
"errors": [
{
"propertyName": "string",
"description": [
"string"
]
}
]
}