SendRegning

Create and update

Verison: 1.0 (read more)

In addition to creating/updating a draft, there are a few other side effects that could occur:

  • A new recipient could be created. However, using an existing recipient is also possible. More details on how this works are found in the descriptions below.
  • A new product could be created. Again, you can find more details on how to achieve this effect in the details below.
1
POST /order-confirmation/drafts

Request

HTTP/1.1 200 OK

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
{
    "number": 7,
    "ourReference": "This is our ref",
    "yourReference": "This is your ref",
    "freeText": "free text",
    "deliveryDate": "2016-01-15",
    "orderConfirmationDate": "2016-01-07",
    "creditDays": 14,
    "orderReference": "5",
    "originOfferNumber" : 1,
    "recipient": {
        "number": 3,
        "customerNumber": "2",
        "name": "adam",
        "email": "rec@sendregning.no",
        "organisationNumber": "976098897",
        "icd": "9908",
        "address": {
            "address1": "add1",
            "address2": "add2",
            "zip": "2040",
            "city": "OSLO",
            "country": "NORGE"
        }
    },
    "deliveryAddress": {
        "address": "Gjerderumsveien 23",
        "zip": "0212",
        "city": "OSLO",
        "country": "NORGE"
    },
    "items": [{
        "number": 1,
        "quantity": 1.00,
        "productCode": "pc1",
        "description": "desc1",
        "unitPrice": 2.55,
        "discount": 10.00,
        "taxRate": 25.00,
        "total": null
    }, {
        "number": 2,
        "quantity": 2.00,
        "productCode": "pc2",
        "description": "desc2",
        "unitPrice": 3.55,
        "discount": 20.00,
        "taxRate": 15.00,
        "total": null
    }]
}

Response

HTTP/1.1 200 OK

The response body contains number of created order confirmation.

Detailed property description

Name Description Required Type Limitation
number Draft order confirmation number
For update only Number
ourReference Originator's reference. String 30 characters
yourReference Recipient's reference String 30 characters
creditDays Number
freeText String
deliveryDate String Valid ISO date
orderConfirmationDate String Valid ISO date
orderReference String
originOfferNumber number
recipient Details about recipient of the invoice
This object can be used in two ways
1. Use the `number` property to reference an existing recipient.
2. Use the other property to create a new recipient when issuing the order confirmation.
Object
number The number that reference an existing recipient.
If provided, the recipient with this number will be the recipient of this order confirmation.
Other properties in this recipient object will be ignored
conditioned Integer
name The number that reference an existing recipient.
If provided, the recipient with this number will be the recipient of this order confirmation.
Other properties in this recipient object will be ignored
conditioned String
customerNumber If number is null, this property will be used to create a new recipient.
conditioned String 32 characters
email If number is null, this property will be used to create a new recipient. conditioned String 64 characters
organisationNumber If number is null, this property will be used to create a new recipient.
Organisation number must be present either on this property or on `shipment.ehf.organisationNumber` to be eligible for sending the invoice by EHF.
conditioned String 9 characters
address If number is null, this property will be used to create a new recipient. conditioned Object
address1 If number is null, this property will be used to create a new recipient. conditioned String 42 characters
address2 If number is null, this property will be used to create a new recipient. conditioned String 42 characters
zip If number is null, this property will be used to create a new recipient. conditioned String 8 characters
city If number is null, this property will be used to create a new recipient. conditioned String 36 characters
country If number is null, this property will be used to create a new recipient. conditioned String 42 characters
items Details of the order confirmation.
Maximum 18 items allowed
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