Custom Integration API
Complete developer documentation
API Credentials Required
You'll need your Company ID, Integration ID, and API Key to use these endpoints
Product Schema Reference
Catalog models
Choose in integration credentials: Variant catalog (default) or Configurable catalog. The model affects how products are stored and how order line items are exported โ see examples below and Receiving Orders.
- Variant catalog โ send
variants[]; each variant becomes a separate service. Optional product-leveladdons[]. - Configurable catalog โ one product with inline
service_groups[](required or optional picks) andaddons[]. Orders export nestedselectionson each line item.
Required fields (all models)
idโ Unique product identifiernameโ Product name/titlepriceโ Base product price. Send a number, ornullwhen the item has no listed price (unpriced). Do not send0unless the item is actually free. The field itself must be present.
UNPRICED PRODUCT
{
"id": "svc-abdomen-xray",
"name": "ABDOMEN XRAY",
"price": null,
"currency": "NGN"
}Optional fields (all models)
description,short_description,skuโ omit the field or sendnullwhen emptystock_quantityon the parent product (null= unlimited,0= unavailable)currencybranch_id,integration_branch_idโ tie the product to a location (see below)images,videos,categories,dimensions,notice_periodurlโ product page; omit or sendnullwhen there is none
JSON null is accepted on price, description, short_description, url, category description, and service_groups[].description. Extra keys are not rejected. Use the fields in this page โ especially option_variants, customization_prompts, and depends_on โ when you need those catalog features.
Notice period
Optional extra wait before this product can be picked up or delivered. It is added on top of the business's normal fulfillment time. Omit it, or send all zeros, when the product needs no extra wait. A variant can set its own notice_period; otherwise it uses the parent product.
"notice_period": { "days": 1, "hours": 0, "minutes": 0 }Short description (WhatsApp / Meta catalog)
The short_description field is optimized for WhatsApp and Meta catalog display. When syncing products for the WhatsApp store, we use this field for a more concise product listing.
- If 2 or more products have
short_descriptionset, it is used exclusively for all products in the Meta catalog - Products without one show "-" in the catalog (required placeholder)
- If fewer than 2 products have it, we use the regular
descriptionfield instead
Tip: Use short_description for mobile/WhatsApp; keep description for full detail.
Variant catalog
Default model. Send a parent product plus variants[] โ each variant becomes its own service with separate SKU, price, and stock. Variants can override branch, media, dimensions, and attributes (e.g. size/color).
Per variant โ required: id. Optional: sku, name, price, stock_quantity, branch fields, media, url, attributes, dimensions.
VARIANT CATALOG EXAMPLE
{
"id": "tshirt-001",
"name": "Cotton T-Shirt",
"description": "Premium cotton t-shirt",
"price": 25.00,
"currency": "USD",
"branch_id": "{hiraassist_branch_uuid}",
"categories": [{"id": "10", "name": "Apparel", "branch_id": "{hiraassist_branch_uuid}"}],
"dimensions": {
"weight": 0.2,
"weight_unit": "kg"
},
"variants": [
{
"id": "var-s-blue",
"name": "Small - Blue",
"sku": "TSHIRT-S-BLU",
"price": 25.00,
"stock_quantity": 10,
"branch_id": "{hiraassist_branch_uuid}",
"attributes": {"size": "Small", "color": "Blue"},
"dimensions": {"weight": 0.18, "weight_unit": "kg"}
},
{
"id": "var-m-red",
"name": "Medium - Red",
"sku": "TSHIRT-M-RED",
"price": 27.00,
"stock_quantity": 5,
"branch_id": "{hiraassist_branch_uuid}",
"attributes": {"size": "Medium", "color": "Red"},
"dimensions": {"weight": 0.22, "weight_unit": "kg"}
}
]
}Configurable catalog
Use when credentials set catalog_model to configurable. One product row holds all modifier groups and add-ons inline โ no variants[].
service_groups[] โ each group:
id,name,min,max,is_requireddescriptionโ omit ornullwhen unuseddepends_onโ optional array of other groupids that must be chosen first (linked option matrix)min/maxare pick counts per cart line (same option can be picked more than once whenmax> 1)options[]โ each option:id,name, optionalprice, optionalstock_quantity, optionaltext_required
addons[] โ optional paid extras: id, name, price, optional stock_quantity, optional text_required.
option_variants[] โ optional priced combinations of group options. Each row: id, option_ids (the option ids that make that combination), price, optional stock_quantity. When present, those rows are the real SKUs; do not add the linked option prices on top.
customization_prompts[] โ optional free-text questions. Each: id, prompt, optional required (default true). Include the key only when you mean to set prompts; omitting it leaves existing prompts unchanged.
Set text_required to true on an option or an add-on when the customer must supply text for that choice. Omit it, or send false, when the choice needs no text.
Modifier stock uses the same rules as parent products: null = unlimited, 0 = unavailable. Order webhooks nest picks under selections โ see Configurable catalog order export.
CONFIGURABLE CATALOG EXAMPLE
{
"id": "pro-laptop-bundle",
"name": "Pro Laptop Bundle",
"price": 850000,
"branch_id": "{hiraassist_branch_uuid}",
"categories": [
{"id": "electronics", "name": "Electronics", "branch_id": "{hiraassist_branch_uuid}"}
],
"service_groups": [
{
"id": "storage",
"name": "Storage",
"min": 1,
"max": 1,
"is_required": true,
"options": [
{ "id": "256gb", "name": "256 GB SSD", "price": 0, "stock_quantity": null },
{ "id": "512gb", "name": "512 GB SSD", "price": 45000, "stock_quantity": 6 },
{ "id": "1tb", "name": "1 TB SSD", "price": 90000, "stock_quantity": 0, "text_required": true }
]
},
{
"id": "included-peripherals",
"name": "Included peripherals",
"min": 0,
"max": 2,
"is_required": false,
"options": [
{ "id": "wireless-mouse", "name": "Wireless mouse", "price": 0, "stock_quantity": 20 },
{ "id": "laptop-sleeve", "name": "Laptop sleeve", "price": 0, "stock_quantity": null },
{ "id": "usb-hub", "name": "USB-C hub", "price": 0, "stock_quantity": 0 }
]
}
],
"addons": [
{ "id": "care-plan", "name": "3-year care plan", "price": 65000, "stock_quantity": 12 },
{ "id": "setup-service", "name": "On-site setup", "price": 25000, "stock_quantity": 0 }
]
}LINKED OPTIONS, COMBINATION PRICES, AND A PROMPT
{
"id": "cake-001",
"name": "Birthday cake",
"price": 25000,
"service_groups": [
{
"id": "size",
"name": "Size",
"description": null,
"min": 1,
"max": 1,
"is_required": true,
"options": [
{ "id": "size:6in", "name": "6 inch", "price": 0 },
{ "id": "size:8in", "name": "8 inch", "price": 0 }
]
},
{
"id": "flavour",
"name": "Flavour",
"depends_on": ["size"],
"min": 1,
"max": 1,
"is_required": true,
"options": [
{ "id": "flavour:vanilla", "name": "Vanilla", "price": 0 },
{ "id": "flavour:chocolate", "name": "Chocolate", "price": 0 }
]
}
],
"option_variants": [
{
"id": "6in-vanilla",
"option_ids": ["size:6in", "flavour:vanilla"],
"price": 25000,
"stock_quantity": null
},
{
"id": "8in-chocolate",
"option_ids": ["size:8in", "flavour:chocolate"],
"price": 32000,
"stock_quantity": 4
}
],
"customization_prompts": [
{
"id": "cake-message",
"prompt": "What message should we write on the cake?",
"required": true
}
]
}Product dimensions
Include physical dimensions and weight for shipping. Units are preserved as-is (WooCommerce / Shopify compatible).
weight,weight_unitโ kg, lb, g, oz, lbslength,width,height,dimension_unitโ cm, in, mm, m, ft, yd
DIMENSIONS EXAMPLE
"dimensions": {
"weight": 10,
"weight_unit": "kg",
"length": 30,
"width": 40,
"height": 15,
"dimension_unit": "cm"
}Different menu per location?
If you turned on different services or prices per branch in Company Profile, every synced product and category must be tied to a location. Sync requests without a branch are rejected so items do not end up in the wrong menu.
Use branch_id (from Get All Branches) or integration_branch_id (your store's location ID). The same rules apply to nested categories[] on products and to the categories API.
Branch assignment (products & categories)
On each product and category (push or pull), include branch_id or integration_branch_id. Variants can override the parent product's branch. Nested categories[] on a product use the same branch as that product.
BRANCH ASSIGNMENT EXAMPLES
// HiraAssist branch UUID
{
"id": "prod-123",
"name": "Product at Main Branch",
"price": 29.99,
"branch_id": "78b25135-a49f-47fa-9115-adc5342ce34a"
}
// Or your external location ID (must exist on the branch in HiraAssist)
{
"id": "prod-456",
"name": "Product at Warehouse",
"price": 19.99,
"integration_branch_id": "store_location_42"
}Images & videos
Multiple images/videos per product โ URL strings or {"name", "url"} objects. On update, arrays replace existing media (include all URLs you want to keep).
IMAGES & VIDEOS EXAMPLE
"images": [
{"name": "Front view", "url": "https://example.com/front.jpg"},
"https://example.com/side.jpg"
],
"videos": [
{"name": "Product demo", "url": "https://example.com/demo.mp4"}
]Syncing Products & Services
Choose how to synchronize your products and services with HiraAssist. You can use either method or both.
Option 1: Push mode (recommended)
You send products to HiraAssist via API. Best for most use cases, real-time updates, and minimal setup.
Option 2: Pull mode
HiraAssist fetches products from your GET endpoint on a schedule. Best for existing product APIs and large catalogs. Include branch_id on each product, variant, and category in your JSON (same as push mode).
Push mode
Endpoint:
/api/ecommerce/integrations/{'{integration_id}'}/products/batchRequired Headers:
X-Company-ID: {company_id}
X-API-Key: {your-api-key}Example Request:
Note: The same endpoint handles both creating new products and updating existing ones. If a product with the same id exists, it will be updated.
curl -X POST "https://backend.hiraassist.com/api/ecommerce/integrations/{integration_id}/products/batch" \
-H "Content-Type: application/json" \
-H "X-Company-ID: {company_id}" \
-H "X-API-Key: {api_key}" \
-d '{
"batch_id": "9d0c4f5e-2d1a-4d7e-9b2a-4b13b6b6d2c1",
"products": [
{
"id": "prod-123",
"name": "Sample Product",
"price": 29.99,
"description": "Full product description with all details",
"short_description": "Brief summary for Meta catalog",
"sku": "PROD-123",
"stock_quantity": 50,
"currency": "USD",
"branch_id": "{hiraassist_branch_uuid}",
"images": [
{"name": "Front view", "url": "https://example.com/front.jpg"},
"https://example.com/side.jpg"
],
"videos": [
{"name": "Demo video", "url": "https://example.com/demo.mp4"}
],
"url": "https://yourstore.com/products/sample-product",
"categories": [
{
"id": "15",
"name": "Smartphones",
"parent_id": "10",
"branch_id": "{hiraassist_branch_uuid}"
},
{
"id": "25",
"name": "Electronics",
"branch_id": "{hiraassist_branch_uuid}"
}
],
"dimensions": {
"weight": 0.5,
"weight_unit": "kg",
"length": 15,
"width": 8,
"height": 2,
"dimension_unit": "cm"
}
}
]
}'Batching: Up to 100 products per request. Optional batch_id for idempotent retries โ unique per batch; reuse only when retrying the exact same payload.
Updates are full replacements: Send the same id with complete product data. Omitted fields are cleared.
Branch: Include branch_id on each product, variant, and category (required when each location has its own menu). Get branch IDs ยท Full product schema
Categories: Created automatically from product payloads โ include branch_id on each category object when locations have separate menus (or rely on the product's branch). Send categories: [] to clear. Manage categories separately for renames or deletes.
Pull mode
Setup Requirements:
- Create a GET endpoint on your server that returns products
- Configure the endpoint URL and authentication in the Credentials page
- Set your preferred sync interval (1h to weekly)
- Test the connection, then enable automatic syncing
Basic Response Format:
{
"products": [
{
"id": "prod-123",
"name": "Sample Product",
"price": 29.99,
"description": "Full product description with all details",
"short_description": "Brief summary for Meta catalog",
"sku": "PROD-SKU",
"stock_quantity": 50,
"currency": "USD",
"branch_id": "{hiraassist_branch_uuid}",
"images": [
{"name": "Front view", "url": "https://example.com/front.jpg"},
"https://example.com/side.jpg"
],
"videos": [
{"name": "Demo video", "url": "https://example.com/demo.mp4"}
],
"url": "https://yourstore.com/products/sample-product",
"categories": [
{"id": "15", "name": "Smartphones", "parent_id": "10", "branch_id": "{hiraassist_branch_uuid}"}
],
"dimensions": {
"weight": 0.5,
"weight_unit": "kg",
"length": 15,
"width": 8,
"height": 2,
"dimension_unit": "cm"
}
}
]
}Include branch_id or integration_branch_id on each product, variant, and category when locations have separate menus. Same rules as push mode. Get branch IDs
Pagination for Large Catalogs
For large product catalogs, implement pagination. HiraAssist will automatically fetch all pages.
Supported Pagination Styles:
Page-based
?page=1&per_page=100Offset-based
?offset=0&limit=100Cursor-based
?cursor=abc&limit=100Response with Pagination:
{
"products": [...],
"pagination": {
"total": 1500, // Total product count
"total_pages": 15, // Total pages
"current_page": 1, // Current page number
"per_page": 100, // Items per page
"has_more": true, // More pages available?
"next_cursor": "xyz789" // For cursor pagination
}
}๐ท๏ธ Products with Variants
Pull mode fully supports product variants. Each variant will be created as a separate service with its own SKU and inventory tracking.
{
"products": [
{
"id": "tshirt-001",
"name": "Cotton T-Shirt",
"price": 25.00,
"branch_id": "{hiraassist_branch_uuid}",
"categories": [
{"id": "10", "name": "Apparel", "branch_id": "{hiraassist_branch_uuid}"}
],
"variants": [
{
"id": "var-s-blue",
"sku": "TSHIRT-S-BLU",
"price": 25.00,
"stock_quantity": 10,
"branch_id": "{hiraassist_branch_uuid}",
"attributes": {"size": "S", "color": "Blue"}
},
{
"id": "var-m-red",
"sku": "TSHIRT-M-RED",
"price": 27.00,
"stock_quantity": 5,
"branch_id": "{hiraassist_branch_uuid}",
"attributes": {"size": "M", "color": "Red"}
}
]
}
]
}Tip: Configure sync interval and manual syncs on the Credentials page. Use "Test Connection" before enabling automatic sync.
Advanced: Managing Categories Separately
Optional - Categories are automatically created when you push products
Optional: Categories are created automatically when you push products. Use this section only to update names, reorganize hierarchies, or delete categories without re-syncing all products (up to 100 per request).
Branch per category
Send branch_id or integration_branch_id on every category here โ the same as on products. Required when each location has its own menu.
When to use
- Rename categories without re-syncing products
- Change parent-child relationships
- Delete obsolete categories
Endpoint:
/api/ecommerce/integrations/{integration_id}/categoriesHeaders:
Content-Type: application/json
X-Company-ID: {company_id}
X-API-Key: {your-api-key}Tip: Mainly for updating existing category names or parents โ new categories come from product payloads.
Example Request:
curl -X POST "https://backend.hiraassist.com/api/ecommerce/integrations/{integration_id}/categories" \
-H "Content-Type: application/json" \
-H "X-Company-ID: {company_id}" \
-H "X-API-Key: {your-api-key}" \
-d '{
"categories": [
{
"id": "cat-1",
"name": "Electronics",
"description": "Electronic devices and accessories",
"parent_id": null,
"branch_id": "{hiraassist_branch_uuid}"
},
{
"id": "cat-2",
"name": "Smartphones",
"description": "Mobile phones and accessories",
"parent_id": "cat-1",
"branch_id": "{hiraassist_branch_uuid}"
}
]
}'Category Schema
id(required) โ Your unique category identifiername(required) โ Category namedescription(optional) โ Category description; omit or sendnullwhen emptyparent_id(optional) โ Parent category ID (nullfor top level)branch_id/integration_branch_id(required when each location has its own menu) โ Same as products; see Managing Branches
Managing Branches
Create, update, and retrieve branch information via API
Manage your store branches/locations through the API. Branches can be referenced by internal UUID, your integration branch ID, or name - giving you flexibility in how you manage locations.
Branch per product & category (not at connect)
Custom integrations do not set a default branch when you connect. When each location has its own menu, send branch_id on every product and category in POST .../products/batch or POST .../categories. See Syncing Products and Managing Categories.
Flexible branch identification
- Using HiraAssist as primary? Work directly with internal UUIDs โ no external IDs required
- Have your own branch system? Use
integration_branch_idto sync your IDs - Mixed approach? Some branches with integration IDs, others without โ both work
Get All Branches
Endpoint:
/api/ecommerce/integrations/{integration_id}/branchesRequired Headers:
X-Company-ID: {company_id}
X-API-Key: {your-api-key}Example Request:
curl -X GET "https://backend.hiraassist.com/api/ecommerce/integrations/{integration_id}/branches" \
-H "X-Company-ID: {company_id}" \
-H "X-API-Key: {your-api-key}"Response Format:
{
"success": true,
"branches": [
{
"id": "78b25135-a49f-47fa-9115-adc5342ce34a",
"name": "Main Office",
"integration_branch_id": "store_location_42",
"street": "123 Main St",
"city": "Lagos",
"state": "Lagos",
"postcode": "101245",
"latitude": 6.4969474,
"longitude": 3.3810092,
"phones": ["+234123456789"],
"emails": ["branch@example.com"],
"extra_info": "Near the market",
"delivery_enabled": true,
"pickup_in_store_enabled": true
}
]
}Create or Update Branches
Flexible Matching
The API automatically finds and updates existing branches or creates new ones:
- Tries matching by
id(internal UUID) - most reliable - Tries matching by
integration_branch_id- for your external system - Tries matching by
name- convenient fallback - Creates new branch if no match found
Endpoint:
/api/ecommerce/integrations/{integration_id}/branchesRequired Headers:
Content-Type: application/json
X-Company-ID: {company_id}
X-API-Key: {your-api-key}Example 1: Integration with own branch IDs
curl -X POST "https://backend.hiraassist.com/api/ecommerce/integrations/{integration_id}/branches" \
-H "Content-Type: application/json" \
-H "X-Company-ID: {company_id}" \
-H "X-API-Key: {your-api-key}" \
-d '{
"branches": [
{
"integration_branch_id": "store_location_42",
"name": "Downtown Store",
"street": "123 Main St",
"city": "Lagos",
"state": "Lagos",
"postcode": "101245",
"latitude": 6.4969474,
"longitude": 3.3810092,
"phones": ["+234123456789"],
"emails": ["downtown@example.com"],
"delivery_enabled": true,
"pickup_in_store_enabled": true
}
]
}'Example 2: Using HiraAssist as primary (update by UUID)
{
"branches": [
{
"id": "78b25135-a49f-47fa-9115-adc5342ce34a",
"name": "Updated Branch Name",
"latitude": 6.5244,
"longitude": 3.3792,
"delivery_enabled": true
}
]
}Example 3: Creating new branch
{
"branches": [
{
"name": "New Branch",
"street": "456 New St",
"city": "Abuja",
"state": "FCT",
"postcode": "900001",
"latitude": 9.0765,
"longitude": 7.3986,
"phones": ["+234987654321"],
"emails": ["new@example.com"]
}
]
}Response Format:
{
"success": true,
"branches": [
{
"id": "internal-uuid",
"integration_branch_id": "store_location_42",
"name": "Downtown Store",
"action": "updated",
"matched_by": "integration_branch_id"
}
]
}Batch limit: Up to 100 branches per request.
Matching: Provide id, integration_branch_id, or name to match existing branches.
Updates: Omitted fields are unchanged; set null or empty string to clear.
Update Specific Branch
Endpoint:
/api/ecommerce/integrations/{integration_id}/branches/{branch_id}Example Request:
curl -X PUT "https://backend.hiraassist.com/api/ecommerce/integrations/{integration_id}/branches/{branch_id}" \
-H "Content-Type: application/json" \
-H "X-Company-ID: {company_id}" \
-H "X-API-Key: {your-api-key}" \
-d '{
"integration_branch_id": "updated_store_id",
"latitude": 6.4580,
"longitude": 3.3900,
"delivery_enabled": false
}'Available Fields (all optional):
integration_branch_id- Your external branch IDname,street,city,state,postcode- Address fieldslatitude,longitude- GPS coordinatesphones,emails- Contact arraysextra_info- Additional notesdelivery_enabled,pickup_in_store_enabled- Feature flags
Delete Branch
Endpoint:
/api/ecommerce/integrations/{integration_id}/branches/{branch_id}Example Request:
curl -X DELETE "https://backend.hiraassist.com/api/ecommerce/integrations/{integration_id}/branches/{branch_id}" \
-H "X-Company-ID: {company_id}" \
-H "X-API-Key: {your-api-key}"409 if branch admins are still assigned or other records still block removal.Orders: Webhooks include branch_id, integration_branch_id, and branch (name). See Receiving Orders.
Receiving Orders from HiraAssist
When orders are ready to sync, they'll be automatically POSTed to your configured webhook URL. By default, online-payment orders are posted after payment succeeds. If you enable unpaid immediate sync, HiraAssist posts once when the order is placed and again after payment is confirmed.
How It Works
- Customer places an order in HiraAssist
- For online payments, HiraAssist normally waits until payment succeeds before posting the order
- If unpaid immediate sync is enabled, HiraAssist POSTs immediately with
payment.status=pending - After payment succeeds, the full order is POSTed again with the same
hiraassist_entity_id - Payment method changes use
sync_event: order.payment_method_updated - Fulfillment status changes send a lightweight webhook โ see Status Sync
- Upsert by
hiraassist_entity_idand return HTTP 200
Order format
Order webhook POSTs use the structure below. Payment updates reuse the same payload with the same hiraassist_entity_id and updated payment fields. Line items use variant_id when your integration is on the variant catalog model. For configurable catalog, see nested selections below.
{
"hiraassist_entity_id": "c562e6cb-923b-47a4-b6ab-6e514f26cf4e",
"hiraassist_entity_type": "order",
"sync_event": "order.finalized",
"source": "hiraassist",
"status": "processing",
"created_at": "2025-01-01T00:00:00Z",
"customer": {
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890"
},
"items": [
{
"product_id": "prod-123",
"internal_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"variant_id": "var-456",
"sku": "PROD-SKU",
"name": "Product Name",
"quantity": 2,
"price": 29.99,
"notes": "Special instructions"
}
],
"service_fees": [
{
"name": "Delivery Fee",
"amount": 5.00
},
{
"name": "Delivery:\n123 Main St",
"amount": 0,
"fulfillment_method_cost": "customer_pays_courier",
"vendor_label": "Bolt Courier",
"notes": "Usually โฆ800โโฆ1,200; pay rider on arrival."
}
],
"taxes": [
{
"tax_id": "uuid-of-tax-config-in-hiraassist",
"name": "VAT",
"rate_percent": 7.5,
"taxable_amount": 59.98,
"amount": 4.50
}
],
"fulfillment": {
"method": "delivery",
"address": "123 Main St, Downtown",
"branch": "Main Office",
"branch_id": "78b25135-a49f-47fa-9115-adc5342ce34a",
"integration_branch_id": "store_location_42",
"time": "2025-01-01T14:00:00Z",
"resolved_google_maps_details": {
"google_address": "123 Main Street, Downtown, City 10001, Country",
"latitude": 6.4987848,
"longitude": 3.3834837,
"google_maps_link": "https://www.google.com/maps?q=6.4987848,3.3834837",
"place_id": "ChIJSRcqGaGNOxAR8af5cO1IFjQ",
"distance_to_branch_km": 7.824,
"street_number": "123",
"street": "Main Street",
"neighborhood": "Downtown",
"city": "City",
"state": "State",
"country": "United States",
"country_code": "US",
"postal_code": "10001"
}
},
"payment": {
"method": "platform_gateway",
"status": "paid",
"amount": 69.48,
"currency": "USD"
},
"totals": {
"items_total": 59.98,
"service_fees_total": 5.00,
"tax_total": 4.50,
"total": 69.48
},
"notes": "Customer notes here",
"transaction_id": "txn-123"
}service_fees[] entries may include optional fulfillment_method_cost (customer_pays_courier or to_be_determined), vendor_label, and notes when delivery was quoted via a 3PL partner. amount: 0 with customer_pays_courier means the customer pays the courier at delivery โ not free delivery.
Configurable catalog order export
When your integration uses catalog_model: configurable, each standard line item includes a selections object with the customer's group picks and add-ons (external IDs from your catalog sync when mapped):
{
"type": "standard",
"product_id": "pro-laptop-bundle",
"name": "Pro Laptop Bundle",
"quantity": 1,
"price": 850000,
"selections": {
"service_groups": [
{
"group_id": "storage",
"integration_group_id": "storage",
"internal_group_id": "7c2679f0-b4d9-4724-a109-7e863e01100e",
"option_id": "512gb",
"integration_option_id": "512gb",
"internal_option_id": "1410e64e-d3b1-446c-8f70-4a751f96e216",
"quantity": 1,
"price": 45000
}
],
"addons": [
{
"addon_id": "care-plan",
"integration_addon_id": "care-plan",
"internal_addon_id": "03668059-a61e-4914-916c-057c8d5aa30e",
"quantity": 1,
"price": 65000
}
]
}
}- Nested by default: Picks are under
selections. Each entry includes your catalog id (group_id/option_id/addon_id, same asintegration_*when mapped), plusinternal_*HiraAssist UUIDs โ same on test and live order webhooks. - Orphan modifiers: If an add-on or service-group line has no parent standard item (e.g. manual order edits or legacy carts), it is still included as a separate top-level
items[]entry with"unattached": trueso nothing is dropped silently. - Custom lines: Ad-hoc custom items are always exported as flat top-level items, same as in variant mode.
Field Reference
Expected Response
Your webhook should return a 2xx status code with JSON:
{
"success": true,
"order_id": "your-internal-order-id",
"order_number": "ORD-2025-001"
}Note: order_id and order_number in the response are YOUR system's IDs, not HiraAssist's.
Idempotency: Store and upsert by hiraassist_entity_id. If unpaid immediate sync is enabled, the same order is sent again after payment confirmation.
Top-Level Fields
hiraassist_entity_id(string, UUID)Unique ID of the order/appointment in HiraAssist. Store this to track the order.
hiraassist_entity_type(string)Either "order" or "appointment"
sync_event(string)Indicates what triggered this webhook. Possible values:
order.finalizedโ Initial full order payload when the order is first placedorder.payment_updatedโ Payment status changed (e.g. customer paid after an earlier pending sync)order.payment_method_updatedโ Payment method changed on an existing order (e.g. switched to pay-on-fulfillment)order.status_updatedโ Fulfillment status changed in HiraAssist (see Status Sync)appointment.status_updatedโ Appointment fulfillment status changed in HiraAssist
source(string)Always "hiraassist"
transaction_id(string, optional)Payment transaction ID if payment was processed through HiraAssist
Payment object
The payment.method value is HiraAssist's recorded payment channel (same on initial POST and on payment updates). For pay-at-fulfillment, this is pay_on_fulfillment. Possible values:
platform_gatewayโ Checkout via HiraAssist-hosted payment gatewaydirect_integrationโ Checkout via the merchant's own payment gateway integration (Paystack, Flutterwave, Stripe, SquadCo, etc.)paystack_connectโ Checkout via Paystack Connectpayment_linkโ Manual payment link or external payment portalbank_othersโ Bank transfer or other manual payment instructionspay_on_fulfillmentโ Pay at pickup, delivery, or appointment time (cash/POS/mobile money on fulfillment)
The payment.status field mirrors the order's payment state in HiraAssist. Typical values:
unpaidโ No successful payment recorded yetpendingโ Online payment initiated but not confirmed (e.g. unpaid immediate sync before the gateway confirms)paidโ Full payment (or full expected amount) confirmedpartial_paymentโ Deposit or partial amount confirmed (down-payment flows)failedโ Payment failed (when recorded)refundedโ Refunded (when applicable)
Items Array
product_id is your external catalog id when mapped; integration_product_id is the same value (or null if unmapped). internal_id is always the HiraAssist service UUID.
product_id(string)Your external product ID if mapped, otherwise HiraAssist's internal service UUID
internal_id(string, UUID)HiraAssist's internal service UUID - always included for reference and tracking
variant_id(string | null)Your external variant ID if mapped, otherwise null
sku(string | null)Product SKU if mapped, otherwise null
name(string)Product/service name
quantity(number)Quantity ordered
price(number)Unit price
notes(string, optional)Special instructions or notes for this item
Taxes Array
Taxes are computed in HiraAssist from your tax rules โ not from your store. Each entry is one charged tax line; totals.tax_total sums taxes[].amount.
tax_id(string, UUID)HiraAssist tax configuration id
name(string)Display name of the tax (e.g. VAT)
rate_percent(number)Rate as a percentage (e.g. 7.5 for 7.5%)
taxable_amount(number)Base amount the tax was calculated on
amount(number)Tax amount charged for this line
Fulfillment Object
method(string)Fulfillment method: typically delivery or pickup (see Fulfillment method values below)
address(string)The customer's original/typed address as they provided it
branch(string)Name of the branch handling the order
branch_id(string, UUID)HiraAssist's internal branch UUID
integration_branch_id(string | null)Your external branch ID if configured, otherwise null. Use this to match orders to your branch system.
time(string)Requested fulfillment time or schedule
Resolved Google Maps Details
For delivery, addresses are geocoded into fulfillment.resolved_google_maps_details (standardized address, coordinates, distance to branch, and structured address parts).
resolved_google_maps_details(object | null)Google Maps resolved location data. Only present for delivery when an address was geocoded. Address part fields match the breakdown used by logistics / 3PL integrations; missing parts are empty strings.
google_address(string)Standardized address from Google (e.g., "17/19 Ishola St, Adekunle, Lagos 101245, Nigeria")
latitude(number | null)GPS latitude coordinate (e.g., 6.4987848)
longitude(number | null)GPS longitude coordinate (e.g., 3.3834837)
google_maps_link(string)Direct Google Maps URL for navigation
place_id(string)Google Place ID for precise location lookup
distance_to_branch_km(number | null)Distance from delivery address to fulfillment branch in kilometers
street_number(string)Street / building number from Google address components
street(string)Street / route name
neighborhood(string)Neighborhood or sublocality
city(string)City / locality (falls back to administrative_area_level_2 when locality is missing)
state(string)State / province (administrative_area_level_1)
country(string)Country name (e.g., "United States")
country_code(string)ISO country code short name (e.g., "NG")
postal_code(string)Postal / ZIP code when available
Fulfillment Method Values
The fulfillment.method field can be:
deliveryโ Ship or deliver to the customer address (resolved_google_maps_detailswhen resolved)pickupโ Customer collects from the branch
Test Your Integration
Send a signed sample order.finalized webhook to your configured orders URL. The server builds the payload from your integration record (catalog model, webhook URL, secret, and optional field mapping) โ the same path as a real order sync.
Sign in and open this page from your organization (or stay on the same browser session after login) to send a live test. Public docs show the API reference only.
Retries: Failed order posts retry for up to 1 hour with exponential backoff. Manual retry via integration settings or the Retry Failed Orders API.
Bidirectional Status Sync
Keep fulfillment status in sync both ways. Dashboard updates send a lightweight webhook to your orders URL; your system updates status via PUT /entity-status using the same hiraassist_entity_id from the original order. Customers can be notified on WhatsApp, Instagram, etc. when enabled.
Requirements: Order sync enabled, orders webhook configured, and initial order successfully synced (your webhook returned order_id). Status webhooks follow the initial sync only.
HiraAssist โ Your system (outgoing webhook)
Posted to the same orders webhook URL when fulfillment status is updated in the HiraAssist dashboard (after the order was initially synced). Not sent for pending โ that is included on the initial order.finalized payload. Signed with the same X-HiraAssist-Signature headers.
{
"hiraassist_entity_id": "c562e6cb-923b-47a4-b6ab-6e514f26cf4e",
"hiraassist_entity_type": "order",
"sync_event": "order.status_updated",
"source": "hiraassist",
"status": "out for delivery",
"external_order_id": "your-internal-order-id",
"external_order_number": "ORD-2025-001",
"updated_at": "2025-01-02T14:30:00Z"
}Every status webhook includes hiraassist_entity_id and hiraassist_entity_type. Use the same values you stored from the initial order webhook:
hiraassist_entity_type:orderorappointmentsync_event:order.status_updatedorappointment.status_updated
Status webhook events
| sync_event | Entity type | When sent |
|---|---|---|
order.status_updated | order | Fulfillment status updated in HiraAssist (e.g. ready, out for delivery, completed). Not sent for pending. |
appointment.status_updated | appointment | Fulfillment status updated in HiraAssist (e.g. scheduled, completed, no_show). Not sent for pending. |
Fulfillment status values
The status field uses the exact string values below. All values can be sent to PUT /entity-status. The Status webhook column shows which values HiraAssist sends to your webhook when updated in the dashboard.
Orders (hiraassist_entity_type: "order")
| status | Meaning | Status webhook |
|---|---|---|
pending | Order received, not yet confirmed | No โ on order.finalized |
confirmed | Order acknowledged for fulfillment | Yes, when set manually in HiraAssist |
processing | Order is being prepared or packed | Yes |
ready | Ready for pickup or handoff to delivery | Yes |
out for delivery | Courier or driver is en route (exact string, including spaces) | Yes |
completed | Delivered, picked up, or otherwise fulfilled | Yes |
cancelled | Order was cancelled | Yes |
Appointments (hiraassist_entity_type: "appointment")
| status | Meaning | Status webhook |
|---|---|---|
pending | Booking received, not yet scheduled or confirmed | No โ on order.finalized |
confirmed | Appointment confirmed with the customer | Yes, when set manually in HiraAssist |
scheduled | Date and time are set | Yes |
processing | Service is in progress (e.g. customer checked in) | Yes |
completed | Appointment finished successfully | Yes |
cancelled | Appointment was cancelled | Yes |
no_show | Customer did not attend (exact string: no_show) | Yes |
Your system โ HiraAssist (incoming API)
Call this when your POS, ERP, or admin panel changes fulfillment status. Send the same hiraassist_entity_id and hiraassist_entity_type from the original order webhook (order or appointment).
Endpoint:
/api/ecommerce/company/{company_id}/entity-statusRequired headers:
X-Company-ID: {company_id}
X-API-Key: {your-api-key}Request body:
{
"hiraassist_entity_id": "c562e6cb-923b-47a4-b6ab-6e514f26cf4e",
"hiraassist_entity_type": "order",
"status": "completed",
"notify_customer": true,
"customer_message": "Your order is on its way! Track here: https://example.com/track/123",
"notes": "Optional internal note (status history only)"
}hiraassist_entity_id(required)UUID from the initial order.finalized webhook.
hiraassist_entity_type(required)order for orders, or appointment for appointments. Must match the entity type from the original webhook.
status(required)Fulfillment status string โ use the tables above for valid values per entity type.
notify_customer(optional, boolean)Controls whether the customer receives a chat message on their original channel (WhatsApp, Instagram, etc.):
- Omitted โ follow your HiraAssist notification settings for orders/appointments
trueโ send a message for this update (even if notifications are off in settings)falseโ update status only; no customer message
customer_message(optional, max 2000 chars)Custom message text sent to the customer. If omitted, HiraAssist uses the default template for that status. Providing a message will send it even when notifications are off in settings.
notes(optional)Internal note stored in status history. Not sent to the customer unless included in customer_message.
Example:
curl -X PUT "https://backend.hiraassist.com/api/ecommerce/company/{company_id}/entity-status" \
-H "Content-Type: application/json" \
-H "X-Company-ID: {company_id}" \
-H "X-API-Key: {your-api-key}" \
-d '{
"hiraassist_entity_id": "c562e6cb-923b-47a4-b6ab-6e514f26cf4e",
"hiraassist_entity_type": "order",
"status": "completed"
}'Response: { "success": true, "data": { "notification_sent": true, "notification_reason": null } } โ When notification_sent is false, check notification_reason (e.g. notifications_disabled, missing_credentials).
Webhook Signature Verification
Verify order POSTs with HMAC-SHA256 using your webhook secret. Always validate signatures in production.
Security headers
X-HiraAssist-Signature: <hmac-sha256-hex>
X-HiraAssist-Timestamp: <unix-timestamp-ms>Verification steps
- Extract signature from
X-HiraAssist-Signatureheader - Compute HMAC-SHA256 of the raw JSON payload using your webhook secret
- Compare signatures using timing-safe comparison
- Verify timestamp is recent (within 5 minutes) to prevent replay attacks
Node.js Example:
const crypto = require('crypto');
function verifySignature(req, webhookSecret) {
const signature = req.headers['x-hiraassist-signature'];
const timestamp = req.headers['x-hiraassist-timestamp'];
// Verify timestamp (prevent replay attacks)
if (Math.abs(Date.now() - parseInt(timestamp)) > 300000) {
throw new Error('Request too old');
}
// Compute expected signature
const hmac = crypto.createHmac('sha256', webhookSecret);
hmac.update(req.rawBody); // Use raw body string
const expected = hmac.digest('hex');
// Timing-safe comparison
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}PHP Example:
function verifySignature($rawBody, $signature, $timestamp, $secret) {
// Verify timestamp
if (abs(time() * 1000 - intval($timestamp)) > 300000) {
throw new Exception('Request too old');
}
// Compute expected signature
$expected = hash_hmac('sha256', $rawBody, $secret);
// Timing-safe comparison
if (!hash_equals($expected, $signature)) {
throw new Exception('Invalid signature');
}
return true;
}
// Usage
$rawBody = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_HIRAASSIST_SIGNATURE'];
$timestamp = $_SERVER['HTTP_X_HIRAASSIST_TIMESTAMP'];
verifySignature($rawBody, $signature, $timestamp, $webhookSecret);Retry Failed Orders
If your server experiences downtime, HiraAssist will automatically retry failed order POSTs for up to 1 hour. You can also manually trigger a retry using this callback endpoint:
Callback Endpoint:
/api/ecommerce/company/{company_id}/retry-ordersRequired Headers:
X-API-Key: {your-api-key}Example Request:
curl -X POST "https://backend.hiraassist.com/api/ecommerce/company/{company_id}/retry-orders" \
-H "X-API-Key: {your-api-key}"Response: Returns the number of orders queued for retry and their current status.
Tip: Add a "Sync Orders" button in your admin panel that calls this endpoint after downtime.