https://api.genuka.com · Auth Authorization: Bearer <token> + X-Company: <companyId> · See Getting Started for shared conventions, pagination & error formats.
Endpoints at a glance
Customers (Admin)
GET /2023-11/admin/customers
List customers with filtering, sorting, and pagination.
- Query parameters:
Request example:
200 OK:
400— missingX-Companyheader (company_id_required)401— invalid or expired token403— insufficient permissions (invalid_scope)
POST /2023-11/admin/customers
Create a new customer. Supports optional duplicate detection before creation.
- Request body:
Request example:
200 OK (or 200 OK with duplicate_detected: true when duplicate found):
detect_duplicate=true and a duplicate is found:
400— missing required fields or duplicate email/phone422— validation failure witherrorsobject
GET /2023-11/admin/customers/count
Returns the total number of customers for the current company.
Request example:
200 OK:
GET /2023-11/admin/customers/overview
Returns aggregated customer statistics (new customers, returning rate, etc.).
- Query parameters:
Request example:
200 OK:
GET /2023-11/admin/customers/{customer}
Get a single customer by ID. Loads addresses, tags, media. Optionally loads stats and last order.
- Path parameters:
- Query parameters:
Request example:
200 OK:
401— invalid token404— customer not found
PUT /2023-11/admin/customers/{customer}
Update a customer. Returns the updated customer (same shape as GET show).
- Path parameters:
- Request body: Any subset of the customer fields. The
emailandphonefields are validated for uniqueness (ignoring the current customer).
Request example:
200 OK:
400— duplicate email or phone (The email has already been taken.)401— invalid token404— customer not found422— validation failure
DELETE /2023-11/admin/customers/{customer}
Soft-delete a customer. Pass ?force=true to permanently delete.
- Path parameters:
- Query parameters:
Request example:
200 OK:
401— invalid token404— customer not found
POST /2023-11/admin/customers/bulk-delete
Delete multiple customers in a single request.
- Request body:
Request example:
200 OK:
warning: true and failed_ids are added to the response.
POST /2023-11/admin/customers/bulk-update
Update fields across multiple customers in one request. Up to 100 customers per call.
- Request body:
Request example:
200 OK:
POST /2023-11/admin/customers/bulk-tags
Add and/or remove tags across multiple customers in one call. Up to 100 customers.
- Request body:
Request example:
200 OK:
POST /2023-11/admin/customers/merge
Merge multiple customer records into one, combining orders, addresses, and other relations.
- Request body:
Request example:
200 OK:
400/422— business rule violation (e.g. customers belong to different companies)
POST /2023-11/admin/customers/export
Trigger an asynchronous export of customers to CSV or XLSX. The export is processed in the background and the result is sent to the requesting user.
- Request body (form data or JSON):
Request example:
200 OK:
GET /2023-11/admin/customers/export/fields
Return the list of column keys available for the customer export.
Request example:
200 OK:
POST /2023-11/admin/customers/import
Import customers from a spreadsheet file (xlsx, xls, or csv). The file is processed synchronously and returns a summary.
- Request body (multipart/form-data):
Request example:
200 OK:
POST /2023-11/admin/customers/import-chunk
Upload one chunk of a large import file (chunked multipart upload protocol). Call merge-chunk after all chunks are uploaded.
- Request body (multipart/form-data):
Success response
200 OK:
POST /2023-11/admin/customers/merge-chunk
Finalise a chunked import by merging all uploaded chunks and processing the full file.
- Request body:
Success response
200 OK:
GET /2023-11/admin/customers/{customer}/activities
Retrieve a cursor-paginated activity feed for a customer (orders, notes, status changes, etc.).
- Path parameters:
- Query parameters:
Request example:
200 OK:
GET /2023-11/admin/customers/{customer}/campaigns
List campaigns that included this customer, paginated.
- Path parameters:
- Query parameters:
Success response
200 OK:
GET /2023-11/admin/customers/{customer}/top-products
Get the products most frequently purchased by this customer, with optional filters.
- Path parameters:
- Query parameters:
Success response
200 OK:
GET /2023-11/admin/customers/{customer}/top-products/categories
Get the product categories most purchased by this customer.
- Path parameters:
Success response
200 OK:
PUT /2023-11/admin/customers/{customer}/tags
Replace all tags on a customer (idempotent sync).
- Path parameters:
- Request body:
Success response
200 OK:
POST /2023-11/admin/customers/{customer}/tags
Attach one or more tags to a customer without removing existing ones.
- Path parameters:
- Request body:
Request example:
200 OK:
DELETE /2023-11/admin/customers/{customer}/tags/{tag}
Remove a single tag from a customer.
- Path parameters:
Success response
200 OK:
PATCH /2023-11/admin/customers/{customer}/{field}
Update a single custom field stored in metadata.custom_fields.
- Path parameters:
- Request body: Must contain a property whose key matches
{field}.
200 OK:
400— field key not found in request body
Contacts (Admin)
Contacts are typed contact entries (phone, email, or person) attached to a customer. They supersede the flatphone/email columns for multi-contact customers.
GET /2023-11/admin/customers/{customer}/contacts
List all contacts for a customer.
- Path parameters:
- Query parameters (via Spatie QueryBuilder):
Request example:
200 OK:
POST /2023-11/admin/customers/{customer}/contacts
Add a new contact entry to a customer.
- Path parameters:
- Request body:
Request example:
201 Created:
422— validation failure (e.g. invalidtype)
GET /2023-11/admin/customers/{customer}/contacts/{contact}
Get a single contact belonging to a customer.
- Path parameters:
Success response
200 OK:
404— contact does not belong to this customer
PUT /2023-11/admin/customers/{customer}/contacts/{contact}
Update a contact. All fields are optional.
- Path parameters:
- Request body: All fields are optional. Setting
is_primary: truepromotes this contact to primary within its type group.
Success response
200 OK:
DELETE /2023-11/admin/customers/{customer}/contacts/{contact}
Delete a contact. The primary person-type contact cannot be deleted.
- Path parameters:
Success response
200 OK:
404— contact does not belong to this customer422— cannot delete the primary person contact
POST /2023-11/admin/customers/{customer}/contacts/{contact}/set-primary
Promote a contact to primary within its type group.
- Path parameters:
- Request body: None. All inputs are path parameters; no body fields are consumed.
200 OK:
POST /2023-11/admin/customers/{customer}/contacts/bulk
Replace or synchronise all contacts for a customer in one call.
- Path parameters:
- Request body:
Success response
200 OK:
Addresses (Admin)
Admin address endpoints are polymorphic: they work for customers, orders, suppliers, etc. Themodel_type and model_id query parameters identify the owner.
Supported model_type values: customer, company, shop, pickupLocation, warehouse, supplier, order, bill, payment, delivery
GET /2023-11/admin/addresses
List all addresses belonging to a model instance.
- Query parameters:
Request example:
200 OK:
400— missing or invalidmodel_type/model_id404— owner model not found
POST /2023-11/admin/addresses
Create an address and attach it to a model.
-
Query parameters:
model_typeandmodel_id(same asGET) - Request body:
Request example:
200 OK:
GET /2023-11/admin/addresses/{address}
Get a single address by ID.
- Path parameters:
Success response
200 OK:
PUT /2023-11/admin/addresses/{address}
Update an address. Requires model_type and model_id query params to verify ownership.
- Path parameters:
-
Query parameters:
model_type,model_id - Request body: All fields are optional.
Request example:
200 OK:
400— address does not belong to the specified model
DELETE /2023-11/admin/addresses/{address}
Delete an address. Requires model_type and model_id query params to verify ownership.
- Path parameters:
- Query parameters:
model_type,model_id
200 OK:
400— address does not belong to the specified model
Customer Notes (Admin)
Notes are free-text CRM annotations (with optional media attachments) written by staff on a customer record.GET /2023-11/admin/customer-notes
List all CRM notes, with optional filtering.
- Query parameters:
Request example:
200 OK:
POST /2023-11/admin/customer-notes
Create a CRM note.
- Request body:
Request example:
200 OK:
422—customer_iddoes not exist orcontentmissing
GET /2023-11/admin/customer-notes/{customerNote}
Get a single CRM note.
- Path parameters:
Success response
200 OK:
PUT /2023-11/admin/customer-notes/{customerNote}
Update a CRM note.
- Path parameters:
- Request body: All fields optional (
sometimes).
Success response
200 OK:
DELETE /2023-11/admin/customer-notes/{customerNote}
Delete a CRM note.
- Path parameters:
Response:
204 No Content — empty body.
POST /2023-11/admin/customers/{customer}/notes
Create a note scoped directly to a customer (shorthand for POST /admin/customer-notes with the customer ID pre-filled).
- Path parameters:
- Request body:
customer_idis automatically set from the path parameter and does not need to be sent.
Success response
200 OK:
PATCH /2023-11/admin/customers/{customer}/notes/{customerNote}
Update a note that belongs to a specific customer.
- Path parameters:
- Request body: All fields are optional.
Success response
200 OK:
404— note does not belong to this customer
Customer Note Categories (Admin)
GET /2023-11/admin/customer-note-categories
List all note categories for the current company.
- Query parameters:
Request example:
200 OK:
POST /2023-11/admin/customer-note-categories
Create a note category.
- Request body:
Request example:
200 OK:
422— label already used within this company
GET /2023-11/admin/customer-note-categories/{customerNoteCategory}
Get a single category.
- Path parameters:
Success response
200 OK:
PUT /2023-11/admin/customer-note-categories/{customerNoteCategory}
Update a note category.
- Path parameters:
- Request body:
Success response
200 OK:
DELETE /2023-11/admin/customer-note-categories/{customerNoteCategory}
Delete a note category.
- Path parameters:
Response:
204 No Content — empty body.
Customer Self-Service (Storefront)
The following endpoints are used by the storefront / customer portal. Authentication uses a customer bearer token issued at login or registration. TheX-Company header is still required.
POST /2023-11/customers/register
Register a new customer account.
- Request body:
Request example:
200 OK:
400— validation failure or duplicate email/phone
POST /2023-11/customers/login
Authenticate a customer and return an access token.
- Request body:
Request example:
200 OK:
400/401— invalid credentials
POST /2023-11/customers/logout
Revoke the current customer access token.
Requires: Authorization: Bearer <customer-token>
- Request body: None. The token to revoke is identified from the
Authorizationheader; no body fields are consumed.
200 OK:
POST /2023-11/customers/password/reset-link
Generate a password reset token and return it directly (no email is sent). Useful for custom storefront flows that handle delivery themselves.
- Request body:
Request example:
200 OK:
404— email not found
POST /2023-11/customers/password/forgot
Send a password reset link email (standard Laravel broker flow).
- Request body:
Success response
200 OK:
POST /2023-11/customers/password/reset
Reset a customer password using a token received via email or reset-link.
- Request body:
Request example:
200 OK:
400— invalid or expired token
GET /2023-11/customers/profile
Get the authenticated customer’s profile (with associated company).
Requires: Authorization: Bearer <customer-token>
Request example:
200 OK:
PUT /2023-11/customers/profile
Update the authenticated customer’s profile.
Requires: Authorization: Bearer <customer-token>
- Request body:
Success response
200 OK:
PUT /2023-11/customers/profile/password
Change the authenticated customer’s password.
Requires: Authorization: Bearer <customer-token>
- Request body:
Request example:
200 OK:
400— current password incorrect
Customer Addresses (Storefront)
These endpoints operate on the authenticated customer’s own addresses. Nomodel_type / model_id params are needed.
GET /2023-11/customers/addresses
List the authenticated customer’s addresses (paginated).
- Query parameters:
Request example:
200 OK:
POST /2023-11/customers/addresses
Create an address for the authenticated customer.
- Request body: No
model_typeormodel_idparameters are needed — the address is automatically scoped to the authenticated customer.
Request example:
200 OK:
GET /2023-11/customers/addresses/{address}
Get a specific address belonging to the authenticated customer.
- Path parameters:
Success response
200 OK:
PUT /2023-11/customers/addresses/{address}
Update an address belonging to the authenticated customer.
- Path parameters:
- Request body: All fields are optional; omitted fields keep their current value.
Success response
200 OK:
DELETE /2023-11/customers/addresses/{address}
Delete an address belonging to the authenticated customer.
- Path parameters:
Success response
200 OK:
Customer Orders (Storefront)
POST /2023-11/customers/orders
Place a new order (public endpoint — also works without authentication for guest checkout).
- Request body:
Request example:
200 OK: OrderDetailResource with additional fields:
token and customer only present when authenticate: true is sent)
GET /2023-11/customers/orders
List orders for the authenticated customer (paginated).
- Query parameters: Standard pagination (
page,per_page). Supportsfilter[reference],filter[billing->status],filter[shipping->status],include, andsort.
200 OK:
GET /2023-11/customers/orders/{orderId}
Get a single order by ID (public — no auth required if order ID is known).
- Path parameters:
Success response
200 OK:
PUT /2023-11/customers/orders/{order}
Update an existing order (re-runs the upsert process with the given order ID).
- Path parameters:
- Request body: Same shape as
POST /customers/orders; all fields are optional for updates.
Success response
200 OK:
POST /2023-11/customers/orders/{order}/payments
Generate a new payment link for an existing order.
- Path parameters:
- Request body:
Request example:
200 OK:
400— payment link could not be generated (no matching treasury account or provider error)
Customer Identity Check (Public)
POST /2023-11/customers/check-identity
Resolve the account holder name for a given phone number. Currently limited to Cameroon (cm) numbers via the Peex identity service. Results are cached for one month.
- Request body:
Request example:
200 OK:
422— phone missing or unsupportedcountry_code
