Skip to main content

paymentReports

📖 Provides a paginated list of payment reports, filtered by IDs, status, title and date ranges.

Admins create payment reports to pay crew for approved timesheets and expenses. Reports are not edited after they are created, apart from being marked as paid. Report items are returned by paymentReportItems, and crew invoices by crewInvoices.

🔭 Required scope: read:payment_reports.

type Query {
paymentReports(
}

⬆️ Interactive type overview. Click type names or +/- buttons to expand/collapse definitions.

Examples​

Get unpaid reports created in a date range
VariableExample value
$after"2025-01-01T00:00:00Z"
$before"2025-02-01T00:00:00Z"
Request
query Example($after: Time!, $before: Time!) {
paymentReports(input: {filter: {
statusIn: [TO_BE_PAID],
createdAfter: $after,
createdBefore: $before
}}) {
paginatedList {
oid { id }
title
status
fromDate
toDate
total
currency
}
pager {
currentPage
pageCount
perPage
totalCount
}
}
}
Response
{
"data": {
"paymentReports": {
"paginatedList": [
{
"oid": {
"id": "01ABCDEFGHIJKLMNOPQRS0011"
},
"title": "January week 3",
"status": "TO_BE_PAID",
"fromDate": "2025-01-13T00:00:00Z",
"toDate": "2025-01-19T23:59:59Z",
"total": 4820.5,
"currency": "gbp"
},
{
"oid": {
"id": "01ABCDEFGHIJKLMNOPQRS0012"
},
"title": "January week 2",
"status": "TO_BE_PAID",
"fromDate": "2025-01-06T00:00:00Z",
"toDate": "2025-01-12T23:59:59Z",
"total": 3195,
"currency": "gbp"
}
],
"pager": {
"currentPage": 1,
"pageCount": 1,
"perPage": 100,
"totalCount": 2
}
}
}
}

📜 Partial schema that includes all types used in this operation.

input PaymentReportsInput {
"""Filters payment reports based on different criteria"""
filter: PaymentReportsFilter

"""Pagination page. Default value is 1"""
page: Int = 1

"""Number of items per page. Default value is 100 and maximum is 100"""
perPage: Int = 100
}

input PaymentReportsFilter {
paymentReportIds: [ID!]
paymentReportOids: [ObjectIDInput!]
statusIn: [PaymentReportStatus!]

"""Part of the report title"""
search: String
createdAfter: Time
createdBefore: Time

"""Period the report covers"""
fromDateAfter: Time
toDateBefore: Time
}

input ObjectIDInput @oneOf {
"""Either ID or alias must be specified."""
id: String
alias: String
}

enum PaymentReportStatus {
TO_BE_PAID
PAID
}

type PaymentReportsResponse {
"""Paginated list of returned payment reports."""
paginatedList: [PaymentReport!]!

"""Pagination pager with total count and current page"""
pager: Pager
}

"""A pagination Pager"""
type Pager {
"""Current pagination page"""
currentPage: Int!

"""Total number of pagination pages"""
pageCount: Int!

"""Maximum number of records per pagination page"""
perPage: Int!

"""Total number of records"""
totalCount: Int!
}

type PaymentReport {
id: ID!
oid: ObjectID!
title: String!
status: PaymentReportStatus!

"""Period the report covers"""
fromDate: Time!
toDate: Time!
createdAt: Time!
createdBy: CreatedBy!
paidAt: Time
paidBy: CreatedBy

"""Excludes exclusive holiday pay"""
total: Float!

"""
ISO 4217 code, lower case, e.g. "gbp"
"""
currency: String!

"""Empty on legacy reports"""
profiles: [PaymentReportProfileStats!]!
}

type CreatedBy {
userId: Int!
userOid: ObjectID!
firstName: String!
lastName: String!
avatar: String!
}

type ObjectID {
id: String!
alias: String
type: ObjectType!
}

type PaymentReportProfileStats {
profileId: ID!
profileOid: ObjectID!
profileName: String!
salaryItems: Boolean!
expensesItems: Boolean!
}

enum ObjectType {
BOARD
JOB
JOB_ROLE
CREW_JOB
JOB_GROUP
JOB_LABEL
MULTI_DAY_JOB
BOARD_PUBLISH
USER
PROFILE
DATA_TYPE
DATA_TYPE_OPTION
CREW_TAG
PAYMENT_REPORT
CREW_NOTE
}

"""The `Boolean` scalar type represents `true` or `false`."""
scalar Boolean

"""
The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).
"""
scalar Float

"""
The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.
"""
scalar ID

"""
The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
"""
scalar Int

"""
The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
"""
scalar String

"""
Datetime string in ISO 8601 format like "2020-11-18T12:21:14+00:00" or "2020-11-18T12:21:14Z"
"""
scalar Time