1, 'eshop_id' => 1, 'email' => 'john.doe@gmail.com', 'phone' => '123456678', 'invoice_firstname' => 'John', 'invoice_surname' => 'Doe', 'invoice_street' => 'U Pošty 1', 'invoice_city' => 'Praha', 'invoice_zipcode' => '12800', 'contact_like_invoice' => 1, 'payment_id' => 2, 'payment_price_vat' => 0, 'delivery_id' => 3, 'delivery_price_vat' => 0, 'basket' => array( array( 'code' => 'DS69887870', 'price_retail_vat' => 410, 'quantity' => 9, ) ), ); $token = 'token'; // Vložte Váš token, který naleznete v administraci dropshipping.cz $url = 'https://client.api.dropshipping.cz/v1/orders'; $json = json_encode($data); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_POSTFIELDS, $json); curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST'); curl_setopt($curl, CURLOPT_HTTPHEADER, array( 'Accept: application/json', 'Authorization: ' . $token, 'Content-Length: ' . strlen($json), 'Content-Type: application/json', )); $response = json_decode(curl_exec($curl)); if (!$response || !isset($response->code) || $response->code !== 201) { echo 'Chyba: ' . $response->message; die(); } echo'
'; var_dump($response); die();