---
title: "Create a Request to Fetch Metadata"
method: POST
path: "/construction/preprocess"
tags: ["Construction"]
---

# Create a Request to Fetch Metadata

`POST /construction/preprocess`

Preprocess is called prior to `/construction/payloads` to construct a
request for any metadata that is needed for transaction construction
given (i.e. account nonce).

The `options` object returned from this endpoint will be sent to the `/construction/metadata`
endpoint UNMODIFIED by the caller (in an offline execution environment). If
your Construction API implementation has configuration options, they MUST
be specified in the `/construction/preprocess` request (in the `metadata`
field).

## Request body

- ConstructionPreprocessRequest — ConstructionPreprocessRequest is passed to the `/construction/preprocess` endpoint so that a Rosetta implementation can determine which metadata it needs to request for construction. Metadata provided in this object should NEVER be a product of live data (i.e. the caller must follow some network-specific data fetching strategy outside of the Construction API to populate required Metadata). If live data is required for construction, it MUST be fetched in the call to `/construction/metadata`.
  - `network_identifier` NetworkIdentifier, required — unresolved $ref
  - `operations` Operation[], required — unresolved $ref
  - `metadata` object

## Response `200`

Expected response to a valid request

- ConstructionPreprocessResponse — ConstructionPreprocessResponse contains `options` that will be sent unmodified to `/construction/metadata`. If it is not necessary to make a request to `/construction/metadata`, `options` should be omitted. Some blockchains require the PublicKey of particular AccountIdentifiers to construct a valid transaction. To fetch these PublicKeys, populate `required_public_keys` with the AccountIdentifiers associated with the desired PublicKeys. If it is not necessary to retrieve any PublicKeys for construction, `required_public_keys` should be omitted.
  - `options` object — The options that will be sent directly to `/construction/metadata` by the caller.
  - `required_public_keys` AccountIdentifier[] — unresolved $ref

## Other responses

- `500` — unexpected error

## Changes

> 50 revisions in range; 1 could not be searched.

- **2022-08-28** `04be5c6ee14c` — 2 warning
  - removed the request property `max_fee`
  - removed the request property `suggested_fee_multiplier`
- **2020-09-01** `c77ff4384412` — 1 warning, 1 info
  - removed the optional property `public_keys` from the response with the `200` status
  - added the optional property `required_public_keys` to the response with the `200` status
- **2020-08-31** `7d9d8566ba65` — 1 info
  - added the optional property `public_keys` to the response with the `200` status
- **2020-08-21** `4037360db911` — 2 info
  - added the new optional request property `max_fee`
  - added the new optional request property `suggested_fee_multiplier`
- **2020-08-21** `cbaf3fa1475f` — 2 warning
  - removed the request property `max_fee`
  - removed the request property `suggested_fee_multiplier`

[Full history](https://skmtc.dev/coinbase/apis/rosetta/changes/construction/preprocess/post.md)

---

[API](https://skmtc.dev/coinbase/apis/rosetta.md) · [All operations](https://skmtc.dev/coinbase/apis/rosetta/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/coinbase/rosetta/revisions/758497aacc08/schema)
