{
  "info": {
    "name": "Conexchat API",
    "description": "API WhatsApp Saas, Store, and AI Agents",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Authentication",
      "item": [
        {
          "name": "Login (Get Token)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"user@example.com\",\n  \"password\": \"password123\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "WhatsApp",
      "item": [
        {
          "name": "Send",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/messages/send",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "messages",
                "send"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sessionId\": \"my-session\",\n  \"to\": \"628123456789\",\n  \"message\": \"Halo!\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Send media",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/messages/send-media",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "messages",
                "send-media"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sessionId\": \"s1\",\n  \"to\": \"628xx\",\n  \"base64\": \"iVBOR...\",\n  \"mimetype\": \"image/jpeg\",\n  \"caption\": \"Promo!\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Bulk",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/messages/bulk",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "messages",
                "bulk"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sessionId\": \"s1\",\n  \"recipients\": [\n    \"628111\",\n    \"628222\"\n  ],\n  \"message\": \"Promo!\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Numbers",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/numbers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "numbers"
              ],
              "query": []
            }
          },
          "response": []
        },
        {
          "name": "Qr",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/numbers/:sessionId/qr",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "numbers",
                ":sessionId",
                "qr"
              ],
              "query": []
            }
          },
          "response": []
        },
        {
          "name": "Products",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/storefront/:slug/products",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "storefront",
                ":slug",
                "products"
              ],
              "query": []
            }
          },
          "response": []
        },
        {
          "name": ":productSlug",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/storefront/:slug/products/:productSlug",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "storefront",
                ":slug",
                "products",
                ":productSlug"
              ],
              "query": []
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Store",
      "item": [
        {
          "name": "Orders",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/store/orders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "store",
                "orders"
              ],
              "query": []
            }
          },
          "response": []
        },
        {
          "name": "Status",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/store/orders/:id/status",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "store",
                "orders",
                ":id",
                "status"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"status\": \"shipped\",\n  \"trackingNumber\": \"JNE123456789\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Customers",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/store/customers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "store",
                "customers"
              ],
              "query": []
            }
          },
          "response": []
        },
        {
          "name": "Stock",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/store/products/:id/stock",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "store",
                "products",
                ":id",
                "stock"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"stock\": 50\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Webhook config",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/store/webhook-config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "store",
                "webhook-config"
              ],
              "query": []
            }
          },
          "response": []
        },
        {
          "name": "Webhook config",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/store/webhook-config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "store",
                "webhook-config"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"webhookUrl\": \"https://n8n.myserver.com/webhook/store\",\n  \"webhookSecret\": \"my-secret-123\",\n  \"webhookEvents\": [\n    \"order.created\",\n    \"payment.success\",\n    \"stock.out\",\n    \"review.submitted\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Webhook logs",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/store/webhook-logs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "store",
                "webhook-logs"
              ],
              "query": []
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "AI Agent",
      "item": [
        {
          "name": "Product description",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/store/ai/product-description",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "store",
                "ai",
                "product-description"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"productName\": \"Sepatu Lari Nyaman Pro\",\n  \"category\": \"Olahraga\",\n  \"keywords\": \"ringan, anti selip, breathable\",\n  \"tone\": \"casual\",\n  \"language\": \"id\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Product translation",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/store/ai/product-translation",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "store",
                "ai",
                "product-translation"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"text\": \"Sepatu lari ringan anti selip cocok untuk semua medan.\",\n  \"targetLanguage\": \"en\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Seo keywords",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/store/ai/seo-keywords",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "store",
                "ai",
                "seo-keywords"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"productName\": \"Sepatu Lari Nyaman Pro\",\n  \"category\": \"Olahraga\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Product recommendation",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/store/ai/product-recommendation",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "store",
                "ai",
                "product-recommendation"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customerPhone\": \"628123456789\",\n  \"limit\": 5\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Customer summary",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/store/ai/customer-summary",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "store",
                "ai",
                "customer-summary"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customerPhone\": \"628123456789\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Followup message",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/store/ai/followup-message",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "store",
                "ai",
                "followup-message"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customerName\": \"Budi\",\n  \"type\": \"abandoned_cart\",\n  \"context\": \"Meninggalkan sepatu lari seharga Rp210.000\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Upsell recommendation",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/store/ai/upsell-recommendation",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "store",
                "ai",
                "upsell-recommendation"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"productId\": \"abc123\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Review reply",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/store/ai/review-reply",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "store",
                "ai",
                "review-reply"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reviewText\": \"Sepatunya bagus tapi pengirimannya lama banget, hampir 2 minggu baru sampai.\",\n  \"rating\": 3,\n  \"customerName\": \"Budi\",\n  \"productName\": \"Sepatu Lari Nyaman Pro\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.conexchat.com",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "wc_live_xxxxxxxx",
      "type": "string"
    }
  ]
}