Payslip V3

Sample Code:

class PayslipV3(raw_prediction)

Payslip API version 3 inference prediction.

static get_endpoint_info(klass)

Retrives the endpoint information for an Inference.

Should never retrieve info for CustomV1, as a custom endpoint should be created to use CustomV1.

Parameters:

klass (Type[Inference]) – product subclass to access endpoint information.

Return type:

Dict[str, str]

endpoint_name: Optional[str] = 'payslip_fra'

Name of the endpoint.

endpoint_version: Optional[str] = '3'

Version of the endpoint.

is_rotation_applied: Optional[bool]

Whether the document has had any rotation applied to it.

page_id: Optional[int]

Optional page id for page-level predictions.

pages: List[Page[PayslipV3Document]]

Page-level prediction(s).

prediction: PayslipV3Document

Document-level prediction.

product: Product

Name and version of a given product, as sent back by the API.

class PayslipV3Document(raw_prediction, page_id=None)

Payslip API version 3.0 document data.

Parameters:
  • raw_prediction (Dict[str, Any]) –

  • page_id (Optional[int]) –

bank_account_details: PayslipV3BankAccountDetail

Information about the employee’s bank account.

employee: PayslipV3Employee

Information about the employee.

employer: PayslipV3Employer

Information about the employer.

employment: PayslipV3Employment

Information about the employment.

paid_time_off: List[PayslipV3PaidTimeOff]

Information about paid time off.

pay_detail: PayslipV3PayDetail

Detailed information about the pay.

pay_period: PayslipV3PayPeriod

Information about the pay period.

salary_details: List[PayslipV3SalaryDetail]

Detailed information about the earnings.

class PayslipV3PayPeriod(raw_prediction, page_id=None)

Information about the pay period.

Parameters:
  • raw_prediction (Dict[str, Any]) –

  • page_id (Optional[int]) –

to_field_list()

Output the object in a format suitable for inclusion in an rST field list.

Return type:

str

bounding_box: Optional[Quadrilateral]

A right rectangle containing the word in the document.

confidence: float

The confidence score.

end_date: Optional[str]

The end date of the pay period.

month: Optional[str]

The month of the pay period.

page_n: int

The document page on which the information was found.

payment_date: Optional[str]

The date of payment for the pay period.

polygon: Polygon

A polygon containing the word in the document.

start_date: Optional[str]

The start date of the pay period.

year: Optional[str]

The year of the pay period.

class PayslipV3Employee(raw_prediction, page_id=None)

Information about the employee.

Parameters:
  • raw_prediction (Dict[str, Any]) –

  • page_id (Optional[int]) –

to_field_list()

Output the object in a format suitable for inclusion in an rST field list.

Return type:

str

address: Optional[str]

The address of the employee.

bounding_box: Optional[Quadrilateral]

A right rectangle containing the word in the document.

confidence: float

The confidence score.

date_of_birth: Optional[str]

The date of birth of the employee.

first_name: Optional[str]

The first name of the employee.

last_name: Optional[str]

The last name of the employee.

page_n: int

The document page on which the information was found.

phone_number: Optional[str]

The phone number of the employee.

polygon: Polygon

A polygon containing the word in the document.

registration_number: Optional[str]

The registration number of the employee.

social_security_number: Optional[str]

The social security number of the employee.

class PayslipV3Employer(raw_prediction, page_id=None)

Information about the employer.

Parameters:
  • raw_prediction (Dict[str, Any]) –

  • page_id (Optional[int]) –

to_field_list()

Output the object in a format suitable for inclusion in an rST field list.

Return type:

str

address: Optional[str]

The address of the employer.

bounding_box: Optional[Quadrilateral]

A right rectangle containing the word in the document.

company_id: Optional[str]

The company ID of the employer.

company_site: Optional[str]

The site of the company.

confidence: float

The confidence score.

naf_code: Optional[str]

The NAF code of the employer.

name: Optional[str]

The name of the employer.

page_n: int

The document page on which the information was found.

phone_number: Optional[str]

The phone number of the employer.

polygon: Polygon

A polygon containing the word in the document.

urssaf_number: Optional[str]

The URSSAF number of the employer.

class PayslipV3BankAccountDetail(raw_prediction, page_id=None)

Information about the employee’s bank account.

Parameters:
  • raw_prediction (Dict[str, Any]) –

  • page_id (Optional[int]) –

to_field_list()

Output the object in a format suitable for inclusion in an rST field list.

Return type:

str

bank_name: Optional[str]

The name of the bank.

bounding_box: Optional[Quadrilateral]

A right rectangle containing the word in the document.

confidence: float

The confidence score.

iban: Optional[str]

The IBAN of the bank account.

page_n: int

The document page on which the information was found.

polygon: Polygon

A polygon containing the word in the document.

swift: Optional[str]

The SWIFT code of the bank.

class PayslipV3Employment(raw_prediction, page_id=None)

Information about the employment.

Parameters:
  • raw_prediction (Dict[str, Any]) –

  • page_id (Optional[int]) –

to_field_list()

Output the object in a format suitable for inclusion in an rST field list.

Return type:

str

bounding_box: Optional[Quadrilateral]

A right rectangle containing the word in the document.

category: Optional[str]

The category of the employment.

coefficient: Optional[str]

The coefficient of the employment.

collective_agreement: Optional[str]

The collective agreement of the employment.

confidence: float

The confidence score.

job_title: Optional[str]

The job title of the employee.

page_n: int

The document page on which the information was found.

polygon: Polygon

A polygon containing the word in the document.

position_level: Optional[str]

The position level of the employment.

seniority_date: Optional[str]

The seniority date of the employment.

start_date: Optional[str]

The start date of the employment.

class PayslipV3SalaryDetail(raw_prediction, page_id=None)

Detailed information about the earnings.

Parameters:
  • raw_prediction (Dict[str, Any]) –

  • page_id (Optional[int]) –

to_table_line()

Output in a format suitable for inclusion in an rST table.

Return type:

str

amount: Optional[float]

The amount of the earning.

base: Optional[float]

The base rate value of the earning.

bounding_box: Optional[Quadrilateral]

A right rectangle containing the word in the document.

confidence: float

The confidence score.

description: Optional[str]

The description of the earnings.

number: Optional[float]

The number of units in the earning.

page_n: int

The document page on which the information was found.

polygon: Polygon

A polygon containing the word in the document.

rate: Optional[float]

The rate of the earning.

class PayslipV3PayDetail(raw_prediction, page_id=None)

Detailed information about the pay.

Parameters:
  • raw_prediction (Dict[str, Any]) –

  • page_id (Optional[int]) –

to_field_list()

Output the object in a format suitable for inclusion in an rST field list.

Return type:

str

bounding_box: Optional[Quadrilateral]

A right rectangle containing the word in the document.

confidence: float

The confidence score.

gross_salary: Optional[float]

The gross salary of the employee.

gross_salary_ytd: Optional[float]

The year-to-date gross salary of the employee.

income_tax_rate: Optional[float]

The income tax rate of the employee.

income_tax_withheld: Optional[float]

The income tax withheld from the employee’s pay.

net_paid: Optional[float]

The net paid amount of the employee.

net_paid_before_tax: Optional[float]

The net paid amount before tax of the employee.

net_taxable: Optional[float]

The net taxable amount of the employee.

net_taxable_ytd: Optional[float]

The year-to-date net taxable amount of the employee.

page_n: int

The document page on which the information was found.

polygon: Polygon

A polygon containing the word in the document.

total_cost_employer: Optional[float]

The total cost to the employer.

total_taxes_and_deductions: Optional[float]

The total taxes and deductions of the employee.

class PayslipV3PaidTimeOff(raw_prediction, page_id=None)

Information about paid time off.

Parameters:
  • raw_prediction (Dict[str, Any]) –

  • page_id (Optional[int]) –

to_table_line()

Output in a format suitable for inclusion in an rST table.

Return type:

str

accrued: Optional[float]

The amount of paid time off accrued in the period.

bounding_box: Optional[Quadrilateral]

A right rectangle containing the word in the document.

confidence: float

The confidence score.

page_n: int

The document page on which the information was found.

period: Optional[str]

The paid time off period.

polygon: Polygon

A polygon containing the word in the document.

pto_type: Optional[str]

The type of paid time off.

remaining: Optional[float]

The remaining amount of paid time off at the end of the period.

used: Optional[float]

The amount of paid time off used in the period.