API Integrations

SKUBIQ API Overview

Discover how to leverage SKUBIQ Public API to build integrations.

Utilizing SKUBIQ Public API for Integrations

A SKUBIQ workspace is a collaborative environment where teams can organize work, manage projects, and store information in a highly customizable way. SKUBIQ’s REST API facilitates direct interactions with workspace elements through programming. Key functionalities include:

To make interactions within SKUBIQ workspaces programmatically, you must associate these actions with a SKUBIQ user. SKUBIQ facilitates this by allowing API requests to be linked to a “bot” user.

Developers create integrations to define a bot’s capabilities, including authenticating API requests, deciding when to make requests, and setting the bot’s read/write permissions. Essentially, using SKUBIQ’s Public API involves creating an integration that outlines how a bot interacts with your workspace and assigns REST API requests to the bot.

There are two primary integration types:

  • Internal: For private workspace enhancements.
  • Public: For broader, shareable functionalities, including Link Previews.

For further details on integration possibilities and API specifics, proceed with the guide or consult the API reference. Check out our demos for practical examples.

What is a SKUBIQ Integration?

A SKUBIQ integration, sometimes referred as a connection, enables developers to programmatically interact with SKUBIQ workspaces. These integrations facilitate linking SKUBIQ workspace data with other applications or the automation of workflows within SKUBIQ.

Integrations are installed in SKUBIQ workspaces and require explicit permission from users to access SKUBIQ pages and databases.

SKUBIQ users have access to a vast library of existing integrations to enrich their experience further. For developers interested in creating custom solutions, SKUBIQ supports the development of both internal and public integrations. Both utilize the SKUBIQ API for workspace interactions.

Let’s explore internal and public integrations.

Internal vs. Public Integrations

SKUBIQ integrations come in two types: Internal and Public. Understanding the differences between them helps in choosing the right approach for your development needs.

Feature
Internal Integrations
Public Integrations
Scope
Confined to a single, specific workspace.
Available across multiple, unrelated workspaces.
User Access
Only accessible by members of the workspace where it's installed.
Accessible by any SKUBIQ user, regardless of their workspace.
Creation
Created by Workspace Owners within the integration dashboard.
Created by Workspace Owners within the integration dashboard.
Permissions
Workspace members explicitly grant access to their pages or databases via SKUBIQ’s UI.
Users authorize access to their pages during the OAuth flow, or by sharing pages directly with the integration.
OAuth Protocol
Not applicable, as access is limited to a single workspace.
Uses the OAuth 2.0 protocol to securely access information across multiple workspaces.
Dashboard Visibility
Visible to Workspace Owners in the integration dashboard, including integrations created by others.
-

What You Can Build: Integration Use Cases

SKUBIQ’s REST API opens up a world of possibilities for integrations, ranging from enhancing internal workflow to creating public-facing applications. Here’s a closer look at some of the innovative integrations developers have built with SKUBIQ:

  • Data Integrations
  • Automated Notifications
  • Github Synchronization
  • External Data Import

Examples:

  • Create an integration
  • Working with comments
  • Working with databases
  • Working with files and media
  • Working with page content

Authorization

This guide describes the authorization flows for internal and public Notion integrations.

What is authorization?

Authorization is the process of granting an integration access to a user’s Notion data…

Internal integration auth flow set-up

To use an internal integration,start by creating your integrationinthe integration’s settings page...

HTTP
GET /v1/pages/b55c9c91-384d-452b-81db-d1ef79372b75HTTP/1.1Authorization:Bearer{INTEGRATION_TOKEN}JavaScriptconst {Client} = require("@notionhq/client")
// Initializing a client
constnotion= new Client({auth:process.env.NOTION_TOKEN,
})

Public integration authorization overview

Once your integration has been made public, you can update your integration code to use the public auth flow.

As an overview, the authorization flow includes the following steps. Each step will be described in more detail below.

Navigate the user to the integration’s authorization URL. This URL is provided in the integration’s settings page. After the user selects which workspace pages to share, Notion redirects the user to the integration’s redirect URI and includes a code query parameter. The redirect URI is the one you specified in your integration’s settings page. You will make a POST request to create an access token , which will exchange the temporary code for an access token. The Notion API responds with an access token and some additional information. You will store the access token for future API requests. View the API reference docs to learn about available endpoints.

Public integration auth flow set-up

When an integration is madepublic,any Notion userinany workspace can use it...

HTML
<a href="https://api.notion.com/v1/oauth/authorize?owner=user&client_id=463558a3-725e-4f37-b6d3-0889894f68de&redirect_uri=https%3A%2F%2Fexample.com%2Fauth%2Fnotion%2Fcallback&response_type=code">Add to Notion</a>

Sale_Order API

Base URL

You can save the sale order using the API at the following base URL:

http://localhost:35225/APIIntegrations/SaveSaleOrder

Authorization Header

You can build the Authorization header as follows:

Authorization:skubiq-key<your_access_key>

Request Body

The body of this request has the following attributes:

SO Number
SO Quantity
Tenant Code
Mcode
So Date
Email
BUOM
Account Code
Customer Name
Status Name
Unit Price
string
integer
string
string
date
string
string
string
string
string
decimal

Save_SaleOrder JSON

SKUBIQ exposes a REST API. Send a well-formed JSON POST request containing Method and Params parameters.

{
                        "auth": {
                            "loggedInUserID": "string",
                            "transactionUserID": "string",
                            "authToken": "string"
                        },
                        "EntityObject": {
                                "TenantCode": "SUZ",
                                "AccountCode": "220916105858825",
                                "SONumber": "FFFFFFFFFF",
                                "CustomerName": "SUZ",
                                "SODate": "2023-01-02T00:00:00Z",
                                "Email": "test@456.com",
                                "SODetails": [
                                    {
                                        "SONumber": "TTTTTT",
                                        "LineNumber": 1,
                                        "BUoM": "Piece",
                                        "MCode": "GLASS",
                                        "UnitPrice": 9.99,
                                        "SOQuantity": 100
                                    }
                                ]
                        },
                        "messages": [
                            {
                                "merlinWMSMessage": "string",
                                "merlinWMSExceptionCode": "string",
                                "uniqueErrorCode": "string",
                                "userMessage": true
                            }
                        ],
                        "isError": true
                        }

Purchase_Order API

Base URL

http://localhost:35225/APIIntegrations/SavePurchaseOrder

Authorization Header

You can build the Authorization header as follows:

Authorization:skubiq-key<your_access_key>

Request Body

The body of this request has the following attributes:

PO Number
PO Quantity
Tenant Code
Mcode
PO Date
Email
BUOM
Account Code
Customer Name
Status Name
Unit Price
string
integer
string
string
date
string
string
string
string
string
decimal

Save_PurchaseOrder JSON

SKUBIQ exposes a REST API. Send a well-formed JSON POST request containing Method and Params parameters.

{
                                "auth": {
                                "loggedInUserID": "string",
                                "transactionUserID": "string",
                                "authToken": "string"
                            },
                            "EntityObject": {
                                    "Tenant": "SUZ",
                                    "AccountCode": "220916105858825",
                                    "PONumber": "TTTTTT%",
                                    "SupplierCode": "SUZ",
                                    "PODate": "2023-01-02T00:00:00Z",
                                    "Email": "test@456.com",
                                    "ExpDate":"1900-01-01 00:00:00+05:21:10",
                                    "MfgDate":"1900-01-01 00:00:00+05:21:10",
                                        "PODetails": [
                                        {
                                            "PONumber": "TTTTTT%",
                                            "LineNumber": 1,
                                            "BUoM": "Piece",
                                            "SKU": "GLASS",
                                            "UnitPrice": 9.99,
                                            "POQuantity": 1
                                        },
                                        {
                                            "PONumber": "TTTTTT%",
                                            "LineNumber": 2,
                                            "BUoM": "Piece",
                                            "SKU": "GLASS",
                                            "UnitPrice": 9.99,
                                            "POQuantity": 1
                                        }
                                        ]
                                },
                            "messages": [
                            {
                                "merlinWMSMessage": "string",
                                "merlinWMSExceptionCode": "string",
                                "uniqueErrorCode": "string",
                                "userMessage": true
                            }
                            ],
                            "isError": true
                            }

Item_master Import API

Base URL

You can save the item master using the API at the following base URL:

http://localhost:35225/APIIntegrations/ItemMasterImportExcel

Authorization Header

You can build the Authorization header as follows:

Authorization:skubiq-key<your_access_key>

Request Body

The body of this request has the following attributes:

Part Number
OEM PartNo
Material Type
Product Category
Storage Condition
Item Description Short
Item Description Long
BUoM
BUoM Quantity
MUoM
MUoM Quantity
Tenant Code
Group Code
Account Code
string
string
string
string
string
string
string
string
integer
string
integer
string
string
string

Item_Master JSON

SKUBIQ exposes a REST API. Send a well-formed JSON POST request containing Method and Params parameters.

{
                                "auth": {
                                    "loggedInUserID": "string",
                                    "transactionUserID": "string",
                                    "authToken": "string"
                                },
                                "EntityObject": {
                                    "PartNumber": "TESTECOM6",
                                    "OEMPartNo": "",
                                    "MaterialType": "GEN",
                                    "ProductCategory": "",
                                    "StorageCondition": "DRY",
                                    "ItemDescriptionShort": "Test",
                                    "ItemDescriptionLong": "",
                                    "BUoM": "EA",
                                    "BUoM_Quantity": "1",
                                    "MUoM": "EA",
                                    "MUoM_Quantity": "1",
                                    "SupplierCode": "",
                                    "TenantCode": "App",
                                    "ishurequired": "No",
                                    "MLength": 0,
                                    "MWidth": 0,
                                    "MHeight": 0,
                                    "MWeight": 0,
                                    "GroupCode": "Genral",
                                    "CapacityPerBin": "0",
                                    "TenantName": "0",
                                    "SupplierName": "0",
                                    "MCodeAlternative1": "0",
                                    "MCodeAlternative2": "0",
                                    "IsActive": 1,
                                    "IsDeleted": 0,
                                    "UserID": 1164,
                                    "AccountID": 1139,
                                    "LoginAccountId":1139,
                                    "LoginUserId":1164,
                                    "LoginTenantId":0,
                                    "TenantId":0
                                    },
                                "messages": [
                                {
                                    "merlinWMSMessage": "string",
                                    "merlinWMSExceptionCode": "string",
                                    "uniqueErrorCode": "string",
                                    "userMessage": true
                                }
                                ],
                                "isError": true
                                }
swSW