Backoffice API
In this section so called backoffice APIs are explained. The usual use of this is to extend the functionality of randevu by reacting to interesting events, implementing custom logic, etc.
Backoffice context
The implicit context for all the APIs in this section is the marketplace, rather than single marketplace user.
Backoffice users are granted permissions to manipulate wide range of system data
Authentication
On the top if this login mechanism, all API use is based on api key usage. Refer to Authentication section for more details
#
Users APIloginAPIUser
#
Use this service to login to randevu as API User.
A valid public key must be provided with this call. Refer to Authentication section for more details
type Mutation { loginAPIUser(username: String!, password: String!): Session!}
username
API user's usernamepassword
API user's password
This API will return a Session
structure.
getParticipantTypes
#
This service brings all defined Participant types, also called MarketplaceUserType
s in the marketplace.
getParticipantTypes: [MarketplaceUserType!]
getParticipantType
#
This service fetches a single concrete Participant, also called MarketplaceUserType
.
getParticipantType(id: ID!): MarketplaceUserType
id
is a unique identifier of the object
getUsers
#
This service is fetching a subset of marketplace users, responding to the provided filter.
getUsers(filter: UserFilter): [User!]
input UserFilter { role: [UserRoleKind!] id_user_type: [ID!]
email: String first_name: String last_name: String status: [UserStatusKind!]}
filter
defines the conditions for filtering the Users
getUser
#
The service fetches a single, concrete User
from the system.
getUser(id: ID!): User!
id
is a unique identifier of the object
updateUser
#
This service permits updating basic user data, as well as their custom Field
s.
User status
updateUser( id: ID! first_name: String last_name: String password: String fields: [FieldInput!]): Boolean!
input FieldInput { id: ID! value: JSON}
id
is a unique identifier of the objectfirst_name
,last_name
,password
is basic data to be updatedfields
are object's customFields
.value
should be provided in the correct format, depending on theFieldType
'sinput_type
(e.g. )
approveUser
#
This service is registering an backoffice approval for the onboarding Marketplace User.
approveUser(id: ID!): Boolean!
id
is a unique identifier of the object
rejectUser
#
This service is registering an backoffice rejection for the onboarding Marketplace User. As a consequence, this user will not be able to use the system.
rejectUser(id: ID!): Boolean!
id
is a unique identifier of the object
#
Supply APIgetSupplyTypes
#
This service fetches all the SupplyType
s defined in the marketplace.
getSupplyTypes: [SupplyType!]
getSupplyType
#
This service fetches a single SupplyType
instance
getSupplyType(id: ID!): SupplyType
id
is a unique identifier of the object
getSupplies
#
This service is fetching a subset of Supply
on the marketplace, responding to the provided filter.
getSupplies(filter: SupplyFilter): [Supply!]
input SupplyFilter { name: String id_supply_type: [ID!] id_provider: [ID!] status: [SupplyStatusKind!]}
filter
defines the conditions for filtering the supply
getSypply
#
This service fetches a single Supply
instance.
getSupply(id: ID!): Supply!
id
is a unique identifier of the object
createSupply
#
This service creates a new Supply
instance, on behalf of a marketplace user.
createSupply( id_supply_type: ID!, name: String!, id_provider: ID): Supply!
id_supply_type
is a unique identifier of theSupplyType
to base this Supply onname
is an internal alias for this object.id_provider
is the unique identifier of the providerUser
updateSupply
#
This service permits updating basic supply data, as well as their custom Field
s.
Supply status
updateSupply( id: ID!, name: String, fields: [FieldInput!]): Boolean!
input FieldInput { id: ID! value: JSON}
id
is a unique identifier of the objectname
is the new value for the object's internal alias. It is an optional parameter.fields
are object's customFields
.value
should be provided in the correct format, depending on theFieldType
'sinput_type
(e.g. )
approveSupply
#
This service is registering an backoffice approval for the onboarding Supply.
approveSupply(id: ID!): Boolean!
id
is a unique identifier of the object
rejectSupply
#
This service is registering an backoffice rejection for the onboarding Supply. As a consequence, this supply will not be offered on the marketplace.
rejectSupply(id: ID!): Boolean!
id
is a unique identifier of the object
#
Matches APIgetMatchTypes
#
This service fetches all the existing MatchType
s on the marketplaces.
getMatchTypes: [MatchType!]
getMatchType
#
This service fetches a single instance of a MatchType
getMatchType(id: ID!): MatchType
id
is a unique identifier of the object
This service is fetching a subset of MatchType
s, responding to the provided filter.
getMatches(filter: MatchFilter): [Match!]
input MatchFilter { id_match_type: [ID!]
id_provider: [ID!] id_consumer: [ID!] id_supply: [ID!]
status: [MatchStatusKind!]}
filter
defines the conditions for filtering theMatch
getMatch
#
This service fetches a single Match
instance.
getMatch(id: ID!): Match
id
is a unique identifier of the object
forceMatch
#
This service creates a new instance of a Match
of any MatchType.
forceMatch( id_match_type: ID! id_consumer: ID! id_supply: ID! quantity: Int = 1): ID!
id_match_type
is the ID of the MatchType object to create a newMatch
based onid_consumer
is the ID of the User object for the consumer end of thisMatch
id_supply
is the ID of the Supply object for thisMatch
quantity
an optional quantity for thisMatch
updateMatch
#
This service permits updating the custom Field
s, assigned to this Match
.
Match status
updateMatch( id: ID!, fields: [FieldInput!]): Boolean!
input FieldInput { id: ID! value: JSON}
id
is a unique identifier of the objectfields
are object's customFields
.value
should be provided in the correct format, depending on theFieldType
'sinput_type
(e.g. )
unlockMatch
#
This service will make a Match visible to the provider
or consumer
.
Unlocking Match
Sometimes, it is not wanted that consumer and/or provider have access to a Match instance, upon its creation (e.g. backoffice approval is required before disclosing a match).
To configure a MatchType
to be initially invisible to its provider
and/or consumer
, the initial_match_visibility
property of the MatchType should be set accordingly - its match_by_consumer
and/or match_by_provider
should be set to false
unlockMatch(id: ID!, to: MatchTypeRoleKind!): Boolean!
id
is a unique identifier of the objectto
is referencing a role on the Match, to unlock the object for. Valid values here areCONSUMER
orPROVIDER
approveMatch
#
This service executes the backoffice approval of this Match
.
approveMatch(id: ID!): Boolean!
id
is a unique identifier of the object
rejectMatch
#
This service executes the backoffice rejection of this Match
.
rejectMatch(id: ID!): Boolean!
id
is a unique identifier of the object
#
Matching tools APIgetMatchingToolType
#
This service fetches a single instance of a MatchingToolType
.
getting matching tools
Matching tool types are accessible via matching_tool_types
property of a MatchType
object.
getMatchingToolType(id: ID!): MatchingToolType!
id
is a unique identifier of the object
#
Fields APIgetFavouriteFieldTypes
#
This service brings the FavouriteFieldType
s for the marketplace.
getFavouriteFieldTypes: [FavouriteFieldType!]!
updateFieldAccess
#
This service updates the access configuration of a target Field
. This way, this Field can be made visible, invisible of writable for a selected user.
Field and Field Type Containers
Several objects can host FieldType
s and [Field
](../schema#fields in randevu.
updateFieldAccess( parent_type: FieldContainerKind! id_parent: ID! id_field: ID! client_type: FieldAccessClientKind! new_access: FieldAccessKind! id_match_context: ID = null): Boolean!
parent_type
is a type of the parent container of the target fieldid_parent
references the parent container of the target fieldid_field
references the target fieldclient_type
references the user role of the user who is affected by the change. SeeFieldAccessClientKind
for more info on valid values.new_access
is a the access level to be given to theclient_type
. SeeFieldAccessKind
for more info on valid values.id_match_context
is an optional parameter. It references the Match instance, if this access level update is occurring in context of aMatch
. SeeFieldAccessClientKind
for more info
#
Notifications APIgetNotificationTypes
#
This service fetches all defined NotificationType
s on the marketplace.
getNotificationTypes: [NotificationType!]
#
Flows APIgetFlowTypes
#
This service fetches all defined FlowType
s on the marketplace.
getFlowTypes: [FlowType!]
getFlowType
#
This service fetches a single concrete FlowType
s on the marketplace.
getFlowType(id: ID!): FlowType!
id
Flow type's unique identifier
#
Payments APIgetPaymentServiceProviders
#
This service fetches all the PaymentProvider
s defined on the marketplace.
getPaymentServiceProviders: [PaymentServiceProvider]!
getPaymentServiceProvider
#
This service fetches all the PaymentProvider
s defined on the marketplace.
getPaymentServiceProvider( type: PaymentProviderKind! ): PaymentServiceProvider!
getPaymentTypes
#
This service fetches all the PaymentType
s defined on the marketplace.
getPaymentTypes: [PaymentType!]!
#
Transactions APIgetTransactionTypes
#
This service fetches all the TransactionTypes
s defined on the marketplace.
getTransactionTypes: [TransactionType!]
getTransactionType
#
This service fetches all Transactions
executed on the marketplace.
getTransactions: [Transaction!]!
getTransactions
#
This service fetches all the TransactionTypes
s defined on the marketplace.
getTransactionTypes: [TransactionType!]
#
Files APIprepareFileUpload
#
This service is called to prepare a File upload to randevu. It returns a structure with an URL, to upload a file to.
prepareFileUpload( name: String! type: FileKind! extension: String = ""): FileUpload!
name
is the name of a file to be uploadedtype
indicates the file's typeextension
is the extension of a file to be uploaded (e.g. 'jpg')