Articles in this section

iClient API endpoints

download.svg​​ Download Postman collection

Create an iClient

iClient API endpoints

Relative URI

Method

Success Code

Description

/iclients

GET

200

Get all iClients.

POST

201

Create a new iClient.

/iclients/<_id>

GET

200

Get a specific iClient.

PATCH

204

Update part of a specific iClient.

PUT

200

Update a specific iClient.

DELETE

204

Delete a specific iClient.

/iclients/<_id>/dependencies

GET

200

Get all resources using or used by this iClient.

The following field is available to update using PATCH. You must use the following format to update the field:

[
    {
        "op": "replace",
        "path": "/fieldname",
        "value": "newvalue"
    }
]

Field

Data type

oauth2.failPath

string

iClient API examples

Get all iClients

GET /v1/iclients HTTP/1.1
Host: api.integrator.io
Authorization: Bearer my_api_token

Sample response

[
    {
        "_id":"58c40879c13f547763bf2ffe",
        "name":"Amazon - North America",
        "lastModified":"2017-03-15T10:07:54.070Z",
        "provider":"amazonmws",
        "amazonmws":{
            "accessKeyId":"abcdef12345",
            "secretKey":"******"
        }
    },
    {
        "_id":"58d91651a81cfe09ec94a996",
        "name":"eBay Sandbox",
        "lastModified":"2017-04-12T07:50:56.863Z",
        "provider":"ebay-xml",
        "ebay":{
            "appId":"Celigo-XXXX",
            "devId":"abcdef12345",
            "certId":"******",
            "ruName":"Celigo-ABC"
        }
    },
    {
        "_id":"58d95676544a250f82e1e6a8",
        "name":"eBay",
        "lastModified":"2017-04-12T07:51:17.839Z",
        "provider":"ebay-xml",
        "ebay":{
            "appId":"Celigo-YYYY",
            "devId":"zyxwvu12345",
            "certId":"******",
            "ruName":"Celigo-XYZ"
        }
    },
    {
        "_id":"58f9dfc4a7d2ca9998e19c89",
        "name":"NetSuite",
        "lastModified":"2017-04-21T10:32:37.100Z",
        "provider":"netsuite",
        "netsuite":{
            "consumerKey":"******",
            "consumerSecret":"******"
        }
    },
    {
        "_id":"54fa0c93a7044f9252483038",
        "lastModified":"2015-12-09T11:17:23.235Z",
        "provider":"Shopify",
        "oauth2":{
            "clientId":"c12345",
            "clientSecret":"******",
            "scope":[
                "read_products",
                "write_products",
                "read_customers",
                "read_orders",
                "write_orders"
            ],
            "scopeDelimiter":","
        }
    }
]

iClients and Postman

The following examples cover creating an iClient in Postman.

Create an HTTP iClient via Postman

  1. Create an OAuth application in your source or destination account.

  2. Copy the client Id and client secret.

  3. Navigate to Postman.

  4. Create a new request.

    1. Method: POST

    2. URL: https://api.integrator.io/v1/iclients

    3. Body:

      {
        "name": "<<iClient NAME>>",
        "provider": "custom_oauth2",
        "oauth2": {
                   "clientId": "<<APPLICATION CLIENT ID>>",
                   "clientSecret": "<<APPLICATION CLIENT SECRET>>",
                   "scope": ["<<scope1>>","<<scope>>"],
                   "scopeDelimiter" : "<<scopeDelimeter>>"
                  }
      }
    4. Scope: “OAuth” and “Contacts”

    5. Scope delimiter: A space <“ “>

    6. Authorization: Bearer <<Add IO token here>>

iclient.png

Create a NetSuite iClient

  1. Create an integration record in NetSuite.

  2. Copy your client ID and client secret.

  3. Navigate to Postman.

  4. Create a new request.

    1. Method: POST

    2. URL: https://api.integrator.io/v1/iClients

    3. Body:

      {
         "provider": "netsuite",
         "netsuite": {
             "consumerKey": "enter consumer key",
             "consumerSecret": "enter consumer secret"
         }
      }

Attach iClients to an integration app

  1. Get the integration application via Postman.

    1. Method: GET

    2. URL: https://api.integrator.io/v1/connectors/{{integrationAppid}}

    3. Copy the response.

    4. Add the iClientIdMap node to the copied body:

      "_iClientIdMap": [
             {
                 "_iClientIds": [
                     "Enter newly created iClientId"
                 ],
                 "connection": {
                     "type": "http"
                 }
             },
             {
                 "_iClientIds": [
                     "Enter netsuite iClientId"
                 ],
                 "connection": {
                     "type": "netsuite"
                 }
             }
         ],
  2. Save the integration application.

    1. Method: GET

    2. URL: https://api.integrator.io/v1/connectors/{{integrationAppid}}

    3. Copy the response.

    4. Add the iClientIdMap node to the copied body:

      "_iClientIdMap": [
             {
                 "_iClientIds": [
                     "Enter newly created iClientId"
                 ],
                 "connection": {
                     "type": "http"
                 }
             },
             {
                 "_iClientIds": [
                     "Enter netsuite iClientId"
                 ],
                 "connection": {
                     "type": "netsuite"
                 }
             }
         ],
  3. Save the integration application.

    1. Method: PUT

    2. URL: https://api.integrator.io/v1/connectors/{{integrationAppid}}

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.