All URIs are relative to https://api-v2.fattureincloud.it
| Method | HTTP request | Description |
|---|---|---|
| CreateClient | Post /c/{company_id}/entities/clients | Create Client |
| DeleteClient | Delete /c/{company_id}/entities/clients/{client_id} | Delete Client |
| GetClient | Get /c/{company_id}/entities/clients/{client_id} | Get Client |
| GetClientInfo | Get /c/{company_id}/entities/clients/info | Get Client info |
| ListClients | Get /c/{company_id}/entities/clients | List Clients |
| ModifyClient | Put /c/{company_id}/entities/clients/{client_id} | Modify Client |
CreateClientResponse CreateClient(ctx, companyId).CreateClientRequest(createClientRequest).Execute()
Create Client
package main
import (
"context"
"encoding/json"
"fmt"
"os"
fattureincloudapi "github.com/fattureincloud/fattureincloud-go-sdk/v2/api"
fattureincloud "github.com/fattureincloud/fattureincloud-go-sdk/v2/model"
)
func main() {
companyId := int32(12345) // int32 | The ID of the company.
createClientRequest := *fattureincloud.NewCreateClientRequest() // CreateClientRequest | The client to create (optional)
auth := context.WithValue(context.Background(), fattureincloudapi.ContextAccessToken, "ACCESS_TOKEN")
configuration := fattureincloudapi.NewConfiguration()
apiClient := fattureincloudapi.NewAPIClient(configuration)
resp, r, err := apiClient.ClientsAPI.CreateClient(auth, companyId).CreateClientRequest(createClientRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClientsAPI.CreateClient``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateClient`: CreateClientResponse
json.NewEncoder(os.Stdout).Encode(resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| companyId | int32 | The ID of the company. |
Other parameters are passed through a pointer to a apiCreateClientRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
createClientRequest | CreateClientRequest | The client to create |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteClient(ctx, companyId, clientId).Execute()
Delete Client
package main
import (
"context"
"encoding/json"
"fmt"
"os"
fattureincloudapi "github.com/fattureincloud/fattureincloud-go-sdk/v2/api"
fattureincloud "github.com/fattureincloud/fattureincloud-go-sdk/v2/model"
)
func main() {
companyId := int32(12345) // int32 | The ID of the company.
clientId := int32(56) // int32 | The ID of the client.
auth := context.WithValue(context.Background(), fattureincloudapi.ContextAccessToken, "ACCESS_TOKEN")
configuration := fattureincloudapi.NewConfiguration()
apiClient := fattureincloudapi.NewAPIClient(configuration)
resp, r, err := apiClient.ClientsAPI.DeleteClient(auth, companyId, clientId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClientsAPI.DeleteClient``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| companyId | int32 | The ID of the company. | |
| clientId | int32 | The ID of the client. |
Other parameters are passed through a pointer to a apiDeleteClientRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetClientResponse GetClient(ctx, companyId, clientId).Fields(fields).Fieldset(fieldset).Execute()
Get Client
package main
import (
"context"
"encoding/json"
"fmt"
"os"
fattureincloudapi "github.com/fattureincloud/fattureincloud-go-sdk/v2/api"
fattureincloud "github.com/fattureincloud/fattureincloud-go-sdk/v2/model"
)
func main() {
companyId := int32(12345) // int32 | The ID of the company.
clientId := int32(56) // int32 | The ID of the client.
fields := "fields_example" // string | List of comma-separated fields. (optional)
fieldset := "fieldset_example" // string | Name of the fieldset. (optional)
auth := context.WithValue(context.Background(), fattureincloudapi.ContextAccessToken, "ACCESS_TOKEN")
configuration := fattureincloudapi.NewConfiguration()
apiClient := fattureincloudapi.NewAPIClient(configuration)
resp, r, err := apiClient.ClientsAPI.GetClient(auth, companyId, clientId).Fields(fields).Fieldset(fieldset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClientsAPI.GetClient``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetClient`: GetClientResponse
json.NewEncoder(os.Stdout).Encode(resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| companyId | int32 | The ID of the company. | |
| clientId | int32 | The ID of the client. |
Other parameters are passed through a pointer to a apiGetClientRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
fields | string | List of comma-separated fields. | fieldset | string | Name of the fieldset. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetEntityClientPreCreateInfoResponse GetClientInfo(ctx, companyId).Execute()
Get Client info
package main
import (
"context"
"encoding/json"
"fmt"
"os"
fattureincloudapi "github.com/fattureincloud/fattureincloud-go-sdk/v2/api"
fattureincloud "github.com/fattureincloud/fattureincloud-go-sdk/v2/model"
)
func main() {
companyId := int32(12345) // int32 | The ID of the company.
auth := context.WithValue(context.Background(), fattureincloudapi.ContextAccessToken, "ACCESS_TOKEN")
configuration := fattureincloudapi.NewConfiguration()
apiClient := fattureincloudapi.NewAPIClient(configuration)
resp, r, err := apiClient.ClientsAPI.GetClientInfo(auth, companyId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClientsAPI.GetClientInfo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetClientInfo`: GetEntityClientPreCreateInfoResponse
json.NewEncoder(os.Stdout).Encode(resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| companyId | int32 | The ID of the company. |
Other parameters are passed through a pointer to a apiGetClientInfoRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
GetEntityClientPreCreateInfoResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListClientsResponse ListClients(ctx, companyId).Fields(fields).Fieldset(fieldset).Sort(sort).Page(page).PerPage(perPage).Q(q).Execute()
List Clients
package main
import (
"context"
"encoding/json"
"fmt"
"os"
fattureincloudapi "github.com/fattureincloud/fattureincloud-go-sdk/v2/api"
fattureincloud "github.com/fattureincloud/fattureincloud-go-sdk/v2/model"
)
func main() {
companyId := int32(12345) // int32 | The ID of the company.
fields := "fields_example" // string | List of comma-separated fields. (optional)
fieldset := "fieldset_example" // string | Name of the fieldset. (optional)
sort := "sort_example" // string | List of comma-separated fields for result sorting (minus for desc sorting). (optional)
page := int32(56) // int32 | The page to retrieve. (optional) (default to 1)
perPage := int32(56) // int32 | The size of the page. (optional) (default to 5)
q := "q_example" // string | Query for filtering the results. (optional)
auth := context.WithValue(context.Background(), fattureincloudapi.ContextAccessToken, "ACCESS_TOKEN")
configuration := fattureincloudapi.NewConfiguration()
apiClient := fattureincloudapi.NewAPIClient(configuration)
resp, r, err := apiClient.ClientsAPI.ListClients(auth, companyId).Fields(fields).Fieldset(fieldset).Sort(sort).Page(page).PerPage(perPage).Q(q).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClientsAPI.ListClients``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListClients`: ListClientsResponse
json.NewEncoder(os.Stdout).Encode(resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| companyId | int32 | The ID of the company. |
Other parameters are passed through a pointer to a apiListClientsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
fields | string | List of comma-separated fields. | fieldset | string | Name of the fieldset. | sort | string | List of comma-separated fields for result sorting (minus for desc sorting). | page | int32 | The page to retrieve. | [default to 1] perPage | int32 | The size of the page. | [default to 5] q | string | Query for filtering the results. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModifyClientResponse ModifyClient(ctx, companyId, clientId).ModifyClientRequest(modifyClientRequest).Execute()
Modify Client
package main
import (
"context"
"encoding/json"
"fmt"
"os"
fattureincloudapi "github.com/fattureincloud/fattureincloud-go-sdk/v2/api"
fattureincloud "github.com/fattureincloud/fattureincloud-go-sdk/v2/model"
)
func main() {
companyId := int32(12345) // int32 | The ID of the company.
clientId := int32(56) // int32 | The ID of the client.
modifyClientRequest := *fattureincloud.NewModifyClientRequest() // ModifyClientRequest | The modified Client. First level parameters are managed in delta mode. (optional)
auth := context.WithValue(context.Background(), fattureincloudapi.ContextAccessToken, "ACCESS_TOKEN")
configuration := fattureincloudapi.NewConfiguration()
apiClient := fattureincloudapi.NewAPIClient(configuration)
resp, r, err := apiClient.ClientsAPI.ModifyClient(auth, companyId, clientId).ModifyClientRequest(modifyClientRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClientsAPI.ModifyClient``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ModifyClient`: ModifyClientResponse
json.NewEncoder(os.Stdout).Encode(resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| companyId | int32 | The ID of the company. | |
| clientId | int32 | The ID of the client. |
Other parameters are passed through a pointer to a apiModifyClientRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
modifyClientRequest | ModifyClientRequest | The modified Client. First level parameters are managed in delta mode. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]