Request
POST https://backend.net0.com/v1/sites
This endpoint allows you to add a new site (location) to your Net0 account.
curl --location --request POST 'https://backend.net0.com/v1/sites' \
--header 'x-api-key: <API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"address": {
"address": "New Providence Garden, Lekki, Lagos",
"coordinates": {
"lat": "6.457828405855804",
"lng": "3.553892929988102"
}
},
"avatarUrl": "https://picsum.photos/200/300",
"possessionType": "Owned",
"name": "New Providence Site",
"area": 75,
"unit": "M2",
"countryId": 39,
"gridRegionId": 28
}'
Request Body
{
"address": {
"address": "Address",
"coordinates": {
"lat": "lat",
"lng": "lng"
}
},
"avatarUrl": "string",
"possessionType": "Owned",
"name": "string",
"area": 0,
"unit": "M2",
"countryId": 0,
"gridRegionId": 0
}
Field Parameters
Attribute | Type | Description | Required |
---|---|---|---|
address | Object | An object containing the address and coordinates in latitude and longitude of the site. | true |
avatarUrl | String | The image url of the site. | false |
possessionType | String | Default value of "owned". | true |
name | String | The name of the site. | true |
area | Number | The area of the site measured in square meter(sq/m) | true |
unit | String | The unit of the site. | true |
countryId | Number | The id of the country where the site is located. | true |
gridRegionId | Number | The id of the grid region in which the site is located | false |
Response
The response is the created site.
{
"address": {
"address": "New Providence Garden, Lekki, Lagos",
"coordinates": {
"lat": "6.457828405855804",
"lng": "3.553892929988102"
}
},
"avatarUrl": "https://picsum.photos/200/300",
"possessionType": "Owned",
"name": "New Providence Site",
"area": 75,
"unit": "M2",
"countryId": 39,
"gridRegionId": 28,
"companyId": 2,
"id": "d7f67e75-ca96-4374-8702-fab50dd43b43",
"totalEmission": 0,
"createdAt": "2021-11-25T21:41:06.085Z",
"updatedAt": "2021-11-25T21:41:06.085Z"
}