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

# Get Resolved Package

> Get a package with all dependencies resolved and ready for execution

The resolved package endpoint returns the complete package with all compiled components, assets, and resolved dependencies in a format ready for runtime execution. This is the format used by client SDKs to render content.

## Path Parameters

<ParamField path="organizationId" type="string" required>
  Organization ID
</ParamField>

<ParamField path="projectId" type="string" required>
  Project ID
</ParamField>

<ParamField path="version" type="string" required>
  Package version (e.g., `1.0.0`)
</ParamField>

## Query Parameters

<ParamField query="includeDependencies" type="boolean" default="false">
  Set to `true` to include resolved dependencies in the response
</ParamField>

## Response

<ResponseField name="data" type="object">
  Resolved package

  <Expandable title="data properties">
    <ResponseField name="id" type="string">
      Package ID
    </ResponseField>

    <ResponseField name="version" type="string">
      Package version
    </ResponseField>

    <ResponseField name="components" type="object">
      Map of component names to compiled JavaScript code
    </ResponseField>

    <ResponseField name="assets" type="object">
      Map of component names to their asset arrays
    </ResponseField>

    <ResponseField name="dependencies" type="object">
      Map of dependency identifiers to their resolved content (only present if `includeDependencies=true`)
    </ResponseField>
  </Expandable>
</ResponseField>

### Example Response

```json theme={null}
{
  "data": {
    "id": "pkg123",
    "version": "1.0.0",
    "components": {
      "ProductCard": "const body = (props, children) => { return VStack([...]); }",
      "ArticleLayout": "const body = (props, children) => { return VStack([Header(props), ...children]); }",
      "Button": "const body = (props, children) => { return Button(props.label); }"
    },
    "assets": {
      "ProductCard": [
        { "name": "logo-primary", "url": "https://cdn.metabind.ai/assets/logo-2x.png" }
      ],
      "ArticleLayout": [
        { "name": "hero-background", "url": "https://cdn.metabind.ai/assets/hero-image.jpg" }
      ]
    },
    "dependencies": {
      "proj456@2.0.0": {
        "components": {
          "Button": "const body = (props, children) => { ... }",
          "Card": "const body = (props, children) => { ... }"
        },
        "assets": {
          "Button": [
            { "name": "default-icon", "url": "https://cdn.metabind.ai/assets/default-icon.svg" }
          ]
        }
      }
    }
  }
}
```

## Dependency Resolution

The package's direct dependencies are resolved into the `dependencies` object. Each dependency is keyed by `{projectId}@{version}`.

```mermaid theme={null}
graph TD
    A[Package 1.0.0] --> B[proj456@2.0.0]
    A --> C[design-system@3.0.0]
    B --> D[core@1.0.0]
    C --> D
```

Only direct dependencies are included. Dependencies of a dependency (such as `core@1.0.0` above) are not resolved.

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/packages/1.0.0/resolved" \
    -H "Authorization: Bearer YOUR_JWT"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/packages/1.0.0/resolved',
    {
      headers: {
        'Authorization': 'Bearer YOUR_JWT'
      }
    }
  );

  const { data: resolved } = await response.json();

  // Access main package components
  const components = Object.keys(resolved.components);
  console.log(`Package has ${components.length} components`);

  // Access dependencies
  const deps = Object.keys(resolved.dependencies || {});
  console.log(`Package has ${deps.length} dependencies`);
  ```
</CodeGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.