Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/partner/client/list' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiM2I5YzM3N2YtOGJlNi00NjljLWI0MGEtM2ZkMzg1ZDMzZTIxIiwiZXhwIjoxNzE3Njg2ODA1fQ.ucFFRhLJIXvPiKuKUi49J6Krn7X06HLS45gEdopQyy8d7Nz8LpBifulXgkjm9Ta-FoZ0iKH-qhhDsGxkPpcFd595gkWWZPMWePTW_5BCRxJ_kcuxsH1uY4raiiZrzC3rq1B76HytF14uV40l6C0QtCvetl3gLPAqycB3mlSVzjk' \
--data '{
  "partner_id": 1
}'

Request parameters

partner_id
int

Partner ID

required

Response example

{
    "status": "success",
    "data": {
        "items": [
            {
                "client_id": 1,
                "client_name": "Demo Client #1",
                "access_type": "Full"
            },
            {
                "client_id": 2,
                "client_name": "Demo Client #2",
                "access_type": "Partial"
            }
        ]
    }
}

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

curl --location 'https://devdemo.tireconnect.ca/api/partner/supplier' \
--header 'accept: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2Mzg4NDY5fQ.CRLgTM3qnRcAV2IKBQCXocIk7Ho5jz4L6P3bCrrfn96ZUVfaIWt97pg_SHXXN_i6BTFVP_2eIZicLMny0dBJKfllwWVk14kHem2hNvLJiGvbrHoP-6BrPB9V75A-YDGYNRfpfGxljKtTstRlfQVTPjZjSvC9kzG5hd35XtdPINI' \

Response example

{
    "data": [
        {
            "logo": "https://devdemo.tireconnect.ca/uploads/supplier/f386424d92a6d6982243f085b841f11f43c81132.jpg",
            "name": "ATD/NTD",
            "id": "ATD",
            "operating_countries": [
                "CA",
                "US"
            ],
            "operating_regions": [
                {
                    "country": "CA",
                    "states": [
                        "AB",
                        "MB",
                        "NL"
                    ]
                },
                {
                    "country": "US",
                    "states": [
                        "WA"
                    ]
                }
            ],
            "tf": true,
            "ordering_supported": true,
            "contact_phone": "3312342343",
            "address": {
                "address_line_1": "67 Rue Wellington",
                "address_line_2": null,
                "city": "Gatineau",
                "postal_code": "J8X 2H4",
                "state": "QC",
                "country": "CA"
            },
            "credentials": [
                {
                    "type": "input",
                    "options": null,
                    "name": "location_number",
                    "label": "Location number",
                    "description": "Location number in ATD system",
                    "required": true,
                    "link": null,
                    "is_checked": false,
                    "attributes": [
                        {
                            "name": "name",
                            "value": "location_number"
                        }
                    ]
                },
                {
                    "type": "select",
                    "options": [
                        "Fill or Kill",
                        "Fill and Kill"
                    ],
                    "name": "fill_kill",
                    "label": "Fill Kill",
                    "description": "Default ordering behaviour",
                    "required": false,
                    "link": null,
                    "is_checked": false,
                    "attributes": [
                        {
                            "name": "name",
                            "value": "fill_kill"
                        }
                    ]
                },
                {
                    "type": "input",
                    "options": null,
                    "name": "account_number",
                    "label": "Account Number",
                    "description": "Account number in ATD system",
                    "required": true,
                    "link": null,
                    "is_checked": false,
                    "attributes": [
                        {
                            "name": "name",
                            "value": "account_number"
                        }
                    ]
                },
                {
                    "type": "input",
                    "options": null,
                    "name": "username",
                    "label": "Username",
                    "description": "User Login(s)",
                    "required": true,
                    "link": null,
                    "is_checked": false,
                    "attributes": [
                        {
                            "name": "name",
                            "value": "username"
                        }
                    ]
                },
                {
                    "type": "checkbox",
                    "options": null,
                    "name": "ADD",
                    "label": "ADD",
                    "description": "Defualt Delivery Option",
                    "required": true,
                    "link": null,
                    "is_checked": true,
                    "attributes": [
                        {
                            "name": "name",
                            "value": "ADD"
                        },
                        {
                            "name": "checked",
                            "value": "checked"
                        }
                    ]
                }
            ]
        }
    ],
    "meta": {
        "total": 1
    }
}

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/client/locale/list' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiM2I5YzM3N2YtOGJlNi00NjljLWI0MGEtM2ZkMzg1ZDMzZTIxIiwiZXhwIjoxNzE4ODg3MzYyfQ.TLVzQerYo7tVZ-XGsUc8zCdo1uvNg7tJIDK4dlZWUIGIy56UZvrDuto0eZdSD2GjEEZyeBOSH-J5msH9NMUOQ7NnA5IQK_WIc6PVdkoAA39pcV5Wxoc2biSNJnbUUfh0wdPAznmLGnQxnxDYDi7b6l3SWC6QDE5r5DBVnwMolpY' \
--header 'Content-Type: application/json' \
--data '{
  "client_id": 320
}'

Request parameters

client_id
int

Client ID

required

Response example

{
    "status": "success",
    "data": {
        "items": [
            {
                "locale": "en_CA",
                "default": true
            },
            {
                "locale": "fr_CA",
                "default": false
            }
        ]
    }
}

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

{
    "status": "success",
    "data": {
        "items": [
            {
                "dealer_id": 11793,
                "first_name": "John1",
                "last_name": "Doe1",
                "email": "john1@doe.com",
                "additional_emails": [
                    "jane1@doe.com",
                    "baby1@doe.com"
                ],
                "phone_number": "1 888 792-7073",
                "fax": "1 888 792-7073",
                "language": [
                    {
                        "locale": "en_CA",
                        "company_name": "Demo dealer #2",
                        "logo": null
                    }
                ],
                "is_active": true,
                "updated_at": "2024-06-06T09:29:37-04:00",
                "created_at": "2024-06-06T09:29:05-04:00"
            }
        ]
    }
}

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/client/dealer/list' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2MzkzODgwfQ.OuUmcMZ55wWkthy0S__2Nq-7lZJPts-DEQNC73-AIdSgwSsV9KPQisO-YcpD3TqokleDsg_WRlY-QwnzzyZ2iCxT6zb7jfbQ3giZmiVUJYDL5QbUhsQusphH4xJrAtriqpHH1-y-SNAAb5DWn95yprsT-OK1e8mc4HQON_JyEgc' \
--data '{
  "client_id": 260
}'

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/client/dealer/create' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2Mzk0NTA1fQ.g8wCD3Fh3Kd9UWVxXYx8I0y_m54EPD-wQcgh9ugW3HUqYrxiXsLR5PZfC3QCZhl0Tw676ukAInQc2LEZ3bpvf_XKFWXnAOGGZOdXB1YP8qkBRs_3Ci-G9uv317Uiy933XXd-QaQgMSUKsUg10EeZOkFqUzZlDXBXQ4ag4BTAfR0' \
--header 'Content-Type: application/json' \
--header 'Cookie: gt_admin=rk2kkg7l50621uhcmf6pcokhda' \
--data-raw '{
   "client_id":1,
   "first_name":"John",
   "last_name":"Doe",
   "email":"john@doe.com",
   "additional_emails":[
      "jane@doe.com",
      "baby@doe.com"
   ],
   "phone_number":"1 888 792-7072",
   "fax":"1 888 792-7071",
   "language":[
      {
         "locale":"en_CA",
         "company_name":"Company name"
      }
   ],
   "is_active":true
}'

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/client/dealer/update' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2Mzk0NTA1fQ.g8wCD3Fh3Kd9UWVxXYx8I0y_m54EPD-wQcgh9ugW3HUqYrxiXsLR5PZfC3QCZhl0Tw676ukAInQc2LEZ3bpvf_XKFWXnAOGGZOdXB1YP8qkBRs_3Ci-G9uv317Uiy933XXd-QaQgMSUKsUg10EeZOkFqUzZlDXBXQ4ag4BTAfR0' \
--header 'Content-Type: application/json' \
--data-raw '{
   "client_id":1,
   "dealer_id":1,
   "first_name":"John",
   "last_name":"Doe",
   "email":"john@doe.com",
   "additional_emails":[
      "jane@doe.com",
      "baby@doe.com"
   ],
   "phone_number":"1 888 792-7072",
   "fax":"1 888 792-7071",
   "is_active":true
}'

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/client/dealer/language/update' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2Mzk0NTA1fQ.g8wCD3Fh3Kd9UWVxXYx8I0y_m54EPD-wQcgh9ugW3HUqYrxiXsLR5PZfC3QCZhl0Tw676ukAInQc2LEZ3bpvf_XKFWXnAOGGZOdXB1YP8qkBRs_3Ci-G9uv317Uiy933XXd-QaQgMSUKsUg10EeZOkFqUzZlDXBXQ4ag4BTAfR0' \
--data '{
  "client_id": 260,
  "dealer_id": 12625,
  "locale": "en_CA",
  "company_name": "Company name"
}'

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/client/dealer/language/create' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2Mzk0NTA1fQ.g8wCD3Fh3Kd9UWVxXYx8I0y_m54EPD-wQcgh9ugW3HUqYrxiXsLR5PZfC3QCZhl0Tw676ukAInQc2LEZ3bpvf_XKFWXnAOGGZOdXB1YP8qkBRs_3Ci-G9uv317Uiy933XXd-QaQgMSUKsUg10EeZOkFqUzZlDXBXQ4ag4BTAfR0' \
--data '{
  "client_id": 260,
  "dealer_id": 12625,
  "locale": "fr_CA",
  "company_name": "Test Company"
}'

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/client/dealer/activate' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2Mzk0NTA1fQ.g8wCD3Fh3Kd9UWVxXYx8I0y_m54EPD-wQcgh9ugW3HUqYrxiXsLR5PZfC3QCZhl0Tw676ukAInQc2LEZ3bpvf_XKFWXnAOGGZOdXB1YP8qkBRs_3Ci-G9uv317Uiy933XXd-QaQgMSUKsUg10EeZOkFqUzZlDXBXQ4ag4BTAfR0' \
--header 'Content-Type: application/json' \
--data '{
  "dealer_id": 12608,
  "client_id": 260
}'

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/client/dealer/deactivate' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2Mzk0NTA1fQ.g8wCD3Fh3Kd9UWVxXYx8I0y_m54EPD-wQcgh9ugW3HUqYrxiXsLR5PZfC3QCZhl0Tw676ukAInQc2LEZ3bpvf_XKFWXnAOGGZOdXB1YP8qkBRs_3Ci-G9uv317Uiy933XXd-QaQgMSUKsUg10EeZOkFqUzZlDXBXQ4ag4BTAfR0' \
--header 'Content-Type: application/json' \
--data '{
  "dealer_id": 12608,
  "client_id": 260
}'

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

{
   "status":"success",
   "data":{
      "items":[
         {
            "location_id":1,
            "first_name":"John",
            "last_name":"Doe",
            "email":"john@doe.com",
            "additional_email":"jane@doe.com",
            "phone_number":"1 888 792-7072",
            "postal_code":"L4S0B8",
            "country":"CA",
            "province":"ON",
            "latitude":43.891581,
            "longitude":-79.392110,
            "external_id":"01",
            "language":[
               {
                  "locale":"en_CA",
                  "location_name":"TireConnect",
                  "address_line_1":"30 Via Renzo Drive",
                  "address_line_2":"Suite 254",
                  "city":"Richmond Hill"
               }
            ],
            "is_active":true,
            "updated_at":"2021-09-08T04:31:24-04:00",
            "created_at":"2018-03-22T06:29:15-04:00"
         }
      ]
   }
}

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/dealer/location/list' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2NDYwOTYyfQ.ibJFZMEsH0BGMHqhO4aQ33wSI0yWkbmiCoBudH4SKsQk9k6IHebTM9RIc7RsinW4LhJ2BhT7cH_n7pt9YdCQ7L7Feaqzui0sJLnbqLNYWHQcyAN-q3kUn3SjEqGdIN62Uo_n_oVLOKsuhvqs21-O0r9-c8Ha7BHCGNlQrE-_wa0' \
--header 'Cookie: gt_admin=rk2kkg7l50621uhcmf6pcokhda' \
--data '{
  "dealer_id": 1
}'

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/location/tire/connection/list' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2NDc4NTg0fQ.sVj1qElzHsVunYanuZKuyv2hLZNzIDM-PhEFYpjJxsF-3yiRffwUKjMRENF5-RpQyTgR8rpm1uBKTb50SPbBr91P02wVtoZrv2oJQoMeCSCXm1oSgBv2EU5_g57DumPAn-zGiOx1G9MTejTG_T9ur8QK5UJE3vsEDMSRr4_6cGs' \
--data '{
  "location_id":1
}'

Request parameters

location_id
int

Location id

required

Response example

{
   "status":"success",
   "data":{
      "items":[
         {
            "supplier_cid":"ATD",
            "supplier":"atdntd",
            "supplier_name":"ATD/NTD"
         }
      ]
   }
}

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/dealer/location/create' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2NDYwOTYyfQ.ibJFZMEsH0BGMHqhO4aQ33wSI0yWkbmiCoBudH4SKsQk9k6IHebTM9RIc7RsinW4LhJ2BhT7cH_n7pt9YdCQ7L7Feaqzui0sJLnbqLNYWHQcyAN-q3kUn3SjEqGdIN62Uo_n_oVLOKsuhvqs21-O0r9-c8Ha7BHCGNlQrE-_wa0' \
--data-raw '{
   "dealer_id":1,
   "first_name":"John",
   "last_name":"Doe",
   "email":"john@doe.com",
   "additional_email":"jane@doe.com",
   "phone_number":"1 888 792-7072",
   "postal_code":"L4S0B8",
   "country":"CA",
   "province":"ON",
   "latitude":43.891581,
   "longitude":-79.392110,
   "external_id":"01",
   "is_active":true,
   "language":[
      {
         "locale":"en_CA",
         "location_name":"TireConnect",
         "address_line_1":"30 Via Renzo Drive",
         "address_line_2":"Suite 254",
         "city":"Richmond Hill"
      }
   ]
}'

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
array

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/dealer/location/update' \
--header 'accept: */*' \
--header 'Content-Type: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2NDc4NTg0fQ.sVj1qElzHsVunYanuZKuyv2hLZNzIDM-PhEFYpjJxsF-3yiRffwUKjMRENF5-RpQyTgR8rpm1uBKTb50SPbBr91P02wVtoZrv2oJQoMeCSCXm1oSgBv2EU5_g57DumPAn-zGiOx1G9MTejTG_T9ur8QK5UJE3vsEDMSRr4_6cGs' \
--data-raw '{
   "dealer_id":1,
   "location_id":1,
   "first_name":"John",
   "last_name":"Doe",
   "email":"john@doe.com",
   "additional_email":"jane@doe.com",
   "phone_number":"1 888 792-7072",
   "postal_code":"L4S0B8",
   "country":"CA",
   "province":"ON",
   "latitude":43.891581,
   "longitude":-79.392110,
   "external_id":"01",
   "is_active":true
}'

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/dealer/location/language/update' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2NDc4NTg0fQ.sVj1qElzHsVunYanuZKuyv2hLZNzIDM-PhEFYpjJxsF-3yiRffwUKjMRENF5-RpQyTgR8rpm1uBKTb50SPbBr91P02wVtoZrv2oJQoMeCSCXm1oSgBv2EU5_g57DumPAn-zGiOx1G9MTejTG_T9ur8QK5UJE3vsEDMSRr4_6cGs' \
--data '{
   "dealer_id":1,
   "location_id":1,
   "locale":"en_CA",
   "location_name":"TireConnect",
   "address_line_1":"30 Via Renzo Drive",
   "address_line_2":"Suite 254",
   "city":"Richmond Hill"
}'

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/dealer/location/language/create' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2NDc4NTg0fQ.sVj1qElzHsVunYanuZKuyv2hLZNzIDM-PhEFYpjJxsF-3yiRffwUKjMRENF5-RpQyTgR8rpm1uBKTb50SPbBr91P02wVtoZrv2oJQoMeCSCXm1oSgBv2EU5_g57DumPAn-zGiOx1G9MTejTG_T9ur8QK5UJE3vsEDMSRr4_6cGs' \
--data '{
   "dealer_id":1,
   "location_id":1,
   "locale":"en_CA",
   "location_name":"TireConnect",
   "address_line_1":"30 Via Renzo Drive",
   "address_line_2":"Suite 254",
   "city":"Richmond Hill"
}'

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/dealer/location/activate' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2NDc4NTg0fQ.sVj1qElzHsVunYanuZKuyv2hLZNzIDM-PhEFYpjJxsF-3yiRffwUKjMRENF5-RpQyTgR8rpm1uBKTb50SPbBr91P02wVtoZrv2oJQoMeCSCXm1oSgBv2EU5_g57DumPAn-zGiOx1G9MTejTG_T9ur8QK5UJE3vsEDMSRr4_6cGs' \
--data '{
  "dealer_id":1,
  "location_id": 1
}'

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/dealer/location/deactivate' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2NDc4NTg0fQ.sVj1qElzHsVunYanuZKuyv2hLZNzIDM-PhEFYpjJxsF-3yiRffwUKjMRENF5-RpQyTgR8rpm1uBKTb50SPbBr91P02wVtoZrv2oJQoMeCSCXm1oSgBv2EU5_g57DumPAn-zGiOx1G9MTejTG_T9ur8QK5UJE3vsEDMSRr4_6cGs' \
--data '{
  "dealer_id":1,
  "location_id": 1
}'

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

{
   "success":true,
   "data":{
      "items":[
         {
            "connection_request_id":1,
            "location_id":1,
            "contact_details":{
               "first_name":"John",
               "last_name":"Doe",
               "email":"john@doe.com",
               "phone":"1 888 792-7072"
            },
            "supplier_cid":"ATD",
            "supplier_name":"ATD/NTD",
            "credentials":[
               {
                  "name":"location_number",
                  "value":"1"
               },
               {
                  "name":"fill_kill",
                  "value":"Fill or Kill"
               },
               {
                  "name":"account_number",
                  "value":"3"
               },
               {
                  "name":"username",
                  "value":"4"
               }
            ],
            "status":"pending",
            "note":"Some note about connection request",
            "updated_at":"2021-09-08T04:31:24-04:00",
            "created_at":"2021-01-26T11:56:17-05:00"
         }
      ]
   },
   "meta": {
        "count": 2, //only for list method
        "total": 2,
        "offset": 0, //only for list method
        "limit": 100, //only for list method
        "sort_by": "connection_request_id", //only for list method
        "sort_how": "asc" //only for list method
    }
}

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/connection-request/create' \
--header 'accept: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2ODMwMjM5fQ.lzDKjnBlkPXPddNbhow0d_lQ8vPbnKQj9odYOv7eGwTnA1PEO0XPCdJJx8ZTAMepcGu2Kp1eq9fbYcrHw56v2X6Gp4oAxxHX8SE98g3-0gchoyH1-khv89WsVizHgLMC276l0fIYzUX8wkuo6H4UAhFCI_7oVJ9HLuMtFjyNVRw' \
--header 'Content-Type: application/json' \
--data-raw '{
   "supplier_cid":"ATD",
   "location_id":1,
   "first_name":"John",
   "last_name":"Doe",
   "email":"john@doe.com",
   "phone":"1 888 792-7072",
   "note":"Some note about connection request",
   "credentials":[
      {
         "name":"location_number",
         "value":"1"
      },
      {
         "name":"fill_kill",
         "value":"Fill or Kill"
      },
      {
         "name":"account_number",
         "value":"3"
      },
      {
         "name":"username",
         "value":"4"
      }
   ]
}'

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/location/connection-request/list' \
--header 'accept: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiM2I5YzM3N2YtOGJlNi00NjljLWI0MGEtM2ZkMzg1ZDMzZTIxIiwiZXhwIjoxNzIwNTIxNzAwfQ.BlXxKXe5wT3TEtynlFNaPdcpUs82l1ZXTIO7fRmy-KyZrpHHTUbLW3oG3HWucvz0ZzhMTxm-XffCky5A2bjmYo1oCDPPYjfOeuI1vT-ddhSgtnsnXZacfuBK_2E0lSktTdQNllUZB14VGqCcv0vVSJ567_CFT6WaguSjBaYRK40' \
--header 'Content-Type: application/json' \
--data '{
   "location_id":1,
   "filter":{
      "status":[
         "approve",
         "pending",
         "reject"
      ],
      "connection_request_id":[
         1,
         2
      ],
      "created_at":{
         "from":"2024-01-01 00:00:00",
         "to":"2025-01-01 23:59:59"
      },
      "updated_at":{
         "from":"2024-01-01 00:00:00",
         "to":"2025-01-01 23:59:59"
      }
   },
   "limit":10,
   "offset":0,
   "sort_by":"created_at",
   "sort_how":"desc"
}'

Request parameters

location_id
int

Location id

required

filter
object

An object of filters

Available values:
filter
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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/connection-request/cancel' \
--header 'accept: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2ODk5NTE2fQ.bbskS2tAVean4fY0V5lohavytEErlOsXA_BD37nVezHhHXAMhhFdlJ3ZZi9TDLvmHHrrBWho_ymW-dppSrW2A6LY8s4s_rWEG4m6M4fkbeEibBns3-Iv6EWb0PNZdvCbje8U1ka-_KW352E8c6B_e7IUfVin2sCBDYpNBPHhO8c' \
--header 'Content-Type: application/json' \
--header 'Cookie: gt_admin=7l91fjd2h16llk630eshtvla0d' \
--data '{
  "supplier_cid": "ATD",
  "location_id": 1,
  "connection_request_id": 1,
  "note": "Some note about connection request"
}'

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

curl --location 'https://devdemo.tireconnect.ca/api/account/v2/location/connection-request/resubmit' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoicG4yLTVkNDVjZWE5LTlmZGEtNDJlNC1hYTE1LTZhMzk5M2I2NjVkOCIsImV4cCI6MTcxODg4NjQ2MH0.Rz5JqSgOQp_hqfhn1KKNOkFotjxv8_N2W-3gG-GKClEB05t7nmIXsdF8TA-ZOV_fNsRkfi9Gyv3PCTE8SnhYfoPyjSVDqvrpGzkQ8-2aJ0kTBN86j0DqBxqc7TjJF2smKUq3m69Y1KvsfmsCsfVID1kwL-RRRaaJOWfg9yQTVPw' \
--data-raw '{
  "connection_request_id": 1,
  "location_id": 1,
  "first_name": "John",
  "last_name": "Doe",
  "email": "some_email@example.com",
  "phone": "1234567890",
  "note": "Some note about connection request",
  "credentials": [
    {
      "name": "location_number",
      "value": "1"
    },
    {
      "name": "fill_kill",
      "value": "Fill or Kill"
    },
    {
      "name": "account_number",
      "value": "3"
    },
    {
      "name": "username",
      "value": "4"
    }
  ]
}'

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 resubmitted 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

curl --location 'https://devdemo.tireconnect.ca/api/location/auth/token' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwYXJ0bmVyIjoiNmFhNzJlODMtNjkzMS00YjBiLTkyY2UtYWMxODg5YTIyNjgwIiwiZXhwIjoxNzE2NDc4NTg0fQ.sVj1qElzHsVunYanuZKuyv2hLZNzIDM-PhEFYpjJxsF-3yiRffwUKjMRENF5-RpQyTgR8rpm1uBKTb50SPbBr91P02wVtoZrv2oJQoMeCSCXm1oSgBv2EU5_g57DumPAn-zGiOx1G9MTejTG_T9ur8QK5UJE3vsEDMSRr4_6cGs' \
--data '{
  "location_id": 1
}'

Request parameters

location_id
int

Location id

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

  • No labels