Skip to main content
Aria Knowledge Central

gen_einvoice_m

Summary

API Name gen_einvoice_m
Class transaction_services_m
Update Version 74

Description

Generates, sends, or resends the e-invoice document for a single invoice. Identify the invoice with invoice_no, or supply einvoice_seq_no to act on a specific previously generated document for that invoice.

Inputs

Name Type Length Required Description
client_no long 22 Yes

Aria-assigned unique identifier indicating the Aria client providing service to this account.

auth_key string 32 No

Aria-assigned unique key for authenticating the validity of the requestor. This key is passed with each method call.

acct_no long 22 Yes

Aria-assigned account identifier. This value is unique across all Aria-managed accounts.

Alternative required field: client_acct_id

client_acct_id string 50 Yes

Client-defined account identifier.

Alternative required field: acct_no

einvoice_seq_no long 22 Yes

Identifies one specific, previously generated e-invoice document (as returned in get_einvoice_statement_m). Required when einvoice_directive = 3 to resend an exact document; if omitted for a resend, the latest document for the given invoice is resent instead. Takes priority over invoice_no when both are supplied.

Alternative required field: invoice_no

invoice_no long 22 Yes

The invoice to generate, send, or resend the e-invoice for. One e-invoice document is produced for this invoice.

Alternative required field: einvoice_seq_no

einvoice_directive long 1 Yes

Specifies the action to perform.

Allowed values:

Value Description
1 Generate and send
2 Generate and don't send
3 Resend an existing e-invoice document
include_einvoice_data long 1 No

Whether to return the generated or resent e-invoice document (einvoice_data) in the response, or only the confirmation/status fields. Since the document payload can be large, callers that only need confirmation of success can omit it to avoid the added response size. Default is 0.

Allowed values:

Value Description
0 Do not include einvoice_data in response (default)
1 Include einvoice_data in response
do_write string 5 No

Boolean indicator that specifies whether to actually perform the requested operation. If 'false' is passed in this field, Aria calculates, if applicable, any potential effects from this call such as proration, plan assignments, etc. and return all relevant data without actually performing the requested operation or making any changes to the account. This is useful to interfaces that want to present the user with a 'confirmation page' informing them of the potential effects of the requested operation prior to actually performing it. Do_write defaults to 'true'

Allowed values:

Value Description
True  
False  

Outputs

Name Type Length Required Description
error_code long   No

Aria-assigned error identifier. 0 indicates no error.

error_msg string   No

Description of any error that occurred. "OK" if there was no error.

einvoice_seq_no long   No

The sequence number of the generated or resent document.

einvoice_status_ind long   No

The statement's e-invoicing status.

Allowed values:

Value Description
0 Pending
1 Done
2 Partial
3 Failed
4 Not Eligible
einvoice_data string   No

The generated e-invoice XML payload for the specified invoice. Populated only when include_einvoice_data is set.

TOP
  • Was this article helpful?