# Zákazníkovy adresy

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /customer/address:
    get:
      summary: Zákazníkovy adresy
      deprecated: false
      description: >
        ## Význam a použití

        Metoda **GET /customer/address** poskytuje přehled informací, které jsou
        v systému PPL evidovány ke konkrétnímu zákazníkovi. Zde jde konkrétně o
        seznam adres, které jsou u zákazníka uloženy. To lze využít především
        pro:

        1.  **Výpis firemních/pobočkových adres**
            - Zákazník (odesílatel) může mít v systému PPL uloženou primární adresu sídla, ale také další pobočky či sklady.
            - Tato metoda umožňuje zjistit, jaké adresy má zákazník zaregistrované, abyste je mohli například použít jako odesílací nebo fakturační adresy při podávání zásilek.

        1.  **Automatizace výběru adresy**
            - Pokud má společnost více provozoven, může si e-shop nebo skladový systém vytáhnout z API všechny adresy a poté nechat uživatele vybrat, odkud balík odchází.
            - Parametr default: true ukazuje, která z adres je nastavená jako výchozí (hlavní).

        1.  **Konzistentní data**
            - Místo ručního ukládání adres (které se mohou časem změnit), využijete přímo údaje uložené u PPL.
            - Pokud zákazník (odesílatel) adresu změní (např. přestěhuje se), projeví se to přímo v API, a není nutné dělat ruční úpravy v dalším systému.
      tags:
        - API Metody/Customer
        - Customer
      parameters:
        - name: Accept-Language
          in: header
          description: 'Language specification, default language: cs-CZ'
          required: false
          example: ''
          schema:
            $ref: '#/components/schemas/AcceptLanguageSchema'
        - name: X-Correlation-ID
          in: header
          description: Correlation Id of request
          required: false
          example: ''
          schema:
            $ref: '#/components/schemas/XCorrelationIdSchema'
        - name: X-LogLevel
          in: header
          description: The forced log level
          required: false
          example: ''
          schema:
            $ref: '#/components/schemas/XLogLevelSchema'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  x-apidog-refs:
                    01JJKWT90XQP36Y3M7X1XT7YD8:
                      $ref: >-
                        #/components/schemas/Eps.Api.MyApi2.Web.Models.Customer.AddressModel
                      x-apidog-overrides:
                        code: &ref_0
                          type: string
                          description: >
                            Krátký identifikátor adresy v systému PPL. Je to
                            interní kód, který se používá při objednávání
                            zásilek, aby bylo jasné, o kterou uloženou adresu se
                            jedná.
                          nullable: true
                        street: &ref_3
                          type: string
                          description: Ulice a popisné/orientační číslo.
                          nullable: true
                        default: &ref_7
                          type: boolean
                          description: Určuje, zda je daná adresa označena jako výchozí.
                        name: &ref_1
                          type: string
                          description: Jméno
                          nullable: true
                        name2: &ref_2
                          type: string
                          nullable: true
                        city: &ref_4
                          type: string
                          description: Město
                          nullable: true
                        zipCode: &ref_5
                          type: string
                          description: PSČ
                          nullable: true
                        country: &ref_6
                          type: string
                          description: kód země viz codelist/country
                          nullable: true
                      required: []
                  x-apidog-orders:
                    - 01JJKWT90XQP36Y3M7X1XT7YD8
                  properties:
                    code: *ref_0
                    name: *ref_1
                    name2: *ref_2
                    street: *ref_3
                    city: *ref_4
                    zipCode: *ref_5
                    country: *ref_6
                    default: *ref_7
                  x-apidog-ignore-properties:
                    - code
                    - name
                    - name2
                    - street
                    - city
                    - zipCode
                    - country
                    - default
          headers:
            X-Correlation-ID:
              description: Correlation Id of request otherwise id of response
              schema:
                $ref: '#/components/schemas/XCorrelationIdSchema'
          x-apidog-name: OK
        '400':
          description: BadRequest
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                    x-apidog-orders: []
                    properties: {}
                    x-apidog-ignore-properties: []
                    nullable: true
                  type:
                    type: string
                    nullable: true
                  title:
                    type: string
                    nullable: true
                  status:
                    type: integer
                    format: int32
                    nullable: true
                  detail:
                    type: string
                    nullable: true
                  instance:
                    type: string
                    nullable: true
                x-apidog-orders:
                  - 01JJKWRCCZKXKYDVFEPXAY6RK2
                x-apidog-refs:
                  01JJKWRCCZKXKYDVFEPXAY6RK2: &ref_8
                    $ref: >-
                      #/components/schemas/Eps.Api.Infrastructure.WebApi.Model.ProblemJsonModel
                x-apidog-ignore-properties:
                  - errors
                  - type
                  - title
                  - status
                  - detail
                  - instance
          headers: {}
          x-apidog-name: Bad Request
        '404':
          description: NotFound
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                    x-apidog-orders: []
                    properties: {}
                    x-apidog-ignore-properties: []
                    nullable: true
                  type:
                    type: string
                    nullable: true
                  title:
                    type: string
                    nullable: true
                  status:
                    type: integer
                    format: int32
                    nullable: true
                  detail:
                    type: string
                    nullable: true
                  instance:
                    type: string
                    nullable: true
                x-apidog-orders:
                  - 01JJKWRK3C40RJ34FFSKTC0B37
                x-apidog-refs:
                  01JJKWRK3C40RJ34FFSKTC0B37: *ref_8
                x-apidog-ignore-properties:
                  - errors
                  - type
                  - title
                  - status
                  - detail
                  - instance
          headers: {}
          x-apidog-name: Record Not Found
        '500':
          description: InternalServerError
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                    x-apidog-orders: []
                    properties: {}
                    x-apidog-ignore-properties: []
                    nullable: true
                  type:
                    type: string
                    nullable: true
                  title:
                    type: string
                    nullable: true
                  status:
                    type: integer
                    format: int32
                    nullable: true
                  detail:
                    type: string
                    nullable: true
                  instance:
                    type: string
                    nullable: true
                x-apidog-orders:
                  - 01JJKWRRBPJ2AT6CT27KN1KHWP
                x-apidog-refs:
                  01JJKWRRBPJ2AT6CT27KN1KHWP: *ref_8
                x-apidog-ignore-properties:
                  - errors
                  - type
                  - title
                  - status
                  - detail
                  - instance
          headers: {}
          x-apidog-name: Server Error
        '503':
          description: ServiceUnavailable
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                    x-apidog-orders: []
                    properties: {}
                    x-apidog-ignore-properties: []
                    nullable: true
                  type:
                    type: string
                    nullable: true
                  title:
                    type: string
                    nullable: true
                  status:
                    type: integer
                    format: int32
                    nullable: true
                  detail:
                    type: string
                    nullable: true
                  instance:
                    type: string
                    nullable: true
                x-apidog-orders:
                  - 01JJKWRYNNYEJ78ZAN02865JD6
                x-apidog-refs:
                  01JJKWRYNNYEJ78ZAN02865JD6: *ref_8
                x-apidog-ignore-properties:
                  - errors
                  - type
                  - title
                  - status
                  - detail
                  - instance
          headers: {}
          x-apidog-name: Service Unavailable
      security: []
      x-apidog-folder: API Metody/Customer
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/796227/apis/api-13465901-run
components:
  schemas:
    AcceptLanguageSchema:
      type: string
      description: Accept-Language header schema
      x-apidog-folder: ''
    XCorrelationIdSchema:
      type: string
      description: X-Correlation-ID header schema
      x-apidog-folder: ''
    XLogLevelSchema:
      enum:
        - Trace
        - Debug
        - Information
        - Warning
        - Error
        - Critical
      type: string
      description: X-LogLevel header schema
      x-apidog-folder: ''
    Eps.Api.MyApi2.Web.Models.Customer.AddressModel:
      type: object
      properties:
        code:
          type: string
          description: Address type code
          nullable: true
        name:
          type: string
          description: Name
          nullable: true
        name2:
          type: string
          description: Name2
          nullable: true
        street:
          type: string
          description: Street
          nullable: true
        city:
          type: string
          description: City
          nullable: true
        zipCode:
          type: string
          description: Zip code
          nullable: true
        country:
          type: string
          description: Country code
          nullable: true
        default:
          type: boolean
          description: Default address
      additionalProperties: false
      description: Customer address model
      x-apidog-orders:
        - code
        - name
        - name2
        - street
        - city
        - zipCode
        - country
        - default
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Eps.Api.Infrastructure.WebApi.Model.ProblemJsonModel:
      type: object
      properties:
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          x-apidog-orders: []
          properties: {}
          x-apidog-ignore-properties: []
          nullable: true
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties:
        type: string
      x-apidog-orders:
        - errors
        - type
        - title
        - status
        - detail
        - instance
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    oauth2:
      type: apikey
      description: Get access token from authentication server.
      name: Authorization
      in: header
    Bearer:
      type: jwt
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      scheme: bearer
      bearerFormat: JWT
servers: []
security: []

```
