# eigene kundennummer bei api rest import

**URL:** https://forum.shopware.com/t/eigene-kundennummer-bei-api-rest-import/40258
**Category:** Programmierung
**Created:** [4. Oktober 2016 um 10:05 UTC](https://forum.shopware.com/t/eigene-kundennummer-bei-api-rest-import/40258 "2016-10-04T10:05:36Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![dutchy](https://avatars.discourse-cdn.com/v4/letter/d/65b543/32.png) [@dutchy](https://forum.shopware.com/u/dutchy)
#### Post date: [4. Oktober 2016 um 10:05 UTC](https://forum.shopware.com/t/eigene-kundennummer-bei-api-rest-import/40258/1 "2016-10-04T10:05:36Z")

</div>

Hallo,  
ich habe mal wieder eine frage zum API REST import.

und zwar möchte mein kunde gerne seine internen kundennummern beibehalten.  
daher habe ich beim&nbsp;import der kundendaten die customernember mit übergeben, nur wird diese ignoriert.  
egal ob ich die daten per „put“ oder „post“ importiere.

weiss da jemand rat?

mfg  
dutchy

---

<div class="post-metadata">

### Author: ![waldicom](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/waldicom/32/12881_2.png) [@waldicom](https://forum.shopware.com/u/waldicom)
#### Post date: [4. Oktober 2016 um 10:35 UTC](https://forum.shopware.com/t/eigene-kundennummer-bei-api-rest-import/40258/2 "2016-10-04T10:35:08Z")

</div>

Wie sehen die Daten aus und welche Shopware Version wird eingesetzt? Die Version ist wichtig, weil die Kundennummer seit shopware 5.2 von “billing” nach “customer” verschoben wurde (wir sprechen über das Feld “customernumber”, richtig?).

---

<div class="post-metadata">

### Author: ![dutchy](https://avatars.discourse-cdn.com/v4/letter/d/65b543/32.png) [@dutchy](https://forum.shopware.com/u/dutchy)
#### Post date: [4. Oktober 2016 um 10:52 UTC](https://forum.shopware.com/t/eigene-kundennummer-bei-api-rest-import/40258/3 "2016-10-04T10:52:01Z")

</div>

Hallo waldicom,  
ich benutze die neueste version von shopware (5.2.7) und so sieht meine xml-datei aus, die ich versuche zu importieren und darunter das php-snippet.

danke:-)  
mfg  
Anne

\<?xml version="1.0" encoding="UTF-8" standalone="yes"?\> 

neuekunden  
  
  
  
  
  
neue nummer  
  
EK   
  
passwort1  
  
bcript  
  
1  
  
[ssssss@babab.de](mailto:ssssss@babab.de)  
  
1  
  
ms  
  
vornavssor  
  
nachnamesach  
  
  
  
13  
  
billing  
  
ms  
  
vorevor  
  
nachnnach  
  
strasse2222  
  
1222  
  
22222  
  
stadt  
  
0402651765  
  
  
  
6527512751276  
  
  
  
  
  
13  
  
shipping  
  
ms  
  
vomevorname  
  
nachnnachname  
  
strasse2222  
  
1222  
  
22255  
  
ort  
  
0402651765  
  
  
  
22222222222222222

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $detail = array(“customerNumber” =\> $customer[“customernumber”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “groupKey” =\> $groupKey,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “password” =\> $passwort,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “active” =\> $customer[“active”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “encoderName” =\> $customer[“encoderName”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “email” =\> $customer[“email”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “newsletter” =\> $customer[“newsletter”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “salutation” =\> $customer[“salutation”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “firstName” =\> $customer[“firstName”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “lastName” =\> $customer[“lastName”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “billing” =\> array(  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “country” =\> $customer[“billing”][“country”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “company” =\> $customer[“billing”][“company”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “salutation” =\> $customer[“billing”][“salutation”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “firstName” =\> $customer[“billing”][“firstName”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “lastName” =\> $customer[“billing”][“lastName”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “street” =\> $customer[“billing”][“street”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “streetNumber” =\> $customer[“billing”][“streetNumber”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “zipCode” =\> $customer[“billing”][“zipCode”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “city” =\>$customer[“billing”][“city”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “phone” =\> $customer[“billing”][“phone”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “fax” =\>$customer[“billing”][“fax”],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “shipping” =\> $lieferadresse,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $call = $client-\>post($put,$detail);

---

<div class="post-metadata">

### Author: ![hec](https://avatars.discourse-cdn.com/v4/letter/h/e274bd/32.png) [@hec](https://forum.shopware.com/u/hec)
#### Post date: [4. Oktober 2016 um 11:04 UTC](https://forum.shopware.com/t/eigene-kundennummer-bei-api-rest-import/40258/4 "2016-10-04T11:04:41Z")

</div>

Das Feld für die Kundennummer heißt lediglich „number“ und nicht „customerNumber“.

Grüße,  
Sven

---

<div class="post-metadata">

### Author: ![dutchy](https://avatars.discourse-cdn.com/v4/letter/d/65b543/32.png) [@dutchy](https://forum.shopware.com/u/dutchy)
#### Post date: [4. Oktober 2016 um 12:12 UTC](https://forum.shopware.com/t/eigene-kundennummer-bei-api-rest-import/40258/5 "2016-10-04T12:12:00Z")

</div>

vielen dank für die lösung, wie einfach es doch sein kann:-))
