Onboarding API (beta) | Preliminary
- 1 Get started
- 2 Dealer management methods
- 3 Dealer location management methods
- 3.1 Get list of dealer locations
- 3.2 Get list of tire suppliers connected to location
- 3.3 Create location
- 3.4 Update location
- 3.5 Update location localised values
- 3.6 Add location localised values
- 3.7 Activate location
- 3.8 Deactivate location
- 3.9 Activate tire supplier connection
- 3.10 Deactivate tire supplier connection
- 4 Connection requests
- 5 Supplier direct ordering
Â
Get started
Please make sure you are using DEV environment base URL:
https://devdemo.tireconnect.ca
Â
Get authorisation token
POST /api/partner/auth/
For all methods listed below you will need to use a token. Please note that you should use token in header as token
.
Request example
curl --location 'https://devdemo.tireconnect.ca/api/partner/auth' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"client_id": "3b9c377f-8be6-469c-b40a-3fd385d33e21",
"client_secret": "fdcc8377-de55-489a-82ae-d9c924fdf832"
}'
Request parameters
client_id | Partner’s client ID required |
---|---|
client_secret | Partner’s Client secret required |
Response example
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2Mzc3OTMxfQ.WN4xSw6RNxCOEW-gDy8sF6OT3vssN1w9zM-Hx4Hi4fgUp_viSOvFrkdhapX9zQguRJ0MXjBUH0KGsCWNRHbGVc1GZg4sgPZZg5zc4qi4yqQOMTdxM78V-8iyUHzqB5LUQsMOhOCfObcO_ZJz7xVcz7hKUxlQSrc-TvPg-C6BUPU",
"expire": 7200
}
Response Parameters
token | Authorisation token |
---|---|
expire | expire time |
Get list of available clients
POST /api/account/v2/partner/client/list
This method will return all available clients that you can work with. partner_id
will be provided by TireConnect.
Request example
Request parameters
partner_id | Partner ID required |
---|
Response example
Response Parameters
status | Status |
---|---|
client_id | Client’s ID |
client_name | Client Name |
access_type |
|
Get list of available suppliers
GET /api/partner/supplier
This method will return all available suppliers that can be connected to dealer location.
Request example
Response example
Response Parameters
logo | Supplier’s logo |
---|---|
name | Supplier name |
id | Supplier connection ID |
operating_countries | List of supplier operating countries |
operating_countries | List of supplier countries with regions where supplier operating |
country | Country |
states | List of states |
tf | Transaction Fee |
ordering_supported | Mark of direct ordering support |
contact_phone | Supplier contact phone |
address | Supplier address |
address_line_1 | Address line 1 |
address_line_2 | Address line 2 |
city | City |
postal_code | Zip/postal code |
state | State/province |
country | Country |
credentials | Object with credentials needed for supplier connection request |
type | Field type |
options | Available options to select |
name | Field name |
label | Field label |
description | Field description |
required | Field required or not |
link | Link to supplier registration form |
is_checked | In case field_type = checkbox it will show it’s initial state |
attributes | Field attributes |
Â
Get list of locales for client
POST account/v2/client/locale/list
This method will return all available locales for specified client. You will need this for dealer & location management.
Request example
Request parameters
client_id | Client ID required |
---|
Response example
Response parameters
status | Status |
---|---|
locale | Locale label |
default | Shows if this locale default or not |
Â
Â
Dealer management methods
All methods in this section have the same response structure
Response example
Response Parameters
status | Status |
---|---|
dealer_id | Dealer ID |
first_name | First Name |
last_name | Last Name |
email | |
additional_emails | List of additional emails |
phone_number | Phone Number |
fax | Fax |
group | Group |
language | Array with localised values for dealer |
locale | Locale label |
company_name | Dealer’s Name |
logo | Dealer’s Logo |
is_active | Shows whether the dealer is active or not |
updated_at | Shows when dealer was updated last time |
created_at | Shows when dealer was created |
Get list of dealers for specified client
POST /account/v2/client/dealer/list
This method will show you all dealers by specified client
Request example
Request parameters
client_id | Client ID required |
---|
Create dealer
POST /account/v2/client/dealer/create
This method will create a dealer in specified client. Please note that when you creating a dealer you should provide localised values at least for locale that marked as primary
for the client.
Request example
Request parameters
client_id | Client id required |
---|---|
first_name | Dealer first name required |
last_name | Dealer last name required |
email | Dealer email required |
additional_emails | Array of dealer additional emails optional |
phone_number | Dealer phone number required |
fax | Dealer fax optional |
language | List of localised items required |
locale | Locale label required |
company_name | Dealer name required |
is_active | Shows whether the dealer is active or not optional |
Update dealer
POST /account/v2/client/dealer/update
This method allows you to update or patch dealer information. Please note that this method will update only non-localised values.
Request example
Request parameters
client_id | Client id required |
---|---|
dealer_id | Dealer id required |
first_name | Dealer first name optional |
last_name | Dealer last name optional |
email | Dealer email optional |
additional_emails | Array of dealer additional emails optional |
phone_number | Dealer phone number optional |
fax | Dealer fax optional |
is_active | Shows whether the dealer is active or not optional |
Update dealer localised values
POST /account/v2/client/dealer/language/update
This method allows you to update or patch localised values.
Request example
Request parameters
client_id | Client id required |
---|---|
dealer_id | Dealer id required |
locale | Locale label required |
company_name | Dealer company name optional |
Add dealer localised values
POST /account/v2/client/dealer/language/create
This method allows you to add another locale with values. Please note that locale should be one from the list of client’s locales and should be missing from dealer.
Request example
Request parameters
client_id | Client id required |
---|---|
dealer_id | Dealer id required |
locale | Locale label required |
company_name | Dealer company name required |
Activate dealer
POST /account/v2/client/dealer/activate
This method allows you to activate dealer.
Request example
Request parameters
client_id | Client id required |
---|---|
dealer_id | Dealer id required |
Deactivate dealer
POST /account/v2/client/dealer/deactivate
This method allows you to deactivate dealer.
Request example
Request parameters
client_id | Client id required |
---|---|
dealer_id | Dealer id required |
Â
Dealer location management methods
All methods in this section have the same response structure
Response example
Response Parameters
status | Status |
---|---|
location_id | Location id |
first_name | First name |
last_name | Last name |
email | Location email |
additional_email | Location additional email |
phone_number | Location phone number |
postal_code | Location zip/postal code |
country | Location country |
province | Location province |
latitude | Location latitude |
longitude | Location longitude |
external_id | Location external id |
language | Array with localised values for location |
locale | Locale label |
location_name | Location name |
address_line_1 | Address line 1 |
address_line_2 | Address line 2 |
city | Location city |
is_active | Shows whether the location is active or not |
updated_at | Shows when location was updated last time |
created_at | Shows when location was created |
Get list of dealer locations
POST /account/v2/dealer/location/list
This method will show you all dealer locations
Request example
Request parameters
dealer_id | Dealer id required |
---|
Get list of tire suppliers connected to location
POST /account/v2/location/tire/connection/list
This method will show you all tire suppliers connected to location
Request example
Request parameters
location_id | Location id required |
---|
Response example
Request parameters
status | Status |
---|---|
supplier_cid | Supplier connection id |
supplier | Supplier id |
supplier_name | Supplier nice name |
Create location
POST /account/v2/dealer/location/create
This method allows you to create location in specified dealer
Request example
Request parameters
dealer_id | Dealer id required |
---|---|
first_name | First name required |
last_name | Last name required |
email | Location email required |
additional_email | Location additional email optional |
phone_number | Location phone number required |
postal_code | Location zip/postal code required |
country | Location country required |
province | Location province required |
latitude | Location latitude required |
longitude | Location longitude required |
external_id | Location external id optional |
language | Array with localised values for location required |
locale | Locale label required |
location_name | Location name required |
address_line_1 | Address line 1 required |
address_line_2 | Address line 2 optional |
city | Location city required |
is_active | Shows whether the location is active or not required |
Update location
POST /account/v2/dealer/location/update
This method allows you to update / patch location information in specified dealer. Please note that this method will update only non-localised values.
Request example
Request parameters
dealer_id | Dealer id required |
---|---|
location_id | Location id required |
first_name | First name optional |
last_name | Last name optional |
email | Location email optional |
additional_email | Location additional email optional |
phone_number | Location phone number optional |
postal_code | Location zip/postal code optional |
country | Location country optional |
province | Location province optional |
latitude | Location latitude optional |
longitude | Location longitude optional |
external_id | Location external id optional |
is_active | Shows whether the location is active or not optional |
Update location localised values
POST /account/v2/dealer/location/language/update
This method allows you to update or patch localised values.
Request example
Request parameters
dealer_id | Client id required |
---|---|
location_id | Dealer id required |
locale | Locale label required |
location_name | Dealer company name optional |
address_line_1 | Address line 1 optional |
address_line_2 | Address line 2 optional |
city | Location city optional |
Add location localised values
POST /account/v2/dealer/location/language/create
This method allows you to update or patch localised values.
Request example
Request parameters
dealer_id | Client id required |
---|---|
location_id | Dealer id required |
locale | Locale label required |
location_name | Dealer company name required |
address_line_1 | Address line 1 required |
address_line_2 | Address line 2 optional |
city | Location city required |
Activate location
POST /account/v2/dealer/location/activate
This method allows you to activate dealer.
Request example
Request parameters
dealer_id | Dealer id required |
---|---|
location_id | Location id required |
Deactivate location
POST /account/v2/dealer/location/deactivate
This method allows you to activate dealer.
Request example
Request parameters
dealer_id | Dealer id required |
---|---|
location_id | Location id required |
Activate tire supplier connection
POST /account/v2/location/tire/connection/activate
This method allows you to activate dealer.
Request example
Request parameters
location_id | Location id required |
---|---|
supplier | Supplier required |
Deactivate tire supplier connection
POST /account/v2/location/tire/connection/deactivate
This method allows you to activate dealer.
Request example
Request parameters
location_id | Location id required |
---|---|
supplier | Supplier required |
Connection requests
All methods in this section have the same response structure
Response example
Response Parameters
status | Status |
---|---|
connection_request_id | Connection request id |
location_id | Location id |
contact_details | Object with contact details |
first_name | First name |
last_name | Last name |
email | |
phone | Phone number |
supplier_cid | Supplier CID |
supplier_name | Supplier name |
credentials | Object with credentials needed to connect location to supplier |
name | Parameter name |
value | Parameter value |
status | Request status |
note | Some notes |
updated_at | Shows when request was updated last time |
created_at | Shows when request was created |
Create connection request for tire supplier
POST /account/v2/location/connection-request/create
This method allows you to create supplier connection request.
Request example
Request parameters
supplier_cid | Supplier CID required |
---|---|
location_id | Location id required |
first_name | First name required |
last_name | Last name required |
email | required |
phone | Phone number required |
note | Some notes optional |
credentials | Array with credentials needed to connect location to supplier required |
name | Parameter name required |
value | Parameter value required |
Get list of connection requests
POST /account/v2/location/connection-request/list
This method allows you to get a list of all connection requests
Request example
Request parameters
location_id | Location id required |
---|---|
filter | An object of filters Available values: optional |
limit | Limit optional |
offset | Offset optional |
sort_by | Sort by optional |
sort_how | Sort how optional |
Cancel connection request
POST /account/v2/location/connection-request/cancel
This method allows you to cancel connection request
Request example
Request parameters
supplier_cid | Supplier CID required |
---|---|
location_id | Location id required |
connection_request_id | Connection request id required |
note | Some notes optional |
Resubmit connection request
POST /account/v2/location/connection-request/resubmit
This method allows you to resubmit connection request
Request example
Request parameters
connection_request_id | Connection request id required |
---|---|
location_id | Location id required |
first_name | First Name optional |
last_name | Last name optional |
email | optional |
phone | Phone number optional |
note | Some notes optional |
credentials | Object with credentials needed to connect location to supplier optional |
name | Parameter name required |
value | Parameter value required |
Â
Connection requests statuses
Â
List of statuses
Pending (pending) - initial status, applied when connection request created or resubmitted
Rejected (rejected) - connection request was rejected due to some reason
On hold (on_hold) - connection request was putted on hold
Approved (approved) - connection request approved by the supplier, but it should be validated.
Auto Approved (auto_approved) - same as
approved
status.Cancelled (cancelled) - connection request was cancelled by the user.
In progress (in_progress) - validation of the connection.
Invalid (invalid) - validation failed, connection requires some action from the supplier.
Finalized (finalized) - connection created and validation passed.
Actions that can be done by the API user
Connection request creation → Pending: User created CR (location/connection-request/create)
Pending → Pending: User edited CR (location/connection-request/resubmit)
Pending → Cancelled: User cancelled CR (location/connection-request/cancel)
Rejected → Cancelled: User cancelled CR (location/connection-request/cancel)
Rejected → Pending: User resubmitted CR (location/connection-request/resubmit)
Â
Â
Supplier direct ordering
Get a token for direct ordering using Partner’s token
POST /location/auth/token
This method allows you to get token for direct ordering just with location_id and partner’s token.
Request example
Request parameters
location_id | Location id required |
---|
Response example
Response Parameters
token | Authorisation token |
---|---|
expire | expire time |
Â