Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 620DB200B30 for ; Mon, 4 Jul 2016 18:27:36 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 609B5160A65; Mon, 4 Jul 2016 16:27:36 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7F0D9160A34 for ; Mon, 4 Jul 2016 18:27:35 +0200 (CEST) Received: (qmail 431 invoked by uid 500); 4 Jul 2016 16:27:34 -0000 Mailing-List: contact dev-help@fineract.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@fineract.incubator.apache.org Delivered-To: mailing list dev@fineract.incubator.apache.org Received: (qmail 419 invoked by uid 99); 4 Jul 2016 16:27:34 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jul 2016 16:27:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C6EFF1A5CC4 for ; Mon, 4 Jul 2016 16:27:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.319 X-Spam-Level: * X-Spam-Status: No, score=1.319 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, T_MIME_MALF=0.01, T_REMOTE_IMAGE=0.01] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=mifos-org.20150623.gappssmtp.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id iwk6nUOLJ6V7 for ; Mon, 4 Jul 2016 16:27:31 +0000 (UTC) Received: from mail-vk0-f48.google.com (mail-vk0-f48.google.com [209.85.213.48]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 966D05F46E for ; Mon, 4 Jul 2016 16:27:30 +0000 (UTC) Received: by mail-vk0-f48.google.com with SMTP id k68so149951765vkb.0 for ; Mon, 04 Jul 2016 09:27:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mifos-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HmholueHeCr0wXuTlGF3oNnid6Bv24TLHqWcIaNcrYo=; b=uEI5SF0DN22CDxUiJ0I01ygPX0IKndASDnsA362OBGCNcwGW43xjN/InZFYGP47vvI 6bY9u3kJQVSQorJajZ+ybO0VgCjQoAHRh+wZPOPRgrP0iVawbVofzjYBHruhqqhsMQaQ h5pLRZgEjcNW+xOt5E5Iekyky68KhSI5AGxUxL+W0Hqgi47Kbj4lnZHDd21WCpLvybSi 5z7gwlnHsTs3gaJl3ENX1gqnjWGOZsiEH8P4R3PFAiQ0iIxU0FTomsfAYtj+DdvaAIh8 yvDaWvZbw/kSl1B/uZDXrR5sZS5gtz89mUK6d51XFpZHdnxuOSWbjOwe0m5raoZ1LcCr bA1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HmholueHeCr0wXuTlGF3oNnid6Bv24TLHqWcIaNcrYo=; b=mRKOQW8o+j2zkx/UnWpsDiYule+mf86btpCLvjsWuJQ1suYt3oEwGpmwcwhPjDsHBn j9XKgtUMkCVmYdf6Fuc4QhgrvO4Zk2v8cLoTk/uDwIJ3ItoOPlQF16drYtsQdkbCLiCD B5BcSoYk9/AGF1eL4Bf1hev6xlSpGBmFplm7bZMXUZYa+os6YJQFRoR4GnK+U6FQV7wd owiaFi2836vfib2klgYnRYSdwKjmu8/s0G6zddsomhkUegCS1pWe+7U6MH59RvNWcDJR DqlA6JjLW2ziFvcvomVYWRmsAtQa5mdX6ZrRGZAOgEtzvXETeDUkpIE7FWcaSa3Cq8b1 nK1Q== X-Gm-Message-State: ALyK8tK1dJU7Zh2Vl1bMgdWyzlaxwMmJkmcY4+og1PFIpvIjUaSV4+KfBYVtBAKKpNyxcayGEgcxCmrzbzUUFQ== X-Received: by 10.176.2.242 with SMTP id 105mr3045082uah.140.1467649649354; Mon, 04 Jul 2016 09:27:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.99.197 with HTTP; Mon, 4 Jul 2016 09:27:28 -0700 (PDT) In-Reply-To: References: From: Myrle Krantz Date: Mon, 4 Jul 2016 18:27:28 +0200 Message-ID: Subject: Re: Address API docs To: Nayan Ambali Cc: Nikhil Pawar , =?UTF-8?B?TWFya3VzIEdlacOf?= , Adi Raju , Nazeer Shaik , Ed Cable , dev@fineract.incubator.apache.org, Mifos Software Development Content-Type: multipart/alternative; boundary=001a1142e550013cf60536d1d06a archived-at: Mon, 04 Jul 2016 16:27:36 -0000 --001a1142e550013cf60536d1d06a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks Nayan, I'm just trying to understand is all. Where do potential values for "state_province_id" come from? Greets, Myrle *Myrle Krantz* Solutions Architect R=C9=85=C4=90=C9=85=D0=AF, The Mifos Initiative mkrantz@mifos.org | Skype: mkrantz.mifos.org | http://mifos.org On Mon, Jul 4, 2016 at 4:16 PM, Nayan Ambali wrote= : > Dear Nikhil, > > It would be nice if you can document it in wiki and share the link here := ) > as reference for discussion. > > Thanks > Nayan Ambali > > > > Thanks and Regards, > Nayan Ambali > +91 9591996042 > skype: nayangambali > > On Mon, Jul 4, 2016 at 7:15 PM, Nikhil Pawar wrote: > >> Hello Myrle, >> >> Thank you for your response.I did not take into account ISO identifiers >> for country_id field. >> However, now, as recommended by you, the code-code values would in >> accordance with ISO standard. >> Is there any thing else you would like to be in compliance with ISO? >> >> Regards, >> Nikhil >> >> On Mon, Jul 4, 2016 at 7:01 PM, Myrle Krantz wrote: >> >>> Hi Nikhil, >>> >>> Is the country id the ISO-3166-1 country numeric identifier? >>> >>> Greets, >>> Myrle >>> >>> >>> *Myrle Krantz* >>> Solutions Architect >>> R=C9=85=C4=90=C9=85=D0=AF, The Mifos Initiative >>> mkrantz@mifos.org | Skype: mkrantz.mifos.org | http://mifos.org >>> >>> >>> >>> On Mon, Jul 4, 2016 at 2:55 PM, Nikhil Pawar wrote= : >>> >>>> Hello Markus,Myrle,Adi,Nazeer >>>> >>>> >>>> As we have agreed in previous mail chain regarding adding of Address >>>> API as part of core product, I thought of completing its development p= rior >>>> to other dependent modules. >>>> >>>> I have come up with REST API docs for this module and wanted your >>>> feedback.Kindly provide your feedback as soon as possible, since this= is a >>>> pre-requisite for other modules. Please note that I have added an >>>> additional field 'is_active' to support address change of same type of >>>> address( and also to keep track of past address for audit purpose). >>>> >>>> >>>> >>>> 1. Create new address for client: >>>> >>>> >>>> POST https://DomainName/api/v1/clients/{clientid}/address/ >>>> >>>> *Sample request:* >>>> >>>> >>>> POST address >>>> >>>> Content-Type: application/json Request Body: >>>> >>>> { >>>> >>>> "address_type": 1, >>>> >>>> "street": "507 west street", >>>> >>>> "address_line_1": "apt no 5", >>>> >>>> "address_line_2": "opposite to college park", >>>> >>>> "city":"Dallas", >>>> >>>> "state_province_id":1, >>>> >>>> "country_id":2, >>>> >>>> "postal_code":"40041", >>>> >>>> } >>>> >>>> >>>> >>>> 2. Retrieve all addresses of all types for particular client: >>>> >>>> >>>> GET https://DomainName/api/v1/clients/{clientid}/address/ >>>> >>>> >>>> *Sample response:* >>>> >>>> >>>> [ >>>> >>>> { >>>> >>>> "clientId":1, >>>> >>>> "addressId":2, >>>> >>>> "address_type": 1, >>>> >>>> "street": "507 west street", >>>> >>>> "address_line_1": "apt no 5", >>>> >>>> "address_line_2": "opposite to college park", >>>> >>>> "city":"Dallas", >>>> >>>> "state_province_id":1, >>>> >>>> "country_id":2, >>>> >>>> "postal_code":"40041", >>>> >>>> "is_active":1 >>>> >>>> }, >>>> >>>> { >>>> >>>> "clientId":2, >>>> >>>> "addressId":3, >>>> >>>> "address_type": 1, >>>> >>>> "street": "100 west street", >>>> >>>> "address_line_1": "apt no 7", >>>> >>>> "address_line_2": "opposite to college park", >>>> >>>> "city":"Dallas", >>>> >>>> "state_province_id":1, >>>> >>>> "country_id":2, >>>> >>>> "postal_code":"40041", >>>> >>>> "is_active":0 >>>> >>>> } >>>> >>>> ] >>>> >>>> >>>> >>>> 3. Retreive all addresses of particular type for specified client >>>> >>>> >>>> GET https://DomainName/api/v1/clients/{clientid}/address/{addtypId} >>>> >>>> *Sample response:* >>>> >>>> >>>> [ >>>> >>>> { >>>> >>>> "clientId":2, >>>> >>>> "addressId":2, >>>> >>>> "address_type": 1, >>>> >>>> "street": "507 west street", >>>> >>>> "address_line_1": "apt no 5", >>>> >>>> "address_line_2": "opposite to college park", >>>> >>>> "city":"Dallas", >>>> >>>> "state_province_id":1, >>>> >>>> "country_id":2, >>>> >>>> "postal_code":"40041", >>>> >>>> "is_active":0 >>>> >>>> }, >>>> >>>> { >>>> >>>> "clientId":2, >>>> >>>> "addressId":2, >>>> >>>> "address_type": 1, >>>> >>>> "street": "100 west street", >>>> >>>> "address_line_1": "apt no 7", >>>> >>>> "address_line_2": "opposite to college park", >>>> >>>> "city":"Dallas", >>>> >>>> "state_province_id":1, >>>> >>>> "country_id":2, >>>> >>>> "postal_code":"40041", >>>> >>>> "is_active":1 >>>> >>>> } >>>> >>>> ] >>>> >>>> >>>> >>>> >>>> >>>> >>>> 4. Retrieve active address of particular type for specified clientid >>>> >>>> >>>> GET >>>> https://DomainName/api/v1/clients/{clientid}/address/{addtypId}?comman= d=3Dactive >>>> >>>> >>>> Sample response: >>>> >>>> { >>>> >>>> "clientId":1, >>>> >>>> "addressId":2, >>>> >>>> "address_type": 1, >>>> >>>> "street": "507 west street", >>>> >>>> "address_line_1": "apt no 5", >>>> >>>> "address_line_2": "opposite to college park", >>>> >>>> "city":"Dallas", >>>> >>>> "state_province_id":1, >>>> >>>> "country_id":2, >>>> >>>> "postal_code":"40041", >>>> >>>> "40041", >>>> >>>> "is_active":1 >>>> >>>> } >>>> >>>> >>>> >>>> 5. update: >>>> >>>> >>>> update particular "active" address of client >>>> >>>> PUT https://DomainName/api/v1/clients/{clientid}/address/{addtypId} >>>> >>>> sample request >>>> >>>> { >>>> >>>> is_active:false >>>> >>>> } >>>> >>>> >>>> supported fields: >>>> >>>> address line fields,addresstypeid,is_active >>>> >>>> >>>> >>>> Regards, >>>> >>>> Nikhil >>>> >>>> >>> >> > --001a1142e550013cf60536d1d06a--