Other

Warmup companies

Check available companies in Ocean's database and trigger process of data gathering for the missing ones

POST
/v2/warmup/companies

Request Body

application/jsonRequired
domainsRequiredDomains

Domains to be checked and added to the database if not present

Query Parameters

apiTokenstring | null | null

Header Parameters

x-api-tokenstring | null | null

Response Body

Successful Response

TypeScript Definitions

Use the response body type in TypeScript.

successfulDomainsarray<unknown> | null | null
triggeredDomainsarray<unknown> | null | null
ignoredDomainsarray<unknown> | null | null
missingDomainsobject | null | null
dataErrorsobject | null | null

Bad Request

TypeScript Definitions

Use the response body type in TypeScript.

detailRequiredstring
Value in: "Conflicting API tokens provided in query parameters and headers"

Payment Required

TypeScript Definitions

Use the response body type in TypeScript.

detailRequiredstring
Value in: "Insufficient email credits" | "Some email verifications are already in progress and might use all your remaining email credits. Please try again later." | "Insufficient phone credits" | "Some phone verifications are already in progress and might use all your remaining phone credits. Please try again later."

Forbidden

TypeScript Definitions

Use the response body type in TypeScript.

detailRequiredstring
Value in: "API token should be provided in headers or query parameters" | "Current API token is not registered in our database"

Not found

Validation Error

TypeScript Definitions

Use the response body type in TypeScript.

detailDetail
curl -X POST "https://api.ocean.io/v2/warmup/companies?apiToken=string" \
  -H "x-api-token: string" \
  -H "Content-Type: application/json" \
  -d '{
    "domains": [
      "ocean.io",
      "denmark.dk"
    ]
  }'
const body = JSON.stringify({
  "domains": [
    "ocean.io",
    "denmark.dk"
  ]
})

fetch("https://api.ocean.io/v2/warmup/companies?apiToken=string", {
  headers: {
    "x-api-token": "string"
  },
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://api.ocean.io/v2/warmup/companies?apiToken=string"
  body := strings.NewReader(`{
    "domains": [
      "ocean.io",
      "denmark.dk"
    ]
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("x-api-token", "string")
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://api.ocean.io/v2/warmup/companies?apiToken=string"
body = {
  "domains": [
    "ocean.io",
    "denmark.dk"
  ]
}
response = requests.request("POST", url, json = body, headers = {
  "x-api-token": "string",
  "Content-Type": "application/json"
})

print(response.text)
{
  "successfulDomains": [
    "successful-domain-1.com",
    "successful-domain-2.com"
  ],
  "triggeredDomains": [
    "domain-to-be-crawled-1.com",
    "domain-to-be-crawled-2.com"
  ],
  "ignoredDomains": [
    "bad-domain-1",
    "bad-domain-2"
  ],
  "missingDomains": {
    "missing-domain-1.com": "bad content",
    "missing-domain-2.com": "crawler failed"
  },
  "dataErrors": {
    "data-errors-domain-1.com": "missing context vector",
    "data-errors-domain-2.com": "missing industry features"
  }
}
{
  "detail": "Conflicting API tokens provided in query parameters and headers"
}
{
  "detail": "Insufficient email credits"
}
{
  "detail": "API token should be provided in headers or query parameters"
}
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}