API methods for consumer invoicing in Norway. For new integrations, we recommend using the REST API instead.
b2c_issuer_agreement_order
For opening Norwegian B2C agreement for a company. Input is name and email address of a person with rights to accept such an agreement on behalf of the company.
The agreement acceptance link is sent via email to the signer. The signer does not need to log in to accept the agreement.
/v1.1/api/b2c_issuer_agreement_order
api_keys (ApiKeys)
| Key |
Type |
Description |
| company_uuid |
string |
UUID of current company |
| user_api_key |
string |
User API key |
| vendor_api_key |
string |
Partner software API key |
| Key |
Type |
Description |
| signer_name |
string |
|
| signer_email |
string |
|
Output
| Key |
Type |
Description |
| return |
string |
Status message |
Return values
| Key |
Type |
Message |
Description |
| status |
string |
OK: Email sent to @signer_email |
|
| |
|
ERROR: NO RIGHTS |
Only admin user can order |
| |
|
ERROR: signer_name or signer_email missing or invalid |
|
| |
|
ERROR: ocr_account_number is invalid |
|
| |
|
ERROR: ocr_kid_length is invalid |
|
| |
|
ERROR: ocr_reference_position syntax is invalid |
|
| |
|
ERROR: Bid check towards Nets failed |
|
| |
|
ERROR: Unexpected error |
|
disable_b2c_issuer_agreement
For closing Norwegian B2C agreement for a company. The agreement can be disabled only if it is CONFIRMED. User cannot disable a PENDING agreement.
/v1.1/api/disable_b2c_issuer_agreement
api_keys (ApiKeys)
| Key |
Type |
Description |
| company_uuid |
string |
UUID of current company |
| user_api_key |
string |
User API key |
| vendor_api_key |
string |
Partner software API key |
Output
| Key |
Type |
Description |
| return |
string |
Status message |
Return values
| Key |
Type |
Message |
Description |
| status |
string |
OK |
|
| |
|
ERROR: NO RIGHTS |
Only admin user can disable |
| |
|
ERROR: Company agreement not found |
|
| |
|
ERROR: Cannot disable agreement. Issuer state is #{status} |
Agreement is not in correct state |
| |
|
ERROR: Unexpected error |
|
consumer_agreement_status
Checking status of an existing consumer agreement.
Status of ACTIVE means the consumer is ready to receive invoices.
/v1.1/api/consumer_agreement_status
api_keys (ApiKeys)
| Key |
Type |
Description |
| company_uuid |
string |
UUID of current company |
| user_api_key |
string |
User API key |
| vendor_api_key |
string |
Partner software API key |
| Key |
Type |
Description |
| reference_nr |
string |
|
Output
| Key |
Type |
Description |
| return |
string |
Status message |
Return values
| Key |
Type |
Message |
Description |
| status |
string |
OK: @status |
One of: REQUEST_SENT, NEW, ACCEPTED, ACTIVE, DELETED, REJECTED, ERROR |
| |
|
ERROR: CONSUMER NOT FOUND |
|
| |
|
ERROR: Unexpected error |
|
consumer_agreements_query
Checking status of existing consumer agreements.
/v1.1/api/consumer_agreements_query
api_keys (ApiKeys)
| Key |
Type |
Description |
| company_uuid |
string |
UUID of current company |
| user_api_key |
string |
User API key |
| vendor_api_key |
string |
Partner software API key |
query (ConsumerAgreementQuery)
| Key |
Type |
Description |
| name |
string |
|
| phone |
string |
|
| email |
string |
|
| state |
string |
One of: REQUEST_SENT, NEW, ACCEPTED, ACTIVE, DELETED, REJECTED, ERROR |
| reference_nr |
string |
|
| customer_nr |
string |
|
| timestamp |
string |
Format YYYYMMDDHHMMSS |
Output
return (ConsumerAgreementQueryResponse)
| Key |
Type |
Description |
| status |
string |
|
| agreements |
ConsumerInfoOutArray |
Array of ConsumerInfoOut |
agreements (ConsumerInfoOut)
| Key |
Type |
Description |
| state |
string |
One of: REQUEST_SENT, NEW, ACCEPTED, ACTIVE, DELETED, REJECTED, ERROR |
| name |
string |
|
| phone |
string |
|
| email |
string |
|
| reference_nr |
string |
|
| customer_nr |
string |
|
Return values
| Key |
Type |
Message |
Description |
| status |
string |
OK |
|
| |
|
ERROR: Timestamp format error |
Invalid timestamp format |
| |
|
ERROR: No agreements found |
|
| |
|
ERROR: Unexpected error |
|
vendor_consumer_agreements_query
Checking status of existing consumer agreements by query for all companies under given vendor_api_key.
/v1.1/api/vendor_consumer_agreements_query
api_keys (ApiKeys)
| Key |
Type |
Description |
| company_uuid |
string |
UUID of current company |
| user_api_key |
string |
User API key |
| vendor_api_key |
string |
Partner software API key |
query (ConsumerAgreementQuery)
| Key |
Type |
Description |
| name |
string |
|
| phone |
string |
|
| email |
string |
|
| state |
string |
One of: REQUEST_SENT, NEW, ACCEPTED, ACTIVE, DELETED, REJECTED, ERROR |
| reference_nr |
string |
|
| customer_nr |
string |
|
| timestamp |
string |
Format YYYYMMDDHHMMSS (For example 20180401152042) |
Output
return (VendorConsumerAgreementQueryResponse)
| Key |
Type |
Description |
| status |
string |
|
| results |
VendorConsumerAgreementQueryResultArray |
Array of VendorConsumerAgreementQueryResult |
results (VendorConsumerAgreementQueryResult)
| Key |
Type |
Description |
| company_id |
string |
|
| agreements |
ConsumerInfoOutArray |
Array of ConsumerInfoOut |
agreements (ConsumerInfoOut)
| Key |
Type |
Description |
| state |
string |
One of: REQUEST_SENT, NEW, ACCEPTED, ACTIVE, DELETED, REJECTED, ERROR |
| name |
string |
|
| phone |
string |
|
| email |
string |
|
| reference_nr |
string |
|
| customer_nr |
string |
|
Return values
| Key |
Type |
Message |
Description |
| status |
string |
OK |
|
| |
|
ERROR: Timestamp format error |
|
| |
|
ERROR: No rights to vendor API key |
|
| |
|
ERROR: Unexpected error |
|
atg_mandate_list
Lists changes to consumer AvtaleGiro mandates. Returns all changes after given timestamp.
/v1.1/api/atg_mandate_list
api_keys (ApiKeys)
| Key |
Type |
Description |
| company_uuid |
string |
UUID of current company |
| user_api_key |
string |
User API key |
| vendor_api_key |
string |
Partner software API key |
| Key |
Type |
Description |
| timestamp |
string |
Format YYYYMMDDHHMMSS |
Output
return (AtgMandateListResponse)
| Key |
Type |
Description |
| status |
string |
|
| atg_mandates |
AtgMandateParamArray |
AvtaleGiro mandates |
atg_mandates (AtgMandateParam)
| Key |
Type |
Description |
| kid |
string |
|
| account_number |
string |
|
| notification |
boolean |
1 — consumer wants to be notified of AvtaleGiro sends, 0 — consumer does not want notification |
| status |
integer |
1 — active, 0 — inactive |
| updated_timestamp |
string |
|
Return values
| Key |
Type |
Message |
Description |
| status |
string |
OK |
|
| |
|
ERROR: Timestamp format error |
|
| |
|
ERROR: No rights to settings |
|
| |
|
ERROR: Unexpected error |
|
Used after setting up an AvtaleGiro agreement with the bank to inform AutoInvoice about the settings used so that changes to consumer mandates can be imported and used in routing.
/v1.1/api/atg_agreement_configure
api_keys (ApiKeys)
| Key |
Type |
Description |
| company_uuid |
string |
UUID of current company |
| user_api_key |
string |
User API key |
| vendor_api_key |
string |
Partner software API key |
| Key |
Type |
Description |
| account_number |
string |
Same account number as in the AvtaleGiro agreement |
| kid_length |
integer |
Same KID length as in the AvtaleGiro agreement |
| reference_position |
string |
Same reference position as in the AvtaleGiro agreement. Example 1-6
|
| payment_type_position |
string |
Same payment type position number as in the AvtaleGiro agreement. Example 1-6
|
| options |
string |
Can be used to disable print and/or email notifications when sending AvtaleGiro without eFaktura agreement. JSON format with keys notif_print and notif_email either true or false. Defaults to both true if not given. Example {"notif_print":false,"notif_email":true}
|
Output
| Key |
Type |
Description |
| return |
string |
|
Return values
| Key |
Type |
Message |
| return |
string |
OK |
| |
|
ERROR: Invalid payment_type_position |
| |
|
ERROR: Invalid reference_position |
| |
|
ERROR: Invalid kid_length |
| |
|
ERROR: Invalid account_number |
| |
|
ERROR: OPTIONS PARAMETER FORMAT IS INVALID |
| |
|
ERROR: UNKNOWN ERROR |