-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWeGenius_Apply_Suggestion_By_WP_ID.postman_collection.json
More file actions
73 lines (73 loc) · 3.41 KB
/
WeGenius_Apply_Suggestion_By_WP_ID.postman_collection.json
File metadata and controls
73 lines (73 loc) · 3.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
"info": {
"_postman_id": "wegenius-apply-suggestion-wp-id",
"name": "WeGenius Apply Suggestion by WP ID",
"description": "API endpoint for applying suggestions using WordPress post ID\n\n## Important Notes:\n- **API Key Header**: Use `X-API-Key` (case-sensitive)\n- **Get API Key**: Visit https://wegenius.fahmidsroadmap.com/wordpress-sites\n- **wp_post_id**: Use the WordPress post ID (from wp_posts table in WordPress)\n- **suggestion_id**: Use the suggestion ID from WeGenius system\n\n## Setup:\n1. Set the `api_key` variable with your actual API key\n2. Set `wp_post_id` to your WordPress post ID\n3. Set `suggestion_id` to the suggestion you want to apply",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"auth": {
"type": "apikey",
"apikey": [
{
"key": "value",
"value": "{{api_key}}",
"type": "string"
},
{
"key": "key",
"value": "X-API-Key",
"type": "string"
}
]
},
"variable": [
{
"key": "base_url",
"value": "https://wegenius.fahmidsroadmap.com/api/ai",
"type": "string"
},
{
"key": "api_key",
"value": "your-api-key-here",
"type": "string",
"description": "Get your API key from https://wegenius.fahmidsroadmap.com/wordpress-sites"
},
{
"key": "wp_post_id",
"value": "999",
"type": "string",
"description": "WordPress post ID (wp_post_id from WordPress database)"
},
{
"key": "suggestion_id",
"value": "1",
"type": "string",
"description": "Suggestion ID from WeGenius system"
}
],
"item": [
{
"name": "Apply Suggestion by WordPress Post ID",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"suggestion_id\": {{suggestion_id}}\n}"
},
"url": {
"raw": "{{base_url}}/posts/{{wp_post_id}}/apply-suggestion-by-wp-id",
"host": ["{{base_url}}"],
"path": ["posts", "{{wp_post_id}}", "apply-suggestion-by-wp-id"]
},
"description": "Apply a suggestion to a WordPress post using the WordPress post ID (wp_post_id).\n\n**Request Body:**\n```json\n{\n \"suggestion_id\": 1\n}\n```\n\n**Success Response (200):**\n```json\n{\n \"success\": true,\n \"message\": \"Suggestion applied successfully\",\n \"data\": {\n \"version\": {\n \"id\": 1,\n \"version_number\": 2,\n \"source\": \"ai_suggestion\",\n \"created_at\": \"2025-10-11T10:30:00.000000Z\"\n },\n \"post\": {\n \"id\": 123,\n \"wp_post_id\": 999,\n \"title\": \"Post Title\"\n },\n \"updated_content_preview\": \"Preview of updated content...\"\n }\n}\n```\n\n**Error Response (404):**\n```json\n{\n \"success\": false,\n \"message\": \"Post not found\"\n}\n```"
},
"response": []
}
]
}