Order Controller

Get order history by customer email

Changed on

Retrieves all orders for a specific customer email address including total count with pagination support

get/orders/history

Request

Query parameters

customerEmailstring
Example:customer@example.com

Customer email (Required if postCode is not provided)

postCodestring
Example:SW1A 1AA

Post Code (Required if customerEmail is not provided)

pagenumber required

Page number for pagination

sizenumber required
Example:10

Number of items per page

Response

Order history retrieved successfully

totalOrdersnumber required

Total number of orders for the customer

pagenumber required

Current page number

sizenumber required

Number of items per page

Example response

{
  "totalOrders": 5,
  "orders": [
    {
      "id": 1,
      "titleNumber": "TN123456",
      "instrumentCopyNumber": "IC123456",
      "customerEmail": "customer@example.com",
      "customerId": 1,
      "tenure": "Freehold",
      "address1": "123 Main Street",
      "flatUnit": "Flat 5B",
      "municipality": "Madrid",
      "registry": "Registro de la Propiedad",
      "cruIdufir": "1234567890",
      "cadastralRef": "1234567VK4700N0001AA",
      "propertyType": "house",
      "ownerName": "Juan García",
      "floor": "3",
      "door": "B",
      "requestReason": "Purchase due diligence",
      "identificationType": "NIE",
      "identificationNumber": "X1234567L",
      "nameAsPerIdentification": "John Doe",
      "city": "London",
      "suburb": "Ponsonby",
      "county": "Greater London",
      "country": "United Kingdom",
      "countryId": 1,
      "stateId": 1,
      "currency": "GBP",
      "currencySymbol": "£",
      "totalAmount": 199.99,
      "orderStatus": {
        "id": 1,
        "status": "Processing",
        "backgroundColor": "#FF5733",
        "textColor": "#FFFFFF",
        "borderColor": "#000000"
      },
      "customerOrderCount": 5,
      "postCode": "SW1A 1AA",
      "shippingAddress1": "456 Delivery Street",
      "shippingAddress2": "Apartment 5B",
      "shippingCity": "Manchester",
      "shippingPostcode": "M1 1AA",
      "shippingCounty": "Greater Manchester",
      "shippingPhone": "+44 123 456 7890",
      "shippingFirstName": "John",
      "shippingLastName": "Doe",
      "postCodeOrderCount": 3,
      "paymentMethod": "card",
      "latestEmailStatus": "delivered",
      "customerIsVerified": true,
      "customerEmailValidationStatus": "UNKNOWN",
      "orderLng": "en",
      "productType": "pf",
      "ghostOrderId": 2,
      "isCertified": true,
      "applicationNumber": "APP-12345",
      "upSellSource": "EMAIL",
      "upSellEntryChannel": "DOCUMENT_REMINDER_EMAIL",
      "utmSource": "google",
      "refundedAmount": 50,
      "applicantFirstName": "John",
      "applicantLastName": "Smith"
    }
  ]
}

Changes

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the required property // to the response with the status