Skip to main content

Products

  • Searchable lookup fields:
    • EAN key
    • Base product name
  • Filterable field set:
    • base__diseases=INT (Disease ID)
    • base__category=INT (Category ID)
    • base__pharmaceutical_company=INT (Pharma company ID)
    • is_active=BOOL (True returns products that can be bought)
    • has_shortage=BOOL (False returns products that are available and not in shortage)
    • min_price=DOUBLE
    • max_price=DOUBLE
    • id__in=INTs separated by commas
    • ean_key__in=EANs separated by commas
  • Ordering fields:
    • created_at This is the default by descending order
    • updated_at Last updated date
    • base__name By alphabetical order of name
    • price By prices

Example response:

Categories

  • Searchable lookup fields:
    • name
  • Filterable field set:
    • available True/False. If True exclude Categories without any inactive/shortage products
  • Ordering fields:
    • updated_at This is the default by descending order
    • name By alphabetical order of name

Pharmaceutical Companies

  • Searchable lookup fields:
    • name
  • Filterable field set:
    • available True/False. If True exclude Companies without any inactive/shortage products
  • Ordering fields:
    • updated_at This is the default by descending order
    • name By alphabetical order of name

Diseases

  • Searchable lookup fields:
    • name
  • Ordering fields:
    • updated_at This is the default by descending order
    • name By alphabetical order of name

Calculate

This service calculates the purchase order totals and estimated delivery date The products and quantities are specified inside an array of DETAIL objects. Each detail has {"product": ID, "quantity":INT}. The shipping methods vary depending on the zip code, they can be seen under the array of shipping_method_options. The structure of this object is like so:
  • SHIPPING_METHOD
    • "id" : The primary key of the object.
    • "method": The type of shipping method, currently available options are: "local", "standard" and "express".
    • min_delivery_days: Minimum amount of working days to deliver the order.
    • max_delivery_days: Maximum amount of working days to deliver the order.
The zip code, shipping method ID, and current DateTime will be used to calculate the expected_delivery_date.

Error messages

Product does not exist
Coupon is not valid will return a 201 response but with an error object, however, it would calculate totals and deliveries excluding the desired discount.