Cienapps - API

Cienapps - API

Accessing Cienapps Data Through APIs

It is possible to access Cienapps data through APIs. This documentation outlines the various available data sources and the operations you can perform. For further information about availability and accessibility, please contact your account or project manager.


Prerequisites

This section outlines the essential requirements for activating and using the APIs.

Module

The API Triggers Activation module must be enabled in your Cienapps. This module allows notifications to be added for data updates triggered by events such as saving a quote, order, or work order.

Node.js Installation

On your server (client server), our team must install Node.js and the latest version of the application. This is the same application used for right-click access to the Cieblink catalog.

API Key

In the general settings, a Cienapps administrator must create an API key with the required permissions. This key must be shared with the partner wishing to use this service.

Important Note: By default, read and write permissions are required. Write access allows notifications to be moved to an archive after being read. See further details in the documentation below.

D

API Routes

This section details the available API routes, their call formats, and how they function.

Call Format

Data is managed in JSON format (GET/POST).

Header

Each header must include the specified API key when making API calls:

"ApiToken": "your_API_key_here"

How It Works

After retrieving data in JSON format, the SyncID field contains the notification ID. Once processed, you must call the /sync/confirm API with an array containing this ID. This removes the notification after it has been read. See the section below for more details.


List of Orders (https://server:port/api/sync/order/list) - GET

This API retrieves the list of orders that have been modified. Below are the available fields along with their details.

Member

Data Type

Example

Information Description

Member

Data Type

Example

Information Description

Order_Number

Integer 4/8 bytes

15000, 745837,...

Order number

Order_DateCreate

String “YYYYMMDD”

“20231101”, “19991231”

Creation date

Order_DateDue

String “YYYYMMDD”

“20231101”, “19991231”

Due date

Order_Step_Desc

String

“PARTIAL INVOICING”

Order step

Order_SalesRep_FullName

String

“EVE BEAUCHEMIN”

Full name of the sales rep

Order_SalesRep_UserName

String

“EBEAUCHEMIN”

Cienapps username of the sales rep

Order_Rep_FullName

String

“JEAN-MARC PAQUIN”

Full name of the representative

Order_Rep_UserName

String

“JPAQUIN”

Cienapps username of the representative

Order_Title

String

“CONDOMINIUM WITH 3 FLOORS”

Order title

Order_Reference_PO

String

“U27 (H3) 22-02756”

Purchase order reference

Order_Reference

String

“KITCHEN 3 PIECES”

General reference

Order_Quotation_Number

Array of Integer

84738, 95837, 95938,...

List of quotation numbers linked to order

Customer_First_Name

String

“JOHN”

Customer first name

Customer_Last_Name

String

“DOE”

Customer last name

Customer_Company_Name

String

“ENTREPRISE MASSON INC”

Company name

Customer_Main_Phone

String

“(418) 555-6666”

Phone number

Customer_Address

String

“999 BEACH BLVD”

Address

Customer_City

String

“MONTREAL”

City

Customer_PostalCode

String “X0X 0X0”

“S0S 2P0”

Postal code

Customer_DateCreate

String Date UTC

"2023-08-07 16:29:54.245"

Customer creation date

Customer_Rep

String

“JEANNE DOE”

Customer representative

Customer_Origin

String

“REPUTATION”

Customer origin

SyncID

Integer

11, 48393,…

 

Exemple

[ {

"Order_Number": 4700,

"Order_DateCreate": "20231103",

"Order_DateDue": "20231106",

"Order_Step_Desc": "04 -INVOICED",

"Order_Reference_PO": null,

"Order_Reference": "ANDREW - CUT OUT SINK HO",

"Order_SalesRep_FullName": "TJ DECARIA",

"Order_SalesRep_UserName": "TJDECARIA",

"Order_Rep_FullName": "WILL DOE",

"Order_Rep_UserName": "WDDOE",

"Order_Title": "ANDREW - CUT OUT SINK HOLE NOV 3, 2023",

"Customer_Last_Name": "ANDREW DOE",

"Customer_First_Name": null,

"Customer_Company_Name": null,

"Customer_Address": "5239 FIND ME",

"Customer_City": "MONTREAL",

"Customer_PostalCode": "V9L 5J2",

"Customer_DateCreate": "2017-11-08 00:00:00.000",

"Customer_Rep": "WILL DOE",

"Customer_Main_Phone": "(250) 111-2222",

"Customer_Origin": "REFERAL FROM CONTRACTOR / DESIGNER",

"SyncID": 11,

"Order_Quotation_Number": [ 6122 ]

} ]

Quotation List (https://server:port/api/sync/quotation/list) – GET

This API allows you to retrieve the list of quotations that have been modified. Below are the available fields with their details.

Member

Data Type

Example

Information Description

Member

Data Type

Example

Information Description

Quotation_Number

Integer 4/8 bytes

15000, 745837,...

Quotation number

Quotation_DateCreate

String “YYYYMMDD”

“20231101”, “19991231”

Creation date

Quotation_DateClose

String “YYYYMMDD”

“20231101”, “19991231”

Closing date

Quotation_DateValidate

String “YYYYMMDD”

“20231101”, “19991231”

Validation date

Quotation_Step_Desc

String

“1-STEP FIRST MEETING”

Quotation step

Quotation_SalesRep_FullName

String

“EVE BEAUCHEMIN”

Full name of the sales rep

Quotation_SalesRep_UserName

String

“EBEAUCHEMIN”

Cienapps username of the sales rep

Quotation_Rep_FullName

String

“JEAN-MARC PAQUIN”

Full name of the representative

Quotation_Rep_UserName

String

“JPAQUIN”

Cienapps username of the representative

Quotation_Title

String

“CONDOMINIUM WITH 3 FLOORS”

Quotation title

Quotation_Reference_PO

String

“AUTUMN 2023”

Purchase order reference

Quotation_Reference

String

“KITCHEN”

Reference

Customer_First_Name

String

“JOHN”

Customer first name

Customer_Last_Name

String

“DOE”

Customer last name

Customer_Company_Name

String

“ENTREPRISE MASSON INC”

Company name

Customer_Main_Phone

String

“(418) 555-6666”

Phone number

Customer_Address

String

“999 BEACH BLVD”

Address

Customer_City

String

“MONTREAL”

City

Customer_PostalCode

String “X0X 0X0”

“S0S 2P0”

Postal code

Customer_DateCreate

String Date UTC

"2023-08-07 16:29:54.245"

Customer creation date

Customer_Rep

String

“JEANNE DOE”

Customer representative

Customer_Origin

String

“REPUTATION”

Customer origin

SyncID

Integer

11, 48393,…

Notification ID

Exemple

[
{
"Quotation_Number": 6139,
"Quotation_DateCreate": "20231110",
"Quotation_DateClose": "20231110",
"Quotation_DateValidate": "20231124",
"Quotation_Reference_PO": null,
"Quotation_Reference": "SUNCRAFT 12345 WOODRUSH",
"Quotation_Step_Desc": "02 - QUOTING STAGE",
"Quotation_SalesRep_FullName": "MARII ALIKI",
"Quotation_SalesRep_UserName": "MALLIKIKI",
"Quotation_Rep_FullName": "VLADISLAV HELLO",
"Quotation_Rep_UserName": "VHELLO",
"Quotation_Title": "SUNCRAFT 12345 WOODRUSH",
"Customer_Last_Name": "SUNKRAFT CHEESE CONSTRUCTION",
"Customer_First_Name": null,
"Customer_Company_Name": null,
"Customer_Address": "PO BOX 9458 ",
"Customer_City": "DUNCAN",
"Customer_PostalCode": "V9L S0S",
"Customer_DateCreate": "2016-03-30 00:00:00.000",
"Customer_Rep": "VLADISLAV HELLO",
"Customer_Main_Phone": "(250) 748-1234",
"Customer_Origin": "CONTRACTOR / MAINTENANCE DEPARTMENT",
"SyncID": 12
}
]

Work Order List (https://server:port/api/sync/workorder/list) – GET

This API allows you to retrieve the list of work orders that have been modified. Below are the available fields with their details.

Member

Data Type

Example

Information Description

Member

Data Type

Example

Information Description

WorkOrder_Number

String

“5610-2”, “748-91”, ...

Work order number

WorkOrder_Order_Number

Integer (4 bytes)

5610, 748

Order linked to the work order

WorkOrder_Step_Desc

String

“03 PROCESSING COMPLETED”

Work order step

WorkOrder_DateDue

String “YYYY-MM-DD”

“20231101”, “19991231”

Due date

WorkOrder_DateDelivery

String “YYYY-MM-DD”

“20231101”, “19991231”

Delivery date

WorkOrder_BackOrder

Boolean

True, False

Presence of BO product on the work order

Customer_First_Name

String

“JOHN”

Customer first name

Customer_Last_Name

String

“DOE”

Customer last name

Customer_Company_Name

String

“ENTREPRISE MASSON INC”

Company name

Customer_Main_Phone

String

“(418) 555-6666”

Phone number

Customer_Address

String

“999 BEACH BLVD”

Address

Customer_City

String

“MONTREAL”

City

Customer_PostalCode

String

“X0X 0X0”, “S0S 2P0”

Postal code

Customer_DateCreate

String (UTC Date)

"2023-08-07 16:29:54.245"

Customer creation date

Customer_Rep

String

“JEANNE DOE”

Customer representative

Customer_Origin

String

“REPUTATION”

Customer origin

WorkOrder_IDCust_Delivery

Integer (4 bytes)

43648

Non-zero ID if delivery address differs from customer address

Customer_Delivery_FullName

String

“PHILIPPE THÉBERGE”

Full name of delivery recipient

Customer_Delivery_Main_Phone

String

“(456) 123-9837”

Main phone number of delivery recipient

Customer_Delivery_Address

String

“758 BEACH BLVD”

Delivery recipient address

Customer_Delivery_City

String

“MERCIER”

Delivery recipient city

Customer_Delivery_PostalCode

String

“X0X0X0”, “S0S2P9”

Delivery recipient postal code

WorkOrder_DateInstallation

String “YYYY-MM-DD”

“20231101”, “19991231”

Installation date

WorkOrder_Team_Delivery

String

“SHIPPING”

Delivery team

WorkOrder_Team_Installation

String

“INSTALLATION”

Installation team

WorkOrder_Workflow

String

“JOB WITHOUT FINISHING”

Workflow

SyncID

Integer

11,48393, ...

Notification ID

Exemple

[
{
"WorkOrder_Order_Number": 7953,
"WorkOrder_Number": "4704-1",
"AncienSoumission": 4704,
"WorkOrder_BackOrder": 0,
"WorkOrder_Step_Desc": "01 READY FOR PROCESSING - DO NOT OR",
"Customer_Last_Name": "YOUBOBO GENERAL STORE",
"Customer_First_Name": "CARRIE",
"Customer_Company_Name": "CAEKCEASAR",
"Customer_Address": "3455 FIND ME HWY",
"Customer_City": "CEDAR",
"Customer_PostalCode": "V9X1T8",
"Customer_DateCreate": "2023-11-08 00:00:00.000",
"Customer_Rep": "MARII ALIKIKI",
"Customer_Main_Phone": "(250) 616-1234",
"Customer_Origin": "REFERAL FROM CONTRACTOR / DESIGNER",
"WorkOrder_DateDue": "20231116",
"WorkOrder_DateDelivery": "20240102",
"WorkOrder_IDCust_Delivery": 0,
"WorkOrder_DateInstallation": "20240102",
"WorkOrder_Workflow": "JOB WITH FINISHING (PAINT OR STAIN)",
"Customer_Delivery_FullName": null,
"Customer_Delivery_Main_Phone": null,
"Customer_Delivery_Address": null,
"Customer_Delivery_City": null,
"Customer_Delivery_PostalCode": null,
"WorkOrder_Team_Delivery": "CAPACITY",
"WorkOrder_Team_Installation": "",
"WorkOrder_Close": 0,
"WorkOrder_Close_Date": null,
"SyncID": 13
}
]

Confirm Reading of Notifications (https://server:port/api/sync/confirm) - POST

This API allows confirming the reading of notifications after calling one of the APIs (workorder/list, quotation/list, order/list). The process triggered by the API removes the notification from the list and transfers it to a history file. For this API, the consuming partner must have write permission.

When calling this API, you must provide an array of notification IDs received from the API calls. These IDs come from the SyncID field returned by each API.

json

CopierModifier

{ "SyncID": [11,12,13] }

The API token must also be included in the call header.