All URIs are relative to https://api-v2.fattureincloud.it
| Method | HTTP request | Description |
|---|---|---|
| CreateSupplier | Post /c/{company_id}/entities/suppliers | Create Supplier |
| DeleteSupplier | Delete /c/{company_id}/entities/suppliers/{supplier_id} | Delete Supplier |
| GetSupplier | Get /c/{company_id}/entities/suppliers/{supplier_id} | Get Supplier |
| ListSuppliers | Get /c/{company_id}/entities/suppliers | List Suppliers |
| ModifySupplier | Put /c/{company_id}/entities/suppliers/{supplier_id} | Modify Supplier |
CreateSupplierResponse CreateSupplier(ctx, companyId).CreateSupplierRequest(createSupplierRequest).Execute()
Create Supplier
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.
createSupplierRequest := *fattureincloud.NewCreateSupplierRequest() // CreateSupplierRequest | The supplier to create (optional)
auth := context.WithValue(context.Background(), fattureincloudapi.ContextAccessToken, "ACCESS_TOKEN")
configuration := fattureincloudapi.NewConfiguration()
apiClient := fattureincloudapi.NewAPIClient(configuration)
resp, r, err := apiClient.SuppliersAPI.CreateSupplier(auth, companyId).CreateSupplierRequest(createSupplierRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SuppliersAPI.CreateSupplier``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateSupplier`: CreateSupplierResponse
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 apiCreateSupplierRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
createSupplierRequest | CreateSupplierRequest | The supplier to create |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteSupplier(ctx, companyId, supplierId).Execute()
Delete Supplier
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.
supplierId := int32(56) // int32 | The ID of the supplier.
auth := context.WithValue(context.Background(), fattureincloudapi.ContextAccessToken, "ACCESS_TOKEN")
configuration := fattureincloudapi.NewConfiguration()
apiClient := fattureincloudapi.NewAPIClient(configuration)
resp, r, err := apiClient.SuppliersAPI.DeleteSupplier(auth, companyId, supplierId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SuppliersAPI.DeleteSupplier``: %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. | |
| supplierId | int32 | The ID of the supplier. |
Other parameters are passed through a pointer to a apiDeleteSupplierRequest 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]
GetSupplierResponse GetSupplier(ctx, companyId, supplierId).Fields(fields).Fieldset(fieldset).Execute()
Get Supplier
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.
supplierId := int32(56) // int32 | The ID of the supplier.
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.SuppliersAPI.GetSupplier(auth, companyId, supplierId).Fields(fields).Fieldset(fieldset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SuppliersAPI.GetSupplier``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSupplier`: GetSupplierResponse
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. | |
| supplierId | int32 | The ID of the supplier. |
Other parameters are passed through a pointer to a apiGetSupplierRequest 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]
ListSuppliersResponse ListSuppliers(ctx, companyId).Fields(fields).Fieldset(fieldset).Sort(sort).Page(page).PerPage(perPage).Q(q).Execute()
List Suppliers
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.SuppliersAPI.ListSuppliers(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 `SuppliersAPI.ListSuppliers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListSuppliers`: ListSuppliersResponse
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 apiListSuppliersRequest 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]
ModifySupplierResponse ModifySupplier(ctx, companyId, supplierId).ModifySupplierRequest(modifySupplierRequest).Execute()
Modify Supplier
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.
supplierId := int32(56) // int32 | The ID of the supplier.
modifySupplierRequest := *fattureincloud.NewModifySupplierRequest() // ModifySupplierRequest | The modified Supplier. 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.SuppliersAPI.ModifySupplier(auth, companyId, supplierId).ModifySupplierRequest(modifySupplierRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SuppliersAPI.ModifySupplier``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ModifySupplier`: ModifySupplierResponse
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. | |
| supplierId | int32 | The ID of the supplier. |
Other parameters are passed through a pointer to a apiModifySupplierRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
modifySupplierRequest | ModifySupplierRequest | The modified Supplier. 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]