API

Sales APIs

PUT sales/credit-notes/{salesCreditNoteId}

Save details for provided sales credit note

HTTP method PUT
URI https://api.rambase.net/sales/credit-notes/{salesCreditNoteId}
Supported formats Xml, Html, Json (ex. $format=json)
- URI parameter {salesCreditNoteId} Sales credit note identifier
Integer, minimum 100000
Custom fields Custom fields supported
Successful HTTP status code 200
API resource identifier 4821, version 5

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

This field is optional.

>
2
     <CustomersReference
CustomersReference

Customers reference. Typically a person.

This field is optional.

>
{String}</CustomersReference>
3
     <CustomersReferenceNumber
CustomersReferenceNumber

Customers reference number. E.g. the internal sales order id the customer use in their own system.

This field is optional.

>
{String}</CustomersReferenceNumber>
4
     <Currency
Currency

Three character code following the ISO 4217 standard

Applicable domain values can be found here

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

This field is optional.

>
{String}</Currency>
5
     <IssueDate
IssueDate

Date when the document was issued.

This field is optional.

>
{Date}</IssueDate>
6
     <CreditReason
CreditReason

Field used to specify the reason for the credit

This field is optional.

>
{String}</CreditReason>
7
     <Note
Note

Additional information regarding the object (free text). This note might be visible to customers/suppliers.

This field is optional.

>
{String}</Note>
8
     <ShippingAddressAttention
ShippingAddressAttention

Attention of the shipping address. When changing shipping address, the ShippingAddressAttention will be overridden by the attention of the new shipping address.

This field is optional.

>
{String}</ShippingAddressAttention>
9
     <ShippingAddressPhone
ShippingAddressPhone

Phone number of the shipping address. When changing shipping address, the ShippingAddressPhone will be overridden by the phone number of the new shipping address.

Input must match the following regular expression pattern: ^([0-9\(\)\s\.\+\-])*$

This field is optional.

>
{String}</ShippingAddressPhone>
10
     <ShippingAddressEmail
ShippingAddressEmail

Email address of the shipping address. When changing shipping address, the ShippingAddressEmail will be overridden by the email of the new shipping address.

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

This field is optional.

>
{String}</ShippingAddressEmail>
11
     <InvoiceAddressAttention
InvoiceAddressAttention

Attention of the invoice address. When changing invoice address, the InvoiceAddressAttention will be overridden by the attention of the new invoice address.

This field is optional.

>
{String}</InvoiceAddressAttention>
12
     <SellersReferenceNumber
SellersReferenceNumber

Sellers reference number.

This field is optional.

>
{String}</SellersReferenceNumber>
13
     <ExternalReference
ExternalReference

External sales credit note reference/identifier. Can be used in external systems.

This field is optional.

>
{String}</ExternalReference>
14
     <PolishRequirements
PolishRequirements

This field is optional.

>
15
          <EUSaleToNonCompany
EUSaleToNonCompany

Sales from Poland to EU country, to natural persons who do not conduct business activity (non company).

This field is optional.

>
{Boolean}</EUSaleToNonCompany>
16
          <ThirdPartyTransactionCode
ThirdPartyTransactionCode

Transaction code used when purchasing goods in the EU by the third largest VAT payer in a triangular transaction.

Applicable domain values can be found here

This field is optional.

>
{String}</ThirdPartyTransactionCode>
17
     </PolishRequirements>
18
     <Location
Location

This field is optional.

>
19
          <LocationId
LocationId

Location identifier

Minimum value: 10000

This field is optional.

>
{Integer}</LocationId>
20
     </Location>
21
     <AccountingPeriod
AccountingPeriod

This field is optional.

>
22
          <AccountingPeriodId
AccountingPeriodId

Accounting period identifier

Minimum value: 199000

Maximum value: 299912

This field is optional.

>
{Integer}</AccountingPeriodId>
23
     </AccountingPeriod>
24
     <Assignee
Assignee

The user who has been assigned to work with this object.

This field is optional.

>
25
          <UserId
UserId

User identifier

Minimum value: 100

This field is optional.

>
{Integer}</UserId>
26
     </Assignee>
27
     <ShippingAddress
ShippingAddress

This field is optional.

>
28
          <AddressId
AddressId

Address identifier

Minimum value: 1

This field is optional.

>
{Integer}</AddressId>
29
     </ShippingAddress>
30
     <Customer
Customer

This field is optional.

>
31
          <CustomerId
CustomerId

Customer identifier

Minimum value: 10000

This field is optional.

>
{Integer}</CustomerId>
32
     </Customer>
33
     <Totals
Totals

This field is optional.

>
34
          <FeeAmount
FeeAmount

Fee amount in transaction document's currency

Minimum value: 0

This field is optional.

>
{Decimal}</FeeAmount>
35
          <FreightAmount
FreightAmount

Freight amount in transaction document's currency

Minimum value: 0

This field is optional.

>
{Decimal}</FreightAmount>
36
          <RoundOffAmount
RoundOffAmount

Round-off amount in transaction document's currency

This field is optional.

>
{Decimal}</RoundOffAmount>
37
     </Totals>
38
     <Shipment
Shipment

This field is optional.

>
39
          <DeliveryTerms
DeliveryTerms

Delivery terms when shipping the goods. The delivery terms is based on the Incoterms rules from ICC (International Chamber of Commerce). The delivery terms is by default retrieved from the customer.

Applicable domain values can be found here

This field is optional.

>
{String}</DeliveryTerms>
40
          <DeliveryTermPlace
DeliveryTermPlace

Named place related to delivery terms (Incoterms)

This field is optional.

>
{String}</DeliveryTermPlace>
41
     </Shipment>
42
     <Payment
Payment

This field is optional.

>
43
          <PaymentMethod
PaymentMethod

Default payment method for the customer

Applicable domain values can be found here

This field is optional.

>
{String}</PaymentMethod>
44
          <PaymentTerms
PaymentTerms

Default payment terms to use in new documents.

Applicable domain values can be found here

This field is optional.

>
{String}</PaymentTerms>
45
          <DueDate
DueDate

Date the object is due to be paid

This field is optional.

>
{Date}</DueDate>
46
     </Payment>
47
     <VATDetails
VATDetails

This field is optional.

>
48
          <PostponeVAT
PostponeVAT

Indicates that the VAT posting should be postponed

This field is optional.

>
{Boolean}</PostponeVAT>
49
          <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>
50
          <VATRate
VATRate

Rate between transaction currency and company VAT currency. VAT rate should be used to calculate VAT amount in company VAT currency.

This field is optional.

>
{Decimal}</VATRate>
51
          <VATDate
VATDate

Date of VAT posting. Currency rate calculation use this date.

This field is optional.

>
{Date}</VATDate>
52
          <VATPeriod
VATPeriod

Accounting period this VAT posting belongs to

Minimum value: 199000

Maximum value: 299912

This field is optional.

>
{Integer}</VATPeriod>
53
     </VATDetails>
54
</SalesCreditNote>
1
{
2
     "salesCreditNote
SalesCreditNote

This field is optional.

":
{
3
          "customersReference
CustomersReference

Customers reference. Typically a person.

This field is optional.

":
"{String}",
4
          "customersReferenceNumber
CustomersReferenceNumber

Customers reference number. E.g. the internal sales order id the customer use in their own system.

This field is optional.

":
"{String}",
5
          "currency
Currency

Three character code following the ISO 4217 standard

Applicable domain values can be found here

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

This field is optional.

":
"{String}",
6
          "issueDate
IssueDate

Date when the document was issued.

This field is optional.

":
"{Date}",
7
          "creditReason
CreditReason

Field used to specify the reason for the credit

This field is optional.

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

Additional information regarding the object (free text). This note might be visible to customers/suppliers.

This field is optional.

":
"{String}",
9
          "shippingAddressAttention
ShippingAddressAttention

Attention of the shipping address. When changing shipping address, the ShippingAddressAttention will be overridden by the attention of the new shipping address.

This field is optional.

":
"{String}",
10
          "shippingAddressPhone
ShippingAddressPhone

Phone number of the shipping address. When changing shipping address, the ShippingAddressPhone will be overridden by the phone number of the new shipping address.

Input must match the following regular expression pattern: ^([0-9\(\)\s\.\+\-])*$

This field is optional.

":
"{String}",
11
          "shippingAddressEmail
ShippingAddressEmail

Email address of the shipping address. When changing shipping address, the ShippingAddressEmail will be overridden by the email of the new shipping address.

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

This field is optional.

":
"{String}",
12
          "invoiceAddressAttention
InvoiceAddressAttention

Attention of the invoice address. When changing invoice address, the InvoiceAddressAttention will be overridden by the attention of the new invoice address.

This field is optional.

":
"{String}",
13
          "sellersReferenceNumber
SellersReferenceNumber

Sellers reference number.

This field is optional.

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

External sales credit note reference/identifier. Can be used in external systems.

This field is optional.

":
"{String}",
15
          "polishRequirements
PolishRequirements

This field is optional.

":
{
16
               "eUSaleToNonCompany
EUSaleToNonCompany

Sales from Poland to EU country, to natural persons who do not conduct business activity (non company).

This field is optional.

":
"{Boolean}",
17
               "thirdPartyTransactionCode
ThirdPartyTransactionCode

Transaction code used when purchasing goods in the EU by the third largest VAT payer in a triangular transaction.

Applicable domain values can be found here

This field is optional.

":
"{String}"
18
          },
19
          "location
Location

This field is optional.

":
{
20
               "locationId
LocationId

Location identifier

Minimum value: 10000

This field is optional.

":
"{Integer}"
21
          },
22
          "accountingPeriod
AccountingPeriod

This field is optional.

":
{
23
               "accountingPeriodId
AccountingPeriodId

Accounting period identifier

Minimum value: 199000

Maximum value: 299912

This field is optional.

":
"{Integer}"
24
          },
25
          "assignee
Assignee

The user who has been assigned to work with this object.

This field is optional.

":
{
26
               "userId
UserId

User identifier

Minimum value: 100

This field is optional.

":
"{Integer}"
27
          },
28
          "shippingAddress
ShippingAddress

This field is optional.

":
{
29
               "addressId
AddressId

Address identifier

Minimum value: 1

This field is optional.

":
"{Integer}"
30
          },
31
          "customer
Customer

This field is optional.

":
{
32
               "customerId
CustomerId

Customer identifier

Minimum value: 10000

This field is optional.

":
"{Integer}"
33
          },
34
          "totals
Totals

This field is optional.

":
{
35
               "feeAmount
FeeAmount

Fee amount in transaction document's currency

Minimum value: 0

This field is optional.

":
"{Decimal}",
36
               "freightAmount
FreightAmount

Freight amount in transaction document's currency

Minimum value: 0

This field is optional.

":
"{Decimal}",
37
               "roundOffAmount
RoundOffAmount

Round-off amount in transaction document's currency

This field is optional.

":
"{Decimal}"
38
          },
39
          "shipment
Shipment

This field is optional.

":
{
40
               "deliveryTerms
DeliveryTerms

Delivery terms when shipping the goods. The delivery terms is based on the Incoterms rules from ICC (International Chamber of Commerce). The delivery terms is by default retrieved from the customer.

Applicable domain values can be found here

This field is optional.

":
"{String}",
41
               "deliveryTermPlace
DeliveryTermPlace

Named place related to delivery terms (Incoterms)

This field is optional.

":
"{String}"
42
          },
43
          "payment
Payment

This field is optional.

":
{
44
               "paymentMethod
PaymentMethod

Default payment method for the customer

Applicable domain values can be found here

This field is optional.

":
"{String}",
45
               "paymentTerms
PaymentTerms

Default payment terms to use in new documents.

Applicable domain values can be found here

This field is optional.

":
"{String}",
46
               "dueDate
DueDate

Date the object is due to be paid

This field is optional.

":
"{Date}"
47
          },
48
          "vATDetails
VATDetails

This field is optional.

":
{
49
               "postponeVAT
PostponeVAT

Indicates that the VAT posting should be postponed

This field is optional.

":
"{Boolean}",
50
               "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}",
51
               "vATRate
VATRate

Rate between transaction currency and company VAT currency. VAT rate should be used to calculate VAT amount in company VAT currency.

This field is optional.

":
"{Decimal}",
52
               "vATDate
VATDate

Date of VAT posting. Currency rate calculation use this date.

This field is optional.

":
"{Date}",
53
               "vATPeriod
VATPeriod

Accounting period this VAT posting belongs to

Minimum value: 199000

Maximum value: 299912

This field is optional.

":
"{Integer}"
54
          }
55
     }
56
}

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 100191 HTTP 404 Vatcode not found
Error 100475 HTTP 400 Project number is mandatory on all items.
Error 101488 HTTP 400 Illegal general ledger account : {0}
Error 105186 HTTP 400 Postings are not allowed on control accounts.
Error 101490 HTTP 400 Illegal Account {0}: This account has been blocked for {1}-documents
Error 101491 HTTP 400 Illegal Account {0}: Check the account's FromPeriod and ToPeriod
Error 101517 HTTP 400 Illegal Account {0}: This account require ICTDB.
Error 102482 HTTP 400 Department is required for general ledger account {0}
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}
Error 108679 HTTP 400 Expected collection date cannot be earlier then expected delivery date
Error 108680 HTTP 400 Collection date cannot be earlier then the effective date
Error 108681 HTTP 400 Collection date cannot be earlier then the expected delivery date
Error 108683 HTTP 400 Termination date must be earlier then the expiration date
Error 107278 HTTP 400 No available rental unit found for specified product and date range