API

Procurement APIs

POST procurement/credit-notes/{supplierCreditNoteId}/items

Creates a new item in provided supplier credit note

HTTP method POST
URI https://api.rambase.net/procurement/credit-notes/{supplierCreditNoteId}/items
Supported formats Xml, Html, Json (ex. $format=json)
- URI parameter {supplierCreditNoteId} Supplier credit note identifier
Integer, minimum 100000
Custom fields Custom fields supported
Successful HTTP status code 201
API resource identifier 4339, version 2

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
<SupplierCreditNoteItem>
2
     <ProductDescription
ProductDescription

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

This field is optional.

>
{String}</ProductDescription>
3
     <Quantity
Quantity

Required/mandatory field

Quantity of supplier credit note item

>
{Decimal}</Quantity>
4
     <Product>
5
          <ProductId
ProductId

Required/mandatory field

Product identifier

Minimum value: 10000

>
{Integer}</ProductId>
6
     </Product>
7
     <Price>
8
          <NetPrice
NetPrice

Required/mandatory field

Final price per unit after deducting all discounts etc.

>
{Decimal}</NetPrice>
9
     </Price>
10
     <Accounting
Accounting

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

This field is optional.

>
11
          <VATCodeDefinition
VATCodeDefinition

This field is optional.

>
12
               <VATCode
VATCode

Code that determines VAT rules used for VAT calculations.

This field is optional.

>
{String}</VATCode>
13
          </VATCodeDefinition>
14
          <GeneralLedgerAccount
GeneralLedgerAccount

This field is optional.

>
15
               <GeneralLedgerAccountId
GeneralLedgerAccountId

General ledger account identifier

Minimum value: 1000

This field is optional.

>
{Integer}</GeneralLedgerAccountId>
16
          </GeneralLedgerAccount>
17
          <Department
Department

The department related to the item. One of the system/fixed account dimensions.

This field is optional.

>
18
               <DepartmentId
DepartmentId

Department identifier

Minimum value: 10

This field is optional.

>
{Integer}</DepartmentId>
19
          </Department>
20
          <FinanceProject
FinanceProject

The finance project related to the item. One of the system/fixed account dimensions.

This field is optional.

>
21
               <FinanceProjectId
FinanceProjectId

Finance project identifier

Minimum value: 1

This field is optional.

>
{Integer}</FinanceProjectId>
22
          </FinanceProject>
23
          <Asset
Asset

The asset related to the item. One of the system/fixed account dimensions.

This field is optional.

>
24
               <AssetId
AssetId

Asset identifier

Minimum value: 1

This field is optional.

>
{Integer}</AssetId>
25
          </Asset>
26
     </Accounting>
27
</SupplierCreditNoteItem>
1
{
2
     "supplierCreditNoteItem": {
3
          "productDescription
ProductDescription

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

This field is optional.

":
"{String}",
4
          "quantity
Quantity

Required/mandatory field

Quantity of supplier credit note item

":
"{Decimal}",
5
          "product": {
6
               "productId
ProductId

Required/mandatory field

Product identifier

Minimum value: 10000

":
"{Integer}"
7
          },
8
          "price": {
9
               "netPrice
NetPrice

Required/mandatory field

Final price per unit after deducting all discounts etc.

":
"{Decimal}"
10
          },
11
          "accounting
Accounting

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

This field is optional.

":
{
12
               "vATCodeDefinition
VATCodeDefinition

This field is optional.

":
{
13
                    "vATCode
VATCode

Code that determines VAT rules used for VAT calculations.

This field is optional.

":
"{String}"
14
               },
15
               "generalLedgerAccount
GeneralLedgerAccount

This field is optional.

":
{
16
                    "generalLedgerAccountId
GeneralLedgerAccountId

General ledger account identifier

Minimum value: 1000

This field is optional.

":
"{Integer}"
17
               },
18
               "department
Department

The department related to the item. One of the system/fixed account dimensions.

This field is optional.

":
{
19
                    "departmentId
DepartmentId

Department identifier

Minimum value: 10

This field is optional.

":
"{Integer}"
20
               },
21
               "financeProject
FinanceProject

The finance project related to the item. One of the system/fixed account dimensions.

This field is optional.

":
{
22
                    "financeProjectId
FinanceProjectId

Finance project identifier

Minimum value: 1

This field is optional.

":
"{Integer}"
23
               },
24
               "asset
Asset

The asset related to the item. One of the system/fixed account dimensions.

This field is optional.

":
{
25
                    "assetId
AssetId

Asset identifier

Minimum value: 1

This field is optional.

":
"{Integer}"
26
               }
27
          }
28
     }
29
}

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.
$showDomainDescriptions Boolean, optional Set to "true" to include domain descriptions for fields using domain values. See the Domain values page for more information. Default value is false.
$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
<SupplierCreditNoteItem>
2
     <SupplierCreditNoteItemId
SupplierCreditNoteItemId

Item-/linenumber of supplier credit note

>
{Integer}</SupplierCreditNoteItemId>
3
     <Status
Status

Status of the purchase credit note item

Possible domain values can be found here

>
{Integer}</Status>
4
     <CreatedAt
CreatedAt

Date and time of creation

>
{Datetime}</CreatedAt>
5
     <LineNumber
LineNumber

Line- or sequence number of the item. The LineNumber is used for sorting items in applications, prints, reports etc.

>
{Integer}</LineNumber>
6
     <SuppliersReferenceNumber
SuppliersReferenceNumber

Suppliers/sellers item reference number. Typically to an external system.

>
{String}</SuppliersReferenceNumber>
7
     <SuppliersProductName
SuppliersProductName

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

>
{String}</SuppliersProductName>
8
     <ProductDescription
ProductDescription

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

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

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

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

Value added tax percent

>
{Decimal}</VATPercent>
11
     <Quantity
Quantity

Quantity of supplier credit note item

>
{Decimal}</Quantity>
12
     <Price>
13
          <Currency
Currency

Three character code following the ISO 4217 standard

>
{String}</Currency>
14
          <NetPrice
NetPrice

Final price per unit after deducting all discounts etc.

>
{Decimal}</NetPrice>
15
          <Freight
Freight

Estimated freight for including expected freight cost in the gross margin calculation in sales orders, sales invoices etc.

>
{Decimal}</Freight>
16
          <FreightPercent
FreightPercent

Estimated freight in percent of net price. Used for including expected freight cost in the gross margin calculation in sales orders, sales invoices etc.

>
{Decimal}</FreightPercent>
17
          <Currency
Currency

Three character code following the ISO 4217 standard

>
{String}</Currency>
18
          <NetPrice
NetPrice

Final price per unit after deducting all discounts.

>
{Decimal}</NetPrice>
19
     </Price>
20
     <Totals>
21
          <Currency
Currency

Three character code following the ISO 4217 standard

>
{String}</Currency>
22
          <NetAmount
NetAmount

Final item amount after deducting all discounts etc.

>
{Decimal}</NetAmount>
23
          <Currency
Currency

Three character code following the ISO 4217 standard

>
{String}</Currency>
24
          <NetAmount
NetAmount

Total net amount in company currency.

>
{Decimal}</NetAmount>
25
     </Totals>
26
     <MeasurementUnit>
27
          <MeasurementUnitId
MeasurementUnitId

Material unit reference

>
{Integer}</MeasurementUnitId>
28
          <Unit
Unit

Measurement unit (ex. mm, km, dl, kg)

>
{String}</Unit>
29
          <MeasurementUnitLink
MeasurementUnitLink

Material unit reference

>
{String}</MeasurementUnitLink>
30
     </MeasurementUnit>
31
     <Product>
32
          <ProductId
ProductId

Product identifier

>
{Integer}</ProductId>
33
          <Name
Name

Name of the product

>
{String}</Name>
34
          <Type
Type

Type of product

Possible domain values can be found here

>
{String}</Type>
35
          <ProductLink
ProductLink

Product reference

>
{String}</ProductLink>
36
     </Product>
37
     <Accounting
Accounting

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

>
38
          <VATCodeDefinition>
39
               <VATCode
VATCode

Code that determines VAT rules used for VAT calculations.

>
{String}</VATCode>
40
          </VATCodeDefinition>
41
          <GeneralLedgerAccount>
42
               <GeneralLedgerAccountId
GeneralLedgerAccountId

General ledger account identifier

>
{Integer}</GeneralLedgerAccountId>
43
               <GeneralLedgerAccountLink
GeneralLedgerAccountLink

General ledger account reference

>
{String}</GeneralLedgerAccountLink>
44
          </GeneralLedgerAccount>
45
          <Department
Department

The department related to the item. One of the system/fixed account dimensions.

>
46
               <DepartmentId
DepartmentId

Department identifier

>
{Integer}</DepartmentId>
47
               <DepartmentLink
DepartmentLink

Finance department reference

>
{String}</DepartmentLink>
48
          </Department>
49
          <FinanceProject
FinanceProject

The finance project related to the item. One of the system/fixed account dimensions.

>
50
               <FinanceProjectId
FinanceProjectId

Finance project identifier

>
{Integer}</FinanceProjectId>
51
               <FinanceProjectLink
FinanceProjectLink

Finance project reference

>
{String}</FinanceProjectLink>
52
          </FinanceProject>
53
          <Asset
Asset

The asset related to the item. One of the system/fixed account dimensions.

>
54
               <AssetId
AssetId

Asset identifier

>
{Integer}</AssetId>
55
               <AssetLink
AssetLink

Asset reference

>
{String}</AssetLink>
56
               <Dimension>
57
                    <Value
Value

Value for this dimension defintion.

>
{String}</Value>
58
                    <Description
Description

Description of the dimension value.

>
{String}</Description>
59
                    <DimensionDefinition>
60
                         <DimensionDefinitionId
DimensionDefinitionId

Dimension identifier

>
{Integer}</DimensionDefinitionId>
61
                         <Name
Name

Name of dimension

>
{String}</Name>
62
                         <DimensionDefinitionLink
DimensionDefinitionLink

Dimension reference

>
{String}</DimensionDefinitionLink>
63
                    </DimensionDefinition>
64
               </Dimension>
65
          </Asset>
66
     </Accounting>
67
     <ForwardedFrom
ForwardedFrom

The preceding/previous/source item.

>
68
          <ForwardedFromItem>
69
               <ItemId
ItemId

Identifier of the object

>
{Integer}</ItemId>
70
               <Object>
71
                    <ObjectId
ObjectId

Identifier of the object

>
{Integer}</ObjectId>
72
                    <ObjectType
ObjectType

Type of object

>
{String}</ObjectType>
73
                    <ObjectLink
ObjectLink

API reference to the object

>
{String}</ObjectLink>
74
               </Object>
75
               <RamBaseKey
RamBaseKey

Internal RamBase identifier of the object/item

>
{String}</RamBaseKey>
76
               <ItemLink
ItemLink

API reference to the item

>
{String}</ItemLink>
77
          </ForwardedFromItem>
78
     </ForwardedFrom>
79
     <InitialBacklogItem
InitialBacklogItem

Purchase order reference this credit note item is created for

>
80
          <ItemId
ItemId

Item-number of the object

>
{Integer}</ItemId>
81
          <Object>
82
               <ObjectId
ObjectId

Identifier of the object

>
{Integer}</ObjectId>
83
               <ObjectType
ObjectType

Type of object

>
{String}</ObjectType>
84
               <ObjectLink
ObjectLink

API reference to the object

>
{String}</ObjectLink>
85
          </Object>
86
          <RamBaseKey
RamBaseKey

Internal RamBase identifier of the object/item

>
{String}</RamBaseKey>
87
          <ItemLink
ItemLink

API reference to the item

>
{String}</ItemLink>
88
          <NotificationId
NotificationId

Notification identifier

>
{Integer}</NotificationId>
89
          <Status
Status

Status of the notification

>
{Integer}</Status>
90
          <CreatedAt
CreatedAt

Date and time of creation

>
{Datetime}</CreatedAt>
91
          <Message
Message

The message from the notification definition, expanded with parameters.

>
{String}</Message>
92
          <TranslatedMessage
TranslatedMessage

The translated message from the notification definition, expanded with parameters.

>
{String}</TranslatedMessage>
93
          <NotificationType>
94
               <NotificationTypeId
NotificationTypeId

Notification type identifier

>
{String}</NotificationTypeId>
95
               <Category
Category

Category of notification type (warning, information etc)

Possible domain values can be found here

>
{String}</Category>
96
               <NotificationTypeLink
NotificationTypeLink

Notification type reference

>
{String}</NotificationTypeLink>
97
          </NotificationType>
98
          <NotificationLink
NotificationLink

Notification reference

>
{String}</NotificationLink>
99
          <ProjectOrderItemId
ProjectOrderItemId

Project order item identifier

>
{Integer}</ProjectOrderItemId>
100
          <ProjectOrder>
101
               <ProjectOrderId
ProjectOrderId

Project order identifier

>
{Integer}</ProjectOrderId>
102
          </ProjectOrder>
103
     </InitialBacklogItem>
104
</SupplierCreditNoteItem>
1
{
2
     "supplierCreditNoteItem": {
3
          "supplierCreditNoteItemId
SupplierCreditNoteItemId

Item-/linenumber of supplier credit note

":
"{Integer}",
4
          "status
Status

Status of the purchase credit note item

Possible domain values can be found here

":
"{Integer}",
5
          "createdAt
CreatedAt

Date and time of creation

":
"{Datetime}",
6
          "lineNumber
LineNumber

Line- or sequence number of the item. The LineNumber is used for sorting items in applications, prints, reports etc.

":
"{Integer}",
7
          "suppliersReferenceNumber
SuppliersReferenceNumber

Suppliers/sellers item reference number. Typically to an external system.

":
"{String}",
8
          "suppliersProductName
SuppliersProductName

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

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

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

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

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

":
"{String}",
11
          "vATPercent
VATPercent

Value added tax percent

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

Quantity of supplier credit note item

":
"{Decimal}",
13
          "price": {
14
               "currency
Currency

Three character code following the ISO 4217 standard

":
"{String}",
15
               "netPrice
NetPrice

Final price per unit after deducting all discounts etc.

":
"{Decimal}",
16
               "freight
Freight

Estimated freight for including expected freight cost in the gross margin calculation in sales orders, sales invoices etc.

":
"{Decimal}",
17
               "freightPercent
FreightPercent

Estimated freight in percent of net price. Used for including expected freight cost in the gross margin calculation in sales orders, sales invoices etc.

":
"{Decimal}",
18
               "currency
Currency

Three character code following the ISO 4217 standard

":
"{String}",
19
               "netPrice
NetPrice

Final price per unit after deducting all discounts.

":
"{Decimal}"
20
          },
21
          "totals": {
22
               "currency
Currency

Three character code following the ISO 4217 standard

":
"{String}",
23
               "netAmount
NetAmount

Final item amount after deducting all discounts etc.

":
"{Decimal}",
24
               "currency
Currency

Three character code following the ISO 4217 standard

":
"{String}",
25
               "netAmount
NetAmount

Total net amount in company currency.

":
"{Decimal}"
26
          },
27
          "measurementUnit": {
28
               "measurementUnitId
MeasurementUnitId

Material unit reference

":
"{Integer}",
29
               "unit
Unit

Measurement unit (ex. mm, km, dl, kg)

":
"{String}",
30
               "measurementUnitLink
MeasurementUnitLink

Material unit reference

":
"{String}"
31
          },
32
          "product": {
33
               "productId
ProductId

Product identifier

":
"{Integer}",
34
               "name
Name

Name of the product

":
"{String}",
35
               "type
Type

Type of product

Possible domain values can be found here

":
"{String}",
36
               "productLink
ProductLink

Product reference

":
"{String}"
37
          },
38
          "accounting
Accounting

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

":
{
39
               "vATCodeDefinition": {
40
                    "vATCode
VATCode

Code that determines VAT rules used for VAT calculations.

":
"{String}"
41
               },
42
               "generalLedgerAccount": {
43
                    "generalLedgerAccountId
GeneralLedgerAccountId

General ledger account identifier

":
"{Integer}",
44
                    "generalLedgerAccountLink
GeneralLedgerAccountLink

General ledger account reference

":
"{String}"
45
               },
46
               "department
Department

The department related to the item. One of the system/fixed account dimensions.

":
{
47
                    "departmentId
DepartmentId

Department identifier

":
"{Integer}",
48
                    "departmentLink
DepartmentLink

Finance department reference

":
"{String}"
49
               },
50
               "financeProject
FinanceProject

The finance project related to the item. One of the system/fixed account dimensions.

":
{
51
                    "financeProjectId
FinanceProjectId

Finance project identifier

":
"{Integer}",
52
                    "financeProjectLink
FinanceProjectLink

Finance project reference

":
"{String}"
53
               },
54
               "asset
Asset

The asset related to the item. One of the system/fixed account dimensions.

":
{
55
                    "assetId
AssetId

Asset identifier

":
"{Integer}",
56
                    "assetLink
AssetLink

Asset reference

":
"{String}",
57
                    "dimension": {
58
                         "value
Value

Value for this dimension defintion.

":
"{String}",
59
                         "description
Description

Description of the dimension value.

":
"{String}",
60
                         "dimensionDefinition": {
61
                              "dimensionDefinitionId
DimensionDefinitionId

Dimension identifier

":
"{Integer}",
62
                              "name
Name

Name of dimension

":
"{String}",
63
                              "dimensionDefinitionLink
DimensionDefinitionLink

Dimension reference

":
"{String}"
64
                         }
65
                    }
66
               }
67
          },
68
          "forwardedFrom
ForwardedFrom

The preceding/previous/source item.

":
{
69
               "forwardedFromItem": {
70
                    "itemId
ItemId

Identifier of the object

":
"{Integer}",
71
                    "object": {
72
                         "objectId
ObjectId

Identifier of the object

":
"{Integer}",
73
                         "objectType
ObjectType

Type of object

":
"{String}",
74
                         "objectLink
ObjectLink

API reference to the object

":
"{String}"
75
                    },
76
                    "ramBaseKey
RamBaseKey

Internal RamBase identifier of the object/item

":
"{String}",
77
                    "itemLink
ItemLink

API reference to the item

":
"{String}"
78
               }
79
          },
80
          "initialBacklogItem
InitialBacklogItem

Purchase order reference this credit note item is created for

":
{
81
               "itemId
ItemId

Item-number of the object

":
"{Integer}",
82
               "object": {
83
                    "objectId
ObjectId

Identifier of the object

":
"{Integer}",
84
                    "objectType
ObjectType

Type of object

":
"{String}",
85
                    "objectLink
ObjectLink

API reference to the object

":
"{String}"
86
               },
87
               "ramBaseKey
RamBaseKey

Internal RamBase identifier of the object/item

":
"{String}",
88
               "itemLink
ItemLink

API reference to the item

":
"{String}",
89
               "notificationId
NotificationId

Notification identifier

":
"{Integer}",
90
               "status
Status

Status of the notification

":
"{Integer}",
91
               "createdAt
CreatedAt

Date and time of creation

":
"{Datetime}",
92
               "message
Message

The message from the notification definition, expanded with parameters.

":
"{String}",
93
               "translatedMessage
TranslatedMessage

The translated message from the notification definition, expanded with parameters.

":
"{String}",
94
               "notificationType": {
95
                    "notificationTypeId
NotificationTypeId

Notification type identifier

":
"{String}",
96
                    "category
Category

Category of notification type (warning, information etc)

Possible domain values can be found here

":
"{String}",
97
                    "notificationTypeLink
NotificationTypeLink

Notification type reference

":
"{String}"
98
               },
99
               "notificationLink
NotificationLink

Notification reference

":
"{String}",
100
               "projectOrderItemId
ProjectOrderItemId

Project order item identifier

":
"{Integer}",
101
               "projectOrder": {
102
                    "projectOrderId
ProjectOrderId

Project order identifier

":
"{Integer}"
103
               }
104
          }
105
     }
106
}

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 107762 HTTP 400 Only product structures can auto create work orders for sub production
Error 107763 HTTP 400 Only product structures can be set up for line production
Error 107764 HTTP 400 Only product structures can be externally manufactured
Error 101047 HTTP 400 The purchase quote item has too low available quantity
Error 101400 HTTP 400 Supplier credit claim has been created from shipping advice
Error 102483 HTTP 400 Finance project is required for general ledger account {0}
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}