{
  "info": {
    "_postman_id": "4f85f238-3b47-5282-99e8-c9dd26e78766",
    "name": "POS GROVE POS API — Projects",
    "description": "Projects (project.project) and tasks (project.alltask), limited to the ones you take part in. API keys need the `projects` scope.\n\n**Setup**\n1. Set the collection variable `baseUrl` to your POS GROVE address followed by `/api/v1`.\n2. Either paste an API key (Online store → API & Webhooks) into `accessToken`, or run **Get an access token** (in the *Sign in* or *Authentication* folder): it signs in with a username and password and saves the token for you (valid 12 hours).\n3. Send any request. A test checks the `{ success }` envelope on every answer.\n\nAll responses use `{ success, message, data, meta }`; errors use `{ success: false, message, error: { code, details, requestId } }`. Lists accept `page`, `limit`, `sort` and `fields`.\n\nReference: https://posgrove.com/docs/pos-api",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{accessToken}}",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          "// POS GROVE APIs answer { success, message, data } (or { success: false, error, message }).",
          "pm.test(\"Response is JSON\", function () { pm.response.to.be.json; });",
          "pm.test(\"Envelope has a success flag\", function () {",
          "  var b = pm.response.json();",
          "  pm.expect(b).to.have.property(\"success\");",
          "  if (pm.response.code < 400) pm.expect(b.success).to.eql(true);",
          "});"
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://your-store.example.com/api/v1",
      "type": "string",
      "description": "Your POS GROVE address followed by /api/v1, e.g. https://shop.example.com/api/v1"
    },
    {
      "key": "accessToken",
      "value": "",
      "type": "string",
      "description": "An API key, or the token saved by the Get an access token request."
    }
  ],
  "item": [
    {
      "name": "Sign in",
      "description": "Run once: saves {{accessToken}} for the other requests (or paste an API key instead).",
      "item": [
        {
          "name": "Get an access token",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/auth/token",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "auth",
                "token"
              ]
            },
            "description": "Signs in with a username and password (and the 6-digit code when two-factor sign-in is on) and returns a bearer token valid for 12 hours. The token is shown only once. Five wrong passwords in a row disable the account, as on the sign-in page.\n\nNo authentication needed.\n\n`POST /auth/token` · operationId `auth.token`",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"username\": \"jane\",\n  \"password\": \"••••••••\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "auth": {
              "type": "noauth"
            }
          },
          "response": [
            {
              "name": "201 Success",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/auth/token",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "auth",
                    "token"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"username\": \"jane\",\n  \"password\": \"••••••••\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Success",
              "code": 201,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": {\n    \"token\": \"mtk_<token shown once>\",\n    \"tokenType\": \"Bearer\",\n    \"expiresAt\": \"2026-10-02T21:30:00.000Z\",\n    \"expiresIn\": 43200,\n    \"user\": {\n      \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n      \"username\": \"jane\",\n      \"name\": \"Jane Doe\"\n    }\n  }\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "var body = {};",
                  "try { body = pm.response.json(); } catch (e) {}",
                  "if (body && body.data && body.data.token) {",
                  "  pm.collectionVariables.set(\"accessToken\", body.data.token);",
                  "  if (pm.environment && pm.environment.has(\"accessToken\")) pm.environment.set(\"accessToken\", body.data.token);",
                  "  console.log(\"POS GROVE: access token saved to {{accessToken}} (valid until \" + body.data.expiresAt + \")\");",
                  "}",
                  "pm.test(\"Access token received\", function () { pm.expect(body.data && body.data.token).to.be.a(\"string\"); });"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "List your projects",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/projects",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "projects"
          ],
          "query": [
            {
              "key": "page",
              "value": "1",
              "description": "Page number (starts at 1).",
              "disabled": true
            },
            {
              "key": "limit",
              "value": "25",
              "description": "Items per page (max 100).",
              "disabled": true
            },
            {
              "key": "sort",
              "value": "",
              "description": "Comma-separated fields; prefix with - for descending. Example: -createdAt,name",
              "disabled": true
            },
            {
              "key": "fields",
              "value": "",
              "description": "Comma-separated fields to return. Example: id,name,status",
              "disabled": true
            },
            {
              "key": "q",
              "value": "",
              "description": "Search text.",
              "disabled": true
            },
            {
              "key": "status",
              "value": "",
              "description": "One of: new, started, ongoing, in_review, completed.",
              "disabled": true
            }
          ]
        },
        "description": "Permission: `project.project`.\n\nScope: `projects:read`.\n\n`GET /projects` · operationId `projects.list`"
      },
      "response": [
        {
          "name": "200 Success",
          "originalRequest": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/projects",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "projects"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "description": "Page number (starts at 1).",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "25",
                  "description": "Items per page (max 100).",
                  "disabled": true
                },
                {
                  "key": "sort",
                  "value": "",
                  "description": "Comma-separated fields; prefix with - for descending. Example: -createdAt,name",
                  "disabled": true
                },
                {
                  "key": "fields",
                  "value": "",
                  "description": "Comma-separated fields to return. Example: id,name,status",
                  "disabled": true
                },
                {
                  "key": "q",
                  "value": "",
                  "description": "Search text.",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "description": "One of: new, started, ongoing, in_review, completed.",
                  "disabled": true
                }
              ]
            }
          },
          "status": "Success",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": [\n    {\n      \"id\": \"66f1c2a9e4b0a1b2c3d4e515\",\n      \"title\": \"Open the Ikeja branch\",\n      \"status\": \"ongoing\",\n      \"startsAt\": \"2026-09-01T00:00:00.000Z\",\n      \"endsAt\": \"2026-12-01T00:00:00.000Z\",\n      \"owner\": {\n        \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n        \"name\": \"Jane Doe\"\n      },\n      \"members\": [\n        {\n          \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n          \"name\": \"Jane Doe\",\n          \"email\": \"jane@example.com\"\n        }\n      ],\n      \"tasks\": {\n        \"total\": 12,\n        \"completed\": 5\n      },\n      \"createdAt\": \"2026-10-01T09:30:00.000Z\",\n      \"updatedAt\": \"2026-10-02T14:05:00.000Z\"\n    }\n  ]\n}"
        }
      ]
    },
    {
      "name": "Get a project",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/projects/:id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "projects",
            ":id"
          ],
          "variable": [
            {
              "key": "id",
              "value": "",
              "description": "Pattern: ^[a-f0-9]{24}$"
            }
          ]
        },
        "description": "Permission: `project.project`.\n\nScope: `projects:read`.\n\n`GET /projects/{id}` · operationId `projects.get`"
      },
      "response": [
        {
          "name": "200 Success",
          "originalRequest": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/projects/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "projects",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Pattern: ^[a-f0-9]{24}$"
                }
              ]
            }
          },
          "status": "Success",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": {\n    \"id\": \"66f1c2a9e4b0a1b2c3d4e515\",\n    \"title\": \"Open the Ikeja branch\",\n    \"status\": \"ongoing\",\n    \"startsAt\": \"2026-09-01T00:00:00.000Z\",\n    \"endsAt\": \"2026-12-01T00:00:00.000Z\",\n    \"owner\": {\n      \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n      \"name\": \"Jane Doe\"\n    },\n    \"members\": [\n      {\n        \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n        \"name\": \"Jane Doe\",\n        \"email\": \"jane@example.com\"\n      }\n    ],\n    \"tasks\": {\n      \"total\": 12,\n      \"completed\": 5,\n      \"byStatus\": {\n        \"new\": 2,\n        \"started\": 1,\n        \"ongoing\": 3,\n        \"in_review\": 1,\n        \"completed\": 5\n      }\n    },\n    \"createdAt\": \"2026-10-01T09:30:00.000Z\",\n    \"updatedAt\": \"2026-10-02T14:05:00.000Z\"\n  }\n}"
        }
      ]
    },
    {
      "name": "List a project's tasks",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/projects/:id/tasks",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "projects",
            ":id",
            "tasks"
          ],
          "query": [
            {
              "key": "page",
              "value": "1",
              "description": "Page number (starts at 1).",
              "disabled": true
            },
            {
              "key": "limit",
              "value": "25",
              "description": "Items per page (max 100).",
              "disabled": true
            },
            {
              "key": "sort",
              "value": "",
              "description": "Comma-separated fields; prefix with - for descending. Example: -createdAt,name",
              "disabled": true
            },
            {
              "key": "fields",
              "value": "",
              "description": "Comma-separated fields to return. Example: id,name,status",
              "disabled": true
            },
            {
              "key": "q",
              "value": "",
              "description": "Search text.",
              "disabled": true
            },
            {
              "key": "status",
              "value": "",
              "description": "One of: new, started, ongoing, in_review, completed.",
              "disabled": true
            }
          ],
          "variable": [
            {
              "key": "id",
              "value": "",
              "description": "Pattern: ^[a-f0-9]{24}$"
            }
          ]
        },
        "description": "Permission: `project.project` or `project.alltask`.\n\nScope: `projects:read`.\n\n`GET /projects/{id}/tasks` · operationId `projects.tasks`"
      },
      "response": [
        {
          "name": "200 Success",
          "originalRequest": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/projects/:id/tasks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "projects",
                ":id",
                "tasks"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "description": "Page number (starts at 1).",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "25",
                  "description": "Items per page (max 100).",
                  "disabled": true
                },
                {
                  "key": "sort",
                  "value": "",
                  "description": "Comma-separated fields; prefix with - for descending. Example: -createdAt,name",
                  "disabled": true
                },
                {
                  "key": "fields",
                  "value": "",
                  "description": "Comma-separated fields to return. Example: id,name,status",
                  "disabled": true
                },
                {
                  "key": "q",
                  "value": "",
                  "description": "Search text.",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "description": "One of: new, started, ongoing, in_review, completed.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Pattern: ^[a-f0-9]{24}$"
                }
              ]
            }
          },
          "status": "Success",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": [\n    {\n      \"id\": \"66f1c2a9e4b0a1b2c3d4e516\",\n      \"projectId\": \"66f1c2a9e4b0a1b2c3d4e515\",\n      \"title\": \"Order shelving\",\n      \"type\": \"task\",\n      \"status\": \"started\",\n      \"startDate\": \"2026-10-01T00:00:00.000Z\",\n      \"endDate\": \"2026-10-10T00:00:00.000Z\",\n      \"budget\": 450000,\n      \"owner\": {\n        \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n        \"name\": \"Jane Doe\"\n      },\n      \"assignedTo\": [\n        {\n          \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n          \"name\": \"Jane Doe\",\n          \"email\": \"jane@example.com\"\n        }\n      ],\n      \"members\": [\n        {\n          \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n          \"name\": \"Jane Doe\",\n          \"email\": \"jane@example.com\"\n        }\n      ],\n      \"workflow\": \"Purchase approval\",\n      \"createdAt\": \"2026-10-01T09:30:00.000Z\",\n      \"updatedAt\": \"2026-10-02T14:05:00.000Z\"\n    }\n  ]\n}"
        }
      ]
    },
    {
      "name": "List your tasks",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/tasks",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "tasks"
          ],
          "query": [
            {
              "key": "page",
              "value": "1",
              "description": "Page number (starts at 1).",
              "disabled": true
            },
            {
              "key": "limit",
              "value": "25",
              "description": "Items per page (max 100).",
              "disabled": true
            },
            {
              "key": "sort",
              "value": "",
              "description": "Comma-separated fields; prefix with - for descending. Example: -createdAt,name",
              "disabled": true
            },
            {
              "key": "fields",
              "value": "",
              "description": "Comma-separated fields to return. Example: id,name,status",
              "disabled": true
            },
            {
              "key": "q",
              "value": "",
              "description": "Search text.",
              "disabled": true
            },
            {
              "key": "from",
              "value": "",
              "description": "Only items on or after this date (YYYY-MM-DD).",
              "disabled": true
            },
            {
              "key": "to",
              "value": "",
              "description": "Only items on or before this date (YYYY-MM-DD, whole day included).",
              "disabled": true
            },
            {
              "key": "status",
              "value": "",
              "description": "One of: new, started, ongoing, in_review, completed.",
              "disabled": true
            },
            {
              "key": "projectId",
              "value": "",
              "description": "",
              "disabled": true
            }
          ]
        },
        "description": "Permission: `project.alltask`.\n\nScope: `projects:read`.\n\n`GET /tasks` · operationId `tasks.list`"
      },
      "response": [
        {
          "name": "200 Success",
          "originalRequest": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/tasks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tasks"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "description": "Page number (starts at 1).",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "25",
                  "description": "Items per page (max 100).",
                  "disabled": true
                },
                {
                  "key": "sort",
                  "value": "",
                  "description": "Comma-separated fields; prefix with - for descending. Example: -createdAt,name",
                  "disabled": true
                },
                {
                  "key": "fields",
                  "value": "",
                  "description": "Comma-separated fields to return. Example: id,name,status",
                  "disabled": true
                },
                {
                  "key": "q",
                  "value": "",
                  "description": "Search text.",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "",
                  "description": "Only items on or after this date (YYYY-MM-DD).",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "description": "Only items on or before this date (YYYY-MM-DD, whole day included).",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "description": "One of: new, started, ongoing, in_review, completed.",
                  "disabled": true
                },
                {
                  "key": "projectId",
                  "value": "",
                  "description": "",
                  "disabled": true
                }
              ]
            }
          },
          "status": "Success",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": [\n    {\n      \"id\": \"66f1c2a9e4b0a1b2c3d4e516\",\n      \"projectId\": \"66f1c2a9e4b0a1b2c3d4e515\",\n      \"title\": \"Order shelving\",\n      \"type\": \"task\",\n      \"status\": \"started\",\n      \"startDate\": \"2026-10-01T00:00:00.000Z\",\n      \"endDate\": \"2026-10-10T00:00:00.000Z\",\n      \"budget\": 450000,\n      \"owner\": {\n        \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n        \"name\": \"Jane Doe\"\n      },\n      \"assignedTo\": [\n        {\n          \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n          \"name\": \"Jane Doe\",\n          \"email\": \"jane@example.com\"\n        }\n      ],\n      \"members\": [\n        {\n          \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n          \"name\": \"Jane Doe\",\n          \"email\": \"jane@example.com\"\n        }\n      ],\n      \"workflow\": \"Purchase approval\",\n      \"createdAt\": \"2026-10-01T09:30:00.000Z\",\n      \"updatedAt\": \"2026-10-02T14:05:00.000Z\"\n    }\n  ]\n}"
        }
      ]
    },
    {
      "name": "Get a task",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/tasks/:id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "tasks",
            ":id"
          ],
          "variable": [
            {
              "key": "id",
              "value": "",
              "description": "Pattern: ^[a-f0-9]{24}$"
            }
          ]
        },
        "description": "Permission: `project.alltask` or `project.project`.\n\nScope: `projects:read`.\n\n`GET /tasks/{id}` · operationId `tasks.get`"
      },
      "response": [
        {
          "name": "200 Success",
          "originalRequest": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/tasks/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tasks",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Pattern: ^[a-f0-9]{24}$"
                }
              ]
            }
          },
          "status": "Success",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"success\": true,\n  \"message\": \"OK\",\n  \"data\": {\n    \"id\": \"66f1c2a9e4b0a1b2c3d4e516\",\n    \"projectId\": \"66f1c2a9e4b0a1b2c3d4e515\",\n    \"title\": \"Order shelving\",\n    \"type\": \"task\",\n    \"status\": \"started\",\n    \"startDate\": \"2026-10-01T00:00:00.000Z\",\n    \"endDate\": \"2026-10-10T00:00:00.000Z\",\n    \"budget\": 450000,\n    \"owner\": {\n      \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n      \"name\": \"Jane Doe\"\n    },\n    \"assignedTo\": [\n      {\n        \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n        \"name\": \"Jane Doe\",\n        \"email\": \"jane@example.com\"\n      }\n    ],\n    \"members\": [\n      {\n        \"id\": \"66f1c2a9e4b0a1b2c3d4e502\",\n        \"name\": \"Jane Doe\",\n        \"email\": \"jane@example.com\"\n      }\n    ],\n    \"workflow\": \"Purchase approval\",\n    \"createdAt\": \"2026-10-01T09:30:00.000Z\",\n    \"updatedAt\": \"2026-10-02T14:05:00.000Z\",\n    \"description\": \"Get three quotes and order shelving for the new branch.\",\n    \"approvals\": [\n      {\n        \"title\": \"Manager approval\",\n        \"approved\": true,\n        \"by\": \"Jane Doe\",\n        \"at\": \"2026-10-02T14:05:00.000Z\"\n      }\n    ]\n  }\n}"
        }
      ]
    }
  ]
}