# Bestellung per API pushen ohne Erfolg

**URL:** <https://forum.shopware.com/t/bestellung-per-api-pushen-ohne-erfolg/49674>\
**Category:** Programmierung\
**Created:** [23. November 2017 um 15:35 UTC](https://forum.shopware.com/t/bestellung-per-api-pushen-ohne-erfolg/49674 "2017-11-23T15:35:18Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![smeissle](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@smeissle](https://forum.shopware.com/u/smeissle)\
**Post date:** [23. November 2017 um 15:35 UTC](https://forum.shopware.com/t/bestellung-per-api-pushen-ohne-erfolg/49674/1 "2017-11-23T15:35:18Z")

</div>

Hallo Shopware Community,

ich versuche eine PHP Schnittstelle zu schreiben mit der Bestellungen per API in den Shop gepusht werden können.

Leider erhalte ich immer die Rückmeldung:

**Could not decode json**  
json\_last\_error: No error occurred  
Raw:  
Bestellung wurde nicht angelegt!

No error ist halt nicht sehr hilfreich als Fehlermeldung.

Hier ein Auszug aus dem PHP Code, in dem ich den Fehler vermute:

```
		$diebestellung = "[
		'customerId' => $userid,
		'paymentId' => 5,
		'dispatchId' => 9,
		'partnerId' => 11,
		'shopId' => 1,
		'invoiceAmount' => $gesamtbetrag,
		'invoiceAmountNet' => $rechnungsbetrag_netto,
		'invoiceShipping' => $versandkosten,
		'invoiceShippingNet' => $versandkosten_netto,
		'orderTime' => $bestellzeit,
		'comment' => $bestellnummer,
		'net' => 0,
		'taxFree' => 0,
		'languageIso' => '1',
		'currency' => 'EUR',
		'currencyFactor' => 1,
		'remoteAddress' => '',
		'details' => [";
		
		$i = 0;
		
		foreach ($artikelnummern as $dieartikelnummer){
		
			$articledetailsID = "";
			
		
			$prüfeartikel = "SELECT id FROM s_articles_details WHERE ordernumber = '$dieartikelnummer'";
				foreach ($db->query($prüfeartikel)as $row){
					$articledetailsID = $row['id'];
				}
		
			if ($articledetailsID != ""){	
				
				$diebestellung = $diebestellung."
				[
				'articleId' => $articledetailsID,
				'taxId' => 1,
				'taxRate' => 19,
				'statusId' => 0,
				'articleNumber' => $dieartikelnummer,
				'price' => $artikelpreise[$i],
				'quantity' => $anzahlartikel[$i],
				'articleName' => $artikeltitel[$i],
				'shipped' => 0,
				'shippedGroup' => 0,
				'mode' => 0,
				'esdArticle' => 0,
			
				]";
				
			}
			$i ++;
			
			if ($i < $anzahlpositionen){
					$diebestellung = $diebestellung.",";
				}
		}	
		$diebestellung = $diebestellung."
		],
		'documents' => [],
		'billing' => [
			'id' => 2,
			'customerId' => $userid,
			'countryId' => 2,
			'stateId' => 2,
			'company' => $rechnung_firma,
			'salutation' => 'mr',
			'firstName' => $rechnung_vorname,
			'lastName' => $rechnung_nachname,
			'street' => $rechnung_adresse1,
			'additionalAddressLine1' => $rechnung_adresse2,
            'additionalAddressLine2' => $rechnung_adresse3,
			'zipCode' => $rechnung_plz,
			'city' => $rechnung_ort,
		],
		'shipping' => [
			'id' => 2,
			'countryId' => 2,
			'stateId' => 2,
			'customerId' => $userid,
			'company' => $versand_firma,
			'firstname' => $versand_vorname,
			'lastname' => $versand_nachname,
			'salutation' => 'mr',
			'street' => $versand_adresse1,
			'additionalAddressLine1' => $versand_adresse2,
            'additionalAddressLine2' => $versand_adresse3,
			'zipcode' => $versand_plz,
			'city' => $versand_ort
		],
		'paymentStatusId' => 17,
		'orderStatusId' => 0
	]";	
	
	echo "".$diebestellung."";
	echo "";
		
	//$diebestellung2 = json_encode($diebestellung);
	//echo "";
	
	
	$clientcb->post('orders,'.$diebestellung);

```

Auch die Verwendung von decode oder encode bringt nichts.

Ich hoffe jemand von Euch findet den Denkfehler von mir, damit ich dieses Projekt bald abschließen kann.

Gruß

Sebastian

---

<div class="post-metadata">

**Author:** ![hhmarco73](https://avatars.discourse-cdn.com/v4/letter/h/ed8c4c/32.png) [@hhmarco73](https://forum.shopware.com/u/hhmarco73)\
**Post date:** [24. November 2017 um 06:54 UTC](https://forum.shopware.com/t/bestellung-per-api-pushen-ohne-erfolg/49674/2 "2017-11-24T06:54:29Z")

</div>

Du arbeitest ja auch mit Strings statt mit php arrays?! Statt&nbsp;

```
$diebestellung = "[
    'customerId' => $userid,

```

müsste es z. B. wie folgt los gehen:&nbsp;

```
$diebestellung = [
    'customerId' => $userid,

```

&nbsp;Dann zum Schluss mit&nbsp;json\_encode das Array umwandeln in den json String.&nbsp;

---

<div class="post-metadata">

**Author:** ![smeissle](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@smeissle](https://forum.shopware.com/u/smeissle)\
**Post date:** [24. November 2017 um 08:57 UTC](https://forum.shopware.com/t/bestellung-per-api-pushen-ohne-erfolg/49674/3 "2017-11-24T08:57:00Z")

</div>

Hallo hhmarco,

danke für die Tipps, habe jetzt den String in einen Array umgewandelt erhalte also folgendes Ergebnis:

```
Array ( [0] => 'customerId' => 9708, 'paymentId' => 5, 'dispatchId' => 9, 'partnerId' => 11, 'shopId' => 1, 'invoiceAmount' => 80.49, 'invoiceAmountNet' => 67.6386554622, 'invoiceShipping' => 4.90, 'invoiceShippingNet' => 4.11764705882, 'orderTime' => 2017-11-23 17:40:41, 'comment' => M171102370770, 'net' => 0, 'taxFree' => 0, 'languageIso' => '1', 'currency' => 'EUR', 'currencyFactor' => 1, 'remoteAddress' => '', 'details' => [['articleId' => 68543, 'taxId' => 1, 'taxRate' => 19, 'statusId' => 0, 'articleNumber' => 01800180HAN, 'price' => 67.29, 'quantity' => 1, 'articleName' => HG GrundkÃ¶rper iBox universal Hansgrohe 01800180, 'shipped' => 0, 'shippedGroup' => 0, 'mode' => 0, 'esdArticle' => 0,], ['articleId' => 68544, 'taxId' => 1, 'taxRate' => 19, 'statusId' => 0, 'articleNumber' => 02024000HAN, 'price' => 3.20, 'quantity' => 1, 'articleName' => HG Reduziernippel DN20 x DN15 chrom Hansgrohe 2024000, 'shipped' => 0, 'shippedGroup' => 0, 'mode' => 0, 'esdArticle' => 0,], ['articleId' => 68549, 'taxId' => 1, 'taxRate' => 19, 'statusId' => 0, 'articleNumber' => 13085000HAN, 'price' => 5.10, 'quantity' => 1, 'articleName' => HG Luftsprudler chrom Hansgrohe 13085000, 'shipped' => 0, 'shippedGroup' => 0, 'mode' => 0, 'esdArticle' => 0,] ], 'documents' => [], 'billing' => ['id' => 2, 'customerId' => 9708, 'countryId' => 2, 'stateId' => 2, 'company' => Firma, 'salutation' => 'mr', 'firstName' => Test, 'lastName' => Umlaute Ã„Ã¤ÃœÃ¼Ã–Ã¶ÃŸ, 'street' => UmlautstraÃŸe Ã„Ã¤ÃœÃ¼Ã–Ã¶ÃŸ 12, 'additionalAddressLine1' => , 'additionalAddressLine2' => , 'zipCode' => 74177, 'city' => Bad Friedrichshall,], 'shipping' => ['id' => 2, 'countryId' => 2, 'stateId' => 2, 'customerId' => 9708, 'company' => Firma, 'firstname' => Test, 'lastname' => Umlaute Ã„Ã¤ÃœÃ¼Ã–Ã¶ÃŸ, 'salutation' => 'mr', 'street' => UmlautstraÃŸe Ã„Ã¤ÃœÃ¼Ã–Ã¶ÃŸ 12, 'additionalAddressLine1' => , 'additionalAddressLine2' => , 'zipcode' => 74177, 'city' => Bad Friedrichshall], 'paymentStatusId' => 17, 'orderStatusId' => 0 ) 

```

Diese Ergebnis lasse ich mich json\_encode umwandeln, und erhalte dann dies:

```
["\n\t\t'customerId' => 9708,\n\t\t'paymentId' => 5,\n\t\t'dispatchId' => 9,\n\t\t'partnerId' => 11,\n\t\t'shopId' => 1,\n\t\t'invoiceAmount' => 80.49,\n\t\t'invoiceAmountNet' => 67.6386554622,\n\t\t'invoiceShipping' => 4.90,\n\t\t'invoiceShippingNet' => 4.11764705882,\n\t\t'orderTime' => 2017-11-23 17:40:41,\n\t\t'comment' => M171102370770,\n\t\t'net' => 0,\n\t\t'taxFree' => 0,\n\t\t'languageIso' => '1',\n\t\t'currency' => 'EUR',\n\t\t'currencyFactor' => 1,\n\t\t'remoteAddress' => '',\n\t\t'details' => [\n\t\t\t\t[\n\t\t\t\t'articleId' => 68543,\n\t\t\t\t'taxId' => 1,\n\t\t\t\t'taxRate' => 19,\n\t\t\t\t'statusId' => 0,\n\t\t\t\t'articleNumber' => 01800180HAN,\n\t\t\t\t'price' => 67.29,\n\t\t\t\t'quantity' => 1,\n\t\t\t\t'articleName' => HG Grundk\u00f6rper iBox universal Hansgrohe 01800180,\n\t\t\t\t'shipped' => 0,\n\t\t\t\t'shippedGroup' => 0,\n\t\t\t\t'mode' => 0,\n\t\t\t\t'esdArticle' => 0,\n\t\t\t\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t'articleId' => 68544,\n\t\t\t\t'taxId' => 1,\n\t\t\t\t'taxRate' => 19,\n\t\t\t\t'statusId' => 0,\n\t\t\t\t'articleNumber' => 02024000HAN,\n\t\t\t\t'price' => 3.20,\n\t\t\t\t'quantity' => 1,\n\t\t\t\t'articleName' => HG Reduziernippel DN20 x DN15 chrom Hansgrohe 2024000,\n\t\t\t\t'shipped' => 0,\n\t\t\t\t'shippedGroup' => 0,\n\t\t\t\t'mode' => 0,\n\t\t\t\t'esdArticle' => 0,\n\t\t\t\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t'articleId' => 68549,\n\t\t\t\t'taxId' => 1,\n\t\t\t\t'taxRate' => 19,\n\t\t\t\t'statusId' => 0,\n\t\t\t\t'articleNumber' => 13085000HAN,\n\t\t\t\t'price' => 5.10,\n\t\t\t\t'quantity' => 1,\n\t\t\t\t'articleName' => HG Luftsprudler chrom Hansgrohe 13085000,\n\t\t\t\t'shipped' => 0,\n\t\t\t\t'shippedGroup' => 0,\n\t\t\t\t'mode' => 0,\n\t\t\t\t'esdArticle' => 0,\n\t\t\t\n\t\t\t\t]\n\t\t],\n\t\t'documents' => [],\n\t\t'billing' => [\n\t\t\t'id' => 2,\n\t\t\t'customerId' => 9708,\n\t\t\t'countryId' => 2,\n\t\t\t'stateId' => 2,\n\t\t\t'company' => Firma,\n\t\t\t'salutation' => 'mr',\n\t\t\t'firstName' => Test,\n\t\t\t'lastName' => Umlaute \u00c4\u00e4\u00dc\u00fc\u00d6\u00f6\u00df,\n\t\t\t'street' => Umlautstra\u00dfe \u00c4\u00e4\u00dc\u00fc\u00d6\u00f6\u00df 12,\n\t\t\t'additionalAddressLine1' => ,\n 'additionalAddressLine2' => ,\n\t\t\t'zipCode' => 74177,\n\t\t\t'city' => Bad Friedrichshall,\n\t\t],\n\t\t'shipping' => [\n\t\t\t'id' => 2,\n\t\t\t'countryId' => 2,\n\t\t\t'stateId' => 2,\n\t\t\t'customerId' => 9708,\n\t\t\t'company' => Firma,\n\t\t\t'firstname' => Test,\n\t\t\t'lastname' => Umlaute \u00c4\u00e4\u00dc\u00fc\u00d6\u00f6\u00df,\n\t\t\t'salutation' => 'mr',\n\t\t\t'street' => Umlautstra\u00dfe \u00c4\u00e4\u00dc\u00fc\u00d6\u00f6\u00df 12,\n\t\t\t'additionalAddressLine1' => ,\n 'additionalAddressLine2' => ,\n\t\t\t'zipcode' => 74177,\n\t\t\t'city' => Bad Friedrichshall\n\t\t],\n\t\t'paymentStatusId' => 17,\n\t\t'orderStatusId' => 0\n\t"]

```

Jetzt erhalte ich nach Aufruf von&nbsp; $clientcb-\>post(‘orders,’.$diebestellung3); folgende Fehlermeldung:  
**Could not decode json**  
json\_last\_error: Syntaxerror  
Raw:  
**Bad Request**  
Your browser sent a request that this server could not understand.

Liegt das evtl an den \n\t?? und wenn ja wie werde ich die los?

---

<div class="post-metadata">

**Author:** ![smeissle](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@smeissle](https://forum.shopware.com/u/smeissle)\
**Post date:** [24. November 2017 um 10:06 UTC](https://forum.shopware.com/t/bestellung-per-api-pushen-ohne-erfolg/49674/4 "2017-11-24T10:06:01Z")

</div>

Nachtrag: Die Absätze ich über den str\_replace gekillt, die können also nicht mehr Schuld am Misserfolg sein.

Nun sieht der JSON Code so aus:

```
['customerId' => 9755,'paymentId' => 5,'dispatchId' => 9,'partnerId' => 11,'shopId' => 1,'invoiceAmount' => 80.49,'invoiceAmountNet' => 67.6386554622,'invoiceShipping' => 4.90,'invoiceShippingNet' => 4.11764705882,'orderTime' => 2017-11-23 17:40:41,'comment' => M171102370770,'net' => 0,'taxFree' => 0,'languageIso' => '1','currency' => 'EUR','currencyFactor' => 1,'remoteAddress' => '','details' => [['articleId' => 68543,'taxId' => 1,'taxRate' => 19,'statusId' => 0,'articleNumber' => 01800180HAN,'price' => 67.29,'quantity' => 1,'articleName' => HG Grundk\u00f6rper iBox universal Hansgrohe 01800180,'shipped' => 0,'shippedGroup' => 0,'mode' => 0,'esdArticle' => 0,],['articleId' => 68544,'taxId' => 1,'taxRate' => 19,'statusId' => 0,'articleNumber' => 02024000HAN,'price' => 3.20,'quantity' => 1,'articleName' => HG Reduziernippel DN20 x DN15 chrom Hansgrohe 2024000,'shipped' => 0,'shippedGroup' => 0,'mode' => 0,'esdArticle' => 0,],['articleId' => 68549,'taxId' => 1,'taxRate' => 19,'statusId' => 0,'articleNumber' => 13085000HAN,'price' => 5.10,'quantity' => 1,'articleName' => HG Luftsprudler chrom Hansgrohe 13085000,'shipped' => 0,'shippedGroup' => 0,'mode' => 0,'esdArticle' => 0,]],'documents' => [],'billing' => ['id' => 2,'customerId' => 9755,'countryId' => 2,'stateId' => 2,'company' => Firma,'salutation' => 'mr','firstName' => Test,'lastName' => Umlaute \u00c4\u00e4\u00dc\u00fc\u00d6\u00f6\u00df,'street' => Umlautstra\u00dfe \u00c4\u00e4\u00dc\u00fc\u00d6\u00f6\u00df 12,'additionalAddressLine1' => , 'additionalAddressLine2' => ,'zipCode' => 74177,'city' => Bad Friedrichshall,],'shipping' => ['id' => 2,'countryId' => 2,'stateId' => 2,'customerId' => 9755,'company' => Firma,'firstname' => Test,'lastname' => Umlaute \u00c4\u00e4\u00dc\u00fc\u00d6\u00f6\u00df,'salutation' => 'mr','street' => Umlautstra\u00dfe \u00c4\u00e4\u00dc\u00fc\u00d6\u00f6\u00df 12,'additionalAddressLine1' => , 'additionalAddressLine2' => ,'zipcode' => 74177,'city' => Bad Friedrichshall],'paymentStatusId' => 17,'orderStatusId' => 0]

```

Fehlermeldung bleibt aber die selbe ☹

---

<div class="post-metadata">

**Author:** ![arnebecker](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@arnebecker](https://forum.shopware.com/u/arnebecker)\
**Post date:** [24. November 2017 um 10:54 UTC](https://forum.shopware.com/t/bestellung-per-api-pushen-ohne-erfolg/49674/5 "2017-11-24T10:54:53Z")

</div>

Das was du zuletzt gepostet hast ist kein JSON Code sondern immernoch PHP Code. Wie hast du denn das json\_encode durchgeführt?

---

<div class="post-metadata">

**Author:** ![smeissle](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@smeissle](https://forum.shopware.com/u/smeissle)\
**Post date:** [24. November 2017 um 11:07 UTC](https://forum.shopware.com/t/bestellung-per-api-pushen-ohne-erfolg/49674/6 "2017-11-24T11:07:14Z")

</div>

> [@arnebecker schrieb:](https://forum.shopware.com/profile/26696/arnebecker "arnebecker")
> 
> Das was du zuletzt gepostet hast ist kein JSON Code sondern immernoch PHP Code. Wie hast du denn das json\_encode durchgeführt?

Das mache ich so: $diebestellung2 = json\_encode($diebestellung);

---

<div class="post-metadata">

**Author:** ![arnebecker](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@arnebecker](https://forum.shopware.com/u/arnebecker)\
**Post date:** [24. November 2017 um 11:29 UTC](https://forum.shopware.com/t/bestellung-per-api-pushen-ohne-erfolg/49674/7 "2017-11-24T11:29:34Z")

</div>

Das kann nicht sein. Die Zeile gibt nicht das Ergebnis aus deinem letzten Post zurück.

&nbsp;

```
	//$diebestellung2 = json_encode($diebestellung);
	//echo "";
	
	
	$clientcb->post('orders,'.$diebestellung);

```

Du solltest vielleicht auch $diebestellung2 an post() übergeben!

---

<div class="post-metadata">

**Author:** ![smeissle](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@smeissle](https://forum.shopware.com/u/smeissle)\
**Post date:** [24. November 2017 um 11:34 UTC](https://forum.shopware.com/t/bestellung-per-api-pushen-ohne-erfolg/49674/8 "2017-11-24T11:34:39Z")

</div>

> [@arnebecker schrieb:](https://forum.shopware.com/profile/26696/arnebecker "arnebecker")
> 
> Das kann nicht sein. Die Zeile gibt nicht das Ergebnis aus deinem letzten Post zurück.
> 
> &nbsp;
> 
> //$diebestellung2 = json\_encode($diebestellung);  
> //echo „“;
> 
> $clientcb-\>post(‚orders,‘.$diebestellung);
> 
> Du solltest vielleicht auch $diebestellung2 an post() übergeben!

Das ist noch ein Auszug aus dem alten Code, der aktuelle sieht so aus:

```
$diebestellung2 = json_encode($diebestellung);
		
echo "";
print_r ($diebestellung2);
echo "";
	
$clientcb->post('orders,'.$diebestellung2);

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![arnebecker](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@arnebecker](https://forum.shopware.com/u/arnebecker)\
**Post date:** [24. November 2017 um 12:44 UTC](https://forum.shopware.com/t/bestellung-per-api-pushen-ohne-erfolg/49674/9 "2017-11-24T12:44:48Z")

</div>

Was ist denn $clientcb? Und du bist dir sicher, dass was du an post() gibst richtig ist? Rein intuitiv würde ich eher sagen es müsste&nbsp;post(‚orders‘, $diebestellung2); heißen. Also $bestellung2 als zweiten Parameter.

---

<div class="post-metadata">

**Author:** ![smeissle](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@smeissle](https://forum.shopware.com/u/smeissle)\
**Post date:** [24. November 2017 um 14:50 UTC](https://forum.shopware.com/t/bestellung-per-api-pushen-ohne-erfolg/49674/10 "2017-11-24T14:50:34Z")

</div>

> [@arnebecker schrieb:](https://forum.shopware.com/profile/26696/arnebecker "arnebecker")
> 
> Was ist denn $clientcb? Und du bist dir sicher, dass was du an post() gibst richtig ist? Rein intuitiv würde ich eher sagen es müsste&nbsp;post(‚orders‘, $diebestellung2); heißen. Also $bestellung2 als zweiten Parameter.

Hallo $clientcb ist unser API-Client, der passt denn vor Erstellung der Bestellung wird zuerst der Kunde angelegt und das klappt.

Hier mal die Anzeige im Browser, nach dem ich jetzt das Komma verschoben habe, gibt es eine neue Fehlermeldung ☹

```
---<<< Nächste Bestellung >>>---

Array
(
    [id] => 9775
    [location] => https://cbdirekt.de/api/customers/9775
)

Kunde wurde angelegt!
Die BenutzerID ist: 9775

Ausgabe mit PRE von $bestellung:

[
		'customerId' => 9775,
		'paymentId' => 5,
		'dispatchId' => 9,
		'partnerId' => 11,
		'shopId' => 1,
		'invoiceAmount' => 13.20,
		'invoiceAmountNet' => 11.0924369748,
		'invoiceShipping' => 4.90,
		'invoiceShippingNet' => 4.11764705882,
		'orderTime' => 2017-11-22 15:36:04,
		'comment' => M171102370769,
		'net' => 0,
		'taxFree' => 0,
		'languageIso' => '1',
		'currency' => 'EUR',
		'currencyFactor' => 1,
		'remoteAddress' => '',
		'details' => [
				[
				'articleId' => 68544,
				'taxId' => 1,
				'taxRate' => 19,
				'statusId' => 0,
				'articleNumber' => 02024000HAN,
				'price' => 3.20,
				'quantity' => 1,
				'articleName' => HG Reduziernippel DN20 x DN15 chrom Hansgrohe 2024000,
				'shipped' => 0,
				'shippedGroup' => 0,
				'mode' => 0,
				'esdArticle' => 0,
			
				],
				[
				'articleId' => 68549,
				'taxId' => 1,
				'taxRate' => 19,
				'statusId' => 0,
				'articleNumber' => 13085000HAN,
				'price' => 5.10,
				'quantity' => 1,
				'articleName' => HG Luftsprudler chrom Hansgrohe 13085000,
				'shipped' => 0,
				'shippedGroup' => 0,
				'mode' => 0,
				'esdArticle' => 0,
			
				]
		],
		'documents' => [],
		'billing' => [
			'id' => 2,
			'customerId' => 9775,
			'countryId' => 2,
			'stateId' => 2,
			'company' => Firma,
			'salutation' => 'mr',
			'firstName' => Test,
			'lastName' => Test,
			'street' => Teststrasse 1,
			'additionalAddressLine1' => ,
            'additionalAddressLine2' => ,
			'zipCode' => 74177,
			'city' => Bad Friedrichshall,
		],
		'shipping' => [
			'id' => 2,
			'countryId' => 2,
			'stateId' => 2,
			'customerId' => 9775,
			'company' => Firma,
			'firstname' => Test,
			'lastname' => Test,
			'salutation' => 'mr',
			'street' => Teststrasse 1,
			'additionalAddressLine1' => ,
            'additionalAddressLine2' => ,
			'zipcode' => 74177,
			'city' => Bad Friedrichshall
		],
		'paymentStatusId' => 17,
		'orderStatusId' => 0
	]

No Success

A required parameter is missing: customerId
Bestellung wurde nicht angelegt!

```

Die USER ID gibt es aber, die wurde ja vorher angelegt…

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![arnebecker](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@arnebecker](https://forum.shopware.com/u/arnebecker)\
**Post date:** [24. November 2017 um 15:37 UTC](https://forum.shopware.com/t/bestellung-per-api-pushen-ohne-erfolg/49674/11 "2017-11-24T15:37:59Z")

</div>

Puhh bin langsam überfragt.
