- Register trademark
- Exact string search
- Fuzzy string search (using trigrams)
Prepare - create docker network
make create-network
To build a docker image for the backend API service run:
make build
Then you should be able to run a development setup with docker-compose:
make start
Also you should run the database migrations
make migrate
POST /trademark
Body params (json):
title
- string, trademark titledescription
- string, trademark descriptionapplication_number
- string, trademark application numberregistration_date
- date in ISO format, trademark registration dateexpiry_date
- date in ISO format, expiry date
Response HTTP codes:
201
- Trademark registered successfully400
- Invalid request409
- Trademark with such name is already registered500
- Internal server error
Response format - json
:
result
-trademark
objectid
- string, unique identifier of trademark recordtitle
- string, trademark titledescription
- string, trademark descriptionapplication_number
- string, trademark application numberregistration_date
- date in ISO format, trademark registration dateexpiry_date
- date in ISO format, expiry date
Example:
{
"result": {
"id": "7d92e944-899d-4c24-bc63-4bacc270f1ad",
"title": "WAVE",
"description": "blah",
"application_number": "018188180",
"registration_date": "2020-06-11",
"expiry_date": "2030-01-28"
}
}
GET /trademark
Query params:
title
- string, trademark title to match withexact_match
- boolean, search for an exact match (default is true)
Response HTTP codes:
200
- Success - trademark with given title has been found400
- Invalid request404
- Not found - no such trademark500
- Internal server error
Response format - json
:
result
- list of trademark objectsid
- string, unique identifier of trademark recordtitle
- string, trademark titledescription
- string, trademark descriptionapplication_number
- string, trademark application numberregistration_date
- date in ISO format, trademark registration dateexpiry_date
- date in ISO format, expiry date
Example:
{
"result": [
{
"id": "66e01b8d-5df8-4ad7-a672-8d33f427f6cb",
"title": "WATA WAVE",
"description": "blah",
"application_number": "018221920",
"registration_date": "2020-07-22",
"expiry_date": "2030-04-06"
}
]
}