Home Integration API reference

Integration API reference

REST API for integrations and external apps

Settings

Settings endpoints cover invoice schemes and layouts, barcode presets, notification templates, receipt printers, business settings, integration webhooks, and business locations. Unless a section says otherwise, CSV exports ignore pagination and write endpoints follow the same permission and demo-mode rules as the matching web settings screen.

List invoice schemes

Lists invoice numbering schemes that the token user can manage from Invoice settings.

Endpoint summary

PropertyValue
MethodGET
Path/api/v1/integration/invoice-schemes
Permissioninvoice_settings.access.
Search behaviorq requires at least 2 characters when sent. Legacy search still matches name, prefix, or numeric id.
CSV behaviorformat=csv downloads all matching rows as UTF-8 CSV with BOM and ignores page and per_page.
Success response200 with paginated rows or a CSV download.

Query parameters

ParameterTypeRequiredDescription
per_page, pageintegerNoPagination controls. per_page accepts 1 to 100 and defaults to 20.
q, searchstringNoText search across scheme name, prefix, and numeric id-like values.
sortstringNoname, scheme_type, number_type, invoice_count, or created_at.
directionstringNoasc or desc.
formatstringNojson (default) or csv.

Returned row highlights

FieldTypeDescription
id, nameinteger | stringScheme identity and display name.
scheme_typestringblank or year.
number_typestringsequential or random.
invoice_count, is_defaultinteger | booleanCurrent usage counter and default flag.
prefix_previewstring | nullCurrent-year preview when scheme_type = year.

Top-level JSON response

FieldTypeDescription
dataarray<object>The current result page of invoice schemes.
meta.current_page, meta.last_page, meta.per_page, meta.totalintegerLaravel paginator metadata.

Status codes

StatusWhen it happensResponse shape
200The invoice schemes were returned successfully.{ "data": [...], "meta": { ... } } or CSV download.
403The token user lacks invoice_settings.access.{ "message": string }
422The query string failed validation.Laravel validation JSON.

Get invoice scheme

Returns one invoice scheme and can flatten the same payload into a single CSV row.

Endpoint summary

PropertyValue
MethodGET
Path/api/v1/integration/invoice-schemes/{id}
Permissioninvoice_settings.access.
CSV behaviorformat=csv streams one UTF-8 BOM row whose data_json cell matches the JSON data object.
Success response200 with one invoice-scheme object.

Query parameters

ParameterTypeRequiredDescription
formatstringNojson (default) or csv. CSV download name: invoice-scheme-{id}-detail-{business_id}-{timestamp}.csv.

Returned field highlights

FieldTypeDescription
name, prefixstring | nullSaved scheme name and optional invoice prefix.
scheme_type, number_typestringThe numbering strategy used by this scheme.
total_digits, start_numberinteger | nullSequential-number configuration. start_number is omitted for random schemes.
invoice_count, is_defaultinteger | booleanCurrent counter and whether the scheme is the business default.

Top-level JSON response

FieldTypeDescription
dataobjectThe requested invoice-scheme payload.

Status codes

StatusWhen it happensResponse shape
200The invoice scheme was returned successfully.{ "data": { ... } } or CSV download.
403The token user lacks invoice_settings.access.{ "message": string }
404The invoice scheme id does not exist for the current business.{ "message": "Not found" }

Create invoice scheme

Creates a new invoice numbering scheme and can optionally make it the default for the business.

Endpoint summary

PropertyValue
MethodPOST
Path/api/v1/integration/invoice-schemes
Permissioninvoice_settings.access.
Default behaviorWhen is_default = true, the previous business default is cleared before the new scheme is marked default.
Write guardReturns 403 in demo environments.
Success response201 with the created invoice-scheme object.

Request body

FieldTypeRequiredDescription
namestringYesDisplay name for the scheme.
scheme_typestringYesblank or year.
number_typestringYessequential or random.
prefixstring | nullNoOptional invoice prefix.
total_digitsinteger | nullNoOptional numeric width for generated invoice numbers.
start_numberinteger | nullConditionalRequired for sequential schemes. Omit or send null for random numbering.
is_defaultbooleanNoWhen true, this scheme becomes the new business default.

Top-level JSON response

FieldTypeDescription
dataobjectThe created invoice-scheme payload.

Status codes

StatusWhen it happensResponse shape
201The invoice scheme was created successfully.{ "data": { ... } }
403Demo mode is active or the token user lacks invoice_settings.access.{ "message": string }
422The request body failed validation.Laravel validation JSON.

Update invoice scheme

Updates an existing invoice scheme without changing which scheme is the current default.

Endpoint summary

PropertyValue
MethodPATCH or PUT
Path/api/v1/integration/invoice-schemes/{id}
Permissioninvoice_settings.access.
Write ruleUses the same field rules as create, except is_default is not accepted here. Use Set default instead.
Counter ruleinvoice_count is read-only and is only changed when invoices are issued.
Success response200 with the updated invoice-scheme object.

Request body

FieldTypeRequiredDescription
All Add invoice scheme fields except is_defaultmixedNoSend only the values that should change.

Top-level JSON response

FieldTypeDescription
dataobjectThe updated invoice-scheme payload.

Status codes

StatusWhen it happensResponse shape
200The invoice scheme was updated successfully.{ "data": { ... } }
403Demo mode is active or the token user lacks invoice_settings.access.{ "message": string }
404The invoice scheme id does not exist for the current business.{ "message": "Not found" }
422The request body failed validation.Laravel validation JSON.

Set default invoice scheme

Marks one invoice scheme as default and clears the default flag from all other schemes in the same business.

Endpoint summary

PropertyValue
MethodPOST
Path/api/v1/integration/invoice-schemes/{id}/set-default
Permissioninvoice_settings.access.
Write guardReturns 403 in demo environments.
Success response200 with the refreshed invoice-scheme object.

Top-level JSON response

FieldTypeDescription
dataobjectThe invoice scheme after the default flag is updated.

Status codes

StatusWhen it happensResponse shape
200The invoice scheme became the business default.{ "data": { ... } }
403Demo mode is active or the token user lacks invoice_settings.access.{ "message": string }
404The invoice scheme id does not exist for the current business.{ "message": "Not found" }

Delete invoice scheme

Deletes an invoice scheme that is not the active default and is not referenced by any business location.

Endpoint summary

PropertyValue
MethodDELETE
Path/api/v1/integration/invoice-schemes/{id}
Permissioninvoice_settings.access.
Business ruleReturns 422 when the scheme is the current default or is referenced by a location as invoice_scheme_id or sale_invoice_scheme_id.
Write guardReturns 403 in demo environments.

Status codes

StatusWhen it happensResponse shape
200The invoice scheme was deleted successfully.{ "message": string }
403Demo mode is active or the token user lacks invoice_settings.access.{ "message": string }
404The invoice scheme id does not exist for the current business.{ "message": "Not found" }
422The scheme is default or is still referenced by one or more locations.{ "message": string }

List invoice layouts

Lists printable invoice layouts exactly as they appear under Invoice settings in the web UI.

Endpoint summary

PropertyValue
MethodGET
Path/api/v1/integration/invoice-layouts
Permissioninvoice_settings.access.
Search behaviorq requires at least 2 characters when sent. Legacy search still matches layout name or numeric id.
CSV behaviorformat=csv downloads all matching rows. Array and object fields are JSON-encoded in CSV cells.
Success response200 with paginated rows or a CSV download.

Query parameters

ParameterTypeRequiredDescription
per_page, pageintegerNoPagination controls. per_page accepts 1 to 100 and defaults to 20.
q, searchstringNoText search across layout name or numeric id-like values.
sortstringNoname, design, is_default, or created_at.
directionstringNoasc or desc.
formatstringNojson (default) or csv.

Returned row highlights

FieldTypeDescription
id, name, designmixedLayout identity and design template name.
is_defaultbooleanWhether the layout is the current business default.
show_* flagsbooleanPrint toggles copied from the web Invoice layouts form.
module_info, common_settingsobject | array | nullStructured printable settings stored with the layout.
logo_url, letter_head_urlstring | nullResolved asset URLs when the uploaded files exist.

Top-level JSON response

FieldTypeDescription
dataarray<object>The current result page of invoice layouts.
meta.current_page, meta.last_page, meta.per_page, meta.totalintegerLaravel paginator metadata.

Status codes

StatusWhen it happensResponse shape
200The invoice layouts were returned successfully.{ "data": [...], "meta": { ... } } or CSV download.
403The token user lacks invoice_settings.access.{ "message": string }
422The query string failed validation.Laravel validation JSON.

Get invoice layout

Returns one invoice layout, including its printable flags and uploaded asset URLs.

Endpoint summary

PropertyValue
MethodGET
Path/api/v1/integration/invoice-layouts/{id}
Permissioninvoice_settings.access.
CSV behaviorformat=csv streams one UTF-8 BOM row whose data_json cell matches the JSON data object.
Success response200 with one invoice-layout object.

Query parameters

ParameterTypeRequiredDescription
formatstringNojson (default) or csv. CSV download name: invoice-layout-{id}-detail-{business_id}-{timestamp}.csv.

Returned field highlights

FieldTypeDescription
name, designstringLayout name and selected print design.
Printable labels and show_* flagsmixedAll user-configured print labels and boolean display toggles from the web form.
module_info, table_tax_headings, product_custom_fields, contact_custom_fields, location_custom_fields, common_settings, qr_code_fieldsobject | array | nullStructured layout settings stored as arrays or objects.
logo_url, letter_head_urlstring | nullResolved image URLs when uploaded assets exist.

Top-level JSON response

FieldTypeDescription
dataobjectThe requested invoice-layout payload.

Status codes

StatusWhen it happensResponse shape
200The invoice layout was returned successfully.{ "data": { ... } } or CSV download.
403The token user lacks invoice_settings.access.{ "message": string }
404The invoice layout id does not exist for the current business.{ "message": "Not found" }

Create invoice layout

Creates a new printable invoice layout, including optional uploaded logo and letterhead images passed as data URLs.

Endpoint summary

PropertyValue
MethodPOST
Path/api/v1/integration/invoice-layouts
Permissioninvoice_settings.access.
Content typeapplication/json.
Default behaviorWhen is_default = true, the previous business default is cleared before this layout is marked default.
Write guardReturns 403 in demo environments.
Success response201 with the created invoice-layout object.

Request body

FieldTypeRequiredDescription
namestringYesDisplay name for the layout.
designstringYesclassic, elegant, detailed, columnize-taxes, slim, slim2, or english-arabic.
Printable labels and show_* flagsmixedNoOptional label overrides and boolean print toggles from the web Invoice layouts form.
module_info, table_tax_headings, product_custom_fields, contact_custom_fields, location_custom_fields, common_settings, qr_code_fieldsobject | array | nullNoStructured layout settings sent as arrays or objects.
is_defaultbooleanNoWhen true, this layout becomes the new business default.
logo_base64, letter_head_base64string | nullNoOptional image data URLs such as data:image/png;base64,....

Top-level JSON response

FieldTypeDescription
dataobjectThe created invoice-layout payload.

Status codes

StatusWhen it happensResponse shape
201The invoice layout was created successfully.{ "data": { ... } }
403Demo mode is active or the token user lacks invoice_settings.access.{ "message": string }
422The request body failed validation.Laravel validation JSON.

Update invoice layout

Partially updates an invoice layout while preserving any fields that are not included in the request.

Endpoint summary

PropertyValue
MethodPATCH or PUT
Path/api/v1/integration/invoice-layouts/{id}
Permissioninvoice_settings.access.
Write ruleSend only the fields that should change. Default selection is handled by Set default.
Image ruleNew logo or letterhead uploads use logo_base64 and letter_head_base64 data URLs.
Success response200 with the updated invoice-layout object.

Request body

FieldTypeRequiredDescription
All Add invoice layout fields except is_defaultmixedNoAll update fields are optional and are applied partially.

Top-level JSON response

FieldTypeDescription
dataobjectThe updated invoice-layout payload.

Status codes

StatusWhen it happensResponse shape
200The invoice layout was updated successfully.{ "data": { ... } }
403Demo mode is active or the token user lacks invoice_settings.access.{ "message": string }
404The invoice layout id does not exist for the current business.{ "message": "Not found" }
422The request body failed validation.Laravel validation JSON.

Set default invoice layout

Marks one invoice layout as default for the business.

Endpoint summary

PropertyValue
MethodPOST
Path/api/v1/integration/invoice-layouts/{id}/set-default
Permissioninvoice_settings.access.
Write guardReturns 403 in demo environments.
Success response200 with the refreshed invoice-layout object.

Top-level JSON response

FieldTypeDescription
dataobjectThe invoice layout after the default flag is updated.

Status codes

StatusWhen it happensResponse shape
200The invoice layout became the business default.{ "data": { ... } }
403Demo mode is active or the token user lacks invoice_settings.access.{ "message": string }
404The invoice layout id does not exist for the current business.{ "message": "Not found" }

Delete invoice layout

Deletes an invoice layout that is neither the current default nor referenced by a business location.

Endpoint summary

PropertyValue
MethodDELETE
Path/api/v1/integration/invoice-layouts/{id}
Permissioninvoice_settings.access.
Business ruleReturns 422 when the layout is the current default or is referenced by a location as invoice_layout_id or sale_invoice_layout_id.
Write guardReturns 403 in demo environments.

Status codes

StatusWhen it happensResponse shape
200The invoice layout was deleted successfully.{ "message": string }
403Demo mode is active or the token user lacks invoice_settings.access.{ "message": string }
404The invoice layout id does not exist for the current business.{ "message": "Not found" }
422The layout is default or is still referenced by one or more locations.{ "message": string }

List barcode presets

Lists saved barcode presets exactly as they appear in Barcode settings.

Endpoint summary

PropertyValue
MethodGET
Path/api/v1/integration/barcode-presets
Permissionbarcode_settings.access.
Search behaviorq requires at least 2 characters when sent. Legacy search still matches preset name, description, or numeric id.
CSV behaviorformat=csv downloads all matching rows as UTF-8 CSV with BOM and ignores pagination.
Success response200 with paginated rows or a CSV download.

Query parameters

ParameterTypeRequiredDescription
per_page, pageintegerNoPagination controls. per_page accepts 1 to 100 and defaults to 20.
q, searchstringNoText search across preset name, description, and numeric id-like values.
sortstringNoname, is_default, or created_at.
directionstringNoasc or desc.
formatstringNojson (default) or csv.

Returned row highlights

FieldTypeDescription
id, name, descriptionmixedPreset identity and display values.
width, height, paper_width, paper_heightnumber | nullSaved label and paper dimensions.
is_continuous, is_defaultbooleanContinuous-roll behavior and default flag.
stickers_in_one_row, stickers_in_one_sheetinteger | nullSheet layout settings. Continuous presets force stickers_in_one_sheet = 28.

Top-level JSON response

FieldTypeDescription
dataarray<object>The current result page of barcode presets.
meta.current_page, meta.last_page, meta.per_page, meta.totalintegerLaravel paginator metadata.

Status codes

StatusWhen it happensResponse shape
200The barcode presets were returned successfully.{ "data": [...], "meta": { ... } } or CSV download.
403The token user lacks barcode_settings.access.{ "message": string }
422The query string failed validation.Laravel validation JSON.

Get barcode preset

Returns one barcode preset and can flatten the same payload into a single CSV row.

Endpoint summary

PropertyValue
MethodGET
Path/api/v1/integration/barcode-presets/{id}
Permissionbarcode_settings.access.
CSV behaviorformat=csv streams one UTF-8 BOM row whose data_json cell matches the JSON data object.
Success response200 with one barcode-preset object.

Query parameters

ParameterTypeRequiredDescription
formatstringNojson (default) or csv. CSV download name: barcode-preset-{id}-detail-{business_id}-{timestamp}.csv.

Returned field highlights

FieldTypeDescription
name, descriptionstring | nullPreset label and optional description.
Dimension and margin fieldsnumber | nullWidth, height, paper size, and margin settings used for label rendering.
stickers_in_one_row, stickers_in_one_sheetinteger | nullSheet layout settings used during barcode printing.
is_continuous, is_defaultbooleanContinuous-roll behavior and default status.

Top-level JSON response

FieldTypeDescription
dataobjectThe requested barcode-preset payload.

Status codes

StatusWhen it happensResponse shape
200The barcode preset was returned successfully.{ "data": { ... } } or CSV download.
403The token user lacks barcode_settings.access.{ "message": string }
404The barcode preset id does not exist for the current business.{ "message": "Not found" }

Create barcode preset

Creates a barcode preset that can later be reused from barcode print flows and preview endpoints.

Endpoint summary

PropertyValue
MethodPOST
Path/api/v1/integration/barcode-presets
Permissionbarcode_settings.access.
Continuous ruleWhen is_continuous = true, the controller forces stickers_in_one_sheet = 28.
Default behaviorWhen is_default = true, the previous business default is cleared first.
Success response201 with the created barcode-preset object.

Request body

FieldTypeRequiredDescription
namestringYesDisplay name for the preset.
descriptionstring | nullNoOptional helper text for the preset.
width, height, paper_width, paper_height, top_margin, left_margin, row_distance, col_distancenumber | nullNoOptional dimension and margin fields.
stickers_in_one_row, stickers_in_one_sheetinteger | nullNoOptional sheet layout settings.
is_continuous, is_defaultbooleanNoOptional continuous-roll and default flags.

Top-level JSON response

FieldTypeDescription
dataobjectThe created barcode-preset payload.

Status codes

StatusWhen it happensResponse shape
201The barcode preset was created successfully.{ "data": { ... } }
403Demo mode is active or the token user lacks barcode_settings.access.{ "message": string }
422The request body failed validation.Laravel validation JSON.

Update barcode preset

Partially updates a barcode preset and re-applies the same continuous-roll rules used by the web form.

Endpoint summary

PropertyValue
MethodPATCH or PUT
Path/api/v1/integration/barcode-presets/{id}
Permissionbarcode_settings.access.
Continuous ruleWhen is_continuous is sent, continuous presets force stickers_in_one_sheet = 28 and paper_height = 0.
Write modeAll update fields are optional and are merged with the current preset.
Success response200 with the updated barcode-preset object.

Request body

FieldTypeRequiredDescription
All Add barcode preset fieldsmixedNoSend only the values that should change.

Top-level JSON response

FieldTypeDescription
dataobjectThe updated barcode-preset payload.

Status codes

StatusWhen it happensResponse shape
200The barcode preset was updated successfully.{ "data": { ... } }
403Demo mode is active or the token user lacks barcode_settings.access.{ "message": string }
404The barcode preset id does not exist for the current business.{ "message": "Not found" }
422The request body failed validation.Laravel validation JSON.

Set default barcode preset

Marks one barcode preset as the business default.

Endpoint summary

PropertyValue
MethodPOST
Path/api/v1/integration/barcode-presets/{id}/set-default
Permissionbarcode_settings.access.
Write guardReturns 403 in demo environments.
Success response200 with the refreshed barcode-preset object.

Top-level JSON response

FieldTypeDescription
dataobjectThe barcode preset after the default flag is updated.

Status codes

StatusWhen it happensResponse shape
200The barcode preset became the business default.{ "data": { ... } }
403Demo mode is active or the token user lacks barcode_settings.access.{ "message": string }
404The barcode preset id does not exist for the current business.{ "message": "Not found" }

Delete barcode preset

Deletes a barcode preset that is not currently marked as default.

Endpoint summary

PropertyValue
MethodDELETE
Path/api/v1/integration/barcode-presets/{id}
Permissionbarcode_settings.access.
Business ruleReturns 422 when the preset is the current default.
Write guardReturns 403 in demo environments.

Status codes

StatusWhen it happensResponse shape
200The barcode preset was deleted successfully.{ "message": string }
403Demo mode is active or the token user lacks barcode_settings.access.{ "message": string }
404The barcode preset id does not exist for the current business.{ "message": "Not found" }
422The preset is still marked as the business default.{ "message": string }

Preview barcode labels (HTML)

Builds the same HTML label preview used by the Print labels screen without creating any printable transaction records.

Endpoint summary

PropertyValue
MethodPOST
Path/api/v1/integration/barcode-labels/preview
Permissionbarcode_settings.access.
Preset rulebarcode_setting_id may reference a business preset or a global preset whose business_id is null.
Generation limitThe sum of all requested sticker quantities is capped at 5000, and the request may include at most 200 product rows.
Success response200 with rendered preview HTML and metadata.

Request body

FieldTypeRequiredDescription
barcode_setting_idintegerYesThe barcode preset id to render against.
productsarray<object>YesPreview rows containing variation_id, quantity, and optional price_group_id, exp_date, packing_date, and lot_number.
printobject | nullNoOptional label overrides matching the Print labels form keys such as name, name_size, price, price_size, and price_type.

Request headers

Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
Accept: application/json

Top-level JSON response

FieldTypeDescription
data.formatstringAlways html for preview responses.
data.htmlstringRendered tables and inline styles matching the web preview.
data.meta.pages, data.meta.total_stickersintegerPreview page count and total sticker count.

Status codes

StatusWhen it happensResponse shape
200The barcode preview was generated successfully.{ "data": { "format": "html", "html": string, "meta": { ... } } }
403The token user lacks barcode_settings.access.{ "message": string }
404The barcode preset id does not exist or is not visible.{ "message": "Not found" }
422The request body failed validation, a variation is invalid, a price group is invalid, or preview generation failed.Laravel validation JSON or { "message": string }.

List notification templates

Lists the notification-template catalog grouped the same way as the web Notification templates screen.

Endpoint summary

PropertyValue
MethodGET
Path/api/v1/integration/notification-templates
Permissionsend_notification.
GroupingTemplates are grouped into general, customer, and supplier buckets, plus any module-provided notification hooks.
CSV behaviorformat=csv downloads one row per template in the same JSON order. There is no pagination.
Success response200 with grouped template arrays or a CSV download.

Query parameters

ParameterTypeRequiredDescription
groupstringNogeneral, customer, supplier, or all (default).
formatstringNojson (default) or csv.

Returned row highlights

FieldTypeDescription
group, template_for, namestringTemplate grouping and internal identity key.
subject, email_body, sms_body, whatsapp_textstring | nullSaved content fields for each notification channel.
auto_send, auto_send_sms, auto_send_wa_notifbooleanAuto-send flags used by the template.
cc, bccstring | nullSaved CC and BCC addresses.
extra_tags, idarray | integer | nullMerge-tag hints and the database id when a stored row exists.

Top-level JSON response

FieldTypeDescription
data.general, data.customer, data.supplierarray<object> | nullTemplate arrays for the requested groups.

Status codes

StatusWhen it happensResponse shape
200The notification-template catalog was returned successfully.{ "data": { ... } } or CSV download.
403The token user lacks send_notification.{ "message": string }
422The query string failed validation.Laravel validation JSON.

Get notification template

Returns one notification template by its internal template_for key.

Endpoint summary

PropertyValue
MethodGET
Path/api/v1/integration/notification-templates/{template_for}
Permissionsend_notification.
Identifiertemplate_for is the internal catalog key such as new_sale or payment_reminder.
CSV behaviorformat=csv streams one UTF-8 BOM row with the same columns as the list endpoint.
Success response200 with one notification-template object.

Query parameters

ParameterTypeRequiredDescription
formatstringNojson (default) or csv. CSV download name: notification-template-{template_for}-{business_id}-{timestamp}.csv.

Top-level JSON response

FieldTypeDescription
dataobjectThe requested template payload, matching the list-row shape.

Status codes

StatusWhen it happensResponse shape
200The notification template was returned successfully.{ "data": { ... } } or CSV download.
403The token user lacks send_notification.{ "message": string }
404The requested template_for key is not present in the catalog for this business.{ "message": "Not found" }

Bulk save notification templates (POST)

Saves multiple notification templates in one request using the same field names as the web bulk editor.

Endpoint summary

PropertyValue
MethodPOST
Path/api/v1/integration/notification-templates
Permissionsend_notification.
Content typeapplication/json.
Write guardReturns 403 in demo environments.
Success response200 with the list of template keys that were saved.

Request body

FieldTypeRequiredDescription
template_dataobjectYesObject keyed by template_for. Each nested object may contain subject, email_body, sms_body, whatsapp_text, auto_send, auto_send_sms, auto_send_wa_notif, cc, and bcc.

Top-level JSON response

FieldTypeDescription
updatedarray<string>The list of template keys that were saved.

Status codes

StatusWhen it happensResponse shape
200The notification templates were saved successfully.{ "updated": [...] }
403Demo mode is active or the token user lacks send_notification.{ "message": string }
422The request body failed validation or contains unknown template keys.Laravel validation JSON.

Update notification template

Partially updates a single notification template while leaving omitted fields unchanged.

Endpoint summary

PropertyValue
MethodPATCH
Path/api/v1/integration/notification-templates/{template_for}
Permissionsend_notification.
Write ruleOmitted fields keep their current values from NotificationTemplate::getTemplate.
Write guardReturns 403 in demo environments.
Success response200 with the refreshed notification-template object.

Request body

FieldTypeRequiredDescription
subject, email_body, sms_body, whatsapp_textstring | nullNoOptional content fields to update.
auto_send, auto_send_sms, auto_send_wa_notifbooleanNoOptional auto-send flags.
cc, bccstring | nullNoOptional email address fields.

Top-level JSON response

FieldTypeDescription
dataobjectThe updated template payload.

Status codes

StatusWhen it happensResponse shape
200The notification template was updated successfully.{ "data": { ... } }
403Demo mode is active or the token user lacks send_notification.{ "message": string }
404The requested template_for key is not present in the catalog for this business.{ "message": "Not found" }
422The request body failed validation.Laravel validation JSON.

List receipt printers

Lists receipt printers configured for the business together with connection-type metadata used by the printer settings screen.

Endpoint summary

PropertyValue
MethodGET
Path/api/v1/integration/receipt-printers
Permissionaccess_printers.
Search behaviorq requires at least 2 characters when sent. Legacy search still matches printer name, IP, path, or numeric id.
CSV behaviorformat=csv downloads all matching rows. JSON-only metadata stays in the normal response.
Success response200 with paginated rows plus meta.connection_types and meta.capability_profiles.

Query parameters

ParameterTypeRequiredDescription
per_page, pageintegerNoPagination controls. per_page accepts 1 to 100 and defaults to 20.
q, searchstringNoText search across printer identity fields.
sortstringNoname, connection_type, capability_profile, or created_at.
directionstringNoasc or desc.
formatstringNojson (default) or csv.

Returned row highlights

FieldTypeDescription
id, nameinteger | stringPrinter identity and display name.
connection_type, connection_type_labelstringStored connection code and human-readable label.
capability_profile, capability_profile_labelstringCapability profile code and label.
ip_address, port, path, char_per_linemixedConnection details used for printing.

Top-level JSON response

FieldTypeDescription
dataarray<object>The current result page of receipt printers.
meta.connection_types, meta.capability_profilesobjectChoice maps returned only on JSON responses.
meta.current_page, meta.last_page, meta.per_page, meta.totalintegerLaravel paginator metadata.

Status codes

StatusWhen it happensResponse shape
200The receipt printers were returned successfully.{ "data": [...], "meta": { ... } } or CSV download.
403The token user lacks access_printers.{ "message": string }
422The query string failed validation.Laravel validation JSON.

Get receipt printer

Returns one receipt printer together with the same connection-type metadata used by the printer settings UI.

Endpoint summary

PropertyValue
MethodGET
Path/api/v1/integration/receipt-printers/{id}
Permissionaccess_printers.
CSV behaviorformat=csv streams one row with data_json and meta_json cells matching the JSON payload.
Success response200 with one printer object and metadata maps.

Query parameters

ParameterTypeRequiredDescription
formatstringNojson (default) or csv. CSV download name: receipt-printer-{id}-detail-{business_id}-{timestamp}.csv.

Top-level JSON response

FieldTypeDescription
dataobjectThe requested receipt-printer payload.
meta.connection_types, meta.capability_profilesobjectChoice maps returned together with the printer record.

Status codes

StatusWhen it happensResponse shape
200The receipt printer was returned successfully.{ "data": { ... }, "meta": { ... } } or CSV download.
403The token user lacks access_printers.{ "message": string }
404The receipt printer id does not exist for the current business.{ "message": "Not found" }

Create receipt printer

Creates a receipt printer with the same network or local-path rules used by the web form.

Endpoint summary

PropertyValue
MethodPOST
Path/api/v1/integration/receipt-printers
Permissionaccess_printers.
Network ruleWhen connection_type = network, send ip_address and port. Local path is cleared.
Local ruleWhen connection_type = windows or linux, send path. IP and port are cleared.
Success response201 with the created printer object, including created_by.

Request body

FieldTypeRequiredDescription
namestringYesDisplay name for the printer.
connection_typestringYesnetwork, windows, or linux.
capability_profilestringYesdefault, simple, SP2000, TEP-200M, or P822D.
ip_address, portmixedConditionalRequired for network printers.
pathstring | nullConditionalRequired for Windows and Linux printers.
char_per_lineinteger | nullNoOptional printer width hint.

Top-level JSON response

FieldTypeDescription
dataobjectThe created receipt-printer payload.

Status codes

StatusWhen it happensResponse shape
201The receipt printer was created successfully.{ "data": { ... } }
403Demo mode is active or the token user lacks access_printers.{ "message": string }
422The request body failed validation.Laravel validation JSON.

Update receipt printer

Partially updates a receipt printer and re-applies the same connection rules after merging the new fields.

Endpoint summary

PropertyValue
MethodPATCH or PUT
Path/api/v1/integration/receipt-printers/{id}
Permissionaccess_printers.
Write ruleAll update fields are optional and are merged with the existing printer before connection rules are re-applied.
Success response200 with the updated receipt-printer object.

Request body

FieldTypeRequiredDescription
All Add receipt printer fieldsmixedNoSend only the values that should change.

Top-level JSON response

FieldTypeDescription
dataobjectThe updated receipt-printer payload.

Status codes

StatusWhen it happensResponse shape
200The receipt printer was updated successfully.{ "data": { ... } }
403Demo mode is active or the token user lacks access_printers.{ "message": string }
404The receipt printer id does not exist for the current business.{ "message": "Not found" }
422The request body failed validation.Laravel validation JSON.

Delete receipt printer

Deletes a receipt printer that is not currently referenced by any business location.

Endpoint summary

PropertyValue
MethodDELETE
Path/api/v1/integration/receipt-printers/{id}
Permissionaccess_printers.
Business ruleReturns 422 when a location still uses the printer as printer_id.
Write guardReturns 403 in demo environments.

Status codes

StatusWhen it happensResponse shape
200The receipt printer was deleted successfully.{ "message": string }
403Demo mode is active or the token user lacks access_printers.{ "message": string }
404The receipt printer id does not exist for the current business.{ "message": "Not found" }
422The printer is still assigned to one or more locations.{ "message": string }

Get business settings

Returns the business settings row together with the same date-format metadata used by the web Business settings screen.

Endpoint summary

PropertyValue
MethodGET
Path/api/v1/integration/business-settings
Permissionbusiness_settings.access.
CSV behaviorformat=csv streams one row with data_json and meta_json cells matching the JSON payload.
Sensitive-field rulewoocommerce_api_settings is never returned in the response.
Success response200 with the business-settings object and date-format metadata.

Top-level JSON response

FieldTypeDescription
dataobjectThe business row with decoded JSON fields such as pos_settings, keyboard_shortcuts, and custom_labels.
meta.date_formatsobjectAllowed business date-format keys from Business::date_formats().

Status codes

StatusWhen it happensResponse shape
200The business settings were returned successfully.{ "data": { ... }, "meta": { ... } } or CSV download.
403The token user lacks business_settings.access.{ "message": string }

Update business settings (PATCH)

Partially updates business settings using the same merge semantics as the web Business settings form.

Endpoint summary

PropertyValue
MethodPATCH or PUT
Path/api/v1/integration/business-settings
Permissionbusiness_settings.access.
Merge rulepos_settings is merged with the current value and defaults. shortcuts is stored as keyboard_shortcuts.
Upload rulebusiness_logo_base64 accepts an image data URL. POS carousel images are not uploaded through this API.
Success response200 with the same response shape as GET.

Request body

FieldTypeRequiredDescription
General business fields and feature togglesmixedNoIncludes booleans such as enable_rp, enable_tooltip, and purchase_in_diff_currency.
pos_settingsobjectNoPartial POS settings object merged with the current value.
shortcutsarrayNoKeyboard shortcut definitions stored as keyboard_shortcuts.
business_logo_base64string | nullNoOptional business logo image data URL.

Top-level JSON response

FieldTypeDescription
dataobjectThe updated business-settings payload.
meta.date_formatsobjectAllowed business date-format keys.

Status codes

StatusWhen it happensResponse shape
200The business settings were updated successfully.{ "data": { ... }, "meta": { ... } }
403Demo mode is active or the token user lacks business_settings.access.{ "message": string }
422The request body failed validation.Laravel validation JSON.

List outbound webhooks

Lists integration webhooks configured for the business, together with the allowed event catalog used by the web settings page.

Endpoint summary

PropertyValue
MethodGET
Path/api/v1/integration/webhooks
Permissionbusiness_settings.access.
Filter supportSupports pagination plus an optional is_active boolean filter.
CSV behaviorformat=csv downloads all matching rows. events is JSON-encoded in CSV cells.
Success response200 with paginated rows and meta.allowed_events.

Query parameters

ParameterTypeRequiredDescription
per_page, pageintegerNoPagination controls. per_page accepts 1 to 100 and defaults to 20.
is_activebooleanNoOptional active/inactive filter.
formatstringNojson (default) or csv.

Returned row highlights

FieldTypeDescription
id, url, descriptionmixedWebhook identity and destination details.
eventsarray<string>The subscribed event names for this endpoint.
is_active, secret_setbooleanWhether the webhook is enabled and whether a signing secret is stored.
created_by, created_at, updated_atmixedAudit metadata for the webhook row.

Top-level JSON response

FieldTypeDescription
dataarray<object>The current result page of webhooks.
meta.allowed_eventsarray<string>The event names that can be subscribed on create and update.
meta.current_page, meta.last_page, meta.per_page, meta.totalintegerLaravel paginator metadata.

Status codes

StatusWhen it happensResponse shape
200The webhooks were returned successfully.{ "data": [...], "meta": { ... } } or CSV download.
403The token user lacks business_settings.access.{ "message": string }
422The query string failed validation.Laravel validation JSON.

Get outbound webhook

Returns one integration webhook together with the same allowed-event metadata used by the settings page.

Endpoint summary

PropertyValue
MethodGET
Path/api/v1/integration/webhooks/{id}
Permissionbusiness_settings.access.
CSV behaviorformat=csv streams one row with data_json and meta_json cells matching the JSON payload.
Success response200 with one webhook object and the allowed-event list.

Top-level JSON response

FieldTypeDescription
dataobjectThe requested webhook payload.
meta.allowed_eventsarray<string>The event names that may be subscribed.

Status codes

StatusWhen it happensResponse shape
200The webhook was returned successfully.{ "data": { ... }, "meta": { ... } } or CSV download.
403The token user lacks business_settings.access.{ "message": string }
404The webhook id does not exist for the current business.{ "message": "Not found" }

Create outbound webhook

Creates an integration webhook that can receive sale and low-stock event deliveries.

Endpoint summary

PropertyValue
MethodPOST
Path/api/v1/integration/webhooks
Permissionbusiness_settings.access.
Supported eventssale.created, sale.updated, and product.stock_low.
Signing ruleWhen secret is present, deliveries include X-Webhook-Signature: sha256=<hex> over the raw JSON body.
Success response201 with the created webhook object.

Request body

FieldTypeRequiredDescription
urlstringYesDestination URL. HTTPS is recommended.
eventsarray<string>YesNon-empty list of allowed event names.
descriptionstring | nullNoOptional human-readable description.
secretstring | nullNoOptional signing secret with a minimum length of 8 characters.
is_activebooleanNoOptional active flag. Defaults to true.

Delivery notes

EventWhen it firesPayload notes
sale.createdWhen a final sell is saved for the first time.Uses the same SellCreatedOrModified event pipeline as the rest of the app.
sale.updatedWhen an existing final sell is modified.Uses the same sale event pipeline as create.
product.stock_lowWhen tracked quantity crosses from above the alert threshold to at or below it.Payload includes variation_id, product_id, location_id, product_name, qty_available, and alert_quantity.

Top-level JSON response

FieldTypeDescription
dataobjectThe created webhook payload.

Status codes

StatusWhen it happensResponse shape
201The webhook was created successfully.{ "data": { ... } }
403Demo mode is active or the token user lacks business_settings.access.{ "message": string }
422The request body failed validation.Laravel validation JSON.

Update outbound webhook

Partially updates a webhook's destination, subscribed events, secret, or active state.

Endpoint summary

PropertyValue
MethodPATCH
Path/api/v1/integration/webhooks/{id}
Permissionbusiness_settings.access.
Write modeAll update fields are optional and are applied partially.
Success response200 with the updated webhook object.

Request body

FieldTypeRequiredDescription
url, description, secretstring | nullNoOptional destination, description, and signing-secret updates.
eventsarray<string>NoOptional full replacement for the subscribed event list.
is_activebooleanNoOptional active-state update.

Top-level JSON response

FieldTypeDescription
dataobjectThe updated webhook payload.

Status codes

StatusWhen it happensResponse shape
200The webhook was updated successfully.{ "data": { ... } }
403Demo mode is active or the token user lacks business_settings.access.{ "message": string }
404The webhook id does not exist for the current business.{ "message": "Not found" }
422The request body failed validation.Laravel validation JSON.

Delete outbound webhook

Deletes an integration webhook.

Endpoint summary

PropertyValue
MethodDELETE
Path/api/v1/integration/webhooks/{id}
Permissionbusiness_settings.access.
Write guardReturns 403 in demo environments.

Status codes

StatusWhen it happensResponse shape
200The webhook was deleted successfully.{ "message": string }
403Demo mode is active or the token user lacks business_settings.access.{ "message": string }
404The webhook id does not exist for the current business.{ "message": "Not found" }

Test outbound webhook delivery

Queues a single webhook.test delivery so you can validate connectivity before turning a webhook on.

Endpoint summary

PropertyValue
MethodPOST
Path/api/v1/integration/webhooks/{id}/test
Permissionbusiness_settings.access.
BehaviorThe test run still works when the webhook itself is marked inactive.
Write guardReturns 403 in demo environments.

Status codes

StatusWhen it happensResponse shape
200The test delivery was queued successfully.{ "message": string }
403Demo mode is active or the token user lacks business_settings.access.{ "message": string }
404The webhook id does not exist for the current business.{ "message": "Not found" }

List business locations

Lists business locations visible to the token user, including receipt and invoice defaults resolved for display.

Endpoint summary

PropertyValue
MethodGET
Path/api/v1/integration/business-locations
Permissionbusiness_settings.access.
VisibilityUsers with restricted location access only see permitted locations.
CSV behaviorformat=csv downloads all matching rows and ignores pagination.
Success response200 with paginated rows or a CSV download.

Query parameters

ParameterTypeRequiredDescription
per_page, pageintegerNoPagination controls.
q, searchstringNoSearch across location name, location id, city, landmark, territory/cluster names and reference_code values, and numeric id-like values.
is_activebooleanNoOptional active/inactive filter.
sortstringNoname, location_id, city, or created_at.
directionstringNoasc or desc.
formatstringNojson (default) or csv.

Returned row highlights

FieldTypeDescription
id, name, location_idmixedLocation identity and display values.
territory_id, territory_reference_code, territory_name, location_cluster_id, cluster_reference_code, cluster_namemixedHierarchy fields when a location is linked to a territory and/or cluster.
territory, clusterobject | nullCompact nested objects with id, reference_code, name (cluster also includes territory_id) for integrations.
invoice_scheme_name, invoice_layout_name, selling_price_group_namestring | nullResolved related-setting labels.
print_receipt_on_invoice, receipt_printer_type, printer_id, printer_namemixedReceipt-printing configuration returned in list rows.
is_activebooleanCurrent active state for the location.

Top-level JSON response

FieldTypeDescription
dataarray<object>The current result page of business locations.
meta.current_page, meta.last_page, meta.per_page, meta.totalintegerLaravel paginator metadata.

Status codes

StatusWhen it happensResponse shape
200The business locations were returned successfully.{ "data": [...], "meta": { ... } } or CSV download.
403The token user lacks business_settings.access.{ "message": string }
422The query string failed validation.Laravel validation JSON.

Get business location

Returns one business location with full detail, including default payment accounts and featured products when configured.

Endpoint summary

PropertyValue
MethodGET
Path/api/v1/integration/business-locations/{id}
Permissionbusiness_settings.access plus location visibility.
CSV behaviorformat=csv streams one row whose data_json cell matches the JSON data object.
Success response200 with one business-location object.

Top-level JSON response

FieldTypeDescription
dataobjectThe requested business-location payload, including nested fields such as default_payment_accounts and featured_products when present.

Status codes

StatusWhen it happensResponse shape
200The business location was returned successfully.{ "data": { ... } } or CSV download.
403The location exists but is outside the token user's permitted locations.{ "message": string }
404The business location id does not exist for the current business.{ "message": "Not found" }

List territories

Returns every territory for the business with optional reference_code (unique per business) for stable integration identifiers.

PropertyValue
MethodGET
Path/api/v1/integration/territories
Permissionbusiness_settings.access.
Success response200 with { "data": [ { "id", "reference_code", "name", "description", "created_at", "updated_at" } ] }.

List location clusters

Returns clusters with parent territory id, name, and reference codes so callers can resolve location_cluster_id / territory_id on locations.

PropertyValue
MethodGET
Path/api/v1/integration/location-clusters
Permissionbusiness_settings.access.
Success response200 with { "data": [ { "id", "reference_code", "name", "description", "territory_id", "territory_name", "territory_reference_code", "created_at", "updated_at" } ] }.

Business location payment types

Returns the enabled payment-method keys and translated labels for one business location.

Endpoint summary

PropertyValue
MethodGET
Path/api/v1/integration/business-locations/{id}/payment-types
PermissionNo separate settings permission. The location must belong to the business and be within the token user's permitted locations.
CSV behaviorformat=csv streams one row per payment method with the same shape as JSON data[].
Success response200 with payment-type rows and meta.location_id.

Top-level JSON response

FieldTypeDescription
data[]array<object>Rows with key and label for each enabled payment method.
meta.location_idintegerThe resolved business-location id.

Status codes

StatusWhen it happensResponse shape
200The payment types were returned successfully.{ "data": [...], "meta": { "location_id": integer } } or CSV download.
403The location exists but is outside the token user's permitted locations.{ "message": string }
404The business location id does not exist for the current business.{ "message": "Not found" }

Create business location

Creates a business location, auto-generates its location code when omitted, and validates the same linked settings as the web form.

Endpoint summary

PropertyValue
MethodPOST
Path/api/v1/integration/business-locations
Permissionbusiness_settings.access.
Subscription ruleReturns 402 when the business is not subscribed and 422 when the location quota is exhausted.
Reference ruleWhen location_id is omitted, the controller auto-generates it and creates the matching Spatie permission location.{id}.
Success response201 with the created business-location object.

Request body

FieldTypeRequiredDescription
Core location fieldsmixedYesStandard location identity and address fields such as name, optional location_id, and contact details.
territory_id, location_cluster_idinteger | nullNoOptional link to a territory and cluster belonging to the business; cluster must sit under its territory.
invoice_scheme_id, invoice_layout_id, selling_price_group_idinteger | nullNoOptional related-setting ids that must belong to the current business.
default_payment_accountsobject | nullNoOptional default payment-account mapping object.
featured_productsarray<integer> | nullNoOptional list of variation ids highlighted at the location.
Receipt settingsmixedNoOptional receipt-printing fields such as print_receipt_on_invoice, receipt_printer_type, and printer_id.

Top-level JSON response

FieldTypeDescription
dataobjectThe created business-location payload.

Status codes

StatusWhen it happensResponse shape
201The business location was created successfully.{ "data": { ... } }
402The business subscription does not allow creating locations.{ "message": string }
403Demo mode is active or the token user lacks business_settings.access.{ "message": string }
422The request body failed validation or the business has reached its location quota.Laravel validation JSON or { "message": string }.

Update business location

Partially updates a business location, including receipt-printer settings and invoice defaults.

Endpoint summary

PropertyValue
MethodPATCH
Path/api/v1/integration/business-locations/{id}
Permissionbusiness_settings.access.
Uniqueness rulelocation_id must remain unique per business when it is updated.
Receipt ruleReceipt fields follow LocationSettingsController::updateSettings. In demo mode, sending receipt fields forces receipt_printer_type = browser.
Success response200 with the updated business-location object.

Request body

FieldTypeRequiredDescription
All Create business location fieldsmixedNoAll update fields are optional and are applied partially.
print_receipt_on_invoice, receipt_printer_type, printer_idmixedNoReceipt-printing settings validated against the current business and printer catalog.

Top-level JSON response

FieldTypeDescription
dataobjectThe updated business-location payload.

Status codes

StatusWhen it happensResponse shape
200The business location was updated successfully.{ "data": { ... } }
403Demo mode is active or the token user lacks business_settings.access.{ "message": string }
404The business location id does not exist for the current business.{ "message": "Not found" }
422The request body failed validation.Laravel validation JSON.

Toggle business location active

Flips a business location between active and inactive states, mirroring the web activate/deactivate action.

Endpoint summary

PropertyValue
MethodPOST
Path/api/v1/integration/business-locations/{id}/toggle-active
Permissionbusiness_settings.access.
Write guardReturns 403 in demo environments.
Success response200 with the refreshed business-location object.

Status codes

StatusWhen it happensResponse shape
200The business location active state was toggled successfully.{ "data": { ... } }
403Demo mode is active or the token user lacks business_settings.access.{ "message": string }
404The business location id does not exist for the current business.{ "message": "Not found" }