CreateShortHTML

Creates a HTML astrology report, with less birth data requirements. With a successful call it will respond with HTML directly.

All fields starting with P1- need to be duplicated and changed to P2- to add a second person for relationship reports.

Request Parameters
ReportCodeRequiredDefines which report is to be created.  The ReportCode is part of the service address.

/v2/reports/CreateShortHTML/ReportCode/

APIKeyRequiredA valid API Key for your user account. Provided in setup email
P1FirstNameRequiredFirst name for person
P1LastNameOptionalLast name for person
P1SexRequiredSingle letter code :
M for male,  F for female
P1DOBRequiredYYYY-MM-DD format.  Add zeros to single digit months or days.
Example:   1970-06-27, 2011-12-09
P1CountryRequiredTwo character country code, from this list.  Download list.
or
Four character U.S. State codeExample: UK or USNY
P1CurrentCountryRequiredRequired for forecast reports only.

Two character country code, from this list.  Download list.
or
Four character U.S. State code

ForecastDateOptionalStart date for forecast reports.  Use this to paying customers get the same date if they recreate the order.

YYYY-MM-DD format.  Add zeros to single digit months or days.

Example:   1970-06-27, 2011-12-09

OrderIDOptionalYour own order ID, add if you want to track your orders against our billing system.
TestModeOptionalEnable test mode by setting field to 1. Test mode allows creation of reports without being billed for the report.
OutputFormatOptionalDefault response format is set to XML, select JSON by adding outputformat=JSON to any request.
OutputChoicesOptionalComma separated list of user selections, used when user is prompted with a list of questions.

 

Responses
ResponseStatus
CodeCode representing errors see result codes to determine the error.
MessageDescription of the error

When a successful call is made raw HTML will be returned instead of an error code.   There will be a HTML comment contained inside the HTML.  <!–REPORTCREATED_OK->

Check for this comment in any return from the service,  if it exists use the HTML,  else deal with the error.

CreateShortHTML Result codes

Positive result code indicates success, negative shows a failure.

Input Errors – Person 1

-11      Error – Missing first name
-12      Error – Sex not provided or invalid
-13      Error – Missing date of birth
-14      Error – Invalid date of birth
-17      Error –  Missing Country Code
-19      Error – Missing current location code (Forecasts Only)

Input Errors – Person 2

-21      Error – Person 2 – Missing first name
-22      Error – Person 2 – Sex not provided or invalid
-23      Error – Person 2 – Missing date of birth
-24      Error – Person 2 – Invalid date of birth
-27      Error –  Person 2 – Missing Country Code
-29      Error –  Person 2 – Missing current location code (Forecasts Only)

Action Errors

-31    Error – Invalid or Expired ReportID
-32    Error – Invalid ForecastDate

API Key Errors

-41      Error – Missing API Key
-42     Error – Invalid or expired API Key

System Errors

-91      Error – System error – retry later.

Example Request

Creating a HTML report for the following birth details:
First Name : John
Last Name : Smith
Sex : Male
Date of Birth : 15th June 1970
Country of Birth:  United Kingdom

In this example PRO-ST-CHART is the ReportCode

/v2/reports/CreateShortHTML/PRO-ST-CHART/?&APIKEY=YOURAPIKEY&P1FirstName=John&P1Sex=M&P1DOB=1970-06-15P1Country=UK

Example Response

Raw HTML will returned with a successful call.

Any errors, will be returned in XML or JSON format depending on the OutputFormat parameter.