Faq (Admin)
Companies can create some FAQ context and maintain its FAQ items. This module makes possible to manipulate that entities.
A FAQ item can be associated to one or more contexts and it is technically independent of a context. You can see the model representation bellow.
Service Methods
Creates a new FAQ context inside a company
Rest API reference:
Creates a new FAQ context for a company
pre_sale
POST /admin/companies/{companyId}/faq/contexts HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"name": "pre_sale"
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-07-05T08:14:28.420Z",
"updatedAt": "2025-07-05T08:14:28.420Z",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"company": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-07-05T08:14:28.420Z",
"updatedAt": "2025-07-05T08:14:28.420Z",
"name": "text"
},
"name": "pre_sale"
}
Lists all company FAQ contexts
Rest API reference:
Lists all company FAQ contexts
1
10
GET /admin/companies/{companyId}/faq/contexts HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-07-05T08:14:28.420Z",
"updatedAt": "2025-07-05T08:14:28.420Z",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"company": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-07-05T08:14:28.420Z",
"updatedAt": "2025-07-05T08:14:28.420Z",
"name": "text"
},
"name": "pre_sale"
}
],
"meta": {
"itemCount": 1,
"totalItems": 1,
"itemsPerPage": 1,
"totalPages": 1,
"currentPage": 1
},
"links": {
"first": "http://example.com?page=1",
"prev": "http://example.com?page=1",
"next": "http://example.com?page=2",
"last": "http://example.com?page=3"
}
}
Gets some company FAQ context by ID
Rest API reference:
Gets a company FAQ context
GET /admin/companies/{companyId}/faq/contexts/{contextId} HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-07-05T08:14:28.420Z",
"updatedAt": "2025-07-05T08:14:28.420Z",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"company": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-07-05T08:14:28.420Z",
"updatedAt": "2025-07-05T08:14:28.420Z",
"name": "text"
},
"name": "pre_sale"
}
Updates some company FAQ context
Rest API reference:
Updates some company FAQ context
pre_sale
PATCH /admin/companies/{companyId}/faq/contexts/{contextId} HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"name": "pre_sale"
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-07-05T08:14:28.420Z",
"updatedAt": "2025-07-05T08:14:28.420Z",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"company": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-07-05T08:14:28.420Z",
"updatedAt": "2025-07-05T08:14:28.420Z",
"name": "text"
},
"name": "pre_sale"
}
Lists all FAQ context items
Rest API reference:
Lists all FAQ items inside some company context
1
10
GET /admin/companies/{companyId}/faq/contexts/{contextId}/items HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-07-05T08:14:28.420Z",
"updatedAt": "2025-07-05T08:14:28.420Z",
"question": {
"pt-br": "Algum texto em pt-br",
"en": "Some text in en"
},
"answer": {
"pt-br": "Algum texto em pt-br",
"en": "Some text in en"
},
"externalUrl": "https://myquestion.should.move.to/"
}
],
"meta": {
"itemCount": 1,
"totalItems": 1,
"itemsPerPage": 1,
"totalPages": 1,
"currentPage": 1
},
"links": {
"first": "http://example.com?page=1",
"prev": "http://example.com?page=1",
"next": "http://example.com?page=2",
"last": "http://example.com?page=3"
}
}
Gets some specific FAQ item by ID from some FAQ context
Rest API reference:
Gets company context FAQ item by id
GET /admin/companies/{companyId}/faq/contexts/{contextId}/items/{faqItemId} HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-07-05T08:14:28.420Z",
"updatedAt": "2025-07-05T08:14:28.420Z",
"question": {
"pt-br": "Algum texto em pt-br",
"en": "Some text in en"
},
"answer": {
"pt-br": "Algum texto em pt-br",
"en": "Some text in en"
},
"externalUrl": "https://myquestion.should.move.to/"
}
Creates a FAQ item and associate it to one or more contexts
Rest API reference:
Creates a new FAQ item inside one or more company contexts
https://myquestion.should.move.to/
POST /admin/companies/{companyId}/faq/items HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 257
{
"question": {
"pt-br": "Algum texto em pt-br",
"en": "Some text in en"
},
"answer": {
"pt-br": "Algum texto em pt-br",
"en": "Some text in en"
},
"externalUrl": "https://myquestion.should.move.to/",
"contexts": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"relevance": 0
}
]
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-07-05T08:14:28.420Z",
"updatedAt": "2025-07-05T08:14:28.420Z",
"question": {
"pt-br": "Algum texto em pt-br",
"en": "Some text in en"
},
"answer": {
"pt-br": "Algum texto em pt-br",
"en": "Some text in en"
},
"externalUrl": "https://myquestion.should.move.to/"
}
Lists all FAQ items available in the company independent of context
Rest API reference:
Lists all company FAQ items which are associated to some company context
1
10
GET /admin/companies/{companyId}/faq/items HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-07-05T08:14:28.420Z",
"updatedAt": "2025-07-05T08:14:28.420Z",
"question": {
"pt-br": "Algum texto em pt-br",
"en": "Some text in en"
},
"answer": {
"pt-br": "Algum texto em pt-br",
"en": "Some text in en"
},
"externalUrl": "https://myquestion.should.move.to/"
}
],
"meta": {
"itemCount": 1,
"totalItems": 1,
"itemsPerPage": 1,
"totalPages": 1,
"currentPage": 1
},
"links": {
"first": "http://example.com?page=1",
"prev": "http://example.com?page=1",
"next": "http://example.com?page=2",
"last": "http://example.com?page=3"
}
}
Gets some FAQ item of company by ID
Rest API reference:
Gets a company FAQ item by id
GET /admin/companies/{companyId}/faq/items/{faqItemId} HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-07-05T08:14:28.420Z",
"updatedAt": "2025-07-05T08:14:28.420Z",
"question": {
"pt-br": "Algum texto em pt-br",
"en": "Some text in en"
},
"answer": {
"pt-br": "Algum texto em pt-br",
"en": "Some text in en"
},
"externalUrl": "https://myquestion.should.move.to/"
}
Updates some FAQ item, including re-association of contexts
Rest API reference:
Updates some FAQ item and associate/disassociate it contexts
https://myquestion.should.move.to/
PATCH /admin/companies/{companyId}/faq/items/{faqItemId} HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 257
{
"question": {
"pt-br": "Algum texto em pt-br",
"en": "Some text in en"
},
"answer": {
"pt-br": "Algum texto em pt-br",
"en": "Some text in en"
},
"externalUrl": "https://myquestion.should.move.to/",
"contexts": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"relevance": 0
}
]
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-07-05T08:14:28.420Z",
"updatedAt": "2025-07-05T08:14:28.420Z",
"question": {
"pt-br": "Algum texto em pt-br",
"en": "Some text in en"
},
"answer": {
"pt-br": "Algum texto em pt-br",
"en": "Some text in en"
},
"externalUrl": "https://myquestion.should.move.to/"
}
Last updated