/
DinePlan API

DinePlan API

The document helps to create the POS Order in DinePlan through Gateway

Pre-Requisites

GatewayId and Token

API Request

image-20240322-230448.png

 

The CURL is here

curl --location 'https://dgateway.xyz/v1/ticket/create' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer 1212' \ --data '{ "claimed": false, "deliveryContents": "{\"ClosingTag\":\"\",\"DepartmentName\":\"GRAB N GO\",\"GoRequest\":true,\"Orders\":[{\"FlyOrderStatus\":\"New\",\"MenuItemName\":\"ARANCINI\",\"MenuItemSyncId\":1,\"MenuItemType\":0,\"OrderRef\":0,\"OrderStatus\":[\"New\"],\"OrderTagItems\":[],\"PortionName\":\"M\",\"Price\":4.7,\"Quantity\":1.0}],\"QueueNumber\":\"41\",\"TotalAmount\":4.7}", "locationId": "155", "response": "{\"AccountNumber\":\"\",\"ApprovalCode\":\"\",\"AuthorizationCode\":\"\",\"BatchNo\":\"\",\"CardExpiry\":\"\",\"CardIssuerName\":\"\",\"CardNo\":\"\",\"Description\":\"\",\"Last4DigitsCard\":\"\",\"MerchantId\":\"\",\"ReferenceNo\":\"\",\"ResponseCode\":\"\",\"TerminalId\":\"\",\"TransactionNo\":\"\",\"TypeOfCard\":\"\"}", "status": "IN", "ticketNumber": "41" }'

 

Fields

Description

Fields

Description

Claimed

It should be false by default

DeliveryContents

The content of the Order should be sent here and the detail explanation is given below

The JSON should be converted to String

LocationId

The Gateway Id → Each outlet will have its Own Id

Status

IN → Default Status should be Sent

TicketNumber

The Receipt Unique Number should be sent along with the Request

Response

Payment Response. The JSON should be converted to String and detail explanation is given below

The Delivery Contents are explained below

{ "Entities": [ { "EntityTypeId": 1, "EntityName": "3455" } ], "QueueNumber": "23", "TotalAmount": 9.6, "TicketNumber": "ABC123", "Orders": [ { "MenuItemName": "ULTIMATE CHICKEN-BEEF DAILY BOWL", "MenuItemType": 0, "OrderStatus": [ "New" ], "PortionName": "NORMAL", "Price": 9.6, "Quantity": 1.0, "OrderTagItems": [ { "Quantity": 1, "price": 0.0, "tagName": "MAYONAISE", "tagValue": "Less MAYONAISE" }, { "Quantity": 1, "Price": 0.0, "TagName": "EXTRA", "TagValue": "Cabbage" } ] } ] }

The explanations are

Fields

Type

Explanation

Fields

Type

Explanation

Entities

Array

Entities are nothing but the representation for Table or Customer.

EntityType → 0 is Customer, EntityType → 1 is Table

Entity Name is nothing but the Table Name or Customer Name. If we have Customer details, it should be sent as below

image-20240322-232329.png

QueueNumber

String

QueueNumber if we have

TotalAmount

Decimal

Total of the Whole Receipt

TicketNumber

String

Unique Number of the Receipt

Orders

Array

Array of Orders

Order → MenuItemName

String

Name of the Product

Order → MenuItemType

Int

0 → Normal Product

1 → Combo Product

Order → OrderStatus

Array

Status of the Order

“New” → Newly Created Order to be Sent to Kitchen

“Serve Later” → Order to be Served Later

Order → PortionName

String

Name of the Portion of the Food. Default should be Normal

Order → Price

Decimal

Price of the Portion

Order → Quantity

Decimal

Quantity of the Portion Ordered

Order → OrderTagItems

Array

Condiments of the Order with the Price and Quantity

Order → OrderTagItem → Quantity

Decimal

Quantity of the Condiments Ordered

Order → OrderTagItem → Price

Decimal

Price of the Condiments

Order → OrderTagItem → TagName

String

Group Name if it has. If there is no Group, you can put the TagName and TagValue should be the Same.

Order → OrderTagItem → TagValue

String

Name within the Group

The response should be like the one below

{ "ApprovalCode": "01616", "CardNo": "XXXXXXXXXXXX1530", "CardIssuerName": "Visa", "Last4DigitsCard": "1234", "MerchantId": "000000020432379", "ResponseCode": "YYYY", "TerminalId": "24032220", "TransactionNo": "ABC12233", "PaymentTypeName": "Card" }

If the customer has paid via Card you can add the information in the response and share it via API

Fields

Explanation

Fields

Explanation

ApprovalCode

The code which returns from the Gateway

CardNo

If there is any card number

CardIssuerName

Visa, Master or Any card type that is for the Card

Last4DigitsCard

4 Digits of the Card

MerchantId

If there is any Merchant Id available, please add that and it comes part of the Payment done at the Terminal

ResponseCode

If there is any response from the Payment

TerminalId

Id of the Terminal

TransactionNo

Unique Transaction No is necessary to cross verify the Payment

PaymentTypeName

The Name of the Payment that should be closed in the Outlet

*The ones marked in Bold are mandatory

Product API

URL: https://dgateway.xyz/v2/productApi

The Curl are

Taxes API

URL: https://dgateway.xyz/v2/taxesApi

The Curl are

 

Related content