4D Result API
This documentation describes how to integrate the 4D Result API with Firebase.
There are two data channels, and most integrations use both:
| Channel | What it gives you | Where to start |
|---|---|---|
| Firestore | The live result feed. A single document that is updated as draws open. | Firebase Configuration |
| REST API | Historical results, number analysis, lucky book content, company metadata and image helpers. | API List |
The Firestore document and the result-returning REST endpoints share the same response shape, documented once in Result Fields.
Quick reference
- Base URL —
https://backend.4dnum.com(see Domain URL) - Protocol — HTTPS,
GETfor every endpoint - Encoding — JSON, UTF-8
- Company codes —
M,PMP,ST,SG,CS,STC,EE,H,GD,P(see Company Codes) - Date format —
YYYY-MM-DD, except the image endpoints which useYYYYMMDD
First call
curl https://backend.4dnum.com/api/v1/result/2024-03-14
Document metadata
| Document version | 1.0 |
| Date | 20/03/2024 |
| Prepared by | RK |
See the Changelog for the full version history.