Name | Type | Required | Data |
---|---|---|---|
username | Text varchar(50) | YES | Username |
password | Text varchar(100) | YES | Password |
user_token | Text | YES | Token provided |
order_id | Numeric | YES | Order id |
weight | Numeric | YES | Package weight in grams |
height | Numeric | YES | Package height in centimeters |
length | Numeric | YES | Package length in centimeters |
width | Numeric | YES | Package width in centimeters |
packing_type | Numeric | NO | Numeric 1 - Box, package (Default), 2 - Pallet, 3 - Envelope |
$post = [
'username' => '',
'password' => '',
'user_token' => '',
'order_id' => 555,
'weight' => 100,
'height'=> 100,
'length'=> 100,
'width'=> 100,
];
$ch = curl_init('https://api.rrr.lt/crm/importPostData');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($ch);
curl_close($ch);
{"msg":"OK","status_code":"R200"}
{"msg":"The weight is required","status_code":"R400"}
{"msg":"The Width is required","status_code":"R400"}
{"msg":"Order not found","status_code":"R404"}
At the moment, only one post data available per order. Other request to the same order will update previous data