> For the complete documentation index, see [llms.txt](https://docs.fulfillmenttools.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fulfillmenttools.com/documentation/by-pillar/advanced-order-routing/complex-routing-with-combinatorics/network-model/facility-connection.md).

# Facility connection

{% hint style="info" %}
If you would like to use these functionalities, [contact our Support team](https://ocfulfillment.atlassian.net/servicedesk/customer/portal/1) for more information.
{% endhint %}

For each facility, you can define a facility connection that specifies which other facilities in the network it can supply, and whether it can supply a consumer directly. Details for each facility connection can include the carrier used for transportation, available packaging units (and their dimensions), transport times, and associated costs. Fallback times and costs are considered if no specific packaging units are defined.

## Target

The `target` object allows restricting the connection's destination. For example, a connection can be defined for only one specific managed facility or to all managed facilities except for explicitly defined exceptions.

## Type

The `type` of the facility connection defines which receiver category a facility can supply to. This can be either `SUPPLIER`, `MANAGED_FACILITY`, or `CUSTOMER` (consumer).

## Context

The `context` defines specifications for a facility connection depending on the selected context type:

* `FACILITY`:
  * Define the exact facility ID(s) to which the supplying facility is connected, or exclude specific facilities.
* `FACILITY_GROUP`:
  * Define the [facility groups](/documentation/getting-started/facilities/facility-groups.md) to which the supplying facility is connected, or exclude specific facility groups.
* `CATEGORY`:
  * Define a specific [category](/documentation/by-pillar/global-inventory-hub/categories.md) for which this facility connection can be used.
  * Example: The facility connection can only be used for shipping items in the dangerous goods category.
* `TAG_REFERENCE`
  * Define whether this connection can only be used in case the request/order has a defined tag.
* `TARGET_POSTALCODE`
  * Define the postal code(s) of the final recipient for which this connection can be used, or exclude specific postal codes.
  * Example: A connection that must not be used for island postal codes.
* `TARGET_COUNTRY`
  * Define the country or countries of the final recipient for which this connection can be used, or exclude specific countries.

{% hint style="info" %}
Contexts define which connections each request can use. A connection without context can be used by all requests (in routing).

The `NOT` operator lets users exclude certain cases (for example, facility groups) from a connection.
{% endhint %}

`TARGET_POSTALCODE` and `TARGET_COUNTRY` refer to the address of the final recipient, which can be a consumer or an ordering facility. The same two context types are also available one level deeper within `packagingUnitsByContexts` and on surcharges, where they scope packaging units and surcharges rather than the connection as a whole.

## Carrier key

The carrier key (or reference) defines which carrier represents the connection. If carriers are connected to fulfillmenttools, you can reference the corresponding `carrierKey` here as well.

## Fallback costs and times

If no shipping cost or transit time information for packaging units is defined for a connection, the fallback costs and/or times will be taken into account for a cost and time calculation during routing.

In case there are packaging unit specific prices and transit times defined, the fallback costs and times will be taken into account in case none of the available packaging units can be used for the requested items.

## Cutoff times

The cutoff time defines the time point when parcels are usually picked up at a location. This time point can vary depending on the weekday as well as on public holidays.

For example, DHL picks up parcels at the store in New York at 17:00 Monday-Friday, 15:00 on Saturday, and not at all on Sundays. Although 1 January falls on a Thursday, no pickup will be available on this date because it's a holiday.

You can set cutoff times in [Backoffice](#backoffice) or via [API](#api).

### Backoffice

In the **Network** view, go to **Facilities** and select the relevant facility. Then, select **Carrier** from the menu. Click the more icon and select **Edit cutoff times**.

<div data-with-frame="true"><figure><img src="https://4170739437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrrr5jgTsDuR38gNJIrm%2Fuploads%2FXSHKLGlwOftbEvSokVGw%2FEdit%20cutoff%20times%20menu.png?alt=media&amp;token=8ac0b381-7f4a-468f-80dd-3d4eb0e5bb0e" alt="" width="375"><figcaption></figcaption></figure></div>

This will open the modal where you can set cutoff times and capacity levels.

<div data-with-frame="true"><figure><img src="https://4170739437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrrr5jgTsDuR38gNJIrm%2Fuploads%2F3hC136QHjCcalt64AsW0%2FSet%20cutoff%20and%20capcity%20data.png?alt=media&amp;token=82c065ce-54fc-4e23-8bcf-a66a05475f8f" alt="" width="375"><figcaption></figcaption></figure></div>

### API

In the [facility connection endpoint](#post-api-facilities-facilityid-connections), you can add the cutoff times and capacity.

```json
{
...
  "cutoffTimes": {
    "overwrites": [
      {
        "cutoffConfigurations": [
          {
            "capacity": 0,
            "time": "12:00"
          }
        ],
        "date": "2026-06-05"
      }
    ],
    "weekdays": [
      {
        "cutoffConfigurations": [
          {
            "capacity": 0,
            "time": "12:00"
          }
        ],
        "day": "MONDAY"
      }
    ]
  },
...  
}
```

For external suppliers, the actual handover time to the carrier is usually unknown. However, the cutoff times should still be set to enable a correct [delivery time calculation](/documentation/by-pillar/advanced-order-routing/complex-routing-with-combinatorics/calculations-within-routing/delivery-time-calculation.md). In this case, the cutoff time is the latest time an order must be placed to guarantee delivery within the defined transit days.

For example:

* Transit time for the facility connection "Supplier 1 to Store New York" is 1 day.
* Cutoff time for this facility connection is Monday-Friday 16:00.
  * If the order is placed at 14:00 on Tuesday, the items will arrive in New York on Wednesday.
  * If the order is placed at 17:00 on Tuesday, the items will arrive in New York on Thursday.

## Non-delivery days

Non-delivery days are days when carriers don't operate. To store this information in fulfillmenttools, it's possible to set up non-delivery-days in the respective carrier configurations. The stored information is then taken into account when calculating delivery times and possible delivery days.

Non-delivery days can be either specific calendar dates (1 January) or a day of the week (Sunday). While days are always recurring (`recurringNonDeliveryWeekdays`), a specific calendar date can be set up as `RECURRING` or `SINGLE` by using the `nonDeliveryType.`

Non-delivery days refer to the transit days (from the day after pickup to the delivery day). There are differences depending on the carrier. While carrier X delivers only Monday to Friday, carrier Y also operates on Saturdays. In addition, deliveries are usually not made on public holidays. Public holidays again vary from country to country and province to province.

## Packaging units

Packaging units define the parcel or pallet sizes available for a specific facility connection.

For example, when shipping items from "Store New York" to the consumer via DHL, parcel sizes S, M, and L can be used.

By using the `context` within `packagingUnitsByContexts`, different packaging units with different prices and transit times can be defined depending on the following factors:

* `TARGET_POSTALCODE`/`TARGET_COUNTRY`
  * Prices and transit times might differ depending on where the parcel is shipped. Parcel sizes might differ between domestic and international destinations.
* `CATEGORY`
  * Define a specific [category](/documentation/by-pillar/global-inventory-hub/categories.md) for which this packaging unit can be used.
  * For example, there might be special parcels for items in the "dangerous goods" category.

See the [transport calculation cost logic article](/documentation/by-pillar/advanced-order-routing/complex-routing-with-combinatorics/calculations-within-routing/transport-cost-calculation-logic.md) for more information on packaging units.

## Shipment-based pricing

By default, the base price of a transfer is resolved per packaging unit. Some carriers price a shipment as a whole: the items are packed first, and the aggregated weight or volumetric weight of all packaging units then determines a single base price for the entire transfer.

For these tariffs, a price matrix can be configured on the connection itself in `pricingPerTransfer`. It's structured like the packaging unit price matrix: prices by zone, price rows by upper threshold, and an overflow factor.

* The base price is resolved once per transfer, against the aggregated quantity of all packaging units of that transfer.
* If `pricingPerTransfer` is configured, the prices configured on the packaging units of that transfer are ignored. The two aren't added up.
* Transfers whose connection has no `pricingPerTransfer` continue to resolve prices per packaging unit.
* Surcharges are unaffected by where the base price comes from. Surcharges configured on the packaging unit and on the connection are both applied, each at its own level.

`pricingPerTransfer` carries its own `pricingBasis`, `weightBasis`, `volumetricWeightFactor`, `maxVolumetricWeight`, and `volumeBufferInPercent`, which apply to the aggregated shipment. For how these values determine the chargeable quantity, see the [Transport cost calculation logic article.](/documentation/by-pillar/advanced-order-routing/complex-routing-with-combinatorics/calculations-within-routing/transport-cost-calculation-logic.md)

For example, one transfer contains three packaging units of 4.2 kg, 6.8 kg, and 3.1 kg. The connection price matrix resolves 14.1 kg against zone `IT-20` and yields one base price of €24.40 for the transfer. Per-packaging-unit surcharges still apply three times, transfer surcharges apply once.

## Surcharges per transfer

Surcharges that a carrier charges once per shipment rather than per package, for example, a cash on delivery fee or a fuel surcharge on the whole shipment, are configured in `surchargesPerTransfer` on the connection.

Absolute, relative, and threshold surcharges are supported, each with the same structure as on packaging unit level. They are applied once per transfer, after the packaging units of the transfer have been summed up. A relative surcharge on transfer level can be calculated against amounts charged on packaging unit level.

See the [Transport cost calculation logic article](/documentation/by-pillar/advanced-order-routing/complex-routing-with-combinatorics/calculations-within-routing/transport-cost-calculation-logic.md) for the surcharge types, their application order, and the calculation scope.

## Shipment restrictions

Shipment restrictions define what a connection can physically handle. A connection that can't handle a shipment can be excluded from the routing decision through the [successful packing fence](/documentation/by-pillar/advanced-order-routing/complex-routing-with-combinatorics/fences.md#successful-packing).

Restrictions that apply to the shipment as a whole are configured in `generalShipmentRestrictions`. Each entry consists of a `restrictionType` and a `value`:

| Restriction type                   | Definition                                                               |
| ---------------------------------- | ------------------------------------------------------------------------ |
| `MAX_WEIGHT_PER_SHIPMENT`          | Maximum total weight of all packaging units of the shipment              |
| `MAX_LOADING_METERS_PER_SHIPMENT`  | Maximum loading meters the shipment may occupy                           |
| `MAX_PACKAGING_UNITS_PER_SHIPMENT` | Maximum number of packaging units in the shipment                        |
| `MIN_PACKAGING_UNITS_PER_SHIPMENT` | Minimum number of packaging units required for the connection to be used |
| `MAX_WEIGHT_PER_LOADING_METER`     | Maximum weight per loading meter                                         |

Restrictions that apply to one packaging unit type are configured in `packageTypeSpecificShipmentRestrictions`. Each entry consists of a `restrictionType` of `MAX_PACKAGING_UNITS_PER_TYPE`, the `packagingUnitType` it applies to, and a `value`. Optionally, `packagingUnitRefs` narrows the restriction to specific packaging units of that type.

```json
{
  "generalShipmentRestrictions": [
    {
      "restrictionType": "MAX_WEIGHT_PER_SHIPMENT",
      "value": 24000000
    },
    {
      "restrictionType": "MAX_LOADING_METERS_PER_SHIPMENT",
      "value": 13.6
    }
  ],
  "packageTypeSpecificShipmentRestrictions": [
    {
      "restrictionType": "MAX_PACKAGING_UNITS_PER_TYPE",
      "packagingUnitType": "PALLET",
      "value": 5
    },
    {
      "restrictionType": "MAX_PACKAGING_UNITS_PER_TYPE",
      "packagingUnitType": "LONG_GOODS",
      "value": 2
    }
  ]
}
```

A connection without shipment restrictions is unrestricted.

## Transport details

The `transportDetails` object holds properties of the vehicle used on the connection. `vehicleWidthInMeters` defines the loading width and is used to convert the floor space of the packed shipment into loading meters, which the `MAX_LOADING_METERS_PER_SHIPMENT` and `MAX_WEIGHT_PER_LOADING_METER` restrictions and loading-meter-based pricing are evaluated against.

## Cases

1. A managed facility can supply another managed facility within the network (interfacility transfer)

<figure><img src="https://4170739437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrrr5jgTsDuR38gNJIrm%2Fuploads%2Fd2WE8BESzurgFch41eyV%2FManaged%20facility%20to%20managed%20facility.png?alt=media&amp;token=e9a5dd0d-d9a9-4ca5-a316-b79363e2eb0b" alt="" width="375"><figcaption></figcaption></figure>

2. A managed facility can supply the consumer directly

<figure><img src="https://4170739437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrrr5jgTsDuR38gNJIrm%2Fuploads%2FOOcVqWjsSRx2h06KT8WI%2FManaged%20facility%20to%20consumer.png?alt=media&amp;token=1da8d5c5-0204-4612-ac17-178ea7711274" alt="" width="375"><figcaption></figcaption></figure>

3. A supplier can supply the consumer directly (dropshipping)

<figure><img src="https://4170739437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrrr5jgTsDuR38gNJIrm%2Fuploads%2FiN6R8rvypgwWJdEdtfg2%2FSupplier%20to%20consumer.png?alt=media&amp;token=fbc089f2-1fbd-4325-ae7b-b1dd8945c7a7" alt="" width="375"><figcaption></figcaption></figure>

4. A supplier can supply all managed facilities within the network

<figure><img src="https://4170739437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrrr5jgTsDuR38gNJIrm%2Fuploads%2FUAKQpqKQVyvPl5grKsdD%2FSupplier%20to%20facilities.png?alt=media&amp;token=5f98b6f5-d807-4991-b966-f286863071f0" alt="" width="375"><figcaption></figcaption></figure>

5. A supplier can supply all managed facilities within the network except a specific facility group or facility

<figure><img src="https://4170739437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrrr5jgTsDuR38gNJIrm%2Fuploads%2FBGoGJlPnnJ9Oog3L8H6b%2FSupplier%20to%20all%20facilities%20exception.png?alt=media&amp;token=f3de45f4-879f-4aa0-8d70-da35f0abece5" alt="" width="375"><figcaption></figcaption></figure>

6. A supplier can supply a facility group within the network

<figure><img src="https://4170739437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrrr5jgTsDuR38gNJIrm%2Fuploads%2FECgENmCTjTiOz62Bmxne%2FSupplier%20to%20facility%20group.png?alt=media&amp;token=819a74f2-2e6c-4ea3-a14d-66e801d39d13" alt="" width="375"><figcaption></figcaption></figure>

Example: Supplier XY can supply the consumer directly, all facilities in the USA facility group, and the Berlin store.

<figure><img src="https://4170739437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrrr5jgTsDuR38gNJIrm%2Fuploads%2FnItOMm8SCfr5tMznDjWS%2FSupplier%20to%20different%20options%20example.png?alt=media&amp;token=c2d7a0dc-8f36-4835-af64-6b2ec42120b3" alt="" width="375"><figcaption></figcaption></figure>

## Create facility connection

> Create a connections for a supplier facility with given ID.

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Facilities represent various locations that form part of the fulfillment network.","name":"Facilities"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"InterFacilityConnectionToSupplierForCreation":{"additionalProperties":false,"properties":{"carrierKey":{"description":"The key of the carrier that is used for this connection. References known and configured carriers in the system.","type":"string"},"carrierName":{"description":"The name of the carrier that is used for this connection.","type":"string"},"context":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionContext"},"maxItems":500,"minItems":0,"type":"array"},"customAttributes":{"additionalProperties":true,"description":"Custom attributes that can be used to store additional information about the connection.","type":"object"},"cutoffTimes":{"$ref":"#/components/schemas/CarrierCutoffTimes"},"fallbackCosts":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionDeliveryCost"},"maxItems":500,"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"generalShipmentRestrictions":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionGeneralShipmentRestriction"},"maxItems":50,"type":"array"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"maxItems":500,"type":"array"},"packageTypeSpecificShipmentRestrictions":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionPackageTypeSpecificShipmentRestriction"},"maxItems":50,"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":500,"minItems":0,"type":"array"},"pricingPerTransfer":{"$ref":"#/components/schemas/InterFacilityConnectionTransferPricing"},"surchargesPerTransfer":{"items":{"discriminator":{"mapping":{"ABSOLUTE_SURCHARGE_TYPE":"#/components/schemas/InterFacilityConnectionTransferAbsoluteSurcharge","RELATIVE_SURCHARGE_TYPE":"#/components/schemas/InterFacilityConnectionTransferRelativeSurcharge","THRESHOLD_SURCHARGE_TYPE":"#/components/schemas/InterFacilityConnectionTransferThresholdSurcharge"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/InterFacilityConnectionTransferAbsoluteSurcharge"},{"$ref":"#/components/schemas/InterFacilityConnectionTransferRelativeSurcharge"},{"$ref":"#/components/schemas/InterFacilityConnectionTransferThresholdSurcharge"}]},"maxItems":500,"type":"array"},"target":{"$ref":"#/components/schemas/InterFacilityConnectionSupplierTarget"},"transportDetails":{"$ref":"#/components/schemas/TransportDetails"},"type":{"$ref":"#/components/schemas/ConnectionType"}},"required":["target","type"],"type":"object","xml":{"name":"InterFacilityConnectionToSupplierForCreation"},"title":"InterFacilityConnectionToSupplierForCreation","description":"InterFacilityConnectionToSupplierForCreation"},"InterFacilityConnectionContext":{"additionalProperties":false,"properties":{"operator":{"$ref":"#/components/schemas/ContextOperator"},"type":{"$ref":"#/components/schemas/InterFacilityConnectionContextTypes"},"values":{"items":{"maxItems":500,"minItems":0,"type":"string"},"type":"array"}},"required":["type","values"],"type":"object","title":"InterFacilityConnectionContext","description":"InterFacilityConnectionContext"},"ContextOperator":{"description":"The operator used to define how the context values are evaluated or compared.","enum":["NOT"],"type":"string","title":"ContextOperator"},"InterFacilityConnectionContextTypes":{"enum":["FACILITY","FACILITY_GROUP","CATEGORY","TAG_REFERENCE","TARGET_POSTALCODE","TARGET_COUNTRY"],"type":"string","title":"InterFacilityConnectionContextTypes","description":"InterFacilityConnectionContextTypes"},"CarrierCutoffTimes":{"nullable":true,"properties":{"overwrites":{"items":{"$ref":"#/components/schemas/CarrierCutoffTimesOverwrite"},"type":"array"},"weekdays":{"items":{"$ref":"#/components/schemas/CarrierCutoffTimesWeekDay"},"type":"array"}},"required":["weekdays","overwrites"],"type":"object","xml":{"name":"CarrierCutoffTimes"},"title":"CarrierCutoffTimes","description":"CarrierCutoffTimes"},"CarrierCutoffTimesOverwrite":{"properties":{"cutoffConfigurations":{"items":{"$ref":"#/components/schemas/CarrierCutoffConfiguration"},"type":"array"},"date":{"format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"required":["date","cutoffConfigurations"],"type":"object","xml":{"name":"CarrierCutoffTimes"},"title":"CarrierCutoffTimesOverwrite","description":"CarrierCutoffTimesOverwrite"},"CarrierCutoffConfiguration":{"properties":{"capacity":{"type":"number"},"time":{"pattern":"^(2[0-3]|[01]?[0-9]):([0-5]?[0-9])$","type":"string"}},"required":["time"],"type":"object","xml":{"name":"CarrierCutoffTimes"},"title":"CarrierCutoffConfiguration","description":"CarrierCutoffConfiguration"},"CarrierCutoffTimesWeekDay":{"properties":{"cutoffConfigurations":{"items":{"$ref":"#/components/schemas/CarrierCutoffConfiguration"},"type":"array"},"day":{"$ref":"#/components/schemas/WeekDay"}},"required":["day","cutoffConfigurations"],"type":"object","xml":{"name":"CarrierCutoffTimesWeekDay"},"title":"CarrierCutoffTimesWeekDay","description":"CarrierCutoffTimesWeekDay"},"WeekDay":{"description":"A weekday","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"type":"string","xml":{"name":"WeekDay"},"title":"WeekDay"},"InterFacilityConnectionDeliveryCost":{"additionalProperties":false,"properties":{"currency":{"$ref":"#/components/schemas/CurrencyCode"},"decimalPlaces":{"description":"Number of decimal places for the given currency","minimum":0,"type":"integer"},"deliveryCostCoefficient":{"$ref":"#/components/schemas/DeliverCostCoefficient"},"value":{"description":"Value of operational cost of the facility. Value is configured in the smallest subunit, e.g. cents.","minimum":0,"type":"integer"}},"required":["value","currency"],"type":"object","title":"InterFacilityConnectionDeliveryCost","description":"InterFacilityConnectionDeliveryCost"},"CurrencyCode":{"description":"The currency code is a three-letter code that represents a currency in the ISO 4217 standard.","enum":["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLE","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VED","VES","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"],"type":"string","title":"CurrencyCode"},"DeliverCostCoefficient":{"additionalProperties":false,"properties":{"measurementUnit":{"$ref":"#/components/schemas/CostCoefficientMeasurementUnit"},"value":{"description":"The coefficient value","minimum":0,"type":"number"}},"required":["value","measurementUnit"],"type":"object","title":"DeliverCostCoefficient","description":"DeliverCostCoefficient"},"CostCoefficientMeasurementUnit":{"description":"The unit of measurement for the coefficient","enum":["GRAM"],"type":"string","title":"CostCoefficientMeasurementUnit"},"CarrierTransitTime":{"properties":{"maxTransitDays":{"description":"Maximum days a carrier needs for transit","format":"int32","minimum":0,"type":"number"},"minTransitDays":{"description":"Minimum days a carrier needs for transit","format":"int32","minimum":0,"type":"number"}},"required":["minTransitDays","maxTransitDays"],"title":"CarrierTransitTime","type":"object","description":"CarrierTransitTime"},"InterFacilityConnectionGeneralShipmentRestriction":{"properties":{"restrictionType":{"$ref":"#/components/schemas/InterFacilityConnectionGeneralShipmentRestrictionType"},"value":{"type":"number"}},"required":["restrictionType","value"],"type":"object","title":"InterFacilityConnectionGeneralShipmentRestriction","description":"InterFacilityConnectionGeneralShipmentRestriction"},"InterFacilityConnectionGeneralShipmentRestrictionType":{"enum":["MAX_WEIGHT_PER_SHIPMENT","MAX_LOADING_METERS_PER_SHIPMENT","MAX_PACKAGING_UNITS_PER_SHIPMENT","MIN_PACKAGING_UNITS_PER_SHIPMENT","MAX_WEIGHT_PER_LOADING_METER"],"type":"string","title":"InterFacilityConnectionGeneralShipmentRestrictionType","description":"InterFacilityConnectionGeneralShipmentRestrictionType"},"NonDeliveryDaysPerCountryAndProvince":{"properties":{"country":{"description":"The country code","type":"string"},"nonDeliveryDays":{"description":"Non-delivery days for this country","items":{"$ref":"#/components/schemas/NonDeliveryDays"},"maxItems":500,"type":"array"},"nonDeliveryDaysPerProvince":{"description":"Non-delivery days per province within this country","items":{"$ref":"#/components/schemas/NonDeliveryDaysPerProvince"},"maxItems":500,"type":"array"},"recurringNonDeliveryWeekdays":{"description":"Recurring non-delivery weekdays for this country","items":{"enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"type":"string"},"maxItems":7,"type":"array"}},"required":["country","nonDeliveryDays","recurringNonDeliveryWeekdays","nonDeliveryDaysPerProvince"],"title":"NonDeliveryDaysPerCountryAndProvince","type":"object","description":"NonDeliveryDaysPerCountryAndProvince"},"NonDeliveryDays":{"properties":{"nonDeliveryDay":{"description":"The non-delivery day in YYYY-MM-DD format","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"nonDeliveryType":{"default":"SINGLE","description":"Type of non-delivery day","enum":["SINGLE","RECURRING"],"type":"string"}},"required":["nonDeliveryDay"],"title":"NonDeliveryDays","type":"object","description":"NonDeliveryDays"},"NonDeliveryDaysPerProvince":{"properties":{"nonDeliveryDays":{"description":"Non-delivery days for this province","items":{"$ref":"#/components/schemas/NonDeliveryDays"},"maxItems":500,"type":"array"},"province":{"description":"The province identifier","type":"string"},"recurringNonDeliveryWeekdays":{"description":"Recurring non-delivery weekdays for this province","items":{"enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"type":"string"},"maxItems":7,"type":"array"}},"required":["province","nonDeliveryDays","recurringNonDeliveryWeekdays"],"title":"NonDeliveryDaysPerProvince","type":"object","description":"NonDeliveryDaysPerProvince"},"InterFacilityConnectionPackageTypeSpecificShipmentRestriction":{"properties":{"packagingUnitRefs":{"items":{"type":"string"},"type":"array"},"packagingUnitType":{"$ref":"#/components/schemas/PackagingUnitType"},"restrictionType":{"$ref":"#/components/schemas/InterFacilityConnectionPackageTypeSpecificShipmentRestrictionType"},"value":{"type":"number"}},"required":["restrictionType","value","packagingUnitType"],"type":"object","title":"InterFacilityConnectionPackageTypeSpecificShipmentRestriction","description":"InterFacilityConnectionPackageTypeSpecificShipmentRestriction"},"PackagingUnitType":{"description":"The type of the packagingUnit.","enum":["PALLET","TWO_MAN_HANDLING","PARCEL","BULKY_GOODS","LONG_GOODS"],"title":"PackagingUnitType","type":"string"},"InterFacilityConnectionPackageTypeSpecificShipmentRestrictionType":{"enum":["MAX_PACKAGING_UNITS_PER_TYPE"],"type":"string","title":"InterFacilityConnectionPackageTypeSpecificShipmentRestrictionType","description":"InterFacilityConnectionPackageTypeSpecificShipmentRestrictionType"},"PackagingUnitsByContext":{"additionalProperties":false,"properties":{"context":{"items":{"$ref":"#/components/schemas/PackagingUnitContext"},"maxItems":500,"minItems":0,"type":"array"},"packagingUnits":{"items":{"$ref":"#/components/schemas/PackagingUnit"},"maxItems":500,"minItems":1,"type":"array"}},"required":["context","packagingUnits"],"type":"object","title":"PackagingUnitsByContext","description":"PackagingUnitsByContext"},"PackagingUnitContext":{"additionalProperties":false,"properties":{"operator":{"$ref":"#/components/schemas/ContextOperator"},"type":{"$ref":"#/components/schemas/PackagingUnitContextTypes"},"values":{"items":{"maxItems":500,"minItems":0,"type":"string"},"type":"array"}},"required":["type","values"],"type":"object","title":"PackagingUnitContext","description":"PackagingUnitContext"},"PackagingUnitContextTypes":{"enum":["TARGET_POSTALCODE","TARGET_COUNTRY","CATEGORY"],"type":"string","title":"PackagingUnitContextTypes","description":"PackagingUnitContextTypes"},"PackagingUnit":{"additionalProperties":false,"properties":{"dimensions":{"$ref":"#/components/schemas/PackagingUnitDimensions"},"maxItemQuantity":{"description":"The maximum item quantity of the packaging unit","minimum":0,"type":"integer"},"name":{"description":"The name of the packaging unit","type":"string"},"packagingUnitRef":{"description":"The reference ID of the packaging unit","type":"string"},"prices":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionDeliveryCost"},"type":"array"},"priority":{"description":"The priority of the packaging unit. Lowest value has the highest priority. Must be unique per context","minimum":0,"type":"integer"},"tenantPackagingUnitId":{"description":"The tenant-specific ID of the packaging unit","type":"string"},"transitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"volumeBufferInPercent":{"description":"The volume buffer of PackagingUnit in percent","minimum":0,"type":"integer"}},"required":["name","priority"],"type":"object","title":"PackagingUnit","description":"PackagingUnit"},"PackagingUnitDimensions":{"additionalProperties":false,"properties":{"height":{"description":"The height of the packaging unit","minimum":0,"type":"number"},"length":{"description":"The length of the packaging unit","minimum":0,"type":"number"},"maxWeightInGram":{"description":"The weight of the packaging unit","minimum":0,"type":"number"},"width":{"description":"The width of the packaging unit","minimum":0,"type":"number"}},"required":["length","width","height","maxWeightInGram"],"type":"object","title":"PackagingUnitDimensions","description":"PackagingUnitDimensions"},"InterFacilityConnectionTransferPricing":{"additionalProperties":false,"description":"Prices the transfer as one shipment instead of per packaging unit, for carriers whose tariff charges the aggregated weight of all packaging units of a transfer (e.g. UPS Italy). When this is configured, the base price is resolved once per transfer from `pricing` and the prices configured on the packaging units of that transfer are ignored. Surcharges are unaffected: those configured per packaging unit and those in `surchargesPerTransfer` both still apply, each on its own level.","properties":{"costCoefficient":{"$ref":"#/components/schemas/InterFacilityConnectionCostCoefficient"},"ldmToWeightFactor":{"description":"The grams equivalent to 1 loading meter, converting between weight and loading meters.","format":"float","minimum":0,"type":"number"},"maxVolumetricWeight":{"description":"Caps the chargeable volumetric weight in grams.","minimum":0,"type":"integer"},"pricing":{"description":"The price matrix of this connection, by zone.","items":{"$ref":"#/components/schemas/InterFacilityConnectionPricingByZone"},"maxItems":500,"minItems":1,"type":"array"},"pricingBasis":{"$ref":"#/components/schemas/InterFacilityConnectionPricingBasis"},"volumeBufferInPercent":{"description":"The buffer in percent applied to the aggregated volume of all packaging units.","minimum":0,"type":"integer"},"volumetricWeightFactor":{"description":"Converts the aggregated volume of all packaging units into a volumetric weight.","format":"float","minimum":0,"type":"number"},"weightBasis":{"$ref":"#/components/schemas/InterFacilityConnectionWeightBasis"},"weightToVolumeFactor":{"description":"Converts the aggregated weight of all packaging units into a volume. Required when pricingUnit is CUBIC_METER.","format":"float","minimum":0,"type":"number"}},"required":["pricing"],"title":"InterFacilityConnectionTransferPricing","type":"object"},"InterFacilityConnectionCostCoefficient":{"additionalProperties":false,"description":"The configured rate charged per measurement unit, applied to the measured value.","properties":{"measurementUnit":{"$ref":"#/components/schemas/InterFacilityConnectionPricingMeasurementUnit"},"value":{"$ref":"#/components/schemas/InterFacilityConnectionsMoney"}},"required":["value","measurementUnit"],"title":"InterFacilityConnectionCostCoefficient","type":"object"},"InterFacilityConnectionPricingMeasurementUnit":{"description":"The unit of measurement for the cost coefficient.","enum":["GRAM","CUBIC_METER"],"title":"InterFacilityConnectionPricingMeasurementUnit","type":"string"},"InterFacilityConnectionsMoney":{"properties":{"currency":{"$ref":"#/components/schemas/CurrencyCode"},"decimalPlaces":{"description":"Number of decimal places for the given currency","minimum":0,"type":"integer"},"value":{"description":"Value in the smallest subunit of the given currency, e.g. cents.","minimum":0,"type":"integer"}},"required":["currency","value"],"title":"InterFacilityConnectionsMoney","type":"object","description":"InterFacilityConnectionsMoney"},"InterFacilityConnectionPricingByZone":{"additionalProperties":false,"properties":{"overflowFactor":{"$ref":"#/components/schemas/InterFacilityConnectionPricingOverflowFactor"},"prices":{"description":"The prices of this zone, by upper threshold.","items":{"$ref":"#/components/schemas/InterFacilityConnectionPricesByTier"},"maxItems":500,"minItems":1,"type":"array"},"zone":{"description":"The shipping zone for which the pricing applies. Please provide the ISO 3166-2 country code, followed by a dash and the first digits of the postal code, e.g. DE-50 for Cologne, Germany.","pattern":"^[A-Z]{2}-\\d+$","type":"string"}},"required":["prices"],"title":"InterFacilityConnectionPricingByZone","type":"object","description":"InterFacilityConnectionPricingByZone"},"InterFacilityConnectionPricingOverflowFactor":{"additionalProperties":false,"description":"Additional costs in case the price definition is exceeded.","properties":{"factor":{"description":"The factor appliable when the highest configured threshold is exceeded.","format":"float","minimum":0,"type":"number"},"price":{"$ref":"#/components/schemas/InterFacilityConnectionsMoney"}},"required":["price","factor"],"title":"InterFacilityConnectionPricingOverflowFactor","type":"object"},"InterFacilityConnectionPricesByTier":{"additionalProperties":false,"properties":{"factor":{"description":"Charges price once per this many units of pricingUnit started, rounded up, instead of as a flat price for the tier. Use 1 to bill exactly. Omit it to charge price flat.","format":"float","minimum":0,"type":"number"},"price":{"$ref":"#/components/schemas/InterFacilityConnectionsMoney"},"upperThreshold":{"description":"The threshold in pricingUnit up to which this price applies.","format":"int64","minimum":0,"type":"integer"}},"required":["upperThreshold","price"],"title":"InterFacilityConnectionPricesByTier","type":"object","description":"InterFacilityConnectionPricesByTier"},"InterFacilityConnectionPricingBasis":{"additionalProperties":false,"properties":{"pricingQuantities":{"description":"The quantities compared, each converted to pricingUnit; the highest one determines the chargeable amount.","items":{"$ref":"#/components/schemas/InterFacilityConnectionPricingQuantity"},"maxItems":3,"minItems":1,"type":"array"},"pricingUnit":{"$ref":"#/components/schemas/InterFacilityConnectionPricingUnit"}},"required":["pricingUnit","pricingQuantities"],"title":"InterFacilityConnectionPricingBasis","type":"object","description":"InterFacilityConnectionPricingBasis"},"InterFacilityConnectionPricingQuantity":{"description":"A quantity of the transfer that can determine the chargeable amount.","enum":["ACTUAL_WEIGHT","VOLUMETRIC_WEIGHT","LOADING_METER_EQUIVALENT"],"title":"InterFacilityConnectionPricingQuantity","type":"string"},"InterFacilityConnectionPricingUnit":{"description":"The unit the pricing quantities are converted to and priced in.","enum":["GRAM","CUBIC_METER","LOADING_METER"],"title":"InterFacilityConnectionPricingUnit","type":"string"},"InterFacilityConnectionWeightBasis":{"description":"The article weight the aggregated weight of the transfer is calculated from: WEIGHT (weightPerUnit) or BILLABLE_WEIGHT (billableWeightPerUnit). Defaults to WEIGHT.","enum":["WEIGHT","BILLABLE_WEIGHT"],"title":"InterFacilityConnectionWeightBasis","type":"string"},"InterFacilityConnectionTransferAbsoluteSurcharge":{"properties":{"amount":{"$ref":"#/components/schemas/InterFacilityConnectionsMoney"},"context":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionSurchargeContext"},"maxItems":500,"minItems":0,"type":"array"},"priority":{"description":"Places the surcharge in the transfer's application sequence, which all surcharge types share. Ascending; gaps are allowed. If no surcharge of a transfer declares one, every percentage is calculated on the base price and the packaging units together.","minimum":0,"type":"integer"},"tenantSurchargeType":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionTransferSurchargeType"}],"enum":["ABSOLUTE_SURCHARGE_TYPE"]}},"required":["tenantSurchargeType","type","amount"],"title":"InterFacilityConnectionTransferAbsoluteSurcharge","type":"object","description":"InterFacilityConnectionTransferAbsoluteSurcharge"},"InterFacilityConnectionSurchargeContext":{"additionalProperties":false,"properties":{"operator":{"$ref":"#/components/schemas/ContextOperator"},"type":{"$ref":"#/components/schemas/InterFacilityConnectionSurchargeContextTypes"},"values":{"items":{"maxItems":500,"minItems":0,"type":"string"},"type":"array"}},"required":["type","values"],"type":"object","title":"InterFacilityConnectionSurchargeContext","description":"InterFacilityConnectionSurchargeContext"},"InterFacilityConnectionSurchargeContextTypes":{"enum":["CATEGORY","TAG_REFERENCE","TARGET_POSTALCODE","TARGET_COUNTRY"],"type":"string","title":"InterFacilityConnectionSurchargeContextTypes","description":"InterFacilityConnectionSurchargeContextTypes"},"InterFacilityConnectionTransferSurchargeType":{"enum":["ABSOLUTE_SURCHARGE_TYPE","RELATIVE_SURCHARGE_TYPE","THRESHOLD_SURCHARGE_TYPE"],"title":"InterFacilityConnectionTransferSurchargeType","type":"string","description":"InterFacilityConnectionTransferSurchargeType"},"InterFacilityConnectionTransferRelativeSurcharge":{"properties":{"calculationScope":{"$ref":"#/components/schemas/InterFacilityConnectionSurchargeCalculationScope"},"context":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionSurchargeContext"},"maxItems":500,"minItems":0,"type":"array"},"percentage":{"format":"float","minimum":0,"type":"number"},"priority":{"description":"Places the surcharge in the transfer's application sequence, which all surcharge types share. Ascending; gaps are allowed. If no surcharge of a transfer declares one, every percentage is calculated on the base price and the packaging units together.","minimum":0,"type":"integer"},"tenantSurchargeType":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionTransferSurchargeType"}],"enum":["RELATIVE_SURCHARGE_TYPE"]}},"required":["tenantSurchargeType","type","percentage"],"title":"InterFacilityConnectionTransferRelativeSurcharge","type":"object","description":"InterFacilityConnectionTransferRelativeSurcharge"},"InterFacilityConnectionSurchargeCalculationScope":{"additionalProperties":false,"description":"The charges a percentage is calculated against: exactly the referenced ones, or the charged price without them. A reference that matches nothing contributes nothing.","properties":{"mode":{"$ref":"#/components/schemas/InterFacilityConnectionSurchargeScopeMode"},"references":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionSurchargeScopeReference"},"maxItems":500,"minItems":1,"type":"array"}},"required":["mode","references"],"title":"InterFacilityConnectionSurchargeCalculationScope","type":"object"},"InterFacilityConnectionSurchargeScopeMode":{"description":"Whether a scope names the charges a percentage is calculated on, or the ones it is not calculated on.","enum":["INCLUDE","EXCLUDE"],"title":"InterFacilityConnectionSurchargeScopeMode","type":"string"},"InterFacilityConnectionSurchargeScopeReference":{"additionalProperties":false,"description":"One entry of a calculation scope.","properties":{"kind":{"$ref":"#/components/schemas/InterFacilityConnectionSurchargeScopeReferenceKind"},"level":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionSurchargeScopeLevel"}],"description":"Restricts the reference to the charges made on one pricing level. If omitted, charges of both levels are selected, so a tenantSurchargeType configured on both matches both."},"tenantSurchargeType":{"description":"The referenced tenant surcharge type. Only read for TENANT_SURCHARGE references.","type":"string"}},"required":["kind"],"title":"InterFacilityConnectionSurchargeScopeReference","type":"object"},"InterFacilityConnectionSurchargeScopeReferenceKind":{"description":"What a scope reference selects. BASE_PRICE is the resolved base price of the transfer, TENANT_SURCHARGE every charge made under the reference's tenantSurchargeType, PACKAGING_UNITS everything the packaging units of the transfer charged, and GOODS_VALUE the order's goods value that ships with the transfer. PACKAGING_UNITS and GOODS_VALUE are only available on the transfer level.","enum":["BASE_PRICE","TENANT_SURCHARGE","PACKAGING_UNITS","GOODS_VALUE"],"title":"InterFacilityConnectionSurchargeScopeReferenceKind","type":"string"},"InterFacilityConnectionSurchargeScopeLevel":{"description":"The pricing level that made a charge. PACKAGING_UNIT is what the packaging units of the transfer charged, TRANSFER what the transfer itself charged.","enum":["PACKAGING_UNIT","TRANSFER"],"title":"InterFacilityConnectionSurchargeScopeLevel","type":"string"},"InterFacilityConnectionTransferThresholdSurcharge":{"description":"A surcharge that is charged as the greater of minimumAmount and percentage of the amount it is applied to, for example a cash on delivery fee of at least 5.80 EUR but 3 % of a larger transfer.","properties":{"calculationScope":{"$ref":"#/components/schemas/InterFacilityConnectionSurchargeCalculationScope"},"context":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionSurchargeContext"},"maxItems":500,"minItems":0,"type":"array"},"minimumAmount":{"$ref":"#/components/schemas/InterFacilityConnectionsMoney"},"percentage":{"format":"float","minimum":0,"type":"number"},"priority":{"description":"Places the surcharge in the transfer's application sequence, which all surcharge types share. Ascending; gaps are allowed. If no surcharge of a transfer declares one, every percentage is calculated on the base price and the packaging units together.","minimum":0,"type":"integer"},"tenantSurchargeType":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionTransferSurchargeType"}],"enum":["THRESHOLD_SURCHARGE_TYPE"]}},"required":["tenantSurchargeType","type","minimumAmount","percentage"],"title":"InterFacilityConnectionTransferThresholdSurcharge","type":"object"},"InterFacilityConnectionSupplierTarget":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionBaseTarget"}],"properties":{"excludedFacilityGroupRefs":{"items":{"type":"string"},"maxItems":500,"type":"array"},"excludedFacilityRefs":{"items":{"type":"string"},"maxItems":500,"type":"array"},"facilityRef":{"type":"string"}},"type":"object","title":"InterFacilityConnectionSupplierTarget","description":"InterFacilityConnectionSupplierTarget"},"InterFacilityConnectionBaseTarget":{"discriminator":{"propertyName":"type"},"properties":{"type":{"$ref":"#/components/schemas/ConnectionType"}},"required":["type"],"type":"object","xml":{"name":"InterFacilityConnectionBaseTarget"},"title":"InterFacilityConnectionBaseTarget","description":"InterFacilityConnectionBaseTarget"},"ConnectionType":{"enum":["SUPPLIER","MANAGED_FACILITY","CUSTOMER"],"type":"string","title":"ConnectionType","description":"ConnectionType"},"TransportDetails":{"properties":{"vehicleWidthInMeters":{"type":"number"}},"type":"object","title":"TransportDetails","description":"TransportDetails"},"InterFacilityConnectionToManagedFacilityForCreation":{"additionalProperties":false,"properties":{"carrierKey":{"description":"The key of the carrier that is used for this connection. References known and configured carriers in the system.","type":"string"},"carrierName":{"description":"The name of the carrier that is used for this connection.","type":"string"},"context":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionContext"},"maxItems":500,"minItems":0,"type":"array"},"customAttributes":{"additionalProperties":true,"description":"Custom attributes that can be used to store additional information about the connection.","type":"object"},"cutoffTimes":{"$ref":"#/components/schemas/CarrierCutoffTimes"},"fallbackCosts":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionDeliveryCost"},"maxItems":500,"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"generalShipmentRestrictions":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionGeneralShipmentRestriction"},"maxItems":50,"type":"array"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"maxItems":500,"type":"array"},"packageTypeSpecificShipmentRestrictions":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionPackageTypeSpecificShipmentRestriction"},"maxItems":50,"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":500,"minItems":0,"type":"array"},"pricingPerTransfer":{"$ref":"#/components/schemas/InterFacilityConnectionTransferPricing"},"surchargesPerTransfer":{"items":{"discriminator":{"mapping":{"ABSOLUTE_SURCHARGE_TYPE":"#/components/schemas/InterFacilityConnectionTransferAbsoluteSurcharge","RELATIVE_SURCHARGE_TYPE":"#/components/schemas/InterFacilityConnectionTransferRelativeSurcharge","THRESHOLD_SURCHARGE_TYPE":"#/components/schemas/InterFacilityConnectionTransferThresholdSurcharge"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/InterFacilityConnectionTransferAbsoluteSurcharge"},{"$ref":"#/components/schemas/InterFacilityConnectionTransferRelativeSurcharge"},{"$ref":"#/components/schemas/InterFacilityConnectionTransferThresholdSurcharge"}]},"maxItems":500,"type":"array"},"target":{"$ref":"#/components/schemas/InterFacilityConnectionManagedFacilityTarget"},"transportDetails":{"$ref":"#/components/schemas/TransportDetails"},"type":{"$ref":"#/components/schemas/ConnectionType"}},"required":["target","type"],"type":"object","xml":{"name":"InterFacilityConnectionToManagedFacilityForCreation"},"title":"InterFacilityConnectionToManagedFacilityForCreation","description":"InterFacilityConnectionToManagedFacilityForCreation"},"InterFacilityConnectionManagedFacilityTarget":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionBaseTarget"}],"properties":{"excludedFacilityGroupRefs":{"items":{"type":"string"},"maxItems":500,"type":"array"},"excludedFacilityRefs":{"items":{"type":"string"},"maxItems":500,"type":"array"},"facilityRef":{"type":"string"}},"type":"object","title":"InterFacilityConnectionManagedFacilityTarget","description":"InterFacilityConnectionManagedFacilityTarget"},"InterFacilityConnectionToCustomerForCreation":{"additionalProperties":false,"properties":{"carrierKey":{"description":"The key of the carrier that is used for this connection. References known and configured carriers in the system.","type":"string"},"carrierName":{"description":"The name of the carrier that is used for this connection.","type":"string"},"context":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionContext"},"maxItems":500,"minItems":0,"type":"array"},"customAttributes":{"additionalProperties":true,"description":"Custom attributes that can be used to store additional information about the connection.","type":"object"},"cutoffTimes":{"$ref":"#/components/schemas/CarrierCutoffTimes"},"fallbackCosts":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionDeliveryCost"},"maxItems":500,"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"generalShipmentRestrictions":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionGeneralShipmentRestriction"},"maxItems":50,"type":"array"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"maxItems":500,"type":"array"},"packageTypeSpecificShipmentRestrictions":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionPackageTypeSpecificShipmentRestriction"},"maxItems":50,"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":500,"minItems":0,"type":"array"},"pricingPerTransfer":{"$ref":"#/components/schemas/InterFacilityConnectionTransferPricing"},"surchargesPerTransfer":{"items":{"discriminator":{"mapping":{"ABSOLUTE_SURCHARGE_TYPE":"#/components/schemas/InterFacilityConnectionTransferAbsoluteSurcharge","RELATIVE_SURCHARGE_TYPE":"#/components/schemas/InterFacilityConnectionTransferRelativeSurcharge","THRESHOLD_SURCHARGE_TYPE":"#/components/schemas/InterFacilityConnectionTransferThresholdSurcharge"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/InterFacilityConnectionTransferAbsoluteSurcharge"},{"$ref":"#/components/schemas/InterFacilityConnectionTransferRelativeSurcharge"},{"$ref":"#/components/schemas/InterFacilityConnectionTransferThresholdSurcharge"}]},"maxItems":500,"type":"array"},"target":{"$ref":"#/components/schemas/InterFacilityConnectionCustomerTarget"},"transportDetails":{"$ref":"#/components/schemas/TransportDetails"},"type":{"$ref":"#/components/schemas/ConnectionType"}},"required":["target","type"],"type":"object","xml":{"name":"InterFacilityConnectionToCustomerForCreation"},"title":"InterFacilityConnectionToCustomerForCreation","description":"InterFacilityConnectionToCustomerForCreation"},"InterFacilityConnectionCustomerTarget":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionBaseTarget"}],"type":"object","title":"InterFacilityConnectionCustomerTarget","description":"InterFacilityConnectionCustomerTarget"},"InterFacilityConnection":{"additionalProperties":false,"allOf":[{"$ref":"#/components/schemas/VersionedResource"}],"properties":{"carrierKey":{"description":"The key of the carrier that is used for this connection. References known and configured carriers in the system.","type":"string"},"carrierName":{"description":"The name of the carrier that is used for this connection.","type":"string"},"context":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionContext"},"maxItems":500,"minItems":0,"type":"array"},"customAttributes":{"additionalProperties":true,"description":"Custom attributes that can be used to store additional information about the connection.","type":"object"},"cutoffTimes":{"$ref":"#/components/schemas/CarrierCutoffTimes"},"fallbackCosts":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionDeliveryCost"},"maxItems":500,"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"generalShipmentRestrictions":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionGeneralShipmentRestriction"},"maxItems":50,"type":"array"},"id":{"type":"string"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"maxItems":500,"type":"array"},"packageTypeSpecificShipmentRestrictions":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionPackageTypeSpecificShipmentRestriction"},"maxItems":50,"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":500,"minItems":0,"type":"array"},"pricingPerTransfer":{"$ref":"#/components/schemas/InterFacilityConnectionTransferPricing"},"sourceFacilityRef":{"type":"string"},"surchargesPerTransfer":{"items":{"discriminator":{"mapping":{"ABSOLUTE_SURCHARGE_TYPE":"#/components/schemas/InterFacilityConnectionTransferAbsoluteSurcharge","RELATIVE_SURCHARGE_TYPE":"#/components/schemas/InterFacilityConnectionTransferRelativeSurcharge","THRESHOLD_SURCHARGE_TYPE":"#/components/schemas/InterFacilityConnectionTransferThresholdSurcharge"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/InterFacilityConnectionTransferAbsoluteSurcharge"},{"$ref":"#/components/schemas/InterFacilityConnectionTransferRelativeSurcharge"},{"$ref":"#/components/schemas/InterFacilityConnectionTransferThresholdSurcharge"}]},"maxItems":500,"type":"array","description":"This part of the API is in Alpha status. For details, see the <a href=\"https://docs.fulfillmenttools.com/documentation/apis/api-versioning-and-lifecycle#lifecycle-overview\" target=\"_blank\">API release lifecycle documentation</a>.<br /><br />"},"target":{"oneOf":[{"$ref":"#/components/schemas/InterFacilityConnectionCustomerTarget"},{"$ref":"#/components/schemas/InterFacilityConnectionManagedFacilityTarget"},{"$ref":"#/components/schemas/InterFacilityConnectionSupplierTarget"}],"discriminator":{"propertyName":"type","mapping":{"CUSTOMER":"#/components/schemas/InterFacilityConnectionCustomerTarget","MANAGED_FACILITY":"#/components/schemas/InterFacilityConnectionManagedFacilityTarget","SUPPLIER":"#/components/schemas/InterFacilityConnectionSupplierTarget"}}},"transportDetails":{"$ref":"#/components/schemas/TransportDetails"}},"required":["id","sourceFacilityRef","target"],"type":"object","xml":{"name":"InterFacilityConnection"},"title":"InterFacilityConnection","description":"InterFacilityConnection"},"VersionedResource":{"properties":{"created":{"description":"The date this entity was created at the platform. This value is generated by the service.","format":"date-time","type":"string"},"lastModified":{"description":"The date this entity was modified last. This value is generated by the service.","format":"date-time","type":"string"},"version":{"description":"The version of the document to be used in optimistic locking mechanisms.","format":"int64","type":"integer"}},"required":["version"],"type":"object","title":"VersionedResource","description":"VersionedResource"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/facilities/{facilityId}/connections":{"post":{"description":"Create a connections for a supplier facility with given ID.","operationId":"createConnectionToFacility","parameters":[{"description":"ID of facility you want to create a connection for","in":"path","name":"facilityId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InterFacilityConnectionToSupplierForCreation"},{"$ref":"#/components/schemas/InterFacilityConnectionToManagedFacilityForCreation"},{"$ref":"#/components/schemas/InterFacilityConnectionToCustomerForCreation"}],"discriminator":{"propertyName":"type","mapping":{"CUSTOMER":"#/components/schemas/InterFacilityConnectionToCustomerForCreation","MANAGED_FACILITY":"#/components/schemas/InterFacilityConnectionToManagedFacilityForCreation","SUPPLIER":"#/components/schemas/InterFacilityConnectionToSupplierForCreation"}}}}},"description":"Representation that the connection","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InterFacilityConnection"}}},"description":"Creation was successful."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"}},"summary":"Create facility connection","tags":["Facilities"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fulfillmenttools.com/documentation/by-pillar/advanced-order-routing/complex-routing-with-combinatorics/network-model/facility-connection.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
