The Pro version of the Moodle shop provides Web services allowing partnership operations to be run and the sales catalogue to be exposed to third-party services.
To enable the web services, you will need to:
Synopsis: Get the definition of a shop instance.
RETURN
General response structure:
object {
id int //Shop id
name string //Shop name
catalogid string //Master shop catalog
description string //Shop description
allowtax int //Do the shop apply VAT tax
eulas string //Shop eulas
paymodes string //Enabled paymodes
defaultpaymode string //Default paymode
}
Synopsis: Get the definition of a catalogue instance.
RETURN
General structure
object {
id int //Catalog id
name string //Catalog name
description string //Catalog description
salesconditions string //Catalog Eulas
countryrestrictions string //Countries deserved
categories list of (
object {
id int //Category id
name string //Category name
}
)
}
Synopsis: Get the definition of a catalogue category.
RETURN
General structure
object {
id int //Category id
catalogid int //Catalog id
name string //Category name
description string //Category description
visible int //Is category visible
}
Synopsis: Get the definition of a product.
RETURN
General structure
object {
id int //Item id
catalogid int //Catalog id
code string //Item code
shortname string //Item shortname (for web UI)
name string //Item name
description string //Item description
eulas string //Item eulas
notes string //Item notes
type string //Item type, plain, set or bundle
status string //Item status
unitcost string //Unit cost for input quantity
tax string //Tax cost
requireddata string //Required data from the front customer
leafleturl string //Leaflet url
thumburl string //Thumb url
imageurl string //Image url
}
Synopsis: Get a list of products
RETURN
General structure
list of (
object {
id int //Item id
catalogid int //Item catalog id
categoryid int //Item category id
code string //Item code
shortname string //Item shortname (for web UI)
name string //Item name
description string //Item description
eulas string //Item eulas
notes string //Item notes
type string //Item type, plain, set or bundle
status string //Item status
unitcost string //Unit cost for input quantity
tax string //Tax cost
requireddata string //Required data from the front customer
leafleturl string //Leaflet url
thumburl string //Thumb url
imageurl string //Image url
}
)
Back to the technical guide summary - Back to the component index