Appearance
Campaigns
This page documents on how to:
Fetch campaigns
Fetch a list of campaigns
.
Scope
campaigns_read
Endpoint
GET /campaigns
The payload in this endpoint is paginated. Information will be provided in the headers.
Consult the guide for paginationAccepted params
All parameters should be in the querystring.
Param | Type | Example value | Default | Description |
---|---|---|---|---|
embed | String | "address,tags" | null | Wanted embedded data, separated with comas. Available values: [address,channels,entity,tags,unit ] |
status | String | "online,standby" | online,standby,draft,archived | Statuses of the campaigns, separated with comas. Available values: [online ,standby ,draft ,archived ]. Explanation of values. |
channels | String | career_fr,career_en | All channels | Only return campaigns broadcasted on these channels. Available values listed in channels endpoint. |
order | String | created_at | created_at | Chosen field for ordering the data. Available values: [created_at ,last_activation_at ,name ] |
sort | String | desc | desc | Way of sorting the data. Available values: [asc ,desc ] |
page | Integer | 1 | 1 | Page to fetch |
per_page | Integer | 50 | 50 | Quantity of data by page (max value is 50) |
Embedded data
Querying embedded data in this endpoint will be deprecated soon. Embeds can still be requested in the show endpoint, just below.
In this endpoint, embedded data can be requested:
address
: Job offerAddress
channels
: Diffusion channels where the relatedCampaign
is broadcastedtags
:Tags
set by theManager
to theCampaign
entity
:Campaign
'sEntity
unit
:Campaign
'sUnit
Examples
Find all campaigns that are online.
GET https://api.talentview.fr/v2/campaigns?status=online
Find all campaigns sorted by alphabetical order.
GET https://api.talentview.fr/v2/campaigns?order=name&sort=asc
Fetch campaign
Fetch one specific Campaign
from its id
.
Scope
campaigns_read
Endpoint
GET /campaigns/:id
Accepted params
Param | Type | Example value | Default | Description |
---|---|---|---|---|
id | Integer | 1 | - | In the path, id of the Campaign to fetch. |
embed | String | "address,tags" | null | In the querystring, wanted embedded data, separated with comas. Available values: [address,channels,entity,tags,unit ] |
Embedded data
In this endpoint, embedded data can be requested:
address
: Job offerAddress
channels
: Diffusion channels where the relatedCampaign
is broadcastedtags
:Tags
set by theManager
to theCampaign
entity
:Campaign
'sEntity
unit
:Campaign
'sUnit
Examples
Retrieve all the data avalaible for a campaign.
GET https://api.talentview.fr/v2/campaigns/42?embed=address,channels,entity,tags,unit
Create campaign
Create a Campaign
.
Scope
campaigns_write
Endpoint
POST /campaigns
Accepted params
All parameters should be in the request's body.
Param | Type | Example value | Required | Description |
---|---|---|---|---|
campaign | Object | - | ✓ | Campaign data |
campaign["manage_name"] | String | "Job offer #1" | ✓ | Name of the Campaign , as it appears for the managers |
campaign["name"] | String | "A really nice job offer" | ✗ | Name of the Campaign , as it appears for the Applicants |
campaign["description"] | String | "<p>We're recruiting <strong>someone nice</strong> to join our nice team</p>" | ✗ | Description of the job offer. HTML tags are supported |
campaign["profile"] | String | "<p>Someone nice, because nice people are usually nice.</p>" | ✗ | Profile of the Applicant . HTML tags are supported |
campaign["job_type"] | String | "Fixed term contract" | ✗ | Type of contract. Must be one of the Campaign#job_type. This field is case sensitive |
campaign["contract_duration"] | Integer | 12 | ✗ | Contract duration in months |
campaign["job_start_date"] | String | "2000-01-01" | ✗ | Date when the contract starts. Date format is YYYY-MM-DD |
campaign["date_end"] | String | "2000-01-01" | ✗ | Date when the Campaign will be paused automatically. Date format is YYYY-MM-DD |
campaign["working_time"] | String | "Full time" | ✗ | Working hours. Must be one of the Campaign#working_time. This field is case sensitive |
campaign["salary_min"] | Integer | 30000 | ✗ | Minimum salary, gross per year (per month for internships) |
campaign["salary_max"] | Integer | 40000 | ✗ | Maximum salary, gross per year (per month for internships) |
campaign["unit_id"] | Integer | 1 | ✗/✓ | Unit in which this Campaign belongs. This field is mandatory only if the Entities option are used. A list of the Units is avalaible in the Fetch entities endpoint |
campaign["address"] | Object | - | ✗ | Campaign address |
campaign["address"]["latitude"] | Float | 50.62925 | ✗ | Latitude |
campaign["address"]["longitude"] | Float | 3.057256 | ✗ | Longitude |
campaign["address"]["street_number"] | String | "165" | ✗ | Street number |
campaign["address"]["street"] | String | "Avenue de Bretagne" | ✗ | Street name |
campaign["address"]["postal_code"] | String | "59000" | ✗ | Postal code |
campaign["address"]["city"] | String | "Lille" | ✗ | City |
campaign["address"]["country"] | String | "France" | ✗ | Country |
campaign["address"]["name"] | String | "165 Avenue de Bretagne, 59000 Lille, France" | ✗ | Complete address (filling in this field will not autocomplete the address ) |
Examples
Create a campaign with basic information.
URL:
POST https://api.talentview.fr/v2/campaigns
BODY:
json
{
"campaign": {
"manage_name": "Job offer #1",
"name": "A really nice job offer",
"description": "<p>We're recruiting <strong>someone nice</strong> to join our nice team</p>",
"profile": "<p>Someone nice, because nice people are usually nice.</p>",
"job_type": "Fixed term contract",
"contract_duration": 12,
"job_start_date": "2000-01-01",
"date_end": "2000-01-01",
"working_time": "Full time",
"salary_min": 30000,
"salary_max": 40000,
"unit_id": 1,
"address": {
"latitude": 50.62925,
"longitude": 3.05725,
"street_number": "165",
"street": "Avenue de Bretagne",
"postal_code": "59000",
"city": "Lille",
"country": "France"
}
}
}