{
  "info": {
    "_postman_id": "a1b2c3d4-e5f6-7890-onepager-new-001",
    "name": "One Pager New API",
    "description": "PDF-based One Pager module (OnePagerNewController).\n\nVariables:\n- `BASE_URL` e.g. http://127.0.0.1:8000\n- `JWT_TOKEN` back-office JWT\n- `ARTICLE_ID` created article id",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "BASE_URL",
      "value": "http://127.0.0.1:8000"
    },
    {
      "key": "JWT_TOKEN",
      "value": ""
    },
    {
      "key": "ARTICLE_ID",
      "value": "1"
    }
  ],
  "item": [
    {
      "name": "Helpers",
      "item": [
        {
          "name": "All security codes (instrument dropdown)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{BASE_URL}}/api/mkt-security-code/all-security-codes",
              "host": ["{{BASE_URL}}"],
              "path": ["api", "mkt-security-code", "all-security-codes"]
            },
            "description": "Returns id, security_code, company_name for dropdown. Use selected security_code + company_name on store/update."
          },
          "response": []
        }
      ]
    },
    {
      "name": "One Pager New",
      "item": [
        {
          "name": "List one-pager articles",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{JWT_TOKEN}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{BASE_URL}}/api/one-pager-new?per_page=10",
              "host": ["{{BASE_URL}}"],
              "path": ["api", "one-pager-new"],
              "query": [
                {
                  "key": "per_page",
                  "value": "10"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Show one-pager article by id",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{JWT_TOKEN}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{BASE_URL}}/api/one-pager-new/{{ARTICLE_ID}}",
              "host": ["{{BASE_URL}}"],
              "path": ["api", "one-pager-new", "{{ARTICLE_ID}}"]
            }
          },
          "response": []
        },
        {
          "name": "Create one-pager article",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{JWT_TOKEN}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "reporting_date",
                  "value": "2026-08-17",
                  "type": "text"
                },
                {
                  "key": "security_code",
                  "value": "SQURPHARMA",
                  "type": "text"
                },
                {
                  "key": "company_name",
                  "value": "Square Pharmaceuticals PLC",
                  "type": "text"
                },
                {
                  "key": "sector",
                  "value": "Pharmaceuticals",
                  "type": "text"
                },
                {
                  "key": "color",
                  "value": "#1A73E8",
                  "type": "text"
                },
                {
                  "key": "slug",
                  "value": "",
                  "type": "text"
                },
                {
                  "key": "article_title",
                  "value": "Q2 One Pager",
                  "type": "text"
                },
                {
                  "key": "article_title_bn",
                  "value": "",
                  "type": "text"
                },
                {
                  "key": "article_type",
                  "value": "blue",
                  "type": "text"
                },
                {
                  "key": "article_type_bn",
                  "value": "",
                  "type": "text"
                },
                {
                  "key": "pdf_file",
                  "type": "file",
                  "src": [],
                  "description": "English PDF (required with article_title)"
                },
                {
                  "key": "pdf_file_bn",
                  "type": "file",
                  "src": [],
                  "description": "Bangla PDF (required with article_title_bn)"
                }
              ]
            },
            "url": {
              "raw": "{{BASE_URL}}/api/one-pager-new/store",
              "host": ["{{BASE_URL}}"],
              "path": ["api", "one-pager-new", "store"]
            },
            "description": "At least one EN/BN title + matching PDF required. security_code must exist in mkt_security_code."
          },
          "response": []
        },
        {
          "name": "Update one-pager article",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{JWT_TOKEN}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "reporting_date",
                  "value": "2026-08-17",
                  "type": "text"
                },
                {
                  "key": "security_code",
                  "value": "SQURPHARMA",
                  "type": "text"
                },
                {
                  "key": "company_name",
                  "value": "Square Pharmaceuticals PLC",
                  "type": "text"
                },
                {
                  "key": "sector",
                  "value": "Pharmaceuticals",
                  "type": "text"
                },
                {
                  "key": "color",
                  "value": "#0B57D0",
                  "type": "text"
                },
                {
                  "key": "slug",
                  "value": "",
                  "type": "text"
                },
                {
                  "key": "article_title",
                  "value": "Q2 One Pager Updated",
                  "type": "text"
                },
                {
                  "key": "article_title_bn",
                  "value": "",
                  "type": "text"
                },
                {
                  "key": "article_type",
                  "value": "blue",
                  "type": "text"
                },
                {
                  "key": "article_type_bn",
                  "value": "",
                  "type": "text"
                },
                {
                  "key": "pdf_file",
                  "type": "file",
                  "src": [],
                  "description": "Optional if EN PDF already exists"
                },
                {
                  "key": "pdf_file_bn",
                  "type": "file",
                  "src": [],
                  "description": "Optional if BN PDF already exists"
                }
              ]
            },
            "url": {
              "raw": "{{BASE_URL}}/api/one-pager-new/update/{{ARTICLE_ID}}",
              "host": ["{{BASE_URL}}"],
              "path": ["api", "one-pager-new", "update", "{{ARTICLE_ID}}"]
            }
          },
          "response": []
        },
        {
          "name": "Download PDF (EN)",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{JWT_TOKEN}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{BASE_URL}}/api/one-pager-new/download/{{ARTICLE_ID}}/en",
              "host": ["{{BASE_URL}}"],
              "path": ["api", "one-pager-new", "download", "{{ARTICLE_ID}}", "en"]
            }
          },
          "response": []
        },
        {
          "name": "Download PDF (BN)",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{JWT_TOKEN}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{BASE_URL}}/api/one-pager-new/download/{{ARTICLE_ID}}/bn",
              "host": ["{{BASE_URL}}"],
              "path": ["api", "one-pager-new", "download", "{{ARTICLE_ID}}", "bn"]
            }
          },
          "response": []
        },
        {
          "name": "View PDF inline (EN)",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{JWT_TOKEN}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{BASE_URL}}/api/one-pager-new/view/{{ARTICLE_ID}}/en",
              "host": ["{{BASE_URL}}"],
              "path": ["api", "one-pager-new", "view", "{{ARTICLE_ID}}", "en"]
            }
          },
          "response": []
        },
        {
          "name": "View PDF inline (BN)",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{JWT_TOKEN}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{BASE_URL}}/api/one-pager-new/view/{{ARTICLE_ID}}/bn",
              "host": ["{{BASE_URL}}"],
              "path": ["api", "one-pager-new", "view", "{{ARTICLE_ID}}", "bn"]
            }
          },
          "response": []
        },
        {
          "name": "Delete one-pager article",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{JWT_TOKEN}}",
                  "type": "string"
                }
              ]
            },
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{BASE_URL}}/api/one-pager-new/delete/{{ARTICLE_ID}}",
              "host": ["{{BASE_URL}}"],
              "path": ["api", "one-pager-new", "delete", "{{ARTICLE_ID}}"]
            }
          },
          "response": []
        }
      ]
    }
  ]
}
