Register API¶
Varieties¶
- GET /api/varieties/¶
- Query Parameters:
id__in (array) – Multiple values may be separated by commas.
limit (integer) – Number of results to return per page.
name (string)
name__icontains (string)
name__in (array) – Multiple values may be separated by commas.
offset (integer) – The initial index from which to return the results.
species (integer)
Example request:
GET /api/varieties/ HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "count": 1, "next": "https://example.com", "previous": "https://example.com", "results": [ { "id": 1, "name": "string", "species": 1, "species_common_name": "string", "names": [ { "name": "string", "change_date": "2026-09-27" } ], "created_at": "2026-09-27T15:45:05.388046", "updated_at": "2026-09-27T15:45:05.388046" } ] }
- POST /api/varieties/¶
Example request:
POST /api/varieties/ HTTP/1.1 Host: example.com Content-Type: application/json { "name": "string", "species": 1 }
- Status Codes:
Example response:
HTTP/1.1 201 Created Content-Type: application/json { "id": 1, "name": "string", "species": 1, "species_common_name": "string", "names": [ { "name": "string", "change_date": "2026-09-27" } ], "created_at": "2026-09-27T15:45:05.388046", "updated_at": "2026-09-27T15:45:05.388046" }
- GET /api/varieties/{id}/¶
- Parameters:
id (integer) – A unique integer value identifying this variety.
Example request:
GET /api/varieties/{id}/ HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "name": "string", "species": 1, "species_common_name": "string", "names": [ { "name": "string", "change_date": "2026-09-27" } ], "created_at": "2026-09-27T15:45:05.388046", "updated_at": "2026-09-27T15:45:05.388046" }
- PUT /api/varieties/{id}/¶
- Parameters:
id (integer) – A unique integer value identifying this variety.
Example request:
PUT /api/varieties/{id}/ HTTP/1.1 Host: example.com Content-Type: application/json { "name": "string", "species": 1 }
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "name": "string", "species": 1, "species_common_name": "string", "names": [ { "name": "string", "change_date": "2026-09-27" } ], "created_at": "2026-09-27T15:45:05.388046", "updated_at": "2026-09-27T15:45:05.388046" }
- PATCH /api/varieties/{id}/¶
- Parameters:
id (integer) – A unique integer value identifying this variety.
Example request:
PATCH /api/varieties/{id}/ HTTP/1.1 Host: example.com Content-Type: application/json { "name": "string", "species": 1 }
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "name": "string", "species": 1, "species_common_name": "string", "names": [ { "name": "string", "change_date": "2026-09-27" } ], "created_at": "2026-09-27T15:45:05.388046", "updated_at": "2026-09-27T15:45:05.388046" }
- DELETE /api/varieties/{id}/¶
- Parameters:
id (integer) – A unique integer value identifying this variety.
- Status Codes:
204 No Content – No response body
- POST /api/varieties/bulk/¶
Bulk create plant varieties
Create multiple objects from a JSON array.Each item follows the same schema as the normal create endpoint.
Example request:
POST /api/varieties/bulk/ HTTP/1.1 Host: example.com Content-Type: application/json [ { "name": "string", "species": 1 } ]
- Status Codes:
Example response:
HTTP/1.1 201 Created Content-Type: application/json [ { "id": 1, "name": "string", "species": 1, "species_common_name": "string", "names": [ { "name": "string", "change_date": "2026-09-27" } ], "created_at": "2026-09-27T15:45:05.388046", "updated_at": "2026-09-27T15:45:05.388046" } ]
- GET /api/varieties/export-jsonl/¶
Export the full filtered result set as newline-delimited JSON.
Example request:
GET /api/varieties/export-jsonl/ HTTP/1.1 Host: example.com
- Status Codes:
200 OK – Newline-delimited JSON stream.
- POST /api/varieties/spreadsheet_import/¶
Import varieties from a spreadsheet file.
Supported file formats are CSV, XLS, XLSX, and ODS. The first row must contain the column names described below.
Select
Validate onlyto check the file for errors without importing any rows.Accepted columns:
name(text, required): denomination of the variety;species_id(integer, required): ID of the species (seeGET /api/species/).
A row is skipped if a variety with the same
nameandspecies_idalready exists. Existing varieties are not updated. To create another variety with the same name, use the user interface.Example request:
POST /api/varieties/spreadsheet_import/ HTTP/1.1 Host: example.com Content-Type: application/json { "file": "01010101", "validate_only": true }
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "imported_rows": 1 }
Species¶
- GET /api/species/¶
- Query Parameters:
botanical_name__icontains (string)
common_name__icontains (string)
limit (integer) – Number of results to return per page.
offset (integer) – The initial index from which to return the results.
Example request:
GET /api/species/ HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "count": 1, "next": "https://example.com", "previous": "https://example.com", "results": [ { "id": 1, "common_name": "string", "botanical_name": "string", "code": "string" } ] }
- POST /api/species/¶
Example request:
POST /api/species/ HTTP/1.1 Host: example.com Content-Type: application/json { "common_name": "string", "botanical_name": "string", "code": "string" }
- Status Codes:
Example response:
HTTP/1.1 201 Created Content-Type: application/json { "id": 1, "common_name": "string", "botanical_name": "string", "code": "string" }
- GET /api/species/{id}/¶
- Parameters:
id (integer) – A unique integer value identifying this plant species.
Example request:
GET /api/species/{id}/ HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "common_name": "string", "botanical_name": "string", "code": "string" }
- PUT /api/species/{id}/¶
- Parameters:
id (integer) – A unique integer value identifying this plant species.
Example request:
PUT /api/species/{id}/ HTTP/1.1 Host: example.com Content-Type: application/json { "common_name": "string", "botanical_name": "string", "code": "string" }
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "common_name": "string", "botanical_name": "string", "code": "string" }
- PATCH /api/species/{id}/¶
- Parameters:
id (integer) – A unique integer value identifying this plant species.
Example request:
PATCH /api/species/{id}/ HTTP/1.1 Host: example.com Content-Type: application/json { "common_name": "string", "botanical_name": "string", "code": "string" }
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "common_name": "string", "botanical_name": "string", "code": "string" }
- DELETE /api/species/{id}/¶
- Parameters:
id (integer) – A unique integer value identifying this plant species.
- Status Codes:
204 No Content – No response body
- POST /api/species/bulk/¶
Bulk create plant species
Create multiple objects from a JSON array.Each item follows the same schema as the normal create endpoint.
Example request:
POST /api/species/bulk/ HTTP/1.1 Host: example.com Content-Type: application/json [ { "common_name": "string", "botanical_name": "string", "code": "string" } ]
- Status Codes:
Example response:
HTTP/1.1 201 Created Content-Type: application/json [ { "id": 1, "common_name": "string", "botanical_name": "string", "code": "string" } ]
Protections¶
- GET /api/protections/¶
- Query Parameters:
applicants (array)
country (string) –
AF - Afghanistan
AX - Åland Islands
AL - Albania
DZ - Algeria
AS - American Samoa
AD - Andorra
AO - Angola
AI - Anguilla
AQ - Antarctica
AG - Antigua and Barbuda
AR - Argentina
AM - Armenia
AW - Aruba
AU - Australia
AT - Austria
AZ - Azerbaijan
BS - Bahamas
BH - Bahrain
BD - Bangladesh
BB - Barbados
BY - Belarus
BE - Belgium
BZ - Belize
BJ - Benin
BM - Bermuda
BT - Bhutan
BO - Bolivia
BQ - Bonaire, Sint Eustatius and Saba
BA - Bosnia and Herzegovina
BW - Botswana
BV - Bouvet Island
BR - Brazil
IO - British Indian Ocean Territory
BN - Brunei
BG - Bulgaria
BF - Burkina Faso
BI - Burundi
CV - Cabo Verde
KH - Cambodia
CM - Cameroon
CA - Canada
KY - Cayman Islands
CF - Central African Republic
TD - Chad
CL - Chile
CN - China
CX - Christmas Island
CC - Cocos (Keeling) Islands
CO - Colombia
KM - Comoros
CG - Congo
CD - Congo (the Democratic Republic of the)
CK - Cook Islands
CR - Costa Rica
CI - Côte d’Ivoire
HR - Croatia
CU - Cuba
CW - Curaçao
CY - Cyprus
CZ - Czechia
DK - Denmark
DJ - Djibouti
DM - Dominica
DO - Dominican Republic
EC - Ecuador
EG - Egypt
SV - El Salvador
GQ - Equatorial Guinea
ER - Eritrea
EE - Estonia
SZ - Eswatini
ET - Ethiopia
FK - Falkland Islands (Malvinas)
FO - Faroe Islands
FJ - Fiji
FI - Finland
FR - France
GF - French Guiana
PF - French Polynesia
TF - French Southern Territories
GA - Gabon
GM - Gambia
GE - Georgia
DE - Germany
GH - Ghana
GI - Gibraltar
GR - Greece
GL - Greenland
GD - Grenada
GP - Guadeloupe
GU - Guam
GT - Guatemala
GG - Guernsey
GN - Guinea
GW - Guinea-Bissau
GY - Guyana
HT - Haiti
HM - Heard Island and McDonald Islands
VA - Holy See
HN - Honduras
HK - Hong Kong
HU - Hungary
IS - Iceland
IN - India
ID - Indonesia
IR - Iran
IQ - Iraq
IE - Ireland
IM - Isle of Man
IL - Israel
IT - Italy
JM - Jamaica
JP - Japan
JE - Jersey
JO - Jordan
KZ - Kazakhstan
KE - Kenya
KI - Kiribati
KW - Kuwait
KG - Kyrgyzstan
LA - Laos
LV - Latvia
LB - Lebanon
LS - Lesotho
LR - Liberia
LY - Libya
LI - Liechtenstein
LT - Lithuania
LU - Luxembourg
MO - Macao
MG - Madagascar
MW - Malawi
MY - Malaysia
MV - Maldives
ML - Mali
MT - Malta
MH - Marshall Islands
MQ - Martinique
MR - Mauritania
MU - Mauritius
YT - Mayotte
MX - Mexico
FM - Micronesia
MD - Moldova
MC - Monaco
MN - Mongolia
ME - Montenegro
MS - Montserrat
MA - Morocco
MZ - Mozambique
MM - Myanmar
NA - Namibia
NR - Nauru
NP - Nepal
NL - Netherlands
NC - New Caledonia
NZ - New Zealand
NI - Nicaragua
NE - Niger
NG - Nigeria
NU - Niue
NF - Norfolk Island
KP - North Korea
MK - North Macedonia
MP - Northern Mariana Islands
NO - Norway
OM - Oman
PK - Pakistan
PW - Palau
PS - Palestine, State of
PA - Panama
PG - Papua New Guinea
PY - Paraguay
PE - Peru
PH - Philippines
PN - Pitcairn
PL - Poland
PT - Portugal
PR - Puerto Rico
QA - Qatar
RE - Réunion
RO - Romania
RU - Russia
RW - Rwanda
BL - Saint Barthélemy
SH - Saint Helena, Ascension and Tristan da Cunha
KN - Saint Kitts and Nevis
LC - Saint Lucia
MF - Saint Martin (French part)
PM - Saint Pierre and Miquelon
VC - Saint Vincent and the Grenadines
WS - Samoa
SM - San Marino
ST - Sao Tome and Principe
SA - Saudi Arabia
SN - Senegal
RS - Serbia
SC - Seychelles
SL - Sierra Leone
SG - Singapore
SX - Sint Maarten (Dutch part)
SK - Slovakia
SI - Slovenia
SB - Solomon Islands
SO - Somalia
ZA - South Africa
GS - South Georgia and the South Sandwich Islands
KR - South Korea
SS - South Sudan
ES - Spain
LK - Sri Lanka
SD - Sudan
SR - Suriname
SJ - Svalbard and Jan Mayen
SE - Sweden
CH - Switzerland
SY - Syria
TW - Taiwan
TJ - Tajikistan
TZ - Tanzania
TH - Thailand
TL - Timor-Leste
TG - Togo
TK - Tokelau
TO - Tonga
TT - Trinidad and Tobago
TN - Tunisia
TR - Türkiye
TM - Turkmenistan
TC - Turks and Caicos Islands
TV - Tuvalu
UG - Uganda
UA - Ukraine
AE - United Arab Emirates
GB - United Kingdom
UM - United States Minor Outlying Islands
US - United States of America
UY - Uruguay
UZ - Uzbekistan
VU - Vanuatu
VE - Venezuela
VN - Vietnam
VG - Virgin Islands (British)
VI - Virgin Islands (U.S.)
WF - Wallis and Futuna
EH - Western Sahara
YE - Yemen
ZM - Zambia
ZW - Zimbabwe
limit (integer) – Number of results to return per page.
maintainers (array)
offset (integer) – The initial index from which to return the results.
reference (string)
reference__icontains (string)
status (string) –
G - Granted
T - Terminated
A - Active Application
W - Withdrawn
R - Refused
S - Surrendered
type (integer)
variety (integer)
variety__in (array) – Multiple values may be separated by commas.
Example request:
GET /api/protections/ HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "count": 1, "next": "https://example.com", "previous": "https://example.com", "results": [ { "id": 1, "type": "string", "reference": "string", "status": "G", "country": "AF", "variety": 1, "applicants": [ 1 ], "maintainers": [ 1 ], "date_start": "2026-09-27", "date_end": "2026-09-27", "note": "string" } ] }
- POST /api/protections/¶
Example request:
POST /api/protections/ HTTP/1.1 Host: example.com Content-Type: application/json { "type": "string", "reference": "string", "status": "G", "country": "AF", "variety": 1, "applicants": [ 1 ], "maintainers": [ 1 ], "date_start": "2026-09-27", "date_end": "2026-09-27", "note": "string" }
- Status Codes:
Example response:
HTTP/1.1 201 Created Content-Type: application/json { "id": 1, "type": "string", "reference": "string", "status": "G", "country": "AF", "variety": 1, "applicants": [ 1 ], "maintainers": [ 1 ], "date_start": "2026-09-27", "date_end": "2026-09-27", "note": "string" }
- GET /api/protections/{id}/¶
- Parameters:
id (integer) – A unique integer value identifying this protection.
Example request:
GET /api/protections/{id}/ HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "type": "string", "reference": "string", "status": "G", "country": "AF", "variety": 1, "applicants": [ 1 ], "maintainers": [ 1 ], "date_start": "2026-09-27", "date_end": "2026-09-27", "note": "string" }
- PUT /api/protections/{id}/¶
- Parameters:
id (integer) – A unique integer value identifying this protection.
Example request:
PUT /api/protections/{id}/ HTTP/1.1 Host: example.com Content-Type: application/json { "type": "string", "reference": "string", "status": "G", "country": "AF", "variety": 1, "applicants": [ 1 ], "maintainers": [ 1 ], "date_start": "2026-09-27", "date_end": "2026-09-27", "note": "string" }
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "type": "string", "reference": "string", "status": "G", "country": "AF", "variety": 1, "applicants": [ 1 ], "maintainers": [ 1 ], "date_start": "2026-09-27", "date_end": "2026-09-27", "note": "string" }
- PATCH /api/protections/{id}/¶
- Parameters:
id (integer) – A unique integer value identifying this protection.
Example request:
PATCH /api/protections/{id}/ HTTP/1.1 Host: example.com Content-Type: application/json { "type": "string", "reference": "string", "status": "G", "country": "AF", "variety": 1, "applicants": [ 1 ], "maintainers": [ 1 ], "date_start": "2026-09-27", "date_end": "2026-09-27", "note": "string" }
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "type": "string", "reference": "string", "status": "G", "country": "AF", "variety": 1, "applicants": [ 1 ], "maintainers": [ 1 ], "date_start": "2026-09-27", "date_end": "2026-09-27", "note": "string" }
- DELETE /api/protections/{id}/¶
- Parameters:
id (integer) – A unique integer value identifying this protection.
- Status Codes:
204 No Content – No response body
- POST /api/protections/bulk/¶
Bulk create protections
Create multiple objects from a JSON array.Each item follows the same schema as the normal create endpoint.
Example request:
POST /api/protections/bulk/ HTTP/1.1 Host: example.com Content-Type: application/json [ { "type": "string", "reference": "string", "status": "G", "country": "AF", "variety": 1, "applicants": [ 1 ], "maintainers": [ 1 ], "date_start": "2026-09-27", "date_end": "2026-09-27", "note": "string" } ]
- Status Codes:
Example response:
HTTP/1.1 201 Created Content-Type: application/json [ { "id": 1, "type": "string", "reference": "string", "status": "G", "country": "AF", "variety": 1, "applicants": [ 1 ], "maintainers": [ 1 ], "date_start": "2026-09-27", "date_end": "2026-09-27", "note": "string" } ]
- GET /api/protections/export-jsonl/¶
Export the full filtered result set as newline-delimited JSON.
Example request:
GET /api/protections/export-jsonl/ HTTP/1.1 Host: example.com
- Status Codes:
200 OK – Newline-delimited JSON stream.
- POST /api/protections/spreadsheet_import/¶
Import protections from a spreadsheet file.
Supported file formats are CSV, XLS, XLSX, and ODS. The first row must contain the column names described below.
Select
Validate onlyto check the file for errors without importing any rows.Accepted columns:
name(text, required): variety name. The variety is matched
against existing varieties using both
nameandspecies_id. Validation fails if no matching variety is found; -species_id(integer, required): ID of the variety’s species (seeGET /api/species/); -type(text, required): three-letter protection type code (seeGET /api/protection_types/); -reference(text, optional): reference number or code, such as an application number; -status(text, optional): protection status. Accepted values areG(Granted),T(Terminated),A(Active Application),W(Withdrawn),R(Refused), andS(Surrendered); -country(text, optional): ISO 3166-1 alpha-2 country code; -date_start(date, optional): protection start date inYYYY-MM-DDformat; -date_end(date, optional): protection end date inYYYY-MM-DDformat; -applicants(text, optional): semicolon-separated applicant names; -maintainers(text, optional): semicolon-separated maintainer names; -note(text, optional): additional information.The
applicantsandmaintainerscolumns may contain multiple entity names separated by semicolons, for exampleEntity A; Entity B. Do not use semicolon-separated names when importing entities: they will be interpreted as one entity name.Rows whose combination of
type,name,species_id, andcountryalready exists are skipped and are not updated.Example request:
POST /api/protections/spreadsheet_import/ HTTP/1.1 Host: example.com Content-Type: application/json { "file": "01010101", "validate_only": true }
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "imported_rows": 1 }
Entities¶
- GET /api/entities/¶
- Query Parameters:
country (string) –
Country where the entity is based or operates.
AF - Afghanistan
AX - Åland Islands
AL - Albania
DZ - Algeria
AS - American Samoa
AD - Andorra
AO - Angola
AI - Anguilla
AQ - Antarctica
AG - Antigua and Barbuda
AR - Argentina
AM - Armenia
AW - Aruba
AU - Australia
AT - Austria
AZ - Azerbaijan
BS - Bahamas
BH - Bahrain
BD - Bangladesh
BB - Barbados
BY - Belarus
BE - Belgium
BZ - Belize
BJ - Benin
BM - Bermuda
BT - Bhutan
BO - Bolivia
BQ - Bonaire, Sint Eustatius and Saba
BA - Bosnia and Herzegovina
BW - Botswana
BV - Bouvet Island
BR - Brazil
IO - British Indian Ocean Territory
BN - Brunei
BG - Bulgaria
BF - Burkina Faso
BI - Burundi
CV - Cabo Verde
KH - Cambodia
CM - Cameroon
CA - Canada
KY - Cayman Islands
CF - Central African Republic
TD - Chad
CL - Chile
CN - China
CX - Christmas Island
CC - Cocos (Keeling) Islands
CO - Colombia
KM - Comoros
CG - Congo
CD - Congo (the Democratic Republic of the)
CK - Cook Islands
CR - Costa Rica
CI - Côte d’Ivoire
HR - Croatia
CU - Cuba
CW - Curaçao
CY - Cyprus
CZ - Czechia
DK - Denmark
DJ - Djibouti
DM - Dominica
DO - Dominican Republic
EC - Ecuador
EG - Egypt
SV - El Salvador
GQ - Equatorial Guinea
ER - Eritrea
EE - Estonia
SZ - Eswatini
ET - Ethiopia
FK - Falkland Islands (Malvinas)
FO - Faroe Islands
FJ - Fiji
FI - Finland
FR - France
GF - French Guiana
PF - French Polynesia
TF - French Southern Territories
GA - Gabon
GM - Gambia
GE - Georgia
DE - Germany
GH - Ghana
GI - Gibraltar
GR - Greece
GL - Greenland
GD - Grenada
GP - Guadeloupe
GU - Guam
GT - Guatemala
GG - Guernsey
GN - Guinea
GW - Guinea-Bissau
GY - Guyana
HT - Haiti
HM - Heard Island and McDonald Islands
VA - Holy See
HN - Honduras
HK - Hong Kong
HU - Hungary
IS - Iceland
IN - India
ID - Indonesia
IR - Iran
IQ - Iraq
IE - Ireland
IM - Isle of Man
IL - Israel
IT - Italy
JM - Jamaica
JP - Japan
JE - Jersey
JO - Jordan
KZ - Kazakhstan
KE - Kenya
KI - Kiribati
KW - Kuwait
KG - Kyrgyzstan
LA - Laos
LV - Latvia
LB - Lebanon
LS - Lesotho
LR - Liberia
LY - Libya
LI - Liechtenstein
LT - Lithuania
LU - Luxembourg
MO - Macao
MG - Madagascar
MW - Malawi
MY - Malaysia
MV - Maldives
ML - Mali
MT - Malta
MH - Marshall Islands
MQ - Martinique
MR - Mauritania
MU - Mauritius
YT - Mayotte
MX - Mexico
FM - Micronesia
MD - Moldova
MC - Monaco
MN - Mongolia
ME - Montenegro
MS - Montserrat
MA - Morocco
MZ - Mozambique
MM - Myanmar
NA - Namibia
NR - Nauru
NP - Nepal
NL - Netherlands
NC - New Caledonia
NZ - New Zealand
NI - Nicaragua
NE - Niger
NG - Nigeria
NU - Niue
NF - Norfolk Island
KP - North Korea
MK - North Macedonia
MP - Northern Mariana Islands
NO - Norway
OM - Oman
PK - Pakistan
PW - Palau
PS - Palestine, State of
PA - Panama
PG - Papua New Guinea
PY - Paraguay
PE - Peru
PH - Philippines
PN - Pitcairn
PL - Poland
PT - Portugal
PR - Puerto Rico
QA - Qatar
RE - Réunion
RO - Romania
RU - Russia
RW - Rwanda
BL - Saint Barthélemy
SH - Saint Helena, Ascension and Tristan da Cunha
KN - Saint Kitts and Nevis
LC - Saint Lucia
MF - Saint Martin (French part)
PM - Saint Pierre and Miquelon
VC - Saint Vincent and the Grenadines
WS - Samoa
SM - San Marino
ST - Sao Tome and Principe
SA - Saudi Arabia
SN - Senegal
RS - Serbia
SC - Seychelles
SL - Sierra Leone
SG - Singapore
SX - Sint Maarten (Dutch part)
SK - Slovakia
SI - Slovenia
SB - Solomon Islands
SO - Somalia
ZA - South Africa
GS - South Georgia and the South Sandwich Islands
KR - South Korea
SS - South Sudan
ES - Spain
LK - Sri Lanka
SD - Sudan
SR - Suriname
SJ - Svalbard and Jan Mayen
SE - Sweden
CH - Switzerland
SY - Syria
TW - Taiwan
TJ - Tajikistan
TZ - Tanzania
TH - Thailand
TL - Timor-Leste
TG - Togo
TK - Tokelau
TO - Tonga
TT - Trinidad and Tobago
TN - Tunisia
TR - Türkiye
TM - Turkmenistan
TC - Turks and Caicos Islands
TV - Tuvalu
UG - Uganda
UA - Ukraine
AE - United Arab Emirates
GB - United Kingdom
UM - United States Minor Outlying Islands
US - United States of America
UY - Uruguay
UZ - Uzbekistan
VU - Vanuatu
VE - Venezuela
VN - Vietnam
VG - Virgin Islands (British)
VI - Virgin Islands (U.S.)
WF - Wallis and Futuna
EH - Western Sahara
YE - Yemen
ZM - Zambia
ZW - Zimbabwe
limit (integer) – Number of results to return per page.
name (string)
name__icontains (string)
offset (integer) – The initial index from which to return the results.
type (string) –
Type of the entity. Choose from the available options.
IN - Individual
PA - Partnership
CO - Company
CP - Cooperative
Example request:
GET /api/entities/ HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "count": 1, "next": "https://example.com", "previous": "https://example.com", "results": [ { "id": 1, "name": "string", "type": "IN", "country": "AF", "contact": "string", "email": "name@example.com" } ] }
- POST /api/entities/¶
Example request:
POST /api/entities/ HTTP/1.1 Host: example.com Content-Type: application/json { "name": "string", "type": "IN", "country": "AF", "contact": "string", "email": "name@example.com" }
- Status Codes:
Example response:
HTTP/1.1 201 Created Content-Type: application/json { "id": 1, "name": "string", "type": "IN", "country": "AF", "contact": "string", "email": "name@example.com" }
- GET /api/entities/{id}/¶
- Parameters:
id (integer) – A unique integer value identifying this entity.
Example request:
GET /api/entities/{id}/ HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "name": "string", "type": "IN", "country": "AF", "contact": "string", "email": "name@example.com" }
- PUT /api/entities/{id}/¶
- Parameters:
id (integer) – A unique integer value identifying this entity.
Example request:
PUT /api/entities/{id}/ HTTP/1.1 Host: example.com Content-Type: application/json { "name": "string", "type": "IN", "country": "AF", "contact": "string", "email": "name@example.com" }
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "name": "string", "type": "IN", "country": "AF", "contact": "string", "email": "name@example.com" }
- PATCH /api/entities/{id}/¶
- Parameters:
id (integer) – A unique integer value identifying this entity.
Example request:
PATCH /api/entities/{id}/ HTTP/1.1 Host: example.com Content-Type: application/json { "name": "string", "type": "IN", "country": "AF", "contact": "string", "email": "name@example.com" }
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "name": "string", "type": "IN", "country": "AF", "contact": "string", "email": "name@example.com" }
- DELETE /api/entities/{id}/¶
- Parameters:
id (integer) – A unique integer value identifying this entity.
- Status Codes:
204 No Content – No response body
- POST /api/entities/bulk/¶
Bulk create entities
Create multiple objects from a JSON array.Each item follows the same schema as the normal create endpoint.
Example request:
POST /api/entities/bulk/ HTTP/1.1 Host: example.com Content-Type: application/json [ { "name": "string", "type": "IN", "country": "AF", "contact": "string", "email": "name@example.com" } ]
- Status Codes:
Example response:
HTTP/1.1 201 Created Content-Type: application/json [ { "id": 1, "name": "string", "type": "IN", "country": "AF", "contact": "string", "email": "name@example.com" } ]
- GET /api/entities/export-jsonl/¶
Export the full filtered result set as newline-delimited JSON.
Example request:
GET /api/entities/export-jsonl/ HTTP/1.1 Host: example.com
- Status Codes:
200 OK – Newline-delimited JSON stream.
- POST /api/entities/spreadsheet_import/¶
Import entities from a spreadsheet file.
Supported file formats are CSV, XLS, XLSX, and ODS. The first row must contain the column names described below.
Select
Validate onlyto check the file for errors without importing any rows.Accepted columns:
name(text, required): entity name;type(text, optional): entity type. Accepted values areIN(Individual),PA(Partnership),CO(Company), andCP(Cooperative);country(text, optional): ISO 3166-1 alpha-2 country code;contact(text, optional): contact information;email(text, optional): email address.
A row is skipped if an entity with the same
namealready exists. Existing entities are not updated. Semicolons innameare treated as part of a single entity name.Example request:
POST /api/entities/spreadsheet_import/ HTTP/1.1 Host: example.com Content-Type: application/json { "file": "01010101", "validate_only": true }
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "imported_rows": 1 }