# Organizations

## Gets all Organizations

<mark style="color:blue;">`GET`</mark> `https://www.moderan.net/api/domains/DOMAIN_ID/properties/0/organizationsapi`

This endpoint allows you to **get all Organizations** from Moderan\ <br>

#### Path Parameters

| Name       | Type   | Description         |
| ---------- | ------ | ------------------- |
| DOMAIN\_ID | String | Domain ID of client |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Create an organization

<mark style="color:green;">`POST`</mark> `https://www.moderan.net/api/domains/:domainId/propertysets/0/organizations`

This endpoint allows you to **create an Organizations**

#### Path Parameters

| Name     | Type   | Description         |
| -------- | ------ | ------------------- |
| domainId | String | Domain ID of client |

{% tabs %}
{% tab title="201: Created " %}

{% endtab %}
{% endtabs %}

## Update an organization

<mark style="color:orange;">`PUT`</mark> `https://www.moderan.net/api/domains/:domainId/propertysets/0/organizations/:organizationId`

#### Path Parameters

| Name           | Type   | Description                   |
| -------------- | ------ | ----------------------------- |
| domainId       | String | Domain ID of client           |
| organizationId | String | Organization ID being changed |

{% tabs %}
{% tab title="204: No Content " %}

{% endtab %}
{% endtabs %}

POST/PUT payload

```json
{
   "name":"My organization",
   "accountingCode":"35197FA",
   "legalAddress":{
      "street":"Puiestee 33",
      "postalCode":"50511",
      "city":"Tallinn",
      "county":"Harjumaa",
      "country":"EE"
   },
   "postalAddress":{
      "street":"Puiestee 33",
      "postalCode":"50511",
      "city":"Tallinn",
      "county":"Harjumaa",
      "country":"EE"
   },
   "registryCode":"REG33",
   "emailGeneral":"admin@example.com",
   "emailInvoice":"invoice@example.com",
   "phone1":"53143335",
   "phone2":"53143335",
   "notes":"my notes",
   "industry":"Steel industry",
   "vat":"EE221095811323",
   "website":"www.google.com",
   "invoiceInEnglish":true,
}
```
