Supplier Ordering Integration Guide

 

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
string

Show it branch should be used in requests

base - branch shouldn’t be used in requests
per_branch - branch should be used in requests

null & disabled - you can’t order from this supplier right now

multiple_branch_ordering
boolean

Shows if supplier support multiple branch ordering

true - you can send tires from different branches in one order
false - you can’t send tires from different branches in one order

multiple_tires_ordering
boolean

Shows if you can send several tires in one order

true - you can send several tires in one order
false - one tire per order

dependence_quantity
boolean

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
int

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
int
query

Dealer location

required

pin_code
int
query

Pin Code

required

key
string
query

API key

required

Response Example

Response Parameters

token
string

Authorisation token

expire
int

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

query

Authorisation token

required

tire_id

query

Tire ID

required

Response example

Response parameters

supplier
object

 

 

name
string

Supplier Name

 

nice_name
string

Supplier Nice Name

 

dependence_quantity
boolean

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
array

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
boolean

Shows if supplier support multiple branch ordering

true - you can send tires from different branches in one order
false - you can’t send tires from different branches in one order

multiple_tires_ordering
boolean

Shows if you can send several tires in one order

true - you can send several tires in one order
false - one tire per order

has_ordering_fields
boolean

Shows if you should send some fields in order

true - fields should be send in order
false - order can be made without fields

branches
array

Array of supplier branches

 

branch
string

Branch id

Used for old implementations. Deprecated

id
string

Branch id

 

quantity
int

Available qty in branch

 

name
string

Branch name

 

ship_data
string

Some shipping rules provided by the supplier

 

address
object

Warehouse address

 

contact
object

Warehouse contact details

 

estimated_delivery_date
string

Estimated delivery date provided by the supplier

 

estimated_delivery_time
string

Estimated delivery time provided by the supplier

 

timezone
string

Timezone

 

distance
int

Distance from warehouse (provided by the supplier)

 

distance_unit
string

Distance unit

 

tire_id
string

Tire ID

 

price
int

Tire price

 

quantity
int

Tire available quantity

 

is_in_stock
boolean

Inner fields, not used for direct ordering

 

part_number_original
string

Supplier part number

 

cost
int

Tire cost

 

ordering_type
string

Show it branch should be used in requests

base - branch shouldn’t be used in requests
per_branch - branch should 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
string
path

Supplier’s name

required

 

tire_id
string
query

Tire ID

required

 

quantity
int
query

Tire quantity

optional if dependence_quantity = false

 

branch
string
query

Tire branch

optional if  ordering_type not equal to "per_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
string
path

Supplier’s name


required

tire_ids
string
query

Tire IDs
comma separated

required

quantities
int
query

Tire quantities
comma separated

optional if dependence_quantity = false

branches
string
query

Tire branches
comma separated

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
int

Tire Quantity
required

supplier_fields
object

Array of supplier filelds
optional if has_ordering_fields = false

branch
string

Supplier branch
not needed if ordering_type=base
if multiple_branch_ordering = true you should send branch for each tire

Response example

Response parameters

tire_id
string

Tire ID

branch
string

Branch ID

cost
int

Tire Cost

fet
int

FET

quantity
int

Selected tire quantity

quantity_available
int

Available quantity for this tire

stock_available
array

List of branches with quantities where this tire currently available

branch
string

Branch ID. Deprecated

id
string

Branch ID

quantity
int

Quantity available in this branch

name
string

Branch name

ship_data
string

Some shipping rules provided by the supplier

address
object

Warehouse address

contact
object

Warehouse contact details

delivery_date_time
string

Estimated delivery date & time provided by the supplier

cutoff
string

Cutoff

distance
int

Distance from warehouse (provided by the supplier)

distance_unit
string

Distance unit

cost
int

Tire cost

quantity
int

Selected quantity

quantity_available
int

Available quantity

total_cost
int

Total cost of tires in order

total_fet
int

Total FET

shipping_cost
int

Total shipping cost

total_order
int

Total order

delivery_date_time
object

Estimated delivery date & time provided by the supplier

 

Multi-tire order

Request example

Request parameters

token

string

Authorisation token

required

tires
list

Array of tires with quantities

tires.tire_id

string

Tire ID

required

tires.quantity
int

Tire Quantity
required

tires.branch
string

Supplier branch
not needed if ordering_type=base
if multiple_branch_ordering = false you should send the same branch for each tire

supplier_fields
object

Object with supplier filelds
optional if has_ordering_fields = false

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
query

Tire ID

quantity
query

Tire quantity

token
query

Authorisation token

supplier_fields
query

Array of supplier fields

branch
query

Supplier branch
not needed if ordering_type=base
if multiple_branch_ordering = true you should send branch for each tire

Response example

Response example (same for single and multi-tire ordering)

order_id
int

Order ID in TireConnect system

invoice
string

Invoice ID returned by supplier

shipping_cost
int

Shipping cost of order

tires
array

Array of tires

id
string

Tire ID

part_number
string

Tire part number

quantity_demand
int

Requested tire quantity

quantity_ordered
int

Ordered tire quantity

price
int

Requested tire price

price_ordered
int

Ordered tire price

status
string

Tire status in order

message
string

Message returned by supplier for each tire

status
string

Order status

message
string

Message returned by supplier for whole order

delivery_date_time
object

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
query

Authorisation token

required

location_id
int

Location ID which was used for placing an order

id
int

Order ID

Response Example

Response parameters

order_id
int

Order ID

status
int

Order Status in TC system

vendor_status
int

Order Status in Vendor system