Qikink

Create Order with custom designs


Using this api you can create orders in Qikink with custom designs, its a useful API for clients who gives their customers the option to customize their design.

All our request parameters are passed as json objects inside the request Body and not as form-data.

POST

                                    
{
"auth_token":"YOUR_AUTH_TOKEN",
    "order_number": 126166,
    "qikink_shipping": 0,
    "gateway": "cash_on_delivery",
    "total_order_value": 345,
    "line_items": [{
            "search_from_my_products": false,
            "price": "1199.00",
            "quantity": 1,
            "sku": "Mrnhs-Bk-L",
            "designs": [{
                    "design_code": "hcasfer",
                    "width_inches": 1.5,
                    "height_inches": 2.4,
                    "placement_sku": "fr",
                    "design_link": "https://qikink.com",
                    "mockup_link": "https://mock.com"
                }]
        }],
   "shipping_address": {
                "first_name": "Rastu",
                 "last_name": "Perak",
                 "address1": "ADDRESS 1 MAX 80 CHARACTERS",
 
                 "address2": "ADDRESS 2 MAX 80 CHARACTERS",
                "phone": "9999999999",
                "email":"customeremail@qikink.com",
                "city": "Mumbai",
                "zip": "400050",
                "province": "Maharashtra",
                "country": "India",
               
                "name": "Gauri Pai",
                "country_code": "IN",
               
            }
}
							
                                
                                       
function createShipment($params) {
    try {
        $json_params = json_encode($params);
        $url = 'https://qikink.com/erp2/index.php/api/createOrder';
//open connection
        $ch = curl_init();
//set the url, number of POST vars, POST data
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $json_params);
        curl_setopt($ch, CURLOPT_HTTPHEADER,
                array('Content-Type:application/json'));
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//execute post
        $result = curl_exec($ch);
        $result = json_decode($result, true);
//close connection
        curl_close($ch);
       
       if($result->code==1):
           // Order added Successfully do your stuff here
       else:
           // order not added. 
           throw new Exception($result->msg,$result->code);
       endif;
       
    } catch (\Exception $e) {
        echo $e;
    }
}

$params = array(
    'auth_token' => 'YOUR-QIKINK-AUTH-TOKEN',
    'order_number' => '445AB',
    'qikink_shipping' => 0,
    'gateway' => 'online',
    'total_order_value' => 556,
    'line_items' => array(array(
            'search_from_my_products' => 0,
            'price' => 440,
            'quantity' => 1,
            'sku' => 'Mrnhs-Bk-L',
            'designs' => array(array(
                    'design_code' => 'TY113',
                    'width_inches' => 1.4,
                    'height_inches' => 2.9,
                    'placement_sku' => "fr",
                    'design_link' => "https://qikink.com/assets/1.png",
                    'mockup_link' => "https://qikink.com/assets/2.png",
                ))
        )
    )
);
echo createShipment($params);
                                    
{
code:1,
order_id:2234,
msg:"Successfully created order"
}
							
                                

Parameters


Field Type Description
auth_token String

The authentication token shared by qikink.

order_number String(15)

Your unique order number. only alphanumberic characters are allowed.

qikink_shipping boolean

Pass 1 for us to do the shipping, 0 for self shipping

gateway string(20)

Pass "cash_on_delivery" for Cash on delivery orders. others can be "online"

line_items array

Array List of Products in the order

search_from_my_products boolean

Whether to search the sku with your Qikink "My Products" list. Set to 0 for custom design

price number

Selling price of the product

quantity number

No. of units needed

sku number

The qikink sku should be passed here. We use this sku to determine the product

designs(optional) array list

Designs details which needs to be printed with the product

--design_code(required) string(15)

A unique design code for the design.

--width_inches(required) float

The width of the design to be printed in Inches(Not needed for AOP products and Accessories)

--height_inches(required) float

The height of the design to be printed in inches(Not needed for AOP products and Accessories)

--placement_sku(required) string(2)

The Placement of the designs . Values are "fr" for front, "bk" for back, "lp" for left pocket, "rp" for right pocket, "ls" for left sheeve and "rs" for right sleeve)

--design_link(required it its a new design, if design code already exists with us, no need to pass this param) url

Link of the design file to be printed

--mockup_link(optional) url

Mockup Image link.

shipping_address list

*Required if opted for qikink_shipping. An array of address details

first_name string(20)

The first name of the contact in shipping address

last_name string(20)

The last name of the contact in shipping address

last_name string(20)

The last name of the contact in shipping address

address1 string(80)

The address of the shipment

address2 string(20)

The last name of the contact in shipping address

phone number(15)

Phone number of the contact in shipment(tracking link will also be sent to this no. in sms in your branding)

email string(40)

Email id of the shipment contact. Tracking link will be sent to this mail under your brand name.

city string(40)

The city name.

province string(40)

The state/province name.

country_code string (2)

Pls click here to download the country codes. For India its "IN"