تصميم:دواسوا/API

من ويكي أضِف
اذهب إلى التنقل اذهب إلى البحث

The API should implement the following verbs:

Lookup ( name: string, count: int, index: int )
returns count number of listings having name as the name, starting with index
Insert_pending ( package_info: package_info, contact_info: contact_info, accept_terms: boolean )
initiates the process of inserting a listing. The final insertion into the index is completed with insert_instate. Where:
  • package_info : package information record as indicated in package_info
  • contact_info : contact information record as indicated in contact_info
  • accept_terms : a flag indicating the acceptance of the terms of service.

Listing data record is comprised of the following two data structures:

package_info

name : string
the name of the medicine in Latin script
name_arabic : string
the name of the medicine in Arabic script, if available (optional)
expiry : date
the date of expiry of the medicine. The significance is in the precision of months, i.e YYYY/MM
package_state : string(fabrica | opened | partial)
The case of the packaging of the medicine.
governrate : string(predefined)
the governerate where the package is to be picked up
description : text
a brief description, and/or notes by the submitter
photo : blob
an optional photograph of the package

contact_info

email_address : string(email-address)
name : string
phone_number : string(phone-number)
email_address_visible : boolean