Changes for page 2. Customer

Last modified by Henrik Wistrand on 2024/04/26 14:32
From empty
To version 203.1
edited by Fredrik Nilsson
on 2024/04/09 14:14
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,0 +1,1 @@
1 +2. Customer
Parent
... ... @@ -1,0 +1,1 @@
1 +Main.WebHome
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.XWikiGuest
1 +xwiki:XWiki.frn
Default language
... ... @@ -1,0 +1,1 @@
1 +en
Tags
... ... @@ -1,0 +1,1 @@
1 +px-custom-page-content
Content
... ... @@ -1,0 +1,1169 @@
1 +(% class="jumbotron" %)
2 +(((
3 +(% class="container" %)
4 +(((
5 +Integrate to **PayEx Customer API **
6 +)))
7 +)))
8 +
9 +== Introduction ==
10 +
11 +(% class="lead" %)
12 +This api is used to create/read customers or change properties related to the customer.
13 +
14 +[[image:1612164561442-820.png||height="242" width="558"]]
15 +
16 +
17 +Each resource in the API corresponds to its own route. All routes are structured according to a specific standard, explained below
18 +
19 +The below route is an example of a route towards resource2Id, to operate on this resource you must also include the ids of its parentresources in the route.
20 +//lf-api.payex.com/ledger/**{Subdomain}**/v1/**{LedgerNumber}**/resource1/**{resource1Id}**/resource2/**{resource2Id}**//
21 +
22 +(% class="table-bordered table-striped" %)
23 +|=(% style="width: 604px;" %)Route segment|=(% style="width: 2790px;" %)Description
24 +|(% style="width:604px" %)Subdomain|(% style="width:2790px" %)In this part of the API it will be **customer**
25 +|(% style="width:604px" %)LedgerNumber|(% style="width:2790px" %)The ledger identifier/number at PayEx
26 +|(% style="width:604px" %)resource1Id|(% style="width:2790px" %)Identifier of resource1
27 +|(% style="width:604px" %)resource2Id|(% style="width:2790px" %)identifier of resource2, subresource to resource1
28 +
29 +(% class="wikigeneratedid" %)
30 +Routes that occurs in examples of this documentation will use the following identifiers
31 +
32 +(% class="table-bordered table-striped" %)
33 +|=(% style="width: 488px;" %)Resource|=(% style="width: 2271px;" %)Identifier
34 +|(% style="width:488px" %)LedgerNumber|(% style="width:2271px" %)XXX
35 +|(% style="width:488px" %)Customer|(% style="width:2271px" %)NNN (CustomerNo)
36 +
37 +== ==
38 +
39 +(% id="HChangelog" %)
40 +== Changelog ==
41 +
42 +2023-01-17
43 +Added //surpluses// property to the Customer resource with planned release 2024-01-23
44 +
45 +2023-11-27
46 +Added new resource Surpluses & added a general 404 not-found to problems list.
47 +
48 +== Customer ==
49 +
50 +The **customer **resource is located under **ledger/customer/v1/ **api**. **The customer- and its sub-resources are used to create, read and modify information related to customers.
51 +
52 +==== (% style="color:inherit; font-family:inherit" %)Get a specific customer(%%) ====
53 +
54 +{{code language="http" title="**Request**"}}
55 +GET /ledger/customer/v1/XXX/customers/NNN HTTP/1.1
56 +Host: -
57 +Authorization: Bearer <Token>
58 +Content-Type: application/json
59 +{{/code}}
60 +
61 +==== ====
62 +
63 +{{code language="http" title="**Response**"}}
64 +HTTP/1.1 200 OK
65 +Content-Type: application/json
66 +
67 +{
68 + "@id" : "/ledger/customer/v1/XXX/customers/9999",
69 + "customerNo" : "9999",
70 + "nationalIdentifier": {
71 + "regNo" : "YYYYMMDD-NNNN",
72 + "countryCode" : "SE"
73 + },
74 + "vatNo" : "SE101010101001",
75 + "legalEntity" : "consumer|business",
76 + "name" : "Britt-Marie Axelstopp",
77 + "emailAddress" : "britt@axelstopp.com",
78 + "protectedIdentity": false,
79 + "preferredLanguageCode": "SV",
80 + "legalStatus": "active",
81 + "msisdn" : "+91485918841",
82 + "activeConsents": [
83 + "Betalingsservice",
84 + "Avtalegiro"
85 + ],
86 + "eDIAddressInfo" : {
87 + "VAN": "ABCXYZ",
88 + "InterChangeRecipient": "Recipient_ID1",
89 + "BuyerId": "123465"
90 + },
91 + "legalAddress" : "/ledger/customer/v1/XXX/customers/9999/legal-address",
92 + "billingAddress" : "/ledger/customer/v1/XXX/customers/9999/billing-address",
93 + "surpluses": "/ledger/customer/v1/XXX/customers/9999/surpluses",
94 + "operations" :
95 + [
96 + {
97 + "rel" : "add-billing-address",
98 + "href" : "/ledger/customer/v1/XXX/customers/9999/billing-address",
99 + "method" : "POST"
100 + }
101 + ]
102 +}
103 +{{/code}}
104 +
105 +==== Get a specific customer using $expand ====
106 +
107 +if the entire customer model is needed, you can expand property references to other resources, in this example to get the customer model including the addresses on a single call.
108 +
109 +(% class="box infomessage" %)
110 +(((
111 +Performance is affected when expand is used as more resources are retrieved. Only use $expand if you always need the referenced properties, otherwise it should be retrevied on demand.
112 +)))
113 +
114 +{{code language="http" title="**Request**"}}
115 +GET /ledger/customer/v1/XXX/customers/NNN?$expand=legaladdress,billingaddress HTTP/1.1
116 +Host: -
117 +Authorization: Bearer <Token>
118 +Content-Type: application/json
119 +{{/code}}
120 +
121 +
122 +{{code language="http" title="**Response**"}}
123 +HTTP/1.1 200 OK
124 +Content-Type: application/json
125 +
126 +{
127 + "@id" : "/ledger/customer/v1/XXX/customers/9999",
128 + "customerNo" : "9999",
129 + "nationalIdentifier": {
130 + "regNo" : "YYYYMMDD-NNNN",
131 + "countryCode" : "SE"
132 + },
133 + "vatNo" : "SE101010101001",
134 + "legalEntity" : "consumer|business",
135 + "name" : "Britt-Marie Axelstopp",
136 + "emailAddress" : "britt@axelstopp.com",
137 + "protectedIdentity": false,
138 + "preferredLanguageCode": "SV",
139 + "legalStatus": "active",
140 + "msisdn" : "+91485918841",
141 + "activeConsents": [
142 + "Betalingsservice",
143 + "Avtalegiro"
144 + ],
145 + "eDIAddressInfo" : {
146 + "VAN": "ABCXYZ",
147 + "InterChangeRecipient": "Recipient_ID1",
148 + "BuyerId": "123456"
149 + },
150 + "legalAddress" : {
151 + "addressee" : "Britt-Marie Axelstopp",
152 + "streetAddress" : "The street 18",
153 + "coAddress" : "c/o Jansson",
154 + "city" : "STOCKHOLM",
155 + "zipCode" : "15961",
156 + "countryCode" : "SE",
157 + "operations" :
158 + [
159 + {
160 + "rel" : "update",
161 + "href" : "/ledger/customer/v1/XXX/customers/9999/legal-address",
162 + "method" : "PUT"
163 + },
164 + {
165 + "rel" : "update-legal-address-from-population-register",
166 + "href" : "/ledger/customer/v1/XXX/customers/9999/legal-address",
167 + "method" : "POST"
168 + }
169 + ]
170 + },
171 + "billingAddress" : {
172 + "addressee" : "Kalle Axelstopp",
173 + "streetAddress" : "Axelgatan 18",
174 + "city" : "STOCKHOLM",
175 + "zipCode" : "16872",
176 + "countryCode" : "se",
177 + "operations" :
178 + [
179 + {
180 + "rel" : "update",
181 + "href" : "/ledger/customer/v1/XXX/customers/9999/billing-address",
182 + "method" : "PUT"
183 + },
184 + {
185 + "rel" : "delete",
186 + "href" : "/ledger/customer/v1/XXX/customers/9999/billing-address",
187 + "method" : "DELETE"
188 + }
189 + ]
190 + },
191 + "surpluses": "/ledger/customer/v1/XXX/customers/9999/surpluses",
192 + "operations" :
193 + [
194 + {
195 + "rel" : "add-billing-address",
196 + "href" : "/ledger/customer/v1/XXX/customers/9999/billing-address",
197 + "method" : "POST"
198 + }
199 + ]
200 +}
201 +{{/code}}
202 +
203 +
204 +----
205 +
206 +==== Create new customer ====
207 +
208 +
209 +(% id="HImportanttonote21" %)
210 +===== Important to note! =====
211 +
212 +* Standard length of customerNo in Norway and Denmark is 7 characters (numeric only).
213 +* Only use numeric characters and not with a leading zero for customerNo in Sweden, in order to use AutoGiro (Direct Debit).
214 +* Dependency to legalEntity:
215 +** [[Late fee>>url:https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/invoice-service/invoice-service-apis/Supplementary%20features/?HLatefee]] will be added instead of reminder fee or collection claim fee when legalEntity is set to "business" (if specially contracted with PayEx and configured in ledger).
216 +** SSN (regNo) for private individuals will not be displayed in ledger reports due to GDPR. regNO will only be displayed when legalEntity is set till "business".
217 +** When invoice/claim is distributed by e-mail: If legalEntity is set to "consumer" the e-mail message will only include a link to PayEx Invoice Portal where the invoice/claim is available, otherwise a copy of the invoice/claim will be added in the e-mail message as a pdf-file.
218 +** Finland only: Different claim processes will be used depending on "consumer" or "business".
219 +
220 +A new customer is created by making a POST call to the API.
221 +See below table of properties that is supported when creating a new customer. The table below also reflects what properties you can expect when retreiving a customer through a "GET" request.
222 +
223 +(% class="table-bordered table-striped" %)
224 +|=(% style="width: 509px;" %)Property|=(% style="width: 161px;" %)Required|=(% style="width: 1852px;" %)Comment *
225 +|(% style="width:509px" %)customerNo|(% style="width:161px" %)Yes*|(% style="width:1852px" %)Normally required, //exception is when the configuration on the ledger is set for payex to generate customer numbers, in that case CustomerNo must not be set in request.//
226 +|(% style="width:509px" %)__**nationalIdentifier**__|(% style="width:161px" %)No*|(% style="width:1852px" %)Normally optional, //exception is when the configuration on the ledger is set for payex to generate customer numbers, in that case nationalIdentifier is required.//
227 +|(% style="width:509px" %) nationalIdentifier.regNo|(% style="width:161px" %)Yes|(% style="width:1852px" %)
228 +|(% style="width:509px" %) nationalIdentifier.countryCode|(% style="width:161px" %)Yes|(% style="width:1852px" %)
229 +|(% style="width:509px" %)vatNo|(% style="width:161px" %)No*|(% style="width:1852px" %)Required if reverse tax is used
230 +|(% style="width:509px" %)legalEntity|(% style="width:161px" %)No|(% style="width:1852px" %)
231 +|(% style="width:509px" %)name|(% style="width:161px" %)Yes|(% style="width:1852px" %)
232 +|(% style="width:509px" %)preferredLanguageCode|(% style="width:161px" %)No|(% style="width:1852px" %)
233 +|(% style="width:509px" %)emailAddress|(% style="width:161px" %)No|(% style="width:1852px" %)
234 +|(% style="width:509px" %)msisdn|(% style="width:161px" %)No|(% style="width:1852px" %)
235 +|(% style="width:509px" %)protectedIdentity|(% style="width:161px" %)No|(% style="width:1852px" %)
236 +|(% style="width:509px" %)distributionType|(% style="width:161px" %)No|(% style="width:1852px" %)
237 +|(% style="width:509px" %)__**eDIAddressInfo**__|(% style="width:161px" %)No|(% style="width:1852px" %)
238 +|(% style="width:509px" %) eDIAddressInfo.van|(% style="width:161px" %)No*|(% style="width:1852px" %)This field is required for distribution method EInvoiceB2B (EDI) to be used
239 +|(% style="width:509px" %) eDIAddressInfo.interChangeRecipient|(% style="width:161px" %)No|(% style="width:1852px" %)
240 +|(% style="width:509px" %) eDIAddressInfo.BuyerId|(% style="width:161px" %)Yes|(% style="width:1852px" %)
241 +|(% style="width:509px" %)**__legalAddress__**|(% style="width:161px" %)Yes|(% style="width:1852px" %)
242 +|(% style="width:183px" %) addressee|(% style="width:1602px" %)Yes|(% style="width:1852px" %)
243 +|(% style="width:183px" %) streetAddress|(% style="width:1602px" %)No|(% style="width:1852px" %)
244 +|(% style="width:183px" %) coAddress|(% style="width:1602px" %)No|(% style="width:1852px" %)
245 +|(% style="width:183px" %) city|(% style="width:1602px" %)Yes|(% style="width:1852px" %)
246 +|(% style="width:183px" %) zipCode|(% style="width:1602px" %)Yes|(% style="width:1852px" %)
247 +|(% style="width:183px" %) countryCode|(% style="width:1602px" %)Yes|(% style="width:1852px" %)
248 +|(% style="width:509px" %)**__billingAddress__**|(% style="width:161px" %)No|(% style="width:1852px" %)
249 +|(% style="width:183px" %) addressee|(% style="width:1602px" %)Yes|(% style="width:1852px" %)
250 +|(% style="width:183px" %) streetAddress|(% style="width:1602px" %)No|(% style="width:1852px" %)
251 +|(% style="width:183px" %) coAddress|(% style="width:1602px" %)No|(% style="width:1852px" %)
252 +|(% style="width:183px" %) city|(% style="width:1602px" %)Yes|(% style="width:1852px" %)
253 +|(% style="width:183px" %) zipCode|(% style="width:1602px" %)Yes|(% style="width:1852px" %)
254 +|(% style="width:183px" %) countryCode|(% style="width:1602px" %)Yes|(% style="width:1852px" %)
255 +
256 +===== Examples =====
257 +
258 +(% class="wikigeneratedid" %)
259 +Standard create customer
260 +
261 +{{code language="http" title="**Request**"}}
262 +POST /ledger/customer/v1/XXX/customers HTTP/1.1
263 +Host: -
264 +Authorization: Bearer <Token>
265 +Content-Type: application/json
266 +
267 +{
268 + "customerNo" : "9999",
269 + "nationalIdentifier": {
270 + "regNo" : "YYYYMMDD-NNNN",
271 + "countryCode" : "SE"
272 + },
273 + "vatNo" : "SE101010101001",
274 + "legalEntity" : "consumer|business",
275 + "name" : "Britt-Marie Axelstopp",
276 + "emailAddress" : "britt@axelstopp.com",
277 + "msisdn" : "+91485918841",
278 + "eDIAddressInfo" : {
279 + "VAN": "ABCXYZ",
280 + "InterChangeRecipient": "Recipient_ID1",
281 + "BuyerId": "123456"
282 + },
283 + "legalAddress" : {
284 + "addressee" : "Britt-Marie Axelstopp",
285 + "streetAddress" : "The street 18",
286 + "coAddress" : "c/o Jansson",
287 + "city" : "STOCKHOLM",
288 + "zipCode" : "15961",
289 + "countryCode" : "SE"
290 + },
291 + "distributionType": "postal"
292 +}
293 +{{/code}}
294 +
295 +(% id="HAccountresourceproperties" %)
296 +==== ====
297 +
298 +{{code language="http" title="**Response**"}}
299 +HTTP/1.1 201 CREATED
300 +Content-Type: application/json
301 +
302 +{
303 + "@id" : "/ledger/customer/v1/XXX/customers/9999",
304 + "customerNo" : " 9999"
305 +}
306 +{{/code}}
307 +
308 +(% class="wikigeneratedid" id="HCreatecustomerwithbilling-address" %)
309 +Create customer with billing-address
310 +
311 +{{code language="http" title="**Request**"}}
312 +POST /ledger/customer/v1/XXX/customers HTTP/1.1
313 +Host: -
314 +Authorization: Bearer <Token>
315 +Content-Type: application/json
316 +
317 +{
318 + "customerNo" : "9999",
319 + "nationalIdentifier": {
320 + "regNo" : "YYYYMMDD-NNNN",
321 + "countryCode" : "SE"
322 + },
323 + "vatNo" : "SE101010101001",
324 + "legalEntity" : "consumer|business",
325 + "name" : "Britt-Marie Axelstopp",
326 + "emailAddress" : "britt@axelstopp.com",
327 + "msisdn" : "+91485918841",
328 + "eDIAddressInfo" : {
329 + "VAN": "ABCXYZ",
330 + "InterChangeRecipient": "Recipient_ID1",
331 + "BuyerId": "123456"
332 + },
333 + "legalAddress" : {
334 + "addressee" : "Britt-Marie Axelstopp",
335 + "streetAddress" : "The street 18",
336 + "coAddress" : "c/o Jansson",
337 + "city" : "STOCKHOLM",
338 + "zipCode" : "15961",
339 + "countryCode" : "SE"
340 + },
341 + "billingAddress" : {
342 + "addressee" : "Kalle Axelstopp",
343 + "streetAddress" : "Axelgatan 18",
344 + "city" : "STOCKHOLM",
345 + "zipCode" : "16872",
346 + "countryCode" : "SE"
347 + }
348 +}
349 +{{/code}}
350 +
351 +(% id="HAccountresourceproperties" %)
352 +==== ====
353 +
354 +{{code language="http" title="**Response**"}}
355 +HTTP/1.1 201 CREATED
356 +Content-Type: application/json
357 +
358 +{
359 + "@id" : "/ledger/customer/v1/XXX/customers/9999",
360 + "customerNo" : " 9999"
361 +}
362 +{{/code}}
363 +
364 +==== ====
365 +
366 +----
367 +
368 +==== Update customer ====
369 +
370 +Some properties of the customer can be updated through this API. Properties will only be updated if included in the request. //To delete a property, for example, the property must be included in the request and have the value set to null (see examples below). //
371 +
372 +The following customer properties is possible to update through a patch call
373 +
374 +(% class="table-bordered table-striped" %)
375 +|=(% style="width: 509px;" %)Property
376 +|(% style="width:509px" %)emailAddress
377 +|(% style="width:509px" %)legalStatus
378 +|(% style="width:509px" %)preferredLanguageCode
379 +|(% style="width:509px" %)protectedIdentity
380 +|(% style="width:509px" %)msisdn
381 +|(% style="width:509px" %)distributionType
382 +|(% style="width:509px" %)__**eDIAddressInfo**__
383 +|(% style="width:509px" %) eDIAddressInfo.van
384 +|(% style="width:509px" %) eDIAddressInfo.interChangeRecipient
385 +|(% style="width:509px" %) eDIAddressInfo.BuyerId
386 +
387 +===== Examples =====
388 +
389 +Update all properties
390 +
391 +{{code language="http" title="**Request**"}}
392 +PATCH /ledger/customer/v1/XXX/customers/NNN HTTP/1.1
393 +Host: -
394 +Authorization: Bearer <Token>
395 +Content-Type: application/json
396 +
397 +{
398 + "emailAddress" : "britt@axelstopp.com",
399 + "protectedIdentity": false,
400 + "preferredLanguageCode": "SV",
401 + "legalStatus": "active",
402 + "msisdn" : "+91485918841",
403 + "eDIAddressInfo" : {
404 + "VAN": "ABCXYZ",
405 + "InterChangeRecipient": "Recipient_ID1",
406 + "BuyerId": "123456"
407 + },
408 + "distributionType": "postal"
409 +}
410 +{{/code}}
411 +
412 +Update only emailAddress
413 +
414 +{{code language="http" title="**Request**"}}
415 +PATCH /ledger/customer/v1/XXX/customers/NNN HTTP/1.1
416 +Host: -
417 +Authorization: Bearer <Token>
418 +Content-Type: application/json
419 +
420 +{
421 + "emailAddress" : "britt@axelstopp.com"
422 +}
423 +{{/code}}
424 +
425 +Update emailAddress and delete msisdn
426 +
427 +{{code language="http" title="**Request**"}}
428 +PATCH /ledger/customer/v1/XXX/customers/NNN HTTP/1.1
429 +Host: -
430 +Authorization: Bearer <Token>
431 +Content-Type: application/json
432 +
433 +{
434 + "emailAddress" : "britt@axelstopp.com",
435 + "msisdn" : null
436 +}
437 +{{/code}}
438 +
439 +----
440 +
441 +(% id="HAccountresourceproperties" %)
442 +==== Customer resource properties ====
443 +
444 +(% class="table-bordered table-striped" %)
445 +|=(% style="width: 343px;" %)Property|=(% style="width: 137px;" %)Data type|=(% style="width: 230px;" %)Format|=(% style="width: 1076px;" %)Description
446 +|(% style="width:343px" %)@id |(% style="width:137px" %)string|(% style="width:230px" %) |(% style="width:1076px" %)Uri of the specific customer
447 +|(% style="width:343px" %)customerNo|(% style="width:137px" %)string|(% style="width:230px" %)MinLength: 1
448 +MaxLength: 15*
449 +numeric, 1-9 |(% style="width:1076px" %)The unique identifier of the customer
450 +MaxLength may differ depending on configuration
451 +KID (Norway)
452 +|(% style="width:343px" %)__**nationalIdentifier**__|(% style="width:137px" %)object|(% style="width:230px" %) |(% style="width:1076px" %)
453 +|(% style="width:343px" %) nationalIdentifier.regNo|(% style="width:137px" %)string|(% style="width:230px" %)Country specific|(% style="width:1076px" %)Sweden: YYYYMMDD-NNNC
454 +Norway: DDMMYYNNNNN
455 +|(% style="width:343px" %) nationalIdentifier.countryCode|(% style="width:137px" %)string|(% style="width:230px" %)[[ISO 3166-1 alpha-2>>url:https://sv.wikipedia.org/wiki/ISO_3166]]|(% style="width:1076px" %)
456 +|(% style="width:343px" %)vatNo|(% style="width:137px" %)string|(% style="width:230px" %)MinLength: 7
457 +MaxLength: 17
458 +Regex pattern:
459 +[A-Z]{2}.*|(% style="width:1076px" %)Customer VAT registration number. Mandatory if reverse tax is used. Must conform to country specific algorithm
460 +|(% style="width:343px" %)legalEntity|(% style="width:137px" %)string|(% style="width:230px" %) |(% style="width:1076px" %)Valid values:
461 +"consumer"
462 +"business"
463 +|(% style="width:343px" %)name|(% style="width:137px" %)string|(% style="width:230px" %)Maxlength: 72
464 +Regex?|(% style="width:1076px" %)Full name of end-customer
465 +|(% style="width:343px" %)emailAddress|(% style="width:137px" %)string|(% style="width:230px" %)Maxlength: 254
466 +Regex pattern: [^@]+@[^\.]+\..+|(% style="width:1076px" %)
467 +|(% style="width:343px" %)protectedIdentity|(% style="width:137px" %)bool|(% style="width:230px" %) |(% style="width:1076px" %)Set to true if the customer has protected identity
468 +Postal distribution will be handled by "Skatteverket". **Only supported in Sweden**
469 +|(% style="width:343px" %)preferredLanguageCode|(% style="width:137px" %)string|(% style="width:230px" %) |(% style="width:1076px" %)(((
470 +Valid values:
471 +
472 +* **SV**
473 +* **NO**
474 +* **DA**
475 +* **FI**
476 +* **EN**
477 +)))
478 +|(% style="width:343px" %)legalStatus|(% style="width:137px" %)string|(% style="width:230px" %) |(% style="width:1076px" %)(((
479 +Valid values:
480 +
481 +* active
482 +* deceased
483 +)))
484 +|(% style="width:343px" %)msisdn|(% style="width:137px" %)string|(% style="width:230px" %)Maxlength: 15
485 +Minlength: 5
486 ++NNNN|(% style="width:1076px" %) "Mobile Subscriber Integrated Services Digital Network Number", ie. Cellphone number
487 +Countrycode is always required as the example below
488 ++46720000000
489 +|(% style="width:343px" %)distributionType|(% style="width:137px" %)string|(% style="width:230px" %) |(% style="width:1076px" %)Sets distribution type. Allowed values are:(((
490 +* **postal **
491 +* **noDistribution **
492 +)))
493 +|(% style="width:343px" %)**activeConsents**|(% style="width:137px" %)object|(% style="width:230px" %) |(% style="width:1076px" %)List of strings with possible values:(((
494 +* (((
495 +(% data-pm-slice="1 1 [~"table~",{~"isNumberColumnEnabled~":false,~"layout~":~"default~",~"__autoSize~":false,~"localId~":~"c8de3c26-1280-4cb1-a8ea-e56f5b08d910~"},~"tableRow~",null,~"tableCell~",{~"colspan~":1,~"rowspan~":1,~"colwidth~":null,~"background~":null}]" %)
496 +**Autogiro**
497 +)))
498 +* (((
499 +(% data-pm-slice="1 1 [~"table~",{~"isNumberColumnEnabled~":false,~"layout~":~"default~",~"__autoSize~":false,~"localId~":~"c8de3c26-1280-4cb1-a8ea-e56f5b08d910~"},~"tableRow~",null,~"tableCell~",{~"colspan~":1,~"rowspan~":1,~"colwidth~":null,~"background~":null}]" %)
500 +**Avtalegiro**
501 +)))
502 +* (((
503 +(% data-pm-slice="1 1 [~"table~",{~"isNumberColumnEnabled~":false,~"layout~":~"default~",~"__autoSize~":false,~"localId~":~"c8de3c26-1280-4cb1-a8ea-e56f5b08d910~"},~"tableRow~",null,~"tableCell~",{~"colspan~":1,~"rowspan~":1,~"colwidth~":null,~"background~":null}]" %)
504 +**Betalingsservice**
505 +)))
506 +* (((
507 +(% data-pm-slice="1 1 [~"table~",{~"isNumberColumnEnabled~":false,~"layout~":~"default~",~"__autoSize~":false,~"localId~":~"c8de3c26-1280-4cb1-a8ea-e56f5b08d910~"},~"tableRow~",null,~"tableCell~",{~"colspan~":1,~"rowspan~":1,~"colwidth~":null,~"background~":null}]" %)
508 +**RecurringCard**
509 +)))
510 +* (((
511 +(% data-pm-slice="1 1 [~"table~",{~"isNumberColumnEnabled~":false,~"layout~":~"default~",~"__autoSize~":false,~"localId~":~"c8de3c26-1280-4cb1-a8ea-e56f5b08d910~"},~"tableRow~",null,~"tableCell~",{~"colspan~":1,~"rowspan~":1,~"colwidth~":null,~"background~":null}]" %)
512 +**RecurringInvoiceToken**
513 +)))
514 +* (((
515 +(% data-pm-slice="1 1 [~"table~",{~"isNumberColumnEnabled~":false,~"layout~":~"default~",~"__autoSize~":false,~"localId~":~"c8de3c26-1280-4cb1-a8ea-e56f5b08d910~"},~"tableRow~",null,~"tableCell~",{~"colspan~":1,~"rowspan~":1,~"colwidth~":null,~"background~":null}]" %)
516 +**EInvoice**
517 +)))
518 +* (((
519 +(% data-pm-slice="1 1 [~"table~",{~"isNumberColumnEnabled~":false,~"layout~":~"default~",~"__autoSize~":false,~"localId~":~"c8de3c26-1280-4cb1-a8ea-e56f5b08d910~"},~"tableRow~",null,~"tableCell~",{~"colspan~":1,~"rowspan~":1,~"colwidth~":null,~"background~":null}]" %)
520 +**Kivra**
521 +)))
522 +* (((
523 +(% data-pm-slice="1 1 [~"table~",{~"isNumberColumnEnabled~":false,~"layout~":~"default~",~"__autoSize~":false,~"localId~":~"c8de3c26-1280-4cb1-a8ea-e56f5b08d910~"},~"tableRow~",null,~"tableCell~",{~"colspan~":1,~"rowspan~":1,~"colwidth~":null,~"background~":null}]" %)
524 +**EBoks**
525 +)))
526 +)))
527 +|(% style="width:343px" %)__**eDIAddressInfo**__|(% style="width:137px" %)object|(% style="width:230px" %) |(% style="width:1076px" %)EDI addressing info
528 +|(% style="width:343px" %) eDIAddressInfo.van|(% style="width:137px" %)string|(% style="width:230px" %)Maxlength: 255|(% style="width:1076px" %)(((
529 +Buyer VAN identifier (OperatorId)
530 +)))
531 +|(% style="width:343px" %) eDIAddressInfo.interChangeRecipient|(% style="width:137px" %)string|(% style="width:230px" %)Maxlength: 13|(% style="width:1076px" %)Routing address. EAN
532 +|(% style="width:343px" %) eDIAddressInfo.BuyerId|(% style="width:137px" %)string|(% style="width:230px" %)Maxlength: 13|(% style="width:1076px" %)NAD_BY/Buyerparty. EAN/Corporate identity number
533 +|(% style="width:343px" %)legalAddress|(% style="width:137px" %)uri|(% style="width:230px" %) |(% style="width:1076px" %)reference to the customers legal address
534 +|(% style="width:343px" %)billingAddress|(% style="width:137px" %)uri|(% style="width:230px" %) |(% style="width:1076px" %)reference to the customer billing address
535 +|(% style="width:343px" %)surpluses|(% style="width:137px" %)uri|(% style="width:230px" %) |(% style="width:1076px" %)reference to the customer surpluses
536 +
537 +==== Operations ====
538 +
539 +Depending on the current permissions the following operations is supported on the customer resource
540 +
541 +===== add-billing-address =====
542 +
543 +Method: POST
544 +This operation will be available if no billing-address exists on the customer, see [[billing-address>>Main.Invoicing.invoice-service.Implementation guide.Technical reference.API.CustomerApi.WebHome||anchor="HAddabilling-address"]] resource for more details
545 +
546 +----
547 +
548 +== Surpluses ==
549 +
550 +A surplus is the remaining value from a payment that was greater than the current debt, also referred as an 'overpayment'. Each instance of an overpayment will create a new surplus. A surplus will often have a connection to an account or invoice based of where the payment was placed but surpluses without connection to an account or invoice also exist. Surpluses can be used to settle upcoming debt or be disbursed.
551 +
552 +==== Get specified Surplus information ====
553 +
554 +{{code language="http" title="**Request**"}}
555 +GET /ledger/customer/v1/XXX/customers/NNN/surpluses/YYY HTTP/1.1
556 +Host: -
557 +Authorization: Bearer <Token>
558 +Content-Type: application/json
559 +{{/code}}
560 +
561 +
562 +{{code language="http" title="**Response**"}}
563 +HTTP/1.1 200 OK
564 +Content-Type: application/json
565 +
566 +{
567 + "surplusId": "YYY",
568 + "balance": 10.00,
569 + "currency": "SEK",
570 + "date": "2023-01-01T00:00:00",
571 + "status": "open",
572 + "invoice": "/ledger/invoice/v1/XXX/invoices/AAA",
573 + "account": "/ledger/account/v1/XXX/accounts/BBB",
574 + "operations": [],
575 + "@id": "/ledger/customer/v1/XXX/customers/NNN/surpluses/YYY"
576 +
577 +{{/code}}
578 +
579 +==== Get list of Surpluses Information ====
580 +
581 +{{code language="http" title="**Request**"}}
582 +GET /ledger/customer/v1/XXX/customers/NNN/surpluses HTTP/1.1
583 +Host: -
584 +Authorization: Bearer <Token>
585 +Content-Type: application/json
586 +{{/code}}
587 +
588 +
589 +{{code language="http" title="**Response**"}}
590 +HTTP/1.1 200 OK
591 +Content-Type: application/json
592 +
593 +{
594 + "items": [
595 + {
596 + "surplusId": "123",
597 + "balance": 10.00,
598 + "currency": "SEK",
599 + "date": "2023-01-01T00:00:00",
600 + "status": "open",
601 + "invoice": "/ledger/invoice/v1/XXX/invoices/AAA",
602 + "operations": [],
603 + "@id": "/ledger/customer/v1/XXX/customers/NNN/surpluses/123"
604 +
605 + },
606 + {
607 + "surplusId": "456",
608 + "balance": 20.00,
609 + "currency": "SEK",
610 + "date": "2023-01-02T00:00:00",
611 + "status": "pending-disbursement",
612 + "account": "/ledger/account/v1/XXX/accounts/BBB",
613 + "operations": [],
614 + "@id": "/ledger/customer/v1/XXX/customers/NNN/surpluses/456"
615 +
616 + },
617 + {
618 + "surplusId": "789",
619 + "balance": 30.00,
620 + "currency": "SEK",
621 + "date": "2023-01-03T00:00:00",
622 + "status": "pending-regulate",
623 + "invoice": "/ledger/invoice/v1/XXX/invoices/AAA",
624 + "operations": [],
625 + "@id": "/ledger/customer/v1/XXX/customers/NNN/surpluses/789"
626 +
627 + }
628 + ],
629 + "navigation": {
630 + "@id": "/ledger/customer/v1/XXX/customers/NNN/surpluses",
631 + "first": "/ledger/customer/v1/XXX/customers/NNN/surpluses?skip=0",
632 + "previous": "/ledger/customer/v1/XXX/customers/NNN/surpluses?skip=0"
633 + }
634 +}
635 +{{/code}}
636 +
637 +
638 +==== Surpluses resource properties ====
639 +
640 +(% class="table-bordered table-striped" %)
641 +|=(% style="width: 248px;" %)Property|=(% style="width: 108px;" %)Data type|=(% style="width: 233px;" %)Format|=(% style="width: 1196px;" %)Description
642 +|(% style="width:248px" %)@id |(% style="width:108px" %)string|(% style="width:233px" %)Maxlength: |(% style="width:1196px" %)Uri of the specific surplus
643 +|(% style="width:248px" %)surplusId|(% style="width:108px" %)string|(% style="width:233px" %)Maxlength: 50|(% style="width:1196px" %)Value is not considered case sensitive
644 +|(% style="width:248px" %)balance|(% style="width:108px" %)string|(% style="width:233px" %) |(% style="width:1196px" %)Amount value for the surplus, always a positive value
645 +|(% style="width:248px" %)currency|(% style="width:108px" %)string|(% style="width:233px" %)[[ISO 4217>>https://sv.wikipedia.org/wiki/ISO_4217]]|(% style="width:1196px" %)
646 +|(% style="width:248px" %)date|(% style="width:108px" %)date|(% style="width:233px" %)yyyy-MM-ddTHH:mm:ss|(% style="width:1196px" %)Surplus creation date
647 +|(% style="width:248px" %)status|(% style="width:108px" %)string|(% style="width:233px" %) |(% style="width:1196px" %)Expected statuses: open ~| pending-disbursement ~| pending-regulate
648 +After a surplus has been depleted it will no longer be returned from the API
649 +|(% style="width:248px" %)invoice|(% style="width:108px" %)string|(% style="width:233px" %) |(% style="width:1196px" %)Relative Uri to the connected source of the surplus through the Invoice API. A surplus can have a connection to an account or invoice but not both.
650 +|(% style="width:248px" %)account|(% style="width:108px" %)string|(% style="width:233px" %) |(% style="width:1196px" %)Relative Uri to the connected source of the surplus through the Account API. A surplus can have a connection to an account or invoice but not both.
651 +
652 +----
653 +
654 +== (% style="color:inherit; font-family:inherit" %)Active-Disbursement-Orders(%%) ==
655 +
656 +This shows if current surplus has been ordered to disburse the surplus to the end customer.
657 +
658 +==== Get active disbursement orders ====
659 +
660 +
661 +{{code language="http" title="**Request**"}}
662 +GET /ledger/customer/v1/XXX/customers/NNN/surpluses/YYY/active-disbursement-orders HTTP/1.1
663 +Host: -
664 +Authorization: Bearer <Token>
665 +Content-Type: application/json
666 +{{/code}}
667 +
668 +
669 +{{code language="http" title="**Response**"}}
670 +HTTP/1.1 200 OK
671 +Content-Type: application/json
672 +
673 +{
674 + "items": [
675 + {
676 + "operations": [],
677 + "swedishBankAccount": {
678 + "accountNo": "3300-1010101010",
679 + "accountType": "BKSE"
680 + }
681 + }
682 + ],
683 + "navigation": {
684 + "@id": "/ledger/customer/v1/XXX/customers/NNN/surpluses/YYY/active-disbursement-orders"
685 + }
686 +}
687 +{{/code}}
688 +
689 +(% id="HOperations" %)
690 +==== Operations ====
691 +
692 +Depending on the current permissions the following operations is supported on the surplus resource
693 +
694 +(% id="Hadd-billing-address" %)
695 +===== add-disbursement-orders =====
696 +
697 +Method: POST
698 +This operation will be available if agreed with payex.
699 +
700 +(% id="HActive-payment-ordersresourceproperties" %)
701 +==== request properties ====
702 +
703 +(% class="table-bordered table-striped" %)
704 +|=Property|=Data type|=Required|=Description
705 +|__**norwegianBankAccount**__|object|No*|
706 +| accountNo|string|Yes|
707 +|__**swedishBankAccount**__|object|No*|
708 +| clearingNo|string|Yes|
709 +| accountNo|string|Yes|
710 +|__**international**__|object|No*|
711 +| iban|string|Yes|
712 +| bic|string|Yes|
713 +|__**swedishSus**__|object|No*|
714 +|**nationalIdentifier**|object|Yes|
715 +| regNo|string|Yes|
716 +| countryCode|string|Yes|
717 +|**address**|object|Yes|
718 +| addressee|string|Yes|
719 +| streetAddress|string|No|
720 +| coAddress|string|No|
721 +| city|string|Yes|
722 +| zipCode|string|Yes|
723 +| countryCode|string|Yes|
724 +| | | |
725 +
726 +//* One and only one of the specified objects can be set at each request//
727 +
728 +Examples
729 +
730 +Create disbursement with swedish bank account
731 +
732 +{{code language="http" title="**Request**"}}
733 +POST /ledger/customer/v1/XXX/customers/NNN/surpluses/YYY/active-disbursement-orders HTTP/1.1
734 +Host: -
735 +Authorization: Bearer <Token>
736 +Content-Type: application/json
737 +
738 +{
739 + "SwedishBankAccount" : {
740 + "AccountNo":"944-1049000",
741 + "AccountType":"BGSE"
742 + }
743 +}
744 +{{/code}}
745 +
746 +Create a disbursement order with a norwegian bankaccount
747 +
748 +{{code language="http" title="**Request**"}}
749 +POST /ledger/customer/v1/XXX/customers/NNN/surpluses/YYY/active-disbursement-orders HTTP/1.1
750 +Host: -
751 +Authorization: Bearer <Token>
752 +Content-Type: application/json
753 +
754 +{
755 + "norwegianBankAccount" : {
756 + "accountNo" : "1234"
757 + }
758 +}
759 +{{/code}}
760 +
761 +Create a disbursement order with an international bankaccount
762 +
763 +{{code language="http" title="**Request**"}}
764 +POST /ledger/customer/v1/XXX/customers/NNN/surpluses/YYY/active-disbursement-orders HTTP/1.1
765 +Host: -
766 +Authorization: Bearer <Token>
767 +Content-Type: application/json
768 +
769 +{
770 + "international" : {
771 + "iban" : "123456",
772 + "bic" : "SWED..."
773 + }
774 +}
775 +{{/code}}
776 +
777 +Create disbursement order using "Swedbanks lön- och utbetalningssystem (SUS)"
778 +
779 +{{code language="http" title="**Request**"}}
780 +POST /ledger/customer/v1/XXX/customers/NNN/surpluses/YYY/active-disbursement-orders HTTP/1.1
781 +Host: -
782 +Authorization: Bearer <Token>
783 +Content-Type: application/json
784 +
785 +{
786 + "swedishSus" : {
787 + "nationalIdentifier": {
788 + "regNo" : "YYYYMMDD-NNNN",
789 + "countryCode" : "SE"
790 + },
791 + "address" : {
792 + "addressee" : "Kalle Axelstopp",
793 + "streetAddress" : "Axelgatan 18",
794 + "coAddress" : null,
795 + "city" : "STOCKHOLM",
796 + "zipCode" : "16872",
797 + "countryCode" : "se",
798 + }
799 + }
800 +}
801 +{{/code}}
802 +
803 +(% aria-label="macro:code widget" contenteditable="false" role="region" tabindex="-1" %)
804 +(((
805 +
806 +)))
807 +
808 +== (% style="color:inherit; font-family:inherit" %)Legal-address(%%) ==
809 +
810 +The legal address is where claims is normally sent to. It is required for a customer to have a legal address registered
811 +
812 +==== Get the legal address of the customer ====
813 +
814 +{{code language="http" title="**Request**"}}
815 +GET /ledger/customer/v1/XXX/customers/NNN/legal-address HTTP/1.1
816 +Host: -
817 +Authorization: Bearer <Token>
818 +Content-Type: application/json
819 +{{/code}}
820 +
821 +
822 +{{code language="http" title="**Response**"}}
823 +HTTP/1.1 200 OK
824 +Content-Type: application/json
825 +
826 +{
827 + "addressee" : "Britt-Marie Axelstopp",
828 + "streetAddress" : "The street 18",
829 + "coAddress" : "c/o Jansson",
830 + "city" : "STOCKHOLM",
831 + "zipCode" : "15961",
832 + "countryCode" : "SE",
833 + "operations" :
834 + [
835 + {
836 + "rel" : "update",
837 + "href" : "/ledger/customer/v1/XXX/customers/9999/legal-address",
838 + "method" : "PUT"
839 + },
840 + {
841 + "rel" : "update-legal-address-from-population-register",
842 + "href" : "/ledger/customer/v1/XXX/customers/9999/legal-address/update-legal-address-from-population-register",
843 + "method" : "POST"
844 + }
845 + ]
846 +}
847 +{{/code}}
848 +
849 +==== Operations ====
850 +
851 +Depending on the current permissions the following operations is supported on the legal address resource
852 +
853 +===== Update (replace) =====
854 +
855 +Method: PUT
856 +Use this operation to update the address, this "PUT" operation will replace the existing billing-address with the address specified in the request body.
857 +
858 +(% class="table-bordered table-striped" %)
859 +|=(% style="width: 183px;" %)Property|=(% style="width: 1602px;" %)Required
860 +|(% style="width:183px" %)addressee|(% style="width:1602px" %)Yes
861 +|(% style="width:183px" %)streetAddress|(% style="width:1602px" %)No
862 +|(% style="width:183px" %)coAddress|(% style="width:1602px" %)No
863 +|(% style="width:183px" %)city|(% style="width:1602px" %)Yes
864 +|(% style="width:183px" %)zipCode|(% style="width:1602px" %)Yes
865 +|(% style="width:183px" %)countryCode|(% style="width:1602px" %)Yes
866 +
867 +Example
868 +
869 +{{code language="http" title="**Request**"}}
870 +PUT /ledger/customer/v1/XXX/customers/NNN/legal-address HTTP/1.1
871 +Host: -
872 +Authorization: Bearer <Token>
873 +Content-Type: application/json
874 +
875 +{
876 + "addressee" : "Kalle Axelstopp",
877 + "streetAddress" : "Axelgatan 18",
878 + "city" : "STOCKHOLM",
879 + "zipCode" : "16872",
880 + "countryCode" : "SE"
881 +}
882 +{{/code}}
883 +
884 +
885 +----
886 +
887 +===== update-legal-address-from-population-register =====
888 +
889 +Method: POST
890 +Execution of this operation will result in an attempt to retrieve (and replace) the customer's legal address from the population registry.
891 +
892 +(% class="box infomessage" %)
893 +(((
894 +Access to this operation is not normally granted, unless otherwise agreed.
895 +)))
896 +
897 +{{code language="http" title="**Request**"}}
898 +POST /ledger/customer/v1/XXX/customers/NNN/legal-address/update-legal-address-from-population-register HTTP/1.1
899 +Host: -
900 +Authorization: Bearer <Token>
901 +Content-Type: application/json
902 +
903 +{
904 +}
905 +{{/code}}
906 +
907 +----
908 +
909 +==== Legal-address resource properties ====
910 +
911 +(% class="table-bordered table-striped" %)
912 +|=(% style="width: 161px;" %)Property|=(% style="width: 121px;" %)Data type|=(% style="width: 195px;" %)Format|=(% style="width: 1309px;" %)Description
913 +|(% style="width:161px" %)addressee|(% style="width:121px" %)string|(% style="width:195px" %)Maxlength: 72|(% style="width:1309px" %)Fullname
914 +|(% style="width:161px" %)streetAddress|(% style="width:121px" %)string|(% style="width:195px" %)Maxlength: 72|(% style="width:1309px" %)
915 +|(% style="width:161px" %)coAddress|(% style="width:121px" %)string|(% style="width:195px" %)Maxlength: 72|(% style="width:1309px" %)Care of (C/O) name. This is optional.
916 +|(% style="width:161px" %)city|(% style="width:121px" %)string|(% style="width:195px" %)Maxlength: 27|(% style="width:1309px" %)
917 +|(% style="width:161px" %)zipCode|(% style="width:121px" %)string|(% style="width:195px" %)Maxlength: 9|(% style="width:1309px" %)ZipCode without whitespaces
918 +|(% style="width:161px" %)countryCode|(% style="width:121px" %)string|(% style="width:195px" %)[[ISO 3166-1 alpha-2>>url:https://sv.wikipedia.org/wiki/ISO_3166]]|(% style="width:1309px" %)
919 +
920 +----
921 +
922 +== Billing-address ==
923 +
924 +The billing address is where invoices/bills/letters etc. is normally sent to.This address is optional
925 +
926 +==== Get the billing address of the customer ====
927 +
928 +{{code language="http" title="**Request**"}}
929 +GET /ledger/customer/v1/XXX/customers/NNN/billing-address HTTP/1.1
930 +Host: -
931 +Authorization: Bearer <Token>
932 +Content-Type: application/json
933 +{{/code}}
934 +
935 +
936 +{{code language="http" title="**Response**"}}
937 +HTTP/1.1 200 OK
938 +Content-Type: application/json
939 +
940 +{
941 + "addressee" : "Kalle Axelstopp",
942 + "streetAddress" : "Axelgatan 18",
943 + "coAddress" : "c/o Jansson",
944 + "city" : "STOCKHOLM",
945 + "zipCode" : "16872",
946 + "countryCode" : "SE",
947 + "operations" :
948 + [
949 + {
950 + "rel" : "update",
951 + "href" : "/ledger/customer/v1/XXX/customers/9999/billing-address",
952 + "method" : "PUT"
953 + },
954 + {
955 + "rel" : "delete",
956 + "href" : "/ledger/customer/v1/XXX/customers/9999/billing-address",
957 + "method" : "DELETE"
958 + }
959 + ]
960 +}
961 +{{/code}}
962 +
963 +==== Add a billing-address ====
964 +
965 +(% class="table-bordered table-striped" %)
966 +|=(% style="width: 183px;" %)Property|=(% style="width: 1602px;" %)Required
967 +|(% style="width:183px" %)addressee|(% style="width:1602px" %)Yes
968 +|(% style="width:183px" %)streetAddress|(% style="width:1602px" %)No
969 +|(% style="width:183px" %)coAddress|(% style="width:1602px" %)No
970 +|(% style="width:183px" %)city|(% style="width:1602px" %)Yes
971 +|(% style="width:183px" %)zipCode|(% style="width:1602px" %)Yes
972 +|(% style="width:183px" %)countryCode|(% style="width:1602px" %)Yes
973 +
974 +{{code language="http" title="**Request**"}}
975 +POST /ledger/customer/v1/XXX/customers/NNN/billing-address HTTP/1.1
976 +Host: -
977 +Authorization: Bearer <Token>
978 +Content-Type: application/json
979 +
980 +{
981 + "addressee" : "Kalle Axelstopp",
982 + "streetAddress" : "Axelgatan 18",
983 + "city" : "STOCKHOLM",
984 + "zipCode" : "16872",
985 + "countryCode" : "SE"
986 +}
987 +{{/code}}
988 +
989 +==== Operations ====
990 +
991 +Depending on the current permissions the following operations is supported on the billing address resource
992 +
993 +===== Update (replace) =====
994 +
995 +Method: PUT
996 +Use this operation to update the address, the "PUT" body of the request should be accoring to the properties of the resource.
997 +
998 +(% class="table-bordered table-striped" %)
999 +|=(% style="width: 183px;" %)Property|=(% style="width: 1602px;" %)Required
1000 +|(% style="width:183px" %)addressee|(% style="width:1602px" %)Yes
1001 +|(% style="width:183px" %)streetAddress|(% style="width:1602px" %)No
1002 +|(% style="width:183px" %)coAddress|(% style="width:1602px" %)No
1003 +|(% style="width:183px" %)city|(% style="width:1602px" %)Yes
1004 +|(% style="width:183px" %)zipCode|(% style="width:1602px" %)Yes
1005 +|(% style="width:183px" %)countryCode|(% style="width:1602px" %)Yes
1006 +
1007 +{{code language="http" title="**Request**"}}
1008 +PUT /ledger/customer/v1/XXX/customers/NNN/billing-address HTTP/1.1
1009 +Host: -
1010 +Authorization: Bearer <Token>
1011 +Content-Type: application/json
1012 +
1013 +{
1014 + "addressee" : "Kalle Axelstopp",
1015 + "streetAddress" : "Axelgatan 18",
1016 + "city" : "STOCKHOLM",
1017 + "zipCode" : "16872",
1018 + "countryCode" : "SE"
1019 +}
1020 +{{/code}}
1021 +
1022 +===== Delete =====
1023 +
1024 +Method: DELETE
1025 +Use this operation to delete the billing address.
1026 +
1027 +{{code language="http" title="**Request**"}}
1028 +DELETE /ledger/customer/v1/XXX/customers/NNN/billing-address HTTP/1.1
1029 +Host: -
1030 +Authorization: Bearer <Token>
1031 +Content-Type: application/json
1032 +
1033 +{
1034 +}
1035 +{{/code}}
1036 +
1037 +==== Billing-address resource properties ====
1038 +
1039 +(% class="table-bordered table-striped" %)
1040 +|=Property|=(% style="width: 94px;" %)Data type|=(% style="width: 255px;" %)Format|=(% style="width: 1053px;" %)Description
1041 +|addressee|(% style="width:94px" %)string|(% style="width:255px" %)Maxlength: 72|(% style="width:1053px" %)Fullname
1042 +|streetAddress|(% style="width:94px" %)string|(% style="width:255px" %)Maxlength: 72|(% style="width:1053px" %)
1043 +|coAddress|(% style="width:94px" %)string|(% style="width:255px" %)Maxlength: 72|(% style="width:1053px" %)Care of (C/O) name. This is optional.
1044 +|city|(% style="width:94px" %)string|(% style="width:255px" %)Maxlength: 27|(% style="width:1053px" %)
1045 +|zipCode|(% style="width:94px" %)string|(% style="width:255px" %)Maxlength: 9|(% style="width:1053px" %)ZipCode without whitespaces
1046 +|countryCode|(% style="width:94px" %)string|(% style="width:255px" %)[[ISO 3166-1 alpha-2>>url:https://sv.wikipedia.org/wiki/ISO_3166]]|(% style="width:1053px" %)
1047 +
1048 +== Find customer ==
1049 +
1050 +The **find customer **resource is located under **ledger/customer/v1/ **api**. **It is used to find customer with nationalIdentifier.
1051 +
1052 +(% class="table-bordered table-striped" %)
1053 +|=(% style="width: 222px;" %)Property|=(% style="width: 1562px;" %)Required
1054 +|(% style="width:222px" %)nationalIdentifier.regNo|(% style="width:1562px" %)Yes
1055 +|(% style="width:222px" %)nationalIdentifier.countryCode|(% style="width:1562px" %)Yes
1056 +
1057 +{{code language="http" title="**Request**"}}
1058 +POST /ledger/customer/v1/XXX/find-customer HTTP/1.1
1059 +Host: -
1060 +Authorization: Bearer <Token>
1061 +Content-Type: application/json
1062 +
1063 +{
1064 + "nationalIdentifier": {
1065 + "regNo" : "YYYYMMDD-NNNN",
1066 + "countryCode" : "SE"
1067 + }
1068 +}
1069 +{{/code}}
1070 +
1071 +{{code language="http" title="**Response**"}}
1072 +HTTP/1.1 200 OK
1073 +Content-Type: application/json
1074 +
1075 +{
1076 + "@id" : "/ledger/customer/v1/XXX/customers/9999",
1077 + "customerNo" : " 9999"
1078 +}
1079 +{{/code}}
1080 +
1081 +(% id="HAccountresourceproperties" %)
1082 +==== Find customer resource properties ====
1083 +
1084 +(% class="table-bordered table-striped" %)
1085 +|=(% style="width: 248px;" %)Property|=(% style="width: 108px;" %)Data type|=(% style="width: 233px;" %)Format|=(% style="width: 1196px;" %)Description
1086 +|(% style="width:248px" %)@id |(% style="width:108px" %)string|(% style="width:233px" %)Maxlength: |(% style="width:1196px" %)Uri of the specific customer
1087 +|(% style="width:248px" %)customerNo|(% style="width:108px" %)string|(% style="width:233px" %)Maxlength: 15|(% style="width:1196px" %)
1088 +|(% style="width:248px" %)nationalIdentifier.regNo|(% style="width:108px" %)string|(% style="width:233px" %)Country specific|(% style="width:1196px" %)Sweden: YYYYMMDD-NNNC
1089 +Norway: DDMMYYNNNNN
1090 +|(% style="width:248px" %)nationalIdentifier.countryCode|(% style="width:108px" %)string|(% style="width:233px" %)[[ISO 3166-1 alpha-2>>url:https://sv.wikipedia.org/wiki/ISO_3166]]|(% style="width:1196px" %)
1091 +
1092 +----
1093 +
1094 +== Generate customer ==
1095 +
1096 +The **generate consumer customer by reg no **resource is located under **ledger/customer/v1/ **api**. **It is used to genarate a customer with a nationalIdentifier. It will retreive an legal address from the population register and create a consumer customer.
1097 +
1098 +(% class="box infomessage" %)
1099 +(((
1100 +Access to this operation is not normally granted, unless otherwise agreed.
1101 +)))
1102 +
1103 +(% class="table-bordered table-striped" %)
1104 +|=(% style="width: 222px;" %)Property|=(% style="width: 1562px;" %)Required
1105 +|(% style="width:222px" %)customerNo|(% style="width:1562px" %)No
1106 +|(% style="width:222px" %)nationalIdentifier.regNo|(% style="width:1562px" %)Yes
1107 +|(% style="width:222px" %)nationalIdentifier.countryCode|(% style="width:1562px" %)Yes
1108 +|(% style="width:222px" %)emailAddress|(% style="width:1562px" %)No
1109 +|(% style="width:222px" %)msisdn|(% style="width:1562px" %)No
1110 +
1111 +{{code language="http" title="**Request**"}}
1112 +POST /ledger/customer/v1/XXX/generate-consumer-customer-by-reg-no HTTP/1.1
1113 +Host: -
1114 +Authorization: Bearer <Token>
1115 +Content-Type: application/json
1116 +
1117 +{
1118 + "nationalIdentifier": {
1119 + "regNo" : "YYYYMMDD-NNNN",
1120 + "countryCode" : "SE"
1121 + },
1122 + "emailAddress" : "britt@axelstopp.com",
1123 + "msisdn" : "+91485918841",
1124 + "customerNo" : "9999"
1125 +}
1126 +{{/code}}
1127 +
1128 +{{code language="http" title="**Response**"}}
1129 +HTTP/1.1 201 CREATED
1130 +Content-Type: application/json
1131 +
1132 +{
1133 + "@id" : "/ledger/customer/v1/XXX/customers/9999",
1134 + "customerNo" : " 9999"
1135 +}
1136 +{{/code}}
1137 +
1138 +(% id="HAccountresourceproperties" %)
1139 +==== Generate customer resource properties ====
1140 +
1141 +(% class="table-bordered table-striped" %)
1142 +|=(% style="width: 248px;" %)Property|=(% style="width: 108px;" %)Data type|=(% style="width: 233px;" %)Format|=(% style="width: 1196px;" %)Description
1143 +|(% style="width:248px" %)@id |(% style="width:108px" %)string|(% style="width:233px" %)Maxlength: |(% style="width:1196px" %)Uri of the specific customer
1144 +|(% style="width:248px" %)customerNo|(% style="width:108px" %)string|(% style="width:233px" %)Maxlength: 15|(% style="width:1196px" %)
1145 +|(% style="width:248px" %)nationalIdentifier.regNo|(% style="width:108px" %)string|(% style="width:233px" %)Country specific|(% style="width:1196px" %)Sweden: YYYYMMDD-NNNC
1146 +Norway: DDMMYYNNNNN
1147 +|(% style="width:248px" %)nationalIdentifier.countryCode|(% style="width:108px" %)string|(% style="width:233px" %)[[ISO 3166-1 alpha-2>>url:https://sv.wikipedia.org/wiki/ISO_3166]]|(% style="width:1196px" %)
1148 +|(% style="width:248px" %)emailAddress|(% style="width:108px" %)string|(% style="width:233px" %)Maxlength: 254
1149 +Regex pattern: [^@]+@[^\.]+\..+|(% style="width:1196px" %)
1150 +|(% style="width:248px" %)msisdn|(% style="width:108px" %)string|(% style="width:233px" %)Maxlength: 15|(% style="width:1196px" %) "Mobile Subscriber Integrated Services Digital Network Number", ie. Cellphone number
1151 ++46720000000
1152 +
1153 +{{display reference="developer:Main.Invoicing.ledger-api-general-docs.api-section-problems.WebHome"/}}
1154 +
1155 +=== Problem types ===
1156 +
1157 +(% class="box infomessage" %)
1158 +(((
1159 +Note, each problem typecode is preceded by "ledger/customer/v1/problems/" in this API, e.g. the error "validation" in the table below will appear as typecode "ledger/customer/v1/problems/validation".
1160 +)))
1161 +
1162 +(% class="table-bordered table-striped" %)
1163 +|=(% style="width: 537px;" %)Problem type (code)|=(% style="width: 172px;" %)Httpstatus|=(% style="width: 796px;" %)Description
1164 +|(% style="width:537px" %)validation|(% style="width:172px" %)400|(% style="width:796px" %)occurs if any of the inputvalidation fails, it is described in the problem which parameter that failed the validation
1165 +|(% style="width:537px" %)forbidden|(% style="width:172px" %)403|(% style="width:796px" %)occurs if access to method is not allowed.
1166 +|(% style="width:537px" %)not-found|(% style="width:172px" %)404|(% style="width:796px" %)specified resource not found
1167 +|(% style="width:537px" %)customer-not-found|(% style="width:172px" %)404|(% style="width:796px" %)specified customer number does not exists
1168 +|(% style="width:537px" %)legal-address-does-not-exists|(% style="width:172px" %)404|(% style="width:796px" %)legal address does not exists for the specified customer
1169 +|(% style="width:537px" %)billing-address-does-not-exists|(% style="width:172px" %)404|(% style="width:796px" %)billing address does not exists for the specified customer
1612164530151-211.png
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.dap
Size
... ... @@ -1,0 +1,1 @@
1 +0 bytes
Content
1612164561442-820.png
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.dap
Size
... ... @@ -1,0 +1,1 @@
1 +0 bytes
Content
1661344288319-663.png
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.dap
Size
... ... @@ -1,0 +1,1 @@
1 +0 bytes
Content