Issue and send credit note
By issuing a credit note you credit parts of or the whole invoice referenced in the url.
It’s not allowed to delete an invoice, because it would break the invoice number sequence.
By issuing a credit note, an credit entry will be created in your sales ledger.
After issuing, the credit note may be sent in different ways requested in the json under the shipment
property.
After issuing, the invoice might be sent in the different ways requested in the json under the shipment
property.
If shipment
is not provided invoice will be issued only. It is allowed to select copy methods only. Note that the price for issuing an credit note is the same as the price for the cheapest shipment option available for credit notes, as SendRegning’s business model is based on sending documents.
You can find minimal JSON examples of how to send on email and paper here.
1 | POST /invoices/{invoiceNumber}/credit-note
|
Request
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | { "invoiceDate": "2015-02-01", "orderDate": "2015-01-01", "deliveryDate": "2015-01-20", "ourReference": "our ref", "yourReference": "your ref", "orderNumber": "order no", "invoiceText": "invoice text", "items": [ { "number": 1, "quantity": 10.11, "productCode": "pn", "description": "desc", "unitPrice": 12.12, "discount": 10, "taxRate": 25 }, { "number": 2, "quantity": 12.12, "productCode": "pn2", "description": "desc2", "unitPrice": 22.22, "discount": 20, "taxRate": 15 } ], "shipment": { "paper": {}, "avtaleGiro": {}, "email": [ { "address": "testuser1@sendregning.no", "htmlContent": "custommessage" }, { "address": "testuser2@sendregning.no", "htmlContent": "custommessage" } ], "ehf": {}, "sms": [ { "mobileNumber": "47111111", "message": "smstext1" }, { "mobileNumber": "90091705", "message": "smstext1" } ], "copy": { "email": [ { "address": "copy@sendregning.no", "htmlContent": "copycustommessage" }, { "address": "copy2@sendregning.no", "htmlContent": "copy2custommessage" } ] } } } |
Response
HTTP/1.1 201 CREATED
Additional information
Detailed property description
Name | Description | Required | Type | Limitation | |||
---|---|---|---|---|---|---|---|
invoiceDate | Invoice date. If not provided, current date will be used. |
String | Valid ISO date | ||||
deliveryDate | String | Valid ISO date | |||||
orderDate | String | Valid ISO date | |||||
ourReference | Originator's reference. | String | 30 characters | ||||
yourReference | Recipient's reference. If not provided, the default of the recipient will be used if exist. If not provided and no default exist, the field on the invoice will be empty and the invoice will be ineligible for sending by EHF. |
String | 30 characters | ||||
orderNumber | Text field on the invoice that specifies the originator's order number. | String | 30 characters | ||||
invoiceText | This is a line that will be printed out on the invoice right above the invoice lines. If omitted, a default text found on your account settings will be used if set. |
String | 105 characters | ||||
items | Details of the invoice. Maximum 18 items allowed for Norwegian invoices and 34 for international invoices |
yes | Array | ||||
number | A unique number defining where in the order the item belong. If omitted, a number will given based on where the item is in the array. If the number is omitted from one item, then the number must be omitted from all items and vice versa. |
Integer | Between 1-18 for Norwegian invoices and 34 for international invoices | ||||
quantity | Quantity is used together with the unit price to find the line total, which means that (quantity * unit price) - discount + VAT is equal to the line total, which in this case is 2109.38. Quantity can only be omitted if unit price is omitted. |
Number | 6 characters, including punctuation marks and signs. Can't be negative. | ||||
productCode | Used to distinguish between the various products that are invoiced, this means that you can run reports in the meantime that tell how much you have invoiced of a given product. A product will be created in the product list when specifying a product code. If it already exists a product with this product code, the product will NOT be updated. | String | 9 characters | ||||
description | Describes the service/goods you are invoicing. This property can also be used for extra information that there isn't space for elsewhere. If this is the only element in a line that contains data, only this text will be printed out on the line. | String | 75 characters | ||||
unitPrice | Unit price is used together with the quantity to find the line total, which means that (quantity * unit price) - discount + VAT is equal to the line total, which in this case is 2109.38. Unit price can only be omitted if quantity is omitted. |
Number | 9 characters, including punctuation marks and signs | ||||
discount | A valid value for this element is a decimal number from 0 to 100. Note that the % sign must NOT be included and will generate an error message. If no items contain a discount, the discount column will be hidden on the invoice. |
Number | 5 characters, including punctuation marks. Must be >= 0 and <= 100 | ||||
taxRate | This rate can be changed by the authorities and will be automatically updated by SendRegning.no. The tax rate must be a valid tax rate. |
yes | Integer | 2 characters | |||
shipment | Contains the shipment options wanted. One or more of the different options must be chosen. You add the options you want by adding the associated property. |
no | Object | ||||
paper | Shipment on paper If object is empty, address specified on recipient will be used. To use another address, specify it by using the address properties. |
Object | |||||
address1 | conditioned | String | 42 characters | ||||
address2 | conditioned | String | 42 characters | ||||
zip | If paper object is not empty, then this field is mandatory. |
conditioned | String | 8 characters | |||
city | If paper object is not empty, then this field is mandatory. |
conditioned | String | 36 characters | |||
country | If paper object is not empty, then this field is mandatory. |
conditioned | String | 42 characters | |||
ehf | Shipment as EHF. Empty object | Object | |||||
List of emails objects | Array | ||||||
address | Email address of the receiver of this invoice. | yes | String | 64 characters | |||
htmlContent | Message that will be used in the email sent. | String | 120 characters | ||||
sms | List of sms objects | Array | |||||
mobileNumber | A valid mobileNumber to send the invoice to. | yes | String | 8 characters | |||
message | A message that will be added along the link. | yes | String | 140 characters | |||
copy | Copy shipment options | Object | |||||
List of emails objects | Array | ||||||
address | Email address of the receiver of this invoice. | yes | String | 64 characters | |||
htmlContent | Message that will be used in the email sent. | String | 120 characters |
Minimal JSON for sending on email
An example of the minimal JSON you can use for sending a credit note on email.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | { "items": [ { "quantity": 10, "description": "Consultant hours", "unitPrice": 1200 } ], "shipment": { "email": [ { "address": "ola@nordmann.no" } ] } } |
Minimal JSON for sending on paper
An example of the minimal JSON you can use for sending a credit note on paper.
1 2 3 4 5 6 7 8 9 10 11 12 | { "items": [ { "quantity": 10, "description": "Consultant hours", "unitPrice": 1200 } ], "shipment": { "paper": {} } } |