Table of Contents
Payment Import
Overview
The application requires an IIS server with .NET Framework 4 installed.
The application accepts a formalized XML request in accordance with the attached schema. The XML request contains authentication information for Aviabit and a set of input parameters. After processing, the application returns an XML response in accordance with the attached schema. The web services were developed using an object-oriented approach.
Web Service Description
The web service is intended for importing payment data from an accounting system or third-party applications into Aviabit. The complete description of the web service can be found by opening the following page:
http://<server-address>/ImportPays.asmx?wsdl.
In addition to the authentication methods, the web service contains the following methods:
- General. Method for checking web service availability and database connection - GetDateTime;
Data Object Description
1.1. Customer Payment Object CustomerPay
The CustomerPay object is returned by the GetCustomerPays method and contains the fields listed in the table below.
| Field | Data Type | Description |
|---|---|---|
| RecordID | Number | Payment ID |
| CompanyID | Number | Customer ID |
| Company | String | Customer name |
| CompanyInn | String | Customer taxpayer identification number |
| CompanyKpp | String | Customer tax registration reason code |
| CompanyCodeAccount | String | Customer accounting code |
| CurrencyID | Number | Currency type |
| Currency | String | Currency name |
| CurrencyCode | String | Currency code |
| CurrencyCodeISO | Number | ISO currency code |
| ContractID | Number | Contract ID |
| ContractName | String | Internal contract name |
| ContractNameAlter | String | External contract name |
| DatePay | Date | Payment date, without time |
| AccountType | Number | 0 - planned transfer amount, 1 - actual amount |
| Comment | String | Additional information |
| Amount | Decimal number | Amount including VAT |
| AmountTax | Decimal number | VAT amount |
1.2. Customer Opening Balance Object CustomerBalance
The CustomerBalance object is returned by the GetCustomerBalances method and contains the fields listed in the table below.
| Field | Data Type | Description |
|---|---|---|
| RecordID | Number | Balance ID |
| CompanyID | Number | Customer ID |
| Company | String | Customer name |
| CompanyInn | String | Customer taxpayer identification number |
| CompanyKpp | String | Customer tax registration reason code |
| CompanyCodeAccount | String | Customer accounting code |
| CurrencyID | Number | Currency type |
| Currency | String | Currency name |
| CurrencyCode | String | Currency code |
| CurrencyCodeISO | Number | ISO currency code |
| ContractID | Number | Contract ID |
| ContractName | String | Internal contract name |
| ContractNameAlter | String | External contract name |
| DateBalance | Date | Balance date, without time |
| Comment | String | Additional information |
| Amount | Decimal number | Amount including VAT |
| AccountType | Number | 0 - planned transfer amount, 1 - actual amount |
1.3. Supplier Payment Object SupplierPay
The SupplierPay object is returned by the GetSupplierPays method and contains the fields listed in the table below.
| Field | Data Type | Description |
|---|---|---|
| RecordID | Number | Payment ID |
| CompanyID | Number | Supplier ID |
| Company | String | Supplier name |
| CompanyInn | String | Supplier taxpayer identification number |
| CompanyKpp | String | Supplier tax registration reason code |
| CompanyCodeAccount | String | Supplier accounting code |
| CurrencyID | Number | Currency type |
| Currency | String | Currency name |
| CurrencyCode | String | Currency code |
| CurrencyCodeISO | Number | ISO currency code |
| ContractID | Number | Contract ID |
| ContractName | String | Internal contract name |
| ContractNameAlter | String | External contract name |
| DatePay | Date | Payment date, without time |
| AccountType | Number | 0 - planned transfer amount, 1 - actual amount |
| Comment | String | Additional information |
| Amount | Decimal number | Amount including VAT |
| AmountTax | Decimal number | VAT amount |
1.4. Supplier Opening Balance Object SupplierBalance
The SupplierBalance object is returned by the GetSupplierBalances method and contains the fields listed in the table below.
| Field | Data Type | Description |
|---|---|---|
| RecordID | Number | Balance ID |
| CompanyID | Number | Supplier ID |
| Company | String | Supplier name |
| CompanyInn | String | Supplier taxpayer identification number |
| CompanyKpp | String | Supplier tax registration reason code |
| CompanyCodeAccount | String | Supplier accounting code |
| CurrencyID | Number | Currency type |
| Currency | String | Currency name |
| CurrencyCode | String | Currency code |
| CurrencyCodeISO | Number | ISO currency code |
| ContractID | Number | Contract ID |
| ContractName | String | Internal contract name |
| ContractNameAlter | String | External contract name |
| DateBalance | Date | Balance date, without time |
| Comment | String | Additional information |
| Amount | Decimal number | Amount including VAT |
| AccountType | Number | 0 - planned transfer amount, 1 - actual amount |
1.5. Agent Payment Object AgencyPay
The AgencyPay object is returned by the GetAgencyPays method and contains the fields listed in the table below.
| Field | Data Type | Description |
|---|---|---|
| RecordID | Number | Payment ID |
| CompanyID | Number | Supplier ID |
| Company | String | Supplier name |
| CompanyInn | String | Supplier taxpayer identification number |
| CompanyKpp | String | Supplier tax registration reason code |
| CompanyCodeAccount | String | Supplier accounting code |
| CurrencyID | Number | Currency type |
| Currency | String | Currency name |
| CurrencyCode | String | Currency code |
| CurrencyCodeISO | Number | ISO currency code |
| ContractID | Number | Contract ID from the GetTicketContracts method |
| ContractName | String | Internal contract name from the GetTicketContracts method |
| DatePay | Date | Payment date, without time |
| AccountType | Number | 0 - planned transfer amount, 1 - actual amount |
| Comment | String | Additional information |
| Amount | Decimal number | Amount including VAT |
| AmountTax | Decimal number | VAT amount |
1.6. Agent Opening Balance Object AgencyBalance
The AgencyBalance object is returned by the GetAgencyBalances method and contains the fields listed in the table below.
| Field | Data Type | Description |
|---|---|---|
| RecordID | Number | Balance ID |
| CompanyID | Number | Supplier ID |
| Company | String | Supplier name |
| CompanyInn | String | Supplier taxpayer identification number |
| CompanyKpp | String | Supplier tax registration reason code |
| CompanyCodeAccount | String | Supplier accounting code |
| CurrencyID | Number | Currency type |
| Currency | String | Currency name |
| CurrencyCode | String | Currency code |
| CurrencyCodeISO | Number | ISO currency code |
| ContractID | Number | Contract ID from the GetTicketContracts method |
| ContractName | String | Internal contract name from the GetTicketContracts method |
| DateBalance | Date | Balance date, without time |
| Comment | String | Additional information |
| Amount | Decimal number | Amount including VAT |
| AccountType | Number | 0 - planned transfer amount, 1 - actual amount |
1.7. Request Object ContractRequest
The ContractRequest object is returned by the GetContractRequests method and contains the fields listed in the table below.
| Field | Data Type | Description |
|---|---|---|
| RecordID | Number | Request ID |
| CompanyID | Number | Customer ID |
| Company | String | Customer name |
| CompanyInn | String | Customer taxpayer identification number |
| CompanyKpp | String | Customer tax registration reason code |
| CompanyCodeAccount | String | Customer accounting code |
| ContractID | Number | Contract ID |
| ContractName | String | Internal contract name |
| ContractNameAlter | String | External contract name |
| Name | String | Request name/number |
| DateBegin | Date | Request validity start date |
| DateEnd | Date | Request validity end date |
| Date | Date | Request date |
| Comment | String | Additional information |
1.8. Company Object Companys
The GetCompanys method returns a list of Companys objects. This object represents a company card containing the following information:
| Field | Data Type | Description |
|---|---|---|
| ID | Number | Company ID in Aviabit |
| Name | String | Name |
| NameEng | String | English name |
| FullName | String | Full name |
| FullNameEng | String | Full English name |
| Code | String | Code |
| CodeEng | String | English code |
| INN | String | Taxpayer identification number |
| CodeOKPO | String | OKPO code |
| CodeICAO | String | ICAO code |
| CodeIATA | String | IATA code |
| CodeTKP | String | TKP code |
| CodeCRT | String | CRT code |
| CodeAccount | String | Accounting code |
| ActivityType | String | Activity type, abbreviated |
1.9. Currency Types Object CurrencyTypes
The GetCurrencyTypes method returns a list of CurrencyTypes objects. This object represents a short reference directory of currency types containing the following information:
| Field | Data Type | Description |
|---|---|---|
| ID | Number | Company ID in Aviabit |
| Name | String | Name |
| NameEng | String | English name |
| Code | String | Code |
| CodeEng | String | English code |
| CodeISONumeric | Number | ISO currency code |
1.10. Contract Object Contract
The GetContracts method returns a list of Contract objects. This object represents a short reference directory of contracts containing the following information:
| Field | Data Type | Description |
|---|---|---|
| ID | Number | Contract ID in Aviabit |
| CompanyID | Number | Company ID under the contract |
| CurrencyTypeID | Number | Currency type ID |
| Name | String | Internal name |
| NameAlter | String | External name |
| Comment | String | Additional information |
| DateBegin | Date | Validity start date |
| DateEnd | Date | Validity end date |
| DateIssue | Date | Signing date |
1.11. Agency Contract Object TicketContract
The GetTicketContracts method returns a list of TicketContract objects. The data source is the Agency Contracts reference directory (Airline Finance System → Card Files → Contracts → Transportation Sales → Sales Conditions). The object contains the following information:
| Field | Data Type | Description |
|---|---|---|
| ID | Number | Contract ID in Aviabit |
| CompanyID | Number | Company ID under the contract |
| CurrencyTypeID | Number | Revenue transfer currency type ID; may be omitted |
| Name | String | Internal name |
| Comment | String | Additional information |
| DateBegin | Date | Validity start date |
| DateEnd | Date | Validity end date |
| DateIssue | Date | Signing date |
| CompanyIDRecipient | Number | ID of the company receiving the revenue |
| ContractType | Number | Contract type: agency or carriage contract |
| ContractSign | Number | Contract sign: initial signing, amendment, or re-execution |
| Standard | Boolean | Do not use |
| StandardType | Number | Do not use |
| CodeAgent | String | Do not use |
| CodeAccount | String | Do not use |
| Mark | String | Do not use |
1.12. Customer Payment Data Recording Status SyncPay
Methods for recording payments in the system (CreateCustomerPay, CreateSupplierPay, CreateAgencyPay) return a status as an enumeration. It can take the following values:
| Success = 0 | Successfully recorded |
| OtherError = 1 | An unexpected error occurred |
| UserUndefined = 2 | An attempt is being made to record data without prior authentication |
| ContractUndefined = 3 | Contract not found |
| ContractRequestUndefined = 4 | Request not found |
1.13. Customer Opening Balance Data Recording Status SyncBalance
Methods for recording opening balances in the system (CreateCustomerBalance, CreateSupplierBalance, CreateAgencyBalance) return a status as an enumeration. It can take the following values:
| Success = 0 | Successfully recorded |
| OtherError = 1 | An unexpected error occurred |
| UserUndefined = 2 | An attempt is being made to record data without prior authentication |
| ContractUndefined = 3 | Contract not found |
| ContractRequestUndefined = 4 | Request not found |
1.14. Deletion Status DeleteStatus
Methods for deleting acts and services return the deletion status as an enumeration. It can take the following values:
| Success = 0 | Successfully deleted |
| NotFound = 1 | Record not found |
| Error = 2 | An error occurred during deletion |
1.15. Object Containing Authorization Data AuthHeader
The AuthHeader object has a single text property field, AuthenticatedToken, which receives a special key (session identifier) after authentication is performed. This object must be created, initialized by calling the Login method, and then passed as one of the parameters to all methods used.
Function Description
2.1. Web Service Authentication
Authentication on the web service is performed by calling the Login(String UserName, String Password) method, to which two text parameters are passed: the user name and password. One of the user accounts in Aviabit is used for these parameters.
!!! An important requirement is that the group to which this user account belongs must have rights to work with the web service. To do this, log in as an administrator, open the “User Groups” window, press “Enter” on the relevant group, select the “Access Rights to System Sections” menu item, and add access to “Accounting System Web Service”.
If authentication is successful, a string containing the session identifier is returned.
The session identifier must be passed as one of the parameters on each method call.
2.2. Ending a Session
To end a session with the system, call the Logout(AuthHeader authHeader) method, passing the previously created AuthHeader object as a parameter.
2.3. Retrieving Reference Data
Using the GetCurrencyTypes, GetCompanys, GetContracts, and GetTicketContracts methods, you can retrieve the contents of the system reference directories for further use. All listed methods accept a single input parameter: AuthHeader. The method returns the corresponding data objects (CurrencyType, Company, Contract, TicketContract).
Example call:
GetCurrencyTypes(AuthHeader authHeader)
2.4. Retrieving the List of Requests
To retrieve the list of requests, call the GetContractRequests(AuthHeader authHeader, int? contractID, int? contractRequestID, int? companyID, DateTime dateBegin, DateTime dateEnd) method.
The following objects must be passed as input: AuthHeader received as a result of authentication, and the selection period. If the contractID, contractRequestID, or companyID parameters are specified, the request will be filtered by contract, request ID, or customer respectively.
Parameter values:
| Field | Data Type | Description |
|---|---|---|
| authHeader | AuthHeader | Authorization header |
| ContractID | Number | Contract ID; pass null or 0 if not required |
| ContractRequestID | Number | Request ID; pass null or 0 if not required |
| companyID | Number | Customer ID; pass null or 0 if not required |
| dateBegin | Date | Specify for exporting documents where Issue Date 1 is greater than or equal to this value |
| dateEnd | Date | Specify for exporting documents where Issue Date 1 is less than or equal to this value |
2.5. Customer Payments and Balances
2.5.1. Retrieving the List of Payments
To retrieve payment information, call the GetCustomerPays(AuthHeader authHeader, int? customerPayID, DateTime dateBegin, DateTime dateEnd) method.
The following objects must be passed as input: AuthHeader received as a result of authentication, and the selection period. If the customerPayID parameter is specified, the service will return the record for a specific payment.
Parameter values:
| Field | Data Type | Description |
|---|---|---|
| authHeader | AuthHeader | Authorization header |
| customerPayID | Number | Payment ID; optional parameter |
| dateBegin | Date | Specify for exporting documents where Issue Date 1 is greater than or equal to this value |
| dateEnd | Date | Specify for exporting documents where Issue Date 1 is less than or equal to this value |
2.5.2. Adding a Customer Payment to the System
The CreateCustomerPay method is intended for adding a payment to the system. The method call format is as follows:
CreateCustomerPay(AuthHeader authHeader, int CompanyID, int CurrencyTypeID, DateTime DatePay, double Amount, double AmountTax, string Comment, int? ContractID, int? ContractRequestID)
The method returns information about the addition in a SyncPay object.
Method parameter description:
| Field | Data Type | Description |
|---|---|---|
| authHeader | AuthHeader | Authorization header |
| CompanyID | Number | Specify the customer ID from the Companys reference directory |
| CurrencyTypeID | Number | Specify the currency type ID from the CurrencyTypes reference directory |
| DatePay | Date | Payment date |
| Amount | Decimal number | Payment amount including VAT |
| AmountTax | Decimal number | VAT amount |
| Comment | String | Additional payment information |
| ContractID | Number | Contract ID; pass null or 0 if not required |
| ContractRequestID | Number | Request ID; pass null or 0 if not required |
All parameters are required.
If the information is successfully added, the method returns SyncPay, where the RecordID field contains the ID of the added payment (0 if the information was not added). If the payment is not created, the most likely reason is incorrect input data.
2.5.3. Deleting a Customer Payment
The DeleteCustomerPay method allows you to delete previously added payment information. The method allows only data created via the web service to be deleted. As a result of method execution, a DeleteStatus object is returned.
Method call format:
DeleteCustomerPay(AuthHeader authHeader, int customerPayID)
customerPayID is the ID of the added payment.
2.5.4. Retrieving the List of Opening Balances from the System
To retrieve information on “opening balances”, call the GetCustomerBalances(AuthHeader authHeader, int? customerBalanceID, DateTime dateBegin, DateTime dateEnd) method.
The following objects must be passed as input: AuthHeader received as a result of authentication, and the selection period. If the customerBalanceID parameter is specified, the service will return the record for a specific balance.
Parameter values:
| Field | Data Type | Description |
|---|---|---|
| authHeader | AuthHeader | Authorization header |
| customerBalanceID | Number | Balance ID; optional parameter |
| dateBegin | Date | Specify for exporting documents where Issue Date 1 is greater than or equal to this value |
| dateEnd | Date | Specify for exporting documents where Issue Date 1 is less than or equal to this value |
2.5.5. Adding a Customer Opening Balance to the System
The CreateCustomerBalance method is intended for adding an opening balance to the system. The method call format is as follows:
CreateCustomerBalance(AuthHeader authHeader, int CompanyID, int CurrencyTypeID, DateTime DateBalance, double Amount, string Comment, int? ContractID, int? ContractRequestID)
The method returns information about the addition in a SyncBalance object.
Method parameter description:
| Field | Data Type | Description |
|---|---|---|
| authHeader | AuthHeader | Authorization header |
| CompanyID | Number | Specify the customer ID from the Companys reference directory |
| CurrencyTypeID | Number | Specify the currency type ID from the CurrencyTypes reference directory |
| DateBalance | Date | Balance date |
| Amount | Decimal number | Balance amount |
| Comment | String | Additional balance information |
| ContractID | Number | Contract ID; pass null or 0 if not required |
| ContractRequestID | Number | Request ID; pass null or 0 if not required |
All parameters are required.
If the information is successfully added, the method returns SyncBalance, where the RecordID field contains the ID of the added payment (0 if the information was not added). If the payment is not created, the most likely reason is incorrect input data.
2.5.6. Deleting a Customer Opening Balance
The DeleteCustomerBalance method allows you to delete previously added balance information. The method allows only data created via the web service to be deleted. As a result of method execution, a DeleteStatus object is returned.
Method call format:
DeleteCustomerBalance(AuthHeader authHeader, int customerBalanceID)
customerBalanceID is the ID of the previously added balance.
2.6. Supplier Payments and Balances
2.6.1. Retrieving the List of Supplier Payments
To retrieve supplier payment information, call the GetSupplierPays(AuthHeader authHeader, int? supplierPayID, DateTime dateBegin, DateTime dateEnd) method.
The following objects must be passed as input: AuthHeader received as a result of authentication, and the selection period. If the supplierPayID parameter is specified, the service will return the record for a specific payment.
Parameter values:
| Field | Data Type | Description |
|---|---|---|
| authHeader | AuthHeader | Authorization header |
| supplierPayID | Number | Payment ID; optional parameter |
| dateBegin | Date | Specify for exporting documents where Issue Date 1 is greater than or equal to this value |
| dateEnd | Date | Specify for exporting documents where Issue Date 1 is less than or equal to this value |
2.6.2. Adding a Supplier Payment to the System
The CreateSupplierPay method is intended for adding a payment to the system. The method call format is as follows:
CreateSupplierPay(AuthHeader authHeader, int CompanyID, int CurrencyTypeID, DateTime DatePay, double Amount, double AmountTax, string Comment, int? ContractID)
The method returns information about the addition in a SyncPay object.
Method parameter description:
| Field | Data Type | Description |
|---|---|---|
| authHeader | AuthHeader | Authorization header |
| CompanyID | Number | Specify the supplier ID from the Companys reference directory |
| CurrencyTypeID | Number | Specify the currency type ID from the CurrencyTypes reference directory |
| DatePay | Date | Payment date |
| Amount | Decimal number | Payment amount including VAT |
| AmountTax | Decimal number | VAT amount |
| Comment | String | Additional payment information |
| ContractID | Number | Contract ID; pass null or 0 if not required |
All parameters are required.
If the information is successfully added, the method returns SyncPay, where the RecordID field contains the ID of the added payment (0 if the information was not added). If the payment is not created, the most likely reason is incorrect input data.
2.6.3. Deleting a Supplier Payment
The DeleteSupplierPay method allows you to delete previously added payment information. The method allows only data created via the web service to be deleted. As a result of method execution, a DeleteStatus object is returned.
Method call format:
DeleteSupplierPay(AuthHeader authHeader, int supplierPayID)
supplierPayID is the ID of the added payment.
2.6.4. Retrieving the List of Supplier Opening Balances from the System
To retrieve information on “opening balances”, call the GetSupplierBalances(AuthHeader authHeader, int? supplierBalanceID, DateTime dateBegin, DateTime dateEnd) method.
The following objects must be passed as input: AuthHeader received as a result of authentication, and the selection period. If the supplierBalanceID parameter is specified, the service will return the record for a specific balance.
Parameter values:
| Field | Data Type | Description |
|---|---|---|
| authHeader | AuthHeader | Authorization header |
| supplierBalanceID | Number | Balance ID; optional parameter |
| dateBegin | Date | Specify for exporting documents where Issue Date 1 is greater than or equal to this value |
| dateEnd | Date | Specify for exporting documents where Issue Date 1 is less than or equal to this value |
2.6.5. Adding Supplier Opening Balances to the System
The CreateSupplierBalance method is intended for adding an opening balance to the system. The method call format is as follows:
CreateSupplierBalance(AuthHeader authHeader, int CompanyID, int CurrencyTypeID, DateTime DateBalance, double Amount, string Comment, int? ContractID)
The method returns information about the addition in a SyncBalance object.
Method parameter description:
| Field | Data Type | Description |
|---|---|---|
| authHeader | AuthHeader | Authorization header |
| CompanyID | Number | Specify the customer ID from the Companys reference directory |
| CurrencyTypeID | Number | Specify the currency type ID from the CurrencyTypes reference directory |
| DateBalance | Date | Balance date |
| Amount | Decimal number | Balance amount |
| Comment | String | Additional balance information |
| ContractID | Number | Contract ID; pass null or 0 if not required |
All parameters are required.
If the information is successfully added, the method returns SyncBalance, where the RecordID field contains the ID of the added payment (0 if the information was not added). If the payment is not created, the most likely reason is incorrect input data.
2.6.6. Deleting Supplier Opening Balances
The DeleteSupplierBalance method allows you to delete previously added balance information. The method allows only data created via the web service to be deleted. As a result of method execution, a DeleteStatus object is returned.
Method call format:
DeleteSupplierBalance(AuthHeader authHeader, int supplierBalanceID)
supplierBalanceID is the ID of the previously added balance.
2.7. Agent Payments and Balances
2.7.1. Retrieving the List of Payments
To retrieve payment information, call the GetAgencyPays(AuthHeader authHeader, int? agencyPayID, DateTime dateBegin, DateTime dateEnd) method.
The following objects must be passed as input: AuthHeader received as a result of authentication, and the selection period. If the agencyPayID parameter is specified, the service will return the record for a specific payment.
Parameter values:
| Field | Data Type | Description |
|---|---|---|
| authHeader | AuthHeader | Authorization header |
| agencyPayID | Number | Payment ID; optional parameter |
| dateBegin | Date | Specify for exporting documents where Issue Date 1 is greater than or equal to this value |
| dateEnd | Date | Specify for exporting documents where Issue Date 1 is less than or equal to this value |
2.7.2. Adding a Payment to the System
The CreateAgencyPay method is intended for adding a payment to the system. The method call format is as follows:
CreateAgencyPay(AuthHeader authHeader, int CompanyID, int CurrencyTypeID, DateTime DatePay, double Amount, double AmountTax, string Comment, int? ContractID)
The method returns information about the addition in a SyncPay object.
Method parameter description:
| Field | Data Type | Description |
|---|---|---|
| authHeader | AuthHeader | Authorization header |
| CompanyID | Number | Specify the agent ID from the Companys reference directory |
| CurrencyTypeID | Number | Specify the currency type ID from the CurrencyTypes reference directory |
| DatePay | Date | Payment date |
| Amount | Decimal number | Payment amount including VAT |
| AmountTax | Decimal number | VAT amount |
| Comment | String | Additional payment information |
| ContractID | Number | Contract ID; pass null or 0 if not required; must correspond to TicketContract |
All parameters are required.
If the information is successfully added, the method returns SyncPay, where the RecordID field contains the ID of the added payment (0 if the information was not added). If the payment is not created, the most likely reason is incorrect input data.
2.7.3. Deleting a Payment
The DeleteAgencyPay method allows you to delete previously added payment information. The method allows only data created via the web service to be deleted. As a result of method execution, a DeleteStatus object is returned.
Method call format:
DeleteAgencyPay(AuthHeader authHeader, int agencyPayID)
agencyPayID is the ID of the added payment.
2.7.4. Retrieving the List of Opening Balances from the System
To retrieve information on “opening balances”, call the GetAgencyBalances(AuthHeader authHeader, int? agencyBalanceID, DateTime dateBegin, DateTime dateEnd) method.
The following objects must be passed as input: AuthHeader received as a result of authentication, and the selection period. If the agencyBalanceID parameter is specified, the service will return the record for a specific balance.
Parameter values:
| Field | Data Type | Description |
|---|---|---|
| authHeader | AuthHeader | Authorization header |
| agencyBalanceID | Number | Balance ID; optional parameter |
| dateBegin | Date | Specify for exporting documents where Issue Date 1 is greater than or equal to this value |
| dateEnd | Date | Specify for exporting documents where Issue Date 1 is less than or equal to this value |
2.7.5. Adding an Opening Balance to the System
The CreateAgencyBalance method is intended for adding an opening balance to the system. The method call format is as follows:
CreateAgencyBalance(AuthHeader authHeader, int CompanyID, int CurrencyTypeID, DateTime DateBalance, double Amount, string Comment, int? ContractID)
The method returns information about the addition in a SyncBalance object.
Method parameter description:
| Field | Data Type | Description |
|---|---|---|
| authHeader | AuthHeader | Authorization header |
| CompanyID | Number | Specify the agent ID from the Companys reference directory |
| CurrencyTypeID | Number | Specify the currency type ID from the CurrencyTypes reference directory |
| DateBalance | Date | Balance date |
| Amount | Decimal number | Balance amount |
| Comment | String | Additional balance information |
| ContractID | Number | Contract ID; pass null or 0 if not required; must correspond to TicketContract |
All parameters are required.
If the information is successfully added, the method returns SyncBalance, where the RecordID field contains the ID of the added payment (0 if the information was not added). If the payment is not created, the most likely reason is incorrect input data.
2.7.6. Deleting an Opening Balance
The DeleteAgencyBalance method allows you to delete previously added balance information. The method allows only data created via the web service to be deleted. As a result of method execution, a DeleteStatus object is returned.
Method call format:
DeleteAgencyBalance(AuthHeader authHeader, int agencyBalanceID)
agencyBalanceID is the ID of the previously added balance.
