Create a new customer

Prev Next
Post
/Customerdataservice/api/customers

Create a new customer with a name.

Header parameters
X-Idempotency-Key
stringRequired

Idempotency key for safely retrying requests without duplicating operations.

Body parameters
Expand All
object
organizationNumber
string Required

Unique organization number for the customer. Must be numeric and up to 9 digits.

Min length1
Max length9
Pattern^[0-9]*$
Example123456789
name
string Required

Full name of the customer. Max 30 characters.

Min length1
Max length30
ExampleAcme Corporation
phone
string

Primary phone number. Max 11 characters.

Min length0
Max length11
Pattern^\+?[0-9]+$
Example12345678901
mobile
string

Mobile phone number. Max 11 characters.

Min length0
Max length11
Pattern^\+?[0-9]+$
Example10987654321
fax
string

Fax number. Max 11 characters.

Min length0
Max length11
Pattern^\+?[0-9]+$
Example11223344556
websiteUrl
string

Website URL of the customer.

Min length0
Max length100
Pattern^https?://.*$
Examplehttps://acme.com
email
string

Email address of the customer. Max 50 characters.

Min length0
Max length50
Pattern^[^@]+@[^@]+\.[^@]+$
Examplejohn.doe@acme.com
eanLocationNumber
string

EAN location number for electronic invoicing.

Example1234567890123
bankAccountNumber
string

Bank account number. Numeric, max 11 digits.

Min length0
Max length11
Pattern^[0-9]*$
Example98765432101
customerCategory
object (Customerdataservice_NamedReference) Required

Reference object with id and name.

id
string Required

External unique identifier.

Min length1
Max length2147483647
ExampleID01
name
string Required

Display name.

Min length1
Max length2147483647
ExampleName
classificationGroup
object (Customerdataservice_NamedReference)

Reference object with id and name.

id
string Required

External unique identifier.

Min length1
Max length2147483647
ExampleID01
name
string Required

Display name.

Min length1
Max length2147483647
ExampleName
discountCategory
object (Customerdataservice_NamedReference)

Reference object with id and name.

id
string Required

External unique identifier.

Min length1
Max length2147483647
ExampleID01
name
string Required

Display name.

Min length1
Max length2147483647
ExampleName
paymentTerm
object (Customerdataservice_NamedReference) Required

Reference object with id and name.

id
string Required

External unique identifier.

Min length1
Max length2147483647
ExampleID01
name
string Required

Display name.

Min length1
Max length2147483647
ExampleName
deliveryType
object (Customerdataservice_NamedReference)

Reference object with id and name.

id
string Required

External unique identifier.

Min length1
Max length2147483647
ExampleID01
name
string Required

Display name.

Min length1
Max length2147483647
ExampleName
deliveryMethod
object (Customerdataservice_NamedReference)

Reference object with id and name.

id
string Required

External unique identifier.

Min length1
Max length2147483647
ExampleID01
name
string Required

Display name.

Min length1
Max length2147483647
ExampleName
address
object (Customerdataservice_Address) Required

Address details.

name
string Required

Name of the address location.

Min length1
Max length2147483647
ExampleMain Office
drivingDescription
string

Driving directions or description.

ExampleNext to the central station
address1
string

Address line 1.

Min length0
Max length30
Example123 Main St
address2
string

Address line 2.

Min length0
Max length30
ExampleSuite 100
postalCode
string

Postal code.

Min length0
Max length10
Example1234
city
string

City name.

Min length0
Max length30
ExampleMetropolis
country
string

Country name.

ExampleNorway
invoiceAddress
object (Customerdataservice_Address)

Address details.

name
string Required

Name of the address location.

Min length1
Max length2147483647
ExampleMain Office
drivingDescription
string

Driving directions or description.

ExampleNext to the central station
address1
string

Address line 1.

Min length0
Max length30
Example123 Main St
address2
string

Address line 2.

Min length0
Max length30
ExampleSuite 100
postalCode
string

Postal code.

Min length0
Max length10
Example1234
city
string

City name.

Min length0
Max length30
ExampleMetropolis
country
string

Country name.

ExampleNorway
deliveryAddress
object (Customerdataservice_Address)

Address details.

name
string Required

Name of the address location.

Min length1
Max length2147483647
ExampleMain Office
drivingDescription
string

Driving directions or description.

ExampleNext to the central station
address1
string

Address line 1.

Min length0
Max length30
Example123 Main St
address2
string

Address line 2.

Min length0
Max length30
ExampleSuite 100
postalCode
string

Postal code.

Min length0
Max length10
Example1234
city
string

City name.

Min length0
Max length30
ExampleMetropolis
country
string

Country name.

ExampleNorway
salesperson
object (Customerdataservice_Salesperson)

Salesperson details.

Example[{code=SP02, name=Bob Brown}]
code
string Required

Salesperson code.

Min length1
Max length2147483647
ExampleSP01
name
string Required

Salesperson name.

Min length1
Max length2147483647
ExampleJane Smith
alternativeSalespersons
Array of object (Customerdataservice_Salesperson)

List of alternative salespersons.

Min items0
Max items10
Example[{code=SP02, name=Bob Brown}]
object

Salesperson details.

Example[{code=SP02, name=Bob Brown}]
code
string Required

Salesperson code.

Min length1
Max length2147483647
ExampleSP01
name
string Required

Salesperson name.

Min length1
Max length2147483647
ExampleJane Smith
customerCards
Array of object (Customerdataservice_CustomerCard)

List of customer cards.

Min items0
Max items10
Example[{cardType={id=CARDTYPE01, name=Loyalty}, cardNumber=1234567890, barcode=BAR123456, cardHolder=John Doe, blocked=false}]
object

Customer card details.

Example[{cardType={id=CARDTYPE01, name=Loyalty}, cardNumber=1234567890, barcode=BAR123456, cardHolder=John Doe, blocked=false}]
cardType
object (Customerdataservice_NamedReference) Required

Reference object with id and name.

id
string Required

External unique identifier.

Min length1
Max length2147483647
ExampleID01
name
string Required

Display name.

Min length1
Max length2147483647
ExampleName
cardNumber
string Required

Card number.

Min length1
Max length2147483647
Example1234567890
barcode
string Required

Barcode for the card.

Min length1
Max length2147483647
ExampleBAR123456
cardHolder
string Required

Name of the card holder.

Min length1
Max length2147483647
ExampleJohn Doe
blocked
boolean Required

Indicates if the card is blocked.

Examplefalse
externalIds
Array of object (Customerdataservice_ExternalId)

List of external identifiers.

Min items0
Max items30
object

External identifier from an external system.

system
string Required

The external system name (e.g., NX).

Min length1
Max length20
ExampleNX
id
string Required

The identifier in the external system.

Min length1
Max length100
ExampleXYZ123
additionalProperties
Array of object (Customerdataservice_AdditionalProperty)

List of customer properties.

Example[{type=VIP, code=VIP01, value=Gold}]
object

Custom property for the customer.

Example[ { "type": "VIP", "code": "VIP01", "value": "Gold" } ]
type
string Required

Type of property.

Min length1
Max length2147483647
ExampleVIP
code
string Required

Property code.

Min length1
Max length2147483647
ExampleVIP01
value
string Required

Property value.

Min length1
Max length2147483647
ExampleGold
blocked
boolean

Indicates if the customer is blocked.

Examplefalse
creditAllowed
boolean

Indicates if credit is allowed for the customer.

Exampletrue
cashAllowed
boolean

Indicates if cash payment is allowed for the customer.

Examplefalse
requisitionRequired
boolean

Indicates if requisition is required.

Examplefalse
contactPersonRequired
boolean

Indicates if a contact person is required.

Exampletrue
contactPersonRequesterRequired
boolean

Indicates if a contact person requester is required.

Examplefalse
referenceRequired
boolean

Indicates if a reference is required.

Examplefalse
projectRequired
boolean

Indicates if a project is required.

Examplefalse
creditLimit
object (Customerdataservice_Money)

Monetary value.

currency
string Required

Currency code (ISO 4217).

Valid values[ "NOK", "SEK", "DKK", "EUR", "USD", "GBP", "CHF", "PLN", "CZK", "HUF", "JPY", "AUD", "CAD", "SGD", "CNY", "INR" ]
ExampleNOK
amount
number Required

Amount in the specified currency.

Minimum0
Maximum10000000
Example10000.0
currentOrderValueInclVat
object (Customerdataservice_Money)

Monetary value.

currency
string Required

Currency code (ISO 4217).

Valid values[ "NOK", "SEK", "DKK", "EUR", "USD", "GBP", "CHF", "PLN", "CZK", "HUF", "JPY", "AUD", "CAD", "SGD", "CNY", "INR" ]
ExampleNOK
amount
number Required

Amount in the specified currency.

Minimum0
Maximum10000000
Example10000.0
currentBalanceInclVat
object (Customerdataservice_Money)

Monetary value.

currency
string Required

Currency code (ISO 4217).

Valid values[ "NOK", "SEK", "DKK", "EUR", "USD", "GBP", "CHF", "PLN", "CZK", "HUF", "JPY", "AUD", "CAD", "SGD", "CNY", "INR" ]
ExampleNOK
amount
number Required

Amount in the specified currency.

Minimum0
Maximum10000000
Example10000.0
specialAgreement
string

Special agreement details.

ExampleSpecial pricing for Q4
vatFreeCustomer
boolean

Indicates if the customer is VAT free.

Examplefalse
orderDiscount
number

Order discount percentage.

Minimum0
Example5.5
showPriceOnPacknote
boolean

Indicates if price should be shown on packnote.

Exampletrue
Responses
201

Customer created successfully

Expand All
object
organizationNumber
string

Unique organization number for the customer. Must be numeric and up to 9 digits.

Min length1
Max length9
Pattern^[0-9]*$
Example123456789
name
string

Full name of the customer. Max 30 characters.

Min length1
Max length30
ExampleAcme Corporation
phone
string

Primary phone number. Max 11 characters.

Min length0
Max length11
Pattern^\+?[0-9]+$
Example12345678901
mobile
string

Mobile phone number. Max 11 characters.

Min length0
Max length11
Pattern^\+?[0-9]+$
Example10987654321
fax
string

Fax number. Max 11 characters.

Min length0
Max length11
Pattern^\+?[0-9]+$
Example11223344556
websiteUrl
string

Website URL of the customer.

Min length0
Max length100
Pattern^https?://.*$
Examplehttps://acme.com
email
string

Email address of the customer. Max 50 characters.

Min length0
Max length50
Pattern^[^@]+@[^@]+\.[^@]+$
Examplejohn.doe@acme.com
eanLocationNumber
string

EAN location number for electronic invoicing.

Example1234567890123
bankAccountNumber
string

Bank account number. Numeric, max 11 digits.

Min length0
Max length11
Pattern^[0-9]*$
Example98765432101
customerCategory
object (Customerdataservice_NamedReference)

Reference object with id and name.

id
string

External unique identifier.

Min length1
Max length2147483647
ExampleID01
name
string

Display name.

Min length1
Max length2147483647
ExampleName
classificationGroup
object (Customerdataservice_NamedReference)

Reference object with id and name.

id
string

External unique identifier.

Min length1
Max length2147483647
ExampleID01
name
string

Display name.

Min length1
Max length2147483647
ExampleName
discountCategory
object (Customerdataservice_NamedReference)

Reference object with id and name.

id
string

External unique identifier.

Min length1
Max length2147483647
ExampleID01
name
string

Display name.

Min length1
Max length2147483647
ExampleName
paymentTerm
object (Customerdataservice_NamedReference)

Reference object with id and name.

id
string

External unique identifier.

Min length1
Max length2147483647
ExampleID01
name
string

Display name.

Min length1
Max length2147483647
ExampleName
deliveryType
object (Customerdataservice_NamedReference)

Reference object with id and name.

id
string

External unique identifier.

Min length1
Max length2147483647
ExampleID01
name
string

Display name.

Min length1
Max length2147483647
ExampleName
deliveryMethod
object (Customerdataservice_NamedReference)

Reference object with id and name.

id
string

External unique identifier.

Min length1
Max length2147483647
ExampleID01
name
string

Display name.

Min length1
Max length2147483647
ExampleName
address
object (Customerdataservice_Address)

Address details.

name
string

Name of the address location.

Min length1
Max length2147483647
ExampleMain Office
drivingDescription
string

Driving directions or description.

ExampleNext to the central station
address1
string

Address line 1.

Min length0
Max length30
Example123 Main St
address2
string

Address line 2.

Min length0
Max length30
ExampleSuite 100
postalCode
string

Postal code.

Min length0
Max length10
Example1234
city
string

City name.

Min length0
Max length30
ExampleMetropolis
country
string

Country name.

ExampleNorway
invoiceAddress
object (Customerdataservice_Address)

Address details.

name
string

Name of the address location.

Min length1
Max length2147483647
ExampleMain Office
drivingDescription
string

Driving directions or description.

ExampleNext to the central station
address1
string

Address line 1.

Min length0
Max length30
Example123 Main St
address2
string

Address line 2.

Min length0
Max length30
ExampleSuite 100
postalCode
string

Postal code.

Min length0
Max length10
Example1234
city
string

City name.

Min length0
Max length30
ExampleMetropolis
country
string

Country name.

ExampleNorway
deliveryAddress
object (Customerdataservice_Address)

Address details.

name
string

Name of the address location.

Min length1
Max length2147483647
ExampleMain Office
drivingDescription
string

Driving directions or description.

ExampleNext to the central station
address1
string

Address line 1.

Min length0
Max length30
Example123 Main St
address2
string

Address line 2.

Min length0
Max length30
ExampleSuite 100
postalCode
string

Postal code.

Min length0
Max length10
Example1234
city
string

City name.

Min length0
Max length30
ExampleMetropolis
country
string

Country name.

ExampleNorway
salesperson
object (Customerdataservice_Salesperson)

Salesperson details.

Example[{code=SP02, name=Bob Brown}]
code
string

Salesperson code.

Min length1
Max length2147483647
ExampleSP01
name
string

Salesperson name.

Min length1
Max length2147483647
ExampleJane Smith
alternativeSalespersons
Array of object (Customerdataservice_Salesperson)

List of alternative salespersons.

Min items0
Max items10
Example[{code=SP02, name=Bob Brown}]
object

Salesperson details.

Example[{code=SP02, name=Bob Brown}]
code
string

Salesperson code.

Min length1
Max length2147483647
ExampleSP01
name
string

Salesperson name.

Min length1
Max length2147483647
ExampleJane Smith
customerCards
Array of object (Customerdataservice_CustomerCard)

List of customer cards.

Min items0
Max items10
Example[{cardType={id=CARDTYPE01, name=Loyalty}, cardNumber=1234567890, barcode=BAR123456, cardHolder=John Doe, blocked=false}]
object

Customer card details.

Example[{cardType={id=CARDTYPE01, name=Loyalty}, cardNumber=1234567890, barcode=BAR123456, cardHolder=John Doe, blocked=false}]
cardType
object (Customerdataservice_NamedReference)

Reference object with id and name.

id
string

External unique identifier.

Min length1
Max length2147483647
ExampleID01
name
string

Display name.

Min length1
Max length2147483647
ExampleName
cardNumber
string

Card number.

Min length1
Max length2147483647
Example1234567890
barcode
string

Barcode for the card.

Min length1
Max length2147483647
ExampleBAR123456
cardHolder
string

Name of the card holder.

Min length1
Max length2147483647
ExampleJohn Doe
blocked
boolean

Indicates if the card is blocked.

Examplefalse
externalIds
Array of object (Customerdataservice_ExternalId)

List of external identifiers.

Min items0
Max items30
object

External identifier from an external system.

system
string

The external system name (e.g., NX).

Min length1
Max length20
ExampleNX
id
string

The identifier in the external system.

Min length1
Max length100
ExampleXYZ123
additionalProperties
Array of object (Customerdataservice_AdditionalProperty)

List of customer properties.

Example[{type=VIP, code=VIP01, value=Gold}]
object

Custom property for the customer.

Example[ { "type": "VIP", "code": "VIP01", "value": "Gold" } ]
type
string

Type of property.

Min length1
Max length2147483647
ExampleVIP
code
string

Property code.

Min length1
Max length2147483647
ExampleVIP01
value
string

Property value.

Min length1
Max length2147483647
ExampleGold
blocked
boolean

Indicates if the customer is blocked.

Examplefalse
creditAllowed
boolean

Indicates if credit is allowed for the customer.

Exampletrue
cashAllowed
boolean

Indicates if cash payment is allowed for the customer.

Examplefalse
requisitionRequired
boolean

Indicates if requisition is required.

Examplefalse
contactPersonRequired
boolean

Indicates if a contact person is required.

Exampletrue
contactPersonRequesterRequired
boolean

Indicates if a contact person requester is required.

Examplefalse
referenceRequired
boolean

Indicates if a reference is required.

Examplefalse
projectRequired
boolean

Indicates if a project is required.

Examplefalse
creditLimit
object (Customerdataservice_Money)

Monetary value.

currency
string

Currency code (ISO 4217).

Valid values[ "NOK", "SEK", "DKK", "EUR", "USD", "GBP", "CHF", "PLN", "CZK", "HUF", "JPY", "AUD", "CAD", "SGD", "CNY", "INR" ]
ExampleNOK
amount
number

Amount in the specified currency.

Minimum0
Maximum10000000
Example10000.0
currentOrderValueInclVat
object (Customerdataservice_Money)

Monetary value.

currency
string

Currency code (ISO 4217).

Valid values[ "NOK", "SEK", "DKK", "EUR", "USD", "GBP", "CHF", "PLN", "CZK", "HUF", "JPY", "AUD", "CAD", "SGD", "CNY", "INR" ]
ExampleNOK
amount
number

Amount in the specified currency.

Minimum0
Maximum10000000
Example10000.0
currentBalanceInclVat
object (Customerdataservice_Money)

Monetary value.

currency
string

Currency code (ISO 4217).

Valid values[ "NOK", "SEK", "DKK", "EUR", "USD", "GBP", "CHF", "PLN", "CZK", "HUF", "JPY", "AUD", "CAD", "SGD", "CNY", "INR" ]
ExampleNOK
amount
number

Amount in the specified currency.

Minimum0
Maximum10000000
Example10000.0
specialAgreement
string

Special agreement details.

ExampleSpecial pricing for Q4
vatFreeCustomer
boolean

Indicates if the customer is VAT free.

Examplefalse
orderDiscount
number

Order discount percentage.

Minimum0
Example5.5
showPriceOnPacknote
boolean

Indicates if price should be shown on packnote.

Exampletrue
customerId
string
Pattern^[A-Za-z0-9]+[A-Za-z0-9_\-:.]*$
Example123
400

HTTP Bad Request

Expand All
object

Object representing error details in responses

title
string

A short, human-readable title for the error.

Min length0
Max length200
ExampleValidation Error
status
integer (int32)

The HTTP status code generated by the origin server for this occurrence of the problem.

Example400
detail
string

A human-readable explanation specific to this occurrence of the problem.

Min length0
Max length250
ExampleOne or more fields are invalid.
instance
string

A URI reference that identifies the specific occurrence of the problem.

Min length0
Max length250
Example/api/containers/123
errors
Array of object (Customerdataservice_ValidationErrorDTO)
Min items0
Max items100
object
fieldName
string
Min length0
Max length100
message
string
Min length0
Max length200
rejectedValue
string
Min length0
Max length200
401

HTTP Unauthorized

object
timestamp
string (date-time)
status
integer (int32)
error
string
path
string
409

HTTP Conflict

Expand All
object

Object representing error details in responses

title
string

A short, human-readable title for the error.

Min length0
Max length200
ExampleValidation Error
status
integer (int32)

The HTTP status code generated by the origin server for this occurrence of the problem.

Example400
detail
string

A human-readable explanation specific to this occurrence of the problem.

Min length0
Max length250
ExampleOne or more fields are invalid.
instance
string

A URI reference that identifies the specific occurrence of the problem.

Min length0
Max length250
Example/api/containers/123
errors
Array of object (Customerdataservice_ValidationErrorDTO)
Min items0
Max items100
object
fieldName
string
Min length0
Max length100
message
string
Min length0
Max length200
rejectedValue
string
Min length0
Max length200
500

HTTP Internal Server Error

Expand All
object

Object representing error details in responses

title
string

A short, human-readable title for the error.

Min length0
Max length200
ExampleValidation Error
status
integer (int32)

The HTTP status code generated by the origin server for this occurrence of the problem.

Example400
detail
string

A human-readable explanation specific to this occurrence of the problem.

Min length0
Max length250
ExampleOne or more fields are invalid.
instance
string

A URI reference that identifies the specific occurrence of the problem.

Min length0
Max length250
Example/api/containers/123
errors
Array of object (Customerdataservice_ValidationErrorDTO)
Min items0
Max items100
object
fieldName
string
Min length0
Max length100
message
string
Min length0
Max length200
rejectedValue
string
Min length0
Max length200