> ## Documentation Index
> Fetch the complete documentation index at: https://developer.uphold.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get metadata

> Retrieve metadata for a given entity.

**Get metadata** retrieves the custom metadata associated with a given entity.

The response includes an `ETag` header representing the current version of the metadata. You can use this value with the `If-None-Match` header in subsequent requests to efficiently check if the metadata has changed—if it hasn't, the server returns `304 Not Modified` without the response body, saving bandwidth.

> [!NOTE]
>
> Returns `404 Not Found` if no metadata exists for the entity. Create metadata using the [Set metadata](https://developer.uphold.com/rest-apis/on-off-ramp-api/metadata/set-metadata.md) endpoint.


## OpenAPI

````yaml _media/specs/on-off-ramp-openapi.mintlify.json get /on-off-ramp/{entity}/{entityId}/metadata
openapi: 3.1.0
info:
  version: 0.1.0
  title: On & Off Ramp API
  description: >-
    The On & Off Ramp API offers a set of endpoints to move value between fiat
    and crypto through a single atomic order per direction: on-ramp or off-ramp.
  contact:
    name: Uphold API Team
    email: developer@uphold.com
    url: https://developer.uphold.com
servers:
  - url: https://api.enterprise.sandbox.uphold.com
    description: Sandbox
  - url: https://api.enterprise.uphold.com
    description: Production
security:
  - OAuth2: []
tags:
  - name: Orders
    description: On & Off Ramp orders.
  - name: Metadata
    description: Metadata.
  - name: Rails
    description: On & Off Ramp rails.
paths:
  /on-off-ramp/{entity}/{entityId}/metadata:
    get:
      tags:
        - Metadata
      summary: Get metadata
      description: Retrieve metadata for a given entity.
      operationId: on-off-ramp.get-metadata
      parameters:
        - $ref: '#/components/parameters/metadata-entity'
        - $ref: '#/components/parameters/metadata-entity-id'
        - $ref: '#/components/parameters/metadata-if-none-match'
      responses:
        '200':
          $ref: '#/components/responses/get-metadata-response'
        '304':
          $ref: '#/components/responses/get-metadata-not-modified-response'
        '404':
          $ref: '#/components/responses/metadata-not-found'
components:
  parameters:
    metadata-entity:
      name: entity
      description: The type of entity whose metadata is being accessed.
      in: path
      required: true
      schema:
        type: string
        enum:
          - orders
      examples:
        Order Entity:
          value: orders
    metadata-entity-id:
      name: entityId
      description: The unique identifier of the entity whose metadata is being accessed.
      in: path
      required: true
      schema:
        type: string
      examples:
        Order ID:
          value: 623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0
    metadata-if-none-match:
      name: If-None-Match
      description: >-
        Retrieves the entity metadata only if it does not match the given
        revision.
      in: header
      style: simple
      explode: false
      schema:
        type: string
        pattern: ^(?:W\/)?"([A-Fa-f0-9]{64})"$
      examples:
        Metadata Revision:
          value: '"b59c6960e8c802ec287f3892b398b7b58eb4790640414f2c2b048ff22f873d72"'
  responses:
    get-metadata-response:
      description: Metadata retrieved.
      headers:
        ETag:
          $ref: '#/components/headers/metadata-etag'
        x-uphold-request-id:
          description: >-
            A unique identifier for the request that can be shared with Uphold
            for troubleshooting purposes.
          required: true
          schema:
            type: string
          examples:
            Request ID:
              value: a4e390583b3ac581-MRS
      content:
        application/json:
          schema:
            type: object
            properties:
              metadata:
                $ref: '#/components/schemas/metadata'
            required:
              - metadata
          examples:
            Metadata Retrieved:
              value:
                metadata:
                  externalId: 123
    get-metadata-not-modified-response:
      description: Metadata not modified.
      headers:
        ETag:
          $ref: '#/components/headers/metadata-etag'
        x-uphold-request-id:
          description: >-
            A unique identifier for the request that can be shared with Uphold
            for troubleshooting purposes.
          required: true
          schema:
            type: string
          examples:
            Request ID:
              value: a4e390583b3ac581-MRS
    metadata-not-found:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Metadata Not Found:
              value:
                code: entity_not_found
                message: The entity metadata cannot be found
                details:
                  entity: metadata
            Entity Not Found:
              value:
                code: entity_not_found
                message: The <entity> cannot be found
                details:
                  entity: <entity>
      headers:
        x-uphold-request-id:
          description: >-
            A unique identifier for the request that can be shared with Uphold
            for troubleshooting purposes.
          required: true
          schema:
            type: string
          examples:
            Request ID:
              value: a4e390583b3ac581-MRS
  headers:
    metadata-etag:
      description: The entity metadata revision.
      schema:
        type: string
        pattern: ^"[A-Fa-f0-9]{64}"$
      examples:
        ETag:
          value: '"9ff2666faa58fabfc282eb90016e7182fe785d37dcdb861c6469cccaec13c876"'
  schemas:
    metadata:
      type: object
      additionalProperties: true
      minProperties: 1
    error:
      description: The error information.
      allOf:
        - $ref: '#/components/schemas/feedback'
    feedback:
      description: A feedback message with a code and human-readable description.
      type: object
      properties:
        code:
          description: A short string with a brief explanation about the code reported.
          type: string
        message:
          description: A human-readable message providing more details.
          type: string
        details:
          description: Additional information about the feedback reported.
          type: object
          additionalProperties: true
      required:
        - code
        - message
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth 2.0 authentication
      flows:
        clientCredentials:
          tokenUrl: /core/oauth2/token
          scopes:
            on-off-ramp.orders:create: Grants access to create orders.
            on-off-ramp.orders:read: Grants access to view orders.
            on-off-ramp.orders.metadata:read: Grants access to view orders metadata.
            on-off-ramp.orders.metadata:write: Grants access to modify orders metadata.
            on-off-ramp.orders.quotes:create: Grants access to create order quotes.

````