From 2e2e5cd08deb698b9c0cc130d74c531969bcc0d0 Mon Sep 17 00:00:00 2001 From: Maciej Szlosarczyk Date: Mon, 16 Jul 2018 13:32:40 +0300 Subject: [PATCH] Add GET contact info endpoint --- doc/registrant-api/v1/contact.md | 52 +++++++++++++++++++++++++++++++- doc/registrant-api/v1/domain.md | 7 +---- 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/doc/registrant-api/v1/contact.md b/doc/registrant-api/v1/contact.md index 126ae27c6..127c9fdb4 100644 --- a/doc/registrant-api/v1/contact.md +++ b/doc/registrant-api/v1/contact.md @@ -61,7 +61,57 @@ Content-Type: application/json } ``` -## PUT/PATCH /rep/v1/registrant/contacts/$UUID +## GET /repp/v1/registrant/contacts/$UUID +Returns contacts of the current registrar. + + +#### Request +``` +GET /repp/v1/registrant/contacts/84c62f3d-e56f-40fa-9ca4-dc0137778949 HTTP/1.1 +Accept: application/json +Authorization: Bearer Z2l0bGFiOmdoeXQ5ZTRmdQ== +Content-Type: application/json +``` + +#### Response +``` +HTTP/1.1 200 +Cache-Control: max-age=0, private, must-revalidate +Content-Length: 564 +Content-Type: application/json + +{ + "uuid": "84c62f3d-e56f-40fa-9ca4-dc0137778949", + "domain_name": "example.com" + "code": "REGISTRAR2:SH022086480", + "phone": "+372.12345678", + "email": "hoyt@deckowbechtelar.net", + "fax": null, + "created_at": "2015-09-09T09:11:14.130Z", + "updated_at": "2015-09-09T09:11:14.130Z", + "ident": "37605030299", + "ident_type": "priv", + "auth_info": "password", + "name": "Karson Kessler0", + "org_name": null, + "registrar_id": 2, + "creator_str": null, + "updator_str": null, + "ident_country_code": "EE", + "city": "Tallinn", + "street": "Short street 11", + "zip": "11111", + "country_code": "EE", + "state": null, + "legacy_id": null, + "statuses": [ + "ok" + ], + "status_notes": {} +} +``` + +## PUT/PATCH /repp/v1/registrant/contacts/$UUID Update contact details for a contact. diff --git a/doc/registrant-api/v1/domain.md b/doc/registrant-api/v1/domain.md index 5ea82a376..db9b17978 100644 --- a/doc/registrant-api/v1/domain.md +++ b/doc/registrant-api/v1/domain.md @@ -31,7 +31,7 @@ Content-Type: application/json { "domains": [ { - "id": 1, + "uuid": "98d1083a-8863-4153-93e4-caee4a013535", "name": "domain0.ee", "registrar_id": 2, "registered_at": "2015-09-09T09:11:14.861Z", @@ -99,8 +99,3 @@ Content-Type: application/json "total_number_of_records": 2 } ``` - -#### Implementation details - -This endpoint is practically a copy-paste from similar endpoint used by -registrars.