Reference
Objects

Objects

WARNING

GetPaid GraphQL API is in alpha build and is subject to change without warning. While the overall schemas will not vary much, the fields could undergo major revision. (see GraphQL Best Practices for Versioning (opens in a new tab))

About Objects

This section gives references for all GraphQL objects found in the API, as well as a quick example on how to call data from regular HTTP calls.

Specification

BankAccount

Represents a User's bank account.

FIELDS

NameDescription
id ( string )

ID of this Bank Account record

accountName ( string )

Account name for the associated User.

accountNumber ( string )

Account number for the associated User.

bankName ( string )

Name of the Bank.


CommitTransactionPayload

Payload for commitTransaction.

FIELDS

NameDescription
transaction ( Transaction )

Returns a Transaction object after a successful withdrawal. The Transaction must already be in a preview state, before committing. This mutation is typically called after createTransaction has been performed.(see Registering a Withdrawal).


Company

A Company record.

FIELDS

NameDescription
id ( id )

ID of this Company record.

active ( boolean )

Represents the active status of this Company.

avatar ( string )

Image of company logo,stored as an URL.

bufferDate ( string )

Represents the start date of the Administrative period for this Company to conduct payroll activities.

country ( string )

The Country record is value stored as a ISO 3166 alpha 3 code. (see ISO3166).

currency ( string )

Currency value is stored in ISO4217 format. (see ISO 4217)

name ( string )

Name of this Company record.

paycycleDate ( string )

Defines the pay cycle start date for the next pay cycle.

timezone ( string )

Represents the Company's timezone value and is stored in a UTC offset format e.g (UTC+8). (see UTC Offset)


CreateTransactionPayload

Payload for createTransaction.

FIELDS

NameDescription
transaction ( Transaction )

Returns the transaction that was just created. If successful, the transaction returned will be in a preview state. (see Registering a Withdrawal).


CreateUserPayload

Payload for createUser.

FIELDS

NameDescription
user ( User )

Returns the user that was just created.


DeleteUserPayload

Payload for deleteUser

FIELDS

NameDescription
message ( Message )

If the deletion is successful, returns a success message.


Employment

Represents an Employment record in a Company.

FIELDS

NameDescription
id ( id )

ID of this Employment record.

availableWage ( float )

Represents the wages that are available for withdrawal in the current pay cycle.

company ( Company )

Represents this Employment's associated Company.

daysAccumulated ( int )

Returns the accumulated days worked in the current pay cycle.

daysLeft ( int )

Returns the remaining days left in the current pay cycle.

department ( string )

Represents the Employment record's department.

earnedWage ( float )

Returns the total wages earned while in active Employment, under the current pay cycle.

email ( string )

This is the Employment email field. This email is closely associated to the Company and may not be the same as the User's email record.

status ( string )

Represents the employment status. Possible states are Active , Deactivated or Unclaimed.

transactions ( [Transaction] )

User's Transactions.


LoginPayload

Payload for loginUser.

FIELDS

NameDescription
user ( User )

Returns the respective User record.


LoginUserWithTokenPayload

Payload for loginWithToken.

FIELDS

NameDescription
linkedup ( boolean )

This is the linkedup boolean field.

token ( string )

This is the token field.

user ( User )

Returns a user.


Message

The GraphQL API provides a standard format for messages.

FIELDS

NameDescription
code ( string )

The message code category.

external_code ( string )

The external code category, if relevant.

header ( string )

The header of this success message.

message ( string! )

Return message.


Profile

A User's profile record.

FIELDS

NameDescription
id ( string )

ID of this User Profile record.

country ( string )

Represents the User's country. Country value stored as a ISO 3166 alpha 3 code. (see ISO 3166).

mobile ( string )

Represents the User's mobile number. This is not used for user verification and merely exists as an optional field.


Transaction

A Transaction record.

FIELDS

NameDescription
id ( string )

ID of this Transaction record.

completedDate ( string )

Represents the Date in which Transaction enters the Complete state.

currency ( string )

Represents the Currency format. The Currency value is stored in ISO 4217 format.

employment ( Employment )

Represents the Employment record that is linked to this Transaction.

grossAmount ( int )

This is the Gross Amount that was requested by an Employee (an Employment Record).

netAmount ( string )

This represents the resulting Net Amount requested by an Employee (an Employment Record).

requestedAt ( string )

Represents the Date of the Transaction request.

serviceFee ( int )

This represents the Service Fee for this Transaction record.

status ( boolean )

Represents the current status of this Transaction. Possible states are: Pending, Blocked, Complete.


UpdateBankAccountPayload

Payload for updateBankAccount.

FIELDS

NameDescription
bankAccount ( BankAccount )

Returns a Bank Account object.


UpdateProfilePayload

Payload for updateProfile.

FIELDS

NameDescription
user ( User )

Returns the relevant User record.


UpdateUserPasswordPayload

Payload for updateUserPassword.

FIELDS

NameDescription
message ( Message )

Returns a message confirming the result of the change in user password.


User

A User represents a single user account in the application.

FIELDS

NameDescription
id ( string )

ID of this User record.

active ( boolean )

Represents the active state of this User.

bankAccount ( BankAccount )

The User's Bank Account details.

email ( string )

Unique email identifier to User.

employments ( [Employment] )

The User's Employment details. A user can have multiple Employments against different Companies.

name ( string )

The User's full name.

profile ( Profile )

The User's Profile details.

Last updated on January 4, 2023