# 3. Food order to print
# Brief Description
- When a reprint of the receipt is required, initiate a request for reprinting with Swifood. Here are the tips:
- At present, only payment receipts and refund receipts are supported for reprinting.
- Due to restrictions by the Bureau of Internal Revenue (BIR) in the Philippines, payment receipts are limited to being printed up to 5 times, while refund receipts are limited to a single print.
# HTTP Request Information
# Request URL
{domain}/open-api/order/print
# Request Method
- POST
# Request Header
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Content-Type | Yes | string | application/json |
# Request Body Parameters
| Parameter Name | Required | Type | Length Limit | Example | Description |
|---|---|---|---|---|---|
| appId | Yes | string | - | 45eebd745dcf0b5f6d6f9fcde28cd9fe8116a892 | App id (provided by Swifood) |
| storeKey | Yes | string | 100 | CVIEIYUNHTS0 | Store key (provided by Swifood) |
| param | Yes | string | - | - | Request param content string |
| sign | Yes | string | - | RSA sign of param |
# Param Parameters
| Parameter Name | Required | Type | Length Limit | Example | Description |
|---|---|---|---|---|---|
| orderNo | Yes | string | - | TB****32345 | Swifood order no |
| printType | Yes | int | - | 1 | Print type 2:payment 6:refund |
# Request body example
{
"appId": "45eebd745dcf0b5f6d6f9fcde28cd9fe8116a892",
"storeKey": "CVIEIYUNHTS0",
"sign": "abcdef",
"param": "{\"orderNo\":\"TB****32345\",\"printType\": 2}"
}
# Response Example
# Code Refer to this list
# Response Parameters
| Parameter Name | Type | Example | Description |
|---|---|---|---|
| code | int | 10000 | Status Code Refer to List |
| message | string | success | Status Code Information |
| data | boolean | - | Successful Or Not |
{
"code": 10000,
"message": "success",
"data": true
}
# Failed Response Example
{
"code":21000,
"message":"Service error, please contact administrator",
"data":null
}