Update XPath examples for offline shipping guide

#%RAML 0.8
---
title: Shipping Guide API
baseUri: https://api.bring.com/shippingguide

documentation:
- title: Introduction
  content: |

            Decommission deadline for Shipping guide API- 01.11.2018

            Legacy API versions 1, 2 and 7 will be decommissioned and will not be available for public usage from 1st November 2018.

        Important message:

        We are excited to introduce Shipping Guide API 2.0 - a new and improved version of our Shipping Guide API🎊🎉. The latest version is packed with powerful capabilities and a simplified, structured request and response model, making it easier to provide both you and your end customers with different shipping alternatives.
        Please refer to Shipping Guide API 2.0 for more information.

        NOTE: The latest version will gradually replace existing versions of the Shipping Guide API, and versions 3, 4, 5, 6 and 10 have already been phased out. We are of course giving all users enough time to make the switch before phasing out old versions.

      The Shipping Guide (Fraktguiden) is a free service from Bring that provides

      * price information,
      * service area (norwegian: dekningsområde), and
      * estimated delivery times.

      With the Shipping Guide it is easy to offer different shipping alternatives to your end customers. Whether they want to

      * get delivery to the door (daytime or evening),
      * pick up the shipment at a post office, or
      * get the shipment delivered to the mailbox

      The Shipping Guide returns the recommended way to present these shipping alternatives, as well as prices and delivery times.

      [Demo shipping alternatives](/shipping-guide/demo).

      The demo shows that the Shipping Guide returns product categories for each request, making a shipping alternatives-page easy to set up. The focus is on delivery methods to the end customer, not product names.

      The Shipping Guide has several interfaces (SOAP and XML/JSON). Choose the option that fits your needs best (see table below). The SOAP interface is the core interface with complete functionality. There are some limitations in the XML/JSON API, such as the inability to mark a parcel as a specialized goods.

      There is also a [Offline SOAP service](#offline-data) for retrieving data for offline use (get complete prices, service area and delivery times based on a fixed sender postal code).

      *Psst!* We also have a [Java client library](https://github.com/bring/bring-api-java) for the Shipping Guide API.

- title: Available Products
  content: |
    The Shipping Guide API has a lot of various products and additional services. So many, in fact, that we decided to document them in a separate page.

    [See the whole list of products and additional services here.](/api/products/#shipping-guide)

- title: General Guidelines
  content: |
      ### VAT

      Shipping Guide specifies VAT related to senders country. It's up to the client to decide if VAT is applicable to their situation of sale.

      ### Additional services affecting price

      Make sure you specify the correct additional services for a package when querying the Shipping Guide.

      Especially the `evarsling` additional service for the Servicepakke product (recipient notification over SMS or E-Mail) will affect the base package price returned from the Shipping Guide, and should therefore be set according to what will be sent in the actual EDI message.

      If `evarsling` is not specified in the request, Fraktguiden will from 2013-01-01 add a fee for paper based recipient notification to the base package price for Servicepakke. As of 2013-01-01 the fee is NOK 4,-

- title: Error Handling Guidelines
  content: |
      When using the Shipping Guide, it is important to handle errors gracefully. Your web shop's users should still be able to order, even if the Shipping Guide returns an error or a timeout occurs.

      ### No products applicable

      If there are no products applicable for the requested shipment, an empty resultset will be returned. This means that for the passed-in product list, no products can be used for the shipment. Either the shipment is too large or is outside of the coverage area of all the requested products. Your code should handle this case, i.e. an empty product list for the shipment.

      One suggestion is to include more products in each request, e.g. a Cargo-product to handle large shipments. You should know how to send Cargo products before including it though.

      ### General errors

      When using the Shipping Guide, errors or service unavailability can occur, although we do our utmost to prevent any downtime. Thus it is important to use timeouts and other error handling techniques when making requests to the service.

      How you handle errors depends on the nature of your application, but one strategy for handling such situations is by providing a failover if the shipping guide responds with an error or does not respond at all (timeout).

      For instance your application can respond to an error by using prefetched [offline data](#offline-data) to calculate prices and delivery time estimates. Another alternative would be to use a a fixed standard price whenever an error occurs.

      ### Error codes for rejected requests

      | Code | Message in English | Message in Norwegian |
      |:-----|:-------------------|:---------------------|
      | FG_INPUT_001 | Shipping date must be set | Innleveringsdato må være satt |
      | FG_INPUT_002 | Error with Postal code | Feil i postnummer |
      | FG_INPUT_003 | Missing UserInformation element in request | Mangler UserInformation element i request. |
      | FG_INPUT_004 | At least one product id must be set | Minst et produkt må være valgt |
      | FG_INPUT_005 | Wrong date format | Feil i datoformat |
      | FG_INPUT_006 | Error with volume | Feil med volum |
      | FG_INPUT_008 | Missing Package element | Mangler Package element |
      | FG_INPUT_010 | Error number of alternative deliverydates | Feil antall alternative leveringsdager |
      | FG_INPUT_011 | Wrong weight unit code | Feil vektkode |
      | FG_INPUT_012 | Invalid weight format | Feil vekt format |
      | FG_INPUT_013 | Invalid volume format | Feil volum format |
      | FG_INPUT_014 | Invalid volume unit code | Feil volumkode |
      | FG_INPUT_016 | Invalid input dimensions | Feil med dimensjoner |
      | FG_INPUT_017 | Invalid input dimensions unit code | Feil dimensjonskode |
      | FG_INPUT_018 | Too many packages | For mange pakker |
      | FG_INPUT_019 | Product id missing | Produkt id mangler |
      | FG_INPUT_020 | Invalid offline from post number | Feil offline fra postnummer |
      | FG_INPUT_021 | Non existing postalcode | Postnummer eksisterer ikke |
      | FG_INPUT_022 | Missing weight or volume | Mangler vekt eller volum |
      | FG_INPUT_023 | Unexpected parameter | Ikke gyldig parameter |
      | FG_INPUT_024 | Invalid input price adjustment | Feil input til prisjustering |
      | FG_INPUT_025 | Unknown public id | Feil public id |
      | FG_INPUT_027 | Invalid country code | Feil landkode |
      | FG_INPUT_029 | Wrong time format | Feil tidsformat |
      | FG_INPUT_030 | Invalid request version | Ugyldig request versjon |
      | FG_INPUT_031 | Request version missing | Request versjon mangler |
      | FG_INPUT_032 | Mismatch in value in package and consignment. | Mismatch i verdi i pakke i forhold til sending. |
      | FG_INPUT_033 | A consignment element must be specified when requesting a consignment-oriented product. | Det må spesifiseres et consignment-element når det bes om et sendingsorientert produkt. |
      | FG_INPUT_034 | Error with City | Feil i city |
      | FG_INPUT_035 | Shipping date must be current date or in the future when net prices are requested. | Avtalepriser støtter ikke shipping date tilbake i tid. |
      | FG_INPUT_036 | Schema version 8 and newer does no longer support user code. Use Client URL instead. See XSD Schema documentation. | Schema versjon 8 og nyere støtter ikke lenger user code. Bruk heller Client URL. Sjekk XSD Schema dokumentasjon. |
      | FG_INPUT_037 | Schema version 8 and newer requires Client URL element set. See XSD Schema documentation. | Schema versjon 8 og nyere krever Client URL element set. Sjekk XSD Schema dokumentasjon. |
      | FG_INPUT_038 | Schema version 8 and newer requires that the api.bring.com/shippingguide endpoint is used. Check out developer.bring.com | Schema versjon 8 og nyere krever at api.bring.com/shippingguide endpoint benyttes. Se developer.bring.com. |
      | FG_INPUT_039 | Endpoint at api.bring.com/shippingguide requires that schema version 8 or newer is used. Check out developer.bring.com | Endpoint på api.bring.com/shippingguide krever at schema version 8 eller nyere benyttes. Se developer.bring.com. |
      | FG_INPUT_040 | Invalid UNNumber format. UNNumber must be a four digit string. Ex: 0030 | Feil UNNumber format. UNNumber skal være en fire sifret streng. Eks: 0030 |
      | FG_INPUT_041 | Oil express product requires a customer number set on the product element, because only contract prices are available. | Oljeekspressproduktet krever et kundenummer. Kun avtalepris tilgjengelig. |
      | FG_INPUT_042 | Could not parse the input string to Betaler. | Kunne ikke analysere strengen til påvirker betaler. |
      | FG_INPUT_043 | Invalid combination of additional services. | Ugyldig kombinasjon av tilleggstjenester. |
      | FG_INPUT_044 | Missing Consignment Request element. | Mangler Consignment Request element. |
      | FG_PRODUCT_001 | Product unknown | Produkt ukjent |
      | FG_PRODUCT_002 | Product not available as offline data. | Produkt ikke tilgjengelig i offline data-format. |
      | FG_PRODUCT_003 | Outside of coverage area for product. | Utenfor dekningsområde for produkt. |
      | FG_UNKNOWN_001 | Unknown internal error | Ukjent intern feil |
      | FG_USER_002 | Wrong usercode | Feil identifiakasjonsstreng |
      | FG_USER_007 | Customer number specified, but user is not logged in. Please set the mybring authentication headers. | Kundenummer angitt, men bruker er ikke innlogget. Vennligst sett mybring autentiseringsheadere. |
      | FG_USER_008 | Logged-in user does not have access to specified customer | Pålogget bruker har ikke tilgang spesifisert kunde |
      | FG_USER_009 | Customer number is not applicable for specified produkt | Kundenummer er ikke gyldig for spesifisert produktkode |
      | FG_USER_010 | Customer not found for super user. | Kunde ikke funnet for superbruker |
      | FG_USER_011 | Customer does not have right access role for service | Kunde har ikke riktig tilgangs rolle for tjenesten |
      | FG_EXTERNAL_SERVICE_NO_PRICE | An external system failed to return the cost for the actual shipping. Please check your input data. | Et eksternt system returnerte ikke pris på selve frakten. Vennligst sjekk input data. |

- title: Offline data
  content: |
    Offline data lets you download a failover version of the data from the Shipping Guide.

    By using the Offline Data Web Service (see [WSDL](#soap)) or [Offline Data form](/shipping-guide/offline) you can download price lists, transport times and additional services designed for offline usage. Offline data is suitable as a failover solution if the Shipping Guide does not respond or responds with an error message, or if there are extreme demands on performance.

    *Important!* With offline data, you have to deal with all the rules of special goods, shipping calculated weight (volume weight), and more. These rules are located on the respective product pages on bring.com. Remember to update the database at price changes!

    The service is available free of charge, provided acceptance of the terms of use. Note that only registered users will receive notifications of changes in service!

    For those who use the offline data, we recommend to get the updates automatically via Offline Data Web Service.

    #### Useful XPaths when processing offline data

    Get Price Zone (returns an empty answer if toPostalCode is outside the coverage area for the chosen product):

        //Product[@productId='SERVICEPAKKE']//PriceZone[@toPostalCode='2000']/text()

    Get Price based on Price Zone "2":

        //Product[@productId="SERVICEPAKKE"]//Price[@priceZone="2" and @weight="4000"]/text()

    Get transport time (older versions):

        //Product[@productId='SERVICEPAKKE']//WorkingDays[@toPostalCode="2000"]/text()

    Get transport time (version 11):

        //Product[@productId='SERVICEPAKKE']//ExpectedDeliveryTime[@toPostalCode="2000"]/WorkingDays/text()

- title: Additional information
  content: |
    If you are a Mybring user, you can [authenticate](/api/#authentication) requests to the Shipping Guide. Authenticated requests have the following benefits:

    - Agreement prices
    - Prices for additional services
    - Lead time
    - Coverage

    Agreement prices are supported for all products except for Mail, Express and Courier Long Distance products. Fixing this is on our todo list, though.

/products/price{mediaTypeExtension}:
  displayName: Get shipment prices
  uriParameters:
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to specify application/json or .xml to specify application/xml
  get:
    description: Get shipment prices
    queryParameters:
      from:
        displayName: From postal code
        type: string
        example: 7600
      to:
        displayName: To postal code
        type: string
        example: 1407
      weightInGrams:
        displayName: Weight of package in grams
        type: integer
        example: 1500
      width:
        displayName: Package width in centimeters
        type: integer
        example: 40
      length:
        displayName: Package length in centimeters
        type: integer
        example: 40
      height:
        displayName: Package height in centimeters
        type: integer
        example: 30
      loadMeters:
        displayName: Package loading meters in meters
        type: double
        example: 1.22
      numberOfPallets:
        displayName: Number of pallets
        type: integer
        example: 10
      NonStackable:
        displayName: Default false. Set to true if you know that pallet would be non-stackable
        type: boolean
        example: true
      date:
        displayName: Shipping date
        description: Specifies which date the parcel will be delivered to Bring (within the time limit), and is used to calculate the delivery date. Date is specified in ISO format, `YYYY-MM-DD`.
        type: date
        example: 2015-11-18
      time:
        displayName: Shipping time
        description: Shipping time may be specified. Note that Bring's courier products are the only one affected by this parameter. Time is specified in ISO format, `HH:mm`.
        type: date
        example: 12:30
      clientUrl:
        displayName: Client URL
        description: To use the Shipping Guide you must specify a client url parameter. The client url should be set to the url of the web shop or application the end user is ordering from. The client url can be sent as a url parameter, clientUrl, or as a header, `X-Bring-Client-URL`.
        type: string
        example: https://www.example.com/amazing-clothes/
      edi:
        displayName: EDI setting
        description: Flag that tells if the parcel will be registred using EDI when it is shipped. Note that this flag may affect price and which products are available.
        type: boolean
        default: true
        enum: [true, false]
      postingAtPostOffice:
        description: |
          Flag that tells whether the parcel is delivered at a post office when it is shipped.

          A surcharge will be applied for the following products:

          * SERVICEPAKKE
          * BPAKKE_DOR-DOR (Bedriftspakke)
        type: boolean
        default: false
        enum: [true, false]
      additional:
        displayName: Additional services
        description: Request additional services for the package. Specified by adding one or more `additional` parameters to the request, e.g. [&additional=postoppkrav&additional=evarsling](https://api.bring.com/shippingguide/products/SERVICEPAKKE/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&date=2009-3-27&additional=postoppkrav&additional=evarsling&additional=lordagsutkjoring). See the [additional services list](/api/products/#additional-services). The Shipping Guide will match the additional service codes to the requested products and ignore product / additional service codes that are not applicable.
        type: string
        example: evarsling
      priceAdjustments:
        description: |
          Adjusts the price (w/o VAT) returned. The format of it is [<product code>_][p(lus)|m(inus)]factor[p(ercentage)]
        type: string
        pattern: ^((\w*_)?(p|m|)\d*(\.\d|)|(\w*_)?(p|m)\d*(\.\d|)p)$
        example: m20p
      pid:
        displayName: Public ID
        description: The last part (after the last dash) of your identification string (logged-in information for user of Shipping Guide). This makes the Shipping Guide know who performs the query, so we may contact the correct shipping guide user for potential follow ups.
        type: string
      product:
        displayName: Products
        description: This parameter lets you specify which products you want to return information about. If you omit this parameter, you get the default product list (not recommended for production usage). Product is specified by adding one or more product parameters, e.g. [product=servicepakke&product=bpakke_dor-dor](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&product=servicepakke&product=bpakke_dor-dor).
        type: string
        example: bpakke_dor-dor
      customerNumber:
        displayName: Customer number
        description: This parameter lets you specify which customer number to use to get [additional information](#additional-information) about the specified product(s). This parameter requires [user authentication](/api/#authentication). If you are authenticated but omit this parameter, shipping guide will try to select an applicable customer number for you. If there is only one applicable customer number, it will automatically be selected, but if there are multiple matches you have to specify which to use by using this parameter.
        type: string
        example: CARGO-123456
      language:
        displayName: Language
        description: Which language the descriptive product texts should have. Supported languages are Swedish (se), Danish (da) and Norwegian (no). If no language is set, or text is not available in the requested language, norwegian text is returned.
        type: string
        default: no
        example: en
      volumeSpecial:
        displayName: Special volume
        description: Flag to indicate if the package has a shape that may require 'special handling fee'. [product=servicepakke&product=bpakke_dor-dor](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&product=servicepakke&product=bpakke_dor-dor&volumeSpecial=true).
        type: boolean
        default: false

    responses:
      200:
        displayName: Successful response
        description: |
          In this example, we're querying for prices for Pickup Parcel and Pickup Parcel Business for a 2,5kg package from Sweden to Denmark.

          Request: [...&fromCountry=SE&from=11640&toCountry=DK&to=1440&product=pickup_parcel&product=business_parcel](https://api.bring.com/shippingguide/products/price.json?clientUrl=https://example.com/&weightInGrams=2500&fromCountry=SE&from=11640&toCountry=DK&to=1440&product=pickup_parcel&product=business_parcel)
        body:
          application/json:
            example: !include examples/price.json
          application/xml:
            example: !include examples/price.xml

/products/expectedDelivery{mediaTypeExtension}:
  displayName: Get estimated delivery time
  uriParameters:
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to specify application/json or .xml to specify application/xml
  get:
    description: Get estimated delivery time
    queryParameters:
      from:
        displayName: From postal code
        type: string
        example: 7600
      to:
        displayName: To postal code
        type: string
        example: 1407
      weightInGrams:
        displayName: Weight of package in grams
        type: integer
        example: 1500
      width:
        displayName: Package width in centimeters
        type: integer
        example: 40
      length:
        displayName: Package length in centimeters
        type: integer
        example: 40
      height:
        displayName: Package height in centimeters
        type: integer
        example: 30
      loadMeters:
        displayName: Package loading meters in meters
        type: double
        example: 1.22
      numberOfPallets:
        displayName: Number of pallets
        type: integer
        example: 10
      date:
        displayName: Shipping date
        description: Specifies which date the parcel will be delivered to Bring (within the time limit), and is used to calculate the delivery date. Date is specified in ISO format, `YYYY-MM-DD`.
        type: date
        example: 2015-11-18
      time:
        displayName: Shipping time
        description: Shipping time may be specified. Note that Bring's courier products are the only one affected by this parameter. Time is specified in ISO format, `HH:mm`.
        type: date
        example: 12:30
      clientUrl:
        displayName: Client URL
        description: To use the Shipping Guide you must specify a client url parameter. The client url should be set to the url of the web shop or application the end user is ordering from. The client url can be sent as a url parameter, clientUrl, or as a header, `X-Bring-Client-URL`.
        type: string
        example: https://www.example.com/amazing-clothes/
      edi:
        displayName: EDI setting
        description: Flag that tells if the parcel will be registred using EDI when it is shipped. Note that this flag may affect price and which products are available.
        type: boolean
        default: true
      postingAtPostOffice:
        description: |
          Flag that tells whether the parcel is delivered at a post office when it is shipped.

          A surcharge will be applied for the following products:

          * SERVICEPAKKE
          * BPAKKE_DOR-DOR (Bedriftspakke)
        type: boolean
        default: false
      additional:
        displayName: Additional services
        description: Request additional services for the package. Specified by adding one or more `additional` parameters to the request, e.g. [&additional=postoppkrav&additional=evarsling](https://api.bring.com/shippingguide/products/SERVICEPAKKE/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&date=2009-3-27&additional=postoppkrav&additional=evarsling&additional=lordagsutkjoring). See the [additional services list](/api/products/#additional-services). The Shipping Guide will match the additional service codes to the requested products and ignore product / additional service codes that are not applicable.
        type: string
        example: evarsling
      priceAdjustments:
        displayName: Price adjustments
        description: |
          Adjusts the price (w/o VAT) returned. The format of it is [<product code>_][p(lus)|m(inus)]factor[p(ercentage)]
        type: string
        pattern: ^((\w*_)?(p|m|)\d*(\.\d|)|(\w*_)?(p|m)\d*(\.\d|)p)$
        example: m20p
      pid:
        displayName: Public ID
        description: The last part (after the last dash) of your identification string (logged-in information for user of Shipping Guide). This makes the Shipping Guide know who performs the query, so we may contact the correct shipping guide user for potential follow ups.
        type: string
      product:
        displayName: Products
        description: This parameter lets you specify which products you want to return information about. If you omit this parameter, you get the default product list (not recommended for production usage). Product is specified by adding one or more product parameters, e.g. [product=servicepakke&product=bpakke_dor-dor](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&product=servicepakke&product=bpakke_dor-dor).
        type: string
        example: bpakke_dor-dor
      language:
        displayName: Language
        description: Which language the descriptive product texts should have. Supported languages are English (en), Swedish (se), Finnish (fi), Danish (da) and Norwegian (no). If no language is set, or text is not available in the requested language, norwegian text is returned.
        type: string
        default: no
        example: en
      volumeSpecial:
        displayName: Special volume
        description: Flag to indicate if the package has a shape that may require 'special handling fee'. [product=servicepakke&product=bpakke_dor-dor](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&product=servicepakke&product=bpakke_dor-dor&volumeSpecial=true).
        type: boolean
        default: false

    responses:
      200:
        displayName: Successful response
        description: |
          In this example, we're querying for expected delivery time for various products for a package from Sweden to Denmark.

          Request: [...fromCountry=SE&from=11640&toCountry=DK&to=1440&product=PICKUP_PARCEL&product=PICKUP_PARCEL_BULK&product=SERVICEPAKKE&product=BPAKKE_DOR-DOR](https://api.bring.com/shippingguide/products/expectedDelivery.json?clientUrl=https://example.com/&fromCountry=SE&from=11640&toCountry=DK&to=1440&product=PICKUP_PARCEL&product=PICKUP_PARCEL_BULK&product=SERVICEPAKKE&product=BPAKKE_DOR-DOR)
        body:
          application/json:
            example: !include examples/expectedDelivery.json
          application/xml:
            example: !include examples/expectedDelivery.xml

/products/all{mediaTypeExtension}:
  displayName: Get shipment prices, estimated delivery and more
  description: |
      Use this endpoint to get price, expected delivery, product categories and additional information such as an indication of which alternative has the least environmental impact.
  uriParameters:
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to specify application/json or .xml to specify application/xml
  get:
    description: Get shipment prices, estimated delivery and more
    queryParameters:
      from:
        displayName: From postal code
        type: string
        example: 7600
      to:
        displayName: To postal code
        type: string
        example: 1407
      weightInGrams:
        displayName: Weight of package in grams
        type: integer
        example: 1500
      width:
        displayName: Package width in centimeters
        type: integer
        example: 40
      length:
        displayName: Package length in centimeters
        type: integer
        example: 40
      height:
        displayName: Package height in centimeters
        type: integer
        example: 30
      loadMeters:
        displayName: Package loading meters in meters
        type: double
        example: 1.22
      numberOfPallets:
        displayName: Number of pallets
        type: integer
        example: 10
      NonStackable:
        displayName: Default false. Set to true if you know that pallet would be non-stackable
        type: boolean
        example: true
      date:
        displayName: Shipping date
        description: Specifies which date the parcel will be delivered to Bring (within the time limit), and is used to calculate the delivery date. Date is specified in ISO format, `YYYY-MM-DD`.
        type: date
        example: 2015-11-18
      time:
        displayName: Shipping time
        description: Shipping time may be specified. Note that Bring's courier products are the only one affected by this parameter. Time is specified in ISO format, `HH:mm`.
        type: date
        example: 12:30
      clientUrl:
        displayName: Client URL
        description: To use the Shipping Guide you must specify a client url parameter. The client url should be set to the url of the web shop or application the end user is ordering from. The client url can be sent as a url parameter, clientUrl, or as a header, `X-Bring-Client-URL`.
        type: string
        example: https://www.example.com/amazing-clothes/
      edi:
        displayName: EDI setting
        description: Flag that tells if the parcel will be registred using EDI when it is shipped. Note that this flag may affect price and which products are available.
        type: boolean
        default: true
      postingAtPostOffice:
        description: |
          Flag that tells whether the parcel is delivered at a post office when it is shipped.

          A surcharge will be applied for the following products:

          * SERVICEPAKKE
          * BPAKKE_DOR-DOR (Bedriftspakke)
        type: boolean
        default: false
      additional:
        displayName: Additional services
        description: Request additional services for the package. Specified by adding one or more `additional` parameters to the request, e.g. [&additional=postoppkrav&additional=evarsling](https://api.bring.com/shippingguide/products/SERVICEPAKKE/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&date=2009-3-27&additional=postoppkrav&additional=evarsling&additional=lordagsutkjoring). See the [additional services list](/api/products/#additional-services). The Shipping Guide will match the additional service codes to the requested products and ignore product / additional service codes that are not applicable.
        type: string
        example: evarsling
      priceAdjustments:
        displayName: Price adjustments
        description: |
          Adjusts the price (w/o VAT) returned. The format of it is [<product code>_][p(lus)|m(inus)]factor[p(ercentage)]
        pattern: ^((\w*_)?(p|m|)\d*(\.\d|)|(\w*_)?(p|m)\d*(\.\d|)p)$
        type: string
        example: m20p
      pid:
        displayName: Public ID
        description: The last part (after the last dash) of your identification string (logged-in information for user of Shipping Guide). This makes the Shipping Guide know who performs the query, so we may contact the correct shipping guide user for potential follow ups.
        type: string
      product:
        displayName: Products
        description: This parameter lets you specify which products you want to return information about. If you omit this parameter, you get the default product list (not recommended for production usage). Product is specified by adding one or more product parameters, e.g. [product=servicepakke&product=bpakke_dor-dor](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&product=servicepakke&product=bpakke_dor-dor).
        type: string
        example: bpakke_dor-dor
      customerNumber:
        displayName: Customer number
        description: This parameter lets you specify which customer number to use to get [additional information](#additional-information) about the specified product(s). This parameter requires [user authentication](/api/#authentication). If you are authenticated but omit this parameter, shipping guide will try to select an applicable customer number for you. If there is only one applicable customer number, it will automatically be selected, but if there are multiple matches you have to specify which to use by using this parameter.
        type: string
        example: CARGO-123456
      language:
        displayName: Language
        description: Which language the descriptive product texts should have. Supported languages are English (en), Swedish (se), Finnish (fi), Danish (da) and Norwegian (no). If no language is set, or text is not available in the requested language, norwegian text is returned.
        type: string
        default: no
        example: en
      volumeSpecial:
        displayName: Special volume
        description: Flag to indicate if the package has a shape that may require 'special handling fee'. [product=servicepakke&product=bpakke_dor-dor](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&product=servicepakke&product=bpakke_dor-dor&volumeSpecial=true).
        type: boolean
        default: false

    responses:
      200:
        displayName: Successful response
        description: |
          For a given shipment from A to B, the core way to use the Shipping Guide is to query for all the products you know how to send (e.g. the products you have a customer agreement for). From that given set of products specified in the request, the Shipping Guide will return the products that are relevant for the shipment, based on product attributes (e.g. max package size and weight) and service area (norwegian: dekningsområde), e.g. not all products are offered to all postal codes.

          *Example:* You have a package of 2,5 kilos from postal codes 0484 to 5600 that you want to send. Your webshop knows how to send (e.g. has a customer agreement) for sending the following Bring products:

          * Servicepakke
          * Bedriftspakke
          * Bedriftspakke Ekspress - Over Natten
          * På Døren
          * Mail

          The Shipping Guide request should then be made for all the products (explicitly set using multiple product parameters), and the Shipping Guide will tell you which products are applicable. E.g. Mail is not applicable since the package is greater than 2 kg, and postal code 5600 is outside the service area for "På Døren".

          Request: [../all.json?clientUrl=insertYourClientUrlHere&weightInGrams=2500&from=0484&to=5600&product=servicepakke&product=bpakke_dor-dor&product=ekspress09&product=pa_doren&product=mail](https://api.bring.com/shippingguide/products/all.json?clientUrl=insertYourClientUrlHere&weightInGrams=2500&from=0484&to=5600&product=servicepakke&product=bpakke_dor-dor&product=ekspress09&product=pa_doren&product=mail)
        body:
          application/json:
            example: !include examples/all.json
          application/xml:
            example: !include examples/all.xml
      250:
        displayName: Multiple parcels in one query
        description: |
          It is also possible to combine weight, volume and dimensions for multiple parcels. Multiple parcels are specified by suffixing weightInGrams, volume or dimensions (length, width or height), with sequential numbers from 0.

          The data used in this example is:

          - `from=7041`
          - `to=0558`

          Parcels:

          1. `weightInGrams0=1500`
          2. `volume1=33`
          3. `length2=10&width2=20&height2=30`

          [Example request](https://api.bring.com/shippingguide/products/all.json?clientUrl=insertYourClientUrlHere&from=7041&to=0558&weightInGrams0=1500&volume1=33&length2=10&width2=20&height2=30)
        body:
          application/json:
            example: !include examples/multiple_parcels.json
          application/xml:
            example: !include examples/multiple_parcels.xml
      251:
        displayName: International shipments
        description: |
          Specified using `fromCountry=NO&toCountry=DK`.

          [Country Codes are ISO-3166-1-alpha-2](http://www.iso.org/iso/country_names_and_code_elements).

          [Example request](https://api.bring.com/shippingguide/products/expectedDelivery.json?clientUrl=insertYourClientUrlHere&from=2100&to=2100&fromCountry=NO&toCountry=DK&product=PICKUP_PARCEL).
        body:
          application/json:
            example: !include examples/international_shipments.json
          application/xml:
            example: !include examples/international_shipments.xml
      252:
        displayName: International shipments to countries without postal codes
        description: |
          In the example below, a parcel is sent from Norway to Dublin, Ireland. The parameters are:

          - `?fromCountry=NO`
          - `&toCountry=IE`
          - `&to=0`
          - `&toCity=Dublin`

          To see both the expected delivery time and the price, we've added:

          - `&weightInGrams=300`, and
          - `all.json`

          [Example request](https://api.bring.com/shippingguide/products/all.json?clientUrl=insertYourClientUrlHere&fromCountry=NO&toCountry=IE&from=7600&to=0&toCity=Dublin&product=PICKUP_PARCEL&weightInGrams=300)
        body:
          application/json:
            example: !include examples/international_without_postal_codes.json
          application/xml:
            example: !include examples/international_without_postal_codes.xml
      253:
        displayName: Three ways to specify a package size
        description: |
          ### Weight in grams

          Specified using [`weightInGrams=1500`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500).

          ### Package dimensions

          Specified using [`length=30&width=40&height=40`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&length=30&width=40&height=40).

          ### Volume

          Instead of, or in addition to using the package's weight and dimensions you can specify volume. This is relevant for non-rectangular hexahedron shaped packages, and depending on the volume, it could affect the set of available products. The unit is dm3.

          Specified using [`volume=33`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&volume=33).
        body:
          application/json:
            example: !include examples/specify_package_size.json
          application/xml:
            example: !include examples/specify_package_size.xml
      254:
        displayName: Get the expected delivery date
        description: |
          Specifies the date the package is delivered to Bring. The parameter is used to calculate the expected delivery date.

          Specified using `date=YYYY-MM-DD`.

          If this parameter is specified, the response will include expected delivery date, in addition to expected number of working days.

          [Example request](https://api.bring.com/shippingguide/products/all.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&volume=33&date=2015-11-27&product=EKSPRESS09)
        body:
          application/json:
            example: !include examples/expected_delivery_date.json
          application/xml:
            example: !include examples/expected_delivery_date.xml
      255:
        displayName: Specify the pickup time from the departure point
        description: |
          Use this parameter if you would like to specify when during the day the package needs to be picked up from the departure point.

          This parameter is only considered for courier and express products.

          Specified using `date=HHHH-YY-MM&time=mm:ss` (date and time are required to use this option).

          [Example request](https://api.bring.com/shippingguide/products/all.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&volume=33&date=2015-11-27&time=13:37)
        body:
          application/json:
            example: !include examples/specify_pickup_time.json
          application/xml:
            example: !include examples/specify_pickup_time.xml
      256:
        displayName: Specify whether or not the shipment has been pre-registered (EDI)
        description: |
          Specify whether or not the shipment has been pre-registered (EDI).

          Specified using `edi=false`.

          This will affect response prices and might affect which products are available.

          Default: `true`

          [Example request](https://api.bring.com/shippingguide/products/price.xml?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&edi=false)
        body:
          application/json:
            example: !include examples/speciy_edi_registered.json
          application/xml:
            example: !include examples/speciy_edi_registered.xml
      257:
        displayName: Specify if the package was shipped from a post office
        description: |
          The response data may vary depending on whether or not Bring must collect the shipment, or if the customer delivers the shipment from a post office.

          This parameter specifies whether or not the package is delivered to a post office before shipping

          Specified using `postingAtPostOffice=true`

          Default: `false`

          [Example request](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&postingAtPostoffice=true&product=SERVICEPAKKE)
        body:
          application/json:
            example: !include examples/specify_shipped_from_post_office.json
          application/xml:
            example: !include examples/specify_shipped_from_post_office.xml
      258:
        displayName: Adjust prices
        description: |
          The Shipping Guide provides adjustment of prices shown.

          To adjust the price add e.g. [`&priceAdjustment=m20p`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&priceAdjustment=m20p) to the query.

          The format of it is [<product code>_][p(lus)|m(inus)]factor[p(ercentage)] where parts inside square brackets are optional and parts inside parentheses are for informational purpose.

          | `produkt code_` | _optional_ Used if price adjustments are only made for a single product. |
          | `p`|`m`    | _optional_ The operation to be performed. `p` is for adding to the price, `m` for subtracting, and if left out the price is replaced with the _factorn_ |
          | `factor`        | The factor to be used in the price adjustment. This number can be a fixed amount or percentage to be added/subtracted, or a fixed price to be added/subtracted depending on other parameters.
          | `p`             | _optional_ Indicates that the operation should be done as a percentage calculation. Note that this is only valid for additions and subtractions and not fixed prices.

          ##### Examples

          | [`&priceAdjustment=10`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&priceAdjustment=10) | Set price to 10 |
          | [`&priceAdjustment=p20.5`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&priceAdjustment=p20.5) | Add 20.5 to the price |
          | [`&priceAdjustment=m20`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&priceAdjustment=m20) | Subtract 20 from the price |
          | [`&priceAdjustment=SERVICEPAKKE_79`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&priceAdjustment=SERVICEPAKKE_79) | Set fixed price of SERVICEPAKKE to 79 |
          | [`&priceAdjustment=SERVICEPAKKE_p30p`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&priceAdjustment=SERVICEPAKKE_p30p) | Add 30% to the price of SERVICEPAKKE |
          | [&priceAdjustment=SERVICEPAKKE_79&priceAdjustment=EKSPRESS09_m20p](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&product=SERVICEPAKKE&product=EKSPRESS09&priceAdjustment=SERVICEPAKKE_79&priceAdjustment=EKSPRESS09_m20p) | Set fixed price of NOK 79 for SERVICEPAKKE and deduct 20% on Bedriftspakke Ekspress Over Night 09 |

        body:
          application/json:
            example: !include examples/adjust_prices.json
          application/xml:
            example: !include examples/adjust_prices.xml

      259:
        displayName: Multiple Cargo Agreements in response
        description: |
          The Shipping Guide provides multiple cargo agreement prices depending upon the customer contract. This request should be authenticated using mybring credentials

          Below are the possible combinations of package details

          * Number of packages, weight, volume, dimensions, number of pallets and load meters
          * Number of packages and weight or volume or dimensions or load meters
          * Number of packages and volume or dimensions
          * Number of packages and weight
          * Number of packages and load meters
          * Number of packages and number of pallets and weight or volume or dimensions or load meters

          [Example request](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=5132&to=1481&weightInGrams=1500&loadMeters=1.22&numberOfPallets=100&product=CARGO&customerNumber=CARGO-123456)

        body:
          application/json:
            example: !include examples/cargo_agreements.json
          application/xml:
            example: !include examples/cargo_agreements.xml

      260:
        displayName: Internationalization of Product help text information
        description: |
          To view product help text information in the response, you need to set the `GuiInformation` flag to true. Untill now only Norwegian language was supported, but now support has been extended to Swedish (sv), Danish (da) and English (en) languages. You can set the locale as per your need in the request `Language` flag to get the response accordingly.

          [Example request](https://api.bring.com/shippingguide/products/all.json?clientUrl=insertYourClientUrlHere&from=5132&to=1481&weightInGrams=1500&product=CARGO&customerNumber=CARGO-123456)

        body:
          application/json:
            example: !include examples/guiInformation.json
          application/xml:
            example: !include examples/guiInformation.xml

/api/ws:
  displayName: SOAP
  description: |
      The web service interface offers the most options when performing queries to the Shipping Guide.

      Note that to use the SOAP service, you have to [authenticate the requests](/api/#authentication).

      ### WSDL

      WSDL / schema versions: [1](https://api.bring.com/shippingguide/api/ws/fraktguide-v1.wsdl), [2](https://api.bring.com/shippingguide/api/ws/fraktguide-v2.wsdl), [7](https://api.bring.com/shippingguide/api/ws/fraktguide-v7.wsdl), [8](https://api.bring.com/shippingguide/api/ws/fraktguide-v8.wsdl), [9](https://api.bring.com/shippingguide/api/ws/fraktguide-v9.wsdl), [11](https://api.bring.com/shippingguide/api/ws/fraktguide-v11.wsdl). The current version is 11.

      [Fraktguide XML Schema documentation](https://api.bring.com/shippingguide/api/ws/schema-latest.xsd)

      ### Versioning

      The Shipping Guide makes an effort to always be backwards compatible regarding data format for requests and responses of the Web Service. To achieve this, a `SchemaVersion` element is used in the request, indicating which version the client is on and what data-format the client expects in the result.

      *Important*: All clients must accept new (unknown) elements in the response. E.g. unknown elements should be ignored. The client framework used by client must not crash when unknown elements are encountered.

      When incompatible changes in the schema are made (other than addition of new elements), the SchemaVersion is incremented by one. The new schema is used at the *same endpoint URL* as before and uses the same namespace for its XML elements. A TraceMessage element (info message) in the response is added to inform the client that its schema should be updated. Old schema versions might in the future be unsupported.

      Regarding the XML/JSON API (not Web Services), an XML Schema is not used at all. Clients of the XML/JSON API are expected to handle new elements that appear. Nevertheless, the response will be backwards compatible in the sense that elements are not renamed.

      ### Holidays and Home Delivery

      There is no home delivery on bank holidays. It can also happen that Bring will not do home delivery on certain days during Christmas or Easter.

      The service will not take this into account. This must be handled by clients. End-users should not get delivery dates for holidays.
  get:
    description: SOAP

#%RAML 0.8
---
title: Shipping Guide API
baseUri: https://api.bring.com/shippingguide

documentation:
- title: Introduction
  content: |

            Decommission deadline for Shipping guide API- 01.11.2018

            Legacy API versions 1, 2 and 7 will be decommissioned and will not be available for public usage from 1st November 2018.

        Important message:

        We are excited to introduce Shipping Guide API 2.0 - a new and improved version of our Shipping Guide API🎊🎉. The latest version is packed with powerful capabilities and a simplified, structured request and response model, making it easier to provide both you and your end customers with different shipping alternatives.
        Please refer to Shipping Guide API 2.0 for more information.

        NOTE: The latest version will gradually replace existing versions of the Shipping Guide API, and versions 3, 4, 5, 6 and 10 have already been phased out. We are of course giving all users enough time to make the switch before phasing out old versions.

      The Shipping Guide (Fraktguiden) is a free service from Bring that provides

      * price information,
      * service area (norwegian: dekningsområde), and
      * estimated delivery times.

      With the Shipping Guide it is easy to offer different shipping alternatives to your end customers. Whether they want to

      * get delivery to the door (daytime or evening),
      * pick up the shipment at a post office, or
      * get the shipment delivered to the mailbox

      The Shipping Guide returns the recommended way to present these shipping alternatives, as well as prices and delivery times.

      [Demo shipping alternatives](/shipping-guide/demo).

      The demo shows that the Shipping Guide returns product categories for each request, making a shipping alternatives-page easy to set up. The focus is on delivery methods to the end customer, not product names.

      The Shipping Guide has several interfaces (SOAP and XML/JSON). Choose the option that fits your needs best (see table below). The SOAP interface is the core interface with complete functionality. There are some limitations in the XML/JSON API, such as the inability to mark a parcel as a specialized goods.

      There is also a [Offline SOAP service](#offline-data) for retrieving data for offline use (get complete prices, service area and delivery times based on a fixed sender postal code).

      *Psst!* We also have a [Java client library](https://github.com/bring/bring-api-java) for the Shipping Guide API.

- title: Available Products
  content: |
    The Shipping Guide API has a lot of various products and additional services. So many, in fact, that we decided to document them in a separate page.

    [See the whole list of products and additional services here.](/api/products/#shipping-guide)

- title: General Guidelines
  content: |
      ### VAT

      Shipping Guide specifies VAT related to senders country. It's up to the client to decide if VAT is applicable to their situation of sale.

      ### Additional services affecting price

      Make sure you specify the correct additional services for a package when querying the Shipping Guide.

      Especially the `evarsling` additional service for the Servicepakke product (recipient notification over SMS or E-Mail) will affect the base package price returned from the Shipping Guide, and should therefore be set according to what will be sent in the actual EDI message.

      If `evarsling` is not specified in the request, Fraktguiden will from 2013-01-01 add a fee for paper based recipient notification to the base package price for Servicepakke. As of 2013-01-01 the fee is NOK 4,-

- title: Error Handling Guidelines
  content: |
      When using the Shipping Guide, it is important to handle errors gracefully. Your web shop's users should still be able to order, even if the Shipping Guide returns an error or a timeout occurs.

      ### No products applicable

      If there are no products applicable for the requested shipment, an empty resultset will be returned. This means that for the passed-in product list, no products can be used for the shipment. Either the shipment is too large or is outside of the coverage area of all the requested products. Your code should handle this case, i.e. an empty product list for the shipment.

      One suggestion is to include more products in each request, e.g. a Cargo-product to handle large shipments. You should know how to send Cargo products before including it though.

      ### General errors

      When using the Shipping Guide, errors or service unavailability can occur, although we do our utmost to prevent any downtime. Thus it is important to use timeouts and other error handling techniques when making requests to the service.

      How you handle errors depends on the nature of your application, but one strategy for handling such situations is by providing a failover if the shipping guide responds with an error or does not respond at all (timeout).

      For instance your application can respond to an error by using prefetched [offline data](#offline-data) to calculate prices and delivery time estimates. Another alternative would be to use a a fixed standard price whenever an error occurs.

      ### Error codes for rejected requests

      | Code | Message in English | Message in Norwegian |
      |:-----|:-------------------|:---------------------|
      | FG_INPUT_001 | Shipping date must be set | Innleveringsdato må være satt |
      | FG_INPUT_002 | Error with Postal code | Feil i postnummer |
      | FG_INPUT_003 | Missing UserInformation element in request | Mangler UserInformation element i request. |
      | FG_INPUT_004 | At least one product id must be set | Minst et produkt må være valgt |
      | FG_INPUT_005 | Wrong date format | Feil i datoformat |
      | FG_INPUT_006 | Error with volume | Feil med volum |
      | FG_INPUT_008 | Missing Package element | Mangler Package element |
      | FG_INPUT_010 | Error number of alternative deliverydates | Feil antall alternative leveringsdager |
      | FG_INPUT_011 | Wrong weight unit code | Feil vektkode |
      | FG_INPUT_012 | Invalid weight format | Feil vekt format |
      | FG_INPUT_013 | Invalid volume format | Feil volum format |
      | FG_INPUT_014 | Invalid volume unit code | Feil volumkode |
      | FG_INPUT_016 | Invalid input dimensions | Feil med dimensjoner |
      | FG_INPUT_017 | Invalid input dimensions unit code | Feil dimensjonskode |
      | FG_INPUT_018 | Too many packages | For mange pakker |
      | FG_INPUT_019 | Product id missing | Produkt id mangler |
      | FG_INPUT_020 | Invalid offline from post number | Feil offline fra postnummer |
      | FG_INPUT_021 | Non existing postalcode | Postnummer eksisterer ikke |
      | FG_INPUT_022 | Missing weight or volume | Mangler vekt eller volum |
      | FG_INPUT_023 | Unexpected parameter | Ikke gyldig parameter |
      | FG_INPUT_024 | Invalid input price adjustment | Feil input til prisjustering |
      | FG_INPUT_025 | Unknown public id | Feil public id |
      | FG_INPUT_027 | Invalid country code | Feil landkode |
      | FG_INPUT_029 | Wrong time format | Feil tidsformat |
      | FG_INPUT_030 | Invalid request version | Ugyldig request versjon |
      | FG_INPUT_031 | Request version missing | Request versjon mangler |
      | FG_INPUT_032 | Mismatch in value in package and consignment. | Mismatch i verdi i pakke i forhold til sending. |
      | FG_INPUT_033 | A consignment element must be specified when requesting a consignment-oriented product. | Det må spesifiseres et consignment-element når det bes om et sendingsorientert produkt. |
      | FG_INPUT_034 | Error with City | Feil i city |
      | FG_INPUT_035 | Shipping date must be current date or in the future when net prices are requested. | Avtalepriser støtter ikke shipping date tilbake i tid. |
      | FG_INPUT_036 | Schema version 8 and newer does no longer support user code. Use Client URL instead. See XSD Schema documentation. | Schema versjon 8 og nyere støtter ikke lenger user code. Bruk heller Client URL. Sjekk XSD Schema dokumentasjon. |
      | FG_INPUT_037 | Schema version 8 and newer requires Client URL element set. See XSD Schema documentation. | Schema versjon 8 og nyere krever Client URL element set. Sjekk XSD Schema dokumentasjon. |
      | FG_INPUT_038 | Schema version 8 and newer requires that the api.bring.com/shippingguide endpoint is used. Check out developer.bring.com | Schema versjon 8 og nyere krever at api.bring.com/shippingguide endpoint benyttes. Se developer.bring.com. |
      | FG_INPUT_039 | Endpoint at api.bring.com/shippingguide requires that schema version 8 or newer is used. Check out developer.bring.com | Endpoint på api.bring.com/shippingguide krever at schema version 8 eller nyere benyttes. Se developer.bring.com. |
      | FG_INPUT_040 | Invalid UNNumber format. UNNumber must be a four digit string. Ex: 0030 | Feil UNNumber format. UNNumber skal være en fire sifret streng. Eks: 0030 |
      | FG_INPUT_041 | Oil express product requires a customer number set on the product element, because only contract prices are available. | Oljeekspressproduktet krever et kundenummer. Kun avtalepris tilgjengelig. |
      | FG_INPUT_042 | Could not parse the input string to Betaler. | Kunne ikke analysere strengen til påvirker betaler. |
      | FG_INPUT_043 | Invalid combination of additional services. | Ugyldig kombinasjon av tilleggstjenester. |
      | FG_INPUT_044 | Missing Consignment Request element. | Mangler Consignment Request element. |
      | FG_PRODUCT_001 | Product unknown | Produkt ukjent |
      | FG_PRODUCT_002 | Product not available as offline data. | Produkt ikke tilgjengelig i offline data-format. |
      | FG_PRODUCT_003 | Outside of coverage area for product. | Utenfor dekningsområde for produkt. |
      | FG_UNKNOWN_001 | Unknown internal error | Ukjent intern feil |
      | FG_USER_002 | Wrong usercode | Feil identifiakasjonsstreng |
      | FG_USER_007 | Customer number specified, but user is not logged in. Please set the mybring authentication headers. | Kundenummer angitt, men bruker er ikke innlogget. Vennligst sett mybring autentiseringsheadere. |
      | FG_USER_008 | Logged-in user does not have access to specified customer | Pålogget bruker har ikke tilgang spesifisert kunde |
      | FG_USER_009 | Customer number is not applicable for specified produkt | Kundenummer er ikke gyldig for spesifisert produktkode |
      | FG_USER_010 | Customer not found for super user. | Kunde ikke funnet for superbruker |
      | FG_USER_011 | Customer does not have right access role for service | Kunde har ikke riktig tilgangs rolle for tjenesten |
      | FG_EXTERNAL_SERVICE_NO_PRICE | An external system failed to return the cost for the actual shipping. Please check your input data. | Et eksternt system returnerte ikke pris på selve frakten. Vennligst sjekk input data. |

- title: Offline data
  content: |
    Offline data lets you download a failover version of the data from the Shipping Guide.

    By using the Offline Data Web Service (see [WSDL](#soap)) or [Offline Data form](/shipping-guide/offline) you can download price lists, transport times and additional services designed for offline usage. Offline data is suitable as a failover solution if the Shipping Guide does not respond or responds with an error message, or if there are extreme demands on performance.

    *Important!* With offline data, you have to deal with all the rules of special goods, shipping calculated weight (volume weight), and more. These rules are located on the respective product pages on bring.com. Remember to update the database at price changes!

    The service is available free of charge, provided acceptance of the terms of use. Note that only registered users will receive notifications of changes in service!

    For those who use the offline data, we recommend to get the updates automatically via Offline Data Web Service.

    #### Useful XPaths when processing offline data

    Get Price Zone (returns an empty answer if toPostalCode is outside the coverage area for the chosen product):

        //Product[@productId='SERVICEPAKKE']//PriceZone[@toPostalCode='2000']/text()

    Get Price based on Price Zone "2":

        //Product[@productId="SERVICEPAKKE"]//Price[@priceZone="2" and @weight="4000"]/text()

    Get transport time:

        //Product[@productId='SERVICEPAKKE']//WorkingDays[@toPostalCode="2000"]/text()

- title: Additional information
  content: |
    If you are a Mybring user, you can [authenticate](/api/#authentication) requests to the Shipping Guide. Authenticated requests have the following benefits:

    - Agreement prices
    - Prices for additional services
    - Lead time
    - Coverage

    Agreement prices are supported for all products except for Mail, Express and Courier Long Distance products. Fixing this is on our todo list, though.

/products/price{mediaTypeExtension}:
  displayName: Get shipment prices
  uriParameters:
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to specify application/json or .xml to specify application/xml
  get:
    description: Get shipment prices
    queryParameters:
      from:
        displayName: From postal code
        type: string
        example: 7600
      to:
        displayName: To postal code
        type: string
        example: 1407
      weightInGrams:
        displayName: Weight of package in grams
        type: integer
        example: 1500
      width:
        displayName: Package width in centimeters
        type: integer
        example: 40
      length:
        displayName: Package length in centimeters
        type: integer
        example: 40
      height:
        displayName: Package height in centimeters
        type: integer
        example: 30
      loadMeters:
        displayName: Package loading meters in meters
        type: double
        example: 1.22
      numberOfPallets:
        displayName: Number of pallets
        type: integer
        example: 10
      NonStackable:
        displayName: Default false. Set to true if you know that pallet would be non-stackable
        type: boolean
        example: true
      date:
        displayName: Shipping date
        description: Specifies which date the parcel will be delivered to Bring (within the time limit), and is used to calculate the delivery date. Date is specified in ISO format, `YYYY-MM-DD`.
        type: date
        example: 2015-11-18
      time:
        displayName: Shipping time
        description: Shipping time may be specified. Note that Bring's courier products are the only one affected by this parameter. Time is specified in ISO format, `HH:mm`.
        type: date
        example: 12:30
      clientUrl:
        displayName: Client URL
        description: To use the Shipping Guide you must specify a client url parameter. The client url should be set to the url of the web shop or application the end user is ordering from. The client url can be sent as a url parameter, clientUrl, or as a header, `X-Bring-Client-URL`.
        type: string
        example: https://www.example.com/amazing-clothes/
      edi:
        displayName: EDI setting
        description: Flag that tells if the parcel will be registred using EDI when it is shipped. Note that this flag may affect price and which products are available.
        type: boolean
        default: true
        enum: [true, false]
      postingAtPostOffice:
        description: |
          Flag that tells whether the parcel is delivered at a post office when it is shipped.

          A surcharge will be applied for the following products:

          * SERVICEPAKKE
          * BPAKKE_DOR-DOR (Bedriftspakke)
        type: boolean
        default: false
        enum: [true, false]
      additional:
        displayName: Additional services
        description: Request additional services for the package. Specified by adding one or more `additional` parameters to the request, e.g. [&additional=postoppkrav&additional=evarsling](https://api.bring.com/shippingguide/products/SERVICEPAKKE/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&date=2009-3-27&additional=postoppkrav&additional=evarsling&additional=lordagsutkjoring). See the [additional services list](/api/products/#additional-services). The Shipping Guide will match the additional service codes to the requested products and ignore product / additional service codes that are not applicable.
        type: string
        example: evarsling
      priceAdjustments:
        description: |
          Adjusts the price (w/o VAT) returned. The format of it is [<product code>_][p(lus)|m(inus)]factor[p(ercentage)]
        type: string
        pattern: ^((\w*_)?(p|m|)\d*(\.\d|)|(\w*_)?(p|m)\d*(\.\d|)p)$
        example: m20p
      pid:
        displayName: Public ID
        description: The last part (after the last dash) of your identification string (logged-in information for user of Shipping Guide). This makes the Shipping Guide know who performs the query, so we may contact the correct shipping guide user for potential follow ups.
        type: string
      product:
        displayName: Products
        description: This parameter lets you specify which products you want to return information about. If you omit this parameter, you get the default product list (not recommended for production usage). Product is specified by adding one or more product parameters, e.g. [product=servicepakke&product=bpakke_dor-dor](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&product=servicepakke&product=bpakke_dor-dor).
        type: string
        example: bpakke_dor-dor
      customerNumber:
        displayName: Customer number
        description: This parameter lets you specify which customer number to use to get [additional information](#additional-information) about the specified product(s). This parameter requires [user authentication](/api/#authentication). If you are authenticated but omit this parameter, shipping guide will try to select an applicable customer number for you. If there is only one applicable customer number, it will automatically be selected, but if there are multiple matches you have to specify which to use by using this parameter.
        type: string
        example: CARGO-123456
      language:
        displayName: Language
        description: Which language the descriptive product texts should have. Supported languages are Swedish (se), Danish (da) and Norwegian (no). If no language is set, or text is not available in the requested language, norwegian text is returned.
        type: string
        default: no
        example: en
      volumeSpecial:
        displayName: Special volume
        description: Flag to indicate if the package has a shape that may require 'special handling fee'. [product=servicepakke&product=bpakke_dor-dor](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&product=servicepakke&product=bpakke_dor-dor&volumeSpecial=true).
        type: boolean
        default: false

    responses:
      200:
        displayName: Successful response
        description: |
          In this example, we're querying for prices for Pickup Parcel and Pickup Parcel Business for a 2,5kg package from Sweden to Denmark.

          Request: [...&fromCountry=SE&from=11640&toCountry=DK&to=1440&product=pickup_parcel&product=business_parcel](https://api.bring.com/shippingguide/products/price.json?clientUrl=https://example.com/&weightInGrams=2500&fromCountry=SE&from=11640&toCountry=DK&to=1440&product=pickup_parcel&product=business_parcel)
        body:
          application/json:
            example: !include examples/price.json
          application/xml:
            example: !include examples/price.xml

/products/expectedDelivery{mediaTypeExtension}:
  displayName: Get estimated delivery time
  uriParameters:
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to specify application/json or .xml to specify application/xml
  get:
    description: Get estimated delivery time
    queryParameters:
      from:
        displayName: From postal code
        type: string
        example: 7600
      to:
        displayName: To postal code
        type: string
        example: 1407
      weightInGrams:
        displayName: Weight of package in grams
        type: integer
        example: 1500
      width:
        displayName: Package width in centimeters
        type: integer
        example: 40
      length:
        displayName: Package length in centimeters
        type: integer
        example: 40
      height:
        displayName: Package height in centimeters
        type: integer
        example: 30
      loadMeters:
        displayName: Package loading meters in meters
        type: double
        example: 1.22
      numberOfPallets:
        displayName: Number of pallets
        type: integer
        example: 10
      date:
        displayName: Shipping date
        description: Specifies which date the parcel will be delivered to Bring (within the time limit), and is used to calculate the delivery date. Date is specified in ISO format, `YYYY-MM-DD`.
        type: date
        example: 2015-11-18
      time:
        displayName: Shipping time
        description: Shipping time may be specified. Note that Bring's courier products are the only one affected by this parameter. Time is specified in ISO format, `HH:mm`.
        type: date
        example: 12:30
      clientUrl:
        displayName: Client URL
        description: To use the Shipping Guide you must specify a client url parameter. The client url should be set to the url of the web shop or application the end user is ordering from. The client url can be sent as a url parameter, clientUrl, or as a header, `X-Bring-Client-URL`.
        type: string
        example: https://www.example.com/amazing-clothes/
      edi:
        displayName: EDI setting
        description: Flag that tells if the parcel will be registred using EDI when it is shipped. Note that this flag may affect price and which products are available.
        type: boolean
        default: true
      postingAtPostOffice:
        description: |
          Flag that tells whether the parcel is delivered at a post office when it is shipped.

          A surcharge will be applied for the following products:

          * SERVICEPAKKE
          * BPAKKE_DOR-DOR (Bedriftspakke)
        type: boolean
        default: false
      additional:
        displayName: Additional services
        description: Request additional services for the package. Specified by adding one or more `additional` parameters to the request, e.g. [&additional=postoppkrav&additional=evarsling](https://api.bring.com/shippingguide/products/SERVICEPAKKE/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&date=2009-3-27&additional=postoppkrav&additional=evarsling&additional=lordagsutkjoring). See the [additional services list](/api/products/#additional-services). The Shipping Guide will match the additional service codes to the requested products and ignore product / additional service codes that are not applicable.
        type: string
        example: evarsling
      priceAdjustments:
        displayName: Price adjustments
        description: |
          Adjusts the price (w/o VAT) returned. The format of it is [<product code>_][p(lus)|m(inus)]factor[p(ercentage)]
        type: string
        pattern: ^((\w*_)?(p|m|)\d*(\.\d|)|(\w*_)?(p|m)\d*(\.\d|)p)$
        example: m20p
      pid:
        displayName: Public ID
        description: The last part (after the last dash) of your identification string (logged-in information for user of Shipping Guide). This makes the Shipping Guide know who performs the query, so we may contact the correct shipping guide user for potential follow ups.
        type: string
      product:
        displayName: Products
        description: This parameter lets you specify which products you want to return information about. If you omit this parameter, you get the default product list (not recommended for production usage). Product is specified by adding one or more product parameters, e.g. [product=servicepakke&product=bpakke_dor-dor](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&product=servicepakke&product=bpakke_dor-dor).
        type: string
        example: bpakke_dor-dor
      language:
        displayName: Language
        description: Which language the descriptive product texts should have. Supported languages are English (en), Swedish (se), Finnish (fi), Danish (da) and Norwegian (no). If no language is set, or text is not available in the requested language, norwegian text is returned.
        type: string
        default: no
        example: en
      volumeSpecial:
        displayName: Special volume
        description: Flag to indicate if the package has a shape that may require 'special handling fee'. [product=servicepakke&product=bpakke_dor-dor](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&product=servicepakke&product=bpakke_dor-dor&volumeSpecial=true).
        type: boolean
        default: false

    responses:
      200:
        displayName: Successful response
        description: |
          In this example, we're querying for expected delivery time for various products for a package from Sweden to Denmark.

          Request: [...fromCountry=SE&from=11640&toCountry=DK&to=1440&product=PICKUP_PARCEL&product=PICKUP_PARCEL_BULK&product=SERVICEPAKKE&product=BPAKKE_DOR-DOR](https://api.bring.com/shippingguide/products/expectedDelivery.json?clientUrl=https://example.com/&fromCountry=SE&from=11640&toCountry=DK&to=1440&product=PICKUP_PARCEL&product=PICKUP_PARCEL_BULK&product=SERVICEPAKKE&product=BPAKKE_DOR-DOR)
        body:
          application/json:
            example: !include examples/expectedDelivery.json
          application/xml:
            example: !include examples/expectedDelivery.xml

/products/all{mediaTypeExtension}:
  displayName: Get shipment prices, estimated delivery and more
  description: |
      Use this endpoint to get price, expected delivery, product categories and additional information such as an indication of which alternative has the least environmental impact.
  uriParameters:
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to specify application/json or .xml to specify application/xml
  get:
    description: Get shipment prices, estimated delivery and more
    queryParameters:
      from:
        displayName: From postal code
        type: string
        example: 7600
      to:
        displayName: To postal code
        type: string
        example: 1407
      weightInGrams:
        displayName: Weight of package in grams
        type: integer
        example: 1500
      width:
        displayName: Package width in centimeters
        type: integer
        example: 40
      length:
        displayName: Package length in centimeters
        type: integer
        example: 40
      height:
        displayName: Package height in centimeters
        type: integer
        example: 30
      loadMeters:
        displayName: Package loading meters in meters
        type: double
        example: 1.22
      numberOfPallets:
        displayName: Number of pallets
        type: integer
        example: 10
      NonStackable:
        displayName: Default false. Set to true if you know that pallet would be non-stackable
        type: boolean
        example: true
      date:
        displayName: Shipping date
        description: Specifies which date the parcel will be delivered to Bring (within the time limit), and is used to calculate the delivery date. Date is specified in ISO format, `YYYY-MM-DD`.
        type: date
        example: 2015-11-18
      time:
        displayName: Shipping time
        description: Shipping time may be specified. Note that Bring's courier products are the only one affected by this parameter. Time is specified in ISO format, `HH:mm`.
        type: date
        example: 12:30
      clientUrl:
        displayName: Client URL
        description: To use the Shipping Guide you must specify a client url parameter. The client url should be set to the url of the web shop or application the end user is ordering from. The client url can be sent as a url parameter, clientUrl, or as a header, `X-Bring-Client-URL`.
        type: string
        example: https://www.example.com/amazing-clothes/
      edi:
        displayName: EDI setting
        description: Flag that tells if the parcel will be registred using EDI when it is shipped. Note that this flag may affect price and which products are available.
        type: boolean
        default: true
      postingAtPostOffice:
        description: |
          Flag that tells whether the parcel is delivered at a post office when it is shipped.

          A surcharge will be applied for the following products:

          * SERVICEPAKKE
          * BPAKKE_DOR-DOR (Bedriftspakke)
        type: boolean
        default: false
      additional:
        displayName: Additional services
        description: Request additional services for the package. Specified by adding one or more `additional` parameters to the request, e.g. [&additional=postoppkrav&additional=evarsling](https://api.bring.com/shippingguide/products/SERVICEPAKKE/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&date=2009-3-27&additional=postoppkrav&additional=evarsling&additional=lordagsutkjoring). See the [additional services list](/api/products/#additional-services). The Shipping Guide will match the additional service codes to the requested products and ignore product / additional service codes that are not applicable.
        type: string
        example: evarsling
      priceAdjustments:
        displayName: Price adjustments
        description: |
          Adjusts the price (w/o VAT) returned. The format of it is [<product code>_][p(lus)|m(inus)]factor[p(ercentage)]
        pattern: ^((\w*_)?(p|m|)\d*(\.\d|)|(\w*_)?(p|m)\d*(\.\d|)p)$
        type: string
        example: m20p
      pid:
        displayName: Public ID
        description: The last part (after the last dash) of your identification string (logged-in information for user of Shipping Guide). This makes the Shipping Guide know who performs the query, so we may contact the correct shipping guide user for potential follow ups.
        type: string
      product:
        displayName: Products
        description: This parameter lets you specify which products you want to return information about. If you omit this parameter, you get the default product list (not recommended for production usage). Product is specified by adding one or more product parameters, e.g. [product=servicepakke&product=bpakke_dor-dor](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&product=servicepakke&product=bpakke_dor-dor).
        type: string
        example: bpakke_dor-dor
      customerNumber:
        displayName: Customer number
        description: This parameter lets you specify which customer number to use to get [additional information](#additional-information) about the specified product(s). This parameter requires [user authentication](/api/#authentication). If you are authenticated but omit this parameter, shipping guide will try to select an applicable customer number for you. If there is only one applicable customer number, it will automatically be selected, but if there are multiple matches you have to specify which to use by using this parameter.
        type: string
        example: CARGO-123456
      language:
        displayName: Language
        description: Which language the descriptive product texts should have. Supported languages are English (en), Swedish (se), Finnish (fi), Danish (da) and Norwegian (no). If no language is set, or text is not available in the requested language, norwegian text is returned.
        type: string
        default: no
        example: en
      volumeSpecial:
        displayName: Special volume
        description: Flag to indicate if the package has a shape that may require 'special handling fee'. [product=servicepakke&product=bpakke_dor-dor](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&product=servicepakke&product=bpakke_dor-dor&volumeSpecial=true).
        type: boolean
        default: false

    responses:
      200:
        displayName: Successful response
        description: |
          For a given shipment from A to B, the core way to use the Shipping Guide is to query for all the products you know how to send (e.g. the products you have a customer agreement for). From that given set of products specified in the request, the Shipping Guide will return the products that are relevant for the shipment, based on product attributes (e.g. max package size and weight) and service area (norwegian: dekningsområde), e.g. not all products are offered to all postal codes.

          *Example:* You have a package of 2,5 kilos from postal codes 0484 to 5600 that you want to send. Your webshop knows how to send (e.g. has a customer agreement) for sending the following Bring products:

          * Servicepakke
          * Bedriftspakke
          * Bedriftspakke Ekspress - Over Natten
          * På Døren
          * Mail

          The Shipping Guide request should then be made for all the products (explicitly set using multiple product parameters), and the Shipping Guide will tell you which products are applicable. E.g. Mail is not applicable since the package is greater than 2 kg, and postal code 5600 is outside the service area for "På Døren".

          Request: [../all.json?clientUrl=insertYourClientUrlHere&weightInGrams=2500&from=0484&to=5600&product=servicepakke&product=bpakke_dor-dor&product=ekspress09&product=pa_doren&product=mail](https://api.bring.com/shippingguide/products/all.json?clientUrl=insertYourClientUrlHere&weightInGrams=2500&from=0484&to=5600&product=servicepakke&product=bpakke_dor-dor&product=ekspress09&product=pa_doren&product=mail)
        body:
          application/json:
            example: !include examples/all.json
          application/xml:
            example: !include examples/all.xml
      250:
        displayName: Multiple parcels in one query
        description: |
          It is also possible to combine weight, volume and dimensions for multiple parcels. Multiple parcels are specified by suffixing weightInGrams, volume or dimensions (length, width or height), with sequential numbers from 0.

          The data used in this example is:

          - `from=7041`
          - `to=0558`

          Parcels:

          1. `weightInGrams0=1500`
          2. `volume1=33`
          3. `length2=10&width2=20&height2=30`

          [Example request](https://api.bring.com/shippingguide/products/all.json?clientUrl=insertYourClientUrlHere&from=7041&to=0558&weightInGrams0=1500&volume1=33&length2=10&width2=20&height2=30)
        body:
          application/json:
            example: !include examples/multiple_parcels.json
          application/xml:
            example: !include examples/multiple_parcels.xml
      251:
        displayName: International shipments
        description: |
          Specified using `fromCountry=NO&toCountry=DK`.

          [Country Codes are ISO-3166-1-alpha-2](http://www.iso.org/iso/country_names_and_code_elements).

          [Example request](https://api.bring.com/shippingguide/products/expectedDelivery.json?clientUrl=insertYourClientUrlHere&from=2100&to=2100&fromCountry=NO&toCountry=DK&product=PICKUP_PARCEL).
        body:
          application/json:
            example: !include examples/international_shipments.json
          application/xml:
            example: !include examples/international_shipments.xml
      252:
        displayName: International shipments to countries without postal codes
        description: |
          In the example below, a parcel is sent from Norway to Dublin, Ireland. The parameters are:

          - `?fromCountry=NO`
          - `&toCountry=IE`
          - `&to=0`
          - `&toCity=Dublin`

          To see both the expected delivery time and the price, we've added:

          - `&weightInGrams=300`, and
          - `all.json`

          [Example request](https://api.bring.com/shippingguide/products/all.json?clientUrl=insertYourClientUrlHere&fromCountry=NO&toCountry=IE&from=7600&to=0&toCity=Dublin&product=PICKUP_PARCEL&weightInGrams=300)
        body:
          application/json:
            example: !include examples/international_without_postal_codes.json
          application/xml:
            example: !include examples/international_without_postal_codes.xml
      253:
        displayName: Three ways to specify a package size
        description: |
          ### Weight in grams

          Specified using [`weightInGrams=1500`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500).

          ### Package dimensions

          Specified using [`length=30&width=40&height=40`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&length=30&width=40&height=40).

          ### Volume

          Instead of, or in addition to using the package's weight and dimensions you can specify volume. This is relevant for non-rectangular hexahedron shaped packages, and depending on the volume, it could affect the set of available products. The unit is dm3.

          Specified using [`volume=33`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&volume=33).
        body:
          application/json:
            example: !include examples/specify_package_size.json
          application/xml:
            example: !include examples/specify_package_size.xml
      254:
        displayName: Get the expected delivery date
        description: |
          Specifies the date the package is delivered to Bring. The parameter is used to calculate the expected delivery date.

          Specified using `date=YYYY-MM-DD`.

          If this parameter is specified, the response will include expected delivery date, in addition to expected number of working days.

          [Example request](https://api.bring.com/shippingguide/products/all.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&volume=33&date=2015-11-27&product=EKSPRESS09)
        body:
          application/json:
            example: !include examples/expected_delivery_date.json
          application/xml:
            example: !include examples/expected_delivery_date.xml
      255:
        displayName: Specify the pickup time from the departure point
        description: |
          Use this parameter if you would like to specify when during the day the package needs to be picked up from the departure point.

          This parameter is only considered for courier and express products.

          Specified using `date=HHHH-YY-MM&time=mm:ss` (date and time are required to use this option).

          [Example request](https://api.bring.com/shippingguide/products/all.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&volume=33&date=2015-11-27&time=13:37)
        body:
          application/json:
            example: !include examples/specify_pickup_time.json
          application/xml:
            example: !include examples/specify_pickup_time.xml
      256:
        displayName: Specify whether or not the shipment has been pre-registered (EDI)
        description: |
          Specify whether or not the shipment has been pre-registered (EDI).

          Specified using `edi=false`.

          This will affect response prices and might affect which products are available.

          Default: `true`

          [Example request](https://api.bring.com/shippingguide/products/price.xml?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&edi=false)
        body:
          application/json:
            example: !include examples/speciy_edi_registered.json
          application/xml:
            example: !include examples/speciy_edi_registered.xml
      257:
        displayName: Specify if the package was shipped from a post office
        description: |
          The response data may vary depending on whether or not Bring must collect the shipment, or if the customer delivers the shipment from a post office.

          This parameter specifies whether or not the package is delivered to a post office before shipping

          Specified using `postingAtPostOffice=true`

          Default: `false`

          [Example request](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&postingAtPostoffice=true&product=SERVICEPAKKE)
        body:
          application/json:
            example: !include examples/specify_shipped_from_post_office.json
          application/xml:
            example: !include examples/specify_shipped_from_post_office.xml
      258:
        displayName: Adjust prices
        description: |
          The Shipping Guide provides adjustment of prices shown.

          To adjust the price add e.g. [`&priceAdjustment=m20p`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&priceAdjustment=m20p) to the query.

          The format of it is [<product code>_][p(lus)|m(inus)]factor[p(ercentage)] where parts inside square brackets are optional and parts inside parentheses are for informational purpose.

          | `produkt code_` | _optional_ Used if price adjustments are only made for a single product. |
          | `p`|`m`    | _optional_ The operation to be performed. `p` is for adding to the price, `m` for subtracting, and if left out the price is replaced with the _factorn_ |
          | `factor`        | The factor to be used in the price adjustment. This number can be a fixed amount or percentage to be added/subtracted, or a fixed price to be added/subtracted depending on other parameters.
          | `p`             | _optional_ Indicates that the operation should be done as a percentage calculation. Note that this is only valid for additions and subtractions and not fixed prices.

          ##### Examples

          | [`&priceAdjustment=10`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&priceAdjustment=10) | Set price to 10 |
          | [`&priceAdjustment=p20.5`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&priceAdjustment=p20.5) | Add 20.5 to the price |
          | [`&priceAdjustment=m20`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&priceAdjustment=m20) | Subtract 20 from the price |
          | [`&priceAdjustment=SERVICEPAKKE_79`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&priceAdjustment=SERVICEPAKKE_79) | Set fixed price of SERVICEPAKKE to 79 |
          | [`&priceAdjustment=SERVICEPAKKE_p30p`](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&priceAdjustment=SERVICEPAKKE_p30p) | Add 30% to the price of SERVICEPAKKE |
          | [&priceAdjustment=SERVICEPAKKE_79&priceAdjustment=EKSPRESS09_m20p](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&product=SERVICEPAKKE&product=EKSPRESS09&priceAdjustment=SERVICEPAKKE_79&priceAdjustment=EKSPRESS09_m20p) | Set fixed price of NOK 79 for SERVICEPAKKE and deduct 20% on Bedriftspakke Ekspress Over Night 09 |

        body:
          application/json:
            example: !include examples/adjust_prices.json
          application/xml:
            example: !include examples/adjust_prices.xml

      259:
        displayName: Multiple Cargo Agreements in response
        description: |
          The Shipping Guide provides multiple cargo agreement prices depending upon the customer contract. This request should be authenticated using mybring credentials

          Below are the possible combinations of package details

          * Number of packages, weight, volume, dimensions, number of pallets and load meters
          * Number of packages and weight or volume or dimensions or load meters
          * Number of packages and volume or dimensions
          * Number of packages and weight
          * Number of packages and load meters
          * Number of packages and number of pallets and weight or volume or dimensions or load meters

          [Example request](https://api.bring.com/shippingguide/products/price.json?clientUrl=insertYourClientUrlHere&from=5132&to=1481&weightInGrams=1500&loadMeters=1.22&numberOfPallets=100&product=CARGO&customerNumber=CARGO-123456)

        body:
          application/json:
            example: !include examples/cargo_agreements.json
          application/xml:
            example: !include examples/cargo_agreements.xml

      260:
        displayName: Internationalization of Product help text information
        description: |
          To view product help text information in the response, you need to set the `GuiInformation` flag to true. Untill now only Norwegian language was supported, but now support has been extended to Swedish (sv), Danish (da) and English (en) languages. You can set the locale as per your need in the request `Language` flag to get the response accordingly.

          [Example request](https://api.bring.com/shippingguide/products/all.json?clientUrl=insertYourClientUrlHere&from=5132&to=1481&weightInGrams=1500&product=CARGO&customerNumber=CARGO-123456)

        body:
          application/json:
            example: !include examples/guiInformation.json
          application/xml:
            example: !include examples/guiInformation.xml

/api/ws:
  displayName: SOAP
  description: |
      The web service interface offers the most options when performing queries to the Shipping Guide.

      Note that to use the SOAP service, you have to [authenticate the requests](/api/#authentication).

      ### WSDL

      WSDL / schema versions: [1](https://api.bring.com/shippingguide/api/ws/fraktguide-v1.wsdl), [2](https://api.bring.com/shippingguide/api/ws/fraktguide-v2.wsdl), [7](https://api.bring.com/shippingguide/api/ws/fraktguide-v7.wsdl), [8](https://api.bring.com/shippingguide/api/ws/fraktguide-v8.wsdl), [9](https://api.bring.com/shippingguide/api/ws/fraktguide-v9.wsdl), [11](https://api.bring.com/shippingguide/api/ws/fraktguide-v11.wsdl). The current version is 11.

      [Fraktguide XML Schema documentation](https://api.bring.com/shippingguide/api/ws/schema-latest.xsd)

      ### Versioning

      The Shipping Guide makes an effort to always be backwards compatible regarding data format for requests and responses of the Web Service. To achieve this, a `SchemaVersion` element is used in the request, indicating which version the client is on and what data-format the client expects in the result.

      *Important*: All clients must accept new (unknown) elements in the response. E.g. unknown elements should be ignored. The client framework used by client must not crash when unknown elements are encountered.

      When incompatible changes in the schema are made (other than addition of new elements), the SchemaVersion is incremented by one. The new schema is used at the *same endpoint URL* as before and uses the same namespace for its XML elements. A TraceMessage element (info message) in the response is added to inform the client that its schema should be updated. Old schema versions might in the future be unsupported.

      Regarding the XML/JSON API (not Web Services), an XML Schema is not used at all. Clients of the XML/JSON API are expected to handle new elements that appear. Nevertheless, the response will be backwards compatible in the sense that elements are not renamed.

      ### Holidays and Home Delivery

      There is no home delivery on bank holidays. It can also happen that Bring will not do home delivery on certain days during Christmas or Easter.

      The service will not take this into account. This must be handled by clients. End-users should not get delivery dates for holidays.
  get:
    description: SOAP