All URIs are relative to https://api-v2.fattureincloud.it
Method | HTTP request | Description |
---|---|---|
CreateReceipt | Post /c/{company_id}/receipts | Create Receipt |
DeleteReceipt | Delete /c/{company_id}/receipts/{document_id} | Delete Receipt |
GetReceipt | Get /c/{company_id}/receipts/{document_id} | Get Receipt |
GetReceiptPreCreateInfo | Get /c/{company_id}/receipts/info | Get Receipt Pre-Create Info |
GetReceiptsMonthlyTotals | Get /c/{company_id}/receipts/monthly_totals | Get Receipts Monthly Totals |
ListReceipts | Get /c/{company_id}/receipts | List Receipts |
ModifyReceipt | Put /c/{company_id}/receipts/{document_id} | Modify Receipt |
CreateReceiptResponse CreateReceipt(ctx, companyId).CreateReceiptRequest(createReceiptRequest).Execute()
Create Receipt
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.
createReceiptRequest := *fattureincloud.NewCreateReceiptRequest() // CreateReceiptRequest | The Receipt to create. (optional)
auth := context.WithValue(context.Background(), fattureincloudapi.ContextAccessToken, "ACCESS_TOKEN")
configuration := fattureincloudapi.NewConfiguration()
apiClient := fattureincloudapi.NewAPIClient(configuration)
resp, r, err := apiClient.ReceiptsAPI.CreateReceipt(auth, companyId).CreateReceiptRequest(createReceiptRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReceiptsAPI.CreateReceipt``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateReceipt`: CreateReceiptResponse
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 apiCreateReceiptRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createReceiptRequest | CreateReceiptRequest | The Receipt to create. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteReceipt(ctx, companyId, documentId).Execute()
Delete Receipt
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.
documentId := int32(56) // int32 | The ID of the document.
auth := context.WithValue(context.Background(), fattureincloudapi.ContextAccessToken, "ACCESS_TOKEN")
configuration := fattureincloudapi.NewConfiguration()
apiClient := fattureincloudapi.NewAPIClient(configuration)
resp, r, err := apiClient.ReceiptsAPI.DeleteReceipt(auth, companyId, documentId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReceiptsAPI.DeleteReceipt``: %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. | |
documentId | int32 | The ID of the document. |
Other parameters are passed through a pointer to a apiDeleteReceiptRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetReceiptResponse GetReceipt(ctx, companyId, documentId).Fields(fields).Fieldset(fieldset).Execute()
Get Receipt
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.
documentId := int32(56) // int32 | The ID of the document.
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.ReceiptsAPI.GetReceipt(auth, companyId, documentId).Fields(fields).Fieldset(fieldset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReceiptsAPI.GetReceipt``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetReceipt`: GetReceiptResponse
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. | |
documentId | int32 | The ID of the document. |
Other parameters are passed through a pointer to a apiGetReceiptRequest 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]
GetReceiptPreCreateInfoResponse GetReceiptPreCreateInfo(ctx, companyId).Execute()
Get Receipt Pre-Create 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.ReceiptsAPI.GetReceiptPreCreateInfo(auth, companyId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReceiptsAPI.GetReceiptPreCreateInfo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetReceiptPreCreateInfo`: GetReceiptPreCreateInfoResponse
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 apiGetReceiptPreCreateInfoRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
GetReceiptPreCreateInfoResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetReceiptsMonthlyTotalsResponse GetReceiptsMonthlyTotals(ctx, companyId).Type_(type_).Year(year).Execute()
Get Receipts Monthly Totals
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.
type_ := "type__example" // string | Receipt Type
year := "year_example" // string | Year for which you want monthly totals
auth := context.WithValue(context.Background(), fattureincloudapi.ContextAccessToken, "ACCESS_TOKEN")
configuration := fattureincloudapi.NewConfiguration()
apiClient := fattureincloudapi.NewAPIClient(configuration)
resp, r, err := apiClient.ReceiptsAPI.GetReceiptsMonthlyTotals(auth, companyId).Type_(type_).Year(year).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReceiptsAPI.GetReceiptsMonthlyTotals``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetReceiptsMonthlyTotals`: GetReceiptsMonthlyTotalsResponse
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 apiGetReceiptsMonthlyTotalsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
type_ | string | Receipt Type | year | string | Year for which you want monthly totals |
GetReceiptsMonthlyTotalsResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListReceiptsResponse ListReceipts(ctx, companyId).Fields(fields).Fieldset(fieldset).Page(page).PerPage(perPage).Sort(sort).Q(q).Execute()
List Receipts
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)
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)
sort := "sort_example" // string | List of comma-separated fields for result sorting (minus for desc sorting). (optional)
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.ReceiptsAPI.ListReceipts(auth, companyId).Fields(fields).Fieldset(fieldset).Page(page).PerPage(perPage).Sort(sort).Q(q).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReceiptsAPI.ListReceipts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListReceipts`: ListReceiptsResponse
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 apiListReceiptsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
fields | string | List of comma-separated fields. | fieldset | string | Name of the fieldset. | page | int32 | The page to retrieve. | [default to 1] perPage | int32 | The size of the page. | [default to 5] sort | string | List of comma-separated fields for result sorting (minus for desc sorting). | 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]
ModifyReceiptResponse ModifyReceipt(ctx, companyId, documentId).ModifyReceiptRequest(modifyReceiptRequest).Execute()
Modify Receipt
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.
documentId := int32(56) // int32 | The ID of the document.
modifyReceiptRequest := *fattureincloud.NewModifyReceiptRequest() // ModifyReceiptRequest | Modified receipt. (optional)
auth := context.WithValue(context.Background(), fattureincloudapi.ContextAccessToken, "ACCESS_TOKEN")
configuration := fattureincloudapi.NewConfiguration()
apiClient := fattureincloudapi.NewAPIClient(configuration)
resp, r, err := apiClient.ReceiptsAPI.ModifyReceipt(auth, companyId, documentId).ModifyReceiptRequest(modifyReceiptRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReceiptsAPI.ModifyReceipt``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ModifyReceipt`: ModifyReceiptResponse
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. | |
documentId | int32 | The ID of the document. |
Other parameters are passed through a pointer to a apiModifyReceiptRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
modifyReceiptRequest | ModifyReceiptRequest | Modified receipt. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]