{
  "info": {
    "name": "PawaBoost Partner Earn API",
    "description": "Version 1. Set the baseUrl and apiKey collection variables. Create your API key on the Partner API page in your PawaBoost profile (see docs/partner-api.md, Getting your API key).",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://www.pawaboost.com"
    },
    {
      "key": "apiKey",
      "value": ""
    },
    {
      "key": "taskId",
      "value": ""
    },
    {
      "key": "claimId",
      "value": ""
    },
    {
      "key": "submissionId",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Ping",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/earn/ping",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "earn",
            "ping"
          ]
        },
        "description": "Check that your key works."
      }
    },
    {
      "name": "List tasks",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/earn/tasks?limit=20",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "earn",
            "tasks"
          ],
          "query": [
            {
              "key": "limit",
              "value": "20"
            },
            {
              "key": "cursor",
              "value": "",
              "disabled": true
            }
          ]
        },
        "description": "Tasks with slots left. limit 1-50 (default 20)."
      }
    },
    {
      "name": "Claim a task",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"externalUserId\": \"w_9f3a1c2e\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/earn/tasks/{{taskId}}/claim",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "earn",
            "tasks",
            "{{taskId}}",
            "claim"
          ]
        },
        "description": "Claim one slot for one worker. The redirectUrl is shown only once."
      }
    },
    {
      "name": "Claim status",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/earn/claims/{{claimId}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "earn",
            "claims",
            "{{claimId}}"
          ]
        },
        "description": "Status of one of your claims."
      }
    },
    {
      "name": "Submit proof",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "screenshot",
              "type": "file",
              "src": [],
              "description": "JPEG, PNG or WebP, at most 2 MB",
              "disabled": false
            },
            {
              "key": "proofUsername",
              "value": "worker_handle",
              "type": "text",
              "disabled": true
            },
            {
              "key": "proofUrl",
              "value": "https://example.com/proof",
              "type": "text",
              "disabled": true
            },
            {
              "key": "selectedComment",
              "value": "",
              "type": "text",
              "disabled": true
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/earn/claims/{{claimId}}/submit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "earn",
            "claims",
            "{{claimId}}",
            "submit"
          ]
        },
        "description": "Multipart proof. Which fields are required depends on the task."
      }
    },
    {
      "name": "Submission status",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/earn/submissions/{{submissionId}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "earn",
            "submissions",
            "{{submissionId}}"
          ]
        },
        "description": "Status of one of your submissions."
      }
    },
    {
      "name": "List submissions",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/earn/submissions?limit=20",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "earn",
            "submissions"
          ],
          "query": [
            {
              "key": "status",
              "value": "PENDING",
              "disabled": true
            },
            {
              "key": "externalUserId",
              "value": "w_9f3a1c2e",
              "disabled": true
            },
            {
              "key": "limit",
              "value": "20"
            },
            {
              "key": "cursor",
              "value": "",
              "disabled": true
            }
          ]
        },
        "description": "Newest first. limit 1-50 (default 20)."
      }
    },
    {
      "name": "Balance",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/earn/balance",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "earn",
            "balance"
          ]
        },
        "description": "Wallet totals and your 20 most recent ledger entries."
      }
    }
  ]
}
