Skip to content

Search Products By Name

GET https://api.leapa.co/v2/products/search

This endpoint needs your API key

Send it as a bearer token in the Authorization header. A request without one is answered with 401. See Authentication for where to find your key and how to keep it secret.

Request

curl -X GET "https://api.leapa.co/v2/products/search?name=Jeanne Ndayishimiye&pageFilter=<pageFilter>" \
  -H "Authorization: Bearer $LEAPA_API_KEY" \
  -H "Accept: application/json"

Response

OK

{
  "page": 0,
  "size": 0,
  "total_elements": 0,
  "total_pages": 0,
  "data": [
    {
      "id": "obj_5f21c8a40b",
      "name": "Jeanne Ndayishimiye",
      "code": "string",
      "description": "Room 204, two nights",
      "status": "soldout",
      "type": "service",
      "images": [],
      "attributes": {
        "bedType": null,
        "numberOfGuests": null,
        "amenities": null
      },
      "rateId": [],
      "created_date": 0,
      "price_details": [],
      "live": false,
      "rate_ids": []
    }
  ]
}

Query parameters

Appended to the URL after a `?`.

  • namestringrequired
    Example:Jeanne Ndayishimiye
  • pageFilterPageFilterrequired

Response

application/json
  • pageinteger<int32>

    Current page number.

  • sizeinteger<int32>

    Number of element in a page.

  • total_elementsinteger<int64>

    Total Elements.

  • total_pagesinteger<int64>

    The total Pages.

  • dataarray of ProductResponse

    List of Products

Status codes

  • 200OK
  • 400Bad request
  • 401Unauthorized
  • 402Payment required
  • 403Forbidden
  • 404Not found
  • 428Precondition required
  • 500Server error

Request

curl -X GET "https://api.leapa.co/v2/products/search?name=Jeanne Ndayishimiye&pageFilter=<pageFilter>" \
  -H "Authorization: Bearer $LEAPA_API_KEY" \
  -H "Accept: application/json"

Response

OK

{
  "page": 0,
  "size": 0,
  "total_elements": 0,
  "total_pages": 0,
  "data": [
    {
      "id": "obj_5f21c8a40b",
      "name": "Jeanne Ndayishimiye",
      "code": "string",
      "description": "Room 204, two nights",
      "status": "soldout",
      "type": "service",
      "images": [],
      "attributes": {
        "bedType": null,
        "numberOfGuests": null,
        "amenities": null
      },
      "rateId": [],
      "created_date": 0,
      "price_details": [],
      "live": false,
      "rate_ids": []
    }
  ]
}