# CMS ``` api-cms: /cms/gs ``` ## Tag ### Get Tags __Service__ api-cms __Request__ ```json GET /v1/tags ``` __Response__ **200 OK** ```json { "result": [ { "id": "a5V7Wz49nlPgbKEqVJkMQLpm3dyO6Zq2", "name": "animal", "created_at": "2021-07-29T05:10:23.314005Z" }, { "id": "bp43kg127AGwmejN1JLBVNvXyoD6KPnO", "name": "plant", "created_at": "2021-07-29T05:10:23.314005Z" } ], "message": "Success" } ``` ### Create Tags __Service__ api-cms __Request__ ```json Content-Type: application/json POST /v1/tags { "tags": [ {"name": "string"}, {"name": "string"} ] } ``` __Response__ **201 Created** ```json { "message": "Successfully Inserted Data" } ``` **400 Bad Request** ```json { "error": "f6268d6c-aea9-49b6-87b7-e6133f45834c", "message": "Bad Request", "detail": { "tag": {"tag cannot be empty|tag must be between 3 and 30 characters"} } } ``` **409 Resource Conflict** ```json { "error": "9ad3d892-c068-44ba-a70f-6fac81d96ea4", "message": "Resource Conflict", "detail": { "tag": "tag already exist" } } ``` ### Delete Tags __Service__ api-cms __Request__ ```json Content-Type: application/json DELETE /v1/tags { "tags_id": ["encrypted_id", "encrypted_id"] } ``` __Response__ **200 Created** ```json { "message": "success" } ``` ## FAQ ### Get FAQ __Service__ api-cms __Request__ ```json GET /v1/faq ``` __Response__ **200 OK** ```json { "result": [ { "id": "a5V7Wz49nlPgbKEqVJkMQLpm3dyO6Zq2", "category": "test3", "question": "How to test 2 2?", "created_at": "2021-11-01T14:09:06.239568Z" }, { "id": "pwWgdKAQaRvlVOEZgJk3yX67o5LZBm0N", "category": "test4", "question": "how are thou?", "created_at": "2021-11-03T13:58:47.841362Z" } ], "message": "Success" } ``` ### Get FAQ Details __Service__ api-cms __Request__ ```json GET /v1/faq/:id ``` __Response__ **200 OK** ```json {{ "result": { "answer": "string" }, "message": "Success" } ``` **400 Bad Request** ```json { "error": "f6268d6c-aea9-49b6-87b7-e6133f45834c", "message": "Bad Request", "detail": { "faq_id": "invalid" } } ``` ### Add FAQ __Service__ api-cms __Request__ ```json Content-Type: application/json POST /v1/faq { "category": "string", "question": "string", "answer": "string" } ``` __Response__ **201 Created** ```json { "message": "Successfully Inserted Data" } ``` **400 Bad Request** ```json { "error": "f6268d6c-aea9-49b6-87b7-e6133f45834c", "message": "Bad Request", "detail": { "faq": {"faq question cannot be empty|faq answer cannot be empty|faq question must be between 5 and 255 characters|faq answer must be between 5 and 255 characters"} } } ``` ### Update FAQ __Service__ api-cms __Request__ ```json Content-Type: application/json PATCH /v1/faq { "id": "string", "question": "string", "answer": "string" } ``` __Response__ **200 OK** ```json { "message": "Success" } ``` **400 Bad Request** ```json { "error": "f6268d6c-aea9-49b6-87b7-e6133f45834c", "message": "Bad Request", "detail": { "faq": {"faq question cannot be empty|faq answer cannot be empty|faq question must be between 5 and 255 characters|faq answer must be between 5 and 255 characters"} } } ``` ### Delete FAQ __Service__ api-cms __Request__ ```json Content-Type: application/json DELETE /v1/faq { "id": "string" } ``` __Response__ **200 Created** ```json { "message": "success" } ``` ### Get FAQ Categories __Service__ api-cms __Request__ ```json GET /v1/faq/category ``` __Response__ **200 OK** ```json {{ "result": [ { "id": "a5V7Wz49nlPgbKEqVJkMQLpm3dyO6Zq2", "name": "test1", "description": "this is description test 1", "created_at": "2021-10-29T10:48:15.344467Z" }, { "id": "D2zPbYq0pklgO78RPJQn96v5M4omGWrX", "name": "test2", "description": "this is description test 2", "created_at": "2021-10-29T11:00:58.749626Z" } ], "message": "Success" } ``` ### Add FAQ Category __Service__ api-cms __Request__ ```json Content-Type: application/json POST /v1/faq/category { "name": "string", "description": "string" } ``` __Response__ **201 Created** ```json { "message": "Successfully Inserted Data" } ``` **400 Bad Request** ```json { "error": "f6268d6c-aea9-49b6-87b7-e6133f45834c", "message": "Bad Request", "detail": { "faq_category": {"faq category cannot be empty|faq category name must be between 2 and 100 characters|faq category description must be below 1000 characters"} } } ``` **409 Resource Conflict** ```json { "error": "9ad3d892-c068-44ba-a70f-6fac81d96ea4", "message": "Resource Conflict", "detail": { "faq_category": "faq category already exist" } } ``` ### Update FAQ Category __Service__ api-cms __Request__ ```json Content-Type: application/json PATCH /v1/faq/category { "id": "string", "name": "string", "description": "string" } ``` __Response__ **200 OK** ```json { "message": "Success" } ``` **400 Bad Request** ```json { "error": "f6268d6c-aea9-49b6-87b7-e6133f45834c", "message": "Bad Request", "detail": { "faq_category": {"faq category cannot be empty|faq category name must be between 2 and 100 characters|faq category description must be below 1000 characters"} } } ``` **409 Resource Conflict** ```json { "error": "9ad3d892-c068-44ba-a70f-6fac81d96ea4", "message": "Resource Conflict", "detail": { "faq_category": "faq category already exist" } } ``` ### Delete FAQ Category __Service__ api-cms __Request__ ```json Content-Type: application/json DELETE /v1/faq/category { "faq_category_id": "string" } ``` __Response__ **200 Created** ```json { "message": "success" } ``` **400 Bad Request** ```json { "error": "f6268d6c-aea9-49b6-87b7-e6133f45834c", "message": "Bad Request", "detail": { "faq_category_id": "invalid" } } ```