Onboarding API (beta) | Preliminary

a1a1ff082a35a557ac23a93c2dcce0a3cfd5445a.png

 

Postman Demo collection

Account API Swagger

Partner API Swagger

Supplier API Swagger

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
string

Partner’s client ID

required

client_secret
string

Partner’s Client secret

required

Response example

{ "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2Mzc3OTMxfQ.WN4xSw6RNxCOEW-gDy8sF6OT3vssN1w9zM-Hx4Hi4fgUp_viSOvFrkdhapX9zQguRJ0MXjBUH0KGsCWNRHbGVc1GZg4sgPZZg5zc4qi4yqQOMTdxM78V-8iyUHzqB5LUQsMOhOCfObcO_ZJz7xVcz7hKUxlQSrc-TvPg-C6BUPU", "expire": 7200 }

Response Parameters

token
string

Authorisation token

expire
int

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
int

Partner ID

required

Response example

Response Parameters

status
string

Status

client_id
int

Client’s ID

client_name
string

Client Name

access_type
string

  1. Full access - you can use all methods

  2. Partial access - you can only get list of dealers and locations, list of suppliers connected to locations and all Connection Request methods

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
string

Supplier’s logo

name
string

Supplier name

id
int

Supplier connection ID

operating_countries
array

List of supplier operating countries
deprecated

operating_countries
array

List of supplier countries with regions where supplier operating

country
string

Country

states
string

List of states

tf
boolean

Transaction Fee

ordering_supported
string

Mark of direct ordering support

contact_phone
string

Supplier contact phone

address
object

Supplier address

address_line_1
string

Address line 1

address_line_2
string

Address line 2

city
string

City

postal_code
string

Zip/postal code

state
string

State/province

country
string

Country

credentials
object

Object with credentials needed for supplier connection request

type
string

Field type

options
string

Available options to select

name
string

Field name

label
string

Field label

description
string

Field description

required
boolean

Field required or not

link
string

Link to supplier registration form

is_checked
boolean

In case field_type = checkbox it will show it’s initial state

attributes
array

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
int

Client ID

required

Response example

Response parameters

status
string

Status

locale
string

Locale label

default
boolean

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
string

Status

dealer_id
int

Dealer ID

first_name
string

First Name

last_name
string

Last Name

email
string

Email

additional_emails
array

List of additional emails

phone_number
string

Phone Number

fax
string

Fax

group
string

Group

language
array

Array with localised values for dealer

locale
string

Locale label

company_name
string

Dealer’s Name

logo
string

Dealer’s Logo

is_active
boolean

Shows whether the dealer is active or not

updated_at
string

Shows when dealer was updated last time

created_at
boolean

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
int

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
int

Client id

required

first_name
string

Dealer first name

required

last_name
string

Dealer last name

required

email
string

Dealer email

required

additional_emails
array

Array of dealer additional emails

optional

phone_number
string

Dealer phone number

required

fax
string

Dealer fax

optional

language
array

List of localised items

required

locale
string

Locale label

required

company_name
string

Dealer name

required

is_active
boolean

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
int

Client id

required

dealer_id
int

Dealer id

required

first_name
string

Dealer first name

optional

last_name
string

Dealer last name

optional

email
string

Dealer email

optional

additional_emails
array

Array of dealer additional emails

optional

phone_number
string

Dealer phone number

optional

fax
string

Dealer fax

optional

is_active
boolean

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
int

Client id

required

dealer_id
int

Dealer id

required

locale
string

Locale label

required

company_name
string

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
int

Client id

required

dealer_id
int

Dealer id

required

locale
string

Locale label

required

company_name
string

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
int

Client id

required

dealer_id
int

Dealer id

required

Deactivate dealer

POST /account/v2/client/dealer/deactivate

This method allows you to deactivate dealer.

Request example

Request parameters

client_id
int

Client id

required

dealer_id
int

Dealer id

required

 

Dealer location management methods

All methods in this section have the same response structure

Response example

Response Parameters

status
string

Status

location_id
int

Location id

first_name
string

First name

last_name
string

Last name

email
string

Location email

additional_email
array

Location additional email

phone_number
string

Location phone number

postal_code
string

Location zip/postal code

country
string

Location country

province
string

Location province

latitude
decimal

Location latitude

longitude
decimal

Location longitude

external_id
string

Location external id

language
array

Array with localised values for location

locale
string

Locale label

location_name
string

Location name

address_line_1
string

Address line 1

address_line_2
string

Address line 2

city
string

Location city

is_active
boolean

Shows whether the location is active or not

updated_at
string

Shows when location was updated last time

created_at
boolean

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
int

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
int

Location id

required

Response example

Request parameters

status
string

Status

supplier_cid
string

Supplier connection id

supplier
string

Supplier id

supplier_name
string

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
int

Dealer id

required

first_name
string

First name

required

last_name
string

Last name

required

email
string

Location email

required

additional_email
string

Location additional email

optional

phone_number
string

Location phone number

required

postal_code
string

Location zip/postal code

required

country
string

Location country

required

province
string

Location province

required

latitude
decimal

Location latitude

required

longitude
decimal

Location longitude

required

external_id
string

Location external id

optional

language
array

Array with localised values for location

required

locale
string

Locale label

required

location_name
string

Location name

required

address_line_1
string

Address line 1

required

address_line_2
string

Address line 2

optional

city
string

Location city

required

is_active
boolean

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
int

Dealer id

required

location_id
int

Location id

required

first_name
string

First name

optional

last_name
string

Last name

optional

email
string

Location email

optional

additional_email
array

Location additional email

optional

phone_number
string

Location phone number

optional

postal_code
string

Location zip/postal code

optional

country
string

Location country

optional

province
string

Location province

optional

latitude
decimal

Location latitude

optional

longitude
decimal

Location longitude

optional

external_id
string

Location external id

optional

is_active
boolean

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
int

Client id

required

location_id
int

Dealer id

required

locale
string

Locale label

required

location_name
string

Dealer company name

optional

address_line_1
string

Address line 1

optional

address_line_2
string

Address line 2

optional

city
string

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
int

Client id

required

location_id
int

Dealer id

required

locale
string

Locale label

required

location_name
string

Dealer company name

required

address_line_1
string

Address line 1

required

address_line_2
string

Address line 2

optional

city
string

Location city

required

Activate location

POST /account/v2/dealer/location/activate

This method allows you to activate dealer.

Request example

Request parameters

dealer_id
int

Dealer id

required

location_id
int

Location id

required

Deactivate location

POST /account/v2/dealer/location/deactivate

This method allows you to activate dealer.

Request example

Request parameters

dealer_id
int

Dealer id

required

location_id
int

Location id

required

 

Connection requests

All methods in this section have the same response structure

Response example

Response Parameters

status
string

Status

connection_request_id
int

Connection request id

location_id
int

Location id

contact_details
object

Object with contact details

first_name
string

First name

last_name
string

Last name

email
string

Email

phone
string

Phone number

supplier_cid
string

Supplier CID

supplier_name
string

Supplier name

credentials
object

Object with credentials needed to connect location to supplier

name
string

Parameter name

value
array

Parameter value

status
string

Request status

note
string

Some notes

updated_at
string

Shows when request was updated last time

created_at
boolean

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
string

Supplier CID

required

location_id
int

Location id

required

first_name
string

First name

required

last_name
string

Last name

required

email
string

Email

required

phone
string

Phone number

required

note
string

Some notes

optional

credentials
array

Array with credentials needed to connect location to supplier

required

name
string

Parameter name

required

value
string

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
int

Location id

required

filter
object

An object of filters

Available values:
status
connection_request_id
created_at
updated_at

optional

limit
int

Limit

optional

offset
int

Offset

optional

sort_by
string

Sort by

optional

sort_how
string

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
string

Supplier CID

required

location_id
int

Location id

required

connection_request_id
int

Connection request id

required

note
string

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
int

Connection request id

required

location_id
int

Location id

required

first_name
string

First Name

optional

last_name
string

Last name

optional

email
string

Email

optional

phone
string

Phone number

optional

note
string

Some notes

optional

credentials
array

Object with credentials needed to connect location to supplier

optional

name
string

Parameter name

required

value
string

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 creationPending: User created CR (location/connection-request/create)

PendingPending: User edited CR (location/connection-request/resubmit)

PendingCancelled: User cancelled CR (location/connection-request/cancel)

RejectedCancelled: User cancelled CR (location/connection-request/cancel)

RejectedPending: 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
int

Location id

required

Response example

Response Parameters

token
string

Authorisation token

expire
int

expire time