# idFromLegacyId

Query · GraphQL API

Get a GraphQL ID from a legacy ID that was returned from an SDK or a legacyId field. Does not verify existence except for payment methods.

> Deprecated since 2026-04-09: Use idsFromLegacyIds instead.

## Authentication

- SERVER

## Input

- `legacyId` (`ID!`) — required
- `type` (`LegacyIdType!`) — required

## Returns [ID!](/braintree/graphql/reference/types/id)

A non-blank unique identifier.

## Examples

### Id from legacy id

Get a GraphQL ID from a legacy ID that was returned from an SDK or a legacyId field. Does not verify existence except for payment methods.

```graphql
query idFromLegacyId($legacyId: ID!, $type: LegacyIdType!) {
  idFromLegacyId(legacyId: $legacyId, type: $type)
}
```

---

[View the complete GraphQL schema on GitHub](https://raw.githubusercontent.com/braintree/graphql-api/refs/heads/master/schema.graphql)