POST api/customers

Adds an customer

Request Information

URI Parameters

None.

Body Parameters

CustomerPostRequest
NameDescriptionTypeAdditional information
CustomerNo

Optional CustomerNo used when creating a new Customer

If not present in JSON or set to null will use the proper business setting to generate a new CustomerNo

integer

None.

CustomerNo

Customer number

integer

Required

BranchId

Id for branch

integer

None.

SearchCode

Search code

string

Required

Max length: 10

Min length: 1

Name

Name

string

Required

Max length: 50

Min length: 1

OrgNo

Organization number

string

Max length: 30

Address1

Address line 1

string

Max length: 100

Address2

Address line 2

string

Max length: 100

Address3

Address line 3

string

Max length: 100

PostalCode

Postal code

string

Max length: 10

Town

Town

string

Max length: 50

CountryId

Id of country

string

Required

Max length: 2

BoardHome

Registered office

string

Max length: 50

Phone1

Phone

string

Max length: 50

Phone2

Mobile

string

Max length: 50

WebSite

Web site

string

Max length: 100

Email

Email address

string

Max length: 50

Note

Note

string

Max length: 4000

PreferredCultureId

Id of preferred culture
Valid values are:
sv-SE
fi-FI
nb-NO
en-GB
en-IR
en-US
da-DK

string

Max length: 5

VatRegistrationNumber

VAT registration number

string

Max length: 50

CustomerCategoryId1

Id of customer category 1

integer

None.

CustomerCategoryId2

Id of customer category 2

integer

None.

ReferencePerson

Reference person

string

Max length: 50

ContactPerson

Contact person

string

Max length: 50

DistrictId

Id of district

integer

None.

PaysVAT

True if customer pays VAT

boolean

None.

BreakdownServiceTypeId

Id of breakdown service type

integer

None.

YourReference

Your reference

string

Max length: 20

RequisitionOrderNumber

Requisition order number

string

Max length: 40

InternalWorkingOrderNumber

Internal working order number

string

Max length: 40

ParentCustomerNo

Parent customer number

integer

None.

SalesPerson

Sales person

string

Max length: 128

Export

Export

boolean

Required

WithinEU

True if customer is within EU

boolean

Required

Inactive

True if customer is inactive

boolean

Required

TransportationScheduleId

Id of transportation schedule

integer

None.

IsCompany

True if customer is company, otherwise customer is private

boolean

None.

GDPRConsentDate

Gets the date when the customer has given consent for data storage and processing.

date

None.

CustomerType

Customer type

string

Max length: 256

DocumentPath

Document path

string

Max length: 200

ExternalReference

External reference

string

Max length: 50

GlobalLocationNumber

Global locaction number

string

Max length: 13

Min length: 13

InterestInvoice

Interest invoice

boolean

None.

IsCashCustomer

True if customer is an cash customer

boolean

None.

RegionId

Id of region

integer

None.

Remarks

None.

Example

None.

Request Formats

application/json, text/json

Sample:
{
  "CustomerNo": 1,
  "BranchId": 1,
  "SearchCode": "sample string 2",
  "Name": "sample string 3",
  "OrgNo": "sample string 4",
  "Address1": "sample string 5",
  "Address2": "sample string 6",
  "Address3": "sample string 7",
  "PostalCode": "sample string 8",
  "Town": "sample string 9",
  "CountryId": "sample string 10",
  "BoardHome": "sample string 11",
  "Phone1": "sample string 12",
  "Phone2": "sample string 13",
  "WebSite": "sample string 14",
  "Email": "sample string 15",
  "Note": "sample string 16",
  "PreferredCultureId": "sample string 17",
  "VatRegistrationNumber": "sample string 18",
  "CustomerCategoryId1": 1,
  "CustomerCategoryId2": 1,
  "ReferencePerson": "sample string 19",
  "ContactPerson": "sample string 20",
  "DistrictId": 1,
  "PaysVAT": true,
  "BreakdownServiceTypeId": 1,
  "YourReference": "sample string 22",
  "RequisitionOrderNumber": "sample string 23",
  "InternalWorkingOrderNumber": "sample string 24",
  "ParentCustomerNo": 1,
  "SalesPerson": "sample string 25",
  "Export": true,
  "WithinEU": true,
  "Inactive": true,
  "TransportationScheduleId": 1,
  "IsCompany": true,
  "GDPRConsentDate": "12/21/2025 1:06:02 PM",
  "CustomerType": "sample string 29",
  "DocumentPath": "sample string 30",
  "ExternalReference": "sample string 31",
  "GlobalLocationNumber": "sample string 32",
  "InterestInvoice": true,
  "IsCashCustomer": true,
  "RegionId": 1
}

application/xml, text/xml

Sample:
<CustomerPostRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Business">
  <Address1>sample string 5</Address1>
  <Address2>sample string 6</Address2>
  <Address3>sample string 7</Address3>
  <BoardHome>sample string 11</BoardHome>
  <BranchId>1</BranchId>
  <BreakdownServiceTypeId>1</BreakdownServiceTypeId>
  <ContactPerson>sample string 20</ContactPerson>
  <CountryId>sample string 10</CountryId>
  <CustomerCategoryId1>1</CustomerCategoryId1>
  <CustomerCategoryId2>1</CustomerCategoryId2>
  <CustomerNo xmlns:d2p1="http://www.w3.org/2001/XMLSchema" i:type="d2p1:long">1</CustomerNo>
  <CustomerType>sample string 29</CustomerType>
  <DistrictId>1</DistrictId>
  <DocumentPath>sample string 30</DocumentPath>
  <Email>sample string 15</Email>
  <Export>true</Export>
  <ExternalReference>sample string 31</ExternalReference>
  <GDPRConsentDate>2025-12-21T13:06:02.5875321+00:00</GDPRConsentDate>
  <GlobalLocationNumber>sample string 32</GlobalLocationNumber>
  <Inactive>true</Inactive>
  <InterestInvoice>true</InterestInvoice>
  <InternalWorkingOrderNumber>sample string 24</InternalWorkingOrderNumber>
  <IsCashCustomer>true</IsCashCustomer>
  <IsCompany>true</IsCompany>
  <Name>sample string 3</Name>
  <Note>sample string 16</Note>
  <OrgNo>sample string 4</OrgNo>
  <ParentCustomerNo>1</ParentCustomerNo>
  <PaysVAT>true</PaysVAT>
  <Phone1>sample string 12</Phone1>
  <Phone2>sample string 13</Phone2>
  <PostalCode>sample string 8</PostalCode>
  <PreferredCultureId>sample string 17</PreferredCultureId>
  <ReferencePerson>sample string 19</ReferencePerson>
  <RegionId>1</RegionId>
  <RequisitionOrderNumber>sample string 23</RequisitionOrderNumber>
  <SalesPerson>sample string 25</SalesPerson>
  <SearchCode>sample string 2</SearchCode>
  <Town>sample string 9</Town>
  <TransportationScheduleId>1</TransportationScheduleId>
  <VatRegistrationNumber>sample string 18</VatRegistrationNumber>
  <WebSite>sample string 14</WebSite>
  <WithinEU>true</WithinEU>
  <YourReference>sample string 22</YourReference>
  <CustomerNo xmlns:d2p1="http://www.w3.org/2001/XMLSchema" i:type="d2p1:long">1</CustomerNo>
</CustomerPostRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'CustomerPostRequest'.

Response Information

Resource Description

CustomerPostResponse
NameDescriptionTypeAdditional information
Errors

List of errors when adding customer

Collection of PostCustomerError

None.

Success

Returns true if customer is added

boolean

None.

CustomerNumber

The generated customerNumber

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "Errors": [
    {
      "ErrorCode": 1,
      "ErrorMessage": "sample string 1"
    },
    {
      "ErrorCode": 1,
      "ErrorMessage": "sample string 1"
    }
  ],
  "Success": true,
  "CustomerNumber": 1
}

application/xml, text/xml

Sample:
<CustomerPostResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Business">
  <CustomerNumber>1</CustomerNumber>
  <Errors>
    <PostCustomerError>
      <ErrorCode>InternalServerError</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </PostCustomerError>
    <PostCustomerError>
      <ErrorCode>InternalServerError</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </PostCustomerError>
  </Errors>
  <Success>true</Success>
</CustomerPostResponse>