> For the complete documentation index, see [llms.txt](https://apidocs.gsped.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.gsped.com/gsped-api-english-version/spedizioni-e-dintorni/shipment/corrieri/fedex.md).

# FedEx

## Courier field limitations

| Field               | Limitation  |
| ------------------- | ----------- |
| ddt\_alpha          | Max 40 char |
| rcpt\_addr          | Max 35 char |
| rcpt\_cap           | Max 10 char |
| rcpt\_city          | Max 30 char |
| rcpt\_country\_code | Max 2 char  |
| rcpt\_name          | Max 35 char |
| rcpt\_prov          | Max 2 char  |

## Gsped code list

<table data-full-width="true"><thead><tr><th>Service</th><th data-type="number">Courier code</th><th data-type="number">Service code</th><th>addParcel (pasgo)</th><th>Notes</th></tr></thead><tbody><tr><td>Priority Overnight</td><td>20</td><td>0</td><td>true</td><td>Domestic</td></tr><tr><td>First</td><td>20</td><td>1</td><td>true</td><td>Domestic</td></tr><tr><td>Priority Express</td><td>20</td><td>2</td><td>true</td><td>Domestic</td></tr><tr><td>Priority</td><td>20</td><td>3</td><td>true</td><td>Domestic</td></tr><tr><td>Priority Express Freight</td><td>20</td><td>4</td><td>true</td><td>Domestic</td></tr><tr><td>Priority Freight</td><td>20</td><td>5</td><td>true</td><td>Domestic</td></tr><tr><td>International Priority Express</td><td>20</td><td>6</td><td>true</td><td>International</td></tr><tr><td>International Priority Freight</td><td>20</td><td>7</td><td>false</td><td>International</td></tr><tr><td>International Priority</td><td>20</td><td>8</td><td>true</td><td>International</td></tr><tr><td>International Connect Plus</td><td>20</td><td>9</td><td>true</td><td>International</td></tr><tr><td>International Economy</td><td>20</td><td>10</td><td>true</td><td>International</td></tr><tr><td>International Economy Freight</td><td>20</td><td>11</td><td>false</td><td>International</td></tr><tr><td>International First</td><td>20</td><td>12</td><td>false</td><td>International</td></tr><tr><td>Regional Economy</td><td>20</td><td>16</td><td>true</td><td>International</td></tr><tr><td>Regional Economy Freight</td><td>20</td><td>17</td><td>true</td><td>International</td></tr><tr><td>International Deferred Freight</td><td>20</td><td>19</td><td>false</td><td>international</td></tr></tbody></table>

## ICS2

For non-domestic shipments the courier requires the following to be set:

* [dettagli\_ordine](https://apidocs.gsped.com/gsped-api-english-version/spedizioni-e-dintorni/shipment/shipment-objects/dettagli_ordine)
* Optional: invoice\_number

## [Trade documents](https://apidocs.gsped.com/gsped-api-english-version/spedizioni-e-dintorni/shipment/shipment-objects/trade_documents)

**Available in calls: POST and PATCH**

```json
"trade_documents":[
    {
        "nome":"COMMERCIAL_INVOICE_TESTRIF1234_1.pdf",
        "contenuto":""
    }
]
```

## Export Compliance Statement

This field lets you enter an AES number/statement, allowing the user to confirm shipments from the US abroad with a customs value above 2500 dollars.

```json
"fedexrest": {
        "exportComplianceStatement": "AES X20240115123456"
}
```

### Shipment to a residential area

You can tell FedEx that you are shipping to a residential address

```json
"rcpt_residential" : 1
```

### Recipient identifier for customs

Field used to pass FedEx a sender identifier for customs shipments

```json
"fedexrest": {
    "recipientCustomsId": {
            "type": "PASSPORT",
            "value": 12345678
        }
    }
```

The possible type values and their corresponding value are the following:

| type       | value                       |
| ---------- | --------------------------- |
| PASSPORT   | Recipient's passport number |
| INDIVIDUAL | Recipient's tax code        |
| COMPANY    | Recipient's VAT number      |

### Forcing tins for the shipper

```json
"fedexrest": {
    "shipper": {
        "tins": {
            "tinType": "BUSINESS_UNION",
            "number": "IT12345678901"
        }
    }
}
```

Possible values for tinType:

* BUSINESS\_NATIONAL
* BUSINESS\_STATE
* BUSINESS\_UNION
* PERSONAL\_NATIONAL
* PERSONAL\_STATE

{% hint style="warning" %}
**WARNING!**

This parameter overrides any EORI configured for the sender
{% endhint %}

### Forcing rateRequestType

```json
"fedexrest": {
    "rateRequestType": "ACCOUNT"
}
```

Possible values:

* LIST
* INCENTIVE
* ACCOUNT
* PREFERRED
* RETAIL

Default: ACCOUNT

### dangerousGoods details

```json
"fedexrest": {
    "dangerousGoodsDetail": {
        "accessibility": "ACCESSIBLE",
        "cargoAircraftOnly": true
    }
}
```

Possible values:

| field             | values                  |
| ----------------- | ----------------------- |
| accessibility     | ACCESSIBLE/INACCESSIBLE |
| cargoAircraftOnly | true/false              |

## Document handling

For some destinations you must attach customs documents to the shipment.

#### Uploading electronic documents when creating the shipment

The preferred solution, whenever possible, is to add the trade\_documents section to the shipment POST

#### Uploading electronic documents later

If you want to attach the electronic documents later, you can do so by adding the following parameter in the Shipment POST.

See the dedicated page here:

{% content-ref url="<https://apidocs.gsped.com/gsped-api-english-version/spedizioni-e-dintorni/shipment/shipment-objects/courierdata/uploaddocafterwards>" %}
<https://apidocs.gsped.com/gsped-api-english-version/spedizioni-e-dintorni/shipment/shipment-objects/courierdata/uploaddocafterwards>
{% endcontent-ref %}

With this parameter, if ETDs are required the shipment is created anyway, but you absolutely must upload the documents through the shipment PATCH. Without uploading the documents, the goods may be held at customs.

{% hint style="danger" %}
Old deprecated method:

```
"fedexrest": {
        "willUploadDocAfterShipment": true
}
```

{% endhint %}

#### Adding documents in paper format

Not recommended, but if unavoidable contact support to enable the feature.

{% hint style="danger" %}
**Warning!!!**

With ***pasgo*** mode active, uploading the document later ( ***uploadDocAfterWards*** ) is implicit, so it is **ALWAYS** the client's responsibility to upload the electronic documents for the destinations that require them **BEFORE** confirming the shipment.
{% endhint %}
