Skip to main content

Support Tickets

5 API calls in this section.

Unified support tickets API. The same endpoints are used by the customer portal and the storefront market — pass source (and related_order_id when source=storefront) to differentiate origin. Tenant admins can filter the support queue by source from the messaging APIs.

Create Support Ticket (Customer Portal)​

Customer Portal / Delivery Management / Support Tickets
POST/customer/support/tickets

Creates a customer-portal support ticket and its chat conversation. source defaults to customer_portal. Pass related_delivery_id to link a delivery (optional). A 409 is returned if an open ticket already exists for the same delivery.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
subjectstring—
prioritystring—
sourcestring—
related_delivery_idstring—
messagestring—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/customer/support/tickets" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "subject": "Delivery delayed",6  "priority": "medium",7  "source": "customer_portal",8  "related_delivery_id": "uuid",9  "message": "My delivery is delayed, please help"10}'

Response examples

No saved response example. Use Try it to inspect a staging response.

Create Support Ticket (Storefront / Market)​

Customer Portal / Delivery Management / Support Tickets
POST/customer/support/tickets

Creates a storefront-originated support ticket. source MUST be storefront and related_order_id is required. The order is verified to belong to the authenticated buyer and to the same tenant before the ticket is created. The conversation title and first message include the order number.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
subjectstring—
prioritystring—
sourcestring—
related_order_idstring—
messagestring—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/customer/support/tickets" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "subject": "Wrong item received",6  "priority": "high",7  "source": "storefront",8  "related_order_id": "uuid",9  "message": "My order had the wrong product, please help."10}'

Response examples

409Conflict
Response body
json
1{2  "success": false,3  "message": "A support ticket is already open for this item",4  "error": "support_ticket_already_open_for_related",5  "data": {6    "existing_ticket_id": "ticket-uuid",7    "existing_conversation_id": "conversation-uuid"8  }9}

List Support Tickets​

Customer Portal / Delivery Management / Support Tickets
GET/customer/support/tickets

Lists the authenticated user's tickets with conversation summary. Use source to scope a portal-specific view (e.g. only storefront-order tickets).

Query parameters

ParameterTypeDescription
pagestring

Page number (>=1)

Example: 1

limitstring

Items per page (1-50)

Example: 20

statusOptionalstring

open | closed

Example: open

sourceOptionalstring

customer_portal | storefront | restaurant — filter by ticket origin

Example: storefront

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/customer/support/tickets?page=1&limit=20&status=open&source=storefront" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

No saved response example. Use Try it to inspect a staging response.

Get Support Ticket​

Customer Portal / Delivery Management / Support Tickets
GET/customer/support/tickets/:id

Gets a single ticket (customer-scoped) with conversation summary, assigned_to_user, linked delivery (when source=customer_portal) or order (when source=storefront).

Path parameters

ParameterTypeDescription
idRequiredstring

Support ticket ID

Example: uuid

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/customer/support/tickets/${ID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

No saved response example. Use Try it to inspect a staging response.

Close Ticket​

Customer Portal / Delivery Management / Support Tickets
POST/customer/support/tickets/:id/close

Closes the support ticket (only if allow_customer_close is enabled in portal settings).

Path parameters

ParameterTypeDescription
idRequiredstring

Support ticket ID

Example: uuid

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/customer/support/tickets/${ID}/close" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

No saved response example. Use Try it to inspect a staging response.