API

Sales APIs

PUT sales/orders/{salesOrderId}/items/{itemId}

Stores information about sales order item. All amounts should be in the currency of the sales order. Note that DiscountPercent will be ignored when Discount is provided. Note also that Discount, DiscountPercent and GrossPrice will be ignored when GrossMargin is provided.

HTTP method PUT
URI https://api.rambase.net/sales/orders/{salesOrderId}/items/{itemId}
Supported formats Xml, Html, Json (ex. $format=json)
- URI parameter {salesOrderId} Sales order identifier
Integer, minimum 100000
- URI parameter {itemId} Sales order item identifier
Integer, minimum 1
Custom fields Custom fields supported
Successful HTTP status code 200
API resource identifier 1966, version 52

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
<SalesOrderItem
SalesOrderItem

This field is optional.

>
2
     <RequestedDeliveryDate
RequestedDeliveryDate

The delivery date as requested by the customer.

This field is optional.

>
{Date}</RequestedDeliveryDate>
3
     <ConfirmedDeliveryDate
ConfirmedDeliveryDate

Confirmed date of delivery. Date of which the customer can expect the arriving goods

This field is optional.

>
{Date}</ConfirmedDeliveryDate>
4
     <IsConfirmedDeliveryDateLocked
IsConfirmedDeliveryDateLocked

If confirmed delivery date in sales order item (COA) is locked, this date should not be re-calculated automatically.

This field is optional.

>
{Boolean}</IsConfirmedDeliveryDateLocked>
5
     <CustomersReferenceNumber
CustomersReferenceNumber

Customers item reference number. Typically to the customers internal system.

This field is optional.

>
{String}</CustomersReferenceNumber>
6
     <CustomersProductName
CustomersProductName

Customers internal name of the product. Retrieved from the product.

This field is optional.

>
{String}</CustomersProductName>
7
     <EquivalentProductName
EquivalentProductName

Name of product with equivalent behavior and attributes. Can be used for same purpose.

This field is optional.

>
{String}</EquivalentProductName>
8
     <RequestedProductStructureRevision
RequestedProductStructureRevision

The revision will typically be a major change, as opposed to minor changes stored in the version of the product structure.

This field is optional.

>
{String}</RequestedProductStructureRevision>
9
     <ProductDescription
ProductDescription

Description of the item. If not specified, the description is by default copied from the product.

This field is optional.

>
{String}</ProductDescription>
10
     <Note
Note

Additional information regarding the item (free text). Might be visible to customers/suppliers.

This field is optional.

>
{String}</Note>
11
     <GrossMargin
GrossMargin

Gross margin of the item.

Minimum value: -100

Maximum value: 100

This field is optional.

>
{Decimal}</GrossMargin>
12
     <DiscountPercent
DiscountPercent

The discount in percent for this item.

Minimum value: 0

Maximum value: 100

This field is optional.

>
{Decimal}</DiscountPercent>
13
     <Quantity
Quantity

Number of units ordered

Minimum value: 0

This field is optional.

>
{Decimal}</Quantity>
14
     <RequireSerialNumberBeforeShipping
RequireSerialNumberBeforeShipping

True if serial number is required before shipping. Note that if the product has set this value to true, this can not be overridden.

This field is optional.

>
{Boolean}</RequireSerialNumberBeforeShipping>
15
     <IsBlockedForProduction
IsBlockedForProduction

True if a new production is not to be started automatically based on this sales order item.

This field is optional.

>
{Boolean}</IsBlockedForProduction>
16
     <EndCustomer
EndCustomer

End customer

This field is optional.

>
17
          <CustomerId
CustomerId

Customer identifier

Minimum value: 10000

This field is optional.

>
{Integer}</CustomerId>
18
     </EndCustomer>
19
     <Warranty
Warranty

This field is optional.

>
20
          <WarrantyExpirationDate
WarrantyExpirationDate

Date of warranty expiration.

This field is optional.

>
{Date}</WarrantyExpirationDate>
21
          <IsPaymentCoveredByWarranty
IsPaymentCoveredByWarranty

True if payment of item will be covered by warranty. For sales order items that are a part of the repair process, it means that these will not be invoiced.

This field is optional.

>
{Boolean}</IsPaymentCoveredByWarranty>
22
     </Warranty>
23
     <Price
Price

This field is optional.

>
24
          <GrossPrice
GrossPrice

Represents the price per unit before any discounting is applied.

This field is optional.

>
{Decimal}</GrossPrice>
25
          <Discount
Discount

The discount for the item.

Minimum value: 0

This field is optional.

>
{Decimal}</Discount>
26
     </Price>
27
     <Location
Location

This field is optional.

>
28
          <LocationId
LocationId

Location identifier

Minimum value: 10000

This field is optional.

>
{Integer}</LocationId>
29
     </Location>
30
     <Seller
Seller

Reference to the seller of the item

This field is optional.

>
31
          <EmployeeId
EmployeeId

Employee identifier

Minimum value: 100

This field is optional.

>
{Integer}</EmployeeId>
32
     </Seller>
33
     <Product
Product

This field is optional.

>
34
          <ProductId
ProductId

Product identifier

Minimum value: 10000

This field is optional.

>
{Integer}</ProductId>
35
     </Product>
36
     <LandedCost
LandedCost

This field is optional.

>
37
          <PurchaseCurrency
PurchaseCurrency

Purchase currency is the currency this product normally is purchased in. This is also the base currency used in the gross margin calculation. By default the purchase currency is retrieved from the product.

Applicable domain values can be found here

This field is optional.

>
{String}</PurchaseCurrency>
38
          <PurchaseExchangeRate
PurchaseExchangeRate

Exchange rate between document currency and purchase currency. Used in landed cost calculations.

This field is optional.

>
{Decimal}</PurchaseExchangeRate>
39
          <PurchasePrice
PurchasePrice

Purchase price for each unit

Minimum value: 0

This field is optional.

>
{Decimal}</PurchasePrice>
40
          <DerivedFrom
DerivedFrom

This field is optional.

>
41
               <PurchaseQuoteItemId
PurchaseQuoteItemId

Purchase quote item identifier

Minimum value: 1

This field is optional.

>
{Integer}</PurchaseQuoteItemId>
42
               <PurchaseQuote
PurchaseQuote

This field is optional.

>
43
                    <Database
Database

Database of the object. If not provided the current database will be used.

This field is optional.

>
{String}</Database>
44
                    <PurchaseQuoteId
PurchaseQuoteId

Purchase quote identifier

Minimum value: 100000

This field is optional.

>
{Integer}</PurchaseQuoteId>
45
               </PurchaseQuote>
46
          </DerivedFrom>
47
     </LandedCost>
48
     <Accounting
Accounting

Accounting details for the item, including fixed/system dimensions. For all dimensions, see seperate resource.

This field is optional.

>
49
          <VATCodeDefinition
VATCodeDefinition

This field is optional.

>
50
               <VATCode
VATCode

Code that determines VAT rules used for VAT calculations.

This field is optional.

>
{String}</VATCode>
51
          </VATCodeDefinition>
52
     </Accounting>
53
     <ForwardedFrom
ForwardedFrom

The preceding/previous/source item.

This field is optional.

>
54
          <CausedBy
CausedBy

States who has requested the change of the sales order.

Applicable domain values can be found here

This field is optional.

>
{String}</CausedBy>
55
          <ChangeReason
ChangeReason

States the reason why the sales order item was forwarded

Applicable domain values can be found here

This field is optional.

>
{String}</ChangeReason>
56
     </ForwardedFrom>
57
     <RecurringInvoicing
RecurringInvoicing

This field is optional.

>
58
          <StartDate
StartDate

Start date of subscription or rental item

This field is optional.

>
{Date}</StartDate>
59
          <ExpectedEndDate
ExpectedEndDate

Expected end date of subscription or rental item

This field is optional.

>
{Date}</ExpectedEndDate>
60
          <PriceChangeAgreement
PriceChangeAgreement

Defines if and how the recurring price can be updated

Applicable domain values can be found here

This field is optional.

>
{Integer}</PriceChangeAgreement>
61
          <RecurringPrice
RecurringPrice

This field is optional.

>
62
               <RecurringPriceId
RecurringPriceId

Recurring price indentifier

Minimum value: 100000

This field is optional.

>
{Integer}</RecurringPriceId>
63
          </RecurringPrice>
64
     </RecurringInvoicing>
65
</SalesOrderItem>
1
{
2
     "salesOrderItem
SalesOrderItem

This field is optional.

":
{
3
          "requestedDeliveryDate
RequestedDeliveryDate

The delivery date as requested by the customer.

This field is optional.

":
"{Date}",
4
          "confirmedDeliveryDate
ConfirmedDeliveryDate

Confirmed date of delivery. Date of which the customer can expect the arriving goods

This field is optional.

":
"{Date}",
5
          "isConfirmedDeliveryDateLocked
IsConfirmedDeliveryDateLocked

If confirmed delivery date in sales order item (COA) is locked, this date should not be re-calculated automatically.

This field is optional.

":
"{Boolean}",
6
          "customersReferenceNumber
CustomersReferenceNumber

Customers item reference number. Typically to the customers internal system.

This field is optional.

":
"{String}",
7
          "customersProductName
CustomersProductName

Customers internal name of the product. Retrieved from the product.

This field is optional.

":
"{String}",
8
          "equivalentProductName
EquivalentProductName

Name of product with equivalent behavior and attributes. Can be used for same purpose.

This field is optional.

":
"{String}",
9
          "requestedProductStructureRevision
RequestedProductStructureRevision

The revision will typically be a major change, as opposed to minor changes stored in the version of the product structure.

This field is optional.

":
"{String}",
10
          "productDescription
ProductDescription

Description of the item. If not specified, the description is by default copied from the product.

This field is optional.

":
"{String}",
11
          "note
Note

Additional information regarding the item (free text). Might be visible to customers/suppliers.

This field is optional.

":
"{String}",
12
          "grossMargin
GrossMargin

Gross margin of the item.

Minimum value: -100

Maximum value: 100

This field is optional.

":
"{Decimal}",
13
          "discountPercent
DiscountPercent

The discount in percent for this item.

Minimum value: 0

Maximum value: 100

This field is optional.

":
"{Decimal}",
14
          "quantity
Quantity

Number of units ordered

Minimum value: 0

This field is optional.

":
"{Decimal}",
15
          "requireSerialNumberBeforeShipping
RequireSerialNumberBeforeShipping

True if serial number is required before shipping. Note that if the product has set this value to true, this can not be overridden.

This field is optional.

":
"{Boolean}",
16
          "isBlockedForProduction
IsBlockedForProduction

True if a new production is not to be started automatically based on this sales order item.

This field is optional.

":
"{Boolean}",
17
          "endCustomer
EndCustomer

End customer

This field is optional.

":
{
18
               "customerId
CustomerId

Customer identifier

Minimum value: 10000

This field is optional.

":
"{Integer}"
19
          },
20
          "warranty
Warranty

This field is optional.

":
{
21
               "warrantyExpirationDate
WarrantyExpirationDate

Date of warranty expiration.

This field is optional.

":
"{Date}",
22
               "isPaymentCoveredByWarranty
IsPaymentCoveredByWarranty

True if payment of item will be covered by warranty. For sales order items that are a part of the repair process, it means that these will not be invoiced.

This field is optional.

":
"{Boolean}"
23
          },
24
          "price
Price

This field is optional.

":
{
25
               "grossPrice
GrossPrice

Represents the price per unit before any discounting is applied.

This field is optional.

":
"{Decimal}",
26
               "discount
Discount

The discount for the item.

Minimum value: 0

This field is optional.

":
"{Decimal}"
27
          },
28
          "location
Location

This field is optional.

":
{
29
               "locationId
LocationId

Location identifier

Minimum value: 10000

This field is optional.

":
"{Integer}"
30
          },
31
          "seller
Seller

Reference to the seller of the item

This field is optional.

":
{
32
               "employeeId
EmployeeId

Employee identifier

Minimum value: 100

This field is optional.

":
"{Integer}"
33
          },
34
          "product
Product

This field is optional.

":
{
35
               "productId
ProductId

Product identifier

Minimum value: 10000

This field is optional.

":
"{Integer}"
36
          },
37
          "landedCost
LandedCost

This field is optional.

":
{
38
               "purchaseCurrency
PurchaseCurrency

Purchase currency is the currency this product normally is purchased in. This is also the base currency used in the gross margin calculation. By default the purchase currency is retrieved from the product.

Applicable domain values can be found here

This field is optional.

":
"{String}",
39
               "purchaseExchangeRate
PurchaseExchangeRate

Exchange rate between document currency and purchase currency. Used in landed cost calculations.

This field is optional.

":
"{Decimal}",
40
               "purchasePrice
PurchasePrice

Purchase price for each unit

Minimum value: 0

This field is optional.

":
"{Decimal}",
41
               "derivedFrom
DerivedFrom

This field is optional.

":
{
42
                    "purchaseQuoteItemId
PurchaseQuoteItemId

Purchase quote item identifier

Minimum value: 1

This field is optional.

":
"{Integer}",
43
                    "purchaseQuote
PurchaseQuote

This field is optional.

":
{
44
                         "database
Database

Database of the object. If not provided the current database will be used.

This field is optional.

":
"{String}",
45
                         "purchaseQuoteId
PurchaseQuoteId

Purchase quote identifier

Minimum value: 100000

This field is optional.

":
"{Integer}"
46
                    }
47
               }
48
          },
49
          "accounting
Accounting

Accounting details for the item, including fixed/system dimensions. For all dimensions, see seperate resource.

This field is optional.

":
{
50
               "vATCodeDefinition
VATCodeDefinition

This field is optional.

":
{
51
                    "vATCode
VATCode

Code that determines VAT rules used for VAT calculations.

This field is optional.

":
"{String}"
52
               }
53
          },
54
          "forwardedFrom
ForwardedFrom

The preceding/previous/source item.

This field is optional.

":
{
55
               "causedBy
CausedBy

States who has requested the change of the sales order.

Applicable domain values can be found here

This field is optional.

":
"{String}",
56
               "changeReason
ChangeReason

States the reason why the sales order item was forwarded

Applicable domain values can be found here

This field is optional.

":
"{String}"
57
          },
58
          "recurringInvoicing
RecurringInvoicing

This field is optional.

":
{
59
               "startDate
StartDate

Start date of subscription or rental item

This field is optional.

":
"{Date}",
60
               "expectedEndDate
ExpectedEndDate

Expected end date of subscription or rental item

This field is optional.

":
"{Date}",
61
               "priceChangeAgreement
PriceChangeAgreement

Defines if and how the recurring price can be updated

Applicable domain values can be found here

This field is optional.

":
"{Integer}",
62
               "recurringPrice
RecurringPrice

This field is optional.

":
{
63
                    "recurringPriceId
RecurringPriceId

Recurring price indentifier

Minimum value: 100000

This field is optional.

":
"{Integer}"
64
               }
65
          }
66
     }
67
}

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.
$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. Fields colored in grey is expandable 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 102733 HTTP 400 Formula can not be empty
Error 102750 HTTP 400 Number of parameter values does not match the number of parameters in the formula
Error 102749 HTTP 400 Missing parameter value for parameter {0}
Error 102747 HTTP 400 Error in formula: {0}
Error 103343 HTTP 400 Illegal update : Accountingperiod {0} is closed.
Error 103342 HTTP 400 Illegal Update : Accountingperiod {0} has agio calculations.
Error 106408 HTTP 403 You have no permission to create subscription item in sales order
Error 106957 HTTP 400 Only rental or subscription products can be used in recurring contract's lines
Error 106962 HTTP 400 Product of this type (WP) cannot be added to this type of sales order
Error 107055 HTTP 400 The rental date can only be set back {0} days
Error 102484 HTTP 400 Asset is required for general ledger account {0}
Error 102485 HTTP 400 Dimension {0} ({1}) is required for general ledger account {2}
Error 101313 HTTP 400 Department number is not valid: {0}
Error 101320 HTTP 400 The project number is not valid: {0}
Error 101500 HTTP 400 Project {0} could not be used : Check project FromPeriod and ToPeriod.
Error 101501 HTTP 400 Asset is not allowed on general ledger account {0}
Error 101326 HTTP 400 The asset number is not valid : {0}
Error 102486 HTTP 400 Invalid value for dimension {0}