Make text wrap

Make text wrap

#%RAML 1.0
---
title: Pickup Point API
baseUri: https://api.bring.com/pickuppoint/api/pickuppoint

documentation:
- title: Introduction
  content: |
      The Pickup point API provides a list of locations for package pickup. Based on a specified postal code or a geographical location, the 10 nearest pickup points are returned, sorted by driving time by car(source: Google). In instances where google is unable to retrieve driving times from a location to a pickup point(e.g. location on mainland and pickup point on an island), these pickup points will be sorted by aerial distance and placed last in the list. Response is available as either XML or JSON.

      A pickup point is defined as any location delivering shipments on behalf of Bring and Posten, such as post offices, selected grocery stores, lockers, etc.

      It is important to note, there are two sets of addresses in the response, postbox (address, postalCode) and visiting address (visitingAddress, visitingPostalCode). Postbox address is required to get a package produced correctly, use this AS RECIPIENT address on label. Visiting address is more appropriate for user interface (Street address of the PIB).

      ### Filtering results

      In addition to postal code or location, one or more optional parameters can be added to the request, adding additional restrictions to the pickup points being returned. One such parameter is `searchForText=<texts>`, resulting in a response where all pickup points have at least a partial match with the search string given in `<texts>`. This can be the name of the pickup point, its address, city, county, municipality or location. Go to the reference table or see additional examples for more information.

      #### Distinct PickupPointType

      Norway :
        - Type 4  : Post i Butikk
        - Type 19 : Posten pakkeutlevering
        - Type 21 : Postkontor
        - Type 27 : Pakkeautomat
        - Type 32 : Postpunkt, egendrevet
        - Type 33 : Postpunkt
        - Type 37 : Pakkeboks

      Sweden :
        - Type 34 : Manned

      Denmark :
        - Type 85 : Manned
        - Type 86 : Locker

      Finland :
        - Type SmartPOST  : Finland Smart Post Pickup
        - Type Posti      : Finland Posti Pickup Point
        - Type Noutopiste : Finland Pickup Point
        - Type LOCKER     : Finland Locker Pickup Point

- title: Authentication
  content: |
      To make API requests, you will need an API key from Mybring. Steps for getting a key and description of headers can be found on the general API [Getting Started / Authentication](/api/#authentication) page.

/{countryCode}/postalCode/{postalCode}{mediaTypeExtension}:
  displayName: Pickup points for postal code
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO", "DK", "SE", "FI" ]
    postalCode:
      displayName: Postal code
      type: string
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json, .xml to get application/xml or .html to get HTML.
  get:
    description: List pickup points for postal code
    queryParameters:
      searchForText:
        displayName: Text filter
        type: string
      openingHoursSearchType:
        displayName: Filter using opening hours
        enum: [ ALL_WEEKDAYS, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY ]
      openOnOrBefore:
        description: Format `HHmm`. Return only pickup points that are open on or before the specified time.
        type: string
        pattern: ^([01][0-9]|2[0-3])[0-5][0-9]$
      openOnOrAfter:
        description: Format `HHmm`. Return only pickup points that are open on or after the specified time.
        type: string
        pattern: ^([01][0-9]|2[0-3])[0-5][0-9]$
      pickupPointType:
        displayName: Pickup-point type
        description: Currently available for Swedish, Finnish and Danish pickup point request only.
        enum: [ manned, locker ]
      numberOfResponses:
        description: Return the specified number of pickup points instead of the default. Try this param to get more pickup points, if a desired pickup point is missing in the response.
        type: integer
        default: 10
      street:
        description: Searches for the nearest pickup points to the given street. Use this param to get more accurate result.
        type: string
      streetNumber:
        description: Searches for the nearest pickup points to the given street number.Use this param to get more accurate result.
        type: string
      callback:
        description: JSONP callback function name.
        type: string
      requestCountryCode:
        description: Country code of the requester. Only applicable for Norwegian pickup points.
        type: string
    responses:
      200:
        displayName: Example response for NO/postalCode/1407
        body:
          application/json:
            examples:
              successful:
                displayName: Response for NO/postalCode/1407
                value: !include examples/by_postal_code.json
              code_street:
                displayName: Postal code and street address
                value: !include examples/filter_address.json
                description: |
                  Sometimes (especially in Denmark) it's a good idea to also specify the address when searching for pickup points, to get more accurate results.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/DK/postalCode/2000.json?street=Smallegade&streetNumber=3), we look for pickup points in Smallegade 3 and postal code 2000.
              specific_string:
                displayName: Pickup points containing a specific string
                value: !include examples/filter_search.json
                description: |
                  If you want to return only the pickup points matching a specific string, you may use the `searchForText` query param. The given text can be the name of the pickup point, its address, city, county, municipality or location. Partial matches are also allowed.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?searchForText=KIWI), we look for pickup points near NO/1407 cotaining "Kiwi".
              specific_days:
                displayName: Pickup points open on specific days
                value: !include examples/filter_days.json
                description: |
                  If you want to return only the pickup points open on specified days, you may use the `openingHoursSearchType=<day>` query param. `<day>` be:

                  - `ALL_WEEKDAYS` (default)
                  - `MONDAY`
                  - `TUESDAY`
                  - `WEDNESDAY`
                  - `THURSDAY`
                  - `FRIDAY`
                  - `SATURDAY`
                  - `SUNDAY`

                  If you want you can also add `openOnOrBefore` and / or `openOnOrAfter`, to limit the search even more.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?openingHoursSearchType=SUNDAY), we look for pickup points near NO/1407 that are open Sundays.
              specific_hours:
                displayName: Pickup points open at specific hours
                value: !include examples/filter_hours.json
                description: |
                  If you want to return only the pickup points open on specific hours, you may use the `openOnOrBefore=<time>` and/or `openOnOrAfter=<time>` query params.

                  The format of `<time>` is `HHmm`.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?openOnOrBefore=0800), we look for pickup points near NO/1407 open on or before 08:00.
          application/xml:
            examples:
              successful:
                displayName: Response for NO/postalCode/1407
                value: !include examples/by_postal_code.xml
              code_street:
                displayName: Postal code and street address
                value: !include examples/filter_address.xml
                description: |
                  Sometimes (especially in Denmark) it's a good idea to also specify the address when searching for pickup points, to get more accurate results.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/DK/postalCode/2000.json?street=Smallegade&streetNumber=3), we look for pickup points in Smallegade 3 and postal code 2000.
              specific_string:
                displayName: Pickup points containing a specific string
                value: !include examples/filter_search.xml
                description: |
                  If you want to return only the pickup points matching a specific string, you may use the `searchForText` query param. The given text can be the name of the pickup point, its address, city, county, municipality or location. Partial matches are also allowed.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?searchForText=KIWI), we look for pickup points near NO/1407 cotaining "Kiwi".
              specific_days:
                displayName: Pickup points open on specific days
                value: !include examples/filter_days.xml
                description: |
                  If you want to return only the pickup points open on specified days, you may use the `openingHoursSearchType=<day>` query param. `<day>` be:

                  - `ALL_WEEKDAYS` (default)
                  - `MONDAY`
                  - `TUESDAY`
                  - `WEDNESDAY`
                  - `THURSDAY`
                  - `FRIDAY`
                  - `SATURDAY`
                  - `SUNDAY`

                  If you want you can also add `openOnOrBefore` and / or `openOnOrAfter`, to limit the search even more.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?openingHoursSearchType=SUNDAY), we look for pickup points near NO/1407 that are open Sundays.
              specific_hours:
                displayName: Pickup points open at specific hours
                value: !include examples/filter_hours.xml
                description: |
                  If you want to return only the pickup points open on specific hours, you may use the `openOnOrBefore=<time>` and/or `openOnOrAfter=<time>` query params.

                  The format of `<time>` is `HHmm`.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?openOnOrBefore=0800), we look for pickup points near NO/1407 open on or before 08:00.

/{countryCode}/location/{latitude},{longitude}{mediaTypeExtension}:
  displayName: Pickup points for location
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO", "DK", "SE", "FI" ]
    latitude:
      displayName: Latitude
      description: Geographic coordinate specifying the north-south position.
      type: string
    longitude:
      displayName: Longitude
      description: Geographic coordinate specifying the east-west position.
      type: string
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json or .xml to get application/xml.
  get:
    description: List pickup points closest to location
    queryParameters:
      searchForText:
        displayName: Text filter
        type: string
      openingHoursSearchType:
        displayName: Filter using opening hours
        enum: [ ALL_WEEKDAYS, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY ]
      openOnOrBefore:
        description: Format `HHmm`. Return only pickup points that are open on or before the specified time.
        type: string
        pattern: ^([01][0-9]|2[0-3])[0-5][0-9]$
      openOnOrAfter:
        description: Format `HHmm`. Return only pickup points that are open on or after the specified time.
        type: string
        pattern: ^([01][0-9]|2[0-3])[0-5][0-9]$
      pickupPointType:
        displayName: Pickup-point type
        description: Currently available for Swedish, Finnish and Danish pickup point request only.
        enum: [ manned, locker ]
      numberOfResponses:
        description: Return the specified number of pickup points instead of the default.
        type: integer
        default: 10
      street:
        description: Searches for the nearest pickup points to the given street.
        type: string
      streetNumber:
        description: Searches for the nearest pickup points to the given street number.
        type: string
      callback:
        description: JSONP callback function name.
        type: string
      requestCountryCode:
        description: Country code of the requester. Only applicable for Norwegian pickup points.
        type: string
    responses:
      200:
        displayName: Example response for location/60.395226,5.321725
        body:
          application/json:
            examples:
              successful:
                displayName: Response for location/60.395226,5.321725
                value: !include examples/by_coordinates.json
          application/xml:
            examples:
              successful:
                displayName: Response for location/60.395226,5.321725
                value: !include examples/by_coordinates.xml

/{countryCode}/id/{id}{mediaTypeExtension}:
  displayName: A specific pickup point
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO", DK, SE, FI ]
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json or .xml to get application/xml.
  get:
    description: Look up a specific pickup point
    queryParameters:
      callback:
        displayName: JSONP support
        description: Callback function name.
        type: string
      requestCountryCode:
        description: Country code of the requester. Only applicable for Norwegian pickup points.
        type: string
    responses:
      200:
        displayName: Example response for id/121110
        body:
          application/json:
            examples:
              successful:
                displayName: Response for id/121110
                value: !include examples/by_id.json
          application/xml:
            examples:
              successful:
                displayName: Response for id/121110
                value: !include examples/by_id.xml

/{countryCode}/all{mediaTypeExtension}:
  displayName: All pickup points in a country
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO", DK, SE, FI ]
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json or .xml to get application/xml.
  get:
    description: All pickup points in a country
    queryParameters:
      callback:
        displayName: JSONP support
        description: Callback function name.
        type: string
      requestCountryCode:
        description: Country code of the requester. Only applicable for Norwegian pickup points.
        type: string

/{countryCode}/postalCode/{postalCode}/default/{mediaTypeExtension}:
  displayName: Default pickup point(s) for a postal code
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO" ]
    postalCode:
      displayName: Postal code
      type: string
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json or .xml to get application/xml.
  get:
    description: List default pickup point(s) for a postal code
    responses:
      200:
        displayName: Example response for postal code 1481
        body:
          application/json:
            examples:
              successful:
                displayName: Response for postal code 1481
                value: !include examples/default_pickup_point_by_postal_code.json
          application/xml:
            examples:
              successful:
                displayName: Response for postal code 1481
                value: !include examples/default_pickup_point_by_postal_code.xml

#%RAML 1.0
---
title: Pickup Point API
baseUri: https://api.bring.com/pickuppoint/api/pickuppoint

documentation:
- title: Introduction
  content: |
      The Pickup point API provides a list of locations for package pickup. Based on a specified postal code or a geographical location, the 10 nearest pickup points are returned, sorted by driving time by car(source: Google). In instances where google is unable to retrieve driving times from a location to a pickup point(e.g. location on mainland and pickup point on an island), these pickup points will be sorted by aerial distance and placed last in the list. Response is available as either XML or JSON.

      A pickup point is defined as any location delivering shipments on behalf of Bring and Posten, such as post offices, selected grocery stores, lockers, etc.

      It is important to note, there are two sets of addresses in the response, postbox(address, postalCode) and visiting address(visitingAddress,visitingPostalCode).Postbox address is required to get a package produced correctly, use this AS RECIPIENT address on label. Visiting address is more appropriate for user interface (Street address of the PIB).

      ### Filtering results

      In addition to postal code or location, one or more optional parameters can be added to the request, adding additional restrictions to the pickup points being returned. One such parameter is `searchForText=<texts>`, resulting in a response where all pickup points have at least a partial match with the search string given in `<texts>`. This can be the name of the pickup point, its address, city, county, municipality or location. Go to the reference table or see additional examples for more information.

      #### Distinct PickupPointType

      Norway :
        - Type 4  : Post i Butikk
        - Type 19 : Posten pakkeutlevering
        - Type 21 : Postkontor
        - Type 27 : Pakkeautomat
        - Type 32 : Postpunkt, egendrevet
        - Type 33 : Postpunkt
        - Type 37 : Pakkeboks

      Sweden :
        - Type 34 : Manned

      Denmark :
        - Type 85 : Manned
        - Type 86 : Locker

      Finland :
        - Type SmartPOST  : Finland Smart Post Pickup
        - Type Posti      : Finland Posti Pickup Point
        - Type Noutopiste : Finland Pickup Point
        - Type LOCKER     : Finland Locker Pickup Point

- title: Authentication
  content: |
      To make API requests, you will need an API key from Mybring. Steps for getting a key and description of headers can be found on the general API [Getting Started / Authentication](/api/#authentication) page.

/{countryCode}/postalCode/{postalCode}{mediaTypeExtension}:
  displayName: Pickup points for postal code
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO", "DK", "SE", "FI" ]
    postalCode:
      displayName: Postal code
      type: string
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json, .xml to get application/xml or .html to get HTML.
  get:
    description: List pickup points for postal code
    queryParameters:
      searchForText:
        displayName: Text filter
        type: string
      openingHoursSearchType:
        displayName: Filter using opening hours
        enum: [ ALL_WEEKDAYS, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY ]
      openOnOrBefore:
        description: Format `HHmm`. Return only pickup points that are open on or before the specified time.
        type: string
        pattern: ^([01][0-9]|2[0-3])[0-5][0-9]$
      openOnOrAfter:
        description: Format `HHmm`. Return only pickup points that are open on or after the specified time.
        type: string
        pattern: ^([01][0-9]|2[0-3])[0-5][0-9]$
      pickupPointType:
        displayName: Pickup-point type
        description: Currently available for Swedish, Finnish and Danish pickup point request only.
        enum: [ manned, locker ]
      numberOfResponses:
        description: Return the specified number of pickup points instead of the default. Try this param to get more pickup points, if a desired pickup point is missing in the response.
        type: integer
        default: 10
      street:
        description: Searches for the nearest pickup points to the given street. Use this param to get more accurate result.
        type: string
      streetNumber:
        description: Searches for the nearest pickup points to the given street number.Use this param to get more accurate result.
        type: string
      callback:
        description: JSONP callback function name.
        type: string
      requestCountryCode:
        description: Country code of the requester. Only applicable for Norwegian pickup points.
        type: string
    responses:
      200:
        displayName: Example response for NO/postalCode/1407
        body:
          application/json:
            examples:
              successful:
                displayName: Response for NO/postalCode/1407
                value: !include examples/by_postal_code.json
              code_street:
                displayName: Postal code and street address
                value: !include examples/filter_address.json
                description: |
                  Sometimes (especially in Denmark) it's a good idea to also specify the address when searching for pickup points, to get more accurate results.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/DK/postalCode/2000.json?street=Smallegade&streetNumber=3), we look for pickup points in Smallegade 3 and postal code 2000.
              specific_string:
                displayName: Pickup points containing a specific string
                value: !include examples/filter_search.json
                description: |
                  If you want to return only the pickup points matching a specific string, you may use the `searchForText` query param. The given text can be the name of the pickup point, its address, city, county, municipality or location. Partial matches are also allowed.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?searchForText=KIWI), we look for pickup points near NO/1407 cotaining "Kiwi".
              specific_days:
                displayName: Pickup points open on specific days
                value: !include examples/filter_days.json
                description: |
                  If you want to return only the pickup points open on specified days, you may use the `openingHoursSearchType=<day>` query param. `<day>` be:

                  - `ALL_WEEKDAYS` (default)
                  - `MONDAY`
                  - `TUESDAY`
                  - `WEDNESDAY`
                  - `THURSDAY`
                  - `FRIDAY`
                  - `SATURDAY`
                  - `SUNDAY`

                  If you want you can also add `openOnOrBefore` and / or `openOnOrAfter`, to limit the search even more.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?openingHoursSearchType=SUNDAY), we look for pickup points near NO/1407 that are open Sundays.
              specific_hours:
                displayName: Pickup points open at specific hours
                value: !include examples/filter_hours.json
                description: |
                  If you want to return only the pickup points open on specific hours, you may use the `openOnOrBefore=<time>` and/or `openOnOrAfter=<time>` query params.

                  The format of `<time>` is `HHmm`.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?openOnOrBefore=0800), we look for pickup points near NO/1407 open on or before 08:00.
          application/xml:
            examples:
              successful:
                displayName: Response for NO/postalCode/1407
                value: !include examples/by_postal_code.xml
              code_street:
                displayName: Postal code and street address
                value: !include examples/filter_address.xml
                description: |
                  Sometimes (especially in Denmark) it's a good idea to also specify the address when searching for pickup points, to get more accurate results.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/DK/postalCode/2000.json?street=Smallegade&streetNumber=3), we look for pickup points in Smallegade 3 and postal code 2000.
              specific_string:
                displayName: Pickup points containing a specific string
                value: !include examples/filter_search.xml
                description: |
                  If you want to return only the pickup points matching a specific string, you may use the `searchForText` query param. The given text can be the name of the pickup point, its address, city, county, municipality or location. Partial matches are also allowed.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?searchForText=KIWI), we look for pickup points near NO/1407 cotaining "Kiwi".
              specific_days:
                displayName: Pickup points open on specific days
                value: !include examples/filter_days.xml
                description: |
                  If you want to return only the pickup points open on specified days, you may use the `openingHoursSearchType=<day>` query param. `<day>` be:

                  - `ALL_WEEKDAYS` (default)
                  - `MONDAY`
                  - `TUESDAY`
                  - `WEDNESDAY`
                  - `THURSDAY`
                  - `FRIDAY`
                  - `SATURDAY`
                  - `SUNDAY`

                  If you want you can also add `openOnOrBefore` and / or `openOnOrAfter`, to limit the search even more.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?openingHoursSearchType=SUNDAY), we look for pickup points near NO/1407 that are open Sundays.
              specific_hours:
                displayName: Pickup points open at specific hours
                value: !include examples/filter_hours.xml
                description: |
                  If you want to return only the pickup points open on specific hours, you may use the `openOnOrBefore=<time>` and/or `openOnOrAfter=<time>` query params.

                  The format of `<time>` is `HHmm`.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?openOnOrBefore=0800), we look for pickup points near NO/1407 open on or before 08:00.

/{countryCode}/location/{latitude},{longitude}{mediaTypeExtension}:
  displayName: Pickup points for location
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO", "DK", "SE", "FI" ]
    latitude:
      displayName: Latitude
      description: Geographic coordinate specifying the north-south position.
      type: string
    longitude:
      displayName: Longitude
      description: Geographic coordinate specifying the east-west position.
      type: string
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json or .xml to get application/xml.
  get:
    description: List pickup points closest to location
    queryParameters:
      searchForText:
        displayName: Text filter
        type: string
      openingHoursSearchType:
        displayName: Filter using opening hours
        enum: [ ALL_WEEKDAYS, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY ]
      openOnOrBefore:
        description: Format `HHmm`. Return only pickup points that are open on or before the specified time.
        type: string
        pattern: ^([01][0-9]|2[0-3])[0-5][0-9]$
      openOnOrAfter:
        description: Format `HHmm`. Return only pickup points that are open on or after the specified time.
        type: string
        pattern: ^([01][0-9]|2[0-3])[0-5][0-9]$
      pickupPointType:
        displayName: Pickup-point type
        description: Currently available for Swedish, Finnish and Danish pickup point request only.
        enum: [ manned, locker ]
      numberOfResponses:
        description: Return the specified number of pickup points instead of the default.
        type: integer
        default: 10
      street:
        description: Searches for the nearest pickup points to the given street.
        type: string
      streetNumber:
        description: Searches for the nearest pickup points to the given street number.
        type: string
      callback:
        description: JSONP callback function name.
        type: string
      requestCountryCode:
        description: Country code of the requester. Only applicable for Norwegian pickup points.
        type: string
    responses:
      200:
        displayName: Example response for location/60.395226,5.321725
        body:
          application/json:
            examples:
              successful:
                displayName: Response for location/60.395226,5.321725
                value: !include examples/by_coordinates.json
          application/xml:
            examples:
              successful:
                displayName: Response for location/60.395226,5.321725
                value: !include examples/by_coordinates.xml

/{countryCode}/id/{id}{mediaTypeExtension}:
  displayName: A specific pickup point
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO", DK, SE, FI ]
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json or .xml to get application/xml.
  get:
    description: Look up a specific pickup point
    queryParameters:
      callback:
        displayName: JSONP support
        description: Callback function name.
        type: string
      requestCountryCode:
        description: Country code of the requester. Only applicable for Norwegian pickup points.
        type: string
    responses:
      200:
        displayName: Example response for id/121110
        body:
          application/json:
            examples:
              successful:
                displayName: Response for id/121110
                value: !include examples/by_id.json
          application/xml:
            examples:
              successful:
                displayName: Response for id/121110
                value: !include examples/by_id.xml

/{countryCode}/all{mediaTypeExtension}:
  displayName: All pickup points in a country
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO", DK, SE, FI ]
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json or .xml to get application/xml.
  get:
    description: All pickup points in a country
    queryParameters:
      callback:
        displayName: JSONP support
        description: Callback function name.
        type: string
      requestCountryCode:
        description: Country code of the requester. Only applicable for Norwegian pickup points.
        type: string

/{countryCode}/postalCode/{postalCode}/default/{mediaTypeExtension}:
  displayName: Default pickup point(s) for a postal code
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO" ]
    postalCode:
      displayName: Postal code
      type: string
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json or .xml to get application/xml.
  get:
    description: List default pickup point(s) for a postal code
    responses:
      200:
        displayName: Example response for postal code 1481
        body:
          application/json:
            examples:
              successful:
                displayName: Response for postal code 1481
                value: !include examples/default_pickup_point_by_postal_code.json
          application/xml:
            examples:
              successful:
                displayName: Response for postal code 1481
                value: !include examples/default_pickup_point_by_postal_code.xml


adding query parameterdescription

adding query parameterdescription

#%RAML 0.8
---
title: Easy Return Service API
baseUri: https://api.bring.com/documents/ipc/ers

documentation:
- title: Introduction
  content: |
    The API lets you create labels for parcels returning to cross-border e-retailers.

- title: Authentication
  content: |
    The Easy Return Service API requires authentication for all its endpoints. See the [getting started guide on authentication](/api/#authentication) if you're not sure what this means.

    | Header | Example | Comment |
    |:-------|:--------|:--------|
    | `X-MyBring-API-Uid` | `john.doe@example.com` | Mybring login ID |
    | `X-MyBring-API-Key` | `1234abc-abcd-1234-5678-abcd1234abcd ` | Mybring login's API key |
    | `X-Bring-Client-URL` | `https://example.com/ ` | A URL that sort of identifies where you're using the APIs. |

    Those headers must be set for all endpoints documented below.

/label:
  displayName: Create or list labels
  post:
    description: Create new label
    queryParameters:
        CustomerId:
            description: Customer Number which Bring has provided. It cannot be demo customer number.
            type: string
            required: true
            example: 10000000000
        OrderDate:
            description: The date on which order is booked.
            type: date
            required: true
            example: 22.01.2014 11:36:22
        Sender:
            description: Details of sender. Must have Name, Street, City, CountryCode.
            required: true
        Recipient:
            description: Details of recipient. Must have Name, Street, City, CountryCode.
            required: true
        PackageId:
            description: Must be a valid parcels package ID.
            type: string
            required: true
            example: AB123456789NO
        ShipmentId:
            description: Must be numeric 17 characters (valid Posten / Bring shipment ID)
            type: integer
            required: true
            example: 70508608105602299
        CustomerReference:
            description: Any string a customer can use as reference.
            type: string
            required: false
            example: 123
        ProductCode:
            description: It is always 0341.
            type: integer
            required: true
            example: 0341
        Weight:
            description: Weight of the package.Must be between 0.1 - 20 KG.
            type: integer
            required: true
            example: 10

    body:
      application/xml:
        example: !include examples/request.xml
    responses:
      200:
        body:
          application/xml:
            example: !include examples/response.xml
  get:
    description: List previously created labels
  /{id}:
    displayName: Look up a specific label
    uriParameters:
      id:
        description: Id of the label to retrieve.
        type: string
        required: true
    get:
      description: Get label by ID

#%RAML 0.8
---
title: Easy Return Service API
baseUri: https://api.bring.com/documents/ipc/ers

documentation:
- title: Introduction
  content: |
    The API lets you create labels for parcels returning to cross-border e-retailers.

- title: Authentication
  content: |
    The Easy Return Service API requires authentication for all its endpoints. See the [getting started guide on authentication](/api/#authentication) if you're not sure what this means.

    | Header | Example | Comment |
    |:-------|:--------|:--------|
    | `X-MyBring-API-Uid` | `john.doe@example.com` | Mybring login ID |
    | `X-MyBring-API-Key` | `1234abc-abcd-1234-5678-abcd1234abcd ` | Mybring login's API key |
    | `X-Bring-Client-URL` | `https://example.com/ ` | A URL that sort of identifies where you're using the APIs. |

    Those headers must be set for all endpoints documented below.

/label:
  displayName: Create or list labels
  post:
    description: Create new label
    body:
      application/xml:
        example: !include examples/request.xml
    responses:
      200:
        body:
          application/xml:
            example: !include examples/response.xml
  get:
    description: List previously created labels
  /{id}:
    displayName: Look up a specific label
    uriParameters:
      id:
        description: Id of the label to retrieve.
        type: string
        required: true
    get:
      description: Get label by ID


Return securedBy route setitngs in raml file

#%RAML 0.8
---
title: Example REST API
documentation:
    - title: Home
      content: |
        Welcome to the example API.
baseUri: http://{host}:{port}/{version}
version: v1
mediaType: application/json
protocols: [HTTP, HTTPS]
securitySchemes:
    - x_token_auth:
        description: Authorization header token policy
        type: x-ApiKey
    - x_ticket_auth:
        description: Standard Pyramid Auth Ticket policy
        type: x-Ticket
        settings:
            secret: auth_tkt_secret
            hashalg: sha512
            cookie_name: ramses_auth_tkt
            http_only: 'true'
    - read_only_users:
        description: ACL that allows authenticated users to read collection
        type: x-ACL
        settings:
            collection: |
                allow admin all
                allow authenticated get
            item: |
                allow admin all
                allow authenticated get
    - read_only_useritem_everyone:
        description: ACL that allows everyone to read item, authenticated users to read collection
        type: x-ACL
        settings:
            collection: |
                allow admin all
                allow authenticated get
            item: |
                allow admin all
                allow everyone get
                allow {{user_self}} patch
securedBy: [x_ticket_auth]

/stories:
    securedBy: [read_only_users]
    displayName: All stories
    get:
        description: Get all stories
    post:
        description: Create a new story
        body:
            application/json:
                schema: !include schemas/story.json
    patch:
        description: Update multiple stories
    delete:
        description: delete multiple stories

    /{id}:
        displayName: One story
        get:
            description: Get a particular story
        delete:
            description: Delete a particular story
        patch:
            description: Update a particular story

/users:
    securedBy: [read_only_useritem_everyone]
    displayName: All users
    get:
        description: Get all users
    post:
        description: Create a new user
        body:
            application/json:
                schema: !include schemas/user.json

    /{username}:
        displayName: One user
        get:
            description: Get a particular user
        patch:
            description: Update a particular user
        delete:
            description: Delete a particular user

        /settings:
            displayName: User settings
            get:
                description: Get all settings of a particular user
            post:
                description: Change a user's settings

        /groups:
            displayName: User groups
            get:
                description: Get all groups of a particular user
            post:
                description: Change a user's groups

        /profile:
            displayName: User profile
            get:
                description: Get a user's profile
            post:
                description: Create a user's profile
                body:
                    application/json:
                        schema: !include schemas/profile.json
            patch:
                description: Update a user's profile

#%RAML 0.8
---
title: Example REST API
documentation:
    - title: Home
      content: |
        Welcome to the example API.
baseUri: http://{host}:{port}/{version}
version: v1
mediaType: application/json
protocols: [HTTP, HTTPS]
securitySchemes:
    - x_token_auth:
        description: Authorization header token policy
        type: x-ApiKey
    - x_ticket_auth:
        description: Standard Pyramid Auth Ticket policy
        type: x-Ticket
        settings:
            secret: auth_tkt_secret
            hashalg: sha512
            cookie_name: ramses_auth_tkt
            http_only: 'true'
    - read_only_users:
        description: ACL that allows authenticated users to read collection
        type: x-ACL
        settings:
            collection: |
                allow admin all
                allow authenticated get
            item: |
                allow admin all
                allow authenticated get
    - read_only_useritem_everyone:
        description: ACL that allows everyone to read item, authenticated users to read collection
        type: x-ACL
        settings:
            collection: |
                allow admin all
                allow authenticated get
            item: |
                allow admin all
                allow everyone get
                allow {{user_self}} patch
securedBy: [x_ticket_auth]

/stories:
    displayName: All stories
    get:
        description: Get all stories
    post:
        description: Create a new story
        body:
            application/json:
                schema: !include schemas/story.json
    patch:
        description: Update multiple stories
    delete:
        description: delete multiple stories

    /{id}:
        displayName: One story
        get:
            description: Get a particular story
        delete:
            description: Delete a particular story
        patch:
            description: Update a particular story

/users:
    displayName: All users
    get:
        description: Get all users
    post:
        description: Create a new user
        body:
            application/json:
                schema: !include schemas/user.json

    /{username}:
        displayName: One user
        get:
            description: Get a particular user
        patch:
            description: Update a particular user
        delete:
            description: Delete a particular user

        /settings:
            displayName: User settings
            get:
                description: Get all settings of a particular user
            post:
                description: Change a user's settings

        /groups:
            displayName: User groups
            get:
                description: Get all groups of a particular user
            post:
                description: Change a user's groups

        /profile:
            displayName: User profile
            get:
                description: Get a user's profile
            post:
                description: Create a user's profile
                body:
                    application/json:
                        schema: !include schemas/profile.json
            patch:
                description: Update a user's profile


simplify yaml

simplify yaml

#%RAML 0.8
title: Parameter transformer

resourceTypes:
  - collection:
      post:
        description: <<resourcePathName>> <<resourcePath>> <<resourcePathName | !singularize>> <<resourcePath | !singularize>>
  - item:
      get:
        description: <<resourcePathName>> <<resourcePath>> <<resourcePathName | !pluralize>> <<resourcePath | !pluralize>>

/songs:
  type: collection

/song:
  type: item

#%RAML 0.8
title: Parameter transformer

resourceTypes:
  - collection:
      post:
        description: <<resourcePathName>> <<resourcePath>> <<resourcePathName | !singularize>> <<resourcePath | !singularize>>
  - item:
      get:
        description: <<resourcePathName>> <<resourcePath>> <<resourcePathName | !pluralize>> <<resourcePath | !pluralize>>

/songs:
  type: { collection: {} }

/song:
  type: { item: {} }