DealPOS API (3.1.0)

Welcome Developer

This page lists the reference documentation for DealPOS APIs. For guides and tutorials.

Download OpenAPI description
Overview
URL https://www.dealpos.com
Customer Support info@dealpos.com
License
Languages
Servers
Production Server
https://{subdomain}/api/v3/

Token

Operations related to authentication tokens

Operations

Category

Operations related to category, including create, get, etc

Operations

Product

Operations related to product, including create, get, etc

Operations

Variant

Operations related to variant, including create, get, etc

Operations

Add Variant By Product Code

Request

Bodyapplication/json
Codestringrequired

Product Code

VariantsArray of objects
curl -i -X POST \
  https://subdomain.dealpos.net/api/v3/Variant/Add \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "Code": "1003",
    "Variants": [
      {
        "Model": "Small",
        "Code": "1003L",
        "UnitCost": 100000,
        "UnitPrice": 150000,
        "Discontinued": true,
        "VariantDescription": "Unavailable"
      },
      {
        "Model": "Medium",
        "Code": "1003XL",
        "UnitCost": 125000,
        "UnitPrice": 175000,
        "Discontinued": false
      }
    ]
  }'

Responses

OK

Body
IDstring
Example: "9525a6b0-297f-4b4a-97c7-0ae876bb44cd"
VariantsArray of objects
Example: [{"Code":"1000S","ID":"9ad47be6-bf1c-4dd5-87a8-193fe56d1035"},{"Code":"1000M","ID":"b3d68610-22a5-445d-8c5c-c79487373aa2"}]
ListVariantIDArray of strings
Example: ["9ad47be6-bf1c-4dd5-87a8-193fe56d1035","b3d68610-22a5-445d-8c5c-c79487373aa2"]
Response
{ "ID": "9525a6b0-297f-4b4a-97c7-0ae876bb44cd", "Variants": [ {}, {} ], "ListVariantID": [ "9ad47be6-bf1c-4dd5-87a8-193fe56d1035", "b3d68610-22a5-445d-8c5c-c79487373aa2" ] }

Update Variant by Code

Request

Update Variant By variant code

You must have "EDIT" role in "Products" Module

Bodyapplication/json
One of:
Codestringrequired

Code of the variant

Example: "2DL-P"
Namestring

Display Name.

Example: "2D Layering (Premium)"
Modelstring

Name of the variant. Backwards compatibility with property "Variant"

Example: "2D Layering (Premium)"
ProductCodestring

Code of product

Example: "2DL"
Weightinteger

Weight of the product

Typestring

Product-type of the variant

Enum"Standard""Composite""NonInventory""Manufactured""MultipleUOM""Complementary""PrepaidPackage""PrepaidPoint"
Example: "Standard"
OrderPriceinteger

Last order price of the product

UnitCostinteger

Unit cost of the product

Example: 2000
UnitPriceinteger

Unit selling price of the product

Example: 500000
Taxableboolean

Taxable status of the product

Example: true
LoyaltyPointboolean

Loyalty point status of the product

Discontinuedboolean

Discontinue status of the product

ParentCodestring

Product Code for parent (Type MultipleUOM)

Ratiointeger

Multiple uom quantity ratio of the parent (Type MultipleUOM)

ExpiredDayPrepaidinteger

Number of day set to expired (Type Prepaid Package & Prepaid Point)

ExpiredMonthPrepaidinteger

Number of month set to expired (Type Prepaid Package & Prepaid Point)

PointPrepaidinteger

Number of point that earned (Type Prepaid Package & Prepaid Point). If value is set with 0 means unlimited

ComponentsArray of objectsrequired
Example: [{"Code":"2DL","Name":"2D Layering","Qty":1}]
Components[].​Codestring

Component variant code of other variant

Components[].​Namestring

Name of the component

Components[].​Qtyinteger

Total qty of the component

OutletPriceArray of objectsrequired
Example: [{"Outlet":"Outlet1","Price":500000,"ExtraCost":0}]
OutletPrice[].​Outletstring

Selected outlet of the product

OutletPrice[].​Priceinteger

Outlet price of the product

OutletPrice[].​ExtraCostinteger

Extra cost of the selected product

curl -i -X PUT \
  https://subdomain.dealpos.net/api/v3/Variant \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "Code": "2DL-P",
    "Name": "2D Layering (Premium)",
    "Model": "2D Layering (Premium)",
    "ProductCode": "2DL",
    "Weight": 0,
    "Type": "Standard",
    "OrderPrice": 0,
    "UnitCost": 2000,
    "UnitPrice": 500000,
    "Taxable": true,
    "LoyaltyPoint": false,
    "Discontinued": false,
    "Components": [
      {
        "Code": "2DL",
        "Name": "2D Layering",
        "Qty": 1
      }
    ],
    "OutletPrice": [
      {
        "Outlet": "Outlet1",
        "Price": 500000,
        "ExtraCost": 0
      }
    ]
  }'

Responses

Bodyapplication/json
Messagestring

Variant has been updated

Response
application/json
{ "Message": "Update Success" }

Delete a Variant

Request

Delete Variant By variant code

You must have "DELETE" role in "Products" Module

Bodyapplication/json
Codestringrequired

The code of the variant to be deleted.

curl -i -X DELETE \
  https://subdomain.dealpos.net/api/v3/Variant \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "Code": "1003L"
  }'

Responses

Bodyapplication/json
string

the variant has been deleted

Response
application/json
"Variant with code 1003L has been successfully deleted."

List Variants

Request

Also available as HTTP POST with the same endpoint


Get List of Variant existing

Required Group Role: "Products" - "VIEW"

Bodyapplication/json
Categorystringrequired

The category of the variant to be showed.

PageNumberinteger

The page number that you want to display

PageSizeinteger

The maximum amount of data that you want to display on the page

Typestring

The type of the variant to be showed.

Namestring

Variant's Name

Codestring

Variant's Code

ReleasedFromstring

Release Product Date Start

ReleasedTostring

Release Product Date To

curl -i -X GET \
  https://subdomain.dealpos.net/api/v3/Variant \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "Category": "2D Layering",
    "PageNumber": 1,
    "PageSize": 10,
    "Type": "Standard",
    "Name": "2D Layering (Premium)",
    "Code": "2DL-P",
    "ReleasedFrom": "2021-01-01",
    "ReleasedTo": "2021-12-31"
  }'

Responses

Bodyapplication/json
DataArray of objects
RecordsCountinteger

Total count of the records

Response
application/json
{ "Data": [ {}, {} ], "RecordsCount": 2 }

List Variant Data

Request

Also available as HTTP POST with the same endpoint


Get List of Variant Data

Required Group Role: "Products" - "VIEW"

Bodyapplication/json
Categorystringrequired

The category of the variant to be showed.

PageNumberinteger

The page number that you want to display

PageSizeinteger

The maximum amount of data that you want to display on the page

Typestring

The type of the variant to be showed.

Namestring

Variant's Name

Codestring

Variant's Code

ReleasedFromstring

Release Product Date Start

ReleasedTostring

Release Product Date To

curl -i -X GET \
  https://subdomain.dealpos.net/api/v3/Variant/Data \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "Category": "2D Layering",
    "PageNumber": 1,
    "PageSize": 10,
    "Type": "Standard",
    "Name": "2D Layering (Standard)",
    "Code": "2DL-S",
    "ReleasedFrom": "2021-01-01",
    "ReleasedTo": "2021-12-31"
  }'

Responses

Bodyapplication/json
DataArray of objects
Response
application/json
{ "Data": [ {}, {} ] }

Variants Count

Request

Also available as HTTP POST with the same endpoint


Count total Variant

Required Group Role: "Products" - "VIEW"

Bodyapplication/json
Categorystringrequired

The category of the variant to be showed.

PageNumberinteger

The page number that you want to display