Supplier Ordering Integration Guide
- 1 Main settings
- 2 Tire Search
- 3 Supplier Ordering
- 3.1 Authorization
- 3.2 Tire Stock
- 3.3 Supplier fields
- 3.3.1 Single tire
- 3.3.2 Multi-tire
- 3.4 preOrderingInfo
- 3.4.1 Single tire order
- 3.4.2 Multi-tire order
- 3.5 Order create method
- 3.6 Order Status
Main settings
Here is the API key which allows you to test ordering
05198c64d142efd851ef15e54fdd917d
It provides you access to the following location ID:
12674
Also you will need a PIN code to authorize. PIN code is different for every location.
For location mentioned above you can use this one:
416905
*Please note, this pin code needs to be entered by the user, it can not be hardcoded.
Tire Search
You can make any kind of search, for example using search By Size method
Please make sure you are using DEV environment base URL:
Request Example
Suppliers connected to location
He highly recommend to use this method to get common information about specific supplier in ordering
array. Please see description below response example.
Request example
Response example
*Please note that stock method filters accept id
param value.
Useful response parameters
ordering_type | Show it branch should be used in requests | base - branch shouldn’t be used in requests null & disabled - you can’t order from this supplier right now |
---|---|---|
multiple_branch_ordering | Shows if supplier support multiple branch ordering | true - you can send tires from different branches in one order |
multiple_tires_ordering | Shows if you can send several tires in one order | true - you can send several tires in one order |
dependence_quantity | Parameter that tells you that accepted fields or it’s values can depend on tire quantity. | Some suppliers may vary accepted fields and their values based on the tire availability. So in case this param = true we highly recommend calling fields method every time user change quantity. |
max_tires_per_order | Shows you maximum sku quantity that can be placed into single order. null - no limit |
|
Supplier Ordering
Authorization
GET /api/location/auth
To be able to order you should authorize and get token.
Use Location Authorize method (/api/location/auth) which requires location, api key and pin code.
Request Example
Request parameters
dealer_location_id | Dealer location |
---|---|
pin_code | Pin Code |
key | API key |
Response Example
Response Parameters
token | Authorisation token |
---|---|
expire | expire time |
*Please note, token will expire in 900 seconds after it was issued. You need to get new token after that time.
Tire Stock
GET /api/supplier/stock
To make order first of all you should check if it supports ordering and which fields you should send additionally when making orders.
Request example
Request parameters
token | Authorisation token |
---|---|
tire_id | Tire ID required |
Response example
Response parameters
supplier |
|
|
---|---|---|
name | Supplier Name |
|
nice_name | Supplier Nice Name |
|
dependence_quantity | Parameter that tells you that accepted fields or it’s values can depend on tire quantity. | Some suppliers may vary accepted fields and their values based on the tire availability. So in case this param = true we highly recommend calling fields method every time user change quantity. |
dependence_fields | List of fields and it’s values that can be changes according to selected values | If some fields returned in this array, fields or its possible values list can be adjusted when you change the value of these fields |
multiple_branch_ordering | Shows if supplier support multiple branch ordering | true - you can send tires from different branches in one order |
multiple_tires_ordering | Shows if you can send several tires in one order | true - you can send several tires in one order |
has_ordering_fields | Shows if you should send some fields in order | true - fields should be send in order |
branches | Array of supplier branches |
|
branch | Branch id | Used for old implementations. Deprecated |
id | Branch id |
|
quantity | Available qty in branch |
|
name | Branch name |
|
ship_data | Some shipping rules provided by the supplier |
|
address | Warehouse address |
|
contact | Warehouse contact details |
|
estimated_delivery_date | Estimated delivery date provided by the supplier |
|
estimated_delivery_time | Estimated delivery time provided by the supplier |
|
timezone | Timezone |
|
distance | Distance from warehouse (provided by the supplier) |
|
distance_unit | Distance unit |
|
tire_id | Tire ID |
|
price | Tire price |
|
quantity | Tire available quantity |
|
is_in_stock | Inner fields, not used for direct ordering |
|
part_number_original | Supplier part number |
|
cost | Tire cost |
|
ordering_type | Show it branch should be used in requests | base - branch shouldn’t be used in requests |
*Please note that stock method will return data for all suppliers that has this tire available. In case you need only one particular you can use supplier filter in this method.
Request example filtered by supplier
Response example filtered by supplier
Supplier fields
GET /api/supplier/{supplierName}/fields
Single tire
Request example
Request parameters
supplierName | Supplier’s name |
|
---|---|---|
tire_id | Tire ID |
|
quantity | Tire quantity |
|
branch | Tire branch | Some suppliers may vary accepted fields and their values based on the selected branch. |
Response example
Every item of response describes a fields which required for order or can be additionally sent with the order.
NOTE: Also for “select” type of fields, options list was extended, disabled property introduced.
When disabled is true, this option is not allowed to be passed, but we recommend to show it to the user, but as an unavailable option, as soon as for another quantity amount, it could be available. If disabled is false, option is available as earlier.
Response Example
Multi-tire
Request example
Request parameters
supplierName | Supplier’s name
|
---|---|
tire_ids | Tire IDs required |
quantities | Tire quantities optional if dependence_quantity = false |
branches | Tire branches optional if ordering_type not equal to "per_branch" |
Response
preOrderingInfo
POST /api/supplier/order/preOrderingInfo
This method will show you actual tire availability and depending on requested qty/delivery method/requested date/ect
Single tire order
Request example
Request parameters
token string | Authorisation token required |
---|---|
tire_id string | Tire ID required |
quantity | Tire Quantity |
supplier_fields | Array of supplier filelds |
branch | Supplier branch |
Response example
Response parameters
tire_id | Tire ID |
---|---|
branch | Branch ID |
cost | Tire Cost |
fet | FET |
quantity | Selected tire quantity |
quantity_available | Available quantity for this tire |
stock_available | List of branches with quantities where this tire currently available |
branch | Branch ID. Deprecated |
id | Branch ID |
quantity | Quantity available in this branch |
name | Branch name |
ship_data | Some shipping rules provided by the supplier |
address | Warehouse address |
contact | Warehouse contact details |
delivery_date_time | Estimated delivery date & time provided by the supplier |
cutoff | Cutoff |
distance | Distance from warehouse (provided by the supplier) |
distance_unit | Distance unit |
cost | Tire cost |
quantity | Selected quantity |
quantity_available | Available quantity |
total_cost | Total cost of tires in order |
total_fet | Total FET |
shipping_cost | Total shipping cost |
total_order | Total order |
delivery_date_time | Estimated delivery date & time provided by the supplier |
Multi-tire order
Request example
Request parameters
token string | Authorisation token required |
---|---|
tires | Array of tires with quantities |
tires.tire_id string | Tire ID required |
tires.quantity | Tire Quantity |
tires.branch | Supplier branch |
supplier_fields | Object with supplier filelds |
Response example
Order create method
POST /api/supplier/order/create
Single tire order (ordering_type = base)
Request example
Request parameters (same for single and multi-tire ordering)
tire_id | Tire ID |
---|---|
quantity | Tire quantity |
token | Authorisation token |
supplier_fields | Array of supplier fields |
branch | Supplier branch |
Response example
Response example (same for single and multi-tire ordering)
order_id | Order ID in TireConnect system |
---|---|
invoice | Invoice ID returned by supplier |
shipping_cost | Shipping cost of order |
tires | Array of tires |
id | Tire ID |
part_number | Tire part number |
quantity_demand | Requested tire quantity |
quantity_ordered | Ordered tire quantity |
price | Requested tire price |
price_ordered | Ordered tire price |
status | Tire status in order |
message | Message returned by supplier for each tire |
status | Order status |
message | Message returned by supplier for whole order |
delivery_date_time | Estimated Delivery Date & Time provided by the supplier |
Single tire order (ordering_type = per_branch)
Request example
Response example
Multiple tire order (multiple_branch_ordering = false)
Request example
Response example
Multiple tire order (multiple_branch_ordering = true)
Request example
Response example
Order Status
POST /api/supplier/order/status
This method used for receiving order status from the supplier.
Request Example
Request parameters
token | Authorisation token required |
---|---|
location_id | Location ID which was used for placing an order |
id | Order ID |
Response Example
Response parameters
order_id | Order ID |
---|---|
status | Order Status in TC system |
vendor_status | Order Status in Vendor system |