location/fulfillment_service_integration/created
Overview
| Property | Value |
|---|---|
| Webhook type | location/fulfillment_service_integration/created |
| Kafka topic | location.fulfillment-service-integration.created |
| Direction | Platform → Your endpoint |
Description
Fired when a new fulfillment service integration is created for a location. This signals that a connection request has been initiated between a HappyColis location and an external fulfillment service provider. The integration starts in PENDING state.
Trigger Conditions
- A user or integration triggers a connection request between a location and a fulfillment service
- The
FulfillmentServiceIntegrationrecord is created with statePENDING
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/fulfillment_service_integration/created",
"date": "2024-06-10T09:00:00.000Z"
},
"body": { ... }
}Body — Property Table
FulfillmentServiceIntegration Object
| Field | Type | Nullable | Description |
|---|---|---|---|
id | string (uuid) | No | Unique integration identifier |
locationId | string (uuid) | No | The location being connected to the fulfillment service |
fulfillmentServiceId | string (uuid) | No | The external fulfillment service being connected |
accessToken | string | Yes | OAuth/API access token for the integration (may be null until accepted) |
scopes | string[] | No | Permission scopes granted to the integration |
state | enum | Yes | Integration state: PENDING, ACTIVE, INACTIVE, ERROR |
Full JSON Payload Sample
json
{
"header": {
"organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"messageId": "q8r9s0t1-u2v3-4567-wxyz-890123456789",
"webhookId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"type": "location/fulfillment_service_integration/created",
"date": "2024-06-10T09:00:00.000Z"
},
"body": {
"id": "r9s0t1u2-v3w4-5678-xyza-901234567890",
"locationId": "j1k2l3m4-n5o6-7890-pqrs-123456789012",
"fulfillmentServiceId": "s0t1u2v3-w4x5-6789-yzab-012345678901",
"accessToken": null,
"scopes": ["fulfillment:read", "fulfillment:write", "inventory:read"],
"state": "PENDING"
}
}Related Events
location/fulfillment_service_integration/accepted— fired when the fulfillment service accepts the connectionlocation/fulfillment_service_integration/rejected— fired when the connection is rejectedlocation/fulfillment_service_integration/errored— fired when an error occurs during connection
Notes
- The
accessTokenfield may benullat creation time — it is populated after the fulfillment service accepts the connection. - The
scopesarray lists the permission scopes the integration requires from the fulfillment service. - The integration lifecycle is:
PENDING→ACTIVE(on accept) orPENDING→ERROR/rejected. - Only locations of type
WAREHOUSEtypically have fulfillment service integrations.