# Available and UpComing Jobs

## Get Campaigns

<mark style="color:blue;">`GET`</mark> `https://ondemandstaffing.app/api/v1/shifts/view_all_jobs/`

This endpoint allows you to get all the shifts for the current job seeker.&#x20;

#### Query Parameters

| Name   | Type   | Description                                                                                            |
| ------ | ------ | ------------------------------------------------------------------------------------------------------ |
| tenant | string | Each app will have a unique tenant key. Every request most include the tenant key in the query params. |

#### Headers

| Name           | Type   | Description                                     |
| -------------- | ------ | ----------------------------------------------- |
| Authentication | string | Authentication token of the current job seeker. |

{% tabs %}
{% tab title="200 Campaigns successfully retrieved. Each Campaign has multiple shifts. Campaign has details like: Job type, description and pay rate for staff. Each shift will have a start time ('start') and end time ('end'), Address (All shifts within aa campaign will always have same address) hence can be extrapolated and shown just once per campaign.
Shift id are important and must be sent in any post request for that shift." %}

```
{
    "status": 200,
    "data": {
        "opertaion_status": "success",
        "campaigns": {
            "819": {
                "id": 819,
                "company_id": 690,
                "skill_id": 7,
                "notes": "adsfadsfdsaf",
                "gender": null,
                "coherence": null,
                "created_at": "2019-10-22T00:27:32.858Z",
                "updated_at": "2019-10-22T00:27:32.920Z",
                "is_required_video": null,
                "charge_rate": "32.0",
                "charge_rate_effective_date": "2019-10-22T00:27:32.919Z",
                "pay_rate": "20.0",
                "pay_rate_effective_date": null,
                "admins": null,
                "staff_scoring": null,
                "title": null,
                "radius": null,
                "client_name": null,
                "address_display": null,
                "timesheets": null,
                "job_type": "Brand Ambassador",
                "banner_image": "https://www.filepicker.io/api/file/bCsE9lZRBW4rRiouYQku",
                "shifts": [{
                    "id": 2115,
                    "campaign_id": 819,
                    "position": 2,
                    "address": "447 Broadway, New York, NY, USA",
                    "latitude": 40.7206058,
                    "longitude": -74.0014893,
                    "status": "live",
                    "start": "2019-12-20T05:45:00.000Z",
                    "end": "2019-12-20T07:15:00.000Z",
                    "created_at": "2019-11-26T18:41:35.917Z",
                    "updated_at": "2019-11-26T18:54:50.960Z",
                    "open": 2,
                    "access": "5.0",
                    "access_time": null,
                    "due": null,
                    "payable": null,
                    "paid": null,
                    "income_id": null,
                    "country_id": 6,
                    "city_id": 4968,
                    "price": "32.0",
                    "pricing_id": 29,
                    "net_payable": null,
                    "contact_name": "Alejandro",
                    "contact_number": "",
                    "contact_email": "alphanew@example.com",
                    "post_instruction": "adfdf",
                    "notification_cat": "all_nearby",
                    "panic_notification_cat": "all_above_6",
                    "timezo": null,
                    "notifiable_staff": null,
                    "notified_staff": null,
                    "next_notif": null,
                    "notif_command": null,
                    "required_applications": null
                }, {
                    "id": 2116,
                    "campaign_id": 819,
                    "position": 2,
                    "address": "447 Broadway, New York, NY, USA",
                    "latitude": 40.7206058,
                    "longitude": -74.0014893,
                    "status": "live",
                    "start": "2019-12-24T05:45:00.000Z",
                    "end": "2019-12-24T07:15:00.000Z",
                    "created_at": "2019-11-26T18:41:35.927Z",
                    "updated_at": "2019-11-26T18:54:50.968Z",
                    "open": 2,
                    "access": "5.0",
                    "access_time": null,
                    "due": null,
                    "payable": null,
                    "paid": null,
                    "income_id": null,
                    "country_id": 6,
                    "city_id": 4968,
                    "price": "32.0",
                    "pricing_id": 29,
                    "net_payable": null,
                    "contact_name": "Alejandro",
                    "contact_number": "",
                    "contact_email": "alphanew@example.com",
                    "post_instruction": "adfdf",
                    "notification_cat": "all_nearby",
                    "panic_notification_cat": "all_above_6",
                    "timezo": null,
                    "notifiable_staff": null,
                    "notified_staff": null,
                    "next_notif": null,
                    "notif_command": null,
                    "required_applications": null
                }]
            },
            "821": {
                "id": 821,
                "company_id": 690,
                "skill_id": 20,
                "notes": "adsfadsfdsaf",
                "gender": null,
                "coherence": null,
                "created_at": "2019-12-11T21:01:17.943Z",
                "updated_at": "2019-12-11T21:01:18.079Z",
                "is_required_video": null,
                "charge_rate": "20.0",
                "charge_rate_effective_date": "2019-12-11T21:01:18.078Z",
                "pay_rate": "15.0",
                "pay_rate_effective_date": null,
                "admins": null,
                "staff_scoring": null,
                "title": null,
                "radius": null,
                "client_name": null,
                "address_display": null,
                "timesheets": null,
                "job_type": "Admin Assistant",
                "banner_image": "https://www.filepicker.io/api/file/bCsE9lZRBW4rRiouYQku",
                "shifts": [{
                    "id": 2126,
                    "campaign_id": 821,
                    "position": 2,
                    "address": "447 Broadway, New York, NY, USA",
                    "latitude": 40.7206058,
                    "longitude": -74.0014893,
                    "status": "live",
                    "start": "2019-12-19T05:15:00.000Z",
                    "end": "2019-12-19T05:20:00.000Z",
                    "created_at": "2019-12-11T21:01:18.044Z",
                    "updated_at": "2019-12-12T20:10:10.818Z",
                    "open": 2,
                    "access": "5.0",
                    "access_time": null,
                    "due": null,
                    "payable": null,
                    "paid": null,
                    "income_id": null,
                    "country_id": 6,
                    "city_id": 4968,
                    "price": "20.0",
                    "pricing_id": 49,
                    "net_payable": null,
                    "contact_name": "Alejandro",
                    "contact_number": "",
                    "contact_email": "alphanew@example.com",
                    "post_instruction": "",
                    "notification_cat": "all_nearby",
                    "panic_notification_cat": "all_above_6",
                    "timezo": null,
                    "notifiable_staff": null,
                    "notified_staff": null,
                    "next_notif": "2019-12-11T21:01:18.041Z",
                    "notif_command": "system_getmoreapp",
                    "required_applications": null
                }, {
                    "id": 2127,
                    "campaign_id": 821,
                    "position": 2,
                    "address": "447 Broadway, New York, NY, USA",
                    "latitude": 40.7206058,
                    "longitude": -74.0014893,
                    "status": "live",
                    "start": "2019-12-26T05:15:00.000Z",
                    "end": "2019-12-26T05:20:00.000Z",
                    "created_at": "2019-12-11T21:01:18.070Z",
                    "updated_at": "2019-12-12T20:10:10.835Z",
                    "open": 2,
                    "access": "5.0",
                    "access_time": null,
                    "due": null,
                    "payable": null,
                    "paid": null,
                    "income_id": null,
                    "country_id": 6,
                    "city_id": 4968,
                    "price": "20.0",
                    "pricing_id": 49,
                    "net_payable": null,
                    "contact_name": "Alejandro",
                    "contact_number": "",
                    "contact_email": "alphanew@example.com",
                    "post_instruction": "",
                    "notification_cat": "all_nearby",
                    "panic_notification_cat": "all_above_6",
                    "timezo": null,
                    "notifiable_staff": null,
                    "notified_staff": null,
                    "next_notif": "2019-12-11T21:01:18.067Z",
                    "notif_command": "system_getmoreapp",
                    "required_applications": null
                }]
            },
            "822": {
                "id": 822,
                "company_id": 690,
                "skill_id": 20,
                "notes": "adsfadsfdsaf",
                "gender": null,
                "coherence": null,
                "created_at": "2019-12-11T21:14:50.455Z",
                "updated_at": "2019-12-11T21:14:50.546Z",
                "is_required_video": null,
                "charge_rate": "20.0",
                "charge_rate_effective_date": "2019-12-11T21:14:50.545Z",
                "pay_rate": "15.0",
                "pay_rate_effective_date": null,
                "admins": null,
                "staff_scoring": null,
                "title": null,
                "radius": null,
                "client_name": null,
                "address_display": null,
                "timesheets": null,
                "job_type": "Admin Assistant",
                "banner_image": "https://www.filepicker.io/api/file/bCsE9lZRBW4rRiouYQku",
                "shifts": [{
                    "id": 2128,
                    "campaign_id": 822,
                    "position": 1,
                    "address": "447 Broadway, New York, NY, USA",
                    "latitude": 40.7206058,
                    "longitude": -74.0014893,
                    "status": "live",
                    "start": "2019-12-13T05:05:00.000Z",
                    "end": "2019-12-13T07:35:00.000Z",
                    "created_at": "2019-12-11T21:14:50.526Z",
                    "updated_at": "2019-12-12T20:10:10.853Z",
                    "open": 1,
                    "access": "5.0",
                    "access_time": null,
                    "due": null,
                    "payable": null,
                    "paid": null,
                    "income_id": null,
                    "country_id": 6,
                    "city_id": 4968,
                    "price": "20.0",
                    "pricing_id": 49,
                    "net_payable": null,
                    "contact_name": "Alejandro",
                    "contact_number": "",
                    "contact_email": "alphanew@example.com",
                    "post_instruction": "",
                    "notification_cat": "all_nearby",
                    "panic_notification_cat": "all_above_6",
                    "timezo": null,
                    "notifiable_staff": null,
                    "notified_staff": null,
                    "next_notif": "2019-12-11T21:14:50.523Z",
                    "notif_command": "system_getmoreapp",
                    "required_applications": null
                }]
            },
            "823": {
                "id": 823,
                "company_id": 690,
                "skill_id": 20,
                "notes": "adsfadsfdsaf",
                "gender": null,
                "coherence": null,
                "created_at": "2019-12-11T21:17:01.901Z",
                "updated_at": "2019-12-11T21:17:01.982Z",
                "is_required_video": null,
                "charge_rate": "20.0",
                "charge_rate_effective_date": "2019-12-11T21:17:01.982Z",
                "pay_rate": "15.0",
                "pay_rate_effective_date": null,
                "admins": null,
                "staff_scoring": null,
                "title": null,
                "radius": 100,
                "client_name": null,
                "address_display": null,
                "timesheets": null,
                "job_type": "Admin Assistant",
                "banner_image": "https://www.filepicker.io/api/file/bCsE9lZRBW4rRiouYQku",
                "shifts": [{
                    "id": 2129,
                    "campaign_id": 823,
                    "position": 2,
                    "address": "447 Broadway, New York, NY, USA",
                    "latitude": 40.7206058,
                    "longitude": -74.0014893,
                    "status": "live",
                    "start": "2019-12-13T05:05:00.000Z",
                    "end": "2019-12-13T11:55:00.000Z",
                    "created_at": "2019-12-11T21:17:01.971Z",
                    "updated_at": "2019-12-12T20:10:10.864Z",
                    "open": 2,
                    "access": "5.0",
                    "access_time": null,
                    "due": null,
                    "payable": null,
                    "paid": null,
                    "income_id": null,
                    "country_id": 6,
                    "city_id": 4968,
                    "price": "20.0",
                    "pricing_id": 49,
                    "net_payable": null,
                    "contact_name": "Alejandro",
                    "contact_number": "",
                    "contact_email": "alphanew@example.com",
                    "post_instruction": "",
                    "notification_cat": "all_nearby",
                    "panic_notification_cat": "all_above_6",
                    "timezo": null,
                    "notifiable_staff": null,
                    "notified_staff": null,
                    "next_notif": "2019-12-11T21:17:01.967Z",
                    "notif_command": "system_getmoreapp",
                    "required_applications": null
                }]
            }
        }
    },
    "message": "All clear"
}
```

{% endtab %}

{% tab title="401  User not found, invalid auth token or User is not a job seeker. User could be a client, admin. For this API user must be a Job Seeker." %}

```
{
    "status": 401,
    "data": {
        "opertaion_status": "Error"
    },
    "message": "User is not a valid Job Seeker"
}
```

{% endtab %}
{% endtabs %}

## Get all upcoming assigned jobs&#x20;

<mark style="color:blue;">`GET`</mark> `https://ondemandstaffing.app/api /v1/shifts/view_all_upcoming_assigned_jobs/`

&#x20;This gets all the shifts the current user is assigned for and is in the future.

#### Query Parameters

| Name   | Type   | Description                                                                       |
| ------ | ------ | --------------------------------------------------------------------------------- |
| tenant | string | Each app will have a unique tenant key that should be used to query the right db. |

#### Headers

| Name           | Type   | Description                                                                                                                                           |
| -------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Authentication | string | Every authenticated user will have an Authentication token. You need to send this auth token as Access-Token or HTTP\_AUTHORIZATION for bearer token. |

{% tabs %}
{% tab title="200  Shifts include all the shifts that this User is assigned for and is in the future. All Shifts are part of a campaign. Campaign include important details like: Description of job and client\_name\_to\_display. If Client name to display is not present, just show blank.

If the user has already checked in for any shift, you will get it within keys: 'reported\_timesheet'. With that key is a hash with time-in and time-out." %}

```
{
    "status": 200,
    "data": {
        "opertaion_status": "success",
        "shifts": {
            "400": {
                "id": 400,
                "campaign_id": 128,
                "position": 2,
                "address": "Amsterdamstraat 575, Haarlem, North Holland, Netherlands",
                "latitude": 52.3792969,
                "longitude": 4.647741,
                "status": "live",
                "start": "2019-12-13T20:30:00.000Z",
                "end": "2019-12-14T03:00:00.000Z",
                "created_at": "2019-12-11T12:24:48.555Z",
                "updated_at": "2019-12-11T12:41:18.883Z",
                "open": 0,
                "access": "5.0",
                "access_time": null,
                "due": null,
                "payable": null,
                "paid": null,
                "income_id": null,
                "country_id": 46,
                "city_id": 6506,
                "price": "17.5",
                "pricing_id": 43,
                "net_payable": null,
                "contact_name": "Amsterdam Dance Festival",
                "contact_number": "4149876546",
                "contact_email": "pathumpal+3@juno.com",
                "post_instruction": "Please wear all black",
                "notification_cat": "all_nearby",
                "panic_notification_cat": "all_above_6",
                "timezo": "Europe/Amsterdam",
                "notifiable_staff": [],
                "notified_staff": [],
                "next_notif": "2019-12-11T12:28:26.473Z",
                "notif_command": "exhausted_options",
                "required_applications": 4,
                "job_type": "Ticket Scanner",
                "campaign": {
                    "id": 128,
                    "company_id": 26,
                    "skill_id": 9,
                    "notes": "Scanning tickets for a dance festival",
                    "gender": null,
                    "coherence": true,
                    "created_at": "2019-12-11T12:24:48.501Z",
                    "updated_at": "2019-12-11T12:41:22.479Z",
                    "is_required_video": null,
                    "charge_rate": "17.5",
                    "charge_rate_effective_date": "2019-12-11T12:24:48.578Z",
                    "pay_rate": "10.0",
                    "pay_rate_effective_date": null,
                    "admins": [12, 31, 44],
                    "staff_scoring": {},
                    "title": "Ticket Scanner",
                    "radius": 40,
                    "client_name": false,
                    "address_display": "full_address",
                    "timesheets": "candidates"
                }
            }
        }
    },
    "message": "All clear"
}
```

{% endtab %}

{% tab title="401  Accessing with auth token that is not authorized." %}

```
{
    "status": 401,
    "data": {
        "opertaion_status": "Failed authorizing user"
    },
    "message": "Unaauthorized Access Attempt"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fromwolf.com/available-and-upcoming-jobs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
