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 2B1C7200B30 for ; Mon, 4 Jul 2016 18:40:41 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 29BD9160A34; Mon, 4 Jul 2016 16:40:41 +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 4D4AF160A65 for ; Mon, 4 Jul 2016 18:40:40 +0200 (CEST) Received: (qmail 32403 invoked by uid 500); 4 Jul 2016 16:40:39 -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 32384 invoked by uid 99); 4 Jul 2016 16:40:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jul 2016 16:40:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id BEFE5C9320 for ; Mon, 4 Jul 2016 16:40:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.449 X-Spam-Level: * X-Spam-Status: No, score=1.449 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_MIME_MALF=0.01, T_REMOTE_IMAGE=0.01] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id xxT1Sgwy7BVZ for ; Mon, 4 Jul 2016 16:40:34 +0000 (UTC) Received: from mail-oi0-f54.google.com (mail-oi0-f54.google.com [209.85.218.54]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 4B6995F47B for ; Mon, 4 Jul 2016 16:40:34 +0000 (UTC) Received: by mail-oi0-f54.google.com with SMTP id f189so200290571oig.3 for ; Mon, 04 Jul 2016 09:40:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=rb7vLJnP7Rs0dDtXp3uXhwMdAGWxnanP/RB5koYIVGM=; b=zMlfsqaildK9fBhkQh9JvwyZEzhI1qKEZVo8km9Gjo7tiDkqp2pjHrQedGmprftqr/ wCEodBOzeRM8GNFXzsFkMcmFFk3fHCaoOUopE+/bLFwlj+TMkbTOFr7ZS/Lci7nXwR8q wGA7uNfNHTSLxAjwWRgX5HQuXcB/kjTX9JUn2DOFH6ASVIcvxm5Nh8KaVj81KzL6hBf6 rtqhVNfz/mrNVBcBu1Ews7C/8nqkOx/ybGpPCzuFhaYFjlu631JNhK1+7LJb4qkxK0nC hnSHMfCZJKc5eX4TNdheiQY6fMcPVtKlb6TAgqwSCEE5hxzTs+y7sFMopF+T1FEUrHVb NMKA== 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=rb7vLJnP7Rs0dDtXp3uXhwMdAGWxnanP/RB5koYIVGM=; b=DP9oGsHb0zzQVo3hQmWd4UP/0X4GxbyROaz7B98g5AKVHeJdvEXLNHDmfuHWVUOyJF 9NPTXiDyzlKUjtKbuF3g0B/4nKPS2HbI7+zh0qrYr+4ngxijA+QV4zm9y1l4sKy9kZoM PcFvS+PdIUbY7Z/jyEq1em/wG8YqUnmnhZLduo25PCNSmPYRnEbWuSOPP1kgWjgsD6Fi flXIMnEYc/0oqXkUTyhA4gSDtc2/7gbMbgqHTrjSBzZq1KHMvViJg4oCoirX3f9Tr8iv y5ohIK+RvwX7OGvJTVVzvSZawA4m4+BhCnAX6GmZQN40GKwu/hAHbM8g+QNyC4/SKdmB wC2Q== X-Gm-Message-State: ALyK8tJ+YQDCQoyxl5IrqMhxZyqSFYYT3whApNawlWICJazf6Nn1alDVMR+c0EBauwZcU/nPVFWvq4WBw+3c+A== X-Received: by 10.157.54.209 with SMTP id s17mr8007448otd.33.1467650433477; Mon, 04 Jul 2016 09:40:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.37.79 with HTTP; Mon, 4 Jul 2016 09:40:32 -0700 (PDT) In-Reply-To: References: From: Nikhil Pawar Date: Mon, 4 Jul 2016 22:10:32 +0530 Message-ID: Subject: Re: Address API docs To: Myrle Krantz Cc: Nayan Ambali , =?UTF-8?B?TWFya3VzIEdlacOf?= , Adi Raju , Nazeer Shaik , Ed Cable , dev@fineract.incubator.apache.org, Mifos Software Development Content-Type: multipart/alternative; boundary=001a113e3370bdf4c30536d1fe89 archived-at: Mon, 04 Jul 2016 16:40:41 -0000 --001a113e3370bdf4c30536d1fe89 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Myrle, We can follow GENC code, it is a US standard which identifies Geopolitical entities within Countries. Its description says it corresponds to ISO 3166-2.: http://www.statoids.com/uin.html Regards, Nikhil On Mon, Jul 4, 2016 at 9:57 PM, Myrle Krantz wrote: > 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 = prior >>>>> 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 thi= s 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 o= f >>>>> 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}?comma= nd=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 >>>>> >>>>> >>>> >>> >> > --001a113e3370bdf4c30536d1fe89--