**Source URL:** https://general.veevavault.dev/vault-api/api-reference/26.1/configuration-migration/retrieve-outbound-package-dependencies.md

# Retrieve Outbound Package Dependencies



Outbound packages only include configuration details for the included components. Sometimes, a configuration for one component depends on another component which you may not have explicitly specified.

With this API, you can retrieve all outstanding component dependencies for an outbound package. You can then add these missing dependencies to the package with the [Create Object Records API](/vault-api/api-reference/26.1/vault-objects/create-upsert-object-records).

<Endpoint path="/api/{version}/vobjects/outbound_package__v/{package_id}/dependencies" method="GET"></Endpoint>

## Headers {#headers}

<FieldTable>
| Name | Description |
| --- | --- |
| `Accept` | `application/json` (default) or `application/xml` |
</FieldTable>

## URI Path Parameters {#uri-path-parameters}

<FieldTable>
| Name | Description |
| --- | --- |
| `{package_id}` | The ID of the `outbound_package__v` record from which to retrieve dependencies. |
</FieldTable>

## Request: Retrieve Dependencies {#request-retrieve-dependencies}

<CodeExample title="">
```
curl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v22.2/vobjects/outbound_package__v/0PO000000001001/dependencies

```
</CodeExample>

## Response: Retrieve Dependencies {#response-retrieve-dependencies}

<CodeExample title="">
```
{
  "responseStatus": "SUCCESS",
   "responseDetails": {
       "total_dependencies": 1,
       "target_vault_id": 1000486,
       "package_name": "PKG-0001",
       "package_id": "0PO000000001001",
       "package_summary": "Outbound Package",
       "package_description": "Package for deployment",
       "url": "https://myvault.veevavault.com/api/v22.2/vobjects/package_component__v"
   },
   "package_dependencies": [
       {
           "id": "0CD000000000M70",
           "name__v": "Product Label",
           "component_name__v": "product_label__c",
           "component_type__v": "Object",
           "referenced_component_name": "product__v",
           "referenced_component_type": "Object"
        }
    ]
}

```
</CodeExample>

## Request: Add Dependencies {#request-add-dependencies}

<CodeExample title="">
```
curl -X POST -H "Authorization: {SESSION_ID}" \
--data-raw '[
   {
       "outbound_package__v": "0PO000000001001",
       "vault_component__v": "0CD000000002810"
   }
]' \
https://myvault.veevavault.com/api/v22.2/vobjects/package_component__v

```
</CodeExample>

## Response: Add Dependencies {#response-add-dependencies}

<CodeExample title="">
```
{
    "responseStatus": "SUCCESS",
    "data": [
        {
            "responseStatus": "SUCCESS",
            "data": {
                "id": "0PO000000001001",
                "url": "api/v26.1/vobjects/package_component__v/0PO000000001001",
                "event": "created__sys"
            }
        }
    ]
}

```
</CodeExample>

## Response Details {#response-details}

On `SUCCESS`, the response includes the following information:

<FieldTable>
| Name | Description |
| --- | --- |
| `total_dependencies` | The total number of outstanding component dependencies. |
| `target_vault_id` | The ID of the target Vault for the outbound package. |
| `package_name` | The `name__v` value of the outbound package. |
| `package_id` | The ID of the `outbound_package__v` record with these outstanding dependencies. |
| `url` | The Vault API request to add missing dependencies to this outbound package. Learn more about [adding dependencies](/vault-api/api-reference/26.1/configuration-migration/component-definition-query). |
| `package_dependencies` | This array contains information about each of the `total_dependencies`. If there are no outstanding dependencies, this array is not returned. |
</FieldTable>

#### Adding Dependencies {#adding-dependencies}

From the `url` in the response, you can add missing dependencies using the [Create Object Records API](/vault-api/api-reference/26.1/vault-objects/create-upsert-object-records) with the following body parameters:

<FieldTable>
| Name | Description |
| --- | --- |
| `outbound_package__v` | The ID of the `outbound_package__v` record with these outstanding dependencies. In the retrieve dependencies response body, this is the `package_id` value. |
| `vault_component__v` | The ID of the component to add. This is the value returned for the dependency in the array. In the retrieve dependencies response body, this is the `id` value of the component within the `package_dependencies` array. |
</FieldTable>

---

**Previous:** [Retrieve Package Deploy Results](/vault-api/api-reference/26.1/configuration-migration/retrieve-package-deploy-results)  
**Next:** [Component Definition Query](/vault-api/api-reference/26.1/configuration-migration/component-definition-query)