Skip to main content

Documentation Index

Fetch the complete documentation index at: https://help-loyalife.xoxoday.com/llms.txt

Use this file to discover all available pages before exploring further.

Standard Envelope

Every Loyalife API response wraps its payload in a results object:
{
  "results": {
    "IsSucessful": true,
    "ErrorCode": "000",
    "ExceptionMessage": "Success",
    "ReturnObject": { ... },
    "Count": 0
  }
}
IsSucessful is spelled with one “s” — this matches the service’s actual response field name.

Fields

FieldTypeDescription
IsSucessfulbooleantrue if the request was processed successfully.
ErrorCodestring"000" on success. A non-zero code indicates an error.
ExceptionMessagestring"Success" on success; error description on failure.
ReturnObjectanyThe response payload — varies by endpoint. May be an object, array, boolean, or scalar.
CountintegerNumber of records returned (used on list endpoints).

Success Response

{
  "results": {
    "IsSucessful": true,
    "ErrorCode": "000",
    "ExceptionMessage": "Success",
    "ReturnObject": true,
    "Count": 0
  }
}

Error Response

{
  "results": {
    "IsSucessful": false,
    "ErrorCode": "E001",
    "ExceptionMessage": "Member not found",
    "ReturnObject": null,
    "Count": 0
  }
}

Checking for Errors

Always check IsSucessful first — the HTTP status code alone is not sufficient. A 200 OK response can still contain IsSucessful: false when the request was received but the business logic failed.
response = requests.post(url, ...)
data = response.json()["results"]

if not data["IsSucessful"]:
    raise Exception(f"API error {data['ErrorCode']}: {data['ExceptionMessage']}")

return data["ReturnObject"]