Welcome!
These pages contain the documentation for the boxtribute GraphQL API (queries only). Have fun exploring!
You can interact with the API the following ways:
- Open the endpoint address in your browser. This launches GraphQL Playground
- Send POST requests to the endpoint from a script or the command line, passing your GraphQL query in the
queryfield of the request JSON
API Endpoints
https://api.boxtribute.org
Version
v2.3.3
Terms of Service
In line with the Service Agreement and other related documents as signed with Boxtribute (Stichting Boxwise)
Authentication and Authorization
For using the API, you have to authenticate, and then are given a unique token holding your user information and permissions. You have to pass the token along when requesting data from the API.
- You need your username and password that you log in to
app.boxtribute.orgwith. Pass it in the JSON part of a POST response toapi.boxtribute.org/token, like{"username": "my-email-address", "password": "PASSWORD"} - Copy the content of the
access_tokenfield of the response JSON - Paste the token into the HTTP headers when sending a request to the API, like
{"Authorization": "Bearer TOKEN"} - When using the GraphQL Playground, paste the header into the respective field in the bottom left.
Queries
base
Example
Query
query base($id: ID!) {
base(id: $id) {
id
name
organisation {
...OrganisationFragment
}
beneficiaries {
...BeneficiaryPageFragment
}
currencyName
locations {
...ClassicLocationFragment
}
products {
...ProductFragment
}
tags {
...TagFragment
}
distributionSpots {
...DistributionSpotFragment
}
distributionEvents {
...DistributionEventFragment
}
distributionEventsBeforeReturnedFromDistributionState {
...DistributionEventFragment
}
distributionEventsInReturnedFromDistributionState {
...DistributionEventFragment
}
distributionEventsTrackingGroups {
...DistributionEventsTrackingGroupFragment
}
distributionEventsStatistics {
...DistributionEventsStatisticsFragment
}
}
}
Variables
{"id": 4}
Response
{
"data": {
"base": {
"id": "4",
"name": "Lesvos",
"organisation": Organisation,
"beneficiaries": BeneficiaryPage,
"currencyName": "drops",
"locations": [ClassicLocation],
"products": [Product],
"tags": [Tag],
"distributionSpots": [DistributionSpot],
"distributionEvents": [DistributionEvent],
"distributionEventsBeforeReturnedFromDistributionState": [
DistributionEvent
],
"distributionEventsInReturnedFromDistributionState": [
DistributionEvent
],
"distributionEventsTrackingGroups": [
DistributionEventsTrackingGroup
],
"distributionEventsStatistics": [
DistributionEventsStatistics
]
}
}
}
bases
Description
Return all Bases that the client is authorized to view.
Response
Returns [Base!]!
Example
Query
query bases {
bases {
id
name
organisation {
...OrganisationFragment
}
beneficiaries {
...BeneficiaryPageFragment
}
currencyName
locations {
...ClassicLocationFragment
}
products {
...ProductFragment
}
tags {
...TagFragment
}
distributionSpots {
...DistributionSpotFragment
}
distributionEvents {
...DistributionEventFragment
}
distributionEventsBeforeReturnedFromDistributionState {
...DistributionEventFragment
}
distributionEventsInReturnedFromDistributionState {
...DistributionEventFragment
}
distributionEventsTrackingGroups {
...DistributionEventsTrackingGroupFragment
}
distributionEventsStatistics {
...DistributionEventsStatisticsFragment
}
}
}
Response
{
"data": {
"bases": [
{
"id": 4,
"name": "Lesvos",
"organisation": Organisation,
"beneficiaries": BeneficiaryPage,
"currencyName": "drops",
"locations": [ClassicLocation],
"products": [Product],
"tags": [Tag],
"distributionSpots": [DistributionSpot],
"distributionEvents": [DistributionEvent],
"distributionEventsBeforeReturnedFromDistributionState": [
DistributionEvent
],
"distributionEventsInReturnedFromDistributionState": [
DistributionEvent
],
"distributionEventsTrackingGroups": [
DistributionEventsTrackingGroup
],
"distributionEventsStatistics": [
DistributionEventsStatistics
]
}
]
}
}
beneficiaries
Description
Return all Beneficiaries that the client is authorized to view.
Response
Returns a BeneficiaryPage!
Arguments
| Name | Description |
|---|---|
paginationInput - PaginationInput
|
|
filterInput - FilterBeneficiaryInput
|
Example
Query
query beneficiaries(
$paginationInput: PaginationInput,
$filterInput: FilterBeneficiaryInput
) {
beneficiaries(
paginationInput: $paginationInput,
filterInput: $filterInput
) {
elements {
...BeneficiaryFragment
}
pageInfo {
...PageInfoFragment
}
totalCount
}
}
Variables
{
"paginationInput": PaginationInput,
"filterInput": FilterBeneficiaryInput
}
Response
{
"data": {
"beneficiaries": {
"elements": [Beneficiary],
"pageInfo": PageInfo,
"totalCount": 123
}
}
}
beneficiary
Response
Returns a Beneficiary
Arguments
| Name | Description |
|---|---|
id - ID!
|
Example
Query
query beneficiary($id: ID!) {
beneficiary(id: $id) {
id
firstName
lastName
dateOfBirth
age
comment
base {
...BaseFragment
}
groupIdentifier
gender
languages
familyHead {
...BeneficiaryFragment
}
active
isVolunteer
signed
registered
signature
dateOfSignature
tokens
transactions {
...TransactionFragment
}
createdBy {
...UserFragment
}
createdOn
lastModifiedBy {
...UserFragment
}
lastModifiedOn
tags {
...TagFragment
}
}
}
Variables
{"id": "4"}
Response
{
"data": {
"beneficiary": {
"id": 4,
"firstName": "Some",
"lastName": "One",
"dateOfBirth": "2020-11-20",
"age": 25,
"comment": "very nice",
"base": Base,
"groupIdentifier": "abc123",
"gender": "Male",
"languages": ["nl"],
"familyHead": Beneficiary,
"active": false,
"isVolunteer": false,
"signed": false,
"registered": false,
"signature": "xyz789",
"dateOfSignature": "2020-11-20",
"tokens": 123,
"transactions": [Transaction],
"createdBy": User,
"createdOn": "2016-10-17T01:08:03",
"lastModifiedBy": User,
"lastModifiedOn": "2016-10-17T01:08:03",
"tags": [Tag]
}
}
}
beneficiaryDemographics
Response
Returns a BeneficiaryDemographicsData
Arguments
| Name | Description |
|---|---|
baseId - Int!
|
Example
Query
query beneficiaryDemographics($baseId: Int!) {
beneficiaryDemographics(baseId: $baseId) {
facts {
...BeneficiaryDemographicsResultFragment
}
dimensions {
...BeneficiaryDemographicsDimensionsFragment
}
}
}
Variables
{"baseId": 987}
Response
{
"data": {
"beneficiaryDemographics": {
"facts": [BeneficiaryDemographicsResult],
"dimensions": BeneficiaryDemographicsDimensions
}
}
}
box
Example
Query
query box($labelIdentifier: String!) {
box(labelIdentifier: $labelIdentifier) {
id
labelIdentifier
location {
...LocationFragment
}
distributionEvent {
...DistributionEventFragment
}
numberOfItems
product {
...ProductFragment
}
size {
...SizeFragment
}
state
qrCode {
...QrCodeFragment
}
createdBy {
...UserFragment
}
createdOn
lastModifiedBy {
...UserFragment
}
lastModifiedOn
comment
tags {
...TagFragment
}
history {
...HistoryEntryFragment
}
shipmentDetail {
...ShipmentDetailFragment
}
}
}
Variables
{"labelIdentifier": "xyz789"}
Response
{
"data": {
"box": {
"id": 4,
"labelIdentifier": "abc123",
"location": Location,
"distributionEvent": DistributionEvent,
"numberOfItems": 987,
"product": Product,
"size": "XL",
"state": "InStock",
"qrCode": QrCode,
"createdBy": User,
"createdOn": "2016-10-17T01:08:03",
"lastModifiedBy": User,
"lastModifiedOn": "2016-10-17T01:08:03",
"comment": "very new",
"tags": [Tag],
"history": [HistoryEntry],
"shipmentDetail": ShipmentDetail
}
}
}
boxes
Response
Returns a BoxPage!
Arguments
| Name | Description |
|---|---|
baseId - ID!
|
|
paginationInput - PaginationInput
|
|
filterInput - FilterBoxInput
|
Example
Query
query boxes(
$baseId: ID!,
$paginationInput: PaginationInput,
$filterInput: FilterBoxInput
) {
boxes(
baseId: $baseId,
paginationInput: $paginationInput,
filterInput: $filterInput
) {
elements {
...BoxFragment
}
pageInfo {
...PageInfoFragment
}
totalCount
}
}
Variables
{
"baseId": "4",
"paginationInput": PaginationInput,
"filterInput": FilterBoxInput
}
Response
{
"data": {
"boxes": {
"elements": [Box],
"pageInfo": PageInfo,
"totalCount": 123
}
}
}
createdBoxes
Response
Returns a CreatedBoxesData
Arguments
| Name | Description |
|---|---|
baseId - Int!
|
Example
Query
query createdBoxes($baseId: Int!) {
createdBoxes(baseId: $baseId) {
facts {
...CreatedBoxesResultFragment
}
dimensions {
...CreatedBoxDataDimensionsFragment
}
}
}
Variables
{"baseId": 123}
Response
{
"data": {
"createdBoxes": {
"facts": [CreatedBoxesResult],
"dimensions": CreatedBoxDataDimensions
}
}
}
distributionEvent
Response
Returns a DistributionEvent
Arguments
| Name | Description |
|---|---|
id - ID!
|
Example
Query
query distributionEvent($id: ID!) {
distributionEvent(id: $id) {
id
distributionSpot {
...DistributionSpotFragment
}
name
state
plannedStartDateTime
plannedEndDateTime
packingListEntries {
...PackingListEntryFragment
}
boxes {
...BoxFragment
}
unboxedItemsCollections {
...UnboxedItemsCollectionFragment
}
distributionEventsTrackingGroup {
...DistributionEventsTrackingGroupFragment
}
}
}
Variables
{"id": "4"}
Response
{
"data": {
"distributionEvent": {
"id": "4",
"distributionSpot": DistributionSpot,
"name": "xyz789",
"state": "Planning",
"plannedStartDateTime": "2016-10-17T01:08:03",
"plannedEndDateTime": "2016-10-17T01:08:03",
"packingListEntries": [PackingListEntry],
"boxes": [Box],
"unboxedItemsCollections": [UnboxedItemsCollection],
"distributionEventsTrackingGroup": DistributionEventsTrackingGroup
}
}
}
distributionEventsTrackingGroup
Response
Returns a DistributionEventsTrackingGroup
Arguments
| Name | Description |
|---|---|
id - ID!
|
Example
Query
query distributionEventsTrackingGroup($id: ID!) {
distributionEventsTrackingGroup(id: $id) {
id
state
distributionEvents {
...DistributionEventFragment
}
distributionEventsTrackingEntries {
...DistributionEventsTrackingEntryFragment
}
createdOn
}
}
Variables
{"id": "4"}
Response
{
"data": {
"distributionEventsTrackingGroup": {
"id": "4",
"state": "InProgress",
"distributionEvents": [DistributionEvent],
"distributionEventsTrackingEntries": [
DistributionEventsTrackingEntry
],
"createdOn": "2016-10-17T01:08:03"
}
}
}
distributionSpot
Response
Returns a DistributionSpot
Arguments
| Name | Description |
|---|---|
id - ID!
|
Example
Query
query distributionSpot($id: ID!) {
distributionSpot(id: $id) {
id
name
base {
...BaseFragment
}
boxes {
...BoxPageFragment
}
comment
latitude
longitude
distributionEvents {
...DistributionEventFragment
}
}
}
Variables
{"id": 4}
Response
{
"data": {
"distributionSpot": {
"id": 4,
"name": "abc123",
"base": Base,
"boxes": BoxPage,
"comment": "xyz789",
"latitude": 123.45,
"longitude": 123.45,
"distributionEvents": [DistributionEvent]
}
}
}
distributionSpots
Description
Return all DistributionSpots that the client is authorized to view.
Response
Returns [DistributionSpot!]!
Example
Query
query distributionSpots {
distributionSpots {
id
name
base {
...BaseFragment
}
boxes {
...BoxPageFragment
}
comment
latitude
longitude
distributionEvents {
...DistributionEventFragment
}
}
}
Response
{
"data": {
"distributionSpots": [
{
"id": 4,
"name": "xyz789",
"base": Base,
"boxes": BoxPage,
"comment": "abc123",
"latitude": 987.65,
"longitude": 987.65,
"distributionEvents": [DistributionEvent]
}
]
}
}
location
Response
Returns a ClassicLocation
Arguments
| Name | Description |
|---|---|
id - ID!
|
Example
Query
query location($id: ID!) {
location(id: $id) {
id
base {
...BaseFragment
}
name
seq
isShop
isStockroom
boxes {
...BoxPageFragment
}
defaultBoxState
createdBy {
...UserFragment
}
createdOn
lastModifiedBy {
...UserFragment
}
lastModifiedOn
}
}
Variables
{"id": 4}
Response
{
"data": {
"location": {
"id": 4,
"base": Base,
"name": "xyz789",
"seq": 123,
"isShop": true,
"isStockroom": false,
"boxes": BoxPage,
"defaultBoxState": "InStock",
"createdBy": User,
"createdOn": "2016-10-17T01:08:03",
"lastModifiedBy": User,
"lastModifiedOn": "2016-10-17T01:08:03"
}
}
}
locations
Description
Return all ClassicLocations that the client is authorized to view.
Response
Returns [ClassicLocation!]!
Example
Query
query locations {
locations {
id
base {
...BaseFragment
}
name
seq
isShop
isStockroom
boxes {
...BoxPageFragment
}
defaultBoxState
createdBy {
...UserFragment
}
createdOn
lastModifiedBy {
...UserFragment
}
lastModifiedOn
}
}
Response
{
"data": {
"locations": [
{
"id": 4,
"base": Base,
"name": "abc123",
"seq": 987,
"isShop": false,
"isStockroom": false,
"boxes": BoxPage,
"defaultBoxState": "InStock",
"createdBy": User,
"createdOn": "2016-10-17T01:08:03",
"lastModifiedBy": User,
"lastModifiedOn": "2016-10-17T01:08:03"
}
]
}
}
metrics
Description
Return various metrics about stock and beneficiaries for client's organisation.
Example
Query
query metrics($organisationId: ID) {
metrics(organisationId: $organisationId) {
numberOfFamiliesServed
numberOfBeneficiariesServed
numberOfSales
stockOverview {
...StockOverviewFragment
}
movedStockOverview {
...StockOverviewFragment
}
}
}
Variables
{"organisationId": "4"}
Response
{
"data": {
"metrics": {
"numberOfFamiliesServed": 987,
"numberOfBeneficiariesServed": 123,
"numberOfSales": 987,
"stockOverview": StockOverview,
"movedStockOverview": [StockOverview]
}
}
}
movedBoxes
Response
Returns a MovedBoxesData
Arguments
| Name | Description |
|---|---|
baseId - Int!
|
Example
Query
query movedBoxes($baseId: Int!) {
movedBoxes(baseId: $baseId) {
facts {
...MovedBoxesResultFragment
}
dimensions {
...MovedBoxDataDimensionsFragment
}
}
}
Variables
{"baseId": 123}
Response
{
"data": {
"movedBoxes": {
"facts": [MovedBoxesResult],
"dimensions": MovedBoxDataDimensions
}
}
}
organisation
Response
Returns an Organisation
Arguments
| Name | Description |
|---|---|
id - ID!
|
Example
Query
query organisation($id: ID!) {
organisation(id: $id) {
id
name
bases {
...BaseFragment
}
}
}
Variables
{"id": "4"}
Response
{
"data": {
"organisation": {
"id": "4",
"name": "Helpful Helpers",
"bases": [Base]
}
}
}
organisations
Description
Return all Organisations that the client is authorized to view.
Response
Returns [Organisation!]!
Example
Query
query organisations {
organisations {
id
name
bases {
...BaseFragment
}
}
}
Response
{
"data": {
"organisations": [
{
"id": 4,
"name": "Helpful Helpers",
"bases": [Base]
}
]
}
}
packingListEntry
Response
Returns a PackingListEntry
Arguments
| Name | Description |
|---|---|
id - ID!
|
Example
Query
query packingListEntry($id: ID!) {
packingListEntry(id: $id) {
id
product {
...ProductFragment
}
size {
...SizeFragment
}
numberOfItems
matchingPackedItemsCollections {
...ItemsCollectionFragment
}
state
}
}
Variables
{"id": "4"}
Response
{
"data": {
"packingListEntry": {
"id": 4,
"product": Product,
"size": Size,
"numberOfItems": 987,
"matchingPackedItemsCollections": [ItemsCollection],
"state": "NotStarted"
}
}
}
product
Example
Query
query product($id: ID!) {
product(id: $id) {
id
name
category {
...ProductCategoryFragment
}
sizeRange {
...SizeRangeFragment
}
base {
...BaseFragment
}
price
gender
createdBy {
...UserFragment
}
createdOn
lastModifiedBy {
...UserFragment
}
lastModifiedOn
deletedOn
}
}
Variables
{"id": 4}
Response
{
"data": {
"product": {
"id": 4,
"name": "gloves",
"category": ProductCategory,
"sizeRange": SizeRange,
"base": Base,
"price": 123.45,
"gender": "Men",
"createdBy": User,
"createdOn": "2016-10-17T01:08:03",
"lastModifiedBy": User,
"lastModifiedOn": "2016-10-17T01:08:03",
"deletedOn": "2016-10-17T01:08:03"
}
}
}
productCategories
Description
Return all ProductCategories that the client is authorized to view.
Response
Returns [ProductCategory!]!
Example
Query
query productCategories {
productCategories {
id
name
products {
...ProductPageFragment
}
sizeRanges {
...SizeRangeFragment
}
hasGender
}
}
Response
{
"data": {
"productCategories": [
{
"id": "4",
"name": "Clothing",
"products": ProductPage,
"sizeRanges": [SizeRange],
"hasGender": false
}
]
}
}
productCategory
Response
Returns a ProductCategory
Arguments
| Name | Description |
|---|---|
id - ID!
|
Example
Query
query productCategory($id: ID!) {
productCategory(id: $id) {
id
name
products {
...ProductPageFragment
}
sizeRanges {
...SizeRangeFragment
}
hasGender
}
}
Variables
{"id": 4}
Response
{
"data": {
"productCategory": {
"id": "4",
"name": "Clothing",
"products": ProductPage,
"sizeRanges": [SizeRange],
"hasGender": true
}
}
}
products
Description
Return all Products that the client is authorized to view.
Response
Returns a ProductPage!
Arguments
| Name | Description |
|---|---|
paginationInput - PaginationInput
|
Example
Query
query products($paginationInput: PaginationInput) {
products(paginationInput: $paginationInput) {
elements {
...ProductFragment
}
pageInfo {
...PageInfoFragment
}
totalCount
}
}
Variables
{"paginationInput": PaginationInput}
Response
{
"data": {
"products": {
"elements": [Product],
"pageInfo": PageInfo,
"totalCount": 123
}
}
}
qrCode
Example
Query
query qrCode($qrCode: String!) {
qrCode(qrCode: $qrCode) {
id
code
box {
...BoxFragment
}
createdOn
}
}
Variables
{"qrCode": "abc123"}
Response
{
"data": {
"qrCode": {
"id": "4",
"code": "xyz789",
"box": Box,
"createdOn": "2016-10-17T01:08:03"
}
}
}
qrExists
shipment
Example
Query
query shipment($id: ID!) {
shipment(id: $id) {
id
labelIdentifier
sourceBase {
...BaseFragment
}
targetBase {
...BaseFragment
}
state
startedBy {
...UserFragment
}
startedOn
sentBy {
...UserFragment
}
sentOn
receivingStartedBy {
...UserFragment
}
receivingStartedOn
completedBy {
...UserFragment
}
completedOn
canceledBy {
...UserFragment
}
canceledOn
transferAgreement {
...TransferAgreementFragment
}
details {
...ShipmentDetailFragment
}
}
}
Variables
{"id": "4"}
Response
{
"data": {
"shipment": {
"id": 4,
"labelIdentifier": "abc123",
"sourceBase": Base,
"targetBase": Base,
"state": "Preparing",
"startedBy": User,
"startedOn": "2016-10-17T01:08:03",
"sentBy": User,
"sentOn": "2016-10-17T01:08:03",
"receivingStartedBy": User,
"receivingStartedOn": "2016-10-17T01:08:03",
"completedBy": User,
"completedOn": "2016-10-17T01:08:03",
"canceledBy": User,
"canceledOn": "2016-10-17T01:08:03",
"transferAgreement": TransferAgreement,
"details": [ShipmentDetail]
}
}
}
shipments
Description
Return all Shipments that the client is authorized to view.
Response
Returns [Shipment!]!
Example
Query
query shipments {
shipments {
id
labelIdentifier
sourceBase {
...BaseFragment
}
targetBase {
...BaseFragment
}
state
startedBy {
...UserFragment
}
startedOn
sentBy {
...UserFragment
}
sentOn
receivingStartedBy {
...UserFragment
}
receivingStartedOn
completedBy {
...UserFragment
}
completedOn
canceledBy {
...UserFragment
}
canceledOn
transferAgreement {
...TransferAgreementFragment
}
details {
...ShipmentDetailFragment
}
}
}
Response
{
"data": {
"shipments": [
{
"id": "4",
"labelIdentifier": "abc123",
"sourceBase": Base,
"targetBase": Base,
"state": "Preparing",
"startedBy": User,
"startedOn": "2016-10-17T01:08:03",
"sentBy": User,
"sentOn": "2016-10-17T01:08:03",
"receivingStartedBy": User,
"receivingStartedOn": "2016-10-17T01:08:03",
"completedBy": User,
"completedOn": "2016-10-17T01:08:03",
"canceledBy": User,
"canceledOn": "2016-10-17T01:08:03",
"transferAgreement": TransferAgreement,
"details": [ShipmentDetail]
}
]
}
}
stockOverview
Response
Returns a StockOverviewData
Arguments
| Name | Description |
|---|---|
baseId - Int!
|
Example
Query
query stockOverview($baseId: Int!) {
stockOverview(baseId: $baseId) {
facts {
...StockOverviewResultFragment
}
dimensions {
...StockOverviewDataDimensionsFragment
}
}
}
Variables
{"baseId": 987}
Response
{
"data": {
"stockOverview": {
"facts": [StockOverviewResult],
"dimensions": StockOverviewDataDimensions
}
}
}
tag
Example
Query
query tag($id: ID!) {
tag(id: $id) {
id
name
description
color
type
taggedResources {
... on Box {
...BoxFragment
}
... on Beneficiary {
...BeneficiaryFragment
}
}
base {
...BaseFragment
}
}
}
Variables
{"id": 4}
Response
{
"data": {
"tag": {
"id": "4",
"name": "xyz789",
"description": "xyz789",
"color": "abc123",
"type": "Box",
"taggedResources": [Box],
"base": Base
}
}
}
topProductsCheckedOut
Response
Returns a TopProductsCheckedOutData
Arguments
| Name | Description |
|---|---|
baseId - Int!
|
Example
Query
query topProductsCheckedOut($baseId: Int!) {
topProductsCheckedOut(baseId: $baseId) {
facts {
...TopProductsCheckedOutResultFragment
}
dimensions {
...TopProductsDimensionsFragment
}
}
}
Variables
{"baseId": 987}
Response
{
"data": {
"topProductsCheckedOut": {
"facts": [TopProductsCheckedOutResult],
"dimensions": TopProductsDimensions
}
}
}
topProductsDonated
Response
Returns a TopProductsDonatedData
Arguments
| Name | Description |
|---|---|
baseId - Int!
|
Example
Query
query topProductsDonated($baseId: Int!) {
topProductsDonated(baseId: $baseId) {
facts {
...TopProductsDonatedResultFragment
}
dimensions {
...TopProductsDimensionsFragment
}
}
}
Variables
{"baseId": 987}
Response
{
"data": {
"topProductsDonated": {
"facts": [TopProductsDonatedResult],
"dimensions": TopProductsDimensions
}
}
}
transferAgreement
Response
Returns a TransferAgreement
Arguments
| Name | Description |
|---|---|
id - ID!
|
Example
Query
query transferAgreement($id: ID!) {
transferAgreement(id: $id) {
id
sourceOrganisation {
...OrganisationFragment
}
targetOrganisation {
...OrganisationFragment
}
state
type
requestedBy {
...UserFragment
}
requestedOn
acceptedBy {
...UserFragment
}
acceptedOn
terminatedBy {
...UserFragment
}
terminatedOn
validFrom
validUntil
comment
sourceBases {
...BaseFragment
}
targetBases {
...BaseFragment
}
shipments {
...ShipmentFragment
}
}
}
Variables
{"id": "4"}
Response
{
"data": {
"transferAgreement": {
"id": 4,
"sourceOrganisation": Organisation,
"targetOrganisation": Organisation,
"state": "UnderReview",
"type": "SendingTo",
"requestedBy": User,
"requestedOn": "2016-10-17T01:08:03",
"acceptedBy": User,
"acceptedOn": "2016-10-17T01:08:03",
"terminatedBy": User,
"terminatedOn": "2016-10-17T01:08:03",
"validFrom": "2016-10-17T01:08:03",
"validUntil": "2016-10-17T01:08:03",
"comment": "abc123",
"sourceBases": [Base],
"targetBases": [Base],
"shipments": [Shipment]
}
}
}
transferAgreements
Description
Return all TransferAgreements that the client is authorized to view. Without any arguments, return transfer agreements that involve client's organisation, regardless of agreement state. Optionally filter for agreements of certain state(s).
Response
Returns [TransferAgreement!]!
Arguments
| Name | Description |
|---|---|
states - [TransferAgreementState!]
|
Example
Query
query transferAgreements($states: [TransferAgreementState!]) {
transferAgreements(states: $states) {
id
sourceOrganisation {
...OrganisationFragment
}
targetOrganisation {
...OrganisationFragment
}
state
type
requestedBy {
...UserFragment
}
requestedOn
acceptedBy {
...UserFragment
}
acceptedOn
terminatedBy {
...UserFragment
}
terminatedOn
validFrom
validUntil
comment
sourceBases {
...BaseFragment
}
targetBases {
...BaseFragment
}
shipments {
...ShipmentFragment
}
}
}
Variables
{"states": ["UnderReview"]}
Response
{
"data": {
"transferAgreements": [
{
"id": 4,
"sourceOrganisation": Organisation,
"targetOrganisation": Organisation,
"state": "UnderReview",
"type": "SendingTo",
"requestedBy": User,
"requestedOn": "2016-10-17T01:08:03",
"acceptedBy": User,
"acceptedOn": "2016-10-17T01:08:03",
"terminatedBy": User,
"terminatedOn": "2016-10-17T01:08:03",
"validFrom": "2016-10-17T01:08:03",
"validUntil": "2016-10-17T01:08:03",
"comment": "abc123",
"sourceBases": [Base],
"targetBases": [Base],
"shipments": [Shipment]
}
]
}
}
user
Example
Query
query user($id: ID) {
user(id: $id) {
id
organisation {
...OrganisationFragment
}
name
email
validFirstDay
validLastDay
bases {
...BaseFragment
}
lastLogin
lastAction
}
}
Variables
{"id": 4}
Response
{
"data": {
"user": {
"id": "4",
"organisation": Organisation,
"name": "xyz789",
"email": "xyz789",
"validFirstDay": "2020-11-20",
"validLastDay": "2020-11-20",
"bases": [Base],
"lastLogin": "2016-10-17T01:08:03",
"lastAction": "2016-10-17T01:08:03"
}
}
}
users
Description
Return all Users that the client is authorized to view.
Response
Returns [User!]!
Example
Query
query users {
users {
id
organisation {
...OrganisationFragment
}
name
email
validFirstDay
validLastDay
bases {
...BaseFragment
}
lastLogin
lastAction
}
}
Response
{
"data": {
"users": [
{
"id": "4",
"organisation": Organisation,
"name": "abc123",
"email": "xyz789",
"validFirstDay": "2020-11-20",
"validLastDay": "2020-11-20",
"bases": [Base],
"lastLogin": "2016-10-17T01:08:03",
"lastAction": "2016-10-17T01:08:03"
}
]
}
}
Types
Base
Description
Representation of a base. The base is managed by a specific Organisation.
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
name - String!
|
|
organisation - Organisation!
|
|
beneficiaries - BeneficiaryPage
|
List of all Beneficiaries registered in this base |
Arguments
|
|
currencyName - String
|
|
locations - [ClassicLocation!]!
|
List of all undeleted ClassicLocations present in this base |
products - [Product!]!
|
List of all undeleted Products registered in this base |
tags - [Tag!]
|
List of all Tags registered in this base. Optionally filter for a resource type |
Arguments
|
|
distributionSpots - [DistributionSpot!]!
|
|
distributionEvents - [DistributionEvent!]!
|
|
Arguments
|
|
distributionEventsBeforeReturnedFromDistributionState - [DistributionEvent!]!
|
|
distributionEventsInReturnedFromDistributionState - [DistributionEvent!]!
|
|
distributionEventsTrackingGroups - [DistributionEventsTrackingGroup!]!
|
|
Arguments |
|
distributionEventsStatistics - [DistributionEventsStatistics!]!
|
|
Example
{
"id": "4",
"name": "Lesvos",
"organisation": Organisation,
"beneficiaries": BeneficiaryPage,
"currencyName": "drops",
"locations": [ClassicLocation],
"products": [Product],
"tags": [Tag],
"distributionSpots": [DistributionSpot],
"distributionEvents": [DistributionEvent],
"distributionEventsBeforeReturnedFromDistributionState": [
DistributionEvent
],
"distributionEventsInReturnedFromDistributionState": [
DistributionEvent
],
"distributionEventsTrackingGroups": [
DistributionEventsTrackingGroup
],
"distributionEventsStatistics": [
DistributionEventsStatistics
]
}
BasicDimensionInfo
Possible Types
| BasicDimensionInfo Types |
|---|
Example
{
"id": "4",
"name": "abc123"
}
Beneficiary
Description
Representation of a beneficiary. The beneficiary is registered in a specific Base.
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
firstName - String!
|
|
lastName - String!
|
|
dateOfBirth - Date
|
|
age - Int
|
If dateOfBirth is not set, age will be null. |
comment - String
|
|
base - Base
|
|
groupIdentifier - String!
|
All members of a family have the same group identifier |
gender - HumanGender
|
|
languages - [Language!]
|
|
familyHead - Beneficiary
|
Null if this beneficiary is the family head |
active - Boolean!
|
|
isVolunteer - Boolean!
|
|
signed - Boolean!
|
|
registered - Boolean!
|
|
signature - String
|
|
dateOfSignature - Date
|
|
tokens - Int
|
Number of tokens the beneficiary holds (sum of all transaction values) |
transactions - [Transaction!]
|
List of all Transactions that this beneficiary executed |
createdBy - User
|
|
createdOn - Datetime
|
|
lastModifiedBy - User
|
|
lastModifiedOn - Datetime
|
|
tags - [Tag!]
|
Example
{
"id": 4,
"firstName": "Some",
"lastName": "One",
"dateOfBirth": "2020-11-20",
"age": 25,
"comment": "very nice",
"base": Base,
"groupIdentifier": "abc123",
"gender": "Male",
"languages": ["nl"],
"familyHead": Beneficiary,
"active": false,
"isVolunteer": false,
"signed": true,
"registered": true,
"signature": "xyz789",
"dateOfSignature": "2020-11-20",
"tokens": 987,
"transactions": [Transaction],
"createdBy": User,
"createdOn": "2016-10-17T01:08:03",
"lastModifiedBy": User,
"lastModifiedOn": "2016-10-17T01:08:03",
"tags": [Tag]
}
BeneficiaryDemographicsData
Fields
| Field Name | Description |
|---|---|
facts - [BeneficiaryDemographicsResult]
|
|
dimensions - BeneficiaryDemographicsDimensions
|
Example
{
"facts": [BeneficiaryDemographicsResult],
"dimensions": BeneficiaryDemographicsDimensions
}
BeneficiaryDemographicsDimensions
Fields
| Field Name | Description |
|---|---|
tag - [TagDimensionInfo]
|
Example
{"tag": [TagDimensionInfo]}
BeneficiaryDemographicsResult
Fields
| Field Name | Description |
|---|---|
age - Int
|
|
gender - HumanGender
|
|
createdOn - Date
|
|
tagIds - [Int!]
|
|
count - Int
|
Example
{
"age": 123,
"gender": "Male",
"createdOn": "2020-11-20",
"tagIds": [987],
"count": 987
}
BeneficiaryPage
Description
Utility type holding a page of Beneficiaries.
Fields
| Field Name | Description |
|---|---|
elements - [Beneficiary!]
|
|
pageInfo - PageInfo!
|
|
totalCount - Int!
|
Example
{
"elements": [Beneficiary],
"pageInfo": PageInfo,
"totalCount": 123
}
Boolean
Description
The Boolean scalar type represents true or false.
Box
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
labelIdentifier - String!
|
Sequence of numbers for identifying the box, usually written on box label |
location - Location
|
|
distributionEvent - DistributionEvent
|
|
numberOfItems - Int
|
|
product - Product
|
|
size - Size!
|
|
state - BoxState!
|
|
qrCode - QrCode
|
|
createdBy - User
|
|
createdOn - Datetime
|
|
lastModifiedBy - User
|
|
lastModifiedOn - Datetime
|
|
comment - String
|
|
tags - [Tag!]
|
|
history - [HistoryEntry!]
|
|
shipmentDetail - ShipmentDetail
|
Returns null if box is not part of an active shipment |
Example
{
"id": 4,
"labelIdentifier": "xyz789",
"location": Location,
"distributionEvent": DistributionEvent,
"numberOfItems": 123,
"product": Product,
"size": "XL",
"state": "InStock",
"qrCode": QrCode,
"createdBy": User,
"createdOn": "2016-10-17T01:08:03",
"lastModifiedBy": User,
"lastModifiedOn": "2016-10-17T01:08:03",
"comment": "very new",
"tags": [Tag],
"history": [HistoryEntry],
"shipmentDetail": ShipmentDetail
}
BoxPage
BoxState
Description
Classificators for Box state.
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"InStock"
ClassicLocation
Description
Representation of a classic physical location used to store Boxes (e.g. a warehouse). The location is part of a specific Base.
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
base - Base
|
|
name - String
|
|
seq - Int
|
|
isShop - Boolean!
|
|
isStockroom - Boolean!
|
|
boxes - BoxPage
|
List of all the Boxes in this classic location |
Arguments
|
|
defaultBoxState - BoxState
|
Default state for boxes in this classic location |
createdBy - User
|
|
createdOn - Datetime
|
|
lastModifiedBy - User
|
|
lastModifiedOn - Datetime
|
|
Example
{
"id": "4",
"base": Base,
"name": "xyz789",
"seq": 987,
"isShop": false,
"isStockroom": true,
"boxes": BoxPage,
"defaultBoxState": "InStock",
"createdBy": User,
"createdOn": "2016-10-17T01:08:03",
"lastModifiedBy": User,
"lastModifiedOn": "2016-10-17T01:08:03"
}
CreatedBoxDataDimensions
Fields
| Field Name | Description |
|---|---|
product - [ProductDimensionInfo]
|
|
category - [DimensionInfo]
|
Example
{
"product": [ProductDimensionInfo],
"category": [DimensionInfo]
}
CreatedBoxesData
Fields
| Field Name | Description |
|---|---|
facts - [CreatedBoxesResult]
|
|
dimensions - CreatedBoxDataDimensions
|
Example
{
"facts": [CreatedBoxesResult],
"dimensions": CreatedBoxDataDimensions
}
CreatedBoxesResult
DataCube
Fields
| Field Name | Description |
|---|---|
facts - [Result]
|
|
dimensions - Dimensions
|
Possible Types
| DataCube Types |
|---|
Example
{
"facts": [BeneficiaryDemographicsResult],
"dimensions": BeneficiaryDemographicsDimensions
}
Date
Example
"2020-11-20"
Datetime
Example
"2016-10-17T01:08:03"
DimensionInfo
Dimensions
Example
BeneficiaryDemographicsDimensions
DistributionEvent
Description
TODO: Add description here once specs are final/confirmed
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
distributionSpot - DistributionSpot
|
|
name - String
|
|
state - DistributionEventState!
|
|
plannedStartDateTime - Datetime!
|
|
plannedEndDateTime - Datetime!
|
|
packingListEntries - [PackingListEntry!]!
|
|
boxes - [Box!]!
|
|
unboxedItemsCollections - [UnboxedItemsCollection!]!
|
|
distributionEventsTrackingGroup - DistributionEventsTrackingGroup
|
Example
{
"id": 4,
"distributionSpot": DistributionSpot,
"name": "abc123",
"state": "Planning",
"plannedStartDateTime": "2016-10-17T01:08:03",
"plannedEndDateTime": "2016-10-17T01:08:03",
"packingListEntries": [PackingListEntry],
"boxes": [Box],
"unboxedItemsCollections": [UnboxedItemsCollection],
"distributionEventsTrackingGroup": DistributionEventsTrackingGroup
}
DistributionEventState
Description
TODO: Add description here once specs are final/confirmed
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"Planning"
DistributionEventTrackingFlowDirection
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
Example
"In"
DistributionEventsStatistics
Fields
| Field Name | Description |
|---|---|
productName - String!
|
|
genderLabel - String!
|
|
categoryLabel - String!
|
|
sizeLabel - String!
|
|
inflow - Int!
|
|
outflow - Int!
|
|
earliestPossibleDistroDate - String!
|
|
latestPossibleDistroDate - String!
|
|
potentiallyInvolvedDistributionSpots - String!
|
|
involvedDistributionEventIds - String!
|
|
distroEventTrackingGroupId - String!
|
|
productId - String!
|
|
sizeId - String!
|
Example
{
"productName": "abc123",
"genderLabel": "xyz789",
"categoryLabel": "xyz789",
"sizeLabel": "abc123",
"inflow": 123,
"outflow": 123,
"earliestPossibleDistroDate": "abc123",
"latestPossibleDistroDate": "xyz789",
"potentiallyInvolvedDistributionSpots": "xyz789",
"involvedDistributionEventIds": "xyz789",
"distroEventTrackingGroupId": "xyz789",
"productId": "xyz789",
"sizeId": "xyz789"
}
DistributionEventsTrackingEntry
Description
TODO: Add description here once specs are final/confirmed
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
product - Product!
|
|
size - Size!
|
|
numberOfItems - Int!
|
|
distributionEventsTrackingGroup - DistributionEventsTrackingGroup!
|
|
dateTimeOfTracking - Datetime!
|
|
flowDirection - DistributionEventTrackingFlowDirection!
|
Example
{
"id": 4,
"product": Product,
"size": Size,
"numberOfItems": 123,
"distributionEventsTrackingGroup": DistributionEventsTrackingGroup,
"dateTimeOfTracking": "2016-10-17T01:08:03",
"flowDirection": "In"
}
DistributionEventsTrackingGroup
Description
TODO: Add description here once specs are final/confirmed
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
state - DistributionEventsTrackingGroupState!
|
|
distributionEvents - [DistributionEvent!]!
|
|
distributionEventsTrackingEntries - [DistributionEventsTrackingEntry!]!
|
|
createdOn - Datetime!
|
Example
{
"id": "4",
"state": "InProgress",
"distributionEvents": [DistributionEvent],
"distributionEventsTrackingEntries": [
DistributionEventsTrackingEntry
],
"createdOn": "2016-10-17T01:08:03"
}
DistributionEventsTrackingGroupState
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
Example
"InProgress"
DistributionSpot
Description
TODO: Add description here once specs are final/confirmed
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
name - String
|
|
base - Base
|
|
boxes - BoxPage
|
|
Arguments
|
|
comment - String!
|
|
latitude - Float
|
|
longitude - Float
|
|
distributionEvents - [DistributionEvent!]!
|
|
Example
{
"id": "4",
"name": "abc123",
"base": Base,
"boxes": BoxPage,
"comment": "xyz789",
"latitude": 123.45,
"longitude": 123.45,
"distributionEvents": [DistributionEvent]
}
FilterBeneficiaryInput
Description
Optional filter values when retrieving Beneficiaries. If several fields are defined (not null), they are combined into a filter expression using logical AND (i.e. the filter returns only elements for which all fields are true).
Fields
| Input Field | Description |
|---|---|
createdFrom - Date
|
Filter for all beneficiaries who were created on this date (incl.), or later. |
createdUntil - Date
|
Filter for all beneficiaries who were created on this date (incl.), or earlier. |
active - Boolean
|
|
isVolunteer - Boolean
|
|
registered - Boolean
|
|
pattern - String
|
Filter for all beneficiaries where pattern is (case-insensitive) part of first name, last name, or comment, or where pattern matches the group identifier |
Example
{
"createdFrom": "2020-11-20",
"createdUntil": "2020-11-20",
"active": true,
"isVolunteer": true,
"registered": true,
"pattern": "xyz789"
}
FilterBoxInput
Description
Optional filter values when retrieving Boxes. If several fields are defined (not null), they are combined into a filter expression using logical AND (i.e. the filter returns only elements for which all fields are true).
Fields
| Input Field | Description |
|---|---|
states - [BoxState!]
|
Filter for all boxes that have one of the specified states. |
lastModifiedFrom - Date
|
Filter for all boxes that who were last modified on this date (incl.), or later. |
lastModifiedUntil - Date
|
Filter for all boxes that who were last modified on this date (incl.), or earlier. |
productGender - ProductGender
|
|
productCategoryId - Int
|
|
productId - Int
|
|
sizeId - Int
|
|
tagIds - [Int!]
|
Filter for all boxes that have at least one of the specified tags. |
Example
{
"states": ["InStock"],
"lastModifiedFrom": "2020-11-20",
"lastModifiedUntil": "2020-11-20",
"productGender": "Men",
"productCategoryId": 987,
"productId": 987,
"sizeId": 987,
"tagIds": [123]
}
Float
Description
The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
123.45
HistoryEntry
HumanGender
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
Example
"Male"
ID
Description
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.
Example
"4"
Int
Description
The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
987
ItemsCollection
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
product - Product
|
|
size - Size!
|
|
numberOfItems - Int
|
|
location - Location
|
|
distributionEvent - DistributionEvent
|
Possible Types
| ItemsCollection Types |
|---|
Example
{
"id": 4,
"product": Product,
"size": Size,
"numberOfItems": 123,
"location": Location,
"distributionEvent": DistributionEvent
}
Language
Description
Language codes.
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"nl"
Location
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
base - Base
|
|
name - String
|
|
boxes - BoxPage
|
|
Arguments
|
|
Possible Types
| Location Types |
|---|
Example
{
"id": 4,
"base": Base,
"name": "xyz789",
"boxes": BoxPage
}
Metrics
Fields
| Field Name | Description |
|---|---|
numberOfFamiliesServed - Int
|
Return number of families served by client's organisation in optional date range. If after and before are specified, construct date range for filtering. If one of after or before is specified, construct half-open date range. If none is specified, the result is an all-time number. |
numberOfBeneficiariesServed - Int
|
Like numberOfFamiliesServed but add up all members of served families |
numberOfSales - Int
|
Return number of sales performed by client's organisation in optional date range. See numberOfFamiliesServed about using the after and before parameters. |
stockOverview - StockOverview
|
Return number of boxes, and number of contained items, managed by client's organisation. |
movedStockOverview - [StockOverview]
|
Return number of boxes, and contained items, moved by client's organisation in optional date range. Sorted by product category. See numberOfFamiliesServed about using the after and before parameters. |
Example
{
"numberOfFamiliesServed": 987,
"numberOfBeneficiariesServed": 987,
"numberOfSales": 123,
"stockOverview": StockOverview,
"movedStockOverview": [StockOverview]
}
MovedBoxDataDimensions
Fields
| Field Name | Description |
|---|---|
category - [DimensionInfo]
|
|
target - [TargetDimensionInfo]
|
Example
{
"category": [DimensionInfo],
"target": [TargetDimensionInfo]
}
MovedBoxesData
Fields
| Field Name | Description |
|---|---|
facts - [MovedBoxesResult]
|
|
dimensions - MovedBoxDataDimensions
|
Example
{
"facts": [MovedBoxesResult],
"dimensions": MovedBoxDataDimensions
}
MovedBoxesResult
Description
A box can be moved in various ways:
- within a base (location ID with InStock/Donated)
- because it's lost (Lost)
- because it becomes scrap (Scrap)
- because it's about to be shipped (target base ID with MarkedForShipment)
- because it's being shipped (target base ID with InTransit/Receiving)
Example
{
"movedOn": "2020-11-20",
"targetId": "4",
"categoryId": 123,
"boxesCount": 123
}
Organisation
PackingListEntry
Description
TODO: Add description here once specs are final/confirmed
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
product - Product
|
|
size - Size
|
|
numberOfItems - Int!
|
|
matchingPackedItemsCollections - [ItemsCollection!]!
|
|
state - PackingListEntryState!
|
Example
{
"id": 4,
"product": Product,
"size": Size,
"numberOfItems": 987,
"matchingPackedItemsCollections": [ItemsCollection],
"state": "NotStarted"
}
PackingListEntryState
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
Example
"NotStarted"
PageInfo
Description
Additional information passed along in *Page types. The client shall use the has*Page fields to determine whether to fetch more data.
Fields
| Field Name | Description |
|---|---|
hasPreviousPage - Boolean!
|
If true, a previous page is available. |
hasNextPage - Boolean!
|
If true, a next page is available. |
startCursor - String!
|
An identifier for the first element on the page. The client shall use it for the PaginationInput.before field |
endCursor - String!
|
An identifier for the last element on the page. The client shall use it for the PaginationInput.after field |
Example
{
"hasPreviousPage": true,
"hasNextPage": true,
"startCursor": "xyz789",
"endCursor": "abc123"
}
PaginationInput
Description
Optional input for queries/fields that return a page of elements. The specified fields must be either none OR first OR after, first OR before, last. Other combinations result in unexpected behavior and/or errors. The default page size (first and last, resp.) is 50. This format is inspired by https://relay.dev/graphql/connections.htm#sec-Forward-pagination-arguments
Fields
| Input Field | Description |
|---|---|
after - String
|
Indicate requesting paginating of the first X elements after this cursor. By default, the first relevant element of the database. See also PageInfo.endCursor |
first - Int
|
|
before - String
|
Indicate requesting paginating of the last X elements before this cursor. See also PageInfo.startCursor |
last - Int
|
Example
{"after": "c00ffeeb33f", "first": 50, "before": null, "last": null}
Product
Description
Representation of a product, containing information about ProductCategory, size, and ProductGender. The product is registered in a specific Base.
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
name - String!
|
|
category - ProductCategory!
|
|
sizeRange - SizeRange!
|
|
base - Base
|
|
price - Float
|
|
gender - ProductGender
|
|
createdBy - User
|
|
createdOn - Datetime
|
|
lastModifiedBy - User
|
|
lastModifiedOn - Datetime
|
|
deletedOn - Datetime
|
Example
{
"id": "4",
"name": "gloves",
"category": ProductCategory,
"sizeRange": SizeRange,
"base": Base,
"price": 987.65,
"gender": "Men",
"createdBy": User,
"createdOn": "2016-10-17T01:08:03",
"lastModifiedBy": User,
"lastModifiedOn": "2016-10-17T01:08:03",
"deletedOn": "2016-10-17T01:08:03"
}
ProductCategory
Description
Representation of a product category.
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
name - String!
|
|
products - ProductPage
|
List of all products registered in bases the client is authorized to view. |
Arguments
|
|
sizeRanges - [SizeRange]
|
|
hasGender - Boolean!
|
Non-clothing categories don't have a product gender. |
Example
{
"id": "4",
"name": "Clothing",
"products": ProductPage,
"sizeRanges": [SizeRange],
"hasGender": true
}
ProductDimensionInfo
Fields
| Field Name | Description |
|---|---|
id - ID
|
|
name - String
|
|
gender - ProductGender
|
Example
{"id": 4, "name": "xyz789", "gender": "Men"}
ProductGender
Description
Classificators for Product gender.
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"Men"
ProductPage
Description
Utility type holding a page of Products.
Fields
| Field Name | Description |
|---|---|
elements - [Product!]!
|
|
pageInfo - PageInfo!
|
|
totalCount - Int!
|
Example
{
"elements": [Product],
"pageInfo": PageInfo,
"totalCount": 987
}
QrCode
Description
Representation of a QR code, possibly associated with a Box.
Example
{
"id": 4,
"code": "abc123",
"box": Box,
"createdOn": "2016-10-17T01:08:03"
}
Result
Example
BeneficiaryDemographicsResult
Shipment
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
labelIdentifier - String!
|
|
sourceBase - Base!
|
|
targetBase - Base!
|
|
state - ShipmentState
|
|
startedBy - User!
|
|
startedOn - Datetime!
|
|
sentBy - User
|
|
sentOn - Datetime
|
|
receivingStartedBy - User
|
|
receivingStartedOn - Datetime
|
|
completedBy - User
|
|
completedOn - Datetime
|
|
canceledBy - User
|
|
canceledOn - Datetime
|
|
transferAgreement - TransferAgreement!
|
|
details - [ShipmentDetail!]!
|
Example
{
"id": 4,
"labelIdentifier": "xyz789",
"sourceBase": Base,
"targetBase": Base,
"state": "Preparing",
"startedBy": User,
"startedOn": "2016-10-17T01:08:03",
"sentBy": User,
"sentOn": "2016-10-17T01:08:03",
"receivingStartedBy": User,
"receivingStartedOn": "2016-10-17T01:08:03",
"completedBy": User,
"completedOn": "2016-10-17T01:08:03",
"canceledBy": User,
"canceledOn": "2016-10-17T01:08:03",
"transferAgreement": TransferAgreement,
"details": [ShipmentDetail]
}
ShipmentDetail
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
sourceProduct - Product
|
|
targetProduct - Product
|
|
sourceLocation - ClassicLocation
|
|
targetLocation - ClassicLocation
|
|
sourceSize - Size
|
|
targetSize - Size
|
|
sourceQuantity - Int
|
|
targetQuantity - Int
|
|
box - Box!
|
|
shipment - Shipment!
|
|
createdBy - User!
|
|
createdOn - Datetime!
|
|
removedBy - User
|
|
removedOn - Datetime
|
|
lostBy - User
|
|
lostOn - Datetime
|
|
receivedBy - User
|
|
receivedOn - Datetime
|
Example
{
"id": "4",
"sourceProduct": Product,
"targetProduct": Product,
"sourceLocation": ClassicLocation,
"targetLocation": ClassicLocation,
"sourceSize": Size,
"targetSize": Size,
"sourceQuantity": 123,
"targetQuantity": 987,
"box": Box,
"shipment": Shipment,
"createdBy": User,
"createdOn": "2016-10-17T01:08:03",
"removedBy": User,
"removedOn": "2016-10-17T01:08:03",
"lostBy": User,
"lostOn": "2016-10-17T01:08:03",
"receivedBy": User,
"receivedOn": "2016-10-17T01:08:03"
}
ShipmentState
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"Preparing"
Size
SizeRange
Description
Representation of group of sizes.
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
label - String!
|
|
sizes - [Size!]!
|
|
productCategory - [ProductCategory!]
|
Example
{
"id": "4",
"label": "xyz789",
"sizes": [Size],
"productCategory": [ProductCategory]
}
StockOverview
StockOverviewData
Fields
| Field Name | Description |
|---|---|
facts - [StockOverviewResult!]!
|
|
dimensions - StockOverviewDataDimensions!
|
Example
{
"facts": [StockOverviewResult],
"dimensions": StockOverviewDataDimensions
}
StockOverviewDataDimensions
Fields
| Field Name | Description |
|---|---|
category - [DimensionInfo!]!
|
|
size - [DimensionInfo!]!
|
|
tag - [TagDimensionInfo!]!
|
|
location - [DimensionInfo!]!
|
Example
{
"category": [DimensionInfo],
"size": [DimensionInfo],
"tag": [TagDimensionInfo],
"location": [DimensionInfo]
}
StockOverviewResult
Example
{
"categoryId": 987,
"productName": "xyz789",
"gender": "Men",
"sizeId": 987,
"tagIds": [987],
"locationId": 123,
"boxState": "InStock",
"itemsCount": 987,
"boxesCount": 123
}
String
Description
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.
Example
"abc123"
Tag
Description
Representation of a tag.
Example
{
"id": "4",
"name": "abc123",
"description": "abc123",
"color": "abc123",
"type": "Box",
"taggedResources": [Box],
"base": Base
}
TagDimensionInfo
TagType
Description
Classificators for Tag type.
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
Example
"Box"
TaggableResource
Description
Union for resources that tags can be applied to.
Types
| Union Types |
|---|
Example
Box
TaggableResourceType
Description
Classificator for resources that a Tag can be applied to (according to TaggableResource).
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
Example
"Box"
TargetDimensionInfo
Fields
| Field Name | Description |
|---|---|
id - ID
|
|
name - String
|
|
type - TargetType
|
Example
{
"id": 4,
"name": "abc123",
"type": "Shipment"
}
TargetType
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
Example
"Shipment"
TopProductsCheckedOutData
Fields
| Field Name | Description |
|---|---|
facts - [TopProductsCheckedOutResult]
|
|
dimensions - TopProductsDimensions
|
Example
{
"facts": [TopProductsCheckedOutResult],
"dimensions": TopProductsDimensions
}
TopProductsCheckedOutResult
TopProductsDimensions
Fields
| Field Name | Description |
|---|---|
size - [DimensionInfo]
|
Always null for topProductsCheckedOut query |
product - [ProductDimensionInfo]
|
|
category - [DimensionInfo]
|
Example
{
"size": [DimensionInfo],
"product": [ProductDimensionInfo],
"category": [DimensionInfo]
}
TopProductsDonatedData
Fields
| Field Name | Description |
|---|---|
facts - [TopProductsDonatedResult]
|
|
dimensions - TopProductsDimensions
|
Example
{
"facts": [TopProductsDonatedResult],
"dimensions": TopProductsDimensions
}
TopProductsDonatedResult
Transaction
Description
Representation of a transaction executed by a beneficiary (spending or receiving tokens).
Example
{
"id": 4,
"beneficiary": Beneficiary,
"product": Product,
"count": 987,
"tokens": 987,
"description": "xyz789",
"createdBy": User,
"createdOn": "2016-10-17T01:08:03"
}
TransferAgreement
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
sourceOrganisation - Organisation!
|
|
targetOrganisation - Organisation!
|
|
state - TransferAgreementState
|
|
type - TransferAgreementType!
|
|
requestedBy - User!
|
|
requestedOn - Datetime!
|
|
acceptedBy - User
|
|
acceptedOn - Datetime
|
|
terminatedBy - User
|
|
terminatedOn - Datetime
|
|
validFrom - Datetime!
|
|
validUntil - Datetime
|
|
comment - String
|
|
sourceBases - [Base!]
|
List of all bases of the source organisation included in the agreement |
targetBases - [Base!]
|
List of all bases of the target organisation included in the agreement |
shipments - [Shipment!]!
|
Example
{
"id": "4",
"sourceOrganisation": Organisation,
"targetOrganisation": Organisation,
"state": "UnderReview",
"type": "SendingTo",
"requestedBy": User,
"requestedOn": "2016-10-17T01:08:03",
"acceptedBy": User,
"acceptedOn": "2016-10-17T01:08:03",
"terminatedBy": User,
"terminatedOn": "2016-10-17T01:08:03",
"validFrom": "2016-10-17T01:08:03",
"validUntil": "2016-10-17T01:08:03",
"comment": "xyz789",
"sourceBases": [Base],
"targetBases": [Base],
"shipments": [Shipment]
}
TransferAgreementState
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"UnderReview"
TransferAgreementType
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
Example
"SendingTo"
UnboxedItemsCollection
Example
{
"id": "4",
"product": Product,
"size": Size,
"numberOfItems": 123,
"label": "abc123",
"location": Location,
"distributionEvent": DistributionEvent
}
User
Description
Representation of a user signed up for the web application. The user is a member of a specific Organisation.
Example
{
"id": "4",
"organisation": Organisation,
"name": "abc123",
"email": "xyz789",
"validFirstDay": "2020-11-20",
"validLastDay": "2020-11-20",
"bases": [Base],
"lastLogin": "2016-10-17T01:08:03",
"lastAction": "2016-10-17T01:08:03"
}