User Tools

Site Tools


api:customer:address-list

API : Customer Address List

Introduction

This request will return the list of addresses a customer has.

Request

URL https://api.telecomx.dk/customer/CUSTOMER_ID/address
Method GET
Access level VIEWER, MANAGER or OWNER if user belongs to the customer.
RESELLER if customer belongs to the reseller.
ADMIN
Param CUSTOMER_ID Id of the customer, (24 hex-char string).

Query examples

https://api.telecomx.dk/customer/1234567890ABCDEF12345678/address

Response

The response is an array of addresses. Each address has the following properties.

JSON object
addresses[item]._id Id Id of address
addresses[item].primary Boolean True if this is the primary address
addresses[item].alternativeName String Alternative name for this address
addresses[item].address String Street, number etc.
addresses[item].zip String Zip code
addresses[item].city String City
addresses[item].state String State
addresses[item].country String Country
addresses[item].fixedNumber String Fixed phone number on this address, if it differs from the primary
addresses[item].faxNumber String Fax number on this address, if it differs from the primary
addresses[item].municipalityCode Integer Municipality code, automatically set by the system

Note that properties holding no value may be omitted from the object.

Example - normal

[
  {
    _id: '52f4fd7734697b2800000001',
    primary: true,
    address: 'Paradis Æblevej 23',
    zip: '123',
    city: 'Andeby',
    country: 'Cartoonistan',
    municipalityCode: 101
  },
  {
    _id: '52f4fd7734697b2800000002',
    primary: false,
    alternativeName: 'Joakim Von And\'s pengetank',
    address: 'Guldvej 1',
    zip: '123',
    city: 'Andeby',
    country: 'Cartoonistan',
    fixedNumber: '7913',
    municipalityCode: 102
  }
]

Errors

Error code Message Description
400 customer Customer id not found in URI
403 access_denied Insufficient access level
404 customer Customer not found
api/customer/address-list.txt · Last modified: 2016/05/24 05:57 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki