Create a new contact person

Prev Next
Post
/Customercontactpersonservice/api/contact-persons

Create a new contact person with customerId in the request body. The contact person ID will be automatically generated.

Header parameters
X-Idempotency-Key
stringRequired

Idempotency key for safely retrying requests without duplicating operations.

Body parameters
Expand All
object
externalIds
Array of object (Customercontactpersonservice_ExternalId)

List of external identifiers from various external systems.

Min items0
Max items30
Example[{system=NX, id=XYZ123}]
object

External identifier from an external system.

Example[{system=NX, id=XYZ123}]
system
string Required

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

ExampleNX
id
string Required

The identifier in the external system.

ExampleXYZ123
name
string Required

Full name of the contact person.

Min length0
Max length100
ExampleJohn Doe
position
string

Job position or title.

Min length0
Max length50
ExampleManager
requester
boolean

Indicates if the contact person is a requester.

Examplefalse
phone
string

Primary phone number.

Min length0
Max length20
Pattern^\+?[0-9 ]+$
Example+47 123 45 678
mobile
string

Mobile phone number.

Min length0
Max length20
Pattern^\+?[0-9 ]+$
Example+47 987 65 432
email
string Required

Email address of the contact person.

Min length0
Max length100
Examplejohn.doe@example.com
address
object (Customercontactpersonservice_Address)

Address details.

name
string

Name of the address location.

Min length0
Max length100
ExampleHome Office
drivingDescription
string

Driving directions or description.

Min length0
Max length200
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
ExampleApt 5B
postalCode
string

Postal code.

Min length0
Max length4
Pattern^[0-9]*$
Example0123
city
string

City name.

Min length0
Max length30
ExampleOslo
country
string

Country name.

Min length0
Max length50
ExampleNorway
customerId
string Required

Customer ID to associate the contact person with a customer.

ExampleCUST-001
Responses
201

Contact person created successfully

Expand All
object
externalIds
Array of object (Customercontactpersonservice_ExternalId)

List of external identifiers from various external systems.

Min items0
Max items30
Example[{system=NX, id=XYZ123}]
object

External identifier from an external system.

Example[{system=NX, id=XYZ123}]
system
string

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

ExampleNX
id
string

The identifier in the external system.

ExampleXYZ123
name
string

Full name of the contact person.

Min length0
Max length100
ExampleJohn Doe
position
string

Job position or title.

Min length0
Max length50
ExampleManager
requester
boolean

Indicates if the contact person is a requester.

Examplefalse
phone
string

Primary phone number.

Min length0
Max length20
Pattern^\+?[0-9 ]+$
Example+47 123 45 678
mobile
string

Mobile phone number.

Min length0
Max length20
Pattern^\+?[0-9 ]+$
Example+47 987 65 432
email
string

Email address of the contact person.

Min length0
Max length100
Examplejohn.doe@example.com
address
object (Customercontactpersonservice_Address)

Address details.

name
string

Name of the address location.

Min length0
Max length100
ExampleHome Office
drivingDescription
string

Driving directions or description.

Min length0
Max length200
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
ExampleApt 5B
postalCode
string

Postal code.

Min length0
Max length4
Pattern^[0-9]*$
Example0123
city
string

City name.

Min length0
Max length30
ExampleOslo
country
string

Country name.

Min length0
Max length50
ExampleNorway
customerId
string

Identifier of the associated customer.

ExampleCUST-001
contactPersonId
string

Contact person identifier.

Min length0
Max length30
ExampleCP-001
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 (Customercontactpersonservice_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 (Customercontactpersonservice_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 (Customercontactpersonservice_ValidationErrorDTO)
Min items0
Max items100
object
fieldName
string
Min length0
Max length100
message
string
Min length0
Max length200
rejectedValue
string
Min length0
Max length200