{
  "info": {
    "name": "JOFI v2 Career Navigation additions",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{api_key}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://www.jofiscore.com/api/v2"
    },
    {
      "key": "api_key",
      "value": ""
    },
    {
      "key": "profile_id",
      "value": "CNP_SAMPLE"
    },
    {
      "key": "family_number",
      "value": "123"
    },
    {
      "key": "onet_code",
      "value": "15-1252.00"
    },
    {
      "key": "exercises_revision",
      "value": ""
    },
    {
      "key": "plan_revision",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Read profile",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/career-navigation/profiles/{{profile_id}}"
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const body = pm.response.json();",
              "if (body.data && body.data.revisions) {",
              "  pm.collectionVariables.set(\"exercises_revision\", body.data.revisions.exercises);",
              "  pm.collectionVariables.set(\"plan_revision\", body.data.revisions.plan);",
              "}"
            ]
          }
        }
      ]
    },
    {
      "name": "Set location",
      "request": {
        "method": "PUT",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/career-navigation/profiles/{{profile_id}}/location",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"zipCode\": \"02110\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Update exercises",
      "request": {
        "method": "PATCH",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/career-navigation/profiles/{{profile_id}}/exercises",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"changes\": {\n    \"strengthsCareerInterests\": \"Investigative work\"\n  },\n  \"revision\": \"{{exercises_revision}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Replace plan",
      "request": {
        "method": "PUT",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/career-navigation/profiles/{{profile_id}}/plan",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"job1\": {\n    \"jobName\": \"\",\n    \"onetCode\": \"\",\n    \"onetOccupation\": \"\",\n    \"educationTraining\": \"\",\n    \"credentials\": \"\",\n    \"supportFromOthers\": \"\"\n  },\n  \"job2\": {\n    \"jobName\": \"\",\n    \"onetCode\": \"\",\n    \"onetOccupation\": \"\",\n    \"educationTraining\": \"\",\n    \"credentials\": \"\",\n    \"supportFromOthers\": \"\"\n  },\n  \"job3\": {\n    \"jobName\": \"\",\n    \"onetCode\": \"\",\n    \"onetOccupation\": \"\",\n    \"educationTraining\": \"\",\n    \"credentials\": \"\",\n    \"supportFromOthers\": \"\"\n  },\n  \"revision\": \"{{plan_revision}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Set comparisons",
      "request": {
        "method": "PUT",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/career-navigation/profiles/{{profile_id}}/compare",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"compare_onetsoc_code_1\": null,\n  \"compare_onetsoc_code_2\": null,\n  \"compare_onetsoc_code_3\": null\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Read favorites",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/career-navigation/profiles/{{profile_id}}/favorites/occupations"
      }
    },
    {
      "name": "Read favorite state",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/career-navigation/profiles/{{profile_id}}/favorites/occupations/{{onet_code}}"
      }
    },
    {
      "name": "Set favorite state",
      "request": {
        "method": "PUT",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/career-navigation/profiles/{{profile_id}}/favorites/occupations/{{onet_code}}",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"isFavorite\": true\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Read family scores",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/career-navigation/profiles/{{profile_id}}/job-families"
      }
    },
    {
      "name": "Read top families",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/career-navigation/profiles/{{profile_id}}/job-families/top"
      }
    },
    {
      "name": "Read family",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/career-navigation/job-families/{{family_number}}"
      }
    },
    {
      "name": "Compare interests",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/career-navigation/profiles/{{profile_id}}/occupations/{{onet_code}}?family_number={{family_number}}"
      }
    },
    {
      "name": "Create occupation certificate",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/career-navigation/profiles/{{profile_id}}/certifications/occupation",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"onetsoc_code\": \"{{onet_code}}\",\n  \"family_number\": \"{{family_number}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Get Job Fit Profile",
      "request": {
        "method": "GET",
        "url": "{{base_url}}/career-navigation/profiles/{{profile_id}}/job-fit-profile"
      }
    },
    {
      "name": "Get Job Fit Report",
      "request": {
        "method": "GET",
        "url": "{{base_url}}/career-navigation/profiles/{{profile_id}}/job-fit-report"
      }
    }
  ]
}
