aPIExportsController := client.APIExportsController()
APIExportsController
- List Exported Proforma Invoices
- List Exported Invoices
- List Exported Subscriptions
- Export Proforma Invoices
- Export Invoices
- Export Subscriptions
- Read Proforma Invoices Export
- Read Invoices Export
- Read Subscriptions Export
This API returns an array of exported proforma invoices for a provided batch_id
. Pay close attention to pagination in order to control responses from the server.
Example: GET https://{subdomain}.chargify.com/api_exports/proforma_invoices/123/rows?per_page=10000&page=1
.
ListExportedProformaInvoices(
ctx context.Context,
input ListExportedProformaInvoicesInput) (
models.ApiResponse[[]models.ProformaInvoice],
error)
Parameter | Type | Tags | Description |
---|---|---|---|
batchId |
string |
Template, Required | Id of a Batch Job. |
perPage |
*int |
Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100. The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000. Default: 100 Constraints: >= 1 , <= 10000 |
page |
*int |
Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned. Use in query page=1 .Default: 1 Constraints: >= 1 |
ctx := context.Background()
collectedInput := advancedbilling.ListExportedProformaInvoicesInput{
BatchId: "batch_id8",
PerPage: models.ToPointer(100),
Page: models.ToPointer(2),
}
apiResponse, err := aPIExportsController.ListExportedProformaInvoices(ctx, collectedInput)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
HTTP Status Code | Error Description | Exception Class |
---|---|---|
404 | Not Found | ApiError |
This API returns an array of exported invoices for a provided batch_id
. Pay close attention to pagination in order to control responses from the server.
Example: GET https://{subdomain}.chargify.com/api_exports/invoices/123/rows?per_page=10000&page=1
.
ListExportedInvoices(
ctx context.Context,
input ListExportedInvoicesInput) (
models.ApiResponse[[]models.Invoice],
error)
Parameter | Type | Tags | Description |
---|---|---|---|
batchId |
string |
Template, Required | Id of a Batch Job. |
perPage |
*int |
Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100. The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000. Default: 100 Constraints: >= 1 , <= 10000 |
page |
*int |
Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned. Use in query page=1 .Default: 1 Constraints: >= 1 |
ctx := context.Background()
collectedInput := advancedbilling.ListExportedInvoicesInput{
BatchId: "batch_id8",
PerPage: models.ToPointer(100),
Page: models.ToPointer(2),
}
apiResponse, err := aPIExportsController.ListExportedInvoices(ctx, collectedInput)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
HTTP Status Code | Error Description | Exception Class |
---|---|---|
404 | Not Found | ApiError |
This API returns an array of exported subscriptions for a provided batch_id
. Pay close attention to pagination in order to control responses from the server.
Example: GET https://{subdomain}.chargify.com/api_exports/subscriptions/123/rows?per_page=200&page=1
.
ListExportedSubscriptions(
ctx context.Context,
input ListExportedSubscriptionsInput) (
models.ApiResponse[[]models.Subscription],
error)
Parameter | Type | Tags | Description |
---|---|---|---|
batchId |
string |
Template, Required | Id of a Batch Job. |
perPage |
*int |
Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100. The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000. Default: 100 Constraints: >= 1 , <= 10000 |
page |
*int |
Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned. Use in query page=1 .Default: 1 Constraints: >= 1 |
ctx := context.Background()
collectedInput := advancedbilling.ListExportedSubscriptionsInput{
BatchId: "batch_id8",
PerPage: models.ToPointer(100),
Page: models.ToPointer(2),
}
apiResponse, err := aPIExportsController.ListExportedSubscriptions(ctx, collectedInput)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
HTTP Status Code | Error Description | Exception Class |
---|---|---|
404 | Not Found | ApiError |
This API creates a proforma invoices export and returns a batchjob object.
It is only available for Relationship Invoicing architecture.
ExportProformaInvoices(
ctx context.Context) (
models.ApiResponse[models.BatchJobResponse],
error)
ctx := context.Background()
apiResponse, err := aPIExportsController.ExportProformaInvoices(ctx)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
HTTP Status Code | Error Description | Exception Class |
---|---|---|
404 | Not Found | ApiError |
409 | Conflict | SingleErrorResponseException |
This API creates an invoices export and returns a batchjob object.
ExportInvoices(
ctx context.Context) (
models.ApiResponse[models.BatchJobResponse],
error)
ctx := context.Background()
apiResponse, err := aPIExportsController.ExportInvoices(ctx)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
HTTP Status Code | Error Description | Exception Class |
---|---|---|
404 | Not Found | ApiError |
409 | Conflict | SingleErrorResponseException |
This API creates a subscriptions export and returns a batchjob object.
ExportSubscriptions(
ctx context.Context) (
models.ApiResponse[models.BatchJobResponse],
error)
ctx := context.Background()
apiResponse, err := aPIExportsController.ExportSubscriptions(ctx)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
HTTP Status Code | Error Description | Exception Class |
---|---|---|
409 | Conflict | SingleErrorResponseException |
This API returns a batchjob object for proforma invoices export.
ReadProformaInvoicesExport(
ctx context.Context,
batchId string) (
models.ApiResponse[models.BatchJobResponse],
error)
Parameter | Type | Tags | Description |
---|---|---|---|
batchId |
string |
Template, Required | Id of a Batch Job. |
ctx := context.Background()
batchId := "batch_id8"
apiResponse, err := aPIExportsController.ReadProformaInvoicesExport(ctx, batchId)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
HTTP Status Code | Error Description | Exception Class |
---|---|---|
404 | Not Found | ApiError |
This API returns a batchjob object for invoices export.
ReadInvoicesExport(
ctx context.Context,
batchId string) (
models.ApiResponse[models.BatchJobResponse],
error)
Parameter | Type | Tags | Description |
---|---|---|---|
batchId |
string |
Template, Required | Id of a Batch Job. |
ctx := context.Background()
batchId := "batch_id8"
apiResponse, err := aPIExportsController.ReadInvoicesExport(ctx, batchId)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
HTTP Status Code | Error Description | Exception Class |
---|---|---|
404 | Not Found | ApiError |
This API returns a batchjob object for subscriptions export.
ReadSubscriptionsExport(
ctx context.Context,
batchId string) (
models.ApiResponse[models.BatchJobResponse],
error)
Parameter | Type | Tags | Description |
---|---|---|---|
batchId |
string |
Template, Required | Id of a Batch Job. |
ctx := context.Background()
batchId := "batch_id8"
apiResponse, err := aPIExportsController.ReadSubscriptionsExport(ctx, batchId)
if err != nil {
log.Fatalln(err)
} else {
// Printing the result and response
fmt.Println(apiResponse.Data)
fmt.Println(apiResponse.Response.StatusCode)
}
HTTP Status Code | Error Description | Exception Class |
---|---|---|
404 | Not Found | ApiError |