Skip to content

order/created

Overview

PropertyValue
Webhook typeorder/created
Kafka topicorder.created
DirectionPlatform → Your endpoint

Description

Fired when a new order is created in the system. This can happen via the GraphQL API (from a CMS integration or App), or internally when an order is imported. Every order creation triggers exactly one order/created event.

Trigger Conditions

  • An order is submitted through the HappyColis GraphQL API
  • An order is imported via a third-party application integration
  • sourceType will be CMS for storefront-created orders or APP for orders created programmatically via the API

Message Envelope

json
{
  "header": {
    "organizationId": "org_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "messageId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "webhookId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "type": "order/created",
    "date": "2024-03-15T10:23:45.000Z"
  },
  "body": { ... }
}

The body field contains the full OrderEntity object as described below.

Body — Property Table

Order Object

FieldTypeNullableDescription
idstring (uuid)NoUnique order identifier
externalReferencestringYesExternal reference from the originating platform (e.g. Shopify order ID)
organizationIdstring (uuid)NoOrganization that owns this order
tpAppIdstring (uuid)YesThird-party application ID that created the order
shippingMethodIdstring (uuid)YesAssigned shipping method
shippingMethodNamestringYesHuman-readable shipping method name
collectPointIdstringYesPickup point ID (for deliveryType: PICKUP)
collectPointCountrystringYesCountry code of the pickup point
collectPointZipCodestringYesZIP code of the pickup point
linesOrderLine[]NoArray of order lines (see below)
typeenumNoOrder type: B2B or B2C
dispatchingTypeenumNoDispatching mode: MANUAL or AUTOMATIC
totalfloatYesTotal order amount (tax-exclusive)
totalTaxInclusivefloatYesTotal order amount (tax-inclusive)
totalShippingfloatYesTotal shipping cost
totalDiscountfloatYesTotal discount applied
totalVatfloatYesTotal VAT amount
totalInsurancefloatYesTotal insurance amount
currencystringNoISO 4217 currency code, default EUR
invoiceNumberstringNoInvoice reference number
invoiceUrlstringYesURL to the invoice document
giftbooleanYesWhether this is a gift order
inventoryPolicyenumYesInventory policy: DENY or CONTINUE
issuedAtstring (ISO 8601)NoTimestamp when the order was placed by the customer
prepareAtstring (ISO 8601)YesScheduled preparation time
receivedAtstring (ISO 8601)NoTimestamp when the order was received by the platform
fulfillmentRequestedAtstring (ISO 8601)YesTimestamp when fulfillment was requested
buyerContactYesBuyer contact information (see Contact object)
billingContactContactYesBilling address contact (see Contact object)
deliveryContactContactYesDelivery address contact (see Contact object)
sellerContactYesSeller contact information (see Contact object)
commentstringYesFree-text comment on the order
metaobjectYesArbitrary metadata (JSON)
stateenumNoOrder state: DRAFT, OPENED, or COMPLETED
priorityenumNoOrder priority: LOW, NORMAL, or HIGH
lockedbooleanNoWhether the order is locked for modifications
openingbooleanNoWhether the order is currently being opened
sourceTypeenumNoOrigin source: CMS or APP
deliveryTypeenumNoDelivery type: HOME or PICKUP

OrderLine Object

FieldTypeNullableDescription
idstring (uuid)NoUnique order line identifier
orderIdstring (uuid)NoParent order ID
statusenumNoLine status: PENDING, CANCELED, ACCEPTED, IN_PROGRESS, FULFILLED, PARTIALLY_FULFILLED, ERRORED, DELIVERED
labelstringYesProduct label / display name
skustringNoStock keeping unit identifier
pricefloatYesUnit price (tax-exclusive)
vatRatefloatYesVAT rate as a decimal (e.g. 0.20 for 20%)
totalfloatYesLine total (quantity × price, tax-exclusive)
totalTaxInclusivefloatYesLine total (tax-inclusive)
fulfillableQuantityintegerYesQuantity eligible for fulfillment
quantityintegerYesOrdered quantity
fulfilledQuantityintegerNoQuantity already fulfilled, default 0
metaobjectYesArbitrary metadata (JSON)
locationIdstring (uuid)YesPreferred fulfillment location
shippingMethodIdstring (uuid)YesPreferred shipping method
numberstringYesLine identifier within the order (unique per order)

Contact Object

FieldTypeNullableDescription
idstring (uuid)NoUnique contact identifier
typeenumNoContact type: PERSON or COMPANY
organizationIdstring (uuid)NoOwning organization
fullnamestringYesFull name
emailstringYesEmail address
addressstringYesStreet address line 1
addressComplementstringYesStreet address line 2
zipcodestringYesPostal/ZIP code
countrystringYesISO 3166-1 alpha-2 country code
citystringYesCity name
statestringYesState/region
phonestringYesPhone number
commentsstringYesFree-text comment
metadataobjectYesArbitrary metadata (JSON)
taxIdstringYesTax identifier (VAT number, etc.)
eoristringYesEconomic Operators Registration and Identification number
formstringYesLegal form (for companies)
capitalstringYesShare capital (for companies)
companyIdstringYesCompany registration number
registrationstringYesTrade register number

Full JSON Payload Sample

json
{
  "header": {
    "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "messageId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "webhookId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "type": "order/created",
    "date": "2024-03-15T10:23:45.000Z"
  },
  "body": {
    "id": "d4e5f6a7-b8c9-0123-defa-234567890123",
    "externalReference": "SHOP-12345",
    "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "tpAppId": "e5f6a7b8-c9d0-1234-efab-345678901234",
    "shippingMethodId": "f6a7b8c9-d0e1-2345-fabc-456789012345",
    "shippingMethodName": "Colissimo Domicile",
    "collectPointId": null,
    "collectPointCountry": null,
    "collectPointZipCode": null,
    "type": "B2C",
    "dispatchingType": "AUTOMATIC",
    "total": 85.00,
    "totalTaxInclusive": 102.00,
    "totalShipping": 5.99,
    "totalDiscount": 0.00,
    "totalVat": 17.00,
    "totalInsurance": null,
    "currency": "EUR",
    "invoiceNumber": "INV-2024-001234",
    "invoiceUrl": "https://cdn.example.com/invoices/INV-2024-001234.pdf",
    "gift": false,
    "inventoryPolicy": "DENY",
    "issuedAt": "2024-03-15T09:00:00.000Z",
    "prepareAt": null,
    "receivedAt": "2024-03-15T10:23:45.000Z",
    "fulfillmentRequestedAt": null,
    "buyer": {
      "id": "a7b8c9d0-e1f2-3456-abcd-567890123456",
      "type": "PERSON",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "fullname": "Alice Dupont",
      "email": "alice.dupont@example.com",
      "address": "12 Rue de la Paix",
      "addressComplement": "Apt 4B",
      "zipcode": "75001",
      "country": "FR",
      "city": "Paris",
      "state": null,
      "phone": "+33612345678",
      "comments": null,
      "metadata": null,
      "taxId": null,
      "eori": null,
      "form": null,
      "capital": null,
      "companyId": null,
      "registration": null
    },
    "billingContact": {
      "id": "a7b8c9d0-e1f2-3456-abcd-567890123456",
      "type": "PERSON",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "fullname": "Alice Dupont",
      "email": "alice.dupont@example.com",
      "address": "12 Rue de la Paix",
      "addressComplement": "Apt 4B",
      "zipcode": "75001",
      "country": "FR",
      "city": "Paris",
      "state": null,
      "phone": "+33612345678",
      "comments": null,
      "metadata": null,
      "taxId": null,
      "eori": null,
      "form": null,
      "capital": null,
      "companyId": null,
      "registration": null
    },
    "deliveryContact": {
      "id": "b8c9d0e1-f2a3-4567-bcde-678901234567",
      "type": "PERSON",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "fullname": "Alice Dupont",
      "email": "alice.dupont@example.com",
      "address": "12 Rue de la Paix",
      "addressComplement": "Apt 4B",
      "zipcode": "75001",
      "country": "FR",
      "city": "Paris",
      "state": null,
      "phone": "+33612345678",
      "comments": null,
      "metadata": null,
      "taxId": null,
      "eori": null,
      "form": null,
      "capital": null,
      "companyId": null,
      "registration": null
    },
    "seller": null,
    "comment": null,
    "meta": null,
    "state": "OPENED",
    "priority": "NORMAL",
    "locked": false,
    "opening": false,
    "sourceType": "CMS",
    "deliveryType": "HOME",
    "lines": [
      {
        "id": "c9d0e1f2-a3b4-5678-cdef-789012345678",
        "orderId": "d4e5f6a7-b8c9-0123-defa-234567890123",
        "status": "PENDING",
        "label": "T-Shirt Blanc Taille M",
        "sku": "TSHIRT-WHITE-M",
        "price": 25.00,
        "vatRate": 0.20,
        "total": 50.00,
        "totalTaxInclusive": 60.00,
        "fulfillableQuantity": 2,
        "quantity": 2,
        "fulfilledQuantity": 0,
        "meta": null,
        "locationId": null,
        "shippingMethodId": null,
        "number": "1"
      },
      {
        "id": "d0e1f2a3-b4c5-6789-defa-890123456789",
        "orderId": "d4e5f6a7-b8c9-0123-defa-234567890123",
        "status": "PENDING",
        "label": "Pantalon Bleu Taille 38",
        "sku": "PANTS-BLUE-38",
        "price": 35.00,
        "vatRate": 0.20,
        "total": 35.00,
        "totalTaxInclusive": 42.00,
        "fulfillableQuantity": 1,
        "quantity": 1,
        "fulfilledQuantity": 0,
        "meta": null,
        "locationId": null,
        "shippingMethodId": null,
        "number": "2"
      }
    ]
  }
}

Notes

  • The body is a serialized OrderEntity — all @Exclude() fields (e.g. buyerId, billingContactId, etc.) are stripped from the payload; only the eager-loaded relation objects are included.
  • issuedAt reflects when the customer placed the order on the storefront; receivedAt reflects when HappyColis received it.
  • The lines array is always present (eager-loaded) but may be empty for draft orders.
  • A freshly created order always has state: OPENED unless it was explicitly created as DRAFT.
  • Line statuses history is excluded from the webhook payload (marked @Exclude()).

HappyColis API Documentation