Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
API Reference
List all orders with status and date filtering
cURL
curl --request GET \ --url https://api.hit-pay.com/v1/orders \ --header 'X-BUSINESS-API-KEY: <x-business-api-key>'
import requests url = "https://api.hit-pay.com/v1/orders" headers = {"X-BUSINESS-API-KEY": "<x-business-api-key>"} response = requests.get(url, headers=headers) print(response.text)
const options = {method: 'GET', headers: {'X-BUSINESS-API-KEY': '<x-business-api-key>'}}; fetch('https://api.hit-pay.com/v1/orders', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.hit-pay.com/v1/orders", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "X-BUSINESS-API-KEY: <x-business-api-key>" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.hit-pay.com/v1/orders" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-BUSINESS-API-KEY", "<x-business-api-key>") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) }
HttpResponse<String> response = Unirest.get("https://api.hit-pay.com/v1/orders") .header("X-BUSINESS-API-KEY", "<x-business-api-key>") .asString();
require 'uri' require 'net/http' url = URI("https://api.hit-pay.com/v1/orders") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["X-BUSINESS-API-KEY"] = '<x-business-api-key>' response = http.request(request) puts response.read_body
{ "id": "9b4bc2a2-4721-4636-a6dc-4effec3b00fc", "order_display_number": 5660, "business_id": "9130c422-bf97-4bd1-b370-07a3a6f40708", "channel": "point_of_sale", "version": "1.0", "customer_id": null, "business_customer_id": null, "customer": null, "customer_pickup": true, "currency": "sgd", "order_discount_name": null, "status": "draft", "remark": "Razaq is a fool", "created_at": "2024-02-10T00:41:42+08:00", "updated_at": "2024-02-10T00:41:42+08:00", "closed_at": null, "location_id": null, "location": null, "business_user_id": "34", "slot_date": null, "slot_time": null, "messages": null, "products": [], "charges": [], "line_items": [], "order_form": { "membership_id": { "type": "input", "title": "Membership ID", "deleted": false, "include": true, "required": true } }, "order_form_response": [], "coupon": null, "payment_status": null, "fulfilment_status": "", "line_items_total": 0, "order_discount_amount": 0, "line_item_discount_amount": 0, "line_item_tax_amount": 0, "additional_discount_amount": 0, "total_discount_amount": 0, "line_item_price": 0, "shipping_amount": 0, "total_coupon_amount": 0, "amount": 0, "subtotal": 0 }
"b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d"
x <= 100
Order version: 1.0 or 2.0. Return all orders as default
1.0
2.0
Search for fields: amount ,created_at ,order id, remark, customer_name
The available status: completed, sent, draft, expired, canceled
completed
sent
draft
expired
canceled
Example: 2023-04-18
If we want to show the product or charge detail=> add the value: products or charges. For both: products,charges
200
Show child attributes
Was this page helpful?