This API is intended for individuals and companies who create mobile apps.
If you are interested in a quick-to-install calculator for your website, see the box headlined "Website owner?" above the calculator at this website.
For the API, you may use method GET with a parameter composed of &-separated name=value sets. The response is JSON-encoded. Examples are further below.
(Optionally, you may use method POST instead of method GET. Post the same names and values in the same format as with method GET. The response for method GET and method POST are identical. See privacy note further below.)
The following name=value
sets are expected for the API's GET parameter:
id=testing
The value of id
may be "testing" while you are determining if the API will fit with your app. If you decide to use the API beyond a testing period, registration is required to obtain a unique id
value. (Do not rely on id value "testing" for production software.)
name=_________
The value of name
is the name of the individual for calculating the daily lucky numbers.
by=_________
The value of by
is the birth year number of the individual.
bm=_________
The value of bm
is the birth month number of the individual. (Use month number, not month name.)
bd=_________
The value of bd
is the birth day number of the individual.
dy=_________
The value of dy
is the calculation date year number. (The calculation date is the date the lucky numbers are calculated for.)
dm=_________
The value of dm
is the calculation date month number. (Use month number, not month name.)
dd=_________
The value of dd
is the calculation date day number.
Here is an example GET URL to obtain a response from the API:
https://affinitynumerology.com/V3/calc/api_DailyLuckyNumbers.php?id=testing&name=Will%20Bontrager&by=1900&bm=2&bd=6&dy=2022&dm=8&dd=31
The response will be JSON-encoded. With the above GET URL, this would be the response:
{"number_strength":{"1":4,"2":2,"3":6,"4":2,"5":2,"6":2,"8":2,"9":4,"10":1,"12":1,"18":1,"21":2,"45":2,"66":2,"1900":2,"1908":2},"highest_strength":6,"received":{"id":"testing","name":"Will Bontrager","by":"1900","bm":"2","bd":"6","dy":"2022","dm":"8","dd":"31"}}
Notice that the response includes the parameter information provided with the GET request (the id and the data used for the calculations).
Below is the above JSON decoded into an array.
Array
(
[number_strength] => Array
(
[1] => 4
[2] => 2
[3] => 6
[4] => 2
[5] => 2
[6] => 2
[8] => 2
[9] => 4
[10] => 1
[12] => 1
[18] => 1
[21] => 2
[45] => 2
[66] => 2
[1900] => 2
[1908] => 2
)
[received] => Array
(
[id] => testing
[name] => Will Bontrager
[by] => 1900
[bm] => 2
[bd] => 6
[dy] => 2022
[dm] => 8
[dd] => 31
)
)
The [number_strength]
array has the lucky numbers as array keys and their strengths as array values. Thus, [1] => 4
represents lucky number 1 and strength 4.
The [received]
array contains the values received when the API call was made.
To determine a strength percentage for a lucky number, this formula can work:
- Determine current number's strength from the
[number_strength]
array.
- Determine the highest number strength from the
[number_strength]
array.
% = ( 100 / highest number strength ) * current number's strength
Note: The API software checks that information is provided. It does not check validity.
To register for a unique id: Provide a contact name and email address and agree to place a "Calculations provided by AffinityNumerology.com" statement near the calculated results published in the app or another location within the app that has been negotiated and agreed to. (The statement may be translated to the language of the audience.) The affinitynumerology.com contact page may be used to register.
Privacy note: We do not store your user's personal information on the affinitynumerology.com server except, when method GET is used, the information is part of the request URL and is used to update the access logs, like all request URLs are. The access logs are required for full server operation. Use method POST to keep your user's personal information out of the request URL and the server access logs (which we do for website reading forms).