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

# Export Documents

> Global-e posts the required shipping documents of an order to the merchant's site once they are ready.

## EAD — Export From Germany

An EAD (Export Accompanying Document) is required by German Customs for orders with a customs declarative value above 1,000 EURO shipped from Germany to a country outside the European Union.

Global-e can provide this document to Merchants who are doing the shipping themselves.

This functionality is not yet supported for Merchants who are using Global-e for shipping.

When an order is created, Global-e flags any additional shipping documents required for merchants that are shipping the order themselves in `AdditionalRequiredDocuments` on the [SendOrderToMerchant (Global-e to Merchant)](/api-reference/send-order-to-merchant) notification. In that case, the merchant should delay the fulfillment until the documents are ready and provided to the merchant in the [SendAdditionalRequiredDocumentsToMerchant](/api-reference/send-additional-required-documents-to-merchant) webhook.

The `SendAdditionalRequiredDocumentsToMerchant` (Global-e to Merchant) notification posts the required shipping documents of the order to the Merchant's site. This notification informs the Merchant that the documents previously listed in the `SendOrderToMerchant` notification (under `AdditionalRequiredDocuments`), initiated by calling `CreateAdditionalRequiredDocuments`, are ready. The document's content is included in this notification.

<Note>
  These APIs are part of Global-e's extensions and plug-ins. Merchants do not need to implement them unless a custom integration is required.
</Note>

## Procedure for receiving an EAD

1. When an order is created, Global-e sends an indication that an EAD is required in the [SendOrderToMerchant (Global-e to Merchant)](/api-reference/send-order-to-merchant) notification (see the `AdditionalRequiredDocuments` section). Do not start fulfilment until the document is ready.
2. Global-e notifies you when the EAD is ready by sending the [SendAdditionalRequiredDocumentsToMerchant (Global-e to Merchant)](/api-reference/send-additional-required-documents-to-merchant) endpoint and including the document itself (base64 encoded) in the notification. Upon receiving this notification, you can do the fulfilment with this document included in the order shipping documents.

## Reference

<div className="api-ref-card">
  <Card title="Send Order To Merchant — full request & response" icon="code" href="/api-reference/send-order-to-merchant">
    Parameters, schema, examples for `POST` (merchant-hosted) `/order-update-create-url`.
  </Card>
</div>

<div className="api-ref-card">
  <Card title="Send Additional Required Documents To Merchant — full request & response" icon="code" href="/api-reference/send-additional-required-documents-to-merchant">
    Parameters, schema, examples for `POST` (merchant-hosted) `/send-additional-required-documents-url`.
  </Card>
</div>

## Use Cases

### EAD indication on the order (SendOrderToMerchant)

The EAD indication is carried in the `AdditionalRequiredDocuments` array of the order payload (`DocumentTypeCode` `11` = EAD):

```json theme={null}
"AdditionalRequiredDocuments": [
  {
    "DocumentTypeCode": "11",
    "DocumentTypeName": "EAD"
  }
]
```

### Send additional required documents (SendAdditionalRequiredDocumentsToMerchant)

Global-e posts the ready document(s) to the merchant-hosted endpoint. The document file content is base64 encoded in `DocumentData`; `DocumentTypeCode` `11` denotes an EAD.

```json theme={null}
{
    "OrderId": "Sample order id",
    "MerchantOrderId": "Sample order id from the merchant's system",
    "CountryCode": "US",
    "AdditionalRequiredDocuments": [
        {
            "TrackingNumber": "98789723874839",
            "DocumentData": "base 64 string",
            "URL": "URL do download document",
            "DocumentTypeCode": "11",
            "DocumentTypeName": "EAD",
            "DocumentExtension": "pdf",
            "DocumentReference": "24DE85123822923B8",
            "CreationDateTime": "2024-01-30T10:55:21"
        }
    ]
}
```

<Note>
  Some values are encoded and require the merchant to decode them, for example URLs, addresses, emails, and phone numbers.
</Note>

## Document type codes

`DocumentTypeCode` can be one of the following values:

| Document type                | Code |
| ---------------------------- | ---- |
| CommercialInvoice            | 1    |
| PackingList                  | 2    |
| ShipperManifest              | 3    |
| Label                        | 4    |
| VATInvoice                   | 5    |
| DangerousGoodDeclarationLink | 6    |
| GELabel                      | 7    |
| CustomerReceiptInvoice       | 8    |
| ArchibeLabel                 | 9    |
| DeliveryAdvice               | 10   |
| EAD                          | 11   |
