SendRegning

Create recipient

Verison: 1.0 (read more)

Create a recipient

1
POST /recipients/

Response

HTTP/1.1 201 CREATED

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
{
    "customerNumber": "12",
    "name": "Ole Nordman",
    "contact": {
        "address": {
            "address1": "Oslogata",
            "address2": "",
            "city": "OSLO",
            "country": "NORGE",
            "zip": "0194"
        },
        "email": "ole@sendregning.no",
        "phone": "",
        "mobile": "",
        "fax": "",
        "web": ""
    },
    "organisation": {
        "form": null,
        "icd": null,
        "number": null
    },
    "settings": {
        "discount": 0.0,
        "creditDays": null,
        "attachPdf": false,
        "defaultShipment": "EMAIL",
        "currency": null
    },
    "yourReference": null,
    "customFields": [
        {
            "number": 1,
            "value": "some value"
        }
    ],
    "comment": ""
}

It’s also allowed to post an array of recipients

1
2
3
4
5
6
7
8
9
10
11
12
13
[
  {
    "customerNumber": "12",
    "name": "Ole Nordman",
    ...
  },
  {
    "customerNumber": "13",
    "name": "Jon Nordman",
    ...
  }

]

In this case response code will also be 201 HTTP/1.1 201 Created but links to all created entities will be listed in response body instead of Location header.

1
2
3
4
[
  "https://www.sendregning.no/recipients/26",
  "https://www.sendregning.no/recipients/27"
]

Detailed property description

Name Description Required Type Limitation
customerNumber recipient's client number.
This field must be present in order to link the invoice to an existing recipient.
optional String 32 characters
name recipient name mandatory String 42 characters
contact contact details mandatory object
address postal address mandatory object
address1 first address line optional String 42 characters
address2 second address line optional String 42 characters
zip mandatory String 8 characters
city mandatory String 36 characters
country valid country in SendRegning
lookup: /common/public/countries
optional - NORGE is default value String
email optional String 64 characters
phone optional String 64 characters
mobile optional String 64 characters
fax optional String 64 characters
web optional String 128 characters
organisation optional object
form organisation form
see organisation form list below
String
icd icd code
9908 for Norway
optional number 4 digits
number valid Norwegian organisation number optional String
settings optional object
discount optional number decimal (5,2)
creditDays invoice credit days optional number
attachPdf should pdf be attached to invoices
if not specified originator preference will be used
optional boolean
defaultShipment default invoice shipment method
valid values: SNAIL, EMAIL
optional String
autoDunningsEnabled excluded from automatic dunning if not null and set to false optional boolean
currency currency code
valid options at /common/currency/exchangeRates
optional String 3 characters
yourReference default your reference optional String 64 characters
comment optional String
customFields custom fields optional object
number number defined in originator's custom field mandatory number
value undergoes special validations depending on custom field type mandatory if required in originator's custom field definition

Additional information

Allowed organisation form values:

  • ans Ansvarlig selskap med solidarisk ansvar (ANS)
  • as Aksjeselskap (AS)
  • asa Allmenaksjeselskap (ASA)
  • ba Selskap med begrenset Ansvar (BA)
  • bblbrl Boligbyggelag/Borettslag (BBL/BRL)
  • da Ansvarlig selskap med delt ansvar (DA)
  • enk Enkeltpersonforetak (ENK)
  • esek Eierseksjonssameie (ESEK)
  • fli Forening/lag/innretning (FLI)
  • gfs Gjensidig forsikringsselskap (GFS)
  • iks Interkommunalt selskap (IKS)
  • kffkf Kommunalt/Fylkeskommunalt foretak (KF/FKF)
  • ks Komandittselskap (KS)
  • pre Partrederi (PRE)
  • prv Personlig/Privat (trenger ikke org.nummer)
  • sa Samvirkeforetak (SA)
  • sti Stiftelse (STI)
  • ue Utenlandsk enhet med norsk avdeling/representant (NUF)