Business Days
4 min
A business day is the daily closing of a cash register location. It holds the orders, the payments and the products sold that day.
Query
query GetBusinessDays($location: Guid, $organization: Guid, $dateBegin: DateTime, $dateEnd: DateTime, $first: Int, $after: String) {
documents {
businessDays(location: $location, organization: $organization, dateBegin: $dateBegin, dateEnd: $dateEnd, closedOnly: true, first: $first, after: $after) {
totalCount
pageInfo {
hasNextPage
endCursor
}
items {
key
group
number
id
inventoryId
createdOn
closedOn
isBalanced
location { key name }
orders(fiscalReceiptOnly: true) {
key
id
number
createdOn
isRefund
fiscalDocumentId
clientTaxNumber
discount
bill { key createdOn closedOn }
area { key name revenueCenter { key name } }
products {
quantity
salePrice
vatAmount
vatRate
discount
subtotalDiscount
costAmount
product { key name code }
}
payments {
amount
ratio
paymentMethod { key name paymentType }
}
}
rawMaterials {
quantity
costPrice
stockAccount
expenseAccount
product { key name }
warehouse { key name }
}
production {
key
date
warehouse { key name }
products { quantity amount product { key name } }
}
}
}
}
}Variables
{
"location": "<location key>",
"organization": "<organization key>",
"dateBegin": "2026-10-01T00:00:00",
"dateEnd": "2026-10-31T23:59:59",
"first": 10,
"after": null
}cURL
curl --location 'https://sandbox.expressoft.eu/connect/api/interopgql' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{"query": "query GetBusinessDays($location: Guid, $organization: Guid, $dateBegin: DateTime, $dateEnd: DateTime, $first: Int, $after: String) { documents { businessDays(location: $location, organization: $organization, dateBegin: $dateBegin, dateEnd: $dateEnd, closedOnly: true, first: $first, after: $after) { totalCount pageInfo { hasNextPage endCursor } items { key group number id inventoryId createdOn closedOn isBalanced location { key name } orders(fiscalReceiptOnly: true) { key id number createdOn isRefund fiscalDocumentId clientTaxNumber discount bill { key createdOn closedOn } area { key name revenueCenter { key name } } products { quantity salePrice vatAmount vatRate discount subtotalDiscount costAmount product { key name code } } payments { amount ratio paymentMethod { key name paymentType } } } rawMaterials { quantity costPrice stockAccount expenseAccount product { key name } warehouse { key name } } production { key date warehouse { key name } products { quantity amount product { key name } } } } } } }", "variables": {"location": "<location key>", "organization": "<organization key>", "dateBegin": "2026-10-01T00:00:00", "dateEnd": "2026-10-31T23:59:59", "first": 10, "after": null}}'Response
{
"data": {
"documents": {
"businessDays": {
"totalCount": 1,
"pageInfo": {
"hasNextPage": false,
"endCursor": "MQ=="
},
"items": [
{
"key": "00000000-0000-0000-0000-000000000030",
"group": 1,
"number": 120,
"id": 120,
"inventoryId": null,
"createdOn": "2026-10-06T08:00:00",
"closedOn": "2026-10-06T23:00:00",
"isBalanced": true,
"location": {
"key": "00000000-0000-0000-0000-000000000005",
"name": "Downtown Store"
},
"orders": [
{
"key": "00000000-0000-0000-0000-000000000021",
"id": 9001,
"number": 17,
"createdOn": "2026-10-06T12:10:00",
"isRefund": false,
"fiscalDocumentId": 4501,
"clientTaxNumber": null,
"discount": 0.0,
"bill": {
"key": "00000000-0000-0000-0000-000000000022",
"createdOn": "2026-10-06T12:00:00",
"closedOn": "2026-10-06T12:10:00"
},
"area": {
"key": "00000000-0000-0000-0000-000000000023",
"name": "Restaurant",
"revenueCenter": {
"key": "00000000-0000-0000-0000-000000000024",
"name": "Food"
}
},
"products": [
{
"quantity": 2.0,
"salePrice": 10.0,
"vatAmount": 3.47,
"vatRate": 21.0,
"discount": 0.0,
"subtotalDiscount": 0.0,
"costAmount": 6.0,
"product": {
"key": "00000000-0000-0000-0000-000000000003",
"name": "Flour 1 kg",
"code": "P001"
}
}
],
"payments": [
{
"amount": 20.0,
"ratio": 1.0,
"paymentMethod": {
"key": "00000000-0000-0000-0000-000000000006",
"name": "Cash",
"paymentType": "Cash"
}
}
]
}
],
"rawMaterials": [
{
"quantity": 0.5,
"costPrice": 3.0,
"stockAccount": "301",
"expenseAccount": "601",
"product": {
"key": "00000000-0000-0000-0000-000000000003",
"name": "Flour 1 kg",
"code": "P001"
},
"warehouse": {
"key": "00000000-0000-0000-0000-000000000004",
"name": "Main warehouse"
}
}
],
"production": []
}
]
}
}
}
}Argument | Meaning |
|---|---|
location | Only the business days of one location. |
closedOnly | true returns only the closed business days. |
billKey | A list of bill keys. Returns the business days that contain those bills. |
orders(fiscalReceiptOnly) | true returns only the orders that have a fiscal receipt. |
Field | Meaning |
|---|---|
isBalanced | Whether the business day is balanced. |
orders | The orders of the day, with products, payments and refunds (isRefund). |
rawMaterials | The raw materials consumed by the products sold, with their cost. |
production | The production notes of the day. |
💡 TIP
A business day can be large. Request a small first and page through the results.