---
updatedAt: 2025-08-11T18:18:17.000Z
agentTools:
  projectIndex: https://docs.keycafe.com/llms.txt
---

# Search Alias Codes

Retrieve data for multiple alias codes with a GET request to the endpoint.

If no search parameters are specified, the API will return all alias codes.

# Pagination

Results are paginated, with a maximum of 50 keys per page. Additional pages can be accessed using the Link response header

**Example**

```curl curl
Link: <https://www.keycafe.com/v0/aliasCode?location=123456&page=2>; rel="next", <https://www.keycafe.com/v0/aliasCode?location=123456&page=5>; rel="last"
```

* <code>rel="first"</code>: URL to retrieve the first page of results.
* <code>rel="prev"</code>: URL to retrieve the previous page of results.
* <code>rel="next"</code>: URL to retrieve the next page of results.
* <code>rel="last"</code>: URL to retrieve the final page of results.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Keycafe API",
    "version": "0"
  },
  "x-explorer-enabled": true,
  "x-proxy-enabled": true,
  "x-samples-languages": [
    "shell",
    "python",
    "go"
  ],
  "servers": [
    {
      "url": "https://www.keycafe.com/"
    }
  ],
  "components": {
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "BasicAuth": []
    }
  ],
  "paths": {
    "/v0/aliasCode": {
      "get": {
        "tags": [
          "Alias Code"
        ],
        "summary": "Search Alias Codes",
        "description": "Retrieve data for multiple alias codes with a GET request to the endpoint.",
        "operationId": "search-alias-codes",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "description": "Alias code string used for key access. </br> Example: 123456",
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "access",
            "in": "query",
            "description": "Access record linked to the alias code.",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "location",
            "in": "query",
            "required": false,
            "description": "The ID of the location where the action or event occurred. </br> Example: 123456",
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of alias codes matching the search criteria.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "Unique identifier for the alias code.",
                        "example": 123456
                      },
                      "code": {
                        "type": "string",
                        "description": "Alias code string used for key access.",
                        "example": "111111"
                      },
                      "access": {
                        "type": "object",
                        "description": "Access record linked to the alias code.",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "Unique identifier for the access.",
                            "example": 1234567
                          },
                          "accessStartDate": {
                            "type": "string",
                            "description": "Access start date (YYYY-MM-DD).",
                            "example": "2025-07-21"
                          },
                          "accessStartTime": {
                            "type": "string",
                            "description": "Access start time (HH:mm).",
                            "example": "12:45"
                          },
                          "accessEndDate": {
                            "type": "string",
                            "description": "Access end date (YYYY-MM-DD).",
                            "example": "2025-07-23"
                          },
                          "accessEndTime": {
                            "type": "string",
                            "description": "Access end time (HH:mm).",
                            "example": "12:45"
                          },
                          "locale": {
                            "type": "string",
                            "description": "Language or locale preference.",
                            "example": "en"
                          },
                          "returnReminder": {
                            "type": "boolean",
                            "description": "Whether a return reminder is set.",
                            "example": false
                          },
                          "allowSetup": {
                            "type": "boolean",
                            "description": "Whether the guest can self-configure access.",
                            "example": false
                          }
                        }
                      },
                      "location": {
                        "type": "object",
                        "description": "Location where the alias code is valid.",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "Unique identifier for the location.",
                            "example": 7654321
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the location.",
                            "example": "Corner Cafe"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": "[\n    {\"id\": 123456, \"code\": \"111111\", ... },\n    {\"id\": 654321, \"code\": \"222222\", ... }\n]"
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```