Skip to main content

crewInvoices

📖 Provides a paginated list of crew invoices, filtered by report, crew, profile and report creation date.

There is one invoice per crew member and payment report, covering their items with crewInvoice set. Reports created before 1 September 2022 predate crew invoices and are not included. An invoice is listed as soon as its report is created, with status: NOT_SUBMITTED until the crew member submits it.

items and total are calculated the same way as in paymentReportItems. lines are the lines of the submitted invoice, as admins see them in the app and in the generated PDF. Their sum can differ from total, as the invoice leaves out exclusive holiday pay.

🔭 Required scope: read:payment_reports.

type Query {
crewInvoices(
}

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

Examples​

Get invoices for reports created since a date
Request
query Example {
crewInvoices(input: {filter: {reportCreatedAfter: "2025-01-01T00:00:00Z"}}) {
paginatedList {
paymentReportOid { id }
crewOid { id }
status
submissionType
reference
submittedAt
dueDate
taxStatus
taxPercentage
paid
total
currency
}
}
}
Response
{
"data": {
"crewInvoices": {
"paginatedList": [
{
"paymentReportOid": {
"id": "01ABCDEFGHIJKLMNOPQRS0011"
},
"crewOid": {
"id": "01ABCDEFGHIJKLMNOPQRS0022"
},
"status": "NOT_SUBMITTED",
"submissionType": null,
"reference": null,
"submittedAt": null,
"dueDate": null,
"taxStatus": null,
"taxPercentage": null,
"paid": false,
"total": 172.4,
"currency": "gbp"
},
{
"paymentReportOid": {
"id": "01ABCDEFGHIJKLMNOPQRS0012"
},
"crewOid": {
"id": "01ABCDEFGHIJKLMNOPQRS0022"
},
"status": "APPROVED",
"submissionType": "MANUAL",
"reference": "INV-2025-014",
"submittedAt": "2025-01-14T09:12:44Z",
"dueDate": "2025-02-13",
"taxStatus": "REGISTERED",
"taxPercentage": 20,
"paid": false,
"total": 402.6,
"currency": "gbp"
}
]
}
}
}
Get a submitted invoice with its items and lines
Request
query Example {
crewInvoices(input: {filter: {
paymentReportOids: [{id: "01ABCDEFGHIJKLMNOPQRS0012"}],
crewOids: [{id: "01ABCDEFGHIJKLMNOPQRS0022"}]
}}) {
paginatedList {
reference
status
total
items {
crewJobOid { id }
roleName
hoursWorked
totalSalary
expensesTotal
totalPayable
}
lines {
title
description
price
quantity
taxPercentage
expenses {
type
description
supplier
amount
}
}
}
}
}
Response
{
"data": {
"crewInvoices": {
"paginatedList": [
{
"reference": "INV-2025-014",
"status": "APPROVED",
"total": 402.6,
"items": [
{
"crewJobOid": {
"id": "01ABCDEFGHIJKLMNOPQRS0033"
},
"roleName": "Healthcare (Nanny)",
"hoursWorked": 12,
"totalSalary": 330,
"expensesTotal": 72.6,
"totalPayable": 402.6
}
],
"lines": [
{
"title": "Winter Gala - Healthcare (Nanny) (salary)",
"description": "09-January-2025",
"price": 300,
"quantity": 1,
"taxPercentage": 20,
"expenses": []
},
{
"title": "Winter Gala - Healthcare (Nanny) (subsistence)",
"description": "09-January-2025",
"price": 30,
"quantity": 1,
"taxPercentage": 20,
"expenses": []
},
{
"title": "Winter Gala - Healthcare (Nanny) (expense)",
"description": "09-January-2025",
"price": 72.6,
"quantity": 1,
"taxPercentage": 20,
"expenses": [
{
"type": "Travel",
"description": "Return train fare",
"supplier": "National Rail",
"amount": 52.6
},
{
"type": "Meals",
"description": "Dinner",
"supplier": "Station Cafe",
"amount": 20
}
]
}
]
}
]
}
}
}

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

input CrewInvoicesInput {
"""Filters crew invoices based on different criteria"""
filter: CrewInvoicesFilter

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

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

input CrewInvoicesFilter {
paymentReportIds: [ID!]
paymentReportOids: [ObjectIDInput!]
crewIds: [ID!]
crewOids: [ObjectIDInput!]

"""Profile when the report was created. Excludes legacy reports."""
profileIds: [ID!]
profileOids: [ObjectIDInput!]
reportCreatedAfter: Time
reportCreatedBefore: Time
}

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

type CrewInvoicesResponse {
"""Paginated list of returned crew invoices."""
paginatedList: [CrewInvoice!]!

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

type CrewInvoice {
paymentReportId: ID!
paymentReportOid: ObjectID!
crewId: ID!
crewOid: ObjectID!

"""Workforce ID when the report was created"""
crewUniqueId: String!

"""Profile when the report was created. Null on legacy reports."""
profileId: ID
profileOid: ObjectID
profileName: String
status: CrewInvoiceStatus!
submissionType: CrewInvoiceSubmissionType

"""
Invoice number set by the crew member, or generated if they did not set one
"""
reference: String
submittedAt: Time
updatedAt: Time

"""Defaults to 30 days after submission"""
dueDate: Date
taxStatus: CrewInvoiceTaxStatus

"""0 unless taxStatus is REGISTERED"""
taxPercentage: Int

"""Set when either the invoice or its payment report is marked as paid"""
paid: Boolean!

"""Excludes tax"""
total: Float!

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

"""URL of the uploaded invoice document, valid for 12 hours"""
file: String
items: [PaymentReportItem!]!

"""
Lines of the submitted invoice. Their sum can differ from total. Null until
the invoice is submitted.
"""
lines: [CrewInvoiceLine!]
}

"""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 CrewInvoiceLine {
title: String!
description: String!

"""Excludes tax"""
price: Float!
quantity: Int!
taxPercentage: Int!

"""Breakdown of an expense line, empty on other lines"""
expenses: [CrewInvoiceLineExpense!]!
}

enum CrewInvoiceStatus {
NOT_SUBMITTED
REVIEW
APPROVED
REJECTED
}

enum CrewInvoiceSubmissionType {
"""Generated from the payment report, approved on submission"""
MANUAL

"""
Document uploaded by the crew member, in REVIEW until an admin approves or
rejects it
"""
UPLOAD
}

enum CrewInvoiceTaxStatus {
REGISTERED
NOT_REGISTERED
}

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

type PaymentReportItem {
paymentReportId: ID!
paymentReportOid: ObjectID!
itemType: PaymentReportItemType!
crewId: ID!
crewOid: ObjectID!

"""Workforce ID when the report was created"""
crewUniqueId: String!

"""Profile when the report was created. Null on legacy reports."""
profileId: ID
profileOid: ObjectID
profileName: String
crewJobId: ID!
crewJobOid: ObjectID!
jobId: ID!
jobOid: ObjectID!
boardName: String!
setName: String!
groupName: String!
internalJobTitle: String!
roleName: String!

"""Comma-separated client label names"""
clientName: String!

"""Comma-separated project-number label names"""
projectIds: String!

"""Worked period, in the job's timezone"""
start: Time!
end: Time!

"""IANA timezone name"""
timezone: String!

"""In minutes"""
breakPeriod: Int!
breakPeriodPaid: Boolean!

"""In hours. Always 1 unless feeType is PER_HOUR."""
roleDuration: Float!

"""
roleDuration less an unpaid break. Always 1 unless feeType is PER_HOUR.
"""
hoursWorked: Float!
feeType: FeeType!

"""Fee per hour for PER_HOUR roles, the fixed fee otherwise"""
hourlyFee: Float!
salary: Float!
bonus: Float!
fineNet: Float!
fineGross: Float!
subsistence: Float!

"""
With inclusive holiday pay, totalSalary less holidayPay. Otherwise equal to
salary.
"""
basePay: Float!

"""Null when holiday pay does not apply"""
holidayPay: Float

"""
salary plus bonus and subsistence, less fines, plus exclusive holiday pay
"""
totalSalary: Float!
expensesTotal: Float!

"""totalSalary plus expensesTotal"""
totalPayable: Float!

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

"""Approved expenses, read from the expense claim rather than the report"""
expenses: [PaymentReportItemExpense!]!

"""
Paid by a crew invoice rather than through payroll. Reports created before
1 September 2022 predate crew invoices: their items can have this set, but
have no invoices.
"""
crewInvoice: Boolean!
}

type CrewInvoiceLineExpense {
type: String!
description: String!

"""Where the expense was incurred"""
supplier: String!
amount: Float!
}

enum FeeType {
PER_HOUR
PER_JOB
NO_FEE
}

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
}

type PaymentReportItemExpense {
type: String
description: String

"""Where the expense was incurred"""
supplier: String
amount: Float!

"""Receipt URL, valid for 7 days"""
receipt: String
}

enum PaymentReportItemType {
SALARY
EXPENSE
}

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

"""Date is a just a string like '2019-03-14'"""
scalar Date

"""
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