Schema
In this section the relevant data types used by API services are explained. In order to get a high level overview of the defined types, please refer to domain model.
#
User typesBoth enumerators and data types related to randevu users are explained in this section.
#
EnumeratorsUserRoleKind
#
enum UserRoleKind { MARKETPLACE_USER MARKETPLACE_OPERATOR MARKETPLACE_ADMIN MARKETPLACE_OWNER API_USER}
AccountKind
#
enum AccountKind { PERSONAL BUSINESS}
UserStatusKind
#
enum UserStatusKind { PENDING_EMAIL_VERIFICATION ONBOARDING PENDING_APPROVAL ONBOARDED REJECTED}
MarketplaceUserType
#
Alternatively called ParticipantType is the definition of your platform's users, participants in its processes.
Hint
Name your MarketplaceUserType
with short and meaningful name, preferably nouns in singular, to represent the whole user group.
Good examples are: Buyer, Seller, Driver, Consultant, etc.
type MarketplaceUserType { id: ID! name: String!
id_onboarding_flow_type: ID
fields: [FieldType!]!
is_master_type: Boolean! account_type: AccountKind inviting_enabled: Boolean! auto_backoffice_approval: Boolean!}
id
a unique identifiername
unique name for the user type (e.g. 'Buyer', 'Seller', 'Driver', etc)id_onboarding_flow_type
is a reference to this User Types'FlowType
. If set, then the correspondingFlow
is triggered when user's email has been validated, to handle User onboarding process.fields
are references to this User Type'sFieldTypes
. Fields define the structure of all the Users of this type.
Only accessible to BACKOFFICE users
auto_backoffice_approval
is set when Users of this type can registed and onboard to the platform without an explicit approval from backoffice.inviting_enabled
is set when this User account allows so called "invited users". Invited users can operate on behalf of the "inviting" user and have access to the same services and data as the "inviting user"is_master_type
is set when this User Type is main account holder (rather then "invited user")account_type
shows the User Type intended purpose
Session
#
This helper object contains the session token. This token is used for authentication purposes and should be sent in each upcoming request to randevu backend.
Session token
Token should be provided with each request in Authorization
header.
Refer to Authentication section for more details
type Session { token: String! pk_sandbox: String pk_production: String}
token
is a chain of characters, used to authenticate the logged in user with each request.pk_sandbox
is the sandbox public key, needed for API access to the sandbox systempk_production
is the production public key, needed for API access to the productive system
ParticipantOnboardingProgress
#
This type is used for the onboarding purposes of marketplace participants. If the auto_pilot_mode
is set to false, then a Flow will be applied during onboarding and its status is shown here.
Custom user onboarding
If this option is set, a Flow will be used to take new users through the onboarding journey. Overall user status
during this process will be set to ONBOARDING
, and the flow's step will deliver more information.
type ParticipantOnboardingProgress { auto_pilot_mode: Boolean! # is true for EXPRESS and STANDARD onboarding backoffice_approval_required: Boolean # if auto_pilot==true status: String # if auto_pilot==false, is current flow status name}
User
#
This type is representing any randevu User, independently on the concrete role.
type User { id: ID! role: UserRoleKind! type: MarketplaceUserType # If role = MARKETPLACE_USER, type != null account: Account email: String! first_name: String last_name: String
my_marketplace_name: String! my_marketplace_display_name: String!
status: UserStatusKind!
invited_by: String @isBOUser
created_at: DateTime! @isBOUser email_verified_at: DateTime @isBOUser approved_at: DateTime @isBOUser rejected_at: DateTime @isBOUser onboarded_at: DateTime @isBOUser
onboarding_progress: ParticipantOnboardingProgress id_onboarding_flow: ID
fields: [Field!]!}
id
is a User's unique identifier.role
is a User's role in randevu. SeeEnumerators
for more details.type
is a reference to this user'sMarketplaceUserType
. It can be null, if a user is a backoffice user or invited user.account
references a User account.email
is a user's email.first_name
,last_name
user's first and last namemy_marketplace_name
short name of the user's marketplacemy_marketplace_display_name
display name of the user's marketplacestatus
User's status.ONBOARDED
is a state in which User is fully operational.fields
hold an array of all the Fields belonging to this Useronboarding_progress
tells about the onboarding mode and status of this user. Look atParticipantOnboardingProgress
id_onboarding_flow
is the ID of theFlow
handling this user's onboarding process. If 'null', the default onboarding process is applied
Only accessible to BACKOFFICE users
invited_by
is a MarketplaceUser has been invited by another MarketplaceUser, a reference to the inviting user is stored.created_at
email_verified_at
approved_at
rejected_at
onboarded_at
#
Supply types#
EnumaratorsSupplyStatusKind
#
enum SupplyStatusKind { ONBOARDING PENDING_APPROVAL ONBOARDED REJECTED}
SupplyType
#
Supply type is a definition of a product/service/listing, being offered and transacted on the marketplace. Many critical tasks in randevu are evolving around the SupplyType
:
- it defines the features that the potential consumers will be able to see
- it enables discovery, browsing and filtering for the potential consumers
- put in context of a
MatchType
, and together withprovider
andconsumer
sides, it specifies the basic building block for creating the network effect
SupplyType
serves as a template for creating concrete Supply
instances on a marketplace.
Hint
Try to choose a meaningful name for your supply types, the one that represent exactly what the consumers are looking for on the marketplace.
- for product marketplaces: Book, Machine, Concert ticket, etc.
- for service marketplace: Legal Advice, Ride, Design work, etc.
type SupplyType { id: ID! name: String! fields: [FieldType]!
id_onboarding_flow_type: ID
auto_backoffice_approval: Boolean @isBOUser}
id
a unique identifiername
unique, internal name for the supply type (e.g. 'Product', 'Room', 'Ride', etc)id_onboarding_flow
is the ID of theFlow
handling this supply's onboarding process. If 'null', the default onboarding process is appliedfields
are references to this Supply type'sFieldTypes
. Fields define the structure of all the Supply of this type.
Only accessible to BACKOFFICE users
auto_backoffice_approval
is set when Supply of this type can onboarded and sold on the platform without an explicit approval from backoffice.
SupplyOnboardingProgress
#
This type is user for the onboarding purposes of marketplace supply. If the auto_pilot_mode
is set to false, then a Flow will be applied during onboarding and its status is shown here.
Custom supply onboarding
If this option is set, a Flow will be used to take new users through the onboarding journey. Overall supply status
during this process will be set to ONBOARDING
, and the flow's step will deliver more information.
type SupplyOnboardingProgress { auto_pilot_mode: Boolean! # is true for EXPRESS and STANDARD onboarding backoffice_approval_required: Boolean # is considered, if auto_pilot_mode==true status: String # if auto_pilot_mode is false, is current flow status name}
Supply
#
This type represents concrete Supply/product/listings', offered on the marketplace. They are typically created by their PROVIDERS, based on the definition established by SupplyType
.
type Supply { id: ID! name: String! type: SupplyType! provider: User! created_by: User
status: SupplyStatusKind!
onboarding_progress: SupplyOnboardingProgress
fields: [Field]!
created_at: DateTime! @isBOUser approved_at: DateTime @isBOUser rejected_at: DateTime @isBOUser onboarded_at: DateTime @isBOUser}
id
a unique identifiername
internal name for the supply, not visible to marketplace users.type
is a reference to theSupplyType
, this Supply belongs to.provider
is a references to the user who owns and sells this Supplycreated_by
is a references to the user who created this Supply (may be an "invited" user, different from the owner)status
is one of the values of theSupplyStatusKind
onboarding_progress
tells about the onboarding mode and status of this user. Look atSupplyOnboardingProgress
fields
are references to this Supply'sField
s
Only accessible to BACKOFFICE users
created_at
approved_at
rejected_at
onboarded_at
SupplyLight
#
This is a lighter version of Supply
, aimed for the services that returned only reduced info on Supply, like discoveries.
type SupplyLight { id: ID! name: String! id_supply_type: ID! id_provider: ID!}
id
a unique identifiername
internal name for the supply, not visible to marketplace users.id_supply_type
is a unique ID of theSupplyType
, this Supply belongs to.id_provider
is a unique ID of the user who owns and sells this Supply
#
Match types#
EnumaratorsMatchingUnitKind
#
Matching unit refers to how a Supply is being transacted in the context of a Match
.
In case of product marketplaces, consumers are normally selecting Supply by unit (PER_UNIT
matching unit).
Some Supply are linked with a certain event (bus ticket, concert ticket). In randevu these are called PER_EVENT
.
Finally, some services are typically booked or rented for a range of time (like Airbnb, Tour radar). PER_HOUR
or PER_DAY
Matching Unit Kind and availability
Supply availability in randevu is handled based on MatchingUnitKind
. See the following services, that use the AvailabilityRecord
: discoverSupply
, createDirectMatcher
, createMatchingOrder
.
enum MatchingUnitKind { PER_UNIT PER_EVENT PER_HOUR PER_DAY}
AvailabilityManagementKind
#
In relation with MatchingUnitKind
this enumarator sets the prefered Supply availability strategy for the context of a MatchType
it is defined in.
enum AvailabilityManagementKind { NONE MANAGED_BY_RANDEVU CUSTOM}
AvailabilityManagementKind
#
In relation with MatchingUnitKind
this enumarator sets the prefered Supply availability strategy for the context of a MatchType
it is defined in.
enum AvailabilityManagementKind { NONE MANAGED_BY_RANDEVU CUSTOM}
MatchTypeRoleKind
#
enum MatchTypeRoleKind { CONSUMER PROVIDER CONSUMER_OR_PROVIDER GUEST}
MatchStatusKind
#
enum MatchStatusKind { PENDING CLOSED REJECTED DECLINED}
MatchTypeVisibilityInfo
#
As its name suggests, this structure is used to identify the arrays of FieldType
s, that will be visible/accessible to different participants in context of the MatchType
that contains this object.
Since this data is on type-level (that is MatchType
, rather than Match
), the corresponding visibilities are related with pre-matching tasks, like discovery and filtering.
type MatchTypeVisibilityInfo { provider_fields: [ID!] consumer_fields: [ID!] supply_fields: [ID!] match_fields: [ID!]
provider_fields_out_for_consumer: [ID!] provider_fields_out_for_guest: [ID!] consumer_fields_out_for_provider: [ID!] consumer_fields_out_for_guest: [ID!] supply_fields_out_for_consumer: [ID!] supply_fields_out_for_guest: [ID!]}
provider_fields
is an array of FieldTypes belonging to PROVIDER, that are visible to CONSUMER filtering purposesconsumer_fields
is an array of FieldTypes belonging to CONSUMER, that are visible to PROVIDER filtering purposessupply_fields
is an array of FieldTypes belonging toSupplyType
, that are visible to CONSUMER filtering purposesmatch_fields
is an array of FieldTypes belonging toMatchType
, that are visible to both CONSUMER and PROVIDER filtering purposesprovider_fields_out_for_consumer
is an array of FieldTypes belonging to PROVIDER, that are visible to CONSUMER after discoveryprovider_fields_out_for_guest
is an array of FieldTypes belonging to PROVIDER, that are visible to a guest after discoveryconsumer_fields_out_for_provider
is an array of FieldTypes belonging to CONSUMER, that are visible to PROVIDER after discoveryconsumer_fields_out_for_guest
is an array of FieldTypes belonging to CONSUMER, that are visible to a guest after discoverysupply_fields_out_for_consumer
is an array of FieldTypes belonging toSupplyType
, that are visible to CONSUMER after discoverysupply_fields_out_for_guest
is an array of FieldTypes belonging toMatchType
, that are visible to a guest after discovery
Filtering and discovery
Filtering fields: Use the following arrays to mark the FieldTypes
you want to permit in discovery search filters in context of a MatchType
: provider_fields
, consumer_fields
, supply_fields
, match_fields
Discovered fields: Use the remaining arrays to mark the FieldTypes
that should be shown after the discovery.
Filtering fields are most often a subset of discovered fields.
MatchVisibilityInfo
#
This structure is similar to MatchTypeVisibilityInfo
, but operates in the context of a Match
, rather than MatchType.
It describes the visibility rules within a Match
, that is who can see the Match
object and which provider
and consumer
Fields
can be accessed by the other side.
Match visibility is dynamical
Match visibility can be changed dynamically, either from the backoffice or using the Flows.
Match Fields, visible to either side, are define within the each Match Field itself.
type MatchVisibilityInfo { match_by_consumer: Boolean match_by_provider: Boolean provider_by_consumer: Boolean consumer_by_provider: Boolean supply_by_consumer: Boolean provider_fields: [ID!] consumer_fields: [ID!] supply_fields: [ID!]}
match_by_consumer
if set to true, a just created Match is immediately visible to consumermatch_by_provider
if set to true, a just created Match is immediately visible to providerprovider_by_consumer
if set to true, provider is immediately visible to consumer in the context of just created Match is immediately visible to consumerconsumer_by_provider
if set to true, consumer is immediately visible to provider in the context of just created Match is immediately visible to consumersupply_by_consumer
if set to true, supply is immediately visible to consumer in the context of just created Match is immediately visible to consumerprovider_fields
is an array ofField
s belonging to PROVIDER, that are visible to the CONSUMERconsumer_fields
is an array ofField
s belonging to CONSUMER, that are visible to the PROVIDERsupply_fields
is an array ofField
s belonging to matchedSupply
, that are visible to the CONSUMER
MatchType
#
This is probably the most important and most complex type in randevu. It represents the definition of the basic matching building block in the system - Match
.
MatchType defines the relationship between:
SupplyType
, that is being matched and transacted- Provider type of that
Supply
(MarketplaceUserType
) - Consumer type of that
Supply
(MarketplaceUserType
)
In addition, MatchType defines the basic features of this particular matching setup, it's style, approval procedure, etc. For more details, see the properties below.
About Matching Types
Marketplaces will usually start with a single MatchType
and try to create a network effect around it.
Later on, marketplaces usually wish to extend the offer, introduce new participants and create more MatchTypes.
Try to find a meaningful name for your MatchType. It should represent the transaction behind the successful matching:
- if your marketplaces is a cab booking app, a good name for the
MatchType
is "Booked ride" - if your marketplaces is selling products, a suitable
MatchType
name might be "Purchase" or "Product purchase"
type MatchType { id: ID! name: String!
matching_unit_type: MatchingUnitKind! availability_management_type: AvailabilityManagementKind!
my_role: MatchTypeRoleKind @isMPUser
provider_type: MarketplaceUserType! consumer_type: MarketplaceUserType! supply_type: SupplyType!
supply_discovery_enabled: Boolean! provider_discovery_enabled: Boolean! consumer_discovery_enabled: Boolean!
matching_tool_types: [MatchingToolType!]! fields: [FieldType!]!
type_visibility: MatchTypeVisibilityInfo! @isBOUser initial_match_visibility: MatchVisibilityInfo! @isBOUser
auto_backoffice_approval: Boolean! @isBOUser auto_consumer_acceptance: Boolean! @isBOUser auto_provider_acceptance: Boolean! @isBOUser
allow_provider_guests: Boolean! @isBOUser allow_consumer_guests: Boolean! @isBOUser
consumers: [User!] @isBOUser providers: [User!] @isBOUser supplies: [Supply!] @isBOUser
retired_at: DateTime}
id
is a unique identifier of this objectname
is an internal alias for thisMatchType
matching_unit_type
establishes a unit of matching in thisMatchType
. SeeMatchingUnitKind
for more details.availability_management_type
defines the way Supply availibility is managed in context of this MatchTypemy_role
(only available to marketplace users) shows the role a user plays in the context of aMatchType
. SeeMatchTypeRoleKind
for more details.provider_type
references aMarketplaceUserType
of the provider of this MatchTypeconsumer_type
references aMarketplaceUserType
of the consumer of this MatchTypesupply_type
references aSupplyType
, offered by thisMatchType
supply_discovery_enabled
is set to true, when consumers can use the servicediscoverSupply
to browse theSupply
in context of thisMatchType
provider_discovery_enabled
is set to true, when consumers can use the servicediscoverProviders
to browse theSupply
in context of thisMatchType
consumer_discovery_enabled
is set to true, when providers can use the servicediscoverConsumers
to browse theSupply
in context of thisMatchType
matching_tool_types
is an array ofMatchingToolType
attached to thisMatchType
fields
is an array ofField
s belonging to thisMatchType
Only accessible to BACKOFFICE users
type_visibility
defines the visibility relationships during the discovery phase of aMatchType
. For more details, seeMatchTypeVisibilityInfo
initial_match_visibility
defines the visibility relationships after a match has been created for aMatchType
. For more details, seeMatchVisibilityInfo
auto_backoffice_approval
if true, matches are automatically approved by Backofficeauto_consumer_acceptance
if true, matches are automatically accepted by consumer sideauto_provider_acceptance
if true, matches are automatically accepted by provider sideallow_provider_guests
is set when guests (not logged users) are allowed to partially use the system from CONSUMER perspectiveallow_consumer_guests
is set when guests (not logged users) are allowed to partially use the system from PROVIDER perspectiveproviders
are all registered potential providers ofSupplyType
offered by thisMatchType
consumers
are all registered potential consumers ofSupplyType
offered by thisMatchType
supply
is all createdSupply
from theSupplyType
offered by thisMatchType
retired_at
is a timestamp when thisMatchType
has been retired. Retired MatchTypes cannot be used any more.
MatchTypeLight
#
This is a lighter version of MatchType
, providing some IDs instead of full data structures.
type MatchTypeLight { id: ID! name: String! style: MatchingStyleKind!
my_role: MatchTypeRoleKind @isMPUser
id_provider_type: ID! id_consumer_type: ID! id_supply_type: ID!
supply_discovery_enabled: Boolean! provider_discovery_enabled: Boolean! consumer_discovery_enabled: Boolean!
matching_tool_types: [MatchingToolType!]!}
id
is a unique identifier of this objectname
is an internal alias for thisMatchType
style
defines how consumers can see the offered SupplyTypes. SeeMatchingStyleKind
for more details.my_role
(only available to marketplace users) shows the role a user plays in the context of aMatchType
. SeeMatchTypeRoleKind
for more details.id_provider_type
references aMarketplaceUserType
of the provider of this MatchTypeid_consumer_type
references aMarketplaceUserType
of the consumer of this MatchTypeid_supply_type
references aSupplyType
, offered by thisMatchType
supply_discovery_enabled
is set to true, when consumers can use the servicediscoverSupply
to browse theSupply
in context of thisMatchType
provider_discovery_enabled
is set to true, when consumers can use the servicediscoverProviders
to browse theSupply
in context of thisMatchType
consumer_discovery_enabled
is set to true, when providers can use the servicediscoverConsumers
to browse theSupply
in context of thisMatchType
matching_tool_types
is an array of [MatchingToolType
]s(#matching_tool_type) attached to thisMatchType
Only accessible to BACKOFFICE users
type_visibility
defines the visibility relationships during the discovery phase of aMatchType
initial_match_visibility
defines the visibility relationships after a match has been created for aMatchType
auto_backoffice_approval
if true, matches are automatically approved by Backofficeauto_consumer_acceptance
if true, matches are automatically accepted by consumer sideauto_provider_acceptance
if true, matches are automatically accepted by provider sideallow_provider_guests
is set when guests (not logged users) are allowed to partially use the system from CONSUMER perspectiveallow_consumer_guests
is set when guests (not logged users) are allowed to partially use the system from PROVIDER perspectiveproviders
are all registered potential providers ofSupplyType
offered by thisMatchType
consumers
are all registered potential consumers ofSupplyType
offered by thisMatchType
supply
is all createdSupply
from theSupplyType
offered by thisMatchType
Match
#
This type represents an essential building block of the randevu logic. It defines an abstract concept of a connection between a Consumer, a Supply and a Provider. It is created based in the definition expressed by the related MatchType
object.
Match is typically related with the main marketplace transaction - the purpose of the marketplace.
type Match { id: ID!
type: MatchType!
my_role: MatchTypeRoleKind @isMPUser
provider: User! consumer: User! supply: Supply!
quantity: Int # not null if MatchingUnitKine==PER_UNIT/PER_EVENT start_datetime: DateTime # not null if MatchingUnitKine==PER_HOUR end_datetime: DateTime # not null if MatchingUnitKine==PER_HOUR start_date: DateTime # not null if MatchingUnitKine==PER_DAY end_date: DateTime # not null if MatchingUnitKine==PER_DAY matching_tool: MatchingTool matching_score: Int
status: MatchStatusKind!
created_by: User
fields: [Field]!
created_at: DateTime! consumer_accepted_at: DateTime provider_accepted_at: DateTime backoffice_approved_at: DateTime
consumer_declined_at: DateTime provider_declined_at: DateTime backoffice_rejected_at: DateTime closed_at: DateTime
unlocked_to_consumer: Boolean! @isBOUser unlocked_to_provider: Boolean! @isBOUser unlocked_provider_fields: [ID!]! @isBOUser unlocked_consumer_fields: [ID!]! @isBOUser unlocked_supply_fields: [ID!]! @isBOUser}
id
is a unique identifier of this objecttype
is a reference to the Match'sMatchType
my_role
(only available to marketplace users) shows the role a user plays in the context of aMatchType
. SeeMatchTypeRoleKind
for more details.provider
references the providerUser
within this Matchconsumer
references the providerUser
within this Matchsupply
references the matchedSupply
objectquantity
,start_datetime
,end_datetime
,start_date
,end_date
are user for availibility purposes. SeeAvailabilityManagementKind
for more detailsmatching_tool
points to the MatchingTool that created this Match. If set tonull
, theMatch
is result ofdirect matching
matching_score
shows the matching score in case of indirect matching (./marketplace/intro.mdx#matching_order)status
indicates this Match's currentstatus
.created_by
is a User who created this Matchconsumer_accepted_at
,provider_accepted_at
,consumer_declined_at
,provider_declined_at
are corresponding timestampsbackoffice_approved_at
,backoffice_rejected_at
are backoffice actions timestampsclosed_at
is the moment when this Match was successfully closed_at
Only accessible to BACKOFFICE users
unlocked_to_consumer
is set if consumer party of theMatch
can see theMatch
(sometimes a Match is not directly visible to the participants)unlocked_to_provider
is set if provider party can see theMatch
.unlocked_provider_fields
is an array of provider'sField
s, visible to the consumer of thisMatch
unlocked_consumer_fields
is an array of consumer'sField
s, visible to the provider of thisMatch
unlocked_supply_fields
is an array of supply'sField
s, visible to the consumer of thisMatch
MatchLight
#
This is a lighter version of Match
(#match), suitable for some searches.
type MatchLight { id: ID!
id_match_type: ID!
my_role: MatchTypeRoleKind @isMPUser
id_provider: ID! id_consumer: ID! supply: SupplyLight!
matching_tool: MatchingTool
matching_score: Int
created_at: DateTime! consumer_accepted_at: DateTime provider_accepted_at: DateTime backoffice_approved_at: DateTime
consumer_declined_at: DateTime provider_declined_at: DateTime backoffice_rejected_at: DateTime
closed_at: DateTime
status: MatchStatusKind!}
id
is a unique identifier of this objectid_match_type
is a reference to the Match'sMatchType
my_role
(only available to marketplace users) shows the role a user plays in the context of aMatchType
. SeeMatchTypeRoleKind
for more details.id_provider
references the providerUser
within this Matchid_consumer
references the providerUser
within this Matchsupply
references the matchedSupply
objectmatching_tool
points to the MatchingTool that created this Match. If set tonull
, theMatch
is result ofdirect matching
matching_score
shows the matching score in case of indirect matching (./marketplace/intro.mdx#matching_order)created_by
is a User who created this Matchconsumer_accepted_at
,provider_accepted_at
,consumer_declined_at
,provider_declined_at
are corresponding timestampsbackoffice_approved_at
,backoffice_rejected_at
are backoffice actions timestampsclosed_at
is the moment when this Match was successfully closed_atstatus
indicates this Match's currentstatus
.
Only accessible to BACKOFFICE users
unlocked_to_consumer
is set if consumer party of theMatch
can see theMatch
(sometimes a Match is not directly visible to the participants)unlocked_to_provider
is set if provider party can see theMatch
.unlocked_provider_fields
is an array of provider'sField
s, visible to the consumer of thisMatch
unlocked_consumer_fields
is an array of consumer'sField
s, visible to the provider of thisMatch
unlocked_supply_fields
is an array of supply'sField
s, visible to the consumer of thisMatch
#
Matching tool types#
EnumeratorsMatchingToolKind
#
DIRECT_MATCHER
is the simplest matching tool, used in conjunction with the servicediscoverSupply
, to directly create aMatch
for a discoveredSupply
.SUPPLY_BAG
is an abstraction of a common "Shopping Cart", also used in conjunction with the servicediscoverSupply
. It maintains a set of Supply. Execution of thisMatchingTool
leads to creation of aMatch
for each containedSupply
MATCHING_ORDER
is used to indirectly order matches. If defines aSupply
discovery filter and certain additional order information. On execution it creates aMatch
per eachSupply
hit by the filter. Provider will then typically accept or decline the Match (this part is subject to implementation)AUCTION
is randevu implementation of the typical auction procedure. It is naturally created and executed by providers.
enum MatchingToolKind { DIRECT_MATCHER SUPPLY_BAG MATCHING_ORDER AUCTION}
ExecutionSchedulingKind
#
At this time, only MANUAL
ExecutionSchedulingKind is supported. It means that the corresponding MatchingTool can only be executed manually, by invoking the executeMatchingTool
API.
enum ExecutionSchedulingKind { IMMEDIATE PERIODIC ON_NEW_SUPPLY MANUAL}
MatchingToolType
#
This type represents an extension of a MatchType
, aimed to facilitate the matching process. Different types of MatchingToolType
applies to different matching styles and offers different matching approach.
type MatchingToolType { id: ID! name: String! type: MatchingToolKind! execution_type: TaskExecutionKind! scheduling_type: ExecutionSchedulingKind! execution_config: JSONObject is_active: Boolean!
fields: [FieldType]!}
id
is a unique identifier of this objecttype
establishes thetype of the matching tool
.execution_type
determines the WHEN and HOW this tool will beexecuted
execution_config
someExecutionSchedulingKind
s require additional data.is_active
this needs to be set in order to be able to create theMatchingTool
instances based on this type.fields
is an array of theFieldType
s assigned to this type.
MatchingTool
#
This is an instance of a MatchingToolType
, ready to be executed and create Match
es.
type MatchingTool { id: ID! type: MatchingToolType! name: String!
supply_filter: [FieldFilter!] consumer_filter: [FieldFilter!] provider_filter: [FieldFilter!]
supply_items: [SupplyBagItem!]
created_at: DateTime! creator: User! last_execution_at: DateTime
fields: [Field]!
is_active: Boolean!}
id
is a unique identifier of this objecttype
is a reference to this tool'sMatchingToolType
name
is an internal alias of this toolsupply_filter
defines a searching filter for matchingSupply
provider_filter
defines a searching filter for matchingprovider
consumer_filter
defines a searching filter for matchingconsumer
supply_items
is a reference to Supply instances stored within this tool (only applicable toSUPPLY_BAG
)created_at
is the timestamp of tool's creationcreator
is theUser
who created this toollast_execution_at
is the timestamp of the last execution of this toolis_active
this needs to be set in order to be able to execute this toolfields
is an array of theField
s belonging to this tool.
SupplyBagItem
#
This is a helper type, used by SUPPLY_BAG
MatchingTool
s. It allows quantities to be assigned with each stored Supply
.
type SupplyBagItem { id_supply: ID! quantity: Int!}
id_supply
is a reference to a Supplyquantity
stores the quantity of stored Supply
#
Field typesField types are basic building blocks for the definition of all so-called "container types": User
, Supply
, Match
and MatchingTool
. Field types have "types" and they define the structure of their corresponding containers.
For example, in a real-estate marketplace, Supply type might be House, and some relevant Field types that define this Supply might be Address (type LOCATION), Area (type DECIMAL), and NrOfRooms (INTEGER)
#
EnumeratorsInputKind
#
enum InputKind { BOOLEAN TEXT INTEGER DECIMAL
SELECT MULTI_SELECT
DOCUMENT IMAGE IMAGE_SET DOCUMENT_SET
DATE DATETIME
MONETARY_VALUE LOCATION}
FieldAccessKind
#
enum FieldAccessKind { NONE READ WRITE}
FieldAccessClientKind
#
This helper type is used to indicate a "role" of a user who has an access to a Field
object.
Field access contexts
an "owned" object. This can be
User
orSupply
.OWNER
of a user is the User themselves, while theOWNER
of aSupply
is its provideran external object. In context od a Match, FieldAccessClientKind is used to reference a role on the
Match
enum FieldAccessClientKind { OWNER CONSUMER PROVIDER}
FieldCategoryKind
#
enum FieldCategoryKind { # User type FIRST_NAME LAST_NAME PROFILE_IMAGE
# Supply type NAME DESCRIPTION MAIN_IMAGE BASE_PRICE MAIN_DATETIME
# Match type START_DATETIME END_DATETIME START_DATE END_DATE QUANTITY}
FieldTypeContainerKind
#
enum FieldTypeContainerKind { USER_TYPE SUPPLY_TYPE MATCH_TYPE MATCHING_TOOL_TYPE}
FieldContainerKind
#
enum FieldContainerKind { USER SUPPLY MATCH MATCHING_TOOL}
FieldType
#
FieldType
is a definition of a basic piece of information on marketplace data. They are defined in the context of a FieldTypeContainer
, which can be MarketplaceUserType
, SupplyType
, MatchType
, MatchingToolType
and so on.
Based on this definition are the created instances of corresponding MarketplaceUser
s, Supply
, Match
es and so on. Look at the class Field
for more information.
type FieldType { id: ID! name: String! category: FieldCategoryKind is_deletable_type: Boolean! input_type: InputKind! input_options: JSONObject! is_required: Boolean! is_nullable: Boolean! initial_accesses: FieldAccessInfo! @isBOUser matching_weight: Int conditions: [Condition]!}
id
is a User's unique identifier.name
is an internal alias for this type. It is not visible fo Marketplace users.category
labels a FieldType that is fulfilling some special purpose. See all possible valueshere
is_deletable_type
is set to true, if thisFieldType
can be deleted.input_options
depends on the concrete input_type. Different types support different values. Seehere
for details.is_required
marks a mandatoryFieldType
. The value for the correspondingField
will be required in order to finish the object creation (e.g. requiredField
in User will expect thisField
to be provided during this User's onboarding)matching_weight
is used during the matching processconditions
set the rules to be fulfilled in order that the corresponding Field will be active and visible.
Only accessible to BACKOFFICE users
initial_accesses
FieldAccessInfo
structure defines the visibility aspects of thisFieldType
, just upon the correspondingField
's creation.
Field
#
Field
s are the basic building blocks for the so called FieldContainer
s (e.g. Users, Supply, Matches, etc). On each particular's FieldContainer
's creation, a Field
will be attached to it for every defined FieldType
within its FieldTypeContainer
type Field { id: ID! field_type: FieldType! value: JSON current_accesses: FieldAccessInfo! @isBOUser my_access: FieldAccessKind @isMPUser}
id
is a User's unique identifier.field_type
holds a reference to the correspondingFieldType
. This is very often used to inspect on what kind ofvalue
to expect for thisField
.value
is a concrete value of thisField
. E.g. if aFieldType
'sinput_value
isTEXT
, a validvalue
would be 'This is a text')my_access
is only accessible to Marketplace Users and shows the current access of the logged user.
Only accessible to BACKOFFICE users
current_accesses
is showing the current visibility of this Field, that is, who can handle it and how (READ, WRITE or NONE)
FieldAccessInfo
#
This structure defines who can do what with a Field
. It's legal values depend on the FieldType and the context.
type FieldAccessInfo { to_owner: FieldAccessKind to_provider: FieldAccessKind to_consumer: FieldAccessKind to_discoverer: FieldAccessKind to_guest: FieldAccessKind}
About field access
- for the isolated
FieldContainers
likeUser
andSupply
, the access to its Fields are usually given to its owner only, so theFieldAccessInfo
will only have one property -to_owner
. - in the context of a
Match
, the visibilities of User Fields (of consumer and provider side) and Supply Fields (of a matchedSupply
) are handled within theMatch
object.
FieldFilter
#
This helper type is used for different filtering/discovery purposes. It defines a tool to query instance of a concrete FieldType
type FieldFilter { id_target_field_type: ID! value: JSON}
id_target_field_type
is a target FieltType being filteredvalue
is a concrete filter. Its structure and valid format depends on the targetFieldType
'sinput_type
FavouriteFieldType
#
This structure is a template for storing often used FieldType
objects, to accelerate its creation.
type FavouriteFieldType { name: String! input_type: InputKind! input_options: JSONObject! is_required: Boolean! is_nullable: Boolean!}
#
Flow typesFlow in randevu is the main building block of dynamic aspects of the platform. It is an abstraction of a state machine, and enables Marketplace owners with a means to define things such onboarding processes, matching transactions, auctions or any kind of custom process.
#
EnumeratorsFlowPurposeKind
#
enum FlowPurposeKind { PARTICIPANT_ONBOARDING SUPPLY_ONBOARDING TRANSACTION CUSTOM_FLOW}
FlowType
#
Flow type defines the state machine that will handle certain behavior in randevu. It's main feature is purpose, which further determines flow's usage.
type FlowType { id: ID! name: String!
purpose: FlowPurposeKind
initiating_event: RandevuEventKind! initiating_conditions: [FlowCondition!]
root_type: FieldTypeContainerKind! # USER_TYPE, SUPPLY_TYPE... id_root_type: ID!
states: [StateType!]! transitions: [TransitionType!]! var_types: [FlowVariableType!]!
is_active: Boolean!
retired_at: DateTime}
id
iis this flow type's unique identifiername
is a user friendly name of this Flow typepurpose
determines the purpose of the Flow typeinitiating_event
sets the randevu event that will fire an instance of this Flowinitiating_conditions
define additional restrictions for initiating the flowroot_type
defines the flow initiating object type: USER_TYPE, SUPPLY_TYPE...id_root_type
identifies the exact root object typestates
,transitions
define the state machine to drive the flows of this typevar_types
are advanced concepts enabling flow's definitionis_active
if true, this flow can be instantiated'retired_at' this flow is retired
Flow
#
Flow is a running instance of a Flow type. It can be in exactly one state at a time. Transitions will be triggered as defined to change state until the finishing state has been reached. The flow is then terminated.
type Flow { id_flow_type: ID!
initiated_at: DateTime! terminated_at: DateTime
current_state: String!}
id_flow_type
is the reference to the Flow typeinitiated_at
,terminated_at
are flow's timestampscurrent_state
marks the current flow's state
#
Transaction types#
EnumeratorsTransactionKind
#
Transaction is an abstraction of a user-facing business process executed on randevu. Typically, a consumer and provider (or more of them) will participate in a Transaction
.
SINGLE_DIRECT_CHECKOUT
and SINGLE_INDIRECT_CHECKOUT
are two simple Transaction Types defined by randevu Wizard. CUSTOM_TRANSACTION
is fully customisable construct, based on Flows
, for the definition of fully customised transaction types.
enum TransactionKind { SINGLE_DIRECT_CHECKOUT SINGLE_INDIRECT_CHECKOUT CUSTOM_TRANSACTION}
TransactionStatusSchemeKind
#
This value defines how the status of a Transaction will be displayed to consumer and provider participants. SYMMETRICAL
means that all participants will see the same status - the one defined by the underlying Flow. If FLOW_MATCH
option is taken, than the provider will "see" their Match's status instead.
enum TransactionStatusSchemeKind { SYMMETRICAL FLOW_MATCH}
TransactionType
#
Transaction is an abstraction of a user-facing business process executed on randevu. Typically, a consumer and provider (or more of them) will participate in a Transaction
.
Transaction type is a definition of such transactions.
type TransactionType { id: ID! type: TransactionKind! status_scheme: TransactionStatusSchemeKind!
name: String!
my_role: MatchTypeRoleKind!
flow_type: FlowType
is_default: Boolean! is_active: Boolean!
root_type: MatchingToolType! retired_at: DateTime}
id
is the unique identifiertype
marks this Transaction type's kind/purposestatus_scheme
defines the end user transaction status resolution strategyname
is a user friendly name for this typemy_role
is visible to participants and determins their own role in this Transaction typeflow_type
if the type is CUSTOM_TRANSACTION, this transaction will be implemented by aFlowType
is_default
is a pointer to a single "default"TransactionType
. It can be used fo for example display a shortcut to the Transaction on the home pageis_active
means that this Transaction can be instantiatedroot_type
defined aMatchingToolType
user to initiate this type of Transactionretired_at
this transaction type is retired, cannot be used any more
Transaction
#
Transaction is an abstraction of a user-facing business process executed on randevu. Typically, a consumer and provider (or more of them) will participate in a Transaction
.
type Transaction { id: ID! type: TransactionType! my_role: MatchTypeRoleKind! @isParticipantOrGuest
root_object: MatchingTool!
status: String
created_at: DateTime! terminated_at: DateTime}
id
is the unique identifiertype
marks this Transaction's typemy_role
is visible to participants and determins their own role in this Transaction typeroot_object
refers to this Transaction's root object, which is always aMatchingTool
status
shows this Transaction current status. Will typically be derived from the underlyingFlow
created_at
,terminated_at
are the timestamps
TransactionLight
#
This is a lighter representation of a Transaction, user by getter APIs.
type TransactionLight { id: ID! type: TransactionType! my_role: MatchTypeRoleKind! @isParticipantOrGuest
id_root_object: ID! root_object_type: EventObjectKind!
status: String
created_at: DateTime! terminated_at: DateTime}
id
is the unique identifiertype
marks this Transaction's typemy_role
is visible to participants and determins their own role in this Transaction typeid_root_object
refers to this Transaction's root object, which is always aMatchingTool
root_object_type
refers to this Transaction's root object's typestatus
shows this Transaction current status. Will typically be derived from the underlyingFlow
created_at
,terminated_at
are the timestamps
PreparedTransaction
#
This is a lighter representation of a Transaction, used during Transaction preparation.
type PreparedTransaction { id: ID! type: TransactionType! my_role: MatchTypeRoleKind! @isParticipantOrGuest
root_object: MatchingTool!
status: String
created_at: DateTime! terminated_at: DateTime}
id
is the unique identifiertype
marks this Transaction's typemy_role
is visible to participants and determins their own role in this Transaction typeroot_object
refers to this Transaction's root object, which is always aMatchingTool
status
shows this Transaction current status. Will typically be derived from the underlyingFlow
created_at
,terminated_at
are the timestamps
#
Payment types#
EnumeratorsPaymentStatusKind
#
enum PaymentStatusKind { PREPARED COMPLETED FAILED}
CurrencyKind
#
enum CurrencyKind { EUR}
CurrencyUnitKind
#
enum CurrencyUnitKind { CENT}
PaymentServiceProvider
#
Provider of the payment services on randevu (e.g. Stripe)
type PaymentServiceProvider { type: PaymentProviderKind! # STRIPE type: JSONObject!}
type
is a provider kinddata
is additional info on service provider
PaymentProviderConnection
#
This structure is used when marketplace user (often a service/product provider
) connects his randevu account with an account in an external payment provider's system (e.g. STRIPE).
As a return value of the corresponding service it delivers a direct URL to redirect the user to.
type PaymentProviderConnection { url: String!}
url
is a link to redirect the user to the payment provider's page
PaymentType
#
Payment types define the payment flows in the system.
type PaymentType { id: ID! payment_provider_type: PaymentProviderKind! config: JSONObject!}
id
is a unique identifier of this objectpayment_provider_type
is a reference to the external provider for the PaymentStatusKindconfig
depends on the provider
MonetaryValue
#
This structure is used to handle money in randevu. It carries the info about the currency and amount.
type MonetaryValue { currency: CurrencyKind! unit: CurrencyUnitKind! amount: Int!}
currency
indicated the currency (e.g. 'EUR')unit
indicates the unit of the currency, theamount
is expressed in (e.g. 'CENT')amount
is the monetary amount, expressed in units of a currency
input MonetaryValueInput { currency: CurrencyKind! unit: CurrencyUnitKind! amount: Int! }
Payment
#
This types represents a Payment in randevu.
type Payment { id: ID! payment_type: PaymentType!
amount: MonetaryValue! description: String
id_sender: ID! id_recipient: ID! prepared_by: ID!
ids_matches: [ID!]!
status: PaymentStatusKind!
prepared_at: DateTime! completed_at: DateTime failed_at: DateTime}
id
is the unique identifier of the Paymentpayment_type
is [type]{#payment_type} of this paymentamount
is payment's amountdescription
is this payment's descriptionid_sender
references the payer userid_recipient
references the payee userprepared_by
references the user who prepared this paymentids_matches
is the array ofMatch
es, involved in this paymentstatus
is this payment's current statusprepared_at
is a timestampcompleted_at
is this payment successful completion timestampfailed_at
is this payment failure timestamp
PaymentCheckoutConnection
#
This structure is user when a payment is to be executed. It should be requested by a frontend app, to initiate the payment process.
type PaymentCheckoutConnection { id_payment: ID! url: String!}
id
is the unique identifier of the Paymenturl
is a link to redirect the payer towards the checkout page
#
File types#
EnumeratorsFileKind
#
enum FileKind { IMAGE DOCUMENT}
FileUpload
#
This type is exclusively used as a return value of an upload of a file
.
type FileUpload { id: ID! type: FileKind! name: String! physical_name: String! url: String!}
id
is a unique object's identifiertype
marks the file's typename
of the filephysical_name
of the fileurl
is the direct link for the file upload