Skip to content

Locations — Overview

Locations represent warehouses or fulfillment centers where your products are stored and orders are fulfilled. Each location can operate independently (INTERNAL) or be connected to a third-party fulfillment service (WAREHOUSE).


GraphQL Types

LocationType

The root type for a location.

graphql
type LocationType {
  id: ID!
  name: String!
  title: String
  description: String
  locationType: LocationTypeEnum!
  active: Boolean!
  socialReason: String
  address: String
  addressComplement: String
  zipCode: String
  city: String
  country: String
  phone: String
  email: String
  fulfillmentConfig: LocationFulfillmentConfig
  integration: FulfillmentServiceIntegration
  organization: OrganizationType
}
FieldTypeDescription
idID!Unique identifier
nameString!Unique slug name (e.g. paris-warehouse)
titleStringHuman-readable display name
descriptionStringFree-text description
locationTypeLocationTypeEnum!INTERNAL or WAREHOUSE — see below
activeBoolean!Whether the location is currently active
socialReasonStringLegal company name
addressStringStreet address
addressComplementStringAddress line 2
zipCodeStringZip or postal code
cityStringCity
countryStringISO 3166-1 alpha-2 country code (e.g. FR)
phoneStringContact phone number
emailStringContact email address
fulfillmentConfigLocationFulfillmentConfigCountry and policy configuration — see below
integrationFulfillmentServiceIntegrationConnected fulfillment service — see below
organizationOrganizationTypeParent organization

LocationTypeEnum

Controls how stock and fulfillment are managed for the location.

ValueDescription
INTERNALVirtual locations for stock managed by HappyColis in your own warehouse. You can manually or automatically manage stock.
WAREHOUSEPhysical locations connected to a FulfillmentService. This is the main type when you have a contractual relationship with HappyColis.
EXTERNALVirtual locations representing stock managed outside HappyColis. Stock movements are not allowed on these locations.

TIP

Your variants must be associated to a location (via a StockReference) before you can assign DeliveryOrders to that location.


LocationFulfillmentConfig

Per-location configuration that controls which orders the location can fulfill.

graphql
type LocationFulfillmentConfig {
  allowedCountries: [String!]
  excludedCountries: [String!]
  preparationDelay: Int
  inventoryPolicy: InventoryPolicyEnum
}
FieldTypeDescription
allowedCountries[String!]ISO country codes this location is allowed to ship to. Empty means no restriction.
excludedCountries[String!]ISO country codes this location must never ship to. Takes priority over allowedCountries.
preparationDelayIntDefault number of business days needed to prepare an order before handing off to a carrier.
inventoryPolicyInventoryPolicyEnumControls behavior when stock is insufficient. DENY rejects the order; CONTINUE allows overselling.

FulfillmentServiceIntegration

Represents the connection between a location and a fulfillment service.

graphql
type FulfillmentServiceIntegration {
  id: ID!
  state: IntegrationStateEnum!
  fulfillmentService: FulfillmentServiceType
}
FieldTypeDescription
idID!Unique identifier for the integration record
stateIntegrationStateEnum!Current lifecycle state — see below
fulfillmentServiceFulfillmentServiceTypeThe connected fulfillment service

Integration States

StateDescription
PENDINGIntegration request sent to the fulfillment service; awaiting activation confirmation.
ACTIVEIntegration is active and operational. The fulfillment service is processing orders for this location.
ERRORThe integration encountered a connectivity or configuration error. Check the fulfillment service dashboard.
INACTIVEIntegration has been manually deactivated or the fulfillment service is unavailable.

Operations

Queries

OperationScopeDescription
locationview_locationsRetrieve a location by ID or by name

Mutations

OperationScopeDescription
locationCreatecreate_locationsCreate a new location
locationUpdateedit_locationsUpdate location fields or fulfillment config
locationActivateedit_locationsSet a location as active
locationDeactivateedit_locationsSet a location as inactive
locationConnectToFulfillmentServiceedit_locationsConnect or disconnect a fulfillment service

Best Practices

  1. Use unique, slug-friendly names. The name field is a unique code that cannot be changed after creation. Keep it lowercase and hyphenated (e.g. lyon-warehouse-2). The title and description fields are used for display.
  2. Configure country restrictions early. Set allowedCountries and excludedCountries before routing orders to the location.
  3. Set preparationDelay accurately. This value affects expected delivery date calculations shown to customers.
  4. Test integrations in staging. Always validate a fulfillment service connection in a non-production organization before going live.
  5. Drain before deactivating. Transfer pending stock and open orders to another location before calling locationDeactivate.

HappyColis API Documentation