Skip to main content

Support Tickets API

The Support Tickets API allows you to manage customer support tickets in the Nilo platform. This API enables you to view, close, and request additional information for support tickets created by stores.

Understanding Support Tickets​

Support tickets are created by stores when they need assistance. The lifecycle of a ticket is:

  1. Created: Store creates a ticket (you receive a webhook notification)
  2. In Progress: You are working on the issue
  3. Additional Info Requested: You need more information from the store
  4. Solved/Closed: The issue has been resolved

Ticket Statuses​

StatusDescription
PENDINGTicket just created, awaiting attention
IN_PROGRESSTicket is being worked on
ADDITIONAL_INFO_REQUESTEDWaiting for more info from the store
SOLVEDIssue has been resolved
CLOSEDTicket has been closed

Single Ticket Operations​

Get Support Ticket Details​

GET/support/ticket/{id}

Retrieve detailed information about a specific support ticket.

Path Parameters​

ParameterTypeRequiredDescription
idstringYesThe support ticket ID (same as the one received in the webhook notification)

Response Example​

{
"id": 1234,
"status": "PENDING",
"userMessage": "I need help with my order",
"externalTicketId": "EXT-5678",
"niloInternalCode": "STORE-001",
"resolvedAt": null
}

Example Usage​

const headers = {
Authorization: "YOUR_AUTH_TOKEN",
"x-api-key": "YOUR_API_KEY",
};

fetch(
"https://tm0cs5kjs6.execute-api.us-east-1.amazonaws.com/dev/support/ticket/1234",
{
method: "GET",
headers: headers,
}
)
.then((response) => response.json())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));

List All Support Tickets​

GET/support/ticket

Retrieve a list of all support tickets with pagination and filtering support.

Query Parameters​

ParameterTypeRequiredDescription
takenumberNoNumber of items per page (default: 50, max: 50)
pagestringNoPage number (default: 1)
statusstringNoFilter by status (CLOSED, PENDING, IN_PROGRESS, ADDITIONAL_INFO_REQUESTED, SOLVED)

Example Usage​

const headers = {
Authorization: "YOUR_AUTH_TOKEN",
"x-api-key": "YOUR_API_KEY",
};

fetch(
"https://tm0cs5kjs6.execute-api.us-east-1.amazonaws.com/dev/support/ticket?status=PENDING",
{
method: "GET",
headers: headers,
}
)
.then((response) => response.json())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));

Close Support Ticket​

PUT/support/ticket/close

Close a support ticket with a resolution message.

Request Body Parameters​

ParameterTypeRequiredDescription
messagestringNoMessage explaining the resolution
ticketIdnumberNo*Ticket ID provided by Nilo
externalTicketIdstringNo*External ticket ID provided by your ticket service

*Either ticketId OR externalTicketId must be provided.

Request Body Example​

{
"message": "Issue has been resolved. The order was delivered successfully.",
"ticketId": 1234
}

Example Usage​

const headers = {
Authorization: "YOUR_AUTH_TOKEN",
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
};

const data = {
message: "Issue has been resolved. The order was delivered successfully.",
ticketId: 1234,
};

fetch(
"https://tm0cs5kjs6.execute-api.us-east-1.amazonaws.com/dev/support/ticket/close",
{
method: "PUT",
headers: headers,
body: JSON.stringify(data),
}
)
.then((response) => response.json())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));

Request Additional Information​

POST/support/ticket/additional-info

Request additional information from the store for a specific ticket. The store will receive a notification and can respond with the requested information.

Request Body Parameters​

ParameterTypeRequiredDescription
messagestringNoMessage specifying what additional information is needed
ticketIdnumberNo*Ticket ID provided by Nilo
externalTicketIdstringNo*External ticket ID provided by your ticket service

*Either ticketId OR externalTicketId must be provided.

Request Body Example​

{
"message": "Please provide the order number and a photo of the damaged product.",
"ticketId": 1234
}

Example Usage​

const headers = {
Authorization: "YOUR_AUTH_TOKEN",
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
};

const data = {
message: "Please provide the order number and a photo of the damaged product.",
ticketId: 1234,
};

fetch(
"https://tm0cs5kjs6.execute-api.us-east-1.amazonaws.com/dev/support/ticket/additional-info",
{
method: "POST",
headers: headers,
body: JSON.stringify(data),
}
)
.then((response) => response.json())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));

Support tickets integrate with webhooks to notify you of events:

WebhookDescription
POST /webhooks/support/create-ticketNotifies when a new ticket is created
POST /webhooks/support/ticket-additional-info-receivedNotifies when the store responds to your additional info request

See the Webhooks documentation for implementation details.

Security​

Authentication​

All endpoints require two types of authentication:

  • API Key in header: x-api-key
  • Authorization token in header: Authorization

Required Permissions​

  • For reading operations: supplier/support.read
  • For writing operations: supplier/support.write
Tana

Tana

Ask me anything about Nilo's API — endpoints, authentication, integration guides, or code examples.

Best practice: validate against the official documentation for the most up-to-date details.