Unpublish Job Booking
Take a live job booking offline before its run time is over — for instance when the position has been filled. The booking moves to status unpublished; the purchase is not refunded and the booking cannot be published again.
curl -X PATCH "https://api.getkini.com/job_bookings/1/unpublish/" \
-H "Content-Type: application/json" \
-H "Company-Id: 1" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://api.getkini.com/job_bookings/1/unpublish/"
headers = {
"Content-Type": "application/json",
"Company-Id": "1",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.patch(url, headers=headers)
print(response.json())
const response = await fetch("https://api.getkini.com/job_bookings/1/unpublish/", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
"Company-Id": "1",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("PATCH", "https://api.getkini.com/job_bookings/1/unpublish/", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Company-Id", "1")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.getkini.com/job_bookings/1/unpublish/')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri)
request['Content-Type'] = 'application/json'
request['Company-Id'] = '1'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"detail": "success"
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Please try again later",
"code": 429,
"retryAfter": 3600
}
/job_bookings/{id}/unpublish/Target server for requests. Edit to use your own host.
Authenticate every request with an API key from the Kini Partner App, sent as Authorization: Bearer <your_api_key>.
Authorization: Bearer <your_api_key>.Kini ID of the job booking
Kini ID of the company the key is associated with
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Authenticate every request with an API key from the Kini Partner App, sent as Authorization: Bearer <your_api_key>.
Path Parameters
Headers
Responses
Result of the unpublish request