FR Payslip OCR .NET
The .NET OCR SDK supports the Payslip API.
The sample below can be used for testing purposes.
Quick-Start
using Mindee;
using Mindee.Input;
using Mindee.Product.Fr.Payslip;
string apiKey = "my-api-key";
string filePath = "/path/to/the/file.ext";
// Construct a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
// Load an input source as a path string
// Other input types can be used, as mentioned in the docs
var inputSource = new LocalInputSource(filePath);
// Call the product asynchronously with auto-polling
var response = await mindeeClient
.EnqueueAndParseAsync<PayslipV2>(inputSource);
// Print a summary of all the predictions
System.Console.WriteLine(response.Document.ToString());
// Print only the document-level predictions
// System.Console.WriteLine(response.Document.Inference.Prediction.ToString());
Field Types
Standard Fields
These fields are generic and used in several products.
BaseField
Each prediction object contains a set of fields that inherit from the generic BaseField
class.
A typical BaseField
object will have the following attributes:
- Confidence (
double?
): the confidence score of the field prediction. - BoundingBox (
BoundingBox
): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document. - Polygon (
Polygon
): contains the relative vertices coordinates (Polygon
extendsList<Point>
) of a polygon containing the field in the image. - PageId (
int?
): the ID of the page, alwaysnull
when at document-level.
Note: A
Point
simply refers to a List ofdouble
.
Aside from the previous attributes, all basic fields have access to a custom ToString
method that can be used to print their value as a string.
Specific Fields
Fields which are specific to this product; they are not used in any other product.
Bank Account Details Field
Information about the employee's bank account.
A PayslipV2BankAccountDetail
implements the following attributes:
- BankName (
string
): The name of the bank. - Iban (
string
): The IBAN of the bank account. - Swift (
string
): The SWIFT code of the bank.
Fields which are specific to this product; they are not used in any other product.
Employee Field
Information about the employee.
A PayslipV2Employee
implements the following attributes:
- Address (
string
): The address of the employee. - DateOfBirth (
string
): The date of birth of the employee. - FirstName (
string
): The first name of the employee. - LastName (
string
): The last name of the employee. - PhoneNumber (
string
): The phone number of the employee. - RegistrationNumber (
string
): The registration number of the employee. - SocialSecurityNumber (
string
): The social security number of the employee.
Fields which are specific to this product; they are not used in any other product.
Employer Field
Information about the employer.
A PayslipV2Employer
implements the following attributes:
- Address (
string
): The address of the employer. - CompanyId (
string
): The company ID of the employer. - CompanySite (
string
): The site of the company. - NafCode (
string
): The NAF code of the employer. - Name (
string
): The name of the employer. - PhoneNumber (
string
): The phone number of the employer. - UrssafNumber (
string
): The URSSAF number of the employer.
Fields which are specific to this product; they are not used in any other product.
Employment Field
Information about the employment.
A PayslipV2Employment
implements the following attributes:
- Category (
string
): The category of the employment. - Coefficient (
double
): The coefficient of the employment. - CollectiveAgreement (
string
): The collective agreement of the employment. - JobTitle (
string
): The job title of the employee. - PositionLevel (
string
): The position level of the employment. - StartDate (
string
): The start date of the employment.
Fields which are specific to this product; they are not used in any other product.
Pay Detail Field
Detailed information about the pay.
A PayslipV2PayDetail
implements the following attributes:
- GrossSalary (
double
): The gross salary of the employee. - GrossSalaryYtd (
double
): The year-to-date gross salary of the employee. - IncomeTaxRate (
double
): The income tax rate of the employee. - IncomeTaxWithheld (
double
): The income tax withheld from the employee's pay. - NetPaid (
double
): The net paid amount of the employee. - NetPaidBeforeTax (
double
): The net paid amount before tax of the employee. - NetTaxable (
double
): The net taxable amount of the employee. - NetTaxableYtd (
double
): The year-to-date net taxable amount of the employee. - TotalCostEmployer (
double
): The total cost to the employer. - TotalTaxesAndDeductions (
double
): The total taxes and deductions of the employee.
Fields which are specific to this product; they are not used in any other product.
Pay Period Field
Information about the pay period.
A PayslipV2PayPeriod
implements the following attributes:
- EndDate (
string
): The end date of the pay period. - Month (
string
): The month of the pay period. - PaymentDate (
string
): The date of payment for the pay period. - StartDate (
string
): The start date of the pay period. - Year (
string
): The year of the pay period.
Fields which are specific to this product; they are not used in any other product.
PTO Field
Information about paid time off.
A PayslipV2Pto
implements the following attributes:
- AccruedThisPeriod (
double
): The amount of paid time off accrued in this period. - BalanceEndOfPeriod (
double
): The balance of paid time off at the end of the period. - UsedThisPeriod (
double
): The amount of paid time off used in this period.
Fields which are specific to this product; they are not used in any other product.
Salary Details Field
Detailed information about the earnings.
A PayslipV2SalaryDetail
implements the following attributes:
- Amount (
double
): The amount of the earnings. - Base (
double
): The base value of the earnings. - Description (
string
): The description of the earnings. - Rate (
double
): The rate of the earnings.
Attributes
The following fields are extracted for Payslip V2:
Bank Account Details
BankAccountDetails(PayslipV2BankAccountDetail): Information about the employee's bank account.
System.Console.WriteLine(result.Document.Inference.Prediction.BankAccountDetails.Value);
Employee
Employee(PayslipV2Employee): Information about the employee.
System.Console.WriteLine(result.Document.Inference.Prediction.Employee.Value);
Employer
Employer(PayslipV2Employer): Information about the employer.
System.Console.WriteLine(result.Document.Inference.Prediction.Employer.Value);
Employment
Employment(PayslipV2Employment): Information about the employment.
System.Console.WriteLine(result.Document.Inference.Prediction.Employment.Value);
Pay Detail
PayDetail(PayslipV2PayDetail): Detailed information about the pay.
System.Console.WriteLine(result.Document.Inference.Prediction.PayDetail.Value);
Pay Period
PayPeriod(PayslipV2PayPeriod): Information about the pay period.
System.Console.WriteLine(result.Document.Inference.Prediction.PayPeriod.Value);
PTO
Pto(PayslipV2Pto): Information about paid time off.
System.Console.WriteLine(result.Document.Inference.Prediction.Pto.Value);
Salary Details
SalaryDetails(List<PayslipV2SalaryDetail>): Detailed information about the earnings.
foreach (var SalaryDetailsElem in result.Document.Inference.Prediction.SalaryDetails)
{
System.Console.WriteLine(SalaryDetailsElem.Value);
}
Questions?
Updated 22 days ago