Name | Type | Required | Data |
---|---|---|---|
username | Text varchar(50) | YES | Username |
password | Text varchar(100) | YES | Password |
user_token | Text | YES | Token provided |
part_id | Numeric (int 11) | YES | Part id |
category_id | Numeric (int 11) | NO | Category id assigned to part |
car_id | Numeric (int 11) | NO | Car id assigned to part |
quality | Numeric (int 11) | NO | Quality id assigned to part |
status | Numeric (int 11) | NO | Status id assigned to part |
position | Numeric (int 11) | NO | Position id assigned to part |
notes | Text | NO | Additional notes |
place | Numeric varchar(255) | NO | ID of the place where part is stored |
manufacturer_code | Text varchar(255) | NO | Manufacturer code (incorrect code will be truncated) |
visible_code | Text varchar(255) | NO | Visible code (incorrect code will be truncated) |
other_code | Text varchar(255) | NO | Other code (incorrect code will be truncated) |
optional_codes[] | Text | NO | Optional part codes * (incorrect codes will be truncated) |
id_bridge | Numeric (int 11) | NO | Deprecated - field is not updatable |
sell_price | Numeric (float) | NO | Price for which the part was sold |
sell_vat_null | Numeric (int 11) | NO | Sell vat null |
sell_date | Date | NO | Date when the part was sold at |
internal_notes | Text | NO | Notes accessible only by internal users |
tires | Numeric (tinyint1) | NO | Is part a tire {0, 1} |
rims | Numeric (tinyint1) | NO | Is part a rim {0, 1} |
rims_spacing | Numeric (tinyint3) | NO | Rims spacing {0, ... 37} |
rims_fixing_points | Numeric (tinyint3) | NO | Rims fixing points {0, ... 11} |
tires_width | Numeric (tinyint3) | NO | Tires width {0, ... 41} |
rims_central_diameter | Numeric (tinyint3) | NO | Rims central diameter {0, ... 64} |
rims_quantity | Numeric (tinyint3) | NO | Rims quantity {1, ... 5} |
tires_height | Numeric (tinyint3) | NO | Tires height {1, ... 25} |
tires_tread_depth | Numeric (tinyint3) | NO | Tires tread depth {1, ... 20} |
tires_quantity | Numeric (tinyint3) | NO | Tires quantity {1, ... 5} |
price | Numeric (float) | NO (warning) | Price (must be filled in order to be shown in shop) |
original_currency | Text | NO | Currency {EUR, PLN}. Default: EUR |
photo | Text | NO | Photo url |
photos[] | Array | NO | Photo url * e.g. photos[0] => 'photos.url1.jpg', photos[1] => 'photos.url2.jpg' |
sticker_note | Text (varchar 32) | NO |
Note on sticker
|
english | Numeric (integer) | NO | If part is RHD add 1 {0, 1} |
$post = [
'username' => '',
'password' => '',
'user_token' => '',
'price' => '15',
'part_id' => '288566'
];
$ch = curl_init('https://api.rrr.lt/crm/updatePart');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = json_decode(curl_exec($ch));
curl_close($ch);
{"msg":"OK","status_code":"R200"}
Values must be filled in order to be shown in shop.
Value of the 'photo' field must be first value of 'photos[]' field too, for correct main photo upload and thumbnail generation.