API

CRM APIs

POST sales/customers

Creates a new customer

HTTP method POST
URI https://api.rambase.net/sales/customers
Supported formats Xml, Html, Json (ex. $format=json)
Custom fields Custom fields supported
Successful HTTP status code 201
API resource identifier 1820, version 21

The following body must be added to the request. Mouse over fieldnames for description and other useful information about the fields. Note that fields in bold are required/mandatory.

Format:
1
<Customer>
2
     <Name
Name

Required/mandatory field

Name of customer (name of company or surname/familyname/lastname of a person)

>
{String}</Name>
3
     <IsCompany
IsCompany

Indicator if a customer is private entity or a company

Default value: False

This field is optional.

>
{Boolean}</IsCompany>
4
     <FirstName
FirstName

Secondary name of a company or firstname of a person

This field is optional.

>
{String}</FirstName>
5
     <PreferredLanguage
PreferredLanguage

Preferred language for the customer. Is used in prints etc.

Applicable domain values can be found here

Input must match the following regular expression pattern: ^[a-z]{3}$

This field is optional.

>
{String}</PreferredLanguage>
6
     <Website
Website

Customers website/homepage/webpage

This field is optional.

>
{String}</Website>
7
     <Phone
Phone

Customers main phone number

This field is optional.

>
{String}</Phone>
8
     <Fax
Fax

Customers main fax number

This field is optional.

>
{String}</Fax>
9
     <Email
Email

Customers main email

Input must match the following regular expression pattern: ^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$

This field is optional.

>
{String}</Email>
10
     <ExternalReference
ExternalReference

External customer reference/identifier. Can be used in external systems.

This field is optional.

>
{String}</ExternalReference>
11
     <InternalNote
InternalNote

Internal note/notice of the customer. Should not be visible to the customer.

This field is optional.

>
{String}</InternalNote>
12
     <IsRelatedBusinessEntity
IsRelatedBusinessEntity

Identify if a customer is related business entity to the company

Default value: False

This field is optional.

>
{Boolean}</IsRelatedBusinessEntity>
13
     <LegalEntityIdentifier
LegalEntityIdentifier

The customers unique enterprise/organization number.

This field is optional.

>
{String}</LegalEntityIdentifier>
14
     <VATRegistrationNumber
VATRegistrationNumber

Unique number assigned by the relevant tax authority to identify a party for use in relation to value added tax (VAT).

This field is optional.

>
{String}</VATRegistrationNumber>
15
     <Currencies
Currencies

Currencies used by the customer

This field is optional.

>
16
          <Currency
Currency

This field is optional.

>
17
               <CurrencyCode
CurrencyCode

Three character code following the ISO 4217 standard

Applicable domain values can be found here

This field is optional.

>
{String}</CurrencyCode>
18
          </Currency>
19
     </Currencies>
20
     <Sales
Sales

This field is optional.

>
21
          <SalesDistrict
SalesDistrict

A geographic district for which an individual salesperson or sales team holds responsibility

Applicable domain values can be found here

This field is optional.

>
{String}</SalesDistrict>
22
          <Sector
Sector

The sector the customer belongs to.

Applicable domain values can be found here

This field is optional.

>
{String}</Sector>
23
          <MarketSegment
MarketSegment

Market segment of the customer

Applicable domain values can be found here

This field is optional.

>
{String}</MarketSegment>
24
          <MinimumGrossMargin
MinimumGrossMargin

The minimum gross margin in percent for the customer

Minimum value: 0

Maximum value: 99

This field is optional.

>
{Decimal}</MinimumGrossMargin>
25
          <VATHandling
VATHandling

Specifies how value added tax (VAT) should be calculated. Either always include VAT, always exclude VAT or use standard/default VAT rules.

Applicable domain values can be found here

This field is optional.

>
{String}</VATHandling>
26
          <WarrantyPeriod
WarrantyPeriod

Agreement of default warranty period in months

Minimum value: 0

This field is optional.

>
{Integer}</WarrantyPeriod>
27
          <FeeAmount
FeeAmount

This is an amount, in the companies local currency, that by default will be added as fee when a sales order is created for this customer.

Minimum value: 0

This field is optional.

>
{Decimal}</FeeAmount>
28
          <VolumePriceAgreement
VolumePriceAgreement

Special price agreement related to the quantity beeing ordered.

Applicable domain values can be found here

This field is optional.

>
{String}</VolumePriceAgreement>
29
          <ExchangeRateFluctuationAgreement
ExchangeRateFluctuationAgreement

When a sales order is issued, RamBase stores the current exchange rate and the currency the product normally is purchased in. The exchange rate might have changed when the invoice is issued. The exchange rate fluctuation agreement specifies how to handle these differences. The agreement has the format AAA/BBB, where AAA is a percentage of the total invoice, and BBB is the exchange rate fluctuation percentage. E.g. 100/3.0 means that if the rate of exchange on the date a sales order is forwarded to an invoice has changed more than +/- 3% from the rate of exchange, 100% of the invoice amount will be adjusted.

Applicable domain values can be found here

This field is optional.

>
{String}</ExchangeRateFluctuationAgreement>
30
          <SalesAssistant
SalesAssistant

Reference to the employee who is sales assistant for the customer.

This field is optional.

>
31
               <EmployeeId
EmployeeId

Employee identifier

Minimum value: 100

This field is optional.

>
{Integer}</EmployeeId>
32
          </SalesAssistant>
33
          <AccountManager
AccountManager

Reference to the employee who is responsible for the management of sales, and relationship with the customer.

This field is optional.

>
34
               <EmployeeId
EmployeeId

Employee identifier

Minimum value: 100

This field is optional.

>
{Integer}</EmployeeId>
35
          </AccountManager>
36
     </Sales>
37
     <Shipment
Shipment

This field is optional.

>
38
          <OnlyShipEntireSalesOrders
OnlyShipEntireSalesOrders

True if all items of a sales order should be shipped together. The items of a sales order should never be split into several shipments. If sales order is forwarded to shipping advice by bulk handling, this will be controlled by RamBase. Manually forward requires that the users controls this themselves.

This field is optional.

>
{Boolean}</OnlyShipEntireSalesOrders>
39
          <OnlyShipEntireSalesOrderItems
OnlyShipEntireSalesOrderItems

True if the total quantity of a sales order item always should be shipped together. The quantity should never be split into several shipments. If sales order is forwarded to shipping advice by bulk handling, this will be controlled by RamBase. Manually forward requires that the users controls this themselves.

This field is optional.

>
{Boolean}</OnlyShipEntireSalesOrderItems>
40
          <ShipBasedOnConfirmedDeliveryDate
ShipBasedOnConfirmedDeliveryDate

If true, will sheduled shipping date on each item be calculated based on confirmed date rather than requested date.

This field is optional.

>
{Boolean}</ShipBasedOnConfirmedDeliveryDate>
41
          <FreightForEachShipment
FreightForEachShipment

If unchecked there will only be calculated freight on one shipping advice if the particular sales order has serveral shipments.

Default value: False

This field is optional.

>
{Boolean}</FreightForEachShipment>
42
          <ShippingDay
ShippingDay

Specifies when the goods should be shipped. This is used to calculate the scheduled shipping date for each item.

Applicable domain values can be found here

This field is optional.

>
{String}</ShippingDay>
43
          <ConsolidateShippingAdvices
ConsolidateShippingAdvices

If true, sales orders will be consolidated when creating shipping advices via the "Prepare for picking" process the . If false, each sales order will result in seperate shipping advice. The field to use when consolidating is specified in the ShippingAdviceConsolidationField.

This field is optional.

>
{Boolean}</ConsolidateShippingAdvices>
44
          <ShippingAdviceConsolidationField
ShippingAdviceConsolidationField

Field to use when consolidating sales order items into shipping advices in the "Prepare for picking" process.

Applicable domain values can be found here

This field is optional.

>
{String}</ShippingAdviceConsolidationField>
45
          <ShippingAdviceItemSortBy
ShippingAdviceItemSortBy

Items in consolidated shipping advices will be sorted by this fields when they are created in the 'Prepare for picking' process

Applicable domain values can be found here

This field is optional.

>
{String}</ShippingAdviceItemSortBy>
46
          <RequireApprovalIfOverdue
RequireApprovalIfOverdue

True if shipments need approval if there are sales invoices with overdue amount. Default value is retireved from setting: DefaultCreateValueCUSFieldDUEAPPROVE

This field is optional.

>
{Boolean}</RequireApprovalIfOverdue>
47
          <SpecialHandling
SpecialHandling

This field is optional.

>
48
               <SpecialHandlingId
SpecialHandlingId

The special handling code used for this customer.

Minimum value: 0

This field is optional.

>
{Integer}</SpecialHandlingId>
49
          </SpecialHandling>
50
     </Shipment>
51
     <Invoicing
Invoicing

This field is optional.

>
52
          <InterestRate
InterestRate

Interest rate used for sales invoices past duedate

Minimum value: 0

Maximum value: 1000

This field is optional.

>
{Decimal}</InterestRate>
53
          <InterestFeeAmount
InterestFeeAmount

Fixed interest fee used for the customer.

Minimum value: 0

This field is optional.

>
{Decimal}</InterestFeeAmount>
54
          <SalesInvoiceConsolidation
SalesInvoiceConsolidation

Specifies whether or how often shipping advices that origins from this sales order will be consolidated when creating sales invoices.

Applicable domain values can be found here

This field is optional.

>
{String}</SalesInvoiceConsolidation>
55
          <SalesInvoiceConsolidationField
SalesInvoiceConsolidationField

Field name to group by when consolidating shipping advice items into sales invoices.

Applicable domain values can be found here

This field is optional.

>
{String}</SalesInvoiceConsolidationField>
56
          <SalesInvoiceItemSortBy
SalesInvoiceItemSortBy

Field name to sort by when creating sales invoice items.

Applicable domain values can be found here

This field is optional.

>
{String}</SalesInvoiceItemSortBy>
57
          <SendReminders
SendReminders

Set to false if reminder are not be sent to this customer. Default value is retireved from setting: DefaultCreateValueCUSFieldREMINDER

This field is optional.

>
{Boolean}</SendReminders>
58
     </Invoicing>
59
     <Payment
Payment

This field is optional.

>
60
          <PaymentMethod
PaymentMethod

Default payment method for the customer

Applicable domain values can be found here

This field is optional.

>
{String}</PaymentMethod>
61
     </Payment>
62
     <Accounting
Accounting

This field is optional.

>
63
          <CreditLimit
CreditLimit

The maximum amount that the customer may charge on a credit card or borrow from a financial institution.

Minimum value: 0

This field is optional.

>
{Decimal}</CreditLimit>
64
          <CreditInsuranceAmount
CreditInsuranceAmount

Credit amount insured for the customer

Minimum value: 0

This field is optional.

>
{Decimal}</CreditInsuranceAmount>
65
          <CreditInsuranceCompany
CreditInsuranceCompany

Insurance company used by the customer for credit insurance

This field is optional.

>
{String}</CreditInsuranceCompany>
66
     </Accounting>
67
</Customer>
1
{
2
     "customer": {
3
          "name
Name

Required/mandatory field

Name of customer (name of company or surname/familyname/lastname of a person)

":
"{String}",
4
          "isCompany
IsCompany

Indicator if a customer is private entity or a company

Default value: False

This field is optional.

":
"{Boolean}",
5
          "firstName
FirstName

Secondary name of a company or firstname of a person

This field is optional.

":
"{String}",
6
          "preferredLanguage
PreferredLanguage

Preferred language for the customer. Is used in prints etc.

Applicable domain values can be found here

Input must match the following regular expression pattern: ^[a-z]{3}$

This field is optional.

":
"{String}",
7
          "website
Website

Customers website/homepage/webpage

This field is optional.

":
"{String}",
8
          "phone
Phone

Customers main phone number

This field is optional.

":
"{String}",
9
          "fax
Fax

Customers main fax number

This field is optional.

":
"{String}",
10
          "email
Email

Customers main email

Input must match the following regular expression pattern: ^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$

This field is optional.

":
"{String}",
11
          "externalReference
ExternalReference

External customer reference/identifier. Can be used in external systems.

This field is optional.

":
"{String}",
12
          "internalNote
InternalNote

Internal note/notice of the customer. Should not be visible to the customer.

This field is optional.

":
"{String}",
13
          "isRelatedBusinessEntity
IsRelatedBusinessEntity

Identify if a customer is related business entity to the company

Default value: False

This field is optional.

":
"{Boolean}",
14
          "legalEntityIdentifier
LegalEntityIdentifier

The customers unique enterprise/organization number.

This field is optional.

":
"{String}",
15
          "vATRegistrationNumber
VATRegistrationNumber

Unique number assigned by the relevant tax authority to identify a party for use in relation to value added tax (VAT).

This field is optional.

":
"{String}",
16
          "currencies
Currencies

Currencies used by the customer

This field is optional.

":
[
17
               {
18
                    "currencyCode
CurrencyCode

Three character code following the ISO 4217 standard

Applicable domain values can be found here

This field is optional.

":
"{String}"
19
               }
20
          ],
21
          "sales
Sales

This field is optional.

":
{
22
               "salesDistrict
SalesDistrict

A geographic district for which an individual salesperson or sales team holds responsibility

Applicable domain values can be found here

This field is optional.

":
"{String}",
23
               "sector
Sector

The sector the customer belongs to.

Applicable domain values can be found here

This field is optional.

":
"{String}",
24
               "marketSegment
MarketSegment

Market segment of the customer

Applicable domain values can be found here

This field is optional.

":
"{String}",
25
               "minimumGrossMargin
MinimumGrossMargin

The minimum gross margin in percent for the customer

Minimum value: 0

Maximum value: 99

This field is optional.

":
"{Decimal}",
26
               "vATHandling
VATHandling

Specifies how value added tax (VAT) should be calculated. Either always include VAT, always exclude VAT or use standard/default VAT rules.

Applicable domain values can be found here

This field is optional.

":
"{String}",
27
               "warrantyPeriod
WarrantyPeriod

Agreement of default warranty period in months

Minimum value: 0

This field is optional.

":
"{Integer}",
28
               "feeAmount
FeeAmount

This is an amount, in the companies local currency, that by default will be added as fee when a sales order is created for this customer.

Minimum value: 0

This field is optional.

":
"{Decimal}",
29
               "volumePriceAgreement
VolumePriceAgreement

Special price agreement related to the quantity beeing ordered.

Applicable domain values can be found here

This field is optional.

":
"{String}",
30
               "exchangeRateFluctuationAgreement
ExchangeRateFluctuationAgreement

When a sales order is issued, RamBase stores the current exchange rate and the currency the product normally is purchased in. The exchange rate might have changed when the invoice is issued. The exchange rate fluctuation agreement specifies how to handle these differences. The agreement has the format AAA/BBB, where AAA is a percentage of the total invoice, and BBB is the exchange rate fluctuation percentage. E.g. 100/3.0 means that if the rate of exchange on the date a sales order is forwarded to an invoice has changed more than +/- 3% from the rate of exchange, 100% of the invoice amount will be adjusted.

Applicable domain values can be found here

This field is optional.

":
"{String}",
31
               "salesAssistant
SalesAssistant

Reference to the employee who is sales assistant for the customer.

This field is optional.

":
{
32
                    "employeeId
EmployeeId

Employee identifier

Minimum value: 100

This field is optional.

":
"{Integer}"
33
               },
34
               "accountManager
AccountManager

Reference to the employee who is responsible for the management of sales, and relationship with the customer.

This field is optional.

":
{
35
                    "employeeId
EmployeeId

Employee identifier

Minimum value: 100

This field is optional.

":
"{Integer}"
36
               }
37
          },
38
          "shipment
Shipment

This field is optional.

":
{
39
               "onlyShipEntireSalesOrders
OnlyShipEntireSalesOrders

True if all items of a sales order should be shipped together. The items of a sales order should never be split into several shipments. If sales order is forwarded to shipping advice by bulk handling, this will be controlled by RamBase. Manually forward requires that the users controls this themselves.

This field is optional.

":
"{Boolean}",
40
               "onlyShipEntireSalesOrderItems
OnlyShipEntireSalesOrderItems

True if the total quantity of a sales order item always should be shipped together. The quantity should never be split into several shipments. If sales order is forwarded to shipping advice by bulk handling, this will be controlled by RamBase. Manually forward requires that the users controls this themselves.

This field is optional.

":
"{Boolean}",
41
               "shipBasedOnConfirmedDeliveryDate
ShipBasedOnConfirmedDeliveryDate

If true, will sheduled shipping date on each item be calculated based on confirmed date rather than requested date.

This field is optional.

":
"{Boolean}",
42
               "freightForEachShipment
FreightForEachShipment

If unchecked there will only be calculated freight on one shipping advice if the particular sales order has serveral shipments.

Default value: False

This field is optional.

":
"{Boolean}",
43
               "shippingDay
ShippingDay

Specifies when the goods should be shipped. This is used to calculate the scheduled shipping date for each item.

Applicable domain values can be found here

This field is optional.

":
"{String}",
44
               "consolidateShippingAdvices
ConsolidateShippingAdvices

If true, sales orders will be consolidated when creating shipping advices via the "Prepare for picking" process the . If false, each sales order will result in seperate shipping advice. The field to use when consolidating is specified in the ShippingAdviceConsolidationField.

This field is optional.

":
"{Boolean}",
45
               "shippingAdviceConsolidationField
ShippingAdviceConsolidationField

Field to use when consolidating sales order items into shipping advices in the "Prepare for picking" process.

Applicable domain values can be found here

This field is optional.

":
"{String}",
46
               "shippingAdviceItemSortBy
ShippingAdviceItemSortBy

Items in consolidated shipping advices will be sorted by this fields when they are created in the 'Prepare for picking' process

Applicable domain values can be found here

This field is optional.

":
"{String}",
47
               "requireApprovalIfOverdue
RequireApprovalIfOverdue

True if shipments need approval if there are sales invoices with overdue amount. Default value is retireved from setting: DefaultCreateValueCUSFieldDUEAPPROVE

This field is optional.

":
"{Boolean}",
48
               "specialHandling
SpecialHandling

This field is optional.

":
{
49
                    "specialHandlingId
SpecialHandlingId

The special handling code used for this customer.

Minimum value: 0

This field is optional.

":
"{Integer}"
50
               }
51
          },
52
          "invoicing
Invoicing

This field is optional.

":
{
53
               "interestRate
InterestRate

Interest rate used for sales invoices past duedate

Minimum value: 0

Maximum value: 1000

This field is optional.

":
"{Decimal}",
54
               "interestFeeAmount
InterestFeeAmount

Fixed interest fee used for the customer.

Minimum value: 0

This field is optional.

":
"{Decimal}",
55
               "salesInvoiceConsolidation
SalesInvoiceConsolidation

Specifies whether or how often shipping advices that origins from this sales order will be consolidated when creating sales invoices.

Applicable domain values can be found here

This field is optional.

":
"{String}",
56
               "salesInvoiceConsolidationField
SalesInvoiceConsolidationField

Field name to group by when consolidating shipping advice items into sales invoices.

Applicable domain values can be found here

This field is optional.

":
"{String}",
57
               "salesInvoiceItemSortBy
SalesInvoiceItemSortBy

Field name to sort by when creating sales invoice items.

Applicable domain values can be found here

This field is optional.

":
"{String}",
58
               "sendReminders
SendReminders

Set to false if reminder are not be sent to this customer. Default value is retireved from setting: DefaultCreateValueCUSFieldREMINDER

This field is optional.

":
"{Boolean}"
59
          },
60
          "payment
Payment

This field is optional.

":
{
61
               "paymentMethod
PaymentMethod

Default payment method for the customer

Applicable domain values can be found here

This field is optional.

":
"{String}"
62
          },
63
          "accounting
Accounting

This field is optional.

":
{
64
               "creditLimit
CreditLimit

The maximum amount that the customer may charge on a credit card or borrow from a financial institution.

Minimum value: 0

This field is optional.

":
"{Decimal}",
65
               "creditInsuranceAmount
CreditInsuranceAmount

Credit amount insured for the customer

Minimum value: 0

This field is optional.

":
"{Decimal}",
66
               "creditInsuranceCompany
CreditInsuranceCompany

Insurance company used by the customer for credit insurance

This field is optional.

":
"{String}"
67
          }
68
     }
69
}

The query string is placed after the resource URL, seperated with a questionmark (?). The query string is composed of a series of query parameters with values. See the page about query parameters on how to use these parameters.

$access_token String, optional After successful login you get an access token which needs to be provided in all API requests. Even though it is possible to pass this token as query parameter, we recommended passing it using the HTTP request header as described in Authorization. Note that all access tokens have an expiration time.
$db String, optional Set the database/company for the request
$useMinimumVersion Integer, optional Used to run a new version of an API resource when your API client is running a deprecated API resource. See the Breaking changes page for more information.
$lang String, optional Specifies the language used in the response, following the 3-letter ISO-639-1 [lll]
$showCustomFields Boolean, optional Set to "true" to include custom fields. Default value is false.

Read more about filters and sorting on how to use filter parameters and named filters.

Read more about filters and sorting on how to use sortable parameters

Requesting this resource will yield the following response. Mouse over fieldnames (or fieldgroups) for descriptions and other useful information about the fields.

Please note that some fields may be removed from the response, based on user roles/duties/permissions.

Format:
1
1

List of available operations/actions for this resource.
See the operations documentation for more information about API operations.

Possible error codes the response might return:

Error 101015 HTTP 404 Permission not found
Error 101086 HTTP 400 Missing required argument {0} for description
Error 101087 HTTP 400 Description argument/result mismatch
Error 104177 HTTP 400 Output object definition is not active
Error 109661 HTTP 400 To enable Peppol/EHF, the customer must have an enterprise number. Please add the enterprise number in the customer settings before proceeding.
Error 101965 HTTP 400 Contact is not valid for this customer
Error 101964 HTTP 400 Customer ID is not valid for this output condition
Error 100200 HTTP 404 Special handling code not found
Error 102751 HTTP 400 Selected pricelist is not active
Error 102939 HTTP 400 Customer can not be blocked for orders before active bids are deleted