All URIs are relative to https://api.eduframe.nl/api/v1
| Method | HTTP request | Description |
|---|---|---|
| CreateInvoice | Post /invoices | Create an invoice. |
| GetInvoiceById | Get /invoices/{id} | Get an invoice record |
| GetInvoicePdfById | Get /invoices/{id}/pdf | Get the base64 encoded version of the invoice PDF |
| GetInvoices | Get /invoices | Get all invoice records |
| OpenInvoiceById | Post /invoices/{id}/open | Changes the state from concept to open. This will assign the actual invoice number so it's ready for sending. If the current state is not concept, this endpoint does nothing. |
InvoiceWithIncludes CreateInvoice(ctx).CreateInvoiceRequest(createInvoiceRequest).Execute()
Create an invoice.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
createInvoiceRequest := *openapiclient.NewCreateInvoiceRequest(int32(123)) // CreateInvoiceRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.CreateInvoice(context.Background()).CreateInvoiceRequest(createInvoiceRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.CreateInvoice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateInvoice`: InvoiceWithIncludes
fmt.Fprintf(os.Stdout, "Response from `InvoicesAPI.CreateInvoice`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateInvoiceRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| createInvoiceRequest | CreateInvoiceRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InvoiceWithIncludes GetInvoiceById(ctx, id).Execute()
Get an invoice record
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
id := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.GetInvoiceById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.GetInvoiceById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetInvoiceById`: InvoiceWithIncludes
fmt.Fprintf(os.Stdout, "Response from `InvoicesAPI.GetInvoiceById`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 |
Other parameters are passed through a pointer to a apiGetInvoiceByIdRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]map[string]interface{} GetInvoicePdfById(ctx, id).Execute()
Get the base64 encoded version of the invoice PDF
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
id := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.GetInvoicePdfById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.GetInvoicePdfById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetInvoicePdfById`: map[string]map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `InvoicesAPI.GetInvoicePdfById`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 |
Other parameters are passed through a pointer to a apiGetInvoicePdfByIdRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
map[string]map[string]interface{}
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]InvoiceWithIncludes GetInvoices(ctx).AccountId(accountId).Status(status).Cursor(cursor).PerPage(perPage).Execute()
Get all invoice records
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
accountId := int32(56) // int32 | Filter results on account_id (optional)
status := []openapiclient.InvoiceStatus{openapiclient.InvoiceStatus("concept")} // []InvoiceStatus | Filter results on status (optional)
cursor := "cursor_example" // string | **Note**: It's almost never necessary to use this parameter directly, the URL should be retrieved from the `Link` header. The cursor used to fetch the next result set. (optional)
perPage := int32(10) // int32 | The number of results to retrieve for this page. (optional) (default to 25)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.GetInvoices(context.Background()).AccountId(accountId).Status(status).Cursor(cursor).PerPage(perPage).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.GetInvoices``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetInvoices`: []InvoiceWithIncludes
fmt.Fprintf(os.Stdout, "Response from `InvoicesAPI.GetInvoices`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetInvoicesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| accountId | int32 | Filter results on account_id | |
| status | []InvoiceStatus | Filter results on status | |
| cursor | string | Note: It's almost never necessary to use this parameter directly, the URL should be retrieved from the `Link` header. The cursor used to fetch the next result set. | |
| perPage | int32 | The number of results to retrieve for this page. | [default to 25] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InvoiceWithIncludes OpenInvoiceById(ctx, id).Execute()
Changes the state from concept to open. This will assign the actual invoice number so it's ready for sending. If the current state is not concept, this endpoint does nothing.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
id := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.OpenInvoiceById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.OpenInvoiceById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `OpenInvoiceById`: InvoiceWithIncludes
fmt.Fprintf(os.Stdout, "Response from `InvoicesAPI.OpenInvoiceById`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 |
Other parameters are passed through a pointer to a apiOpenInvoiceByIdRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]