location/created
Overview
| Property | Value |
|---|---|
| Webhook type | location/created |
| Kafka topic | location.created |
| Direction | Platform → Your endpoint |
Description
Fired when a new location is created. A location represents a physical warehouse, store, or fulfillment point belonging to an organization.
Trigger Conditions
- A user or integration creates a new location via the HappyColis API
- The location is immediately active unless specified otherwise
Message Envelope
json
{
"header": {
"organizationId": "org_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"messageId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"webhookId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"type": "location/created",
"date": "2024-03-15T10:00:00.000Z"
},
"body": { ... }
}Body — Property Table
Location Object
| Field | Type | Nullable | Description |
|---|---|---|---|
id | string (uuid) | No | Unique location identifier |
organizationId | string (uuid) | No | Organization that owns this location |
name | string | No | Internal unique name (slug-like, unique per org) |
title | string | No | Human-readable display name |
description | string | Yes | Description of the location |
locationType | enum | No | Location type: INTERNAL, WAREHOUSE |
socialReason | string | Yes | Legal entity name (for warehouses) |
form | string | Yes | Legal form of the entity |
address | string | Yes | Street address |
addressComplement | string | Yes | Address complement (building, floor, etc.) |
zipCode | string | Yes | Postal/ZIP code |
city | string | Yes | City |
state | string | Yes | State or region |
country | string | Yes | ISO 3166-1 alpha-2 country code |
email | string | Yes | Contact email |
phone | string | Yes | Contact phone number |
active | boolean | No | Whether the location is active (default: true) |
registerAllVariants | boolean | No | Whether to auto-register all product variants (default: false) |
stockManagement | boolean | No | Whether stock is managed at this location (default: true) |
stockEvents | boolean | No | Whether stock events are emitted (default: true) |
acceptFulfillmentAt | string (ISO 8601) | Yes | Date from which location accepts fulfillment requests |
stockRefRuleSetId | string (uuid) | Yes | Associated stock reference rule set |
orderDispatchRuleSetId | string (uuid) | Yes | Associated order dispatch rule set |
allowedCountries | string[] | Yes | ISO country codes this location can ship to |
excludedCountries | string[] | Yes | ISO country codes this location cannot ship to |
Full JSON Payload Sample
json
{
"header": {
"organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"messageId": "i0j1k2l3-m4n5-6789-opqr-012345678901",
"webhookId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"type": "location/created",
"date": "2024-03-15T10:00:00.000Z"
},
"body": {
"id": "j1k2l3m4-n5o6-7890-pqrs-123456789012",
"organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "warehouse-paris-nord",
"title": "Entrepôt Paris Nord",
"description": "Principal warehouse for Île-de-France region",
"locationType": "WAREHOUSE",
"socialReason": "HappyColis Logistics SAS",
"form": "SAS",
"address": "12 Rue de la Logistique",
"addressComplement": "Zone Industrielle Nord",
"zipCode": "93200",
"city": "Saint-Denis",
"state": "Île-de-France",
"country": "FR",
"email": "warehouse-paris@happycolis.com",
"phone": "+33142000000",
"active": true,
"registerAllVariants": false,
"stockManagement": true,
"stockEvents": true,
"acceptFulfillmentAt": null,
"stockRefRuleSetId": null,
"orderDispatchRuleSetId": "k2l3m4n5-o6p7-8901-qrst-234567890123",
"allowedCountries": ["FR", "BE", "LU", "CH"],
"excludedCountries": null
}
}Related Events
location/updated— fired when location fields changelocation/activated— fired when an inactive location is re-activatedlocation/deactivated— fired when the location is deactivatedlocation/type_changed— fired when the location type changes
Notes
namemust be unique within an organization. It serves as a slug and cannot be changed after creation.allowedCountriesandexcludedCountriesare mutually exclusive — use one or the other to control shipping geography.- A location is active immediately upon creation (
active: truedefault).