# Fortnox\FortnoxProjectsApi



All URIs are relative to https://api.fortnox.se, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**projectsControllerDoCreate()**](FortnoxProjectsApi.md#projectsControllerDoCreate) | **POST** /3/projects | Create a project |
| [**projectsControllerDoDelete()**](FortnoxProjectsApi.md#projectsControllerDoDelete) | **DELETE** /3/projects/{ProjectNumber} | Remove a project |
| [**projectsControllerDoIndex()**](FortnoxProjectsApi.md#projectsControllerDoIndex) | **GET** /3/projects | Retrieve a list of projects |
| [**projectsControllerDoShow()**](FortnoxProjectsApi.md#projectsControllerDoShow) | **GET** /3/projects/{ProjectNumber} | Retrieve a single project |
| [**projectsControllerDoUpdate()**](FortnoxProjectsApi.md#projectsControllerDoUpdate) | **PUT** /3/projects/{ProjectNumber} | Update a project |


## `projectsControllerDoCreate()`

```php
projectsControllerDoCreate($project): \Fortnox\Model\FortnoxProjectProjectSingleItemWrap
```

Create a project

Create a project

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Fortnox\Api\FortnoxProjectsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$project = new \Fortnox\Model\FortnoxProjectProjectSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxProjectProjectSinglePayloadItemWrap | Request body for create project

try {
    $result = $apiInstance->projectsControllerDoCreate($project);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxProjectsApi->projectsControllerDoCreate: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **project** | [**\Fortnox\Model\FortnoxProjectProjectSinglePayloadItemWrap**](../Model/FortnoxProjectProjectSinglePayloadItemWrap.md)| Request body for create project | [optional] |

### Return type

[**\Fortnox\Model\FortnoxProjectProjectSingleItemWrap**](../Model/FortnoxProjectProjectSingleItemWrap.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `projectsControllerDoDelete()`

```php
projectsControllerDoDelete($project_number)
```

Remove a project

Delete a project

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Fortnox\Api\FortnoxProjectsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$project_number = 56; // int | identifies the project

try {
    $apiInstance->projectsControllerDoDelete($project_number);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxProjectsApi->projectsControllerDoDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **project_number** | **int**| identifies the project | |

### Return type

void (empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `projectsControllerDoIndex()`

```php
projectsControllerDoIndex($description, $projectleader): \Fortnox\Model\FortnoxProjectProjectListItemWrap
```

Retrieve a list of projects

The project register can return a list of records or a single record. By specifying a ProjectNumber in the URL, a single record will be returned. If no ProjectNumber is provided, a list of records will be returned.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Fortnox\Api\FortnoxProjectsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$description = 'description_example'; // string | filter on description
$projectleader = 'projectleader_example'; // string | filter on project leader

try {
    $result = $apiInstance->projectsControllerDoIndex($description, $projectleader);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxProjectsApi->projectsControllerDoIndex: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **description** | **string**| filter on description | [optional] |
| **projectleader** | **string**| filter on project leader | [optional] |

### Return type

[**\Fortnox\Model\FortnoxProjectProjectListItemWrap**](../Model/FortnoxProjectProjectListItemWrap.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `projectsControllerDoShow()`

```php
projectsControllerDoShow($project_number): \Fortnox\Model\FortnoxProjectProjectSingleItemWrap
```

Retrieve a single project

Retrieve a project

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Fortnox\Api\FortnoxProjectsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$project_number = 56; // int | identifies the project

try {
    $result = $apiInstance->projectsControllerDoShow($project_number);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxProjectsApi->projectsControllerDoShow: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **project_number** | **int**| identifies the project | |

### Return type

[**\Fortnox\Model\FortnoxProjectProjectSingleItemWrap**](../Model/FortnoxProjectProjectSingleItemWrap.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `projectsControllerDoUpdate()`

```php
projectsControllerDoUpdate($project_number, $project): \Fortnox\Model\FortnoxProjectProjectSingleItemWrap
```

Update a project

Update a project

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Fortnox\Api\FortnoxProjectsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$project_number = 56; // int | identifies the project
$project = new \Fortnox\Model\FortnoxProjectProjectSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxProjectProjectSinglePayloadItemWrap | Request body for update project

try {
    $result = $apiInstance->projectsControllerDoUpdate($project_number, $project);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxProjectsApi->projectsControllerDoUpdate: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **project_number** | **int**| identifies the project | |
| **project** | [**\Fortnox\Model\FortnoxProjectProjectSinglePayloadItemWrap**](../Model/FortnoxProjectProjectSinglePayloadItemWrap.md)| Request body for update project | [optional] |

### Return type

[**\Fortnox\Model\FortnoxProjectProjectSingleItemWrap**](../Model/FortnoxProjectProjectSingleItemWrap.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
