Create a company

POST /advertising/v1.0/companies/

Endpoint for creating advertising companies.

application/json

Body

  • Optional custom id that can later be used instead of normal id in insert, update, delete etc. endpoints

  • name string Required
  • email string Required
  • tags array[string] | null

    Tags are strings that can be used to categorize an entities and then filter them in the list endpoints. For example, if you have multiple companies or advertisers that are a part of a larger franchise, you can assign a tag that will refer to that franchise and then use it in the list endpoints to find only the entities that are a part of that franchise.

  • address string | null

    Legacy field. Use location instead. If you don't provide location, the location will default to address.

  • websiteUrl string | null
  • phoneNumbers array[string | null]
  • location string | null

    Most accurate location description of a location. Preferably exact address in the format common for the given country. If that isn't possible, provide us with the most accurate location description possible. (eg. '{street name}, {city}')

  • locationAccuracy string | null

    Accuracy of the provided location. If not provided upon insertion, will default to exact.

    • If accuracy is missing or is set to exact we will display the exact location that was provided.
    • If accuracy is set to other value we will try to find the closest entity of provided type, if we don't find it we will display the nearest non-exact entity we can find (eg. street)

    Values are exact, street, municipality_part, municipality, cadastral_area, nearest_non_exact_geo_entity, or .

  • ico string | null
  • dic string | null

Responses

  • 200 application/json

    Advertising company successfully created

    Hide response attributes Show response attributes object
    • success boolean Required
    • data object Required
      Hide data attributes Show data attributes object
      • id string Required
      • Optional custom id that can later be used instead of normal id in insert, update, delete etc. endpoints

      • name string Required
      • tags array[string] | null

        Tags are strings that can be used to categorize an entities and then filter them in the list endpoints. For example, if you have multiple companies or advertisers that are a part of a larger franchise, you can assign a tag that will refer to that franchise and then use it in the list endpoints to find only the entities that are a part of that franchise.

      • email string Required
      • websiteUrl string | null
      • phoneNumbers array[string]
      • ico string | null
      • dic string | null
      • location string | null
      • locationAccuracy string | null

        Accuracy of the provided location. If not provided upon insertion, will default to exact.

        • If accuracy is missing or is set to exact we will display the exact location that was provided.
        • If accuracy is set to other value we will try to find the closest entity of provided type, if we don't find it we will display the nearest non-exact entity we can find (eg. street)

        Values are exact, street, municipality_part, municipality, cadastral_area, or nearest_non_exact_geo_entity.

POST /advertising/v1.0/companies/
curl \
 -X POST http://apis.public-staging.reas.cz/advertising/v1.0/companies/ \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"thirdPartyId":"1000025","name":"string","email":"string","tags":["string"],"address":"string","websiteUrl":"string","phoneNumbers":["string"],"location":"Jablonecká 415/4, Praha 9","locationAccuracy":"exact","ico":"string","dic":"string"}'
Request example
{
  "thirdPartyId": "1000025",
  "name": "string",
  "email": "string",
  "tags": [
    "string"
  ],
  "address": "string",
  "websiteUrl": "string",
  "phoneNumbers": [
    "string"
  ],
  "location": "Jablonecká 415/4, Praha 9",
  "locationAccuracy": "exact",
  "ico": "string",
  "dic": "string"
}
Response examples (200)
{
  "success": true,
  "data": {
    "id": "string",
    "thirdPartyId": "1000025",
    "name": "string",
    "tags": [
      "string"
    ],
    "email": "string",
    "websiteUrl": "string",
    "phoneNumbers": [
      "string"
    ],
    "profileImageUrl": "string",
    "ico": "string",
    "dic": "string",
    "location": "string",
    "locationAccuracy": "exact"
  }
}