Skip to main content

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 API#

loginAPIUser#

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

Endpoint which signs-in user a Participant into randevu
type Mutation {  loginAPIUser(username: String!, password: String!): Session!}
  • username API user's username
  • password API user's password

This API will return a Session structure.

getParticipantTypes#

This service brings all defined Participant types, also called MarketplaceUserTypes 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 Fields.

User status

This method can affect the User object status.

If the last required Field has been provided, this User object will switch to ONBOARDED state.

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 object

  • first_name, last_name, password is basic data to be updated

  • fields are object's custom Fields. value should be provided in the correct format, depending on the FieldType's input_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 API#

getSupplyTypes#

This service fetches all the SupplyTypes 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 the SupplyType to base this Supply on

  • name is an internal alias for this object.

  • id_provider is the unique identifier of the provider User

updateSupply#

This service permits updating basic supply data, as well as their custom Fields.

Supply status

This method can affect the Supply object status.

If the last required Field has been provided, this Supply object will switch to ONBOARDED state.

updateSupply(  id: ID!,  name: String,  fields: [FieldInput!]): Boolean!
input FieldInput {  id: ID!  value: JSON}
  • id is a unique identifier of the object

  • name is the new value for the object's internal alias. It is an optional parameter.

  • fields are object's custom Fields. value should be provided in the correct format, depending on the FieldType's input_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 API#

getMatchTypes#

This service fetches all the existing MatchTypes 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 MatchTypes, 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 the Match

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 new Match based on

  • id_consumer is the ID of the User object for the consumer end of this Match

  • id_supply is the ID of the Supply object for this Match

  • quantity an optional quantity for this Match

updateMatch#

This service permits updating the custom Fields, assigned to this Match.

Match status

This method can affect the Match object status.

If the last required Field has been provided, and other conditions fulfilled, this Match object will switch to CLOSED state.

updateMatch(  id: ID!,  fields: [FieldInput!]): Boolean!
input FieldInput {  id: ID!  value: JSON}
  • id is a unique identifier of the object

  • fields are object's custom Fields. value should be provided in the correct format, depending on the FieldType's input_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 object

  • to is referencing a role on the Match, to unlock the object for. Valid values here are CONSUMER or PROVIDER

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 API#

getMatchingToolType#

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 API#

getFavouriteFieldTypes#

This service brings the FavouriteFieldTypes 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 FieldTypes and [Field](../schema#fields in randevu.

See FieldTypeContainerKind nad FieldContainerKind

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 field

  • id_parent references the parent container of the target field

  • id_field references the target field

  • client_type references the user role of the user who is affected by the change. See FieldAccessClientKind for more info on valid values.

  • new_access is a the access level to be given to the client_type. See FieldAccessKind 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 a Match. See FieldAccessClientKind for more info

Notifications API#

getNotificationTypes#

This service fetches all defined NotificationTypes on the marketplace.

getNotificationTypes: [NotificationType!]

Flows API#

getFlowTypes#

This service fetches all defined FlowTypes on the marketplace.

getFlowTypes: [FlowType!]

getFlowType#

This service fetches a single concrete FlowTypes on the marketplace.

getFlowType(id: ID!): FlowType!
  • id Flow type's unique identifier

Payments API#

getPaymentServiceProviders#

This service fetches all the PaymentProviders defined on the marketplace.

  getPaymentServiceProviders: [PaymentServiceProvider]!

getPaymentServiceProvider#

This service fetches all the PaymentProviders defined on the marketplace.

  getPaymentServiceProvider(    type: PaymentProviderKind!  ): PaymentServiceProvider!

getPaymentTypes#

This service fetches all the PaymentTypes defined on the marketplace.

getPaymentTypes: [PaymentType!]!

Transactions API#

getTransactionTypes#

This service fetches all the TransactionTypess defined on the marketplace.

getTransactionTypes: [TransactionType!]

getTransactionType#

This service fetches all Transactions executed on the marketplace.

  getTransactions: [Transaction!]!

getTransactions#

This service fetches all the TransactionTypess defined on the marketplace.

getTransactionTypes: [TransactionType!]

Files API#

prepareFileUpload#

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 uploaded

  • type indicates the file's type

  • extension is the extension of a file to be uploaded (e.g. 'jpg')