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

Create a Product

Request

Create New Product

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

Headers
UploadImageAsyncstring

When true image is uploaded asynchronously meaning when you receive OK Status Code the image processing is still running in the background.

Bodyapplication/json
One of:
Categorystringrequired

The category of the product

Example: "Top/Men"
Namestringrequired

The name of the product

Example: "Captain America T-Shirt"
Brandstringrequired

The brand of the product

Example: "Brand"
Codestringrequired

The code of the product

Example: "1003"
Discontinuedbooleanrequired

The discontinued status of the product

ImageURLstringrequired

The image URL of the product

Example: "https://images.unsplash.com/photo-1622793348115-4e85dc2ca4eb?ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8Y2FwdGFpbiUyMGFtZXJpY2F8ZW58MHx8MHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=60"
ExtraImagesURLArray of strings

The extra image URL of the product

Example: ["//res.cloudinary.com/pos/image/upload/Product/afa67ca2-46f4-418a-a5fe-a3a79b1dbc95/vgzleqpgujlspm9ltdiht.jpg","//res.cloudinary.com/pos/image/upload/Product/afa67ca2-46f4-418a-a5fe-a3a79b1dbc95/q7dbzf9qnif8vbxuzxo0.jpg","//res.cloudinary.com/pos/image/upload/Product/afa67ca2-46f4-418a-a5fe-a3a79b1dbc95/ur871mubz7ioecvja8ex.jpg"]
Descriptionstring

The description of the product

Example: "New Arrival"
VariantsArray of objectsrequired
Example: [{"Model":"Small","Code":"1003S","UnitCost":100000,"UnitPrice":150000,"Discontinued":true,"Type":{"value":"Standard"},"VariantDescription":"Unavailable"},{"Model":"Medium","Code":"1003M","UnitCost":125000,"UnitPrice":175000,"Type":{"value":"Standard"},"Discontinued":false}]
Variants[].​Modelstring

The model of the variant

Variants[].​Codestring

The code of the variant

Variants[].​UnitCostnumber

The unit cost of the variant

Variants[].​UnitPricenumber

The unit price of the variant

Variants[].​Discontinuedboolean

The discontinued status of the variant

Variants[].​Typeobject

The type of the variant

Variants[].​VariantDescriptionstring

The description of the variant

curl -i -X POST \
  https://subdomain.dealpos.net/api/v3/Product \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'UploadImageAsync: string' \
  -d '{
    "Category": "Top/Men",
    "Name": "Captain America T-Shirt",
    "Brand": "Brand",
    "Code": "1003",
    "Discontinued": false,
    "ImageURL": "https://images.unsplash.com/photo-1622793348115-4e85dc2ca4eb?ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8Y2FwdGFpbiUyMGFtZXJpY2F8ZW58MHx8MHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=60",
    "ExtraImagesURL": [
      "//res.cloudinary.com/pos/image/upload/Product/afa67ca2-46f4-418a-a5fe-a3a79b1dbc95/vgzleqpgujlspm9ltdiht.jpg",
      "//res.cloudinary.com/pos/image/upload/Product/afa67ca2-46f4-418a-a5fe-a3a79b1dbc95/q7dbzf9qnif8vbxuzxo0.jpg",
      "//res.cloudinary.com/pos/image/upload/Product/afa67ca2-46f4-418a-a5fe-a3a79b1dbc95/ur871mubz7ioecvja8ex.jpg"
    ],
    "Description": "New Arrival",
    "Variants": [
      {
        "Model": "Small",
        "Code": "1003S",
        "UnitCost": 100000,
        "UnitPrice": 150000,
        "Discontinued": true,
        "Type": {
          "value": "Standard"
        },
        "VariantDescription": "Unavailable"
      },
      {
        "Model": "Medium",
        "Code": "1003M",
        "UnitCost": 125000,
        "UnitPrice": 175000,
        "Type": {
          "value": "Standard"
        },
        "Discontinued": false
      }
    ]
  }'

Responses

Bodyapplication/json
IDstringrequired

Product ID

Example: "9525a6b0-297f-4b4a-97c7-0ae876bb44cd"
VariantsArray of objectsrequired

Array of Variants

Example: [{"Code":"1000S","ID":"9ad47be6-bf1c-4dd5-87a8-193fe56d1035"},{"Code":"1000M","ID":"b3d68610-22a5-445d-8c5c-c79487373aa2"}]
Variants[].​Codestring

Variant Code

Variants[].​IDstring

Variant ID

ListVariantIDArray of strings

List Variant ID

Example: ["9ad47be6-bf1c-4dd5-87a8-193fe56d1035","b3d68610-22a5-445d-8c5c-c79487373aa2"]
Response
application/json
{ "ID": "9525a6b0-297f-4b4a-97c7-0ae876bb44cd", "Variants": [ { … }, { … } ], "ListVariantID": [ "9ad47be6-bf1c-4dd5-87a8-193fe56d1035", "b3d68610-22a5-445d-8c5c-c79487373aa2" ] }

Update a Product By Code

Request

Update Product Existing

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

Bodyapplication/json
Categorystringrequired

The name of the category that will be use, you also can create new category.

If you want to nest a category use a "/" operator ex: "Food/Snack/Pastries" will create 3 level category

Namestringrequired

The name of the product to be created.

Brandstring

The name of the brand to be created. Backwards compatibility with property "BrandName"

Codestringrequired

the code of the product to be created.

Discontinuedbooleanrequired

The product availability for selling.

ImageURLstring

The image link of the product to be created.

ExtraImagesURLArray of strings

Image link of additional image in product

Descriptionstring

The description of the product.

VariantsArray of objects
curl -i -X PUT \
  https://subdomain.dealpos.net/api/v3/Product \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "Category": "Top/Men",
    "Name": "Captain America T-Shirt",
    "Brand": "Brand",
    "Code": "1003",
    "Discontinued": false,
    "ImageURL": "https://images.unsplash.com/photo-1622793348115-4e85dc2ca4eb?ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8Y2FwdGFpbiUyMGFtZXJpY2F8ZW58MHx8MHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=60",
    "Description": "New Arrival",
    "Variants": [
      {
        "Model": "Medium",
        "Code": "1003M",
        "UnitCost": 125000,
        "UnitPrice": 200000,
        "Discontinued": false
      },
      {
        "Model": "Large",
        "Code": "1003L",
        "UnitCost": 150000,
        "UnitPrice": 225000,
        "Discontinued": false
      }
    ]
  }'

Responses

Bodyapplication/json
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
application/json
{ "ID": "9525a6b0-297f-4b4a-97c7-0ae876bb44cd", "Variants": [ { … }, { … } ], "ListVariantID": [ "9ad47be6-bf1c-4dd5-87a8-193fe56d1035", "b3d68610-22a5-445d-8c5c-c79487373aa2" ] }

Delete a Product

Request

Delete Product by Code

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

Bodyapplication/json
Codestringrequired

The code of the product to be deleted.

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

Responses

Bodyapplication/json
string

The Product has been deleted

Response
application/json
"Product with code J100 has been successfully deleted."

List Products

Request

Also available as HTTP POST (endpoint: /api/v3/Product/p)


Get List of Products

Required Group Role: "Products" - "VIEW"

Query
PageNumberintegerrequired

The page number that you want to display

Example: PageNumber=1
PageSizeintegerrequired

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

Example: PageSize=20
QueryRowCountboolean

Default show / hide the counter

Categorystring

The name of the product category.

ListCategoryArray of arrays

The name of the product in multiple category

Namestring

Name of the product

Discontinuedstring

The name of the product category.

Default "No"
Enum"No""Yes""All"
QueryInventoryboolean

The name of the product category.

Default false
curl -i -X GET \
  'https://subdomain.dealpos.net/api/v3/Product?Category=string&Discontinued=No&Name=string&PageNumber=0&PageSize=0&QueryInventory=false&QueryRowCount=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Bodyapplication/json
DataArrayArray of objects
RecordsCountinteger

total product data result. (-1 if QueryRowCount set false)

Response
application/json
{ "DataArray": [ { … }, { … }, { … }, { … }, { … } ], "RecordsCount": 5 }

Get a Product By Code

Request

Also available as HTTP POST with the same endpoints


Get Product Detail By Code

Required Group Role: "Products" - "VIEW"

Bodyapplication/json
ProductCodestringrequired

The code of the product to be provide.

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

Responses

Bodyapplication/json
IDstring

the ID product to be showed

Categorystring

the category of the product to be showed

Namestring

the name of the product to be showed

SupplierNamestring

the supplier name of the product

Brandstring

Brand name of product (Backwards compatibility with property "BrandName")

Codestring

the code of the product

Discontinuedboolean

the availibility of the product

Descriptionstring

description of the product

StorageArray of objects

storage location of the product

TagsArray of strings

tags of the product

ThumbnailURLstring

Thumbnail URL of product image

ImageURLstring

the image url of the product

ExtraImagesURLArray of strings