# Facilities (Core)

Facilities represent various locations that form part of the fulfillment network.

## GET /api/facilities

> List facilities

```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 (Core)"}],"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":{"FacilityOrderBy":{"description":"Attribute to order a facility list","enum":["NAME","CREATED","POSTAL_CODE_ASC"],"type":"string","xml":{"name":"FacilityOrderBy"},"title":"FacilityOrderBy"},"FacilityType":{"default":"MANAGED_FACILITY","enum":["MANAGED_FACILITY","SUPPLIER"],"type":"string","xml":{"name":"FacilityType"},"title":"FacilityType","description":"FacilityType"},"StrippedFacilities":{"properties":{"facilities":{"items":{"anyOf":[{"$ref":"#/components/schemas/StrippedManagedFacility"},{"$ref":"#/components/schemas/Supplier"}]},"type":"array"},"total":{"description":"Total number of found entities for this query","type":"integer"}},"type":"object","title":"StrippedFacilities","description":"StrippedFacilities"},"StrippedManagedFacility":{"allOf":[{"$ref":"#/components/schemas/VersionedResource"},{"$ref":"#/components/schemas/Address"},{"properties":{"id":{"type":"string"},"name":{"description":"name of the facility","type":"string"},"status":{"$ref":"#/components/schemas/FacilityStatus"},"tenantFacilityId":{"description":"The id of the facility in the tenants own system","type":"string"},"type":{"$ref":"#/components/schemas/FacilityType"}},"required":["id","status","type"],"type":"object"}],"title":"StrippedManagedFacility","description":"StrippedManagedFacility"},"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"},"Address":{"properties":{"additionalAddressInfo":{"type":"string"},"city":{"pattern":"^.+$","type":"string"},"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"customAttributes":{"description":"Attributes that can be added to the address. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"houseNumber":{"pattern":"^.+$","type":"string"},"phoneNumbers":{"items":{"properties":{"customAttributes":{"description":"Attributes that can be added to the phonenumber. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"label":{"description":"Can be used to give a description for the number, like \"private\", \"business number\", etc.","type":"string"},"type":{"enum":["MOBILE","PHONE"],"type":"string"},"value":{"description":"The number itself. We do not enforce any format (yet).","type":"string"}},"required":["value","type"],"type":"object"},"type":"array"},"postalCode":{"pattern":"^.+$","type":"string"},"province":{"pattern":"^.+$","type":"string"},"street":{"pattern":"^.+$","type":"string"}},"required":["street","city","postalCode","country"],"type":"object","title":"Address","description":"Address"},"FacilityStatus":{"description":"The state of the facility. ONLINE means that this facility can process new orders and pickjobs, SUSPENDED means it cannot get new orders but is able to fulfill the current workload and OFFLINE means that it cannot fulfill any new or existing orders. Processes already running might be rescheduled to another facility depending on the preferences.","enum":["ONLINE","SUSPENDED","OFFLINE"],"type":"string","title":"FacilityStatus"},"Supplier":{"allOf":[{"$ref":"#/components/schemas/Facility"},{"$ref":"#/components/schemas/SupplierForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/SupplierAddress"}},"type":"object","xml":{"name":"Supplier"},"title":"Supplier","description":"Supplier"},"Facility":{"allOf":[{"$ref":"#/components/schemas/VersionedResource"},{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"id":{"description":"The id of this facility. It is generated during creation automatically and suits as the primary identifier of the described entity.","type":"string"},"operativeCosts":{"items":{"$ref":"#/components/schemas/FacilityOperativeCost"},"maxItems":1,"type":"array"}},"required":["id","type","status"],"type":"object","xml":{"name":"Facility"},"title":"Facility","description":"Facility"},"FacilityForCreation":{"properties":{"customAttributes":{"description":"Attributes that can be added to the facility. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"name":{"type":"string"},"operativeCosts":{"items":{"$ref":"#/components/schemas/FacilityOperativeCostForCreation"},"maxItems":1,"type":"array"},"status":{"$ref":"#/components/schemas/FacilityStatus"},"tenantFacilityId":{"description":"The id of the facility in the tenants own system","type":"string"},"type":{"$ref":"#/components/schemas/FacilityType","default":"MANAGED_FACILITY"},"tags":{"items":{"$ref":"#/components/schemas/TagReference"},"minItems":1,"type":"array"}},"required":["name"],"type":"object","xml":{"name":"FacilityForCreation"},"title":"FacilityForCreation","description":"FacilityForCreation"},"FacilityOperativeCostForCreation":{"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code.","nullable":true,"type":"string"},"decimalPlaces":{"description":"Number of decimal places for the given currency. We be defaulted according to the currency if missing.","minimum":0,"type":"integer"},"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":"FacilityOperativeCostForCreation","description":"FacilityOperativeCostForCreation"},"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"},"TagReference":{"properties":{"id":{"type":"string"},"value":{"type":"string"}},"required":["value","id"],"title":"TagReference","description":"TagReference"},"FacilityOperativeCost":{"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code.","nullable":true,"type":"string"},"decimalPlaces":{"description":"Number of decimal places for the given currency","minimum":0,"type":"integer"},"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","decimalPlaces"],"type":"object","title":"FacilityOperativeCost","description":"FacilityOperativeCost"},"SupplierForCreation":{"allOf":[{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/SupplierAddressForCreation"}},"type":"object","xml":{"name":"SupplierForCreation"},"title":"SupplierForCreation","description":"SupplierForCreation"},"SupplierAddressForCreation":{"properties":{"additionalAddressInfo":{"type":"string"},"city":{"pattern":"^.+$","type":"string"},"companyName":{"type":"string"},"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"customAttributes":{"description":"Attributes that can be added to the address. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"emailAddresses":{"items":{"$ref":"#/components/schemas/SupplierAddressEmailAddress"},"type":"array"},"houseNumber":{"pattern":"^.+$","type":"string"},"phoneNumbers":{"items":{"$ref":"#/components/schemas/SupplierAddressPhoneNumber"},"type":"array"},"postalCode":{"pattern":"^.+$","type":"string"},"province":{"pattern":"^.+$","type":"string"},"resolvedCoordinates":{"$ref":"#/components/schemas/Coordinates"},"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZoneForCreation","description":"User-specified time zone in identifier format (e.g., \"America/Los_Angeles\"). Used to determine local time. Relevant only if the country spans multiple time zones; otherwise, the time zone is automatically determined from the country or via Google if unspecified."},"street":{"pattern":"^.+$","type":"string"}},"required":["country","companyName"],"type":"object","title":"SupplierAddressForCreation","description":"SupplierAddressForCreation"},"SupplierAddressEmailAddress":{"properties":{"recipient":{"description":"Human readable information who is the recipient for emails sent to this address.","type":"string"},"value":{"format":"email","type":"string"}},"required":["value"],"type":"object","title":"SupplierAddressEmailAddress","description":"SupplierAddressEmailAddress"},"SupplierAddressPhoneNumber":{"properties":{"customAttributes":{"description":"Attributes that can be added to the phonenumber. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"label":{"description":"Can be used to give a description for the number, like \"private\", \"business number\", etc.","type":"string"},"type":{"enum":["MOBILE","PHONE"],"type":"string"},"value":{"description":"The number itself. We do not enforce any format (yet).","type":"string"}},"required":["value","type"],"type":"object","title":"SupplierAddressPhoneNumber","description":"SupplierAddressPhoneNumber"},"Coordinates":{"description":"Coordinates of the WGS84 geodetic reference system in Mercator projection, as used e.g. by the Google Maps API","properties":{"lat":{"description":"Latitude value","type":"number"},"lon":{"description":"Longitude value","type":"number"}},"required":["lat","lon"],"type":"object","title":"Coordinates"},"TimeZoneForCreation":{"description":"Self-provided timezone for determining the local time of a facility","properties":{"timeZoneId":{"description":"official id of the timezone","type":"string"}},"required":["timeZoneId"],"type":"object","title":"TimeZoneForCreation"},"SupplierAddress":{"allOf":[{"$ref":"#/components/schemas/SupplierAddressForCreation"},{"properties":{"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZone"}},"type":"object"}],"type":"object","title":"SupplierAddress","description":"SupplierAddress"},"TimeZone":{"description":"Timezone for information retrieved e.g. by the Google Maps API","properties":{"offsetInSeconds":{"description":"offset in seconds to standard time. Does not account for daylight saving time.","type":"number"},"source":{"description":"source of the timezone information","type":"string"},"timeZoneId":{"description":"official id of the timezone","type":"string"},"timeZoneName":{"description":"descriptive name of the timezone","type":"string"}},"required":["timeZoneId","timeZoneName","offsetInSeconds"],"type":"object","title":"TimeZone"},"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":{"get":{"description":"","operationId":"getAllFacilities","parameters":[{"description":"all entities after given Id","in":"query","name":"startAfterId","required":false,"schema":{"type":"string"}},{"description":"Reference to the status you want to get the corresponding facilities","explode":true,"in":"query","name":"status","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"description":"number of facilities to show","in":"query","name":"size","required":false,"schema":{"default":25,"type":"integer"}},{"description":"query facilities with the given tenantFacilityId","in":"query","name":"tenantFacilityId","required":false,"schema":{"type":"string"}},{"description":"query facilities orderBy","in":"query","name":"orderBy","required":false,"schema":{"$ref":"#/components/schemas/FacilityOrderBy"}},{"description":"Filters the facilities by type","explode":true,"in":"query","name":"type","required":false,"schema":{"items":{"$ref":"#/components/schemas/FacilityType"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrippedFacilities"}}},"description":"Facilities are found."},"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":"List facilities","tags":["Facilities (Core)"]}}}}
```

## POST /api/facilities

> Create facility

```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 (Core)"}],"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":{"ManagedFacilityForCreation":{"allOf":[{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/FacilityAddressForCreation"},"capacityEnabled":{"default":false,"description":"Indicates that configured capacity limits for picking times are considered","type":"boolean"},"capacityPlanningTimeframe":{"description":"The range in days per facility which defines how many days in the future the capacity of the facility can be planned","minimum":1,"type":"integer"},"closingDays":{"description":"Days of the year where the facility is closed and doesn't allows picking","items":{"$ref":"#/components/schemas/ClosingDay"},"type":"array"},"contact":{"$ref":"#/components/schemas/FacilityContact"},"fulfillmentProcessBuffer":{"default":240,"description":"Duration in minutes until an order is processed","minimum":0,"type":"integer"},"locationType":{"$ref":"#/components/schemas/FacilityLocationType"},"pickingMethods":{"description":"Picking Methods supported by this facility.","items":{"$ref":"#/components/schemas/PickingMethodEnum"},"type":"array"},"pickingTimes":{"$ref":"#/components/schemas/PickingTimes","description":"Time ranges defining the picking times per weekday. No overlapping ranges are allowed"},"scanningRule":{"$ref":"#/components/schemas/ScanningRuleConfiguration"},"services":{"items":{"$ref":"#/components/schemas/FacilityService"},"type":"array"}},"required":["name","address"],"type":"object","xml":{"name":"ManagedFacilityForCreation"},"title":"ManagedFacilityForCreation","description":"ManagedFacilityForCreation"},"FacilityForCreation":{"properties":{"customAttributes":{"description":"Attributes that can be added to the facility. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"name":{"type":"string"},"operativeCosts":{"items":{"$ref":"#/components/schemas/FacilityOperativeCostForCreation"},"maxItems":1,"type":"array"},"status":{"$ref":"#/components/schemas/FacilityStatus"},"tenantFacilityId":{"description":"The id of the facility in the tenants own system","type":"string"},"type":{"$ref":"#/components/schemas/FacilityType","default":"MANAGED_FACILITY"},"tags":{"items":{"$ref":"#/components/schemas/TagReference"},"minItems":1,"type":"array"}},"required":["name"],"type":"object","xml":{"name":"FacilityForCreation"},"title":"FacilityForCreation","description":"FacilityForCreation"},"FacilityOperativeCostForCreation":{"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code.","nullable":true,"type":"string"},"decimalPlaces":{"description":"Number of decimal places for the given currency. We be defaulted according to the currency if missing.","minimum":0,"type":"integer"},"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":"FacilityOperativeCostForCreation","description":"FacilityOperativeCostForCreation"},"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"},"FacilityStatus":{"description":"The state of the facility. ONLINE means that this facility can process new orders and pickjobs, SUSPENDED means it cannot get new orders but is able to fulfill the current workload and OFFLINE means that it cannot fulfill any new or existing orders. Processes already running might be rescheduled to another facility depending on the preferences.","enum":["ONLINE","SUSPENDED","OFFLINE"],"type":"string","title":"FacilityStatus"},"FacilityType":{"default":"MANAGED_FACILITY","enum":["MANAGED_FACILITY","SUPPLIER"],"type":"string","xml":{"name":"FacilityType"},"title":"FacilityType","description":"FacilityType"},"TagReference":{"properties":{"id":{"type":"string"},"value":{"type":"string"}},"required":["value","id"],"title":"TagReference","description":"TagReference"},"FacilityAddressForCreation":{"allOf":[{"$ref":"#/components/schemas/Address"},{"properties":{"companyName":{"type":"string"},"emailAddresses":{"items":{"properties":{"recipient":{"description":"Human readable information who is the recipient for emails sent to this address.","type":"string"},"value":{"type":"string"}},"required":["value"],"type":"object"},"type":"array"},"resolvedCoordinates":{"$ref":"#/components/schemas/Coordinates"},"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZoneForCreation","description":"User-specified time zone in identifier format (e.g., \"America/Los_Angeles\"). Used to determine local time. Relevant only if the country spans multiple time zones; otherwise, the time zone is automatically determined from the country or via Google if unspecified."}},"required":["companyName"],"type":"object"}],"type":"object","xml":{"name":"FacilityAddressForCreation"},"title":"FacilityAddressForCreation","description":"FacilityAddressForCreation"},"Address":{"properties":{"additionalAddressInfo":{"type":"string"},"city":{"pattern":"^.+$","type":"string"},"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"customAttributes":{"description":"Attributes that can be added to the address. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"houseNumber":{"pattern":"^.+$","type":"string"},"phoneNumbers":{"items":{"properties":{"customAttributes":{"description":"Attributes that can be added to the phonenumber. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"label":{"description":"Can be used to give a description for the number, like \"private\", \"business number\", etc.","type":"string"},"type":{"enum":["MOBILE","PHONE"],"type":"string"},"value":{"description":"The number itself. We do not enforce any format (yet).","type":"string"}},"required":["value","type"],"type":"object"},"type":"array"},"postalCode":{"pattern":"^.+$","type":"string"},"province":{"pattern":"^.+$","type":"string"},"street":{"pattern":"^.+$","type":"string"}},"required":["street","city","postalCode","country"],"type":"object","title":"Address","description":"Address"},"Coordinates":{"description":"Coordinates of the WGS84 geodetic reference system in Mercator projection, as used e.g. by the Google Maps API","properties":{"lat":{"description":"Latitude value","type":"number"},"lon":{"description":"Longitude value","type":"number"}},"required":["lat","lon"],"type":"object","title":"Coordinates"},"TimeZoneForCreation":{"description":"Self-provided timezone for determining the local time of a facility","properties":{"timeZoneId":{"description":"official id of the timezone","type":"string"}},"required":["timeZoneId"],"type":"object","title":"TimeZoneForCreation"},"ClosingDay":{"description":"At this day the facility is closed and does not do picking","properties":{"date":{"description":"The day at which the Facility is closed","format":"date-time","type":"string"},"reason":{"description":"The reason why the Facility is closed on this day","type":"string"},"recurrence":{"enum":["YEARLY","NONRECURRING"],"type":"string"}},"required":["reason","date","recurrence"],"type":"object","title":"ClosingDay"},"FacilityContact":{"properties":{"customAttributes":{"description":"Attributes that can be added to the contact. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"firstName":{"type":"string"},"lastName":{"type":"string"},"roleDescription":{"type":"string"}},"required":["firstName","lastName"],"type":"object","xml":{"name":"FacilityContact"},"title":"FacilityContact","description":"FacilityContact"},"FacilityLocationType":{"default":"STORE","enum":["STORE","WAREHOUSE","EXTERNAL"],"type":"string","xml":{"name":"FacilityLocationType"},"title":"FacilityLocationType","description":"FacilityLocationType"},"PickingMethodEnum":{"description":"Way in which the picking should be handled Deprecated: BATCH_PICKING, use BATCH instead","enum":["SINGLE_ORDER","MULTI_ORDER","BATCH_PICKING","BATCH"],"type":"string","title":"PickingMethodEnum"},"PickingTimes":{"description":"Time ranges defining the picking times per weekday. No overlapping ranges are allowed. There must be no overlaps for time ranges on a day","properties":{"friday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"monday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"saturday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"sunday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"thursday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"tuesday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"wednesday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"}},"type":"object","title":"PickingTimes"},"TimeRange":{"properties":{"capacity":{"minimum":0,"type":"number"},"end":{"$ref":"#/components/schemas/TimeStamp"},"start":{"$ref":"#/components/schemas/TimeStamp"}},"required":["start","end"],"type":"object","title":"TimeRange","description":"TimeRange"},"TimeStamp":{"properties":{"hour":{"maximum":23,"minimum":0,"type":"number"},"minute":{"maximum":59,"minimum":0,"type":"number"}},"required":["hour","minute"],"type":"object","title":"TimeStamp","description":"TimeStamp"},"ScanningRuleConfiguration":{"description":"Configuration to show the client how the items should be scanned during picking","properties":{"values":{"items":{"$ref":"#/components/schemas/ScanningRuleValue"},"type":"array"}},"title":"ScanningRuleConfiguration"},"ScanningRuleValue":{"properties":{"priority":{"description":"This field allows you to rank scanningRuleType against each other. The lowest number is the most preferable.","minimum":0,"type":"number"},"scanningRuleType":{"$ref":"#/components/schemas/ScanningRuleTypeEnum"}},"required":["priority","scanningRuleType"],"title":"ScanningRuleValue","description":"ScanningRuleValue"},"ScanningRuleTypeEnum":{"description":"Type of scanning rule","enum":["ARTICLE","LOCATION"],"type":"string","title":"ScanningRuleTypeEnum"},"FacilityService":{"additionalProperties":false,"properties":{"type":{"$ref":"#/components/schemas/FacilityServiceType"}},"required":["type"],"type":"object","xml":{"name":"FacilityService"},"title":"FacilityService","description":"FacilityService"},"FacilityServiceType":{"description":"The description of the service this facility offers.","enum":["SHIP_FROM_STORE","PICKUP"],"type":"string","title":"FacilityServiceType"},"SupplierForCreation":{"allOf":[{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/SupplierAddressForCreation"}},"type":"object","xml":{"name":"SupplierForCreation"},"title":"SupplierForCreation","description":"SupplierForCreation"},"SupplierAddressForCreation":{"properties":{"additionalAddressInfo":{"type":"string"},"city":{"pattern":"^.+$","type":"string"},"companyName":{"type":"string"},"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"customAttributes":{"description":"Attributes that can be added to the address. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"emailAddresses":{"items":{"$ref":"#/components/schemas/SupplierAddressEmailAddress"},"type":"array"},"houseNumber":{"pattern":"^.+$","type":"string"},"phoneNumbers":{"items":{"$ref":"#/components/schemas/SupplierAddressPhoneNumber"},"type":"array"},"postalCode":{"pattern":"^.+$","type":"string"},"province":{"pattern":"^.+$","type":"string"},"resolvedCoordinates":{"$ref":"#/components/schemas/Coordinates"},"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZoneForCreation","description":"User-specified time zone in identifier format (e.g., \"America/Los_Angeles\"). Used to determine local time. Relevant only if the country spans multiple time zones; otherwise, the time zone is automatically determined from the country or via Google if unspecified."},"street":{"pattern":"^.+$","type":"string"}},"required":["country","companyName"],"type":"object","title":"SupplierAddressForCreation","description":"SupplierAddressForCreation"},"SupplierAddressEmailAddress":{"properties":{"recipient":{"description":"Human readable information who is the recipient for emails sent to this address.","type":"string"},"value":{"format":"email","type":"string"}},"required":["value"],"type":"object","title":"SupplierAddressEmailAddress","description":"SupplierAddressEmailAddress"},"SupplierAddressPhoneNumber":{"properties":{"customAttributes":{"description":"Attributes that can be added to the phonenumber. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"label":{"description":"Can be used to give a description for the number, like \"private\", \"business number\", etc.","type":"string"},"type":{"enum":["MOBILE","PHONE"],"type":"string"},"value":{"description":"The number itself. We do not enforce any format (yet).","type":"string"}},"required":["value","type"],"type":"object","title":"SupplierAddressPhoneNumber","description":"SupplierAddressPhoneNumber"},"ManagedFacility":{"allOf":[{"$ref":"#/components/schemas/Facility"},{"$ref":"#/components/schemas/ManagedFacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/FacilityAddress"},"configs":{"items":{"$ref":"#/components/schemas/LinkedConfiguration"},"type":"array"}},"required":["status","address","name"],"type":"object","xml":{"name":"ManagedFacility"},"title":"ManagedFacility","description":"ManagedFacility"},"Facility":{"allOf":[{"$ref":"#/components/schemas/VersionedResource"},{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"id":{"description":"The id of this facility. It is generated during creation automatically and suits as the primary identifier of the described entity.","type":"string"},"operativeCosts":{"items":{"$ref":"#/components/schemas/FacilityOperativeCost"},"maxItems":1,"type":"array"}},"required":["id","type","status"],"type":"object","xml":{"name":"Facility"},"title":"Facility","description":"Facility"},"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"},"FacilityOperativeCost":{"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code.","nullable":true,"type":"string"},"decimalPlaces":{"description":"Number of decimal places for the given currency","minimum":0,"type":"integer"},"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","decimalPlaces"],"type":"object","title":"FacilityOperativeCost","description":"FacilityOperativeCost"},"FacilityAddress":{"allOf":[{"$ref":"#/components/schemas/FacilityAddressForCreation"},{"properties":{"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZone"}},"type":"object"}],"type":"object","xml":{"name":"FacilityAddress"},"title":"FacilityAddress","description":"FacilityAddress"},"TimeZone":{"description":"Timezone for information retrieved e.g. by the Google Maps API","properties":{"offsetInSeconds":{"description":"offset in seconds to standard time. Does not account for daylight saving time.","type":"number"},"source":{"description":"source of the timezone information","type":"string"},"timeZoneId":{"description":"official id of the timezone","type":"string"},"timeZoneName":{"description":"descriptive name of the timezone","type":"string"}},"required":["timeZoneId","timeZoneName","offsetInSeconds"],"type":"object","title":"TimeZone"},"LinkedConfiguration":{"properties":{"ref":{"type":"string"},"rel":{"type":"string"}},"type":"object","title":"LinkedConfiguration","description":"LinkedConfiguration"},"Supplier":{"allOf":[{"$ref":"#/components/schemas/Facility"},{"$ref":"#/components/schemas/SupplierForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/SupplierAddress"}},"type":"object","xml":{"name":"Supplier"},"title":"Supplier","description":"Supplier"},"SupplierAddress":{"allOf":[{"$ref":"#/components/schemas/SupplierAddressForCreation"},{"properties":{"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZone"}},"type":"object"}],"type":"object","title":"SupplierAddress","description":"SupplierAddress"},"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":{"post":{"description":"","operationId":"addFacility","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ManagedFacilityForCreation"},{"$ref":"#/components/schemas/SupplierForCreation"}]}}},"description":"Representation that describes the facility","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ManagedFacility"},{"$ref":"#/components/schemas/Supplier"}]}}},"description":"The facility was successfully created. The Location header contains the URL of the facility."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Invalid input. See response for details"},"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","tags":["Facilities (Core)"]}}}}
```

## GET /api/facilities/{facilityId}

> Get facility

```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 (Core)"}],"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":{"ManagedFacility":{"allOf":[{"$ref":"#/components/schemas/Facility"},{"$ref":"#/components/schemas/ManagedFacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/FacilityAddress"},"configs":{"items":{"$ref":"#/components/schemas/LinkedConfiguration"},"type":"array"}},"required":["status","address","name"],"type":"object","xml":{"name":"ManagedFacility"},"title":"ManagedFacility","description":"ManagedFacility"},"Facility":{"allOf":[{"$ref":"#/components/schemas/VersionedResource"},{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"id":{"description":"The id of this facility. It is generated during creation automatically and suits as the primary identifier of the described entity.","type":"string"},"operativeCosts":{"items":{"$ref":"#/components/schemas/FacilityOperativeCost"},"maxItems":1,"type":"array"}},"required":["id","type","status"],"type":"object","xml":{"name":"Facility"},"title":"Facility","description":"Facility"},"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"},"FacilityForCreation":{"properties":{"customAttributes":{"description":"Attributes that can be added to the facility. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"name":{"type":"string"},"operativeCosts":{"items":{"$ref":"#/components/schemas/FacilityOperativeCostForCreation"},"maxItems":1,"type":"array"},"status":{"$ref":"#/components/schemas/FacilityStatus"},"tenantFacilityId":{"description":"The id of the facility in the tenants own system","type":"string"},"type":{"$ref":"#/components/schemas/FacilityType","default":"MANAGED_FACILITY"},"tags":{"items":{"$ref":"#/components/schemas/TagReference"},"minItems":1,"type":"array"}},"required":["name"],"type":"object","xml":{"name":"FacilityForCreation"},"title":"FacilityForCreation","description":"FacilityForCreation"},"FacilityOperativeCostForCreation":{"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code.","nullable":true,"type":"string"},"decimalPlaces":{"description":"Number of decimal places for the given currency. We be defaulted according to the currency if missing.","minimum":0,"type":"integer"},"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":"FacilityOperativeCostForCreation","description":"FacilityOperativeCostForCreation"},"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"},"FacilityStatus":{"description":"The state of the facility. ONLINE means that this facility can process new orders and pickjobs, SUSPENDED means it cannot get new orders but is able to fulfill the current workload and OFFLINE means that it cannot fulfill any new or existing orders. Processes already running might be rescheduled to another facility depending on the preferences.","enum":["ONLINE","SUSPENDED","OFFLINE"],"type":"string","title":"FacilityStatus"},"FacilityType":{"default":"MANAGED_FACILITY","enum":["MANAGED_FACILITY","SUPPLIER"],"type":"string","xml":{"name":"FacilityType"},"title":"FacilityType","description":"FacilityType"},"TagReference":{"properties":{"id":{"type":"string"},"value":{"type":"string"}},"required":["value","id"],"title":"TagReference","description":"TagReference"},"FacilityOperativeCost":{"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code.","nullable":true,"type":"string"},"decimalPlaces":{"description":"Number of decimal places for the given currency","minimum":0,"type":"integer"},"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","decimalPlaces"],"type":"object","title":"FacilityOperativeCost","description":"FacilityOperativeCost"},"ManagedFacilityForCreation":{"allOf":[{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/FacilityAddressForCreation"},"capacityEnabled":{"default":false,"description":"Indicates that configured capacity limits for picking times are considered","type":"boolean"},"capacityPlanningTimeframe":{"description":"The range in days per facility which defines how many days in the future the capacity of the facility can be planned","minimum":1,"type":"integer"},"closingDays":{"description":"Days of the year where the facility is closed and doesn't allows picking","items":{"$ref":"#/components/schemas/ClosingDay"},"type":"array"},"contact":{"$ref":"#/components/schemas/FacilityContact"},"fulfillmentProcessBuffer":{"default":240,"description":"Duration in minutes until an order is processed","minimum":0,"type":"integer"},"locationType":{"$ref":"#/components/schemas/FacilityLocationType"},"pickingMethods":{"description":"Picking Methods supported by this facility.","items":{"$ref":"#/components/schemas/PickingMethodEnum"},"type":"array"},"pickingTimes":{"$ref":"#/components/schemas/PickingTimes","description":"Time ranges defining the picking times per weekday. No overlapping ranges are allowed"},"scanningRule":{"$ref":"#/components/schemas/ScanningRuleConfiguration"},"services":{"items":{"$ref":"#/components/schemas/FacilityService"},"type":"array"}},"required":["name","address"],"type":"object","xml":{"name":"ManagedFacilityForCreation"},"title":"ManagedFacilityForCreation","description":"ManagedFacilityForCreation"},"FacilityAddressForCreation":{"allOf":[{"$ref":"#/components/schemas/Address"},{"properties":{"companyName":{"type":"string"},"emailAddresses":{"items":{"properties":{"recipient":{"description":"Human readable information who is the recipient for emails sent to this address.","type":"string"},"value":{"type":"string"}},"required":["value"],"type":"object"},"type":"array"},"resolvedCoordinates":{"$ref":"#/components/schemas/Coordinates"},"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZoneForCreation","description":"User-specified time zone in identifier format (e.g., \"America/Los_Angeles\"). Used to determine local time. Relevant only if the country spans multiple time zones; otherwise, the time zone is automatically determined from the country or via Google if unspecified."}},"required":["companyName"],"type":"object"}],"type":"object","xml":{"name":"FacilityAddressForCreation"},"title":"FacilityAddressForCreation","description":"FacilityAddressForCreation"},"Address":{"properties":{"additionalAddressInfo":{"type":"string"},"city":{"pattern":"^.+$","type":"string"},"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"customAttributes":{"description":"Attributes that can be added to the address. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"houseNumber":{"pattern":"^.+$","type":"string"},"phoneNumbers":{"items":{"properties":{"customAttributes":{"description":"Attributes that can be added to the phonenumber. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"label":{"description":"Can be used to give a description for the number, like \"private\", \"business number\", etc.","type":"string"},"type":{"enum":["MOBILE","PHONE"],"type":"string"},"value":{"description":"The number itself. We do not enforce any format (yet).","type":"string"}},"required":["value","type"],"type":"object"},"type":"array"},"postalCode":{"pattern":"^.+$","type":"string"},"province":{"pattern":"^.+$","type":"string"},"street":{"pattern":"^.+$","type":"string"}},"required":["street","city","postalCode","country"],"type":"object","title":"Address","description":"Address"},"Coordinates":{"description":"Coordinates of the WGS84 geodetic reference system in Mercator projection, as used e.g. by the Google Maps API","properties":{"lat":{"description":"Latitude value","type":"number"},"lon":{"description":"Longitude value","type":"number"}},"required":["lat","lon"],"type":"object","title":"Coordinates"},"TimeZoneForCreation":{"description":"Self-provided timezone for determining the local time of a facility","properties":{"timeZoneId":{"description":"official id of the timezone","type":"string"}},"required":["timeZoneId"],"type":"object","title":"TimeZoneForCreation"},"ClosingDay":{"description":"At this day the facility is closed and does not do picking","properties":{"date":{"description":"The day at which the Facility is closed","format":"date-time","type":"string"},"reason":{"description":"The reason why the Facility is closed on this day","type":"string"},"recurrence":{"enum":["YEARLY","NONRECURRING"],"type":"string"}},"required":["reason","date","recurrence"],"type":"object","title":"ClosingDay"},"FacilityContact":{"properties":{"customAttributes":{"description":"Attributes that can be added to the contact. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"firstName":{"type":"string"},"lastName":{"type":"string"},"roleDescription":{"type":"string"}},"required":["firstName","lastName"],"type":"object","xml":{"name":"FacilityContact"},"title":"FacilityContact","description":"FacilityContact"},"FacilityLocationType":{"default":"STORE","enum":["STORE","WAREHOUSE","EXTERNAL"],"type":"string","xml":{"name":"FacilityLocationType"},"title":"FacilityLocationType","description":"FacilityLocationType"},"PickingMethodEnum":{"description":"Way in which the picking should be handled Deprecated: BATCH_PICKING, use BATCH instead","enum":["SINGLE_ORDER","MULTI_ORDER","BATCH_PICKING","BATCH"],"type":"string","title":"PickingMethodEnum"},"PickingTimes":{"description":"Time ranges defining the picking times per weekday. No overlapping ranges are allowed. There must be no overlaps for time ranges on a day","properties":{"friday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"monday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"saturday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"sunday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"thursday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"tuesday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"wednesday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"}},"type":"object","title":"PickingTimes"},"TimeRange":{"properties":{"capacity":{"minimum":0,"type":"number"},"end":{"$ref":"#/components/schemas/TimeStamp"},"start":{"$ref":"#/components/schemas/TimeStamp"}},"required":["start","end"],"type":"object","title":"TimeRange","description":"TimeRange"},"TimeStamp":{"properties":{"hour":{"maximum":23,"minimum":0,"type":"number"},"minute":{"maximum":59,"minimum":0,"type":"number"}},"required":["hour","minute"],"type":"object","title":"TimeStamp","description":"TimeStamp"},"ScanningRuleConfiguration":{"description":"Configuration to show the client how the items should be scanned during picking","properties":{"values":{"items":{"$ref":"#/components/schemas/ScanningRuleValue"},"type":"array"}},"title":"ScanningRuleConfiguration"},"ScanningRuleValue":{"properties":{"priority":{"description":"This field allows you to rank scanningRuleType against each other. The lowest number is the most preferable.","minimum":0,"type":"number"},"scanningRuleType":{"$ref":"#/components/schemas/ScanningRuleTypeEnum"}},"required":["priority","scanningRuleType"],"title":"ScanningRuleValue","description":"ScanningRuleValue"},"ScanningRuleTypeEnum":{"description":"Type of scanning rule","enum":["ARTICLE","LOCATION"],"type":"string","title":"ScanningRuleTypeEnum"},"FacilityService":{"additionalProperties":false,"properties":{"type":{"$ref":"#/components/schemas/FacilityServiceType"}},"required":["type"],"type":"object","xml":{"name":"FacilityService"},"title":"FacilityService","description":"FacilityService"},"FacilityServiceType":{"description":"The description of the service this facility offers.","enum":["SHIP_FROM_STORE","PICKUP"],"type":"string","title":"FacilityServiceType"},"FacilityAddress":{"allOf":[{"$ref":"#/components/schemas/FacilityAddressForCreation"},{"properties":{"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZone"}},"type":"object"}],"type":"object","xml":{"name":"FacilityAddress"},"title":"FacilityAddress","description":"FacilityAddress"},"TimeZone":{"description":"Timezone for information retrieved e.g. by the Google Maps API","properties":{"offsetInSeconds":{"description":"offset in seconds to standard time. Does not account for daylight saving time.","type":"number"},"source":{"description":"source of the timezone information","type":"string"},"timeZoneId":{"description":"official id of the timezone","type":"string"},"timeZoneName":{"description":"descriptive name of the timezone","type":"string"}},"required":["timeZoneId","timeZoneName","offsetInSeconds"],"type":"object","title":"TimeZone"},"LinkedConfiguration":{"properties":{"ref":{"type":"string"},"rel":{"type":"string"}},"type":"object","title":"LinkedConfiguration","description":"LinkedConfiguration"},"Supplier":{"allOf":[{"$ref":"#/components/schemas/Facility"},{"$ref":"#/components/schemas/SupplierForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/SupplierAddress"}},"type":"object","xml":{"name":"Supplier"},"title":"Supplier","description":"Supplier"},"SupplierForCreation":{"allOf":[{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/SupplierAddressForCreation"}},"type":"object","xml":{"name":"SupplierForCreation"},"title":"SupplierForCreation","description":"SupplierForCreation"},"SupplierAddressForCreation":{"properties":{"additionalAddressInfo":{"type":"string"},"city":{"pattern":"^.+$","type":"string"},"companyName":{"type":"string"},"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"customAttributes":{"description":"Attributes that can be added to the address. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"emailAddresses":{"items":{"$ref":"#/components/schemas/SupplierAddressEmailAddress"},"type":"array"},"houseNumber":{"pattern":"^.+$","type":"string"},"phoneNumbers":{"items":{"$ref":"#/components/schemas/SupplierAddressPhoneNumber"},"type":"array"},"postalCode":{"pattern":"^.+$","type":"string"},"province":{"pattern":"^.+$","type":"string"},"resolvedCoordinates":{"$ref":"#/components/schemas/Coordinates"},"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZoneForCreation","description":"User-specified time zone in identifier format (e.g., \"America/Los_Angeles\"). Used to determine local time. Relevant only if the country spans multiple time zones; otherwise, the time zone is automatically determined from the country or via Google if unspecified."},"street":{"pattern":"^.+$","type":"string"}},"required":["country","companyName"],"type":"object","title":"SupplierAddressForCreation","description":"SupplierAddressForCreation"},"SupplierAddressEmailAddress":{"properties":{"recipient":{"description":"Human readable information who is the recipient for emails sent to this address.","type":"string"},"value":{"format":"email","type":"string"}},"required":["value"],"type":"object","title":"SupplierAddressEmailAddress","description":"SupplierAddressEmailAddress"},"SupplierAddressPhoneNumber":{"properties":{"customAttributes":{"description":"Attributes that can be added to the phonenumber. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"label":{"description":"Can be used to give a description for the number, like \"private\", \"business number\", etc.","type":"string"},"type":{"enum":["MOBILE","PHONE"],"type":"string"},"value":{"description":"The number itself. We do not enforce any format (yet).","type":"string"}},"required":["value","type"],"type":"object","title":"SupplierAddressPhoneNumber","description":"SupplierAddressPhoneNumber"},"SupplierAddress":{"allOf":[{"$ref":"#/components/schemas/SupplierAddressForCreation"},{"properties":{"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZone"}},"type":"object"}],"type":"object","title":"SupplierAddress","description":"SupplierAddress"},"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}":{"get":{"description":"","operationId":"getFacility","parameters":[{"description":"ID of facility you want to get. Also accepts tenantFacilityId in urn format (e.g. urn:fft:facility:tenantFacilityId:{your-tenant-facility-id}).","in":"path","name":"facilityId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ManagedFacility"},{"$ref":"#/components/schemas/Supplier"}]}}},"description":"Facility was found & you were allowed to access it. The result is in the body."},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Facility not found"}},"summary":"Get facility","tags":["Facilities (Core)"]}}}}
```

## PUT /api/facilities/{facilityId}

> Update facility

```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 (Core)"}],"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":{"ManagedFacilityForReplacement":{"additionalProperties":false,"properties":{"address":{"$ref":"#/components/schemas/FacilityAddressForCreation"},"capacityEnabled":{"default":false,"description":"Indicates that configured capacity limits for picking times are considered","type":"boolean"},"capacityPlanningTimeframe":{"description":"The range in days per facility which defines how many days in the future the capacity of the facility can be planned","minimum":1,"type":"integer"},"closingDays":{"description":"Days of the year where the facility is closed and doesn't allows picking","items":{"$ref":"#/components/schemas/ClosingDay"},"type":"array"},"configs":{"items":{"$ref":"#/components/schemas/LinkedConfiguration"},"type":"array"},"contact":{"$ref":"#/components/schemas/FacilityContact"},"customAttributes":{"description":"Attributes that can be added to the facility. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"fulfillmentProcessBuffer":{"default":240,"description":"Duration in minutes until an order is processed","minimum":0,"type":"integer"},"locationType":{"$ref":"#/components/schemas/FacilityLocationType"},"name":{"type":"string"},"pickingMethods":{"description":"Picking Methods supported by this facility.","items":{"$ref":"#/components/schemas/PickingMethodEnum"},"type":"array"},"pickingTimes":{"$ref":"#/components/schemas/PickingTimes"},"scanningRule":{"$ref":"#/components/schemas/ScanningRuleConfiguration"},"services":{"items":{"$ref":"#/components/schemas/FacilityService"},"type":"array"},"status":{"$ref":"#/components/schemas/FacilityStatus"},"tenantFacilityId":{"description":"The id of the facility in the tenants own system","type":"string"},"type":{"$ref":"#/components/schemas/FacilityType"},"version":{"description":"The version of the document to be used in optimistic locking mechanisms.","format":"int64","type":"integer"},"tags":{"items":{"$ref":"#/components/schemas/TagReference"},"minItems":1,"type":"array"}},"discriminator":{"propertyName":"type"},"required":["version","type","status","name","address","locationType","fulfillmentProcessBuffer","capacityEnabled"],"type":"object","xml":{"name":"ManagedFacilityForReplacement"},"title":"ManagedFacilityForReplacement","description":"ManagedFacilityForReplacement"},"FacilityAddressForCreation":{"allOf":[{"$ref":"#/components/schemas/Address"},{"properties":{"companyName":{"type":"string"},"emailAddresses":{"items":{"properties":{"recipient":{"description":"Human readable information who is the recipient for emails sent to this address.","type":"string"},"value":{"type":"string"}},"required":["value"],"type":"object"},"type":"array"},"resolvedCoordinates":{"$ref":"#/components/schemas/Coordinates"},"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZoneForCreation","description":"User-specified time zone in identifier format (e.g., \"America/Los_Angeles\"). Used to determine local time. Relevant only if the country spans multiple time zones; otherwise, the time zone is automatically determined from the country or via Google if unspecified."}},"required":["companyName"],"type":"object"}],"type":"object","xml":{"name":"FacilityAddressForCreation"},"title":"FacilityAddressForCreation","description":"FacilityAddressForCreation"},"Address":{"properties":{"additionalAddressInfo":{"type":"string"},"city":{"pattern":"^.+$","type":"string"},"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"customAttributes":{"description":"Attributes that can be added to the address. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"houseNumber":{"pattern":"^.+$","type":"string"},"phoneNumbers":{"items":{"properties":{"customAttributes":{"description":"Attributes that can be added to the phonenumber. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"label":{"description":"Can be used to give a description for the number, like \"private\", \"business number\", etc.","type":"string"},"type":{"enum":["MOBILE","PHONE"],"type":"string"},"value":{"description":"The number itself. We do not enforce any format (yet).","type":"string"}},"required":["value","type"],"type":"object"},"type":"array"},"postalCode":{"pattern":"^.+$","type":"string"},"province":{"pattern":"^.+$","type":"string"},"street":{"pattern":"^.+$","type":"string"}},"required":["street","city","postalCode","country"],"type":"object","title":"Address","description":"Address"},"Coordinates":{"description":"Coordinates of the WGS84 geodetic reference system in Mercator projection, as used e.g. by the Google Maps API","properties":{"lat":{"description":"Latitude value","type":"number"},"lon":{"description":"Longitude value","type":"number"}},"required":["lat","lon"],"type":"object","title":"Coordinates"},"TimeZoneForCreation":{"description":"Self-provided timezone for determining the local time of a facility","properties":{"timeZoneId":{"description":"official id of the timezone","type":"string"}},"required":["timeZoneId"],"type":"object","title":"TimeZoneForCreation"},"ClosingDay":{"description":"At this day the facility is closed and does not do picking","properties":{"date":{"description":"The day at which the Facility is closed","format":"date-time","type":"string"},"reason":{"description":"The reason why the Facility is closed on this day","type":"string"},"recurrence":{"enum":["YEARLY","NONRECURRING"],"type":"string"}},"required":["reason","date","recurrence"],"type":"object","title":"ClosingDay"},"LinkedConfiguration":{"properties":{"ref":{"type":"string"},"rel":{"type":"string"}},"type":"object","title":"LinkedConfiguration","description":"LinkedConfiguration"},"FacilityContact":{"properties":{"customAttributes":{"description":"Attributes that can be added to the contact. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"firstName":{"type":"string"},"lastName":{"type":"string"},"roleDescription":{"type":"string"}},"required":["firstName","lastName"],"type":"object","xml":{"name":"FacilityContact"},"title":"FacilityContact","description":"FacilityContact"},"FacilityLocationType":{"default":"STORE","enum":["STORE","WAREHOUSE","EXTERNAL"],"type":"string","xml":{"name":"FacilityLocationType"},"title":"FacilityLocationType","description":"FacilityLocationType"},"PickingMethodEnum":{"description":"Way in which the picking should be handled Deprecated: BATCH_PICKING, use BATCH instead","enum":["SINGLE_ORDER","MULTI_ORDER","BATCH_PICKING","BATCH"],"type":"string","title":"PickingMethodEnum"},"PickingTimes":{"description":"Time ranges defining the picking times per weekday. No overlapping ranges are allowed. There must be no overlaps for time ranges on a day","properties":{"friday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"monday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"saturday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"sunday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"thursday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"tuesday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"wednesday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"}},"type":"object","title":"PickingTimes"},"TimeRange":{"properties":{"capacity":{"minimum":0,"type":"number"},"end":{"$ref":"#/components/schemas/TimeStamp"},"start":{"$ref":"#/components/schemas/TimeStamp"}},"required":["start","end"],"type":"object","title":"TimeRange","description":"TimeRange"},"TimeStamp":{"properties":{"hour":{"maximum":23,"minimum":0,"type":"number"},"minute":{"maximum":59,"minimum":0,"type":"number"}},"required":["hour","minute"],"type":"object","title":"TimeStamp","description":"TimeStamp"},"ScanningRuleConfiguration":{"description":"Configuration to show the client how the items should be scanned during picking","properties":{"values":{"items":{"$ref":"#/components/schemas/ScanningRuleValue"},"type":"array"}},"title":"ScanningRuleConfiguration"},"ScanningRuleValue":{"properties":{"priority":{"description":"This field allows you to rank scanningRuleType against each other. The lowest number is the most preferable.","minimum":0,"type":"number"},"scanningRuleType":{"$ref":"#/components/schemas/ScanningRuleTypeEnum"}},"required":["priority","scanningRuleType"],"title":"ScanningRuleValue","description":"ScanningRuleValue"},"ScanningRuleTypeEnum":{"description":"Type of scanning rule","enum":["ARTICLE","LOCATION"],"type":"string","title":"ScanningRuleTypeEnum"},"FacilityService":{"additionalProperties":false,"properties":{"type":{"$ref":"#/components/schemas/FacilityServiceType"}},"required":["type"],"type":"object","xml":{"name":"FacilityService"},"title":"FacilityService","description":"FacilityService"},"FacilityServiceType":{"description":"The description of the service this facility offers.","enum":["SHIP_FROM_STORE","PICKUP"],"type":"string","title":"FacilityServiceType"},"FacilityStatus":{"description":"The state of the facility. ONLINE means that this facility can process new orders and pickjobs, SUSPENDED means it cannot get new orders but is able to fulfill the current workload and OFFLINE means that it cannot fulfill any new or existing orders. Processes already running might be rescheduled to another facility depending on the preferences.","enum":["ONLINE","SUSPENDED","OFFLINE"],"type":"string","title":"FacilityStatus"},"FacilityType":{"default":"MANAGED_FACILITY","enum":["MANAGED_FACILITY","SUPPLIER"],"type":"string","xml":{"name":"FacilityType"},"title":"FacilityType","description":"FacilityType"},"TagReference":{"properties":{"id":{"type":"string"},"value":{"type":"string"}},"required":["value","id"],"title":"TagReference","description":"TagReference"},"SupplierForReplacement":{"additionalProperties":false,"properties":{"address":{"$ref":"#/components/schemas/SupplierAddressForCreation"},"customAttributes":{"description":"Attributes that can be added to the facility. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"name":{"type":"string"},"status":{"$ref":"#/components/schemas/FacilityStatus"},"tenantFacilityId":{"description":"The id of the facility in the tenants own system","type":"string"},"type":{"$ref":"#/components/schemas/FacilityType"},"version":{"description":"The version of the document to be used in optimistic locking mechanisms.","format":"int64","type":"integer"},"tags":{"items":{"$ref":"#/components/schemas/TagReference"},"minItems":1,"type":"array"}},"required":["version","name","status","type"],"type":"object","discriminator":{"propertyName":"type"},"xml":{"name":"SupplierForReplacement"},"title":"SupplierForReplacement","description":"SupplierForReplacement"},"SupplierAddressForCreation":{"properties":{"additionalAddressInfo":{"type":"string"},"city":{"pattern":"^.+$","type":"string"},"companyName":{"type":"string"},"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"customAttributes":{"description":"Attributes that can be added to the address. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"emailAddresses":{"items":{"$ref":"#/components/schemas/SupplierAddressEmailAddress"},"type":"array"},"houseNumber":{"pattern":"^.+$","type":"string"},"phoneNumbers":{"items":{"$ref":"#/components/schemas/SupplierAddressPhoneNumber"},"type":"array"},"postalCode":{"pattern":"^.+$","type":"string"},"province":{"pattern":"^.+$","type":"string"},"resolvedCoordinates":{"$ref":"#/components/schemas/Coordinates"},"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZoneForCreation","description":"User-specified time zone in identifier format (e.g., \"America/Los_Angeles\"). Used to determine local time. Relevant only if the country spans multiple time zones; otherwise, the time zone is automatically determined from the country or via Google if unspecified."},"street":{"pattern":"^.+$","type":"string"}},"required":["country","companyName"],"type":"object","title":"SupplierAddressForCreation","description":"SupplierAddressForCreation"},"SupplierAddressEmailAddress":{"properties":{"recipient":{"description":"Human readable information who is the recipient for emails sent to this address.","type":"string"},"value":{"format":"email","type":"string"}},"required":["value"],"type":"object","title":"SupplierAddressEmailAddress","description":"SupplierAddressEmailAddress"},"SupplierAddressPhoneNumber":{"properties":{"customAttributes":{"description":"Attributes that can be added to the phonenumber. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"label":{"description":"Can be used to give a description for the number, like \"private\", \"business number\", etc.","type":"string"},"type":{"enum":["MOBILE","PHONE"],"type":"string"},"value":{"description":"The number itself. We do not enforce any format (yet).","type":"string"}},"required":["value","type"],"type":"object","title":"SupplierAddressPhoneNumber","description":"SupplierAddressPhoneNumber"},"ManagedFacility":{"allOf":[{"$ref":"#/components/schemas/Facility"},{"$ref":"#/components/schemas/ManagedFacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/FacilityAddress"},"configs":{"items":{"$ref":"#/components/schemas/LinkedConfiguration"},"type":"array"}},"required":["status","address","name"],"type":"object","xml":{"name":"ManagedFacility"},"title":"ManagedFacility","description":"ManagedFacility"},"Facility":{"allOf":[{"$ref":"#/components/schemas/VersionedResource"},{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"id":{"description":"The id of this facility. It is generated during creation automatically and suits as the primary identifier of the described entity.","type":"string"},"operativeCosts":{"items":{"$ref":"#/components/schemas/FacilityOperativeCost"},"maxItems":1,"type":"array"}},"required":["id","type","status"],"type":"object","xml":{"name":"Facility"},"title":"Facility","description":"Facility"},"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"},"FacilityForCreation":{"properties":{"customAttributes":{"description":"Attributes that can be added to the facility. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"name":{"type":"string"},"operativeCosts":{"items":{"$ref":"#/components/schemas/FacilityOperativeCostForCreation"},"maxItems":1,"type":"array"},"status":{"$ref":"#/components/schemas/FacilityStatus"},"tenantFacilityId":{"description":"The id of the facility in the tenants own system","type":"string"},"type":{"$ref":"#/components/schemas/FacilityType","default":"MANAGED_FACILITY"},"tags":{"items":{"$ref":"#/components/schemas/TagReference"},"minItems":1,"type":"array"}},"required":["name"],"type":"object","xml":{"name":"FacilityForCreation"},"title":"FacilityForCreation","description":"FacilityForCreation"},"FacilityOperativeCostForCreation":{"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code.","nullable":true,"type":"string"},"decimalPlaces":{"description":"Number of decimal places for the given currency. We be defaulted according to the currency if missing.","minimum":0,"type":"integer"},"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":"FacilityOperativeCostForCreation","description":"FacilityOperativeCostForCreation"},"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"},"FacilityOperativeCost":{"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code.","nullable":true,"type":"string"},"decimalPlaces":{"description":"Number of decimal places for the given currency","minimum":0,"type":"integer"},"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","decimalPlaces"],"type":"object","title":"FacilityOperativeCost","description":"FacilityOperativeCost"},"ManagedFacilityForCreation":{"allOf":[{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/FacilityAddressForCreation"},"capacityEnabled":{"default":false,"description":"Indicates that configured capacity limits for picking times are considered","type":"boolean"},"capacityPlanningTimeframe":{"description":"The range in days per facility which defines how many days in the future the capacity of the facility can be planned","minimum":1,"type":"integer"},"closingDays":{"description":"Days of the year where the facility is closed and doesn't allows picking","items":{"$ref":"#/components/schemas/ClosingDay"},"type":"array"},"contact":{"$ref":"#/components/schemas/FacilityContact"},"fulfillmentProcessBuffer":{"default":240,"description":"Duration in minutes until an order is processed","minimum":0,"type":"integer"},"locationType":{"$ref":"#/components/schemas/FacilityLocationType"},"pickingMethods":{"description":"Picking Methods supported by this facility.","items":{"$ref":"#/components/schemas/PickingMethodEnum"},"type":"array"},"pickingTimes":{"$ref":"#/components/schemas/PickingTimes","description":"Time ranges defining the picking times per weekday. No overlapping ranges are allowed"},"scanningRule":{"$ref":"#/components/schemas/ScanningRuleConfiguration"},"services":{"items":{"$ref":"#/components/schemas/FacilityService"},"type":"array"}},"required":["name","address"],"type":"object","xml":{"name":"ManagedFacilityForCreation"},"title":"ManagedFacilityForCreation","description":"ManagedFacilityForCreation"},"FacilityAddress":{"allOf":[{"$ref":"#/components/schemas/FacilityAddressForCreation"},{"properties":{"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZone"}},"type":"object"}],"type":"object","xml":{"name":"FacilityAddress"},"title":"FacilityAddress","description":"FacilityAddress"},"TimeZone":{"description":"Timezone for information retrieved e.g. by the Google Maps API","properties":{"offsetInSeconds":{"description":"offset in seconds to standard time. Does not account for daylight saving time.","type":"number"},"source":{"description":"source of the timezone information","type":"string"},"timeZoneId":{"description":"official id of the timezone","type":"string"},"timeZoneName":{"description":"descriptive name of the timezone","type":"string"}},"required":["timeZoneId","timeZoneName","offsetInSeconds"],"type":"object","title":"TimeZone"},"Supplier":{"allOf":[{"$ref":"#/components/schemas/Facility"},{"$ref":"#/components/schemas/SupplierForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/SupplierAddress"}},"type":"object","xml":{"name":"Supplier"},"title":"Supplier","description":"Supplier"},"SupplierForCreation":{"allOf":[{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/SupplierAddressForCreation"}},"type":"object","xml":{"name":"SupplierForCreation"},"title":"SupplierForCreation","description":"SupplierForCreation"},"SupplierAddress":{"allOf":[{"$ref":"#/components/schemas/SupplierAddressForCreation"},{"properties":{"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZone"}},"type":"object"}],"type":"object","title":"SupplierAddress","description":"SupplierAddress"},"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}":{"put":{"operationId":"replaceFacility","parameters":[{"description":"ID of facility you want to replace. Also accepts tenantFacilityId in urn format (e.g. urn:fft:facility:tenantFacilityId:{your-tenant-facility-id}).","in":"path","name":"facilityId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ManagedFacilityForReplacement"},{"$ref":"#/components/schemas/SupplierForReplacement"}],"discriminator":{"propertyName":"type","mapping":{"MANAGED_FACILITY":"#/components/schemas/ManagedFacilityForReplacement","SUPPLIER":"#/components/schemas/SupplierForReplacement"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ManagedFacility"},{"$ref":"#/components/schemas/Supplier"}]}}},"description":"Facility was replaced. The replaced facility is in the body."},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Facility not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Facility version conflict"}},"summary":"Update facility","tags":["Facilities (Core)"]}}}}
```

## DELETE /api/facilities/{facilityId}

> Delete facility

```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 (Core)"}],"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":{"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}":{"delete":{"description":"","operationId":"deleteFacility","parameters":[{"description":"ID of facility you want to delete. Also accepts tenantFacilityId in urn format (e.g. urn:fft:facility:tenantFacilityId:{your-tenant-facility-id}).","in":"path","name":"facilityId","required":true,"schema":{"type":"string"}},{"description":"cascading deletion without pre condition check","in":"query","name":"forceDeletion","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"Facility was found & you were allowed to delete it."},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Facility not found"}},"summary":"Delete facility","tags":["Facilities (Core)"]}}}}
```

## PATCH /api/facilities/{facilityId}

> Update facility

```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 (Core)"}],"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":{"FacilityPatchActions":{"description":"This part of the API is deprecated. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Deprecated; works only on managed facilities. Prefer to use ManagedFacilityForModification / SupplierForModification for full compatibility.","properties":{"actions":{"items":{"$ref":"#/components/schemas/ModifyFacility"},"minItems":1,"type":"array"},"version":{"description":"The version of the document to be used in optimistic locking mechanisms.","format":"int64","type":"integer"}},"required":["version","actions"],"type":"object","xml":{"name":"FacilityPatchActions"},"title":"FacilityPatchActions","deprecated":true},"ModifyFacility":{"allOf":[{"$ref":"#/components/schemas/AbstractModificationAction"},{"additionalProperties":false,"properties":{"action":{"description":"Use value 'ModifyFacility', because you want to modify a facility","enum":["ModifyFacility"],"type":"string"},"address":{"$ref":"#/components/schemas/ModifyFacilityAddress"},"capacityEnabled":{"type":"boolean"},"capacityPlanningTimeframe":{"description":"The range in days per facility which defines how many days in the future the capacity of the facility can be planned","minimum":1,"type":"integer"},"closingDays":{"description":"Days of the year where the facility is closed and doesn't allows picking","items":{"$ref":"#/components/schemas/ClosingDay"},"type":"array"},"contact":{"$ref":"#/components/schemas/FacilityContact"},"customAttributes":{"description":"Attributes that can be added to the facility. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"fulfillmentProcessBuffer":{"description":"Duration in minutes until an order is processed","minimum":0,"type":"integer"},"locationType":{"$ref":"#/components/schemas/FacilityLocationType"},"name":{"type":"string"},"operativeCosts":{"items":{"$ref":"#/components/schemas/FacilityOperativeCostForCreation"},"maxItems":1,"type":"array"},"pickingMethods":{"description":"Picking Methods supported by this facility.","items":{"$ref":"#/components/schemas/PickingMethodEnum"},"type":"array"},"pickingTimes":{"$ref":"#/components/schemas/PickingTimes","description":"Time ranges defining the picking times per weekday. No overlapping ranges are allowed"},"scanningRule":{"$ref":"#/components/schemas/ScanningRuleConfiguration"},"services":{"items":{"properties":{"type":{"description":"The description of the service this facility offers.","enum":["SHIP_FROM_STORE","PICKUP"],"type":"string"}},"required":["type"],"type":"object"},"type":"array"},"status":{"description":"The state of the facility. ONLINE means that this facility can process new orders and pickjobs, SUSPENDED means it cannot get new orders but is able to fulfill the current workload and OFFLINE means that it cannot fulfill any new or existing orders. Processes already running might be rescheduled to another facility depending on the preferences.","enum":["ONLINE","SUSPENDED","OFFLINE"],"type":"string"},"tenantFacilityId":{"description":"The id of the facility in the tenants own system","type":"string"},"tags":{"items":{"$ref":"#/components/schemas/TagReference"},"minItems":0,"type":"array"}},"required":["action"],"type":"object"}],"xml":{"name":"ModifyFacility"},"title":"ModifyFacility","description":"ModifyFacility"},"AbstractModificationAction":{"discriminator":{"propertyName":"action"},"properties":{"action":{"description":"","enum":["AddAllowedValueToTag","ModifyPickJob","ModifyPickJobLastEditor","RestartPickJob","ResetPickJob","CancelPickRun","CancelHandoverjob","AbortPickJob","FinishPickRun","StartPickRun","ModifyPickLineItem","ModifyPickRunLineItem","ModifyPackJob","PausePackJob","ModifyPackLineItem","SplitLineItemsPackJob","ModifyFacility","ModifyListing","ModifyRetainedOfflineStock","ModifyListingReactivationAfter","ModifyUser","ModifyShipment","ModifyHandoverjob","ModifyCarrier","ModifyShortpick","ModifyRoutingPlan","ModifyFence","ModifyRating","ModifyTimingMode","ModifyGlobalRoutingConfiguration","ModifyOrderSplit","ModifyPrioritization","ModifyLoadUnitType","ModifyFeature","ModifyParcel","ModifyParcelLoadUnit","ModifyRestowItem","RemovePickJobFromPickRun","ModifyPartialStock","AddTagsToProcess","AssignFacilityToProcess","UpdateGdprCleanupDateAction","ModifyStorageLocation","ModifyPackingContainerType","ModifyPackingContainerTypeIcon","ReplaceCodesInPackingTargetContainer","ReplaceLoadUnitLineItems","AddLineItemToPackingTargetContainer","RemoveLineItemFromPackingTargetContainer","UpdateLineItemOnPackingTargetContainer","UpdatePackingTargetContainerLineItemRecordableAttributes","ModifyCustomService","UnlockOrder"],"type":"string"}},"required":["action"],"type":"object","xml":{"name":"AbstractModificationAction"},"title":"AbstractModificationAction","description":"AbstractModificationAction"},"ModifyFacilityAddress":{"allOf":[{"$ref":"#/components/schemas/ModifyAddress"},{"type":"object"},{"properties":{"companyName":{"type":"string"},"emailAddresses":{"items":{"properties":{"recipient":{"description":"Human readable information who is the recipient for emails sent to this address.","type":"string"},"value":{"format":"email","type":"string"}},"required":["value"],"type":"object"},"type":"array"}},"type":"object"}],"title":"ModifyFacilityAddress","description":"ModifyFacilityAddress"},"ModifyAddress":{"properties":{"additionalAddressInfo":{"type":"string"},"city":{"pattern":"^.+$","type":"string"},"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"customAttributes":{"description":"Attributes that can be added to the address. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"houseNumber":{"pattern":"^.+$","type":"string"},"phoneNumbers":{"items":{"properties":{"customAttributes":{"description":"Attributes that can be added to the phonenumber. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"label":{"description":"Can be used to give a description for the number, like \"private\", \"business number\", etc.","type":"string"},"type":{"enum":["MOBILE","PHONE"],"type":"string"},"value":{"description":"The number itself. We do not enforce any format (yet).","type":"string"}},"type":"object"},"type":"array"},"postalCode":{"pattern":"^.+$","type":"string"},"province":{"pattern":"^.+$","type":"string"},"resolvedCoordinates":{"$ref":"#/components/schemas/Coordinates"},"street":{"pattern":"^.+$","type":"string"}},"type":"object","title":"ModifyAddress","description":"ModifyAddress"},"Coordinates":{"description":"Coordinates of the WGS84 geodetic reference system in Mercator projection, as used e.g. by the Google Maps API","properties":{"lat":{"description":"Latitude value","type":"number"},"lon":{"description":"Longitude value","type":"number"}},"required":["lat","lon"],"type":"object","title":"Coordinates"},"ClosingDay":{"description":"At this day the facility is closed and does not do picking","properties":{"date":{"description":"The day at which the Facility is closed","format":"date-time","type":"string"},"reason":{"description":"The reason why the Facility is closed on this day","type":"string"},"recurrence":{"enum":["YEARLY","NONRECURRING"],"type":"string"}},"required":["reason","date","recurrence"],"type":"object","title":"ClosingDay"},"FacilityContact":{"properties":{"customAttributes":{"description":"Attributes that can be added to the contact. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"firstName":{"type":"string"},"lastName":{"type":"string"},"roleDescription":{"type":"string"}},"required":["firstName","lastName"],"type":"object","xml":{"name":"FacilityContact"},"title":"FacilityContact","description":"FacilityContact"},"FacilityLocationType":{"default":"STORE","enum":["STORE","WAREHOUSE","EXTERNAL"],"type":"string","xml":{"name":"FacilityLocationType"},"title":"FacilityLocationType","description":"FacilityLocationType"},"FacilityOperativeCostForCreation":{"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code.","nullable":true,"type":"string"},"decimalPlaces":{"description":"Number of decimal places for the given currency. We be defaulted according to the currency if missing.","minimum":0,"type":"integer"},"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":"FacilityOperativeCostForCreation","description":"FacilityOperativeCostForCreation"},"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"},"PickingMethodEnum":{"description":"Way in which the picking should be handled Deprecated: BATCH_PICKING, use BATCH instead","enum":["SINGLE_ORDER","MULTI_ORDER","BATCH_PICKING","BATCH"],"type":"string","title":"PickingMethodEnum"},"PickingTimes":{"description":"Time ranges defining the picking times per weekday. No overlapping ranges are allowed. There must be no overlaps for time ranges on a day","properties":{"friday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"monday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"saturday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"sunday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"thursday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"tuesday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"wednesday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"}},"type":"object","title":"PickingTimes"},"TimeRange":{"properties":{"capacity":{"minimum":0,"type":"number"},"end":{"$ref":"#/components/schemas/TimeStamp"},"start":{"$ref":"#/components/schemas/TimeStamp"}},"required":["start","end"],"type":"object","title":"TimeRange","description":"TimeRange"},"TimeStamp":{"properties":{"hour":{"maximum":23,"minimum":0,"type":"number"},"minute":{"maximum":59,"minimum":0,"type":"number"}},"required":["hour","minute"],"type":"object","title":"TimeStamp","description":"TimeStamp"},"ScanningRuleConfiguration":{"description":"Configuration to show the client how the items should be scanned during picking","properties":{"values":{"items":{"$ref":"#/components/schemas/ScanningRuleValue"},"type":"array"}},"title":"ScanningRuleConfiguration"},"ScanningRuleValue":{"properties":{"priority":{"description":"This field allows you to rank scanningRuleType against each other. The lowest number is the most preferable.","minimum":0,"type":"number"},"scanningRuleType":{"$ref":"#/components/schemas/ScanningRuleTypeEnum"}},"required":["priority","scanningRuleType"],"title":"ScanningRuleValue","description":"ScanningRuleValue"},"ScanningRuleTypeEnum":{"description":"Type of scanning rule","enum":["ARTICLE","LOCATION"],"type":"string","title":"ScanningRuleTypeEnum"},"TagReference":{"properties":{"id":{"type":"string"},"value":{"type":"string"}},"required":["value","id"],"title":"TagReference","description":"TagReference"},"ManagedFacilityForModification":{"additionalProperties":false,"properties":{"address":{"$ref":"#/components/schemas/FacilityAddressForCreation"},"capacityEnabled":{"description":"Indicates that configured capacity limits for picking times are considered","nullable":true,"type":"boolean"},"capacityPlanningTimeframe":{"description":"The range in days per facility which defines how many days in the future the capacity of the facility can be planned","minimum":1,"nullable":true,"type":"integer"},"closingDays":{"description":"Days of the year where the facility is closed and doesn't allows picking","items":{"$ref":"#/components/schemas/ClosingDay"},"nullable":true,"type":"array"},"configs":{"items":{"$ref":"#/components/schemas/LinkedConfiguration"},"nullable":true,"type":"array"},"contact":{"allOf":[{"$ref":"#/components/schemas/FacilityContact"}],"nullable":true,"type":"object"},"customAttributes":{"description":"Attributes that can be added to the facility. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","nullable":true,"type":"object"},"fulfillmentProcessBuffer":{"description":"Duration in minutes until an order is processed","minimum":0,"nullable":true,"type":"integer"},"locationType":{"allOf":[{"$ref":"#/components/schemas/FacilityLocationType"}],"nullable":true,"type":"string"},"name":{"type":"string"},"pickingMethods":{"description":"Picking Methods supported by this facility.","items":{"$ref":"#/components/schemas/PickingMethodEnum"},"nullable":true,"type":"array"},"pickingTimes":{"allOf":[{"$ref":"#/components/schemas/PickingTimes"}],"nullable":true,"type":"object"},"scanningRule":{"allOf":[{"$ref":"#/components/schemas/ScanningRuleConfiguration"}],"nullable":true,"type":"object"},"services":{"items":{"$ref":"#/components/schemas/FacilityService"},"nullable":true,"type":"array"},"status":{"$ref":"#/components/schemas/FacilityStatus"},"tenantFacilityId":{"description":"The id of the facility in the tenants own system","nullable":true,"type":"string"},"type":{"$ref":"#/components/schemas/FacilityType"},"version":{"description":"The version of the document to be used in optimistic locking mechanisms.","format":"int64","type":"integer"},"tags":{"items":{"$ref":"#/components/schemas/TagReference"},"minItems":1,"nullable":true,"type":"array"}},"required":["type","version"],"type":"object","xml":{"name":"ManagedFacilityForModification"},"title":"ManagedFacilityForModification","description":"ManagedFacilityForModification"},"FacilityAddressForCreation":{"allOf":[{"$ref":"#/components/schemas/Address"},{"properties":{"companyName":{"type":"string"},"emailAddresses":{"items":{"properties":{"recipient":{"description":"Human readable information who is the recipient for emails sent to this address.","type":"string"},"value":{"type":"string"}},"required":["value"],"type":"object"},"type":"array"},"resolvedCoordinates":{"$ref":"#/components/schemas/Coordinates"},"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZoneForCreation","description":"User-specified time zone in identifier format (e.g., \"America/Los_Angeles\"). Used to determine local time. Relevant only if the country spans multiple time zones; otherwise, the time zone is automatically determined from the country or via Google if unspecified."}},"required":["companyName"],"type":"object"}],"type":"object","xml":{"name":"FacilityAddressForCreation"},"title":"FacilityAddressForCreation","description":"FacilityAddressForCreation"},"Address":{"properties":{"additionalAddressInfo":{"type":"string"},"city":{"pattern":"^.+$","type":"string"},"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"customAttributes":{"description":"Attributes that can be added to the address. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"houseNumber":{"pattern":"^.+$","type":"string"},"phoneNumbers":{"items":{"properties":{"customAttributes":{"description":"Attributes that can be added to the phonenumber. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"label":{"description":"Can be used to give a description for the number, like \"private\", \"business number\", etc.","type":"string"},"type":{"enum":["MOBILE","PHONE"],"type":"string"},"value":{"description":"The number itself. We do not enforce any format (yet).","type":"string"}},"required":["value","type"],"type":"object"},"type":"array"},"postalCode":{"pattern":"^.+$","type":"string"},"province":{"pattern":"^.+$","type":"string"},"street":{"pattern":"^.+$","type":"string"}},"required":["street","city","postalCode","country"],"type":"object","title":"Address","description":"Address"},"TimeZoneForCreation":{"description":"Self-provided timezone for determining the local time of a facility","properties":{"timeZoneId":{"description":"official id of the timezone","type":"string"}},"required":["timeZoneId"],"type":"object","title":"TimeZoneForCreation"},"LinkedConfiguration":{"properties":{"ref":{"type":"string"},"rel":{"type":"string"}},"type":"object","title":"LinkedConfiguration","description":"LinkedConfiguration"},"FacilityService":{"additionalProperties":false,"properties":{"type":{"$ref":"#/components/schemas/FacilityServiceType"}},"required":["type"],"type":"object","xml":{"name":"FacilityService"},"title":"FacilityService","description":"FacilityService"},"FacilityServiceType":{"description":"The description of the service this facility offers.","enum":["SHIP_FROM_STORE","PICKUP"],"type":"string","title":"FacilityServiceType"},"FacilityStatus":{"description":"The state of the facility. ONLINE means that this facility can process new orders and pickjobs, SUSPENDED means it cannot get new orders but is able to fulfill the current workload and OFFLINE means that it cannot fulfill any new or existing orders. Processes already running might be rescheduled to another facility depending on the preferences.","enum":["ONLINE","SUSPENDED","OFFLINE"],"type":"string","title":"FacilityStatus"},"FacilityType":{"default":"MANAGED_FACILITY","enum":["MANAGED_FACILITY","SUPPLIER"],"type":"string","xml":{"name":"FacilityType"},"title":"FacilityType","description":"FacilityType"},"SupplierForModification":{"additionalProperties":false,"properties":{"address":{"allOf":[{"$ref":"#/components/schemas/SupplierAddressForCreation"}],"nullable":true,"type":"object"},"customAttributes":{"description":"Attributes that can be added to the facility. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","nullable":true,"type":"object"},"name":{"type":"string"},"status":{"$ref":"#/components/schemas/FacilityStatus"},"tenantFacilityId":{"description":"The id of the facility in the tenants own system","nullable":true,"type":"string"},"type":{"$ref":"#/components/schemas/FacilityType"},"version":{"description":"The version of the document to be used in optimistic locking mechanisms.","format":"int64","type":"integer"},"tags":{"items":{"$ref":"#/components/schemas/TagReference"},"minItems":1,"nullable":true,"type":"array"}},"required":["type","version"],"type":"object","title":"SupplierForModification","description":"SupplierForModification"},"SupplierAddressForCreation":{"properties":{"additionalAddressInfo":{"type":"string"},"city":{"pattern":"^.+$","type":"string"},"companyName":{"type":"string"},"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"customAttributes":{"description":"Attributes that can be added to the address. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"emailAddresses":{"items":{"$ref":"#/components/schemas/SupplierAddressEmailAddress"},"type":"array"},"houseNumber":{"pattern":"^.+$","type":"string"},"phoneNumbers":{"items":{"$ref":"#/components/schemas/SupplierAddressPhoneNumber"},"type":"array"},"postalCode":{"pattern":"^.+$","type":"string"},"province":{"pattern":"^.+$","type":"string"},"resolvedCoordinates":{"$ref":"#/components/schemas/Coordinates"},"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZoneForCreation","description":"User-specified time zone in identifier format (e.g., \"America/Los_Angeles\"). Used to determine local time. Relevant only if the country spans multiple time zones; otherwise, the time zone is automatically determined from the country or via Google if unspecified."},"street":{"pattern":"^.+$","type":"string"}},"required":["country","companyName"],"type":"object","title":"SupplierAddressForCreation","description":"SupplierAddressForCreation"},"SupplierAddressEmailAddress":{"properties":{"recipient":{"description":"Human readable information who is the recipient for emails sent to this address.","type":"string"},"value":{"format":"email","type":"string"}},"required":["value"],"type":"object","title":"SupplierAddressEmailAddress","description":"SupplierAddressEmailAddress"},"SupplierAddressPhoneNumber":{"properties":{"customAttributes":{"description":"Attributes that can be added to the phonenumber. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"label":{"description":"Can be used to give a description for the number, like \"private\", \"business number\", etc.","type":"string"},"type":{"enum":["MOBILE","PHONE"],"type":"string"},"value":{"description":"The number itself. We do not enforce any format (yet).","type":"string"}},"required":["value","type"],"type":"object","title":"SupplierAddressPhoneNumber","description":"SupplierAddressPhoneNumber"},"ManagedFacility":{"allOf":[{"$ref":"#/components/schemas/Facility"},{"$ref":"#/components/schemas/ManagedFacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/FacilityAddress"},"configs":{"items":{"$ref":"#/components/schemas/LinkedConfiguration"},"type":"array"}},"required":["status","address","name"],"type":"object","xml":{"name":"ManagedFacility"},"title":"ManagedFacility","description":"ManagedFacility"},"Facility":{"allOf":[{"$ref":"#/components/schemas/VersionedResource"},{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"id":{"description":"The id of this facility. It is generated during creation automatically and suits as the primary identifier of the described entity.","type":"string"},"operativeCosts":{"items":{"$ref":"#/components/schemas/FacilityOperativeCost"},"maxItems":1,"type":"array"}},"required":["id","type","status"],"type":"object","xml":{"name":"Facility"},"title":"Facility","description":"Facility"},"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"},"FacilityForCreation":{"properties":{"customAttributes":{"description":"Attributes that can be added to the facility. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"name":{"type":"string"},"operativeCosts":{"items":{"$ref":"#/components/schemas/FacilityOperativeCostForCreation"},"maxItems":1,"type":"array"},"status":{"$ref":"#/components/schemas/FacilityStatus"},"tenantFacilityId":{"description":"The id of the facility in the tenants own system","type":"string"},"type":{"$ref":"#/components/schemas/FacilityType","default":"MANAGED_FACILITY"},"tags":{"items":{"$ref":"#/components/schemas/TagReference"},"minItems":1,"type":"array"}},"required":["name"],"type":"object","xml":{"name":"FacilityForCreation"},"title":"FacilityForCreation","description":"FacilityForCreation"},"FacilityOperativeCost":{"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code.","nullable":true,"type":"string"},"decimalPlaces":{"description":"Number of decimal places for the given currency","minimum":0,"type":"integer"},"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","decimalPlaces"],"type":"object","title":"FacilityOperativeCost","description":"FacilityOperativeCost"},"ManagedFacilityForCreation":{"allOf":[{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/FacilityAddressForCreation"},"capacityEnabled":{"default":false,"description":"Indicates that configured capacity limits for picking times are considered","type":"boolean"},"capacityPlanningTimeframe":{"description":"The range in days per facility which defines how many days in the future the capacity of the facility can be planned","minimum":1,"type":"integer"},"closingDays":{"description":"Days of the year where the facility is closed and doesn't allows picking","items":{"$ref":"#/components/schemas/ClosingDay"},"type":"array"},"contact":{"$ref":"#/components/schemas/FacilityContact"},"fulfillmentProcessBuffer":{"default":240,"description":"Duration in minutes until an order is processed","minimum":0,"type":"integer"},"locationType":{"$ref":"#/components/schemas/FacilityLocationType"},"pickingMethods":{"description":"Picking Methods supported by this facility.","items":{"$ref":"#/components/schemas/PickingMethodEnum"},"type":"array"},"pickingTimes":{"$ref":"#/components/schemas/PickingTimes","description":"Time ranges defining the picking times per weekday. No overlapping ranges are allowed"},"scanningRule":{"$ref":"#/components/schemas/ScanningRuleConfiguration"},"services":{"items":{"$ref":"#/components/schemas/FacilityService"},"type":"array"}},"required":["name","address"],"type":"object","xml":{"name":"ManagedFacilityForCreation"},"title":"ManagedFacilityForCreation","description":"ManagedFacilityForCreation"},"FacilityAddress":{"allOf":[{"$ref":"#/components/schemas/FacilityAddressForCreation"},{"properties":{"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZone"}},"type":"object"}],"type":"object","xml":{"name":"FacilityAddress"},"title":"FacilityAddress","description":"FacilityAddress"},"TimeZone":{"description":"Timezone for information retrieved e.g. by the Google Maps API","properties":{"offsetInSeconds":{"description":"offset in seconds to standard time. Does not account for daylight saving time.","type":"number"},"source":{"description":"source of the timezone information","type":"string"},"timeZoneId":{"description":"official id of the timezone","type":"string"},"timeZoneName":{"description":"descriptive name of the timezone","type":"string"}},"required":["timeZoneId","timeZoneName","offsetInSeconds"],"type":"object","title":"TimeZone"},"Supplier":{"allOf":[{"$ref":"#/components/schemas/Facility"},{"$ref":"#/components/schemas/SupplierForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/SupplierAddress"}},"type":"object","xml":{"name":"Supplier"},"title":"Supplier","description":"Supplier"},"SupplierForCreation":{"allOf":[{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/SupplierAddressForCreation"}},"type":"object","xml":{"name":"SupplierForCreation"},"title":"SupplierForCreation","description":"SupplierForCreation"},"SupplierAddress":{"allOf":[{"$ref":"#/components/schemas/SupplierAddressForCreation"},{"properties":{"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZone"}},"type":"object"}],"type":"object","title":"SupplierAddress","description":"SupplierAddress"},"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}":{"patch":{"description":"","operationId":"patchFacility","parameters":[{"description":"ID of facility you want to patch. Also accepts tenantFacilityId in urn format (e.g. urn:fft:facility:tenantFacilityId:{your-tenant-facility-id}).","in":"path","name":"facilityId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FacilityPatchActions"},{"$ref":"#/components/schemas/ManagedFacilityForModification"},{"$ref":"#/components/schemas/SupplierForModification"}]}}},"description":"Patch set","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ManagedFacility"},{"$ref":"#/components/schemas/Supplier"}]}}},"description":"Facility was found & patch-set has been applied. The patched facility is in the body."},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Facility not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Facility version conflict"}},"summary":"Update facility","tags":["Facilities (Core)"]}}}}
```

## POST /api/facilities/{facilityId}/actions

> Call facility action

```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 (Core)"}],"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":{"FacilityActionsParameter":{"anyOf":[{"$ref":"#/components/schemas/RemoveFacilityCoordinatesActionParameter"},{"$ref":"#/components/schemas/UpdateFacilityCoordinatesActionParameter"}],"title":"FacilityActionsParameter","description":"FacilityActionsParameter"},"RemoveFacilityCoordinatesActionParameter":{"allOf":[{"$ref":"#/components/schemas/AbstractFacilityActionsParameter"}],"description":"Remove facility Coordinates.","properties":{"name":{"enum":["REMOVE_FACILITY_COORDINATES"],"type":"string"}},"required":["name","version"],"title":"RemoveFacilityCoordinatesActionParameter"},"AbstractFacilityActionsParameter":{"discriminator":{"propertyName":"name"},"properties":{"name":{"type":"string"},"version":{"description":"Version of the entity to be changed","minimum":0,"type":"integer"}},"required":["name","version"],"title":"AbstractFacilityActionsParameter","description":"AbstractFacilityActionsParameter"},"UpdateFacilityCoordinatesActionParameter":{"allOf":[{"$ref":"#/components/schemas/AbstractFacilityActionsParameter"}],"description":"Update facility Coordinates.","properties":{"coordinates":{"$ref":"#/components/schemas/Coordinates"},"name":{"enum":["UPDATE_FACILITY_COORDINATES"],"type":"string"}},"required":["name","coordinates","version"],"title":"UpdateFacilityCoordinatesActionParameter"},"Coordinates":{"description":"Coordinates of the WGS84 geodetic reference system in Mercator projection, as used e.g. by the Google Maps API","properties":{"lat":{"description":"Latitude value","type":"number"},"lon":{"description":"Longitude value","type":"number"}},"required":["lat","lon"],"type":"object","title":"Coordinates"},"ManagedFacility":{"allOf":[{"$ref":"#/components/schemas/Facility"},{"$ref":"#/components/schemas/ManagedFacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/FacilityAddress"},"configs":{"items":{"$ref":"#/components/schemas/LinkedConfiguration"},"type":"array"}},"required":["status","address","name"],"type":"object","xml":{"name":"ManagedFacility"},"title":"ManagedFacility","description":"ManagedFacility"},"Facility":{"allOf":[{"$ref":"#/components/schemas/VersionedResource"},{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"id":{"description":"The id of this facility. It is generated during creation automatically and suits as the primary identifier of the described entity.","type":"string"},"operativeCosts":{"items":{"$ref":"#/components/schemas/FacilityOperativeCost"},"maxItems":1,"type":"array"}},"required":["id","type","status"],"type":"object","xml":{"name":"Facility"},"title":"Facility","description":"Facility"},"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"},"FacilityForCreation":{"properties":{"customAttributes":{"description":"Attributes that can be added to the facility. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"name":{"type":"string"},"operativeCosts":{"items":{"$ref":"#/components/schemas/FacilityOperativeCostForCreation"},"maxItems":1,"type":"array"},"status":{"$ref":"#/components/schemas/FacilityStatus"},"tenantFacilityId":{"description":"The id of the facility in the tenants own system","type":"string"},"type":{"$ref":"#/components/schemas/FacilityType","default":"MANAGED_FACILITY"},"tags":{"items":{"$ref":"#/components/schemas/TagReference"},"minItems":1,"type":"array"}},"required":["name"],"type":"object","xml":{"name":"FacilityForCreation"},"title":"FacilityForCreation","description":"FacilityForCreation"},"FacilityOperativeCostForCreation":{"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code.","nullable":true,"type":"string"},"decimalPlaces":{"description":"Number of decimal places for the given currency. We be defaulted according to the currency if missing.","minimum":0,"type":"integer"},"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":"FacilityOperativeCostForCreation","description":"FacilityOperativeCostForCreation"},"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"},"FacilityStatus":{"description":"The state of the facility. ONLINE means that this facility can process new orders and pickjobs, SUSPENDED means it cannot get new orders but is able to fulfill the current workload and OFFLINE means that it cannot fulfill any new or existing orders. Processes already running might be rescheduled to another facility depending on the preferences.","enum":["ONLINE","SUSPENDED","OFFLINE"],"type":"string","title":"FacilityStatus"},"FacilityType":{"default":"MANAGED_FACILITY","enum":["MANAGED_FACILITY","SUPPLIER"],"type":"string","xml":{"name":"FacilityType"},"title":"FacilityType","description":"FacilityType"},"TagReference":{"properties":{"id":{"type":"string"},"value":{"type":"string"}},"required":["value","id"],"title":"TagReference","description":"TagReference"},"FacilityOperativeCost":{"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code.","nullable":true,"type":"string"},"decimalPlaces":{"description":"Number of decimal places for the given currency","minimum":0,"type":"integer"},"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","decimalPlaces"],"type":"object","title":"FacilityOperativeCost","description":"FacilityOperativeCost"},"ManagedFacilityForCreation":{"allOf":[{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/FacilityAddressForCreation"},"capacityEnabled":{"default":false,"description":"Indicates that configured capacity limits for picking times are considered","type":"boolean"},"capacityPlanningTimeframe":{"description":"The range in days per facility which defines how many days in the future the capacity of the facility can be planned","minimum":1,"type":"integer"},"closingDays":{"description":"Days of the year where the facility is closed and doesn't allows picking","items":{"$ref":"#/components/schemas/ClosingDay"},"type":"array"},"contact":{"$ref":"#/components/schemas/FacilityContact"},"fulfillmentProcessBuffer":{"default":240,"description":"Duration in minutes until an order is processed","minimum":0,"type":"integer"},"locationType":{"$ref":"#/components/schemas/FacilityLocationType"},"pickingMethods":{"description":"Picking Methods supported by this facility.","items":{"$ref":"#/components/schemas/PickingMethodEnum"},"type":"array"},"pickingTimes":{"$ref":"#/components/schemas/PickingTimes","description":"Time ranges defining the picking times per weekday. No overlapping ranges are allowed"},"scanningRule":{"$ref":"#/components/schemas/ScanningRuleConfiguration"},"services":{"items":{"$ref":"#/components/schemas/FacilityService"},"type":"array"}},"required":["name","address"],"type":"object","xml":{"name":"ManagedFacilityForCreation"},"title":"ManagedFacilityForCreation","description":"ManagedFacilityForCreation"},"FacilityAddressForCreation":{"allOf":[{"$ref":"#/components/schemas/Address"},{"properties":{"companyName":{"type":"string"},"emailAddresses":{"items":{"properties":{"recipient":{"description":"Human readable information who is the recipient for emails sent to this address.","type":"string"},"value":{"type":"string"}},"required":["value"],"type":"object"},"type":"array"},"resolvedCoordinates":{"$ref":"#/components/schemas/Coordinates"},"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZoneForCreation","description":"User-specified time zone in identifier format (e.g., \"America/Los_Angeles\"). Used to determine local time. Relevant only if the country spans multiple time zones; otherwise, the time zone is automatically determined from the country or via Google if unspecified."}},"required":["companyName"],"type":"object"}],"type":"object","xml":{"name":"FacilityAddressForCreation"},"title":"FacilityAddressForCreation","description":"FacilityAddressForCreation"},"Address":{"properties":{"additionalAddressInfo":{"type":"string"},"city":{"pattern":"^.+$","type":"string"},"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"customAttributes":{"description":"Attributes that can be added to the address. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"houseNumber":{"pattern":"^.+$","type":"string"},"phoneNumbers":{"items":{"properties":{"customAttributes":{"description":"Attributes that can be added to the phonenumber. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"label":{"description":"Can be used to give a description for the number, like \"private\", \"business number\", etc.","type":"string"},"type":{"enum":["MOBILE","PHONE"],"type":"string"},"value":{"description":"The number itself. We do not enforce any format (yet).","type":"string"}},"required":["value","type"],"type":"object"},"type":"array"},"postalCode":{"pattern":"^.+$","type":"string"},"province":{"pattern":"^.+$","type":"string"},"street":{"pattern":"^.+$","type":"string"}},"required":["street","city","postalCode","country"],"type":"object","title":"Address","description":"Address"},"TimeZoneForCreation":{"description":"Self-provided timezone for determining the local time of a facility","properties":{"timeZoneId":{"description":"official id of the timezone","type":"string"}},"required":["timeZoneId"],"type":"object","title":"TimeZoneForCreation"},"ClosingDay":{"description":"At this day the facility is closed and does not do picking","properties":{"date":{"description":"The day at which the Facility is closed","format":"date-time","type":"string"},"reason":{"description":"The reason why the Facility is closed on this day","type":"string"},"recurrence":{"enum":["YEARLY","NONRECURRING"],"type":"string"}},"required":["reason","date","recurrence"],"type":"object","title":"ClosingDay"},"FacilityContact":{"properties":{"customAttributes":{"description":"Attributes that can be added to the contact. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"firstName":{"type":"string"},"lastName":{"type":"string"},"roleDescription":{"type":"string"}},"required":["firstName","lastName"],"type":"object","xml":{"name":"FacilityContact"},"title":"FacilityContact","description":"FacilityContact"},"FacilityLocationType":{"default":"STORE","enum":["STORE","WAREHOUSE","EXTERNAL"],"type":"string","xml":{"name":"FacilityLocationType"},"title":"FacilityLocationType","description":"FacilityLocationType"},"PickingMethodEnum":{"description":"Way in which the picking should be handled Deprecated: BATCH_PICKING, use BATCH instead","enum":["SINGLE_ORDER","MULTI_ORDER","BATCH_PICKING","BATCH"],"type":"string","title":"PickingMethodEnum"},"PickingTimes":{"description":"Time ranges defining the picking times per weekday. No overlapping ranges are allowed. There must be no overlaps for time ranges on a day","properties":{"friday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"monday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"saturday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"sunday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"thursday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"tuesday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"wednesday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"}},"type":"object","title":"PickingTimes"},"TimeRange":{"properties":{"capacity":{"minimum":0,"type":"number"},"end":{"$ref":"#/components/schemas/TimeStamp"},"start":{"$ref":"#/components/schemas/TimeStamp"}},"required":["start","end"],"type":"object","title":"TimeRange","description":"TimeRange"},"TimeStamp":{"properties":{"hour":{"maximum":23,"minimum":0,"type":"number"},"minute":{"maximum":59,"minimum":0,"type":"number"}},"required":["hour","minute"],"type":"object","title":"TimeStamp","description":"TimeStamp"},"ScanningRuleConfiguration":{"description":"Configuration to show the client how the items should be scanned during picking","properties":{"values":{"items":{"$ref":"#/components/schemas/ScanningRuleValue"},"type":"array"}},"title":"ScanningRuleConfiguration"},"ScanningRuleValue":{"properties":{"priority":{"description":"This field allows you to rank scanningRuleType against each other. The lowest number is the most preferable.","minimum":0,"type":"number"},"scanningRuleType":{"$ref":"#/components/schemas/ScanningRuleTypeEnum"}},"required":["priority","scanningRuleType"],"title":"ScanningRuleValue","description":"ScanningRuleValue"},"ScanningRuleTypeEnum":{"description":"Type of scanning rule","enum":["ARTICLE","LOCATION"],"type":"string","title":"ScanningRuleTypeEnum"},"FacilityService":{"additionalProperties":false,"properties":{"type":{"$ref":"#/components/schemas/FacilityServiceType"}},"required":["type"],"type":"object","xml":{"name":"FacilityService"},"title":"FacilityService","description":"FacilityService"},"FacilityServiceType":{"description":"The description of the service this facility offers.","enum":["SHIP_FROM_STORE","PICKUP"],"type":"string","title":"FacilityServiceType"},"FacilityAddress":{"allOf":[{"$ref":"#/components/schemas/FacilityAddressForCreation"},{"properties":{"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZone"}},"type":"object"}],"type":"object","xml":{"name":"FacilityAddress"},"title":"FacilityAddress","description":"FacilityAddress"},"TimeZone":{"description":"Timezone for information retrieved e.g. by the Google Maps API","properties":{"offsetInSeconds":{"description":"offset in seconds to standard time. Does not account for daylight saving time.","type":"number"},"source":{"description":"source of the timezone information","type":"string"},"timeZoneId":{"description":"official id of the timezone","type":"string"},"timeZoneName":{"description":"descriptive name of the timezone","type":"string"}},"required":["timeZoneId","timeZoneName","offsetInSeconds"],"type":"object","title":"TimeZone"},"LinkedConfiguration":{"properties":{"ref":{"type":"string"},"rel":{"type":"string"}},"type":"object","title":"LinkedConfiguration","description":"LinkedConfiguration"},"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}/actions":{"post":{"operationId":"facilityAction","parameters":[{"description":"Reference to the facility you want to call the action for. Also accepts tenantFacilityId in urn format (e.g. urn:fft:facility:tenantFacilityId:{your-tenant-facility-id}).","in":"path","name":"facilityId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityActionsParameter"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedFacility"}}},"description":"Updated Facility in the body."},"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":"Call facility action","tags":["Facilities (Core)"]}}}}
```

## List facility carrier connections

> This part of the API is in Beta status. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />List all carrier connections configured for the given facility

```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 (Core)"}],"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":{"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}/carriers":{"get":{"deprecated":false,"description":"This part of the API is in Beta status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />List all carrier connections configured for the given facility","operationId":"listFacilityCarriers","parameters":[{"in":"path","name":"facilityId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"carriers":{"items":{"properties":{"deliveryType":{"type":"string"},"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"version":{"type":"number"}},"required":["id","key","status","version"],"type":"object"},"type":"array"},"total":{"description":"Total number of carrier connections","type":"number"}},"required":["total","carriers"],"type":"object"}}},"description":"Listing returned successfully."},"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"}},"summary":"List facility carrier connections","tags":["Facilities (Core)"]}}}}
```

## Get facility carrier connection

> This part of the API is in Beta status. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Get the details for a carrier related to the facility with the 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 (Core)"}],"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":{"FacilityCarrierConnection":{"properties":{"carrierRef":{"description":"Reference to the carrier","type":"string"},"configuration":{"additionalProperties":true,"description":"Carrier-specific configuration","type":"object"},"created":{"description":"Creation timestamp","format":"date-time","type":"string"},"credentials":{"additionalProperties":true,"description":"Carrier-specific credentials","type":"object"},"cutoffTime":{"$ref":"#/components/schemas/CutoffTime","description":"Cutoff time configuration"},"cutoffTimes":{"$ref":"#/components/schemas/CarrierCutoffTimes","description":"Carrier cutoff times configuration"},"deliveryAreas":{"description":"Delivery areas supported by this connection","items":{"$ref":"#/components/schemas/DeliveryArea"},"type":"array"},"deliveryType":{"description":"Type of delivery service","enum":["SAMEDAY","DELIVERY"],"type":"string"},"facilityRef":{"description":"Reference to the facility","type":"string"},"id":{"description":"Unique identifier for the facility carrier connection","type":"string"},"key":{"description":"Configuration key for the carrier connection","type":"string"},"lastModified":{"description":"Last modification timestamp","format":"date-time","type":"string"},"name":{"description":"Human-readable name for the connection","type":"string"},"parcelLabelClassifications":{"description":"Parcel label classifications","items":{"$ref":"#/components/schemas/ParcelLabelClassification"},"type":"array"},"status":{"description":"Status of the carrier connection","enum":["ACTIVE","INACTIVE"],"type":"string"},"validDeliveryTargets":{"description":"Valid delivery targets for this connection","items":{"$ref":"#/components/schemas/DeliveryTarget"},"type":"array"},"version":{"description":"Version number for optimistic locking","type":"number"},"tags":{"description":"Tags associated with the connection","items":{"$ref":"#/components/schemas/TagReference"},"type":"array"}},"required":["id","version","created","lastModified","facilityRef","carrierRef","key","status"],"title":"FacilityCarrierConnection","type":"object","description":"FacilityCarrierConnection"},"CutoffTime":{"nullable":true,"properties":{"hour":{"default":12,"type":"number"},"minute":{"default":0,"type":"number"}},"required":["hour","minute"],"type":"object","title":"CutoffTime","description":"CutoffTime"},"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"},"DeliveryArea":{"properties":{"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"postalCode":{"pattern":"^.+$","type":"string"}},"required":["country","postalCode"],"type":"object","title":"DeliveryArea","description":"DeliveryArea"},"ParcelLabelClassification":{"additionalProperties":false,"properties":{"nameLocalized":{"$ref":"#/components/schemas/LocaleString","description":"Localized name for parcel label classification"},"dimensions":{"$ref":"#/components/schemas/ParcelDimensions"},"name":{"description":"Name of the parcel label classification","type":"string"},"services":{"$ref":"#/components/schemas/ParcelLabelClassificationServices"}},"required":["nameLocalized","dimensions"],"type":"object","title":"ParcelLabelClassification","description":"ParcelLabelClassification"},"LocaleString":{"additionalProperties":{"type":"string"},"description":"Provides Localized values. The key is the locale, the value is the translation. https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/localization","title":"LocaleString","type":"object"},"ParcelDimensions":{"additionalProperties":false,"nullable":true,"properties":{"customWeight":{"description":"Set this value if you want to overwrite the calculated weight of the parcel (in g).","type":"number"},"height":{"description":"The height of the package (in cm)","type":"number"},"length":{"description":"The length of the package (in cm)","type":"number"},"weight":{"description":"The weight of the package (in g)","type":"number"},"width":{"description":"The width of the package (in cm)","type":"number"}},"type":"object","title":"ParcelDimensions","description":"ParcelDimensions"},"ParcelLabelClassificationServices":{"additionalProperties":false,"properties":{"bulkyGoods":{"default":false,"type":"boolean"}},"type":"object","title":"ParcelLabelClassificationServices","description":"ParcelLabelClassificationServices"},"DeliveryTarget":{"description":"The destination for a delivery","enum":["SHIP_TO_STORE","SHIP_TO_CUSTOMER"],"type":"string","title":"DeliveryTarget"},"TagReference":{"properties":{"id":{"type":"string"},"value":{"type":"string"}},"required":["value","id"],"title":"TagReference","description":"TagReference"},"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}/carriers/{carrierRef}":{"get":{"deprecated":false,"description":"This part of the API is in Beta status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Get the details for a carrier related to the facility with the given ID","operationId":"getFacilityCarrier","parameters":[{"in":"path","name":"facilityId","required":true,"schema":{"type":"string"}},{"in":"path","name":"carrierRef","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityCarrierConnection"}}},"description":"Carrier to facility connections was found & you were allowed to access it. The result is in the body."},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Get facility carrier connection","tags":["Facilities (Core)"]}}}}
```

## Create facility carrier connection

> This part of the API is in Beta status. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Create a connection of a configured carrier to the 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 (Core)"}],"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":{"FacilityCarrierConnectionForCreation":{"properties":{"configuration":{"additionalProperties":true,"description":"Carrier-specific configuration","type":"object"},"credentials":{"additionalProperties":true,"description":"Carrier-specific credentials","type":"object"},"cutoffTime":{"$ref":"#/components/schemas/CutoffTime","description":"Cutoff time configuration"},"cutoffTimes":{"$ref":"#/components/schemas/CarrierCutoffTimes","description":"Carrier cutoff times configuration"},"deliveryAreas":{"description":"Delivery areas supported by this connection","items":{"$ref":"#/components/schemas/DeliveryArea"},"type":"array"},"name":{"description":"Human-readable name for the connection","type":"string"},"parcelLabelClassifications":{"description":"Parcel label classifications for creation","items":{"$ref":"#/components/schemas/ParcelLabelClassificationForCreation"},"type":"array"},"status":{"description":"Status of the carrier connection","enum":["ACTIVE","INACTIVE"],"type":"string"},"validDeliveryTargets":{"description":"Valid delivery targets for this connection","items":{"$ref":"#/components/schemas/DeliveryTarget"},"type":"array"},"tags":{"description":"Tags associated with the connection","items":{"$ref":"#/components/schemas/TagReference"},"type":"array"}},"title":"FacilityCarrierConnectionForCreation","type":"object","description":"FacilityCarrierConnectionForCreation"},"CutoffTime":{"nullable":true,"properties":{"hour":{"default":12,"type":"number"},"minute":{"default":0,"type":"number"}},"required":["hour","minute"],"type":"object","title":"CutoffTime","description":"CutoffTime"},"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"},"DeliveryArea":{"properties":{"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"postalCode":{"pattern":"^.+$","type":"string"}},"required":["country","postalCode"],"type":"object","title":"DeliveryArea","description":"DeliveryArea"},"ParcelLabelClassificationForCreation":{"additionalProperties":false,"properties":{"nameLocalized":{"$ref":"#/components/schemas/LocaleString","description":"Localized name for parcel label classification"},"dimensions":{"$ref":"#/components/schemas/ParcelDimensions"},"services":{"$ref":"#/components/schemas/ParcelLabelClassificationServices"}},"required":["nameLocalized","dimensions"],"type":"object","title":"ParcelLabelClassificationForCreation","description":"ParcelLabelClassificationForCreation"},"LocaleString":{"additionalProperties":{"type":"string"},"description":"Provides Localized values. The key is the locale, the value is the translation. https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/localization","title":"LocaleString","type":"object"},"ParcelDimensions":{"additionalProperties":false,"nullable":true,"properties":{"customWeight":{"description":"Set this value if you want to overwrite the calculated weight of the parcel (in g).","type":"number"},"height":{"description":"The height of the package (in cm)","type":"number"},"length":{"description":"The length of the package (in cm)","type":"number"},"weight":{"description":"The weight of the package (in g)","type":"number"},"width":{"description":"The width of the package (in cm)","type":"number"}},"type":"object","title":"ParcelDimensions","description":"ParcelDimensions"},"ParcelLabelClassificationServices":{"additionalProperties":false,"properties":{"bulkyGoods":{"default":false,"type":"boolean"}},"type":"object","title":"ParcelLabelClassificationServices","description":"ParcelLabelClassificationServices"},"DeliveryTarget":{"description":"The destination for a delivery","enum":["SHIP_TO_STORE","SHIP_TO_CUSTOMER"],"type":"string","title":"DeliveryTarget"},"TagReference":{"properties":{"id":{"type":"string"},"value":{"type":"string"}},"required":["value","id"],"title":"TagReference","description":"TagReference"},"FacilityCarrierConnection":{"properties":{"carrierRef":{"description":"Reference to the carrier","type":"string"},"configuration":{"additionalProperties":true,"description":"Carrier-specific configuration","type":"object"},"created":{"description":"Creation timestamp","format":"date-time","type":"string"},"credentials":{"additionalProperties":true,"description":"Carrier-specific credentials","type":"object"},"cutoffTime":{"$ref":"#/components/schemas/CutoffTime","description":"Cutoff time configuration"},"cutoffTimes":{"$ref":"#/components/schemas/CarrierCutoffTimes","description":"Carrier cutoff times configuration"},"deliveryAreas":{"description":"Delivery areas supported by this connection","items":{"$ref":"#/components/schemas/DeliveryArea"},"type":"array"},"deliveryType":{"description":"Type of delivery service","enum":["SAMEDAY","DELIVERY"],"type":"string"},"facilityRef":{"description":"Reference to the facility","type":"string"},"id":{"description":"Unique identifier for the facility carrier connection","type":"string"},"key":{"description":"Configuration key for the carrier connection","type":"string"},"lastModified":{"description":"Last modification timestamp","format":"date-time","type":"string"},"name":{"description":"Human-readable name for the connection","type":"string"},"parcelLabelClassifications":{"description":"Parcel label classifications","items":{"$ref":"#/components/schemas/ParcelLabelClassification"},"type":"array"},"status":{"description":"Status of the carrier connection","enum":["ACTIVE","INACTIVE"],"type":"string"},"validDeliveryTargets":{"description":"Valid delivery targets for this connection","items":{"$ref":"#/components/schemas/DeliveryTarget"},"type":"array"},"version":{"description":"Version number for optimistic locking","type":"number"},"tags":{"description":"Tags associated with the connection","items":{"$ref":"#/components/schemas/TagReference"},"type":"array"}},"required":["id","version","created","lastModified","facilityRef","carrierRef","key","status"],"title":"FacilityCarrierConnection","type":"object","description":"FacilityCarrierConnection"},"ParcelLabelClassification":{"additionalProperties":false,"properties":{"nameLocalized":{"$ref":"#/components/schemas/LocaleString","description":"Localized name for parcel label classification"},"dimensions":{"$ref":"#/components/schemas/ParcelDimensions"},"name":{"description":"Name of the parcel label classification","type":"string"},"services":{"$ref":"#/components/schemas/ParcelLabelClassificationServices"}},"required":["nameLocalized","dimensions"],"type":"object","title":"ParcelLabelClassification","description":"ParcelLabelClassification"},"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}/carriers/{carrierRef}":{"post":{"deprecated":false,"description":"This part of the API is in Beta status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Create a connection of a configured carrier to the facility with given ID","operationId":"createCarrierToFacility","parameters":[{"in":"path","name":"facilityId","required":true,"schema":{"type":"string"}},{"in":"path","name":"carrierRef","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityCarrierConnectionForCreation"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityCarrierConnection"}}},"description":"Creation was successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Invalid input. See response for details."},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Create facility carrier connection","tags":["Facilities (Core)"]}}}}
```

## Update facility carrier connection

> This part of the API is in Beta status. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Connect a configured carrier to the 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 (Core)"}],"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":{"FacilityCarrierConnectionForModification":{"properties":{"configuration":{"additionalProperties":true,"description":"Carrier-specific configuration","type":"object"},"credentials":{"additionalProperties":true,"description":"Carrier-specific credentials","type":"object"},"cutoffTime":{"$ref":"#/components/schemas/CutoffTime","description":"Cutoff time configuration"},"cutoffTimes":{"$ref":"#/components/schemas/CarrierCutoffTimes","description":"Carrier cutoff times configuration"},"deliveryAreas":{"description":"Delivery areas supported by this connection","items":{"$ref":"#/components/schemas/DeliveryArea"},"type":"array"},"name":{"description":"Human-readable name for the connection","type":"string"},"parcelLabelClassifications":{"description":"Parcel label classifications for creation","items":{"$ref":"#/components/schemas/ParcelLabelClassificationForCreation"},"type":"array"},"status":{"description":"Status of the carrier connection","enum":["ACTIVE","INACTIVE"],"type":"string"},"validDeliveryTargets":{"description":"Valid delivery targets for this connection","items":{"$ref":"#/components/schemas/DeliveryTarget"},"type":"array"},"version":{"description":"Version number for optimistic locking","type":"number"},"tags":{"description":"Tags associated with the connection","items":{"$ref":"#/components/schemas/TagReference"},"type":"array"}},"required":["version"],"title":"FacilityCarrierConnectionForModification","type":"object","description":"FacilityCarrierConnectionForModification"},"CutoffTime":{"nullable":true,"properties":{"hour":{"default":12,"type":"number"},"minute":{"default":0,"type":"number"}},"required":["hour","minute"],"type":"object","title":"CutoffTime","description":"CutoffTime"},"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"},"DeliveryArea":{"properties":{"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"postalCode":{"pattern":"^.+$","type":"string"}},"required":["country","postalCode"],"type":"object","title":"DeliveryArea","description":"DeliveryArea"},"ParcelLabelClassificationForCreation":{"additionalProperties":false,"properties":{"nameLocalized":{"$ref":"#/components/schemas/LocaleString","description":"Localized name for parcel label classification"},"dimensions":{"$ref":"#/components/schemas/ParcelDimensions"},"services":{"$ref":"#/components/schemas/ParcelLabelClassificationServices"}},"required":["nameLocalized","dimensions"],"type":"object","title":"ParcelLabelClassificationForCreation","description":"ParcelLabelClassificationForCreation"},"LocaleString":{"additionalProperties":{"type":"string"},"description":"Provides Localized values. The key is the locale, the value is the translation. https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/localization","title":"LocaleString","type":"object"},"ParcelDimensions":{"additionalProperties":false,"nullable":true,"properties":{"customWeight":{"description":"Set this value if you want to overwrite the calculated weight of the parcel (in g).","type":"number"},"height":{"description":"The height of the package (in cm)","type":"number"},"length":{"description":"The length of the package (in cm)","type":"number"},"weight":{"description":"The weight of the package (in g)","type":"number"},"width":{"description":"The width of the package (in cm)","type":"number"}},"type":"object","title":"ParcelDimensions","description":"ParcelDimensions"},"ParcelLabelClassificationServices":{"additionalProperties":false,"properties":{"bulkyGoods":{"default":false,"type":"boolean"}},"type":"object","title":"ParcelLabelClassificationServices","description":"ParcelLabelClassificationServices"},"DeliveryTarget":{"description":"The destination for a delivery","enum":["SHIP_TO_STORE","SHIP_TO_CUSTOMER"],"type":"string","title":"DeliveryTarget"},"TagReference":{"properties":{"id":{"type":"string"},"value":{"type":"string"}},"required":["value","id"],"title":"TagReference","description":"TagReference"},"FacilityCarrierConnection":{"properties":{"carrierRef":{"description":"Reference to the carrier","type":"string"},"configuration":{"additionalProperties":true,"description":"Carrier-specific configuration","type":"object"},"created":{"description":"Creation timestamp","format":"date-time","type":"string"},"credentials":{"additionalProperties":true,"description":"Carrier-specific credentials","type":"object"},"cutoffTime":{"$ref":"#/components/schemas/CutoffTime","description":"Cutoff time configuration"},"cutoffTimes":{"$ref":"#/components/schemas/CarrierCutoffTimes","description":"Carrier cutoff times configuration"},"deliveryAreas":{"description":"Delivery areas supported by this connection","items":{"$ref":"#/components/schemas/DeliveryArea"},"type":"array"},"deliveryType":{"description":"Type of delivery service","enum":["SAMEDAY","DELIVERY"],"type":"string"},"facilityRef":{"description":"Reference to the facility","type":"string"},"id":{"description":"Unique identifier for the facility carrier connection","type":"string"},"key":{"description":"Configuration key for the carrier connection","type":"string"},"lastModified":{"description":"Last modification timestamp","format":"date-time","type":"string"},"name":{"description":"Human-readable name for the connection","type":"string"},"parcelLabelClassifications":{"description":"Parcel label classifications","items":{"$ref":"#/components/schemas/ParcelLabelClassification"},"type":"array"},"status":{"description":"Status of the carrier connection","enum":["ACTIVE","INACTIVE"],"type":"string"},"validDeliveryTargets":{"description":"Valid delivery targets for this connection","items":{"$ref":"#/components/schemas/DeliveryTarget"},"type":"array"},"version":{"description":"Version number for optimistic locking","type":"number"},"tags":{"description":"Tags associated with the connection","items":{"$ref":"#/components/schemas/TagReference"},"type":"array"}},"required":["id","version","created","lastModified","facilityRef","carrierRef","key","status"],"title":"FacilityCarrierConnection","type":"object","description":"FacilityCarrierConnection"},"ParcelLabelClassification":{"additionalProperties":false,"properties":{"nameLocalized":{"$ref":"#/components/schemas/LocaleString","description":"Localized name for parcel label classification"},"dimensions":{"$ref":"#/components/schemas/ParcelDimensions"},"name":{"description":"Name of the parcel label classification","type":"string"},"services":{"$ref":"#/components/schemas/ParcelLabelClassificationServices"}},"required":["nameLocalized","dimensions"],"type":"object","title":"ParcelLabelClassification","description":"ParcelLabelClassification"},"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}/carriers/{carrierRef}":{"put":{"deprecated":false,"description":"This part of the API is in Beta status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Connect a configured carrier to the facility with given ID","operationId":"connectCarrierToFacility","parameters":[{"in":"path","name":"facilityId","required":true,"schema":{"type":"string"}},{"in":"path","name":"carrierRef","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityCarrierConnectionForModification"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityCarrierConnection"}}},"description":"Modification was successful."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Invalid input. See response for details."},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Update facility carrier connection","tags":["Facilities (Core)"]}}}}
```

## Calculate best carriers

> This part of the API is in Beta status. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Calculate prioritized list of recommended carriers for the given facility and input parameters

```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 (Core)"}],"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":{"CarrierPriorityCalculationRequest":{"properties":{"productValue":{"$ref":"#/components/schemas/ParcelProductValue","description":"Product value information used to calculate carrier priority"}},"title":"CarrierPriorityCalculationRequest","type":"object","description":"CarrierPriorityCalculationRequest"},"ParcelProductValue":{"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code.","nullable":true,"type":"string"},"decimalPlaces":{"description":"Number of decimal places for the given currency","minimum":0,"type":"integer"},"value":{"description":"Total value that should be shipped. Value is configured in the smallest subunit, e.g. cents.","minimum":1,"type":"integer"}},"required":["value","currency","decimalPlaces"],"type":"object","title":"ParcelProductValue","description":"ParcelProductValue"},"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"},"CarrierPriorityResult":{"properties":{"otherCarriers":{"description":"Other eligible carriers ordered by priority","items":{"$ref":"#/components/schemas/CarrierRecommendationResult"},"type":"array"},"recommendedCarriers":{"description":"Recommended carriers ordered by priority (best first)","items":{"$ref":"#/components/schemas/CarrierRecommendationResult"},"type":"array"}},"required":["recommendedCarriers","otherCarriers"],"title":"CarrierPriorityResult","type":"object","description":"CarrierPriorityResult"},"CarrierRecommendationResult":{"properties":{"carrier":{"$ref":"#/components/schemas/Carrier","description":"Carrier that is recommended"},"priority":{"description":"Calculated priority value (lower typically indicates a better match)","type":"number"},"threshold":{"$ref":"#/components/schemas/PriceRange","description":"Applicable price threshold for this recommendation"}},"required":["priority","carrier"],"title":"CarrierRecommendationResult","type":"object","description":"CarrierRecommendationResult"},"Carrier":{"additionalProperties":false,"allOf":[{"$ref":"#/components/schemas/CarrierForCreation"},{"$ref":"#/components/schemas/VersionedResource"},{"properties":{"defaultParcelHeightInCm":{"default":10,"description":"Default height in cm","minimum":1,"type":"number"},"defaultParcelLengthInCm":{"default":25,"description":"Default length in cm","minimum":1,"type":"number"},"defaultParcelWidthInCm":{"default":35,"description":"Default width in cm","minimum":1,"type":"number"},"deliveryType":{"$ref":"#/components/schemas/CarrierDeliveryType"},"id":{"description":"The id of the carrier","type":"string"},"lifecycle":{"$ref":"#/components/schemas/CarrierLifecycle"},"parcelLabelClassifications":{"items":{"$ref":"#/components/schemas/ParcelLabelClassification"},"type":"array"}},"required":["id","status","defaultParcelWidthInCm","defaultParcelLengthInCm","defaultParcelHeightInCm"],"type":"object"}],"xml":{"name":"Carrier"},"title":"Carrier","description":"Carrier"},"CarrierForCreation":{"additionalProperties":false,"properties":{"credentials":{"$ref":"#/components/schemas/AbstractCarrierCredentials"},"defaultParcelHeightInCm":{"default":10,"description":"Default height in cm","minimum":1,"type":"number"},"defaultParcelLengthInCm":{"default":25,"description":"Default length in cm","minimum":1,"type":"number"},"defaultParcelWeightInGram":{"default":1000,"description":"Default weight for a parcel in gram","minimum":1,"type":"number"},"defaultParcelWidthInCm":{"default":35,"description":"Default width in cm","minimum":1,"type":"number"},"key":{"description":"References the KEP. Currently allowed values are DHL_V2, DPD_CH, DPD_CH_VCE, ANGEL, GLS, FEDEX, POSTNL, BRING, UPS, POST_NORD, DHL_EXPRESS,\n CUSTOM and to distinct between multiple custom carriers one can use CUSTOM_ combined with a unique name.","type":"string"},"logoUrl":{"minLength":1,"type":"string"},"name":{"description":"This is the well known name for a supported CEP partner. Can be adapted to the clients needs.","type":"string"},"parcelLabelClassifications":{"items":{"$ref":"#/components/schemas/ParcelLabelClassificationForCreation"},"type":"array"},"productValueNeeded":{"description":"Setting to enable the Client to ask for the parcel product value while ordering a label. This information is mandatory for sending parcels between different countries (customs declaration)","type":"boolean"},"status":{"$ref":"#/components/schemas/CarrierStatus"}},"required":["name","key"],"type":"object","xml":{"name":"CarrierForCreation"},"title":"CarrierForCreation","description":"CarrierForCreation"},"AbstractCarrierCredentials":{"discriminator":{"propertyName":"key"},"properties":{"key":{"type":"string"}},"required":["key"],"type":"object","xml":{"name":"AbstractCarrierCredentials"},"title":"AbstractCarrierCredentials","description":"AbstractCarrierCredentials"},"ParcelLabelClassificationForCreation":{"additionalProperties":false,"properties":{"nameLocalized":{"$ref":"#/components/schemas/LocaleString","description":"Localized name for parcel label classification"},"dimensions":{"$ref":"#/components/schemas/ParcelDimensions"},"services":{"$ref":"#/components/schemas/ParcelLabelClassificationServices"}},"required":["nameLocalized","dimensions"],"type":"object","title":"ParcelLabelClassificationForCreation","description":"ParcelLabelClassificationForCreation"},"LocaleString":{"additionalProperties":{"type":"string"},"description":"Provides Localized values. The key is the locale, the value is the translation. https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/localization","title":"LocaleString","type":"object"},"ParcelDimensions":{"additionalProperties":false,"nullable":true,"properties":{"customWeight":{"description":"Set this value if you want to overwrite the calculated weight of the parcel (in g).","type":"number"},"height":{"description":"The height of the package (in cm)","type":"number"},"length":{"description":"The length of the package (in cm)","type":"number"},"weight":{"description":"The weight of the package (in g)","type":"number"},"width":{"description":"The width of the package (in cm)","type":"number"}},"type":"object","title":"ParcelDimensions","description":"ParcelDimensions"},"ParcelLabelClassificationServices":{"additionalProperties":false,"properties":{"bulkyGoods":{"default":false,"type":"boolean"}},"type":"object","title":"ParcelLabelClassificationServices","description":"ParcelLabelClassificationServices"},"CarrierStatus":{"description":"It is taken into consideration for all carriers. Default: INACTIVE","enum":["ACTIVE","INACTIVE"],"type":"string","title":"CarrierStatus"},"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"},"CarrierDeliveryType":{"description":"Provided delivery of this CEP. Default: DELIVERY","enum":["SAMEDAY","DELIVERY"],"type":"string","title":"CarrierDeliveryType"},"CarrierLifecycle":{"description":"Used to determine if a carrier is available for configuration. GA carriers are generally available and are covered by our SLA. BETA carriers are available, but subject to change and not covered by SLA. ALPHA carriers are not implemented completely, yet. Default: GA","enum":["GA","BETA","ALPHA"],"type":"string","title":"CarrierLifecycle"},"ParcelLabelClassification":{"additionalProperties":false,"properties":{"nameLocalized":{"$ref":"#/components/schemas/LocaleString","description":"Localized name for parcel label classification"},"dimensions":{"$ref":"#/components/schemas/ParcelDimensions"},"name":{"description":"Name of the parcel label classification","type":"string"},"services":{"$ref":"#/components/schemas/ParcelLabelClassificationServices"}},"required":["nameLocalized","dimensions"],"type":"object","title":"ParcelLabelClassification","description":"ParcelLabelClassification"},"PriceRange":{"additionalProperties":false,"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code.","nullable":true,"type":"string"},"decimalPlaces":{"description":"Number of decimal places for the given currency","minimum":0,"type":"integer"},"from":{"description":"Lowest total parcel value that this carrier will be selected for. Value is in configured in the smallest subunit, e.g. cents.","minimum":0,"type":"integer"},"to":{"description":"Highest total parcel value that this carrier will be selected for. Value is configured in the smallest subunit, e.g. cents.","minimum":1,"type":"integer"}},"required":["from","to","currency","decimalPlaces"],"type":"object","title":"PriceRange","description":"PriceRange"},"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}/carriers/prioritization":{"post":{"deprecated":false,"description":"This part of the API is in Beta status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Calculate prioritized list of recommended carriers for the given facility and input parameters","operationId":"calculateBestCarrier","parameters":[{"in":"path","name":"facilityId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierPriorityCalculationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierPriorityResult"}}},"description":"Calculated carrier prioritization result."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Invalid input. See response for details."},"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"}},"summary":"Calculate best carriers","tags":["Facilities (Core)"]}}}}
```

## List facility connections

> This part of the API is in Beta status. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Get the details for all connections related to the facility with the 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 (Core)"}],"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":{"InterFacilityConnections":{"additionalProperties":false,"properties":{"interFacilityConnections":{"items":{"$ref":"#/components/schemas/InterFacilityConnection"},"type":"array"},"total":{"description":"Total number of entities found for this query","type":"integer"}},"required":["interFacilityConnections","total"],"type":"object","xml":{"name":"InterFacilityConnection"},"title":"InterFacilityConnections","description":"InterFacilityConnections"},"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":2000,"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"},"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"id":{"type":"string"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":2000,"minItems":0,"type":"array"},"sourceFacilityRef":{"type":"string"},"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"}}}},"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"},"InterFacilityConnectionContext":{"additionalProperties":false,"properties":{"operator":{"$ref":"#/components/schemas/ContextOperator"},"type":{"$ref":"#/components/schemas/InterFacilityConnectionContextTypes"},"values":{"items":{"maxItems":2000,"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"],"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","minimum":0,"type":"integer"},"minTransitDays":{"description":"Minimum days a carrier needs for transit","minimum":0,"type":"integer"}},"required":["maxTransitDays","minTransitDays"],"type":"object","title":"CarrierTransitTime","description":"CarrierTransitTime"},"NonDeliveryDaysPerCountryAndProvince":{"additionalProperties":false,"properties":{"country":{"type":"string"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDays"},"type":"array"},"nonDeliveryDaysPerProvince":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerProvince"},"type":"array"},"recurringNonDeliveryWeekdays":{"items":{"$ref":"#/components/schemas/WeekDay"},"type":"array"}},"required":["country","nonDeliveryDays","recurringNonDeliveryWeekdays","nonDeliveryDaysPerProvince"],"type":"object","title":"NonDeliveryDaysPerCountryAndProvince","description":"NonDeliveryDaysPerCountryAndProvince"},"NonDeliveryDays":{"additionalProperties":false,"properties":{"nonDeliveryDay":{"format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"nonDeliveryType":{"$ref":"#/components/schemas/NonDeliveryType","default":"SINGLE"}},"required":["nonDeliveryDay"],"type":"object","title":"NonDeliveryDays","description":"NonDeliveryDays"},"NonDeliveryType":{"enum":["SINGLE","RECURRING"],"type":"string","title":"NonDeliveryType","description":"NonDeliveryType"},"NonDeliveryDaysPerProvince":{"additionalProperties":false,"properties":{"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDays"},"type":"array"},"province":{"type":"string"},"recurringNonDeliveryWeekdays":{"items":{"$ref":"#/components/schemas/WeekDay"},"type":"array"}},"required":["province","nonDeliveryDays","recurringNonDeliveryWeekdays"],"type":"object","title":"NonDeliveryDaysPerProvince","description":"NonDeliveryDaysPerProvince"},"PackagingUnitsByContext":{"additionalProperties":false,"properties":{"context":{"items":{"$ref":"#/components/schemas/PackagingUnitContext"},"maxItems":2000,"minItems":0,"type":"array"},"packagingUnits":{"items":{"$ref":"#/components/schemas/PackagingUnit"},"maxItems":2000,"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":2000,"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"}},"type":"object","title":"PackagingUnitDimensions","description":"PackagingUnitDimensions"},"InterFacilityConnectionCustomerTarget":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionBaseTarget"}],"type":"object","title":"InterFacilityConnectionCustomerTarget","description":"InterFacilityConnectionCustomerTarget"},"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"},"InterFacilityConnectionManagedFacilityTarget":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionBaseTarget"}],"properties":{"excludedFacilityGroupRefs":{"items":{"type":"string"},"type":"array"},"excludedFacilityRefs":{"items":{"type":"string"},"type":"array"},"facilityRef":{"type":"string"}},"type":"object","title":"InterFacilityConnectionManagedFacilityTarget","description":"InterFacilityConnectionManagedFacilityTarget"},"InterFacilityConnectionSupplierTarget":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionBaseTarget"}],"properties":{"excludedFacilityGroupRefs":{"items":{"type":"string"},"type":"array"},"excludedFacilityRefs":{"items":{"type":"string"},"type":"array"},"facilityRef":{"type":"string"}},"type":"object","title":"InterFacilityConnectionSupplierTarget","description":"InterFacilityConnectionSupplierTarget"},"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":{"get":{"description":"This part of the API is in Beta status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Get the details for all connections related to the facility with the given ID.","operationId":"getFacilityConnections","parameters":[{"description":"ID of facility you want to get connections","in":"path","name":"facilityId","required":true,"schema":{"type":"string"}},{"description":"The targetFacilityRef of the connection","in":"query","name":"targetFacilityRef","required":false,"schema":{"type":"string"}},{"description":"all entities","in":"query","name":"startAfterId","required":false,"schema":{"type":"string"}},{"description":"number of entities to show","in":"query","name":"size","required":false,"schema":{"default":25,"type":"integer"}},{"description":"Provide the localized names and descriptions for the parcel label classifications. If not provided the default locale is used., for example de_DE.","in":"query","name":"locale","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InterFacilityConnections"}}},"description":"Facility connections was found & you were allowed to access it. The result is in the body."},"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":"List facility connections","tags":["Facilities (Core)"]}}}}
```

## Create facility connection

> This part of the API is in Beta status. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />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 (Core)"}],"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":2000,"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"},"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":2000,"minItems":0,"type":"array"},"target":{"$ref":"#/components/schemas/InterFacilityConnectionSupplierTarget"},"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":2000,"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"],"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","minimum":0,"type":"integer"},"minTransitDays":{"description":"Minimum days a carrier needs for transit","minimum":0,"type":"integer"}},"required":["maxTransitDays","minTransitDays"],"type":"object","title":"CarrierTransitTime","description":"CarrierTransitTime"},"NonDeliveryDaysPerCountryAndProvince":{"additionalProperties":false,"properties":{"country":{"type":"string"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDays"},"type":"array"},"nonDeliveryDaysPerProvince":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerProvince"},"type":"array"},"recurringNonDeliveryWeekdays":{"items":{"$ref":"#/components/schemas/WeekDay"},"type":"array"}},"required":["country","nonDeliveryDays","recurringNonDeliveryWeekdays","nonDeliveryDaysPerProvince"],"type":"object","title":"NonDeliveryDaysPerCountryAndProvince","description":"NonDeliveryDaysPerCountryAndProvince"},"NonDeliveryDays":{"additionalProperties":false,"properties":{"nonDeliveryDay":{"format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"nonDeliveryType":{"$ref":"#/components/schemas/NonDeliveryType","default":"SINGLE"}},"required":["nonDeliveryDay"],"type":"object","title":"NonDeliveryDays","description":"NonDeliveryDays"},"NonDeliveryType":{"enum":["SINGLE","RECURRING"],"type":"string","title":"NonDeliveryType","description":"NonDeliveryType"},"NonDeliveryDaysPerProvince":{"additionalProperties":false,"properties":{"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDays"},"type":"array"},"province":{"type":"string"},"recurringNonDeliveryWeekdays":{"items":{"$ref":"#/components/schemas/WeekDay"},"type":"array"}},"required":["province","nonDeliveryDays","recurringNonDeliveryWeekdays"],"type":"object","title":"NonDeliveryDaysPerProvince","description":"NonDeliveryDaysPerProvince"},"PackagingUnitsByContext":{"additionalProperties":false,"properties":{"context":{"items":{"$ref":"#/components/schemas/PackagingUnitContext"},"maxItems":2000,"minItems":0,"type":"array"},"packagingUnits":{"items":{"$ref":"#/components/schemas/PackagingUnit"},"maxItems":2000,"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":2000,"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"}},"type":"object","title":"PackagingUnitDimensions","description":"PackagingUnitDimensions"},"InterFacilityConnectionSupplierTarget":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionBaseTarget"}],"properties":{"excludedFacilityGroupRefs":{"items":{"type":"string"},"type":"array"},"excludedFacilityRefs":{"items":{"type":"string"},"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"},"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":2000,"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"},"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":2000,"minItems":0,"type":"array"},"target":{"$ref":"#/components/schemas/InterFacilityConnectionManagedFacilityTarget"},"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"},"type":"array"},"excludedFacilityRefs":{"items":{"type":"string"},"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":2000,"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"},"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":2000,"minItems":0,"type":"array"},"target":{"$ref":"#/components/schemas/InterFacilityConnectionCustomerTarget"},"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":2000,"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"},"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"id":{"type":"string"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":2000,"minItems":0,"type":"array"},"sourceFacilityRef":{"type":"string"},"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"}}}},"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":"This part of the API is in Beta status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />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 (Core)"]}}}}
```

## Get facility connection

> This part of the API is in Beta status. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Get the details for a facility connection related to the facility with the 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 (Core)"}],"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":{"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":2000,"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"},"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"id":{"type":"string"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":2000,"minItems":0,"type":"array"},"sourceFacilityRef":{"type":"string"},"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"}}}},"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"},"InterFacilityConnectionContext":{"additionalProperties":false,"properties":{"operator":{"$ref":"#/components/schemas/ContextOperator"},"type":{"$ref":"#/components/schemas/InterFacilityConnectionContextTypes"},"values":{"items":{"maxItems":2000,"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"],"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","minimum":0,"type":"integer"},"minTransitDays":{"description":"Minimum days a carrier needs for transit","minimum":0,"type":"integer"}},"required":["maxTransitDays","minTransitDays"],"type":"object","title":"CarrierTransitTime","description":"CarrierTransitTime"},"NonDeliveryDaysPerCountryAndProvince":{"additionalProperties":false,"properties":{"country":{"type":"string"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDays"},"type":"array"},"nonDeliveryDaysPerProvince":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerProvince"},"type":"array"},"recurringNonDeliveryWeekdays":{"items":{"$ref":"#/components/schemas/WeekDay"},"type":"array"}},"required":["country","nonDeliveryDays","recurringNonDeliveryWeekdays","nonDeliveryDaysPerProvince"],"type":"object","title":"NonDeliveryDaysPerCountryAndProvince","description":"NonDeliveryDaysPerCountryAndProvince"},"NonDeliveryDays":{"additionalProperties":false,"properties":{"nonDeliveryDay":{"format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"nonDeliveryType":{"$ref":"#/components/schemas/NonDeliveryType","default":"SINGLE"}},"required":["nonDeliveryDay"],"type":"object","title":"NonDeliveryDays","description":"NonDeliveryDays"},"NonDeliveryType":{"enum":["SINGLE","RECURRING"],"type":"string","title":"NonDeliveryType","description":"NonDeliveryType"},"NonDeliveryDaysPerProvince":{"additionalProperties":false,"properties":{"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDays"},"type":"array"},"province":{"type":"string"},"recurringNonDeliveryWeekdays":{"items":{"$ref":"#/components/schemas/WeekDay"},"type":"array"}},"required":["province","nonDeliveryDays","recurringNonDeliveryWeekdays"],"type":"object","title":"NonDeliveryDaysPerProvince","description":"NonDeliveryDaysPerProvince"},"PackagingUnitsByContext":{"additionalProperties":false,"properties":{"context":{"items":{"$ref":"#/components/schemas/PackagingUnitContext"},"maxItems":2000,"minItems":0,"type":"array"},"packagingUnits":{"items":{"$ref":"#/components/schemas/PackagingUnit"},"maxItems":2000,"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":2000,"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"}},"type":"object","title":"PackagingUnitDimensions","description":"PackagingUnitDimensions"},"InterFacilityConnectionCustomerTarget":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionBaseTarget"}],"type":"object","title":"InterFacilityConnectionCustomerTarget","description":"InterFacilityConnectionCustomerTarget"},"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"},"InterFacilityConnectionManagedFacilityTarget":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionBaseTarget"}],"properties":{"excludedFacilityGroupRefs":{"items":{"type":"string"},"type":"array"},"excludedFacilityRefs":{"items":{"type":"string"},"type":"array"},"facilityRef":{"type":"string"}},"type":"object","title":"InterFacilityConnectionManagedFacilityTarget","description":"InterFacilityConnectionManagedFacilityTarget"},"InterFacilityConnectionSupplierTarget":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionBaseTarget"}],"properties":{"excludedFacilityGroupRefs":{"items":{"type":"string"},"type":"array"},"excludedFacilityRefs":{"items":{"type":"string"},"type":"array"},"facilityRef":{"type":"string"}},"type":"object","title":"InterFacilityConnectionSupplierTarget","description":"InterFacilityConnectionSupplierTarget"},"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/{connectionId}":{"get":{"description":"This part of the API is in Beta status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Get the details for a facility connection related to the facility with the given ID.","operationId":"getFacilityConnection","parameters":[{"description":"ID of facility you want to get connections","in":"path","name":"facilityId","required":true,"schema":{"type":"string"}},{"description":"The ID that describes the connection of this facility to the its connections","in":"path","name":"connectionId","required":true,"schema":{"type":"string"}},{"description":"Provide the localized names and descriptions for the parcel label classifications. If not provided the default locale is used., for example de_DE.","in":"query","name":"locale","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InterFacilityConnection"}}},"description":"Facility connections was found & you were allowed to access it. The result is in the body."},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"There is no connection for this facility referenced by the provided connectionId"}},"summary":"Get facility connection","tags":["Facilities (Core)"]}}}}
```

## Update facility connection

> This part of the API is in Beta status. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Update the given connection for a facility

```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 (Core)"}],"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":{"InterFacilityConnectionToSupplierForUpdate":{"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":2000,"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"},"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":2000,"minItems":0,"type":"array"},"target":{"$ref":"#/components/schemas/InterFacilityConnectionSupplierTarget"},"type":{"$ref":"#/components/schemas/ConnectionType"},"version":{"type":"number"}},"required":["target","version","type"],"type":"object","xml":{"name":"InterFacilityConnectionToSupplierForUpdate"},"title":"InterFacilityConnectionToSupplierForUpdate","description":"InterFacilityConnectionToSupplierForUpdate"},"InterFacilityConnectionContext":{"additionalProperties":false,"properties":{"operator":{"$ref":"#/components/schemas/ContextOperator"},"type":{"$ref":"#/components/schemas/InterFacilityConnectionContextTypes"},"values":{"items":{"maxItems":2000,"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"],"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","minimum":0,"type":"integer"},"minTransitDays":{"description":"Minimum days a carrier needs for transit","minimum":0,"type":"integer"}},"required":["maxTransitDays","minTransitDays"],"type":"object","title":"CarrierTransitTime","description":"CarrierTransitTime"},"NonDeliveryDaysPerCountryAndProvince":{"additionalProperties":false,"properties":{"country":{"type":"string"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDays"},"type":"array"},"nonDeliveryDaysPerProvince":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerProvince"},"type":"array"},"recurringNonDeliveryWeekdays":{"items":{"$ref":"#/components/schemas/WeekDay"},"type":"array"}},"required":["country","nonDeliveryDays","recurringNonDeliveryWeekdays","nonDeliveryDaysPerProvince"],"type":"object","title":"NonDeliveryDaysPerCountryAndProvince","description":"NonDeliveryDaysPerCountryAndProvince"},"NonDeliveryDays":{"additionalProperties":false,"properties":{"nonDeliveryDay":{"format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"nonDeliveryType":{"$ref":"#/components/schemas/NonDeliveryType","default":"SINGLE"}},"required":["nonDeliveryDay"],"type":"object","title":"NonDeliveryDays","description":"NonDeliveryDays"},"NonDeliveryType":{"enum":["SINGLE","RECURRING"],"type":"string","title":"NonDeliveryType","description":"NonDeliveryType"},"NonDeliveryDaysPerProvince":{"additionalProperties":false,"properties":{"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDays"},"type":"array"},"province":{"type":"string"},"recurringNonDeliveryWeekdays":{"items":{"$ref":"#/components/schemas/WeekDay"},"type":"array"}},"required":["province","nonDeliveryDays","recurringNonDeliveryWeekdays"],"type":"object","title":"NonDeliveryDaysPerProvince","description":"NonDeliveryDaysPerProvince"},"PackagingUnitsByContext":{"additionalProperties":false,"properties":{"context":{"items":{"$ref":"#/components/schemas/PackagingUnitContext"},"maxItems":2000,"minItems":0,"type":"array"},"packagingUnits":{"items":{"$ref":"#/components/schemas/PackagingUnit"},"maxItems":2000,"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":2000,"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"}},"type":"object","title":"PackagingUnitDimensions","description":"PackagingUnitDimensions"},"InterFacilityConnectionSupplierTarget":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionBaseTarget"}],"properties":{"excludedFacilityGroupRefs":{"items":{"type":"string"},"type":"array"},"excludedFacilityRefs":{"items":{"type":"string"},"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"},"InterFacilityConnectionToManagedFacilityForUpdate":{"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":2000,"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"},"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":2000,"minItems":0,"type":"array"},"target":{"$ref":"#/components/schemas/InterFacilityConnectionManagedFacilityTarget"},"type":{"$ref":"#/components/schemas/ConnectionType"},"version":{"type":"number"}},"required":["target","version","type"],"type":"object","xml":{"name":"InterFacilityConnectionToManagedFacilityForUpdate"},"title":"InterFacilityConnectionToManagedFacilityForUpdate","description":"InterFacilityConnectionToManagedFacilityForUpdate"},"InterFacilityConnectionManagedFacilityTarget":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionBaseTarget"}],"properties":{"excludedFacilityGroupRefs":{"items":{"type":"string"},"type":"array"},"excludedFacilityRefs":{"items":{"type":"string"},"type":"array"},"facilityRef":{"type":"string"}},"type":"object","title":"InterFacilityConnectionManagedFacilityTarget","description":"InterFacilityConnectionManagedFacilityTarget"},"InterFacilityConnectionToCustomerForUpdate":{"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":2000,"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"},"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":2000,"minItems":0,"type":"array"},"target":{"$ref":"#/components/schemas/InterFacilityConnectionCustomerTarget"},"type":{"$ref":"#/components/schemas/ConnectionType"},"version":{"type":"number"}},"required":["target","version","type"],"type":"object","xml":{"name":"InterFacilityConnectionToCustomerForUpdate"},"title":"InterFacilityConnectionToCustomerForUpdate","description":"InterFacilityConnectionToCustomerForUpdate"},"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":2000,"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"},"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"id":{"type":"string"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":2000,"minItems":0,"type":"array"},"sourceFacilityRef":{"type":"string"},"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"}}}},"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/{connectionId}":{"put":{"description":"This part of the API is in Beta status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Update the given connection for a facility","operationId":"updateFacilityConnection","parameters":[{"description":"ID of facility you want to get","in":"path","name":"facilityId","required":true,"schema":{"type":"string"}},{"description":"The referenced connection ID","in":"path","name":"connectionId","required":true,"schema":{"type":"string"}},{"description":"Provide the localized names and descriptions for the parcel label classifications. If not provided the default locale is used., for example de_DE.","in":"query","name":"locale","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InterFacilityConnectionToSupplierForUpdate"},{"$ref":"#/components/schemas/InterFacilityConnectionToManagedFacilityForUpdate"},{"$ref":"#/components/schemas/InterFacilityConnectionToCustomerForUpdate"}],"discriminator":{"propertyName":"type","mapping":{"CUSTOMER":"#/components/schemas/InterFacilityConnectionToCustomerForUpdate","MANAGED_FACILITY":"#/components/schemas/InterFacilityConnectionToManagedFacilityForUpdate","SUPPLIER":"#/components/schemas/InterFacilityConnectionToSupplierForUpdate"}}}}},"description":"Representation that describes the facility","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InterFacilityConnection"}}},"description":"Modification 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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"There is no connection with this facility referenced by the provided cnnectionId."}},"summary":"Update facility connection","tags":["Facilities (Core)"]}}}}
```

## Delete facility connection

> This part of the API is in Beta status. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Delete the connection for facility with the 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 (Core)"}],"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":{"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/{connectionId}":{"delete":{"description":"This part of the API is in Beta status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Delete the connection for facility with the given ID","operationId":"deleteFacilityConnection","parameters":[{"description":"ID of facility you want to delete a connection","in":"path","name":"facilityId","required":true,"schema":{"type":"string"}},{"description":"The ID of the connection you want to delete","in":"path","name":"connectionId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deletion 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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"There is no connection for the facility and the provided id"}},"summary":"Delete facility connection","tags":["Facilities (Core)"]}}}}
```

## GET /api/facilities/{facilityRef}/discounts

> List facility discounts

```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 (Core)"}],"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":{"FacilityDiscountPaginatedResult":{"additionalProperties":false,"properties":{"items":{"description":"The list of discounts that match the search criteria. The list might be empty if no discounts match the search criteria.","items":{"$ref":"#/components/schemas/FacilityDiscount"},"type":"array"},"total":{"description":"The total number of discounts that match the search criteria. This number is not limited by the page size.","format":"int64","type":"integer"}},"required":["items","total"],"title":"FacilityDiscountPaginatedResult","description":"FacilityDiscountPaginatedResult"},"FacilityDiscount":{"additionalProperties":false,"allOf":[{"$ref":"#/components/schemas/FacilityDiscountForCreation"},{"$ref":"#/components/schemas/VersionedResource"}],"properties":{"discount":{"oneOf":[{"$ref":"#/components/schemas/FacilityDiscountRelative"},{"$ref":"#/components/schemas/FacilityDiscountAbsolute"}]},"facilityRef":{"description":"The id of the facility the discount belongs to. It is generated during creation automatically and suits as the primary identifier of the described entity.","type":"string"},"id":{"description":"The id of the supplier discount. It is generated during creation automatically and suits as the primary identifier of the described entity.","type":"string"}},"required":["facilityRef","discount","priority","type","id"],"title":"FacilityDiscount","description":"FacilityDiscount"},"FacilityDiscountForCreation":{"additionalProperties":false,"properties":{"context":{"description":"The context of the discount. This is used to determine the conditions  under which the discount can be applied.","items":{"$ref":"#/components/schemas/FacilityDiscountContext","maxLength":2000,"minItems":0},"type":"array"},"discount":{"oneOf":[{"$ref":"#/components/schemas/FacilityDiscountRelative"},{"$ref":"#/components/schemas/FacilityDiscountAbsoluteForCreation"}]},"priority":{"description":"The priority of the discount. Discounts with the lowest priority value are applied first. Value must be greater than 0 and smaller than 1000.","type":"integer"},"type":{"$ref":"#/components/schemas/FacilityDiscountPriceType"}},"required":["discount","priority","type"],"title":"FacilityDiscountForCreation","description":"FacilityDiscountForCreation"},"FacilityDiscountContext":{"additionalProperties":false,"description":"The context of the discount. This is used to determine the conditions  under which the discount can be applied.","properties":{"operator":{"$ref":"#/components/schemas/ContextOperator"},"type":{"$ref":"#/components/schemas/FacilityDiscountContextTypes"},"values":{"description":"The values of the context. This is used to determine the conditions  under which the discount can be applied.","items":{"maxItems":100,"minItems":0,"type":"string"},"type":"array"}},"required":["type","values"],"type":"object","title":"FacilityDiscountContext"},"ContextOperator":{"description":"The operator used to define how the context values are evaluated or compared.","enum":["NOT"],"type":"string","title":"ContextOperator"},"FacilityDiscountContextTypes":{"description":"The context type of the discount. This is used to determine the conditions  under which the discount can be applied.","enum":["FACILITY","FACILITY_GROUP","CATEGORY"],"type":"string","title":"FacilityDiscountContextTypes"},"FacilityDiscountRelative":{"additionalProperties":false,"properties":{"type":{"enum":["RELATIVE"],"type":"string"},"value":{"description":"Provided discount in percent.","minimum":0.1,"type":"number"}},"required":["type","value"],"type":"object","title":"FacilityDiscountRelative","description":"FacilityDiscountRelative"},"FacilityDiscountAbsoluteForCreation":{"additionalProperties":false,"properties":{"type":{"enum":["ABSOLUTE"],"type":"string"},"values":{"items":{"$ref":"#/components/schemas/FacilityDiscountAbsoluteElement"},"minItems":1,"type":"array"}},"required":["type","values"],"type":"object","title":"FacilityDiscountAbsoluteForCreation","description":"FacilityDiscountAbsoluteForCreation"},"FacilityDiscountAbsoluteElement":{"additionalProperties":false,"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code."},"decimalPlaces":{"description":"Number of decimal places for the given currency","minimum":0,"type":"integer"},"value":{"description":"Total value that should be shipped. Value is configured in the smallest subunit, e.g. cents.","minimum":1,"type":"integer"}},"required":["value","currency","decimalPlaces"],"type":"object","title":"FacilityDiscountAbsoluteElement","description":"FacilityDiscountAbsoluteElement"},"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"},"FacilityDiscountPriceType":{"description":"Determines the price type this discount can be applied to.","enum":["SALES_PRICE"],"type":"string","title":"FacilityDiscountPriceType"},"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"},"FacilityDiscountAbsolute":{"additionalProperties":false,"properties":{"type":{"enum":["ABSOLUTE"],"type":"string"},"values":{"items":{"$ref":"#/components/schemas/FacilityDiscountAbsoluteElement"},"minItems":1,"type":"array"}},"required":["type","values"],"type":"object","title":"FacilityDiscountAbsolute","description":"FacilityDiscountAbsolute"},"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/{facilityRef}/discounts":{"get":{"description":"","operationId":"getDiscountsForFacility","parameters":[{"description":"ID of the facility you want to get the discounts for. Also accepts tenantFacilityId in urn format (e.g. urn:fft:facility:tenantFacilityId:{your-tenant-facility-id}).","in":"path","name":"facilityRef","required":true,"schema":{"type":"string"}},{"description":"all entities after given Id","in":"query","name":"startAfterId","required":false,"schema":{"type":"string"}},{"description":"number of facilities to show","in":"query","name":"size","required":false,"schema":{"default":25,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FacilityDiscountPaginatedResult"}}}},"description":"The discounts were successfully retrieved. The result is in the body."},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Facility not found"}},"summary":"List facility discounts","tags":["Facilities (Core)"]}}}}
```

## POST /api/facilities/{facilityRef}/discounts

> Create facility discount

```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 (Core)"}],"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":{"FacilityDiscountForCreation":{"additionalProperties":false,"properties":{"context":{"description":"The context of the discount. This is used to determine the conditions  under which the discount can be applied.","items":{"$ref":"#/components/schemas/FacilityDiscountContext","maxLength":2000,"minItems":0},"type":"array"},"discount":{"oneOf":[{"$ref":"#/components/schemas/FacilityDiscountRelative"},{"$ref":"#/components/schemas/FacilityDiscountAbsoluteForCreation"}]},"priority":{"description":"The priority of the discount. Discounts with the lowest priority value are applied first. Value must be greater than 0 and smaller than 1000.","type":"integer"},"type":{"$ref":"#/components/schemas/FacilityDiscountPriceType"}},"required":["discount","priority","type"],"title":"FacilityDiscountForCreation","description":"FacilityDiscountForCreation"},"FacilityDiscountContext":{"additionalProperties":false,"description":"The context of the discount. This is used to determine the conditions  under which the discount can be applied.","properties":{"operator":{"$ref":"#/components/schemas/ContextOperator"},"type":{"$ref":"#/components/schemas/FacilityDiscountContextTypes"},"values":{"description":"The values of the context. This is used to determine the conditions  under which the discount can be applied.","items":{"maxItems":100,"minItems":0,"type":"string"},"type":"array"}},"required":["type","values"],"type":"object","title":"FacilityDiscountContext"},"ContextOperator":{"description":"The operator used to define how the context values are evaluated or compared.","enum":["NOT"],"type":"string","title":"ContextOperator"},"FacilityDiscountContextTypes":{"description":"The context type of the discount. This is used to determine the conditions  under which the discount can be applied.","enum":["FACILITY","FACILITY_GROUP","CATEGORY"],"type":"string","title":"FacilityDiscountContextTypes"},"FacilityDiscountRelative":{"additionalProperties":false,"properties":{"type":{"enum":["RELATIVE"],"type":"string"},"value":{"description":"Provided discount in percent.","minimum":0.1,"type":"number"}},"required":["type","value"],"type":"object","title":"FacilityDiscountRelative","description":"FacilityDiscountRelative"},"FacilityDiscountAbsoluteForCreation":{"additionalProperties":false,"properties":{"type":{"enum":["ABSOLUTE"],"type":"string"},"values":{"items":{"$ref":"#/components/schemas/FacilityDiscountAbsoluteElement"},"minItems":1,"type":"array"}},"required":["type","values"],"type":"object","title":"FacilityDiscountAbsoluteForCreation","description":"FacilityDiscountAbsoluteForCreation"},"FacilityDiscountAbsoluteElement":{"additionalProperties":false,"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code."},"decimalPlaces":{"description":"Number of decimal places for the given currency","minimum":0,"type":"integer"},"value":{"description":"Total value that should be shipped. Value is configured in the smallest subunit, e.g. cents.","minimum":1,"type":"integer"}},"required":["value","currency","decimalPlaces"],"type":"object","title":"FacilityDiscountAbsoluteElement","description":"FacilityDiscountAbsoluteElement"},"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"},"FacilityDiscountPriceType":{"description":"Determines the price type this discount can be applied to.","enum":["SALES_PRICE"],"type":"string","title":"FacilityDiscountPriceType"},"FacilityDiscount":{"additionalProperties":false,"allOf":[{"$ref":"#/components/schemas/FacilityDiscountForCreation"},{"$ref":"#/components/schemas/VersionedResource"}],"properties":{"discount":{"oneOf":[{"$ref":"#/components/schemas/FacilityDiscountRelative"},{"$ref":"#/components/schemas/FacilityDiscountAbsolute"}]},"facilityRef":{"description":"The id of the facility the discount belongs to. It is generated during creation automatically and suits as the primary identifier of the described entity.","type":"string"},"id":{"description":"The id of the supplier discount. It is generated during creation automatically and suits as the primary identifier of the described entity.","type":"string"}},"required":["facilityRef","discount","priority","type","id"],"title":"FacilityDiscount","description":"FacilityDiscount"},"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"},"FacilityDiscountAbsolute":{"additionalProperties":false,"properties":{"type":{"enum":["ABSOLUTE"],"type":"string"},"values":{"items":{"$ref":"#/components/schemas/FacilityDiscountAbsoluteElement"},"minItems":1,"type":"array"}},"required":["type","values"],"type":"object","title":"FacilityDiscountAbsolute","description":"FacilityDiscountAbsolute"},"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/{facilityRef}/discounts":{"post":{"description":"","operationId":"addDiscountToFacility","parameters":[{"description":"ID of the facility you want to add the discount to. Also accepts tenantFacilityId in urn format (e.g. urn:fft:facility:tenantFacilityId:{your-tenant-facility-id}).","in":"path","name":"facilityRef","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityDiscountForCreation"}}},"description":"Representation that describes the discount","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityDiscount"}}},"description":"The discount was successfully created. The Location header contains the URL of the discount."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Invalid input. See response for details"},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Facility not found"}},"summary":"Create facility discount","tags":["Facilities (Core)"]}}}}
```

## GET /api/facilities/{facilityRef}/discounts/{facilityDiscountRef}

> Get facility discount

```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 (Core)"}],"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":{"FacilityDiscount":{"additionalProperties":false,"allOf":[{"$ref":"#/components/schemas/FacilityDiscountForCreation"},{"$ref":"#/components/schemas/VersionedResource"}],"properties":{"discount":{"oneOf":[{"$ref":"#/components/schemas/FacilityDiscountRelative"},{"$ref":"#/components/schemas/FacilityDiscountAbsolute"}]},"facilityRef":{"description":"The id of the facility the discount belongs to. It is generated during creation automatically and suits as the primary identifier of the described entity.","type":"string"},"id":{"description":"The id of the supplier discount. It is generated during creation automatically and suits as the primary identifier of the described entity.","type":"string"}},"required":["facilityRef","discount","priority","type","id"],"title":"FacilityDiscount","description":"FacilityDiscount"},"FacilityDiscountForCreation":{"additionalProperties":false,"properties":{"context":{"description":"The context of the discount. This is used to determine the conditions  under which the discount can be applied.","items":{"$ref":"#/components/schemas/FacilityDiscountContext","maxLength":2000,"minItems":0},"type":"array"},"discount":{"oneOf":[{"$ref":"#/components/schemas/FacilityDiscountRelative"},{"$ref":"#/components/schemas/FacilityDiscountAbsoluteForCreation"}]},"priority":{"description":"The priority of the discount. Discounts with the lowest priority value are applied first. Value must be greater than 0 and smaller than 1000.","type":"integer"},"type":{"$ref":"#/components/schemas/FacilityDiscountPriceType"}},"required":["discount","priority","type"],"title":"FacilityDiscountForCreation","description":"FacilityDiscountForCreation"},"FacilityDiscountContext":{"additionalProperties":false,"description":"The context of the discount. This is used to determine the conditions  under which the discount can be applied.","properties":{"operator":{"$ref":"#/components/schemas/ContextOperator"},"type":{"$ref":"#/components/schemas/FacilityDiscountContextTypes"},"values":{"description":"The values of the context. This is used to determine the conditions  under which the discount can be applied.","items":{"maxItems":100,"minItems":0,"type":"string"},"type":"array"}},"required":["type","values"],"type":"object","title":"FacilityDiscountContext"},"ContextOperator":{"description":"The operator used to define how the context values are evaluated or compared.","enum":["NOT"],"type":"string","title":"ContextOperator"},"FacilityDiscountContextTypes":{"description":"The context type of the discount. This is used to determine the conditions  under which the discount can be applied.","enum":["FACILITY","FACILITY_GROUP","CATEGORY"],"type":"string","title":"FacilityDiscountContextTypes"},"FacilityDiscountRelative":{"additionalProperties":false,"properties":{"type":{"enum":["RELATIVE"],"type":"string"},"value":{"description":"Provided discount in percent.","minimum":0.1,"type":"number"}},"required":["type","value"],"type":"object","title":"FacilityDiscountRelative","description":"FacilityDiscountRelative"},"FacilityDiscountAbsoluteForCreation":{"additionalProperties":false,"properties":{"type":{"enum":["ABSOLUTE"],"type":"string"},"values":{"items":{"$ref":"#/components/schemas/FacilityDiscountAbsoluteElement"},"minItems":1,"type":"array"}},"required":["type","values"],"type":"object","title":"FacilityDiscountAbsoluteForCreation","description":"FacilityDiscountAbsoluteForCreation"},"FacilityDiscountAbsoluteElement":{"additionalProperties":false,"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code."},"decimalPlaces":{"description":"Number of decimal places for the given currency","minimum":0,"type":"integer"},"value":{"description":"Total value that should be shipped. Value is configured in the smallest subunit, e.g. cents.","minimum":1,"type":"integer"}},"required":["value","currency","decimalPlaces"],"type":"object","title":"FacilityDiscountAbsoluteElement","description":"FacilityDiscountAbsoluteElement"},"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"},"FacilityDiscountPriceType":{"description":"Determines the price type this discount can be applied to.","enum":["SALES_PRICE"],"type":"string","title":"FacilityDiscountPriceType"},"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"},"FacilityDiscountAbsolute":{"additionalProperties":false,"properties":{"type":{"enum":["ABSOLUTE"],"type":"string"},"values":{"items":{"$ref":"#/components/schemas/FacilityDiscountAbsoluteElement"},"minItems":1,"type":"array"}},"required":["type","values"],"type":"object","title":"FacilityDiscountAbsolute","description":"FacilityDiscountAbsolute"},"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/{facilityRef}/discounts/{facilityDiscountRef}":{"get":{"description":"","operationId":"getDiscountForFacility","parameters":[{"description":"ID of the facility you want to get the discount for. Also accepts tenantFacilityId in urn format (e.g. urn:fft:facility:tenantFacilityId:{your-tenant-facility-id}).","in":"path","name":"facilityRef","required":true,"schema":{"type":"string"}},{"description":"ID of the discount you want to get","in":"path","name":"facilityDiscountRef","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityDiscount"}}},"description":"The discount was successfully retrieved. The result is in the body."},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Facility or discount not found"}},"summary":"Get facility discount","tags":["Facilities (Core)"]}}}}
```

## DELETE /api/facilities/{facilityRef}/discounts/{facilityDiscountRef}

> Delete facility discount

```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 (Core)"}],"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":{"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/{facilityRef}/discounts/{facilityDiscountRef}":{"delete":{"description":"","operationId":"deleteDiscountForFacility","parameters":[{"description":"ID of the facility you want to delete the discount from. Also accepts tenantFacilityId in urn format (e.g. urn:fft:facility:tenantFacilityId:{your-tenant-facility-id}).","in":"path","name":"facilityRef","required":true,"schema":{"type":"string"}},{"description":"ID of the discount you want to delete","in":"path","name":"facilityDiscountRef","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The discount was successfully deleted. The result is in the body."},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Facility or discount not found"}},"summary":"Delete facility discount","tags":["Facilities (Core)"]}}}}
```

## PATCH /api/facilities/{facilityRef}/discounts/{facilityDiscountRef}

> Update facility discount

```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 (Core)"}],"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":{"FacilityDiscountForUpdate":{"additionalProperties":false,"properties":{"context":{"description":"The context of the discount. This is used to determine the conditions  under which the discount can be applied.","items":{"$ref":"#/components/schemas/FacilityDiscountContext","maxLength":2000,"minItems":0},"type":"array"},"discount":{"oneOf":[{"$ref":"#/components/schemas/FacilityDiscountRelative"},{"$ref":"#/components/schemas/FacilityDiscountAbsoluteForCreation"}]},"priority":{"description":"The priority of the discount. Discounts with the lowest priority value are applied first. Must be greater than 0 and smaller than 1000.","type":"integer"},"type":{"$ref":"#/components/schemas/FacilityDiscountPriceType"},"version":{"description":"The version of the document to be used in optimistic locking mechanisms.","format":"int64","type":"integer"}},"required":["version"],"title":"FacilityDiscountForUpdate","description":"FacilityDiscountForUpdate"},"FacilityDiscountContext":{"additionalProperties":false,"description":"The context of the discount. This is used to determine the conditions  under which the discount can be applied.","properties":{"operator":{"$ref":"#/components/schemas/ContextOperator"},"type":{"$ref":"#/components/schemas/FacilityDiscountContextTypes"},"values":{"description":"The values of the context. This is used to determine the conditions  under which the discount can be applied.","items":{"maxItems":100,"minItems":0,"type":"string"},"type":"array"}},"required":["type","values"],"type":"object","title":"FacilityDiscountContext"},"ContextOperator":{"description":"The operator used to define how the context values are evaluated or compared.","enum":["NOT"],"type":"string","title":"ContextOperator"},"FacilityDiscountContextTypes":{"description":"The context type of the discount. This is used to determine the conditions  under which the discount can be applied.","enum":["FACILITY","FACILITY_GROUP","CATEGORY"],"type":"string","title":"FacilityDiscountContextTypes"},"FacilityDiscountRelative":{"additionalProperties":false,"properties":{"type":{"enum":["RELATIVE"],"type":"string"},"value":{"description":"Provided discount in percent.","minimum":0.1,"type":"number"}},"required":["type","value"],"type":"object","title":"FacilityDiscountRelative","description":"FacilityDiscountRelative"},"FacilityDiscountAbsoluteForCreation":{"additionalProperties":false,"properties":{"type":{"enum":["ABSOLUTE"],"type":"string"},"values":{"items":{"$ref":"#/components/schemas/FacilityDiscountAbsoluteElement"},"minItems":1,"type":"array"}},"required":["type","values"],"type":"object","title":"FacilityDiscountAbsoluteForCreation","description":"FacilityDiscountAbsoluteForCreation"},"FacilityDiscountAbsoluteElement":{"additionalProperties":false,"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code."},"decimalPlaces":{"description":"Number of decimal places for the given currency","minimum":0,"type":"integer"},"value":{"description":"Total value that should be shipped. Value is configured in the smallest subunit, e.g. cents.","minimum":1,"type":"integer"}},"required":["value","currency","decimalPlaces"],"type":"object","title":"FacilityDiscountAbsoluteElement","description":"FacilityDiscountAbsoluteElement"},"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"},"FacilityDiscountPriceType":{"description":"Determines the price type this discount can be applied to.","enum":["SALES_PRICE"],"type":"string","title":"FacilityDiscountPriceType"},"FacilityDiscount":{"additionalProperties":false,"allOf":[{"$ref":"#/components/schemas/FacilityDiscountForCreation"},{"$ref":"#/components/schemas/VersionedResource"}],"properties":{"discount":{"oneOf":[{"$ref":"#/components/schemas/FacilityDiscountRelative"},{"$ref":"#/components/schemas/FacilityDiscountAbsolute"}]},"facilityRef":{"description":"The id of the facility the discount belongs to. It is generated during creation automatically and suits as the primary identifier of the described entity.","type":"string"},"id":{"description":"The id of the supplier discount. It is generated during creation automatically and suits as the primary identifier of the described entity.","type":"string"}},"required":["facilityRef","discount","priority","type","id"],"title":"FacilityDiscount","description":"FacilityDiscount"},"FacilityDiscountForCreation":{"additionalProperties":false,"properties":{"context":{"description":"The context of the discount. This is used to determine the conditions  under which the discount can be applied.","items":{"$ref":"#/components/schemas/FacilityDiscountContext","maxLength":2000,"minItems":0},"type":"array"},"discount":{"oneOf":[{"$ref":"#/components/schemas/FacilityDiscountRelative"},{"$ref":"#/components/schemas/FacilityDiscountAbsoluteForCreation"}]},"priority":{"description":"The priority of the discount. Discounts with the lowest priority value are applied first. Value must be greater than 0 and smaller than 1000.","type":"integer"},"type":{"$ref":"#/components/schemas/FacilityDiscountPriceType"}},"required":["discount","priority","type"],"title":"FacilityDiscountForCreation","description":"FacilityDiscountForCreation"},"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"},"FacilityDiscountAbsolute":{"additionalProperties":false,"properties":{"type":{"enum":["ABSOLUTE"],"type":"string"},"values":{"items":{"$ref":"#/components/schemas/FacilityDiscountAbsoluteElement"},"minItems":1,"type":"array"}},"required":["type","values"],"type":"object","title":"FacilityDiscountAbsolute","description":"FacilityDiscountAbsolute"},"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/{facilityRef}/discounts/{facilityDiscountRef}":{"patch":{"description":"","operationId":"updateDiscountForFacility","parameters":[{"description":"ID of the facility you want to update the discount for. Also accepts tenantFacilityId in urn format (e.g. urn:fft:facility:tenantFacilityId:{your-tenant-facility-id}).","in":"path","name":"facilityRef","required":true,"schema":{"type":"string"}},{"description":"ID of the discount you want to update","in":"path","name":"facilityDiscountRef","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityDiscountForUpdate"}}},"description":"Representation that describes the discount","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityDiscount"}}},"description":"The discount was successfully updated. The result is in the body."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Invalid input. See response for details"},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Facility or discount not found"}},"summary":"Update facility discount","tags":["Facilities (Core)"]}}}}
```

## List facilities (search)

> This part of the API is in Beta status. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Search for Facility

```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 (Core)"}],"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":{"FacilitySearchPayload":{"properties":{"after":{"deprecated":false,"description":"The cursor to start after for forward pagination. The value is provided in the `pageInfo.endCursor` field of the response. Cannot be used with `before` or `last`.","type":"string"},"before":{"description":"The cursor to start before for backward pagination. The value is provided in the `pageInfo.startCursor` field of the response. Cannot be used with `after` or `size` (first).","type":"string"},"last":{"description":"Number of items to return for backward pagination. Cannot be used with 'size' (first). Default: 20.","maximum":250,"minimum":1,"type":"number"},"options":{"$ref":"#/components/schemas/SearchOptions"},"query":{"$ref":"#/components/schemas/FacilitySearchQuery"},"size":{"description":"Number of items to return for forward pagination. Cannot be used with 'last'. Default: 20.","maximum":250,"minimum":1,"type":"number"},"sort":{"description":"Use for sorting the result.","items":{"$ref":"#/components/schemas/FacilitySort"},"maxItems":1,"minItems":1,"type":"array"},"startAfterId":{"deprecated":true,"description":"The ID to start after. Deprecated, use `after` with the value provided in `pageInfo.endCursor` instead.","type":"string"}},"required":["query"],"title":"FacilitySearchPayload","type":"object","description":"FacilitySearchPayload"},"SearchOptions":{"properties":{"withTotal":{"description":"Set to true to include the total count of items in the search result.","type":"boolean"}},"title":"SearchOptions","type":"object","description":"SearchOptions"},"FacilitySearchQuery":{"properties":{"address":{"allOf":[{"$ref":"#/components/schemas/FacilityAddressFilter"}],"description":"Nested search by address"},"and":{"items":{"$ref":"#/components/schemas/FacilitySearchQuery"},"maxItems":500,"type":"array"},"contact":{"allOf":[{"$ref":"#/components/schemas/FacilityContactFilter"}],"description":"Nested search by contact"},"customAttributes":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/BooleanFilter"},{"$ref":"#/components/schemas/StringEqFilter"},{"$ref":"#/components/schemas/NumberEqFilter"},{"$ref":"#/components/schemas/DateFilter"}]},"description":"Search by custom attributes","type":"object"},"id":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by id"},"locationType":{"allOf":[{"$ref":"#/components/schemas/FacilityLocationTypeEnumFilter"}],"description":"Search by locationType"},"name":{"allOf":[{"$ref":"#/components/schemas/StringSearchFilter"}],"description":"Search by name"},"or":{"items":{"$ref":"#/components/schemas/FacilitySearchQuery"},"maxItems":500,"type":"array"},"services":{"allOf":[{"$ref":"#/components/schemas/FacilityServicesListFilter"}],"description":"Nested list search by services"},"status":{"allOf":[{"$ref":"#/components/schemas/FacilityStatusEnumFilter"}],"description":"Search by status"},"tenantFacilityId":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by tenantFacilityId"},"type":{"allOf":[{"$ref":"#/components/schemas/FacilityTypeEnumFilter"}],"description":"Search by type"},"tags":{"allOf":[{"$ref":"#/components/schemas/FacilityTagsListFilter"}],"description":"Nested list search by tags"}},"title":"FacilitySearchQuery","type":"object","description":"FacilitySearchQuery"},"FacilityAddressFilter":{"properties":{"city":{"allOf":[{"$ref":"#/components/schemas/StringSearchFilter"}],"description":"Search by city"},"companyName":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by companyName"},"country":{"allOf":[{"$ref":"#/components/schemas/StringSearchFilter"}],"description":"Search by country"},"customAttributes":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/BooleanFilter"},{"$ref":"#/components/schemas/StringEqFilter"},{"$ref":"#/components/schemas/NumberEqFilter"},{"$ref":"#/components/schemas/DateFilter"}]},"description":"Search by custom attributes","type":"object"},"emailAddresses":{"allOf":[{"$ref":"#/components/schemas/FacilityAddressEmailAddressesListFilter"}],"description":"Nested list search by emailAddresses"},"houseNumber":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by houseNumber"},"postalCode":{"allOf":[{"$ref":"#/components/schemas/StringSearchFilter"}],"description":"Search by postalCode"},"province":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by province"},"street":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by street"}},"title":"FacilityAddressFilter","type":"object","description":"FacilityAddressFilter"},"StringSearchFilter":{"properties":{"eq":{"maxLength":256,"type":"string"},"in":{"items":{"maxLength":256,"type":"string"},"maxItems":25,"type":"array"},"like":{"description":"Search by regex pattern","maxLength":256,"type":"string"},"notEq":{"maxLength":256,"type":"string"},"notIn":{"items":{"maxLength":256,"type":"string"},"maxItems":25,"type":"array"}},"title":"StringSearchFilter","type":"object","description":"StringSearchFilter"},"StringFilter":{"properties":{"eq":{"maxLength":256,"type":"string"},"in":{"items":{"maxLength":256,"type":"string"},"maxItems":25,"type":"array"},"notEq":{"maxLength":256,"type":"string"},"notIn":{"items":{"maxLength":256,"type":"string"},"maxItems":25,"type":"array"}},"title":"StringFilter","type":"object","description":"StringFilter"},"BooleanFilter":{"properties":{"eq":{"type":"boolean"},"notEq":{"type":"boolean"}},"title":"BooleanFilter","type":"object","description":"BooleanFilter"},"StringEqFilter":{"properties":{"eq":{"maxLength":256,"type":"string"},"notEq":{"maxLength":256,"type":"string"}},"title":"StringEqFilter","type":"object","description":"StringEqFilter"},"NumberEqFilter":{"properties":{"eq":{"type":"number"},"gt":{"type":"number"},"gte":{"type":"number"},"lt":{"type":"number"},"lte":{"type":"number"},"notEq":{"type":"number"}},"title":"NumberEqFilter","type":"object","description":"NumberEqFilter"},"DateFilter":{"properties":{"after":{"description":"Search using ISO‑8601 dates relative to today. Prefix with “–” for past dates. Results include events after the specified date. Example: “–P1D” for yesterday, “P1W” for next week.","maxLength":256,"type":"string"},"before":{"description":"Search using ISO‑8601 dates relative to today. Prefix with “–” for past dates. Results include events before the specified date. Example: “–P1D” for yesterday, “P1W” for next week.","maxLength":256,"type":"string"},"eq":{"format":"date-time","type":"string"},"gt":{"format":"date-time","type":"string"},"gte":{"format":"date-time","type":"string"},"lt":{"format":"date-time","type":"string"},"lte":{"format":"date-time","type":"string"},"notEq":{"format":"date-time","type":"string"}},"title":"DateFilter","type":"object","description":"DateFilter"},"FacilityAddressEmailAddressesListFilter":{"properties":{"contains":{"allOf":[{"$ref":"#/components/schemas/FacilityAddressEmailAddressesFilter"}],"description":"Contains returns if at least one entry matches"}},"title":"FacilityAddressEmailAddressesListFilter","type":"object","description":"FacilityAddressEmailAddressesListFilter"},"FacilityAddressEmailAddressesFilter":{"properties":{"recipient":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by recipient"},"value":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by value"}},"title":"FacilityAddressEmailAddressesFilter","type":"object","description":"FacilityAddressEmailAddressesFilter"},"FacilityContactFilter":{"properties":{"firstName":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by firstName"},"lastName":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by lastName"}},"title":"FacilityContactFilter","type":"object","description":"FacilityContactFilter"},"FacilityLocationTypeEnumFilter":{"properties":{"eq":{"description":"Search by locationType","enum":["STORE","WAREHOUSE","EXTERNAL"],"type":"string"},"in":{"description":"Search by locationType","items":{"enum":["STORE","WAREHOUSE","EXTERNAL"],"type":"string"},"maxItems":500,"type":"array"},"notEq":{"description":"Search by locationType","enum":["STORE","WAREHOUSE","EXTERNAL"],"type":"string"}},"title":"FacilityLocationTypeEnumFilter","type":"object","description":"FacilityLocationTypeEnumFilter"},"FacilityServicesListFilter":{"properties":{"contains":{"allOf":[{"$ref":"#/components/schemas/FacilityServicesFilter"}],"description":"Contains returns if at least one entry matches"}},"title":"FacilityServicesListFilter","type":"object","description":"FacilityServicesListFilter"},"FacilityServicesFilter":{"properties":{"type":{"allOf":[{"$ref":"#/components/schemas/FacilityServicesFacilityServiceTypeEnumFilter"}],"description":"Search by type"}},"title":"FacilityServicesFilter","type":"object","description":"FacilityServicesFilter"},"FacilityServicesFacilityServiceTypeEnumFilter":{"properties":{"eq":{"description":"Search by type","enum":["SHIP_FROM_STORE","PICKUP"],"type":"string"},"in":{"description":"Search by type","items":{"enum":["SHIP_FROM_STORE","PICKUP"],"type":"string"},"maxItems":500,"type":"array"},"notEq":{"description":"Search by type","enum":["SHIP_FROM_STORE","PICKUP"],"type":"string"}},"title":"FacilityServicesFacilityServiceTypeEnumFilter","type":"object","description":"FacilityServicesFacilityServiceTypeEnumFilter"},"FacilityStatusEnumFilter":{"properties":{"eq":{"description":"Search by status","enum":["ONLINE","SUSPENDED","OFFLINE"],"type":"string"},"in":{"description":"Search by status","items":{"enum":["ONLINE","SUSPENDED","OFFLINE"],"type":"string"},"maxItems":500,"type":"array"},"notEq":{"description":"Search by status","enum":["ONLINE","SUSPENDED","OFFLINE"],"type":"string"}},"title":"FacilityStatusEnumFilter","type":"object","description":"FacilityStatusEnumFilter"},"FacilityTypeEnumFilter":{"properties":{"eq":{"description":"Search by type","enum":["MANAGED_FACILITY","SUPPLIER"],"type":"string"},"in":{"description":"Search by type","items":{"enum":["MANAGED_FACILITY","SUPPLIER"],"type":"string"},"maxItems":500,"type":"array"},"notEq":{"description":"Search by type","enum":["MANAGED_FACILITY","SUPPLIER"],"type":"string"}},"title":"FacilityTypeEnumFilter","type":"object","description":"FacilityTypeEnumFilter"},"FacilityTagsListFilter":{"properties":{"contains":{"allOf":[{"$ref":"#/components/schemas/FacilityTagsFilter"}],"description":"Contains returns if at least one entry matches"}},"title":"FacilityTagsListFilter","type":"object","description":"FacilityTagsListFilter"},"FacilityTagsFilter":{"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by id"},"value":{"allOf":[{"$ref":"#/components/schemas/StringFilter"}],"description":"Search by value"}},"title":"FacilityTagsFilter","type":"object","description":"FacilityTagsFilter"},"FacilitySort":{"properties":{"address":{"$ref":"#/components/schemas/FacilityAddressSort"},"customAttributes":{"additionalProperties":true,"maxProperties":1,"minProperties":1,"type":"object"},"id":{"enum":["ASC","DESC"],"type":"string"},"lastModified":{"enum":["ASC","DESC"],"type":"string"},"name":{"enum":["ASC","DESC"],"type":"string"},"status":{"enum":["ASC","DESC"],"type":"string"},"tenantFacilityId":{"enum":["ASC","DESC"],"type":"string"},"type":{"enum":["ASC","DESC"],"type":"string"}},"title":"FacilitySort","type":"object","description":"FacilitySort"},"FacilityAddressSort":{"properties":{"city":{"enum":["ASC","DESC"],"type":"string"},"country":{"enum":["ASC","DESC"],"type":"string"},"postalCode":{"enum":["ASC","DESC"],"type":"string"}},"title":"FacilityAddressSort","type":"object","description":"FacilityAddressSort"},"FacilityPaginatedResult":{"properties":{"facilities":{"items":{"oneOf":[{"$ref":"#/components/schemas/ManagedFacility"},{"$ref":"#/components/schemas/Supplier"}]},"type":"array"},"pageInfo":{"allOf":[{"$ref":"#/components/schemas/PageInfo"}],"description":"Pagination information for the search result."},"total":{"description":"The total number of items matching the search criteria. Only filled, if withTotal is set to true in the search options.","minimum":0,"type":"number"}},"required":["pageInfo","facilities"],"title":"FacilityPaginatedResult","type":"object","description":"FacilityPaginatedResult"},"ManagedFacility":{"allOf":[{"$ref":"#/components/schemas/Facility"},{"$ref":"#/components/schemas/ManagedFacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/FacilityAddress"},"configs":{"items":{"$ref":"#/components/schemas/LinkedConfiguration"},"type":"array"}},"required":["status","address","name"],"type":"object","xml":{"name":"ManagedFacility"},"title":"ManagedFacility","description":"ManagedFacility"},"Facility":{"allOf":[{"$ref":"#/components/schemas/VersionedResource"},{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"id":{"description":"The id of this facility. It is generated during creation automatically and suits as the primary identifier of the described entity.","type":"string"},"operativeCosts":{"items":{"$ref":"#/components/schemas/FacilityOperativeCost"},"maxItems":1,"type":"array"}},"required":["id","type","status"],"type":"object","xml":{"name":"Facility"},"title":"Facility","description":"Facility"},"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"},"FacilityForCreation":{"properties":{"customAttributes":{"description":"Attributes that can be added to the facility. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"name":{"type":"string"},"operativeCosts":{"items":{"$ref":"#/components/schemas/FacilityOperativeCostForCreation"},"maxItems":1,"type":"array"},"status":{"$ref":"#/components/schemas/FacilityStatus"},"tenantFacilityId":{"description":"The id of the facility in the tenants own system","type":"string"},"type":{"$ref":"#/components/schemas/FacilityType","default":"MANAGED_FACILITY"},"tags":{"items":{"$ref":"#/components/schemas/TagReference"},"minItems":1,"type":"array"}},"required":["name"],"type":"object","xml":{"name":"FacilityForCreation"},"title":"FacilityForCreation","description":"FacilityForCreation"},"FacilityOperativeCostForCreation":{"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code.","nullable":true,"type":"string"},"decimalPlaces":{"description":"Number of decimal places for the given currency. We be defaulted according to the currency if missing.","minimum":0,"type":"integer"},"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":"FacilityOperativeCostForCreation","description":"FacilityOperativeCostForCreation"},"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"},"FacilityStatus":{"description":"The state of the facility. ONLINE means that this facility can process new orders and pickjobs, SUSPENDED means it cannot get new orders but is able to fulfill the current workload and OFFLINE means that it cannot fulfill any new or existing orders. Processes already running might be rescheduled to another facility depending on the preferences.","enum":["ONLINE","SUSPENDED","OFFLINE"],"type":"string","title":"FacilityStatus"},"FacilityType":{"default":"MANAGED_FACILITY","enum":["MANAGED_FACILITY","SUPPLIER"],"type":"string","xml":{"name":"FacilityType"},"title":"FacilityType","description":"FacilityType"},"TagReference":{"properties":{"id":{"type":"string"},"value":{"type":"string"}},"required":["value","id"],"title":"TagReference","description":"TagReference"},"FacilityOperativeCost":{"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the price as an ISO 4217 code.","nullable":true,"type":"string"},"decimalPlaces":{"description":"Number of decimal places for the given currency","minimum":0,"type":"integer"},"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","decimalPlaces"],"type":"object","title":"FacilityOperativeCost","description":"FacilityOperativeCost"},"ManagedFacilityForCreation":{"allOf":[{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/FacilityAddressForCreation"},"capacityEnabled":{"default":false,"description":"Indicates that configured capacity limits for picking times are considered","type":"boolean"},"capacityPlanningTimeframe":{"description":"The range in days per facility which defines how many days in the future the capacity of the facility can be planned","minimum":1,"type":"integer"},"closingDays":{"description":"Days of the year where the facility is closed and doesn't allows picking","items":{"$ref":"#/components/schemas/ClosingDay"},"type":"array"},"contact":{"$ref":"#/components/schemas/FacilityContact"},"fulfillmentProcessBuffer":{"default":240,"description":"Duration in minutes until an order is processed","minimum":0,"type":"integer"},"locationType":{"$ref":"#/components/schemas/FacilityLocationType"},"pickingMethods":{"description":"Picking Methods supported by this facility.","items":{"$ref":"#/components/schemas/PickingMethodEnum"},"type":"array"},"pickingTimes":{"$ref":"#/components/schemas/PickingTimes","description":"Time ranges defining the picking times per weekday. No overlapping ranges are allowed"},"scanningRule":{"$ref":"#/components/schemas/ScanningRuleConfiguration"},"services":{"items":{"$ref":"#/components/schemas/FacilityService"},"type":"array"}},"required":["name","address"],"type":"object","xml":{"name":"ManagedFacilityForCreation"},"title":"ManagedFacilityForCreation","description":"ManagedFacilityForCreation"},"FacilityAddressForCreation":{"allOf":[{"$ref":"#/components/schemas/Address"},{"properties":{"companyName":{"type":"string"},"emailAddresses":{"items":{"properties":{"recipient":{"description":"Human readable information who is the recipient for emails sent to this address.","type":"string"},"value":{"type":"string"}},"required":["value"],"type":"object"},"type":"array"},"resolvedCoordinates":{"$ref":"#/components/schemas/Coordinates"},"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZoneForCreation","description":"User-specified time zone in identifier format (e.g., \"America/Los_Angeles\"). Used to determine local time. Relevant only if the country spans multiple time zones; otherwise, the time zone is automatically determined from the country or via Google if unspecified."}},"required":["companyName"],"type":"object"}],"type":"object","xml":{"name":"FacilityAddressForCreation"},"title":"FacilityAddressForCreation","description":"FacilityAddressForCreation"},"Address":{"properties":{"additionalAddressInfo":{"type":"string"},"city":{"pattern":"^.+$","type":"string"},"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"customAttributes":{"description":"Attributes that can be added to the address. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"houseNumber":{"pattern":"^.+$","type":"string"},"phoneNumbers":{"items":{"properties":{"customAttributes":{"description":"Attributes that can be added to the phonenumber. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"label":{"description":"Can be used to give a description for the number, like \"private\", \"business number\", etc.","type":"string"},"type":{"enum":["MOBILE","PHONE"],"type":"string"},"value":{"description":"The number itself. We do not enforce any format (yet).","type":"string"}},"required":["value","type"],"type":"object"},"type":"array"},"postalCode":{"pattern":"^.+$","type":"string"},"province":{"pattern":"^.+$","type":"string"},"street":{"pattern":"^.+$","type":"string"}},"required":["street","city","postalCode","country"],"type":"object","title":"Address","description":"Address"},"Coordinates":{"description":"Coordinates of the WGS84 geodetic reference system in Mercator projection, as used e.g. by the Google Maps API","properties":{"lat":{"description":"Latitude value","type":"number"},"lon":{"description":"Longitude value","type":"number"}},"required":["lat","lon"],"type":"object","title":"Coordinates"},"TimeZoneForCreation":{"description":"Self-provided timezone for determining the local time of a facility","properties":{"timeZoneId":{"description":"official id of the timezone","type":"string"}},"required":["timeZoneId"],"type":"object","title":"TimeZoneForCreation"},"ClosingDay":{"description":"At this day the facility is closed and does not do picking","properties":{"date":{"description":"The day at which the Facility is closed","format":"date-time","type":"string"},"reason":{"description":"The reason why the Facility is closed on this day","type":"string"},"recurrence":{"enum":["YEARLY","NONRECURRING"],"type":"string"}},"required":["reason","date","recurrence"],"type":"object","title":"ClosingDay"},"FacilityContact":{"properties":{"customAttributes":{"description":"Attributes that can be added to the contact. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"firstName":{"type":"string"},"lastName":{"type":"string"},"roleDescription":{"type":"string"}},"required":["firstName","lastName"],"type":"object","xml":{"name":"FacilityContact"},"title":"FacilityContact","description":"FacilityContact"},"FacilityLocationType":{"default":"STORE","enum":["STORE","WAREHOUSE","EXTERNAL"],"type":"string","xml":{"name":"FacilityLocationType"},"title":"FacilityLocationType","description":"FacilityLocationType"},"PickingMethodEnum":{"description":"Way in which the picking should be handled Deprecated: BATCH_PICKING, use BATCH instead","enum":["SINGLE_ORDER","MULTI_ORDER","BATCH_PICKING","BATCH"],"type":"string","title":"PickingMethodEnum"},"PickingTimes":{"description":"Time ranges defining the picking times per weekday. No overlapping ranges are allowed. There must be no overlaps for time ranges on a day","properties":{"friday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"monday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"saturday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"sunday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"thursday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"tuesday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"},"wednesday":{"items":{"$ref":"#/components/schemas/TimeRange"},"type":"array"}},"type":"object","title":"PickingTimes"},"TimeRange":{"properties":{"capacity":{"minimum":0,"type":"number"},"end":{"$ref":"#/components/schemas/TimeStamp"},"start":{"$ref":"#/components/schemas/TimeStamp"}},"required":["start","end"],"type":"object","title":"TimeRange","description":"TimeRange"},"TimeStamp":{"properties":{"hour":{"maximum":23,"minimum":0,"type":"number"},"minute":{"maximum":59,"minimum":0,"type":"number"}},"required":["hour","minute"],"type":"object","title":"TimeStamp","description":"TimeStamp"},"ScanningRuleConfiguration":{"description":"Configuration to show the client how the items should be scanned during picking","properties":{"values":{"items":{"$ref":"#/components/schemas/ScanningRuleValue"},"type":"array"}},"title":"ScanningRuleConfiguration"},"ScanningRuleValue":{"properties":{"priority":{"description":"This field allows you to rank scanningRuleType against each other. The lowest number is the most preferable.","minimum":0,"type":"number"},"scanningRuleType":{"$ref":"#/components/schemas/ScanningRuleTypeEnum"}},"required":["priority","scanningRuleType"],"title":"ScanningRuleValue","description":"ScanningRuleValue"},"ScanningRuleTypeEnum":{"description":"Type of scanning rule","enum":["ARTICLE","LOCATION"],"type":"string","title":"ScanningRuleTypeEnum"},"FacilityService":{"additionalProperties":false,"properties":{"type":{"$ref":"#/components/schemas/FacilityServiceType"}},"required":["type"],"type":"object","xml":{"name":"FacilityService"},"title":"FacilityService","description":"FacilityService"},"FacilityServiceType":{"description":"The description of the service this facility offers.","enum":["SHIP_FROM_STORE","PICKUP"],"type":"string","title":"FacilityServiceType"},"FacilityAddress":{"allOf":[{"$ref":"#/components/schemas/FacilityAddressForCreation"},{"properties":{"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZone"}},"type":"object"}],"type":"object","xml":{"name":"FacilityAddress"},"title":"FacilityAddress","description":"FacilityAddress"},"TimeZone":{"description":"Timezone for information retrieved e.g. by the Google Maps API","properties":{"offsetInSeconds":{"description":"offset in seconds to standard time. Does not account for daylight saving time.","type":"number"},"source":{"description":"source of the timezone information","type":"string"},"timeZoneId":{"description":"official id of the timezone","type":"string"},"timeZoneName":{"description":"descriptive name of the timezone","type":"string"}},"required":["timeZoneId","timeZoneName","offsetInSeconds"],"type":"object","title":"TimeZone"},"LinkedConfiguration":{"properties":{"ref":{"type":"string"},"rel":{"type":"string"}},"type":"object","title":"LinkedConfiguration","description":"LinkedConfiguration"},"Supplier":{"allOf":[{"$ref":"#/components/schemas/Facility"},{"$ref":"#/components/schemas/SupplierForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/SupplierAddress"}},"type":"object","xml":{"name":"Supplier"},"title":"Supplier","description":"Supplier"},"SupplierForCreation":{"allOf":[{"$ref":"#/components/schemas/FacilityForCreation"}],"properties":{"address":{"$ref":"#/components/schemas/SupplierAddressForCreation"}},"type":"object","xml":{"name":"SupplierForCreation"},"title":"SupplierForCreation","description":"SupplierForCreation"},"SupplierAddressForCreation":{"properties":{"additionalAddressInfo":{"type":"string"},"city":{"pattern":"^.+$","type":"string"},"companyName":{"type":"string"},"country":{"description":"A two-digit country code as per ISO 3166-1 alpha-2","pattern":"^[A-Z]{2}$","type":"string"},"customAttributes":{"description":"Attributes that can be added to the address. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"emailAddresses":{"items":{"$ref":"#/components/schemas/SupplierAddressEmailAddress"},"type":"array"},"houseNumber":{"pattern":"^.+$","type":"string"},"phoneNumbers":{"items":{"$ref":"#/components/schemas/SupplierAddressPhoneNumber"},"type":"array"},"postalCode":{"pattern":"^.+$","type":"string"},"province":{"pattern":"^.+$","type":"string"},"resolvedCoordinates":{"$ref":"#/components/schemas/Coordinates"},"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZoneForCreation","description":"User-specified time zone in identifier format (e.g., \"America/Los_Angeles\"). Used to determine local time. Relevant only if the country spans multiple time zones; otherwise, the time zone is automatically determined from the country or via Google if unspecified."},"street":{"pattern":"^.+$","type":"string"}},"required":["country","companyName"],"type":"object","title":"SupplierAddressForCreation","description":"SupplierAddressForCreation"},"SupplierAddressEmailAddress":{"properties":{"recipient":{"description":"Human readable information who is the recipient for emails sent to this address.","type":"string"},"value":{"format":"email","type":"string"}},"required":["value"],"type":"object","title":"SupplierAddressEmailAddress","description":"SupplierAddressEmailAddress"},"SupplierAddressPhoneNumber":{"properties":{"customAttributes":{"description":"Attributes that can be added to the phonenumber. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"label":{"description":"Can be used to give a description for the number, like \"private\", \"business number\", etc.","type":"string"},"type":{"enum":["MOBILE","PHONE"],"type":"string"},"value":{"description":"The number itself. We do not enforce any format (yet).","type":"string"}},"required":["value","type"],"type":"object","title":"SupplierAddressPhoneNumber","description":"SupplierAddressPhoneNumber"},"SupplierAddress":{"allOf":[{"$ref":"#/components/schemas/SupplierAddressForCreation"},{"properties":{"resolvedTimeZone":{"$ref":"#/components/schemas/TimeZone"}},"type":"object"}],"type":"object","title":"SupplierAddress","description":"SupplierAddress"},"PageInfo":{"properties":{"endCursor":{"description":"The cursor to use to fetch the next page of items. Use with parameter `after`.","type":"string"},"hasNextPage":{"description":"If true, there are more items after the current page.","type":"boolean"},"hasPreviousPage":{"description":"If true, there are more items before the current page.","type":"boolean"},"startCursor":{"description":"The cursor to use to fetch the previous page of items.","type":"string"}},"required":["hasNextPage","hasPreviousPage","startCursor","endCursor"],"title":"PageInfo","type":"object","description":"PageInfo"},"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/search":{"post":{"deprecated":false,"description":"This part of the API is in Beta status. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#beta\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Search for Facility","operationId":"searchFacility","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilitySearchPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityPaginatedResult"}}},"description":"Your search result"},"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"}},"summary":"List facilities (search)","tags":["Facilities (Core)"]}}}}
```
