Skip to content

Introduction

The partner intake system allows partners to submit customer enquiries to the Haya CRM with a delayed activation period before the enquiry is set as active and ready to be serviced by Haysto/Picnic staff members.

Enquiry Endpoint

Method URI Required Scopes
POST /partners/external/intake enquiry:case:intake:create

Request Body

Parameter Type Required Notes
brand string Yes picnic or haysto
first_name string Yes Applicant first name
last_name string Yes Applicant last name
email string Yes Applicant email address
mobile_number string Yes Applicant moible phone number
date_of_birth string Yes Applicant date of birth (ISO 8601 date format)
terms_agreement boolean Yes Applicant accepts and understands the terms of submission
stage string Yes The point in home buying journey the customer is currently in, must be viewing_properties, researching, ready_to_make_an_offer or offer_accepted
application_type string Yes Whether the applicant is looking to apply as part of a joint application or a single application, must be either single or multi_applicant
employment_status string Yes Employment status of primary applicant, must be employed, self_employed, company_director, contractor, cis_worker, retired or unemployed
total_annual_income number Yes Combined estimated total income from all applicants
mortgage_purpose string Yes Whether it's a purchase or remortgage enquiry, must be either purchase or remortgage
has_credit_issues boolean Yes Whether applicant(s) have any credit issues, true or false
credit_issues string[] Conditional: has_credit_issues: true Array of credit issues made from the following, low_credit_score ,ccj, default, iva, late_payments_non_mortgage, late_payments_mortgage, debt_management_plan, repossession, bankruptcy
purchase_type string Conditional: mortgage_purpose: purchase One of the following, home_mover, first_time_buyer, additional_property
mortgage_scheme string Conditional: purchase_type: first_time_buyer One of the following, shared_ownership, right_to_buy, not_sure,no
new_property_value number Conditional: mortgage_purpose: purchase Approximate value of the new property or estimated budget
deposit_amount number Conditional: mortgage_purpose: purchase Approximate combined deposit of applicant(s)
remortgage_reason string Conditional: mortgage_purpose: remortgage Reason for looking to remortgage, must be get_better_rate, current_deal_ending, borrow_more_money, release_money, or other
current_property_value number Conditional: mortgage_purpose: remortgage Approximate value of remortgage property
outstanding_mortgage_amount number Conditional: mortgage_purpose: remortgage Approximate value left on existing mortgage of the remortgage property
additional_borrowing_amount number Conditional: remortgage_reason: borrow_more_money Approximate value that applicant is looking to borrow in addition to their existing mortgage value
release_borrowing_amount number Conditional: remortgage_reason: release_money Approximate value that applicant is looking to release
product_uuid uuid No UUID of a product retrieved from the eligibility engine
credit_check_consent boolean No Whether the user has granted Experian credit check permission, omitted values are assumed false
addresses object[] No Array of applicant address objects (minimum 1 if provided)
addresses.*.line_1 string Yes First line of address
addresses.*.line_2 string No Second line of address
addresses.*.line_3 string No Third line of address
addresses.*.town_city string No Town or city
addresses.*.county string No County
addresses.*.country string No Country
addresses.*.postcode string Yes Postcode
addresses.*.date_moved_in string No Date moved in (ISO 8601 date format)
addresses.*.date_moved_out string No Date moved out (ISO 8601 date format)

Example Request

curl --location 'https://api.haya-test2.uk/partners/external/intake' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...' \
--data-raw '{
    "brand": "haysto",
    "first_name": "Example",
    "last_name": "Customer",
    "email": "[email protected]",
    "mobile_number": "01234567890",
    "date_of_birth": "1994-03-10",
    "terms_agreement": true,
    "stage": "ready_to_make_an_offer",
    "application_type": "single",
    "employment_status": "employed",
    "total_annual_income": 50000,
    "mortgage_purpose": "purchase",
    "has_credit_issues": true,
    "credit_issues": [
        "ccj",
        "default"
    ],
    "purchase_type": "first_time_buyer",
    "mortgage_scheme": "no",
    "new_property_value": 200000,
    "deposit_amount": 60000,
    "product_uuid": "8b5f1cc8-7996-4255-b9e7-a9aa0de95b70",
    "credit_check_consent": true,
    "addresses": [
        {
            "line_1": "1 Current House",
            "line_2": "Current Street",
            "town_city": "Current Town",
            "country": "England",
            "postcode": "EX4 9LE",
            "date_moved_in": "2020-01-24"
        }
    ]
}'

Example Response

{
    "message": "Case created",
    "reference": "3689825556523283"
}

Response Body

Parameter Type Description
message string Either "Case created" or "Case updated"
reference string Case reference number

Attach Endpoint

Method URI Required Scopes
POST /partners/external/intake/attach enquiry:case:intake:create

Request Body

Parameter Type Required Notes
email string Yes Applicant email address, should have already been added to the system with a successful call to the enquiry endpoint
product_uuid string Yes UUID of a product retrieved from the eligibility engine

Example Request

curl --location 'https://api.haya-test2.uk/partners/external/intake/attach' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...' \
--data-raw '{
    "email": "[email protected]",
    "product_uuid": "bf1c165c-4f67-4363-9ed1-1de0e240bc5c"
}' 

Example Response

{
    "redirect": "https://auth.haya-test2.uk/s/LdUrkaCQ"
}

Error Responses

Status Code Message Description
404 Case not found The email address provided does not have an account within the system, we recommend a graceful fallback by redirecting the customer to our enquiry form when this occurs
500 Failed to generate redirect link Redirect link was unable to be made successfully, we recommend redirecting the customer to our customer dashboard