Fix description for SOAP in shipping guide

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

documentation:
- title: Introduction
  content: |
      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](http://fraktguide.bring.no/fraktguide/demoVelgFraktalternativ.do?from=0484&to=0470&weightInGrams=800&length=10&width=20&height=5&product=servicepakke&product=pa_doren&product=bpakke_dor-dor&product=smaapakker_a-post&product=ekspress09&product=smaapakker_b-post&product=courier_1h&product=minipakke&callbackUrl=http://fraktguide.bring.no/fraktguide/popupCallback.jsp&date=2015-10-07) form (Norwegian).

      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](http://developer.bring.com/additionalresources/offlinedata.html?from=shipping) for retrieving data for offline use (get complete prices, service area and delivery times based on a fixed sender postal code).

- title: How to use
  content: |
      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
      * A-Post
      * B-Post

      The [Shipping Guide request](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=a-post&product=b-post) 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. A-Post and B-Post are not applicable since the package is greater than 2 kg, and postal code 5600 is outside the service area for "På Døren".

- 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](/api/shipping-guide/offline/) 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_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. |

/products/price{mediaTypeExtension}:
  displayName: Get shipment prices
  description: |
      TODO: description
  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
      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/product-list/#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: Option to adjust the price returned. Specified by adding [&priceAdjustment=m20p](https://api.bring.com/shippingguide/products/SERVICEPAKKE/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&priceAdjustment=m20p). Note that price adjustments is on prices without VAT. Refer to additional examples to read more.
        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
      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
        body:
          application/json:
          application/xml:

/products/expectedDelivery{mediaTypeExtension}:
  displayName: Get estimated delivery time
  description: |
      TODO: description
  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:
      q:
        description: Reference, package number, shipment number to search for
        type: string
        required: true
        example: TESTPACKAGE-AT-PICKUPPOINT
      callback:
        description: JSONP callback function name
        type: string
        required: false

    responses:
      200:
        displayName: Successful response
        body:
          application/json:
          application/xml:

/products/all{mediaTypeExtension}:
  displayName: Get shipment prices, estimated delivery and more
  description: |
      TODO: description
  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:
      q:
        description: Get shipment prices, estimated delivery time and additional information
        type: string
        required: true
        example: TESTPACKAGE-AT-PICKUPPOINT
      callback:
        description: JSONP callback function name
        type: string
        required: false

    responses:
      200:
        displayName: Successful response
        body:
          application/json:
          application/xml:

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

    responses:
      200:
        displayName: Successful response
        body:
          application/json:
          application/xml:

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

documentation:
- title: Introduction
  content: |
      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](http://fraktguide.bring.no/fraktguide/demoVelgFraktalternativ.do?from=0484&to=0470&weightInGrams=800&length=10&width=20&height=5&product=servicepakke&product=pa_doren&product=bpakke_dor-dor&product=smaapakker_a-post&product=ekspress09&product=smaapakker_b-post&product=courier_1h&product=minipakke&callbackUrl=http://fraktguide.bring.no/fraktguide/popupCallback.jsp&date=2015-10-07) form (Norwegian).

      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](http://developer.bring.com/additionalresources/offlinedata.html?from=shipping) for retrieving data for offline use (get complete prices, service area and delivery times based on a fixed sender postal code).

- title: How to use
  content: |
      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
      * A-Post
      * B-Post

      The [Shipping Guide request](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=a-post&product=b-post) 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. A-Post and B-Post are not applicable since the package is greater than 2 kg, and postal code 5600 is outside the service area for "På Døren".

- 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](/api/shipping-guide/offline/) 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_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. |

/products/price{mediaTypeExtension}:
  displayName: Get shipment prices
  description: |
      TODO: description
  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
      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/product-list/#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: Option to adjust the price returned. Specified by adding [&priceAdjustment=m20p](https://api.bring.com/shippingguide/products/SERVICEPAKKE/price.json?clientUrl=insertYourClientUrlHere&from=7600&to=1407&weightInGrams=1500&priceAdjustment=m20p). Note that price adjustments is on prices without VAT. Refer to additional examples to read more.
        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
      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
        body:
          application/json:
          application/xml:

/products/expectedDelivery{mediaTypeExtension}:
  displayName: Get estimated delivery time
  description: |
      TODO: description
  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:
      q:
        description: Reference, package number, shipment number to search for
        type: string
        required: true
        example: TESTPACKAGE-AT-PICKUPPOINT
      callback:
        description: JSONP callback function name
        type: string
        required: false

    responses:
      200:
        displayName: Successful response
        body:
          application/json:
          application/xml:

/products/all{mediaTypeExtension}:
  displayName: Get shipment prices, estimated delivery and more
  description: |
      TODO: description
  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:
      q:
        description: Get shipment prices, estimated delivery time and additional information
        type: string
        required: true
        example: TESTPACKAGE-AT-PICKUPPOINT
      callback:
        description: JSONP callback function name
        type: string
        required: false

    responses:
      200:
        displayName: Successful response
        body:
          application/json:
          application/xml:

/api/ws:
  displayName: SOAP
  description: |
      The web service interface offers the most options when performing queries to the Shipping Guide.
  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:
      q:
        description: Get shipment prices, estimated delivery time and additional information
        type: string
        required: true
        example: TESTPACKAGE-AT-PICKUPPOINT
      callback:
        description: JSONP callback function name
        type: string
        required: false

    responses:
      200:
        displayName: Successful response
        body:
          application/json:
          application/xml:


Fixed typos in network.raml. (#5192)

Fixed typos in network.raml. (#5192)

#%RAML 1.0 Library
uses:
  label: label.raml
  numbers: numberTypes.raml
  strings: stringTypes.raml
  pragma: pragma.raml
types:
  Endpoint:
    type: object
    description: |
      Endpoints accept connections from outside of a pod.
      Endpoints may also be advertised outside of a cluster.
    properties:
      name:
        type: strings.Name
        description: |
          Name of this port. Should be unique in the context of the pod.
      containerPort?:
        type: numbers.Port
        description: |
          The container port that a task's process is actually listening on.
          Required if the network mode is container
      hostPort?:
        type: numbers.AnyPort
        description: |
          Mapped port on the host.
          All host ports are allocated from resource offers.
        usage: Specify 0 to tell Marathon to dynamically allocate a host port.
      protocol?:
        type: array
        (pragma.omitEmpty):
        items: strings.Name
        minItems: 1
        description: |
          The protocol of this port, advertised in Mesos DiscoveryInfo (DI).
          Specifying more than one protocol here will result in the generation
          of multiple Port DI entries.
      labels?:
        type: label.KVLabels
        (pragma.omitEmpty):
        description: |
          Metadata as key/value pair. Possible uses include VIPs,
          per-network-interface binding

  NetworkMode:
    type: string
    enum: [container, host]
  Network:
    type: object
    properties:
      name?:
        type: strings.Name
        description: |
          Defines the name of the container network to join.
          Not for use with `host` mode networking.
      mode?:
        type: NetworkMode
        default: container
      labels?:
        type: label.KVLabels
        (pragma.omitEmpty):
        description: |
          Labels applied to the pod's NetworkInfo.
          Ignored when using `host` node networking.
  IpDiscoveryPort:
    type: object
    description: Port
    properties:
      number?:
        type: numbers.AnyPort
        format: int32
        description: The port number
        default: 0
      name:
        type: string
        description: Name of the port
        pattern: ^[a-z][a-z0-9-]*$
      protocol?:
        type: strings.NetworkProtocol
        default: tcp
  IpDiscovery:
    type: object
    description: Information useful for service discovery
    properties:
      ports?:
        type: IpDiscoveryPort[]
        (pragma.omitEmpty):
        description: |
          Array of objects describing the ports exposed by each task
  IpAddress:
    type: object
    (pragma.deprecated): Experimental API that is now deprecated. Prefer portMappings
    description: |
      If an application definition includes the 'ipAddress' field, then Marathon
      will request a per-task IP from Mesos.
      A separate ports/portMappings configuration is then disallowed.
    properties:
      discovery?:
        type: IpDiscovery
        description: |
          DEPRECATED. Please try to use portMappings instead.
      groups?:
        type: array
        (pragma.omitEmpty):
        description: |
          DEPRECATED. Will be ignored in a future release.
          Array of network groups.
          One IP address can belong to zero or more network groups.
          The idea is that containers can only reach containers with which they
          share at least one network group.
        items: string
      labels?:
        type: label.KVLabels
        (pragma.omitEmpty):
      networkName?:
        type: string
        description: |
          If present, declares the name of the network that the container should
          join.
          In practice it is up to the IPAM to decide how to interpret this field
  PortDefinition:
    type: object
    properties:
      port?:
        type: integer
        format: int32
        default: 0
        description: |
          If requirePorts is set to true, then this port number will be used
          on the agent host. Otherwise if the requirePorts is set to false and
          this port number is not zero, then it will be used as a service port
          and a dynamic port will be used on the agent host.
          If it is set to zero, a dynamic port will be used on the host and a
          unique service port will be assigned by Marathon.
      labels?:
        type: label.KVLabels
        (pragma.omitEmpty):
      name?:
        type: string
        description: |
          Name of the service hosted on this port.
          If provided, it must be unique over all port definitions.
        pattern: ^[a-z][-a-z0-9]*$
      protocol?:
        type: strings.NetworkProtocol
        default: tcp
        description: If this port is used for tcp or udp or both.

#%RAML 1.0 Library
uses:
  label: label.raml
  numbers: numberTypes.raml
  strings: stringTypes.raml
  pragma: pragma.raml
types:
  Endpoint:
    type: object
    description: |
      Endpoints accept connections from outside of a pod.
      Endpoints may also be advertised outside of a cluster.
    properties:
      name:
        type: strings.Name
        description: |
          Name of this port. Should be unique in the context of the pod.
      containerPort?:
        type: numbers.Port
        description: |
          The container port that a task's process is actually listening on.
          Required if the network mode is container
      hostPort?:
        type: numbers.AnyPort
        description: |
          Mapped port on the host.
          All host ports are allocated from resource offers.
        usage: Specify 0 to tell Marathon to dynamically allocate a host port.
      protocol?:
        type: array
        (pragma.omitEmpty):
        items: strings.Name
        minItems: 1
        description: |
          The protocol of this port, advertised in Mesos DiscoveryInfo (DI).
          Specifying more than one protocol here will result in the generation
          of multiple Port DI entries.
      labels?:
        type: label.KVLabels
        (pragma.omitEmpty):
        description: |
          Metadata as key/value pair. Possible uses include VIPs,
          per-network-interface binding

  NetworkMode:
    type: string
    enum: [container, host]
  Network:
    type: object
    properties:
      name?:
        type: strings.Name
        description: |
          Defines the name of the container network to join.
          Not for use with `host` mode networking.
      mode?:
        type: NetworkMode
        default: container
      labels?:
        type: label.KVLabels
        (pragma.omitEmpty):
        description: |
          Labels applied to the pod's NetworkInfo.
          Ignored when using `host` node networking.
  IpDiscoveryPort:
    type: object
    description: Port
    properties:
      number?:
        type: numbers.AnyPort
        format: int32
        description: The port number
        default: 0
      name:
        type: string
        description: Name of the port
        pattern: ^[a-z][a-z0-9-]*$
      protocol?:
        type: strings.NetworkProtocol
        default: tcp
  IpDiscovery:
    type: object
    description: Information useful for service discovery
    properties:
      ports?:
        type: IpDiscoveryPort[]
        (pragma.omitEmpty):
        description: |
          Array of objects describing the ports exposed by each task
  IpAddress:
    type: object
    (pragma.deprecated): Experimental API that is now deprecated. Prefer portMappings
    description: |
      If an application definition includes the 'ipAddress' field, then Marathon
      will request a per-task IP from Mesos.
      A separate ports/portMappings configuration is then disallowed.
    properties:
      discovery?:
        type: IpDiscovery
        description: |
          DEPRECATED. Please try to use portMappings instead.
      groups?:
        type: array
        (pragma.omitEmpty):
        description: |
          DEPRECATED. Will be ignored in a future release.
          Array of network groups.
          One IP address can belong to zero or more network groups.
          The idea is that containers can only reach containers with which they
          share at least one network group.
        items: string
      labels?:
        type: label.KVLabels
        (pragma.omitEmpty):
      networkName?:
        type: string
        description: |
          If present, declares the name of the network that the container should
          join.
          In practice it is up to the IPAM to decide how to interpret this field
  PortDefinition:
    type: object
    properties:
      port?:
        type: integer
        format: int32
        default: 0
        description: |
          if requirePorts is set to true, then this port number will be used
          on the agent host Otherwise if the requirePorts is set to false and
          this port number is not zero, then it will be used as a service port
          and a dynamic port will be used on the agent host.
          If it is set to zero, a dynamic port will be used on the host and a
          unique service port will be assigned by Marathon.
      labels?:
        type: label.KVLabels
        (pragma.omitEmpty):
      name?:
        type: string
        description: |
          Name of the service hosted on this port.
          If provided, it must be unique over all port definitions.
        pattern: ^[a-z][-a-z0-9]*$
      protocol?:
        type: strings.NetworkProtocol
        default: tcp
        description: If this port is used for tcp or udp or both.


Fixed #954 - missing /reset from API docs

#%RAML 0.8
---
title: WireMock
version: 2.19.0
mediaType: application/json
baseUri: /__admin

protocols:
  - HTTPS
  - HTTP

documentation:
  - title: WireMock admin
    content: |
       The WireMock admin API.

schemas:
  - stubMapping: !include schemas/stub-mapping.schema.json
  - stubMappings: !include schemas/stub-mappings.schema.json
  - loggedRequest: !include schemas/logged-request.schema.json
  - requestPattern: !include schemas/request-pattern.schema.json
  - contentPattern: !include schemas/content-pattern.schema.json
  - snapshot: !include schemas/snapshot.schema.json
  - startRecording: !include schemas/start-recording.schema.json
  - scenarios: !include schemas/scenarios.schema.json
  - globalSettings: !include schemas/global-settings.schema.json

/mappings:
  description: Stub mappings

  get:
    description: Get all stub mappings

    queryParameters:
      limit:
        displayName: Query limit
        type: number
        description: The maximum number of results to return
        example: 10
        required: false
      offset:
        displayName: Query offset
        type: number
        description: The start index of the results to return
        example: 25
        required: false

    responses:
      200:
        description: All stub mappings
        body:
          application/json:
            schema: stubMappings
            example: !include examples/stub-mappings.example.json

  post:
    description: Create a new stub mapping
    body:
      application/json:
        example: !include examples/stub-mapping-no-id.example.json
        schema: stubMapping

    responses:
      201:
        description: Successfully created
        body:
          application/json:
            example: !include examples/stub-mapping-with-id.example.json
            schema: stubMapping

  delete:
    description: Delete all stub mappings
    responses:
      200:
        description: Successfully deleted
        body:
          application/json:
            example: !include examples/empty.example.json

  /reset:
      description: Stub mappings
      post:
        description: Reset stub mappings (restore to defaults defined back the backing store)
        responses:
          200:
            description: Successfully reset

  /{stubMappingId}:
    description: Single stub mapping
    get:
      description: Get a single stub mapping
      responses:
        200:
          body:
            application/json:
              example: !include examples/stub-mapping-with-id.example.json
              schema: stubMapping

    uriParameters:
      stubMappingId:
        required: true
        example: 730d3e32-d098-4169-a20c-554c3bedce58
        displayName: Stub mapping ID
        description: The UUID of stub mapping

    put:
      description: Update an existing stub mapping
      body:
        application/json:
          example: !include examples/stub-mapping-no-id.example.json
          schema: stubMapping

      responses:
        200:
          body:
            application/json:
              schema: stubMapping
              example: !include examples/stub-mapping-with-id.example.json

    delete:
      description: Delete a stub mapping
      responses:
        200:
          body:
            application/json:
              example: !include examples/empty.example.json

  /save:
    description: Stub mappings
    post:
      description: Save all persistent stub mappings to the backing store
      responses:
        200:
          description: Successfully removed

  /find-by-metadata:
    post:
      description: Find stubs by matching on their metadata
      body:
        application/json:
          example: !include examples/by-metadata-request.example.json
          schema: contentPattern

      responses:
        200:
          body:
            application/json:
              example: !include examples/stub-mappings.example.json

  /remove-by-metadata:
      post:
        description: Remove stubs by matching on their metadata
        body:
          application/json:
            example: !include examples/by-metadata-request.example.json
            schema: contentPattern

        responses:
          200:
            description: The stub mappings were successfully removed

/requests:
  description: Logged requests and responses received by the mock service

  get:
    description: Get received requests
    queryParameters:
      limit:
        displayName: Query limit
        description: The maximum number of results to return
        example: 10
      since:
        example: 2016-10-05T12:33:01Z
        displayName: Since date
        description: Only return logged requests after this date

    responses:
      200:
        body:
          application/json:
            example: !include examples/serve-events.example.json
  delete:
    description: Delete all received requests
    responses:
      200:
        description: Successfully deleted
        body:
          application/json:
            example: !include examples/empty.example.json

  /{requestId}:
    description: Single logged request
    get:
      responses:
        200:
          body:
            application/json:
              example: !include examples/request.example.json

    uriParameters:
      requestId:
        displayName: Request ID
        description: The UUID of the logged request
        required: true
        example: 12fb14bb-600e-4bfa-bd8d-be7f12562c99

  /reset:
    description: Request journal
    post:
      description: Empty the request journal
      responses:
        200:
          description: Successfully reset
          body:
            application/json:
              example: !include examples/empty.example.json

  /count:
    description: Request journal
    post:
      description: Count requests logged in the journal matching the specified criteria
      body:
        application/json:
          schema: requestPattern
          example: !include examples/request-pattern.example.json

      responses:
        200:
          description: Number of matching requests
          body:
            application/json:
              example: !include examples/request-count.example.json

  /find:
    post:
      description: Retrieve details of requests logged in the journal matching the specified criteria
      body:
        application/json:
          schema: requestPattern
          example: !include examples/request-pattern.example.json

      responses:
        200:
          description: Matching request details
          body:
            application/json:
              example: !include examples/requests.example.json

  /unmatched:
    get:
      description: Get details of logged requests that weren't matched by any stub mapping
      responses:
        200:
          description: Unmatched request details
          body:
            application/json:
              example: !include examples/requests.example.json

    /near-misses:
      get:
        description: Retrieve near-misses for all unmatched requests
        responses:
          200:
            description: Top 3 (at most) near misses for each unmatched request
            body:
              application/json:
                example: !include examples/near-misses.example.json

/recordings:
  description: Stub mapping record and snapshot functions

  /start:
    description: Start recording stub mappings
    post:
      description: Start recording stub mappings
      body:
        application/json:
          schema: startRecording
          example: !include examples/record-spec.example.json

      responses:
        200:
          description: Successfully started recording

  /stop:
    description: Stop recording stub mappings
    post:
        description: Stop recording stub mappings
        responses:
          200:
            description: Successfully started recording
            body:
              application/json:
                schema: stubMappings
                example: !include examples/recorded-stub-mappings.example.json

  /status:
    description: Recording status
    get:
      description: Get the recording status (started or stopped)

      responses:
        200:
          description: Successfully got the record status
          body:
            application/json:
              example: |
                {
                  "status" : "Stopped"
                }

  /snapshot:
    description: Snapshot recording
    post:
      description: Take a snapshot recording
      body:
        application/json:
          schema: snapshot
          example: !include examples/snapshot-spec.example.json

      responses:
          200:
            description: Successfully took a snapshot recording
            body:
              application/json:
                schema: stubMappings
                example: !include examples/recorded-stub-mappings.example.json

/scenarios:
  description: Scenarios support modelling of stateful behaviour

  get:
    description: Get all scenarios

    responses:
      200:
        description: All scenarios
        body:
          application/json:
            schema: scenarios
            example: !include examples/scenarios.example.json

  /reset:
    description: Scenarios
    post:
      description: Reset the state of all scenarios
      responses:
        200:
          description: Successfully reset
          body:
            application/json:
              example: !include examples/empty.example.json

/near-misses:
  description: Near misses allow querying of received requests or request patterns according to similarity

  /request:
    post:
      description: Find at most 3 near misses for closest stub mappings to the specified request
      body:
        application/json:
          schema: loggedRequest
          example: !include examples/logged-request.example.json

      responses:
        200:
          description: Near misses matching criteria
          body:
            application/json:
              example: !include examples/near-misses.example.json

  /request-pattern:
    description: Near misses
    post:
      description: Find at most 3 near misses for closest logged requests to the specified request pattern
      body:
        application/json:
          schema: requestPattern
          example: !include examples/request-pattern.example.json

      responses:
        200:
          description: Near misses matching criteria
          body:
            application/json:
              example: !include examples/near-misses.example.json

/settings:
  description: Global settings
  post:
    description: Update global settings
    body:
      application/json:
        schema: globalSettings
        example: |
          {
              "fixedDelay": 500
          }

    responses:
      200:
        description: Settings successfully updated

/reset:
  description: Reset all
  post:
    description: Reset mappings to the default set and reset the request journal
    responses:
      200:
        description: Successfully reset
        body:
          application/json:
            example: !include examples/empty.example.json

/shutdown:
  description: Shutdown function
  post:
    description: Shutdown the WireMock server
    responses:
      200:
        description: Server will be shut down

#%RAML 0.8
---
title: WireMock
version: 2.19.0
mediaType: application/json
baseUri: /__admin

protocols:
  - HTTPS
  - HTTP

documentation:
  - title: WireMock admin
    content: |
       The WireMock admin API.

schemas:
  - stubMapping: !include schemas/stub-mapping.schema.json
  - stubMappings: !include schemas/stub-mappings.schema.json
  - loggedRequest: !include schemas/logged-request.schema.json
  - requestPattern: !include schemas/request-pattern.schema.json
  - contentPattern: !include schemas/content-pattern.schema.json
  - snapshot: !include schemas/snapshot.schema.json
  - startRecording: !include schemas/start-recording.schema.json
  - scenarios: !include schemas/scenarios.schema.json
  - globalSettings: !include schemas/global-settings.schema.json

/mappings:
  description: Stub mappings

  get:
    description: Get all stub mappings

    queryParameters:
      limit:
        displayName: Query limit
        type: number
        description: The maximum number of results to return
        example: 10
        required: false
      offset:
        displayName: Query offset
        type: number
        description: The start index of the results to return
        example: 25
        required: false

    responses:
      200:
        description: All stub mappings
        body:
          application/json:
            schema: stubMappings
            example: !include examples/stub-mappings.example.json

  post:
    description: Create a new stub mapping
    body:
      application/json:
        example: !include examples/stub-mapping-no-id.example.json
        schema: stubMapping

    responses:
      201:
        description: Successfully created
        body:
          application/json:
            example: !include examples/stub-mapping-with-id.example.json
            schema: stubMapping

  delete:
    description: Delete all stub mappings
    responses:
      200:
        description: Successfully deleted
        body:
          application/json:
            example: !include examples/empty.example.json

  /reset:
      description: Stub mappings
      post:
        description: Reset stub mappings (restore to defaults defined back the backing store)
        responses:
          200:
            description: Successfully reset

  /{stubMappingId}:
    description: Single stub mapping
    get:
      description: Get a single stub mapping
      responses:
        200:
          body:
            application/json:
              example: !include examples/stub-mapping-with-id.example.json
              schema: stubMapping

    uriParameters:
      stubMappingId:
        required: true
        example: 730d3e32-d098-4169-a20c-554c3bedce58
        displayName: Stub mapping ID
        description: The UUID of stub mapping

    put:
      description: Update an existing stub mapping
      body:
        application/json:
          example: !include examples/stub-mapping-no-id.example.json
          schema: stubMapping

      responses:
        200:
          body:
            application/json:
              schema: stubMapping
              example: !include examples/stub-mapping-with-id.example.json

    delete:
      description: Delete a stub mapping
      responses:
        200:
          body:
            application/json:
              example: !include examples/empty.example.json

  /save:
    description: Stub mappings
    post:
      description: Save all persistent stub mappings to the backing store
      responses:
        200:
          description: Successfully removed

  /find-by-metadata:
    post:
      description: Find stubs by matching on their metadata
      body:
        application/json:
          example: !include examples/by-metadata-request.example.json
          schema: contentPattern

      responses:
        200:
          body:
            application/json:
              example: !include examples/stub-mappings.example.json

  /remove-by-metadata:
      post:
        description: Remove stubs by matching on their metadata
        body:
          application/json:
            example: !include examples/by-metadata-request.example.json
            schema: contentPattern

        responses:
          200:
            description: The stub mappings were successfully removed

/requests:
  description: Logged requests and responses received by the mock service

  get:
    description: Get received requests
    queryParameters:
      limit:
        displayName: Query limit
        description: The maximum number of results to return
        example: 10
      since:
        example: 2016-10-05T12:33:01Z
        displayName: Since date
        description: Only return logged requests after this date

    responses:
      200:
        body:
          application/json:
            example: !include examples/serve-events.example.json
  delete:
    description: Delete all received requests
    responses:
      200:
        description: Successfully deleted
        body:
          application/json:
            example: !include examples/empty.example.json

  /{requestId}:
    description: Single logged request
    get:
      responses:
        200:
          body:
            application/json:
              example: !include examples/request.example.json

    uriParameters:
      requestId:
        displayName: Request ID
        description: The UUID of the logged request
        required: true
        example: 12fb14bb-600e-4bfa-bd8d-be7f12562c99

  /reset:
    description: Request journal
    post:
      description: Empty the request journal
      responses:
        200:
          description: Successfully reset
          body:
            application/json:
              example: !include examples/empty.example.json

  /count:
    description: Request journal
    post:
      description: Count requests logged in the journal matching the specified criteria
      body:
        application/json:
          schema: requestPattern
          example: !include examples/request-pattern.example.json

      responses:
        200:
          description: Number of matching requests
          body:
            application/json:
              example: !include examples/request-count.example.json

  /find:
    post:
      description: Retrieve details of requests logged in the journal matching the specified criteria
      body:
        application/json:
          schema: requestPattern
          example: !include examples/request-pattern.example.json

      responses:
        200:
          description: Matching request details
          body:
            application/json:
              example: !include examples/requests.example.json

  /unmatched:
    get:
      description: Get details of logged requests that weren't matched by any stub mapping
      responses:
        200:
          description: Unmatched request details
          body:
            application/json:
              example: !include examples/requests.example.json

    /near-misses:
      get:
        description: Retrieve near-misses for all unmatched requests
        responses:
          200:
            description: Top 3 (at most) near misses for each unmatched request
            body:
              application/json:
                example: !include examples/near-misses.example.json

/recordings:
  description: Stub mapping record and snapshot functions

  /start:
    description: Start recording stub mappings
    post:
      description: Start recording stub mappings
      body:
        application/json:
          schema: startRecording
          example: !include examples/record-spec.example.json

      responses:
        200:
          description: Successfully started recording

  /stop:
    description: Stop recording stub mappings
    post:
        description: Stop recording stub mappings
        responses:
          200:
            description: Successfully started recording
            body:
              application/json:
                schema: stubMappings
                example: !include examples/recorded-stub-mappings.example.json

  /status:
    description: Recording status
    get:
      description: Get the recording status (started or stopped)

      responses:
        200:
          description: Successfully got the record status
          body:
            application/json:
              example: |
                {
                  "status" : "Stopped"
                }

  /snapshot:
    description: Snapshot recording
    post:
      description: Take a snapshot recording
      body:
        application/json:
          schema: snapshot
          example: !include examples/snapshot-spec.example.json

      responses:
          200:
            description: Successfully took a snapshot recording
            body:
              application/json:
                schema: stubMappings
                example: !include examples/recorded-stub-mappings.example.json

/scenarios:
  description: Scenarios support modelling of stateful behaviour

  get:
    description: Get all scenarios

    responses:
      200:
        description: All scenarios
        body:
          application/json:
            schema: scenarios
            example: !include examples/scenarios.example.json

  /reset:
    description: Scenarios
    post:
      description: Reset the state of all scenarios
      responses:
        200:
          description: Successfully reset
          body:
            application/json:
              example: !include examples/empty.example.json

/near-misses:
  description: Near misses allow querying of received requests or request patterns according to similarity

  /request:
    post:
      description: Find at most 3 near misses for closest stub mappings to the specified request
      body:
        application/json:
          schema: loggedRequest
          example: !include examples/logged-request.example.json

      responses:
        200:
          description: Near misses matching criteria
          body:
            application/json:
              example: !include examples/near-misses.example.json

  /request-pattern:
    description: Near misses
    post:
      description: Find at most 3 near misses for closest logged requests to the specified request pattern
      body:
        application/json:
          schema: requestPattern
          example: !include examples/request-pattern.example.json

      responses:
        200:
          description: Near misses matching criteria
          body:
            application/json:
              example: !include examples/near-misses.example.json

/settings:
  description: Global settings
  post:
    description: Update global settings
    body:
      application/json:
        schema: globalSettings
        example: |
          {
              "fixedDelay": 500
          }

    responses:
      200:
        description: Settings successfully updated

/shutdown:
  description: Shutdown function
  post:
    description: Shutdown the WireMock server
    responses:
      200:
        description: Server will be shut down


Some more descriptions

Some more descriptions

#%RAML 0.8
---
title: Order Management API
baseUri: https://api.bring.com/po/api/v1

documentation:
- title: Introduction
  content: |
    There are different customer types in Order Management and depending on what kind of customer you are setts the usage pattern for Order Management API.

    This is a step-by-step guide on how to use the API.

    A typical usage pattern for an Warehousing cutomer type is to create an order in Order Management that will go to the correct warehouse for picking, packing and sending. Then follow up with creating a packing list from the warehouse with transport information. All steps can be followed in Order Management.

    An other usage pattern is for an purchase order customer that create purchase orders and lets all of his suppliers get the order from Order Management. The suppliers will check whether a customer is a Order Management customer. Follow up with creating a packing list with transport information. All events and status changes will go back to purchase order owner.

    Order Management 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.

    Please note that this API currently doesn't support json on all of its methods yet. Look in the example section to see which are supported.

    ## SOAP

    ### Versioning

    Order Management 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.

    We make an effort not to return new elements in the response when an old schema version is specified. When changes in the schema are made, 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 API (not Web Services), an XML Schema is not used at all. Therefore, clients of the XML API are expected to handle new elements that appear. Nevertheless, the response will be backwards compatible in the sense that elements are not renamed or deleted.

    ### WSDL

    [https://api.bring.com/po/api/ws/purchaseorder-v1.wsdl](https://api.bring.com/po/api/ws/purchaseorder-v1.wsdl)

    ## Error handling

    When using the Order Management, 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).

    See [the list of error codes](#list-error-codes) for hints on how to implement error handling.

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

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

    Those headers must be set for all endpoints documented below.

/purchaseorderCustomer/{customerId}:
  displayName: Check if customer is valid for order management
  description: |
      Check if a given customer number is an valid Order Management customer.
  get:
    description:
     Check if customer is valid for order management
    responses:
      200:
        displayName: Success
        description: |
          Returns `true` if given customer is a valid for order management.
        body:
          application/xml:
            example: !include examples/verify_customer.xml

/order/{customerId}/{orderId}:
  displayName: List order information
  description: |
      Get all information on a given order.
  get:
    description: List order information
    responses:
      200:
        displayName: Success
        description: |
          Complete order information including order items.
        body:
          application/xml:
            example: !include examples/retrieve_purchaseorder.xml

/order:
  displayName: Send an order
  description: |
      Send an order to Order Management. There are different types of order supported in Order Management.

       - Order / SalesOrder (as an pickorder for Warehousing)
            - Order Management act as an order repository.
            - When Warehousing functionality Order Management sends it to Warhousing system for picking and delivery.
       - PurchaseOrder
            - Order Management can give your suppliers access to purchase orders so they can get info, confirm, accept and deliver on them.
            - When Warehousing functionality Order Management sends it to Warhousing system for receiving notice.
  post:
    description: Send an order
    body:
      application/xml:
        example: !include examples/create_purchaseorder.xml
    responses:
      200:
        displayName: Success
        description: |
          Successfully created a order.

/items/{customerId}/{orderId}:
  displayName: List order items
  description: |
      List all item lines on an order.
  get:
    description: List order items
    responses:
      200:
        displayName: Success
        description: |
          List of order items.
        body:
          application/xml:
            example: !include examples/retrieve_orderitems.xml

/transport/{customerId}/{orderId}:
  displayName: List transport orders for order
  description: |
      List all transport information for this order. One order can have multiple transport orders.
  get:
    description: List transport orders for order
    responses:
      200:
        displayName: Success
        description: |
          List of transport orders for given order, if any.
        body:
          application/xml:
            example: !include examples/retrieve_packinglist.xml

/transport:
  displayName: Add packaging list
  description: |
      When an order have been picked and sent, add packing list on order with transport information.
  post:
    description: Add packaging list
    body:
      application/xml:
        example: !include examples/create_packaging_list.xml
    responses:
      200:
        displayName: Success
        description: |
          Successfully added packaging list.

/senderStatus/{customerId}/{orderId}:
  displayName: Get status for order
  description: |
      Check status for an order. Open when not fully delivered or locked when fully delivered.
  get:
    description: Get status for order
    responses:
      200:
        displayName: Success
        description: Open or Locked.
        body:
          application/xml:
            example: !include examples/check_status.xml

/event:
  displayName: Create TMSEvents
  description: |
      Create tracking events on shipments associated with orders in Order Management.
  post:
    description: Create TMSEvents
    body:
      application/xml:
        example: !include examples/create_events.xml
    responses:
      200:
        displayName: Success
        description: |
          Successfully created a new resource

/articlebalance:
  displayName: Create or update article balance list
  post:
    description: Create or update article balance list
    body:
      application/xml:
        example: !include examples/create_articlebalance.xml
    responses:
      200:
        displayName: Success
        description: |
          Successfully created balance list

/articlebalance/{customerId}/{articleNo}:
  displayName: Get stock balance and info for one article
  get:
    description: Get stock balance and info for one article
    responses:
      200:
        displayName: Success
        description: |
        body:
          application/xml:
            example: !include examples/retrieve_articlebalance_one.xml

/articlebalance/info/{customerId}/{articleSearchString}:
  displayName: Get stock balance and info for all articles matching search string
  get:
    description: Get stock balance and info for all articles matching search string
    responses:
      200:
        displayName: Success
        description: |
        body:
          application/xml:
            example: !include examples/retrieve_articlebalance_search.xml

/errorCodes:
  displayName: List error codes
  get:
    description: List error codes
    responses:
      200:
        displayName: Success
        description: |
          Dynamic list of error codes used in the solution.
        body:
          application/xml:
            example: !include examples/error_codes.xml
          application/json:
            example: !include examples/error_codes.json

#%RAML 0.8
---
title: Order Management API
baseUri: https://api.bring.com/po/api/v1

documentation:
- title: Introduction
  content: |
    There are different customer types in Order Management and depending on what kind of customer you are setts the usage pattern for Order Management API.

    This is a step-by-step guide on how to use the API.

    A typical usage pattern for an Warehousing cutomer type is to create an order in Order Management that will go to the correct warehouse for picking, packing and sending. Then follow up with creating a packing list from the warehouse with transport information. All steps can be followed in Order Management.

    An other usage pattern is for an purchase order customer that create purchase orders and lets all of his suppliers get the order from Order Management. The suppliers will check whether a customer is a Order Management customer. Follow up with creating a packing list with transport information. All events and status changes will go back to purchase order owner.

    Order Management 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.

    Please note that this API currently doesn't support json on all of its methods yet. Look in the example section to see which are supported.

    ## SOAP

    ### Versioning

    Order Management 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.

    We make an effort not to return new elements in the response when an old schema version is specified. When changes in the schema are made, 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 API (not Web Services), an XML Schema is not used at all. Therefore, clients of the XML API are expected to handle new elements that appear. Nevertheless, the response will be backwards compatible in the sense that elements are not renamed or deleted.

    ### WSDL

    [https://api.bring.com/po/api/ws/purchaseorder-v1.wsdl](https://api.bring.com/po/api/ws/purchaseorder-v1.wsdl)

    ## Error handling

    When using the Order Management, 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).

    See [the list of error codes](#list-error-codes) for hints on how to implement error handling.

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

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

    Those headers must be set for all endpoints documented below.

/purchaseorderCustomer/{customerId}:
  displayName: Check if customer is valid for order management
  description: |
      Check if a given customer number is an valid Order Management customer.
  get:
    description:
     Check if customer is valid for order management
    responses:
      200:
        displayName: Success
        description: |
          Returns `true` if given customer is a valid for order management.
        body:
          application/xml:
            example: !include examples/verify_customer.xml

/order/{customerId}/{orderId}:
  displayName: List order information
  description: |
      Get all information on a given order.
  get:
    description: List order information
    responses:
      200:
        displayName: Success
        description: |
          Complete order information including order items.
        body:
          application/xml:
            example: !include examples/retrieve_purchaseorder.xml

/order:
  displayName: Send an order
  description: |
      Send an order to Order Management. There are different types of order supported in Order Management.

       - Order / SalesOrder (as an pickorder for Warehousing)
            - Order Management act as an order repository.
            - When Warehousing functionality Order Management sends it to Warhousing system for picking and delivery.
       - PurchaseOrder
            - Order Management can give your suppliers access to purchase orders so they can get info, confirm, accept and deliver on them.
            - When Warehousing functionality Order Management sends it to Warhousing system for receiving notice.
  post:
    description: Send an order
    responses:
      200:
        displayName: Success
        description: |
          Successfully created a order.
        body:
          application/xml:
            example: !include examples/create_purchaseorder.xml

/items/{customerId}/{orderId}:
  displayName: List order items
  description: |
      List all item lines on an order.
  get:
    description: List order items
    responses:
      200:
        displayName: Success
        description: |
          List of order items.
        body:
          application/xml:
            example: !include examples/retrieve_orderitems.xml

/transport/{customerId}/{orderId}:
  displayName: List transport orders for order
  description: |
      List all transport information for this order. One order can have multiple transport orders.
  get:
    description: List transport orders for order
    responses:
      200:
        displayName: Success
        description: |
          List of transport orders for given order, if any.
        body:
          application/xml:
            example: !include examples/retrieve_packinglist.xml

/transport:
  displayName: Add packaging list
  description: |
      When an order have been picked and sent, add packing list on order with transport information.
  post:
    description: Add packaging list
    body:
      application/xml:
        example: !include examples/create_packaging_list.xml
    responses:
      200:
        displayName: Success
        description: |
          Successfully added packaging list.

/senderStatus/{customerId}/{orderId}:
  displayName: Get status for order
  description: |
      Check status for an order. Open when not fully delivered or locked when fully delivered.
  get:
    description: Get status for order
    responses:
      200:
        displayName: Success
        description: Open or Locked.
        body:
          application/xml:
            example: !include examples/check_status.xml

/event:
  displayName: Create TMSEvents
  post:
    description: Create TMSEvents
    body:
      application/xml:
        example: !include examples/create_events.xml
    responses:
      200:
        displayName: Success
        description: |
          Successfully created a new resource

/articlebalance:
  displayName: Create or update article balance list
  post:
    description: Create or update article balance list
    body:
      application/xml:
        example: !include examples/create_articlebalance.xml
    responses:
      200:
        displayName: Success
        description: |
          Successfully created balance list

/articlebalance/{customerId}/{articleNo}:
  displayName: Get stock balance and info for one article
  get:
    description: Get stock balance and info for one article
    responses:
      200:
        displayName: Success
        description: |
        body:
          application/xml:
            example: !include examples/retrieve_articlebalance_one.xml

/articlebalance/info/{customerId}/{articleSearchString}:
  displayName: Get stock balance and info for all articles matching search string
  get:
    description: Get stock balance and info for all articles matching search string
    responses:
      200:
        displayName: Success
        description: |
        body:
          application/xml:
            example: !include examples/retrieve_articlebalance_search.xml

/errorCodes:
  displayName: List error codes
  get:
    description: List error codes
    responses:
      200:
        displayName: Success
        description: |
          Dynamic list of error codes used in the solution.
        body:
          application/xml:
            example: !include examples/error_codes.xml
          application/json:
            example: !include examples/error_codes.json


fix big typo in jobs RAML

fix big typo in jobs RAML

description: Run Gears on distributed computing
get:
  description: List all jobs
  responses:
    200:
      body:
        application/json:
          example: !include ../examples/job_list.json
          schema: !include ../schemas/output/job-list.json
/add:
  description: Add a job
  post:
    body:
      application/json:
        example: !include ../examples/job_new.json
    responses:
      200:
        body:
          application/json:
            example: |
              {
                "_id": "573cb66b135d87002660597c"
              }
            schema: !include ../schemas/output/job-new.json
/next:
  description: Used by the engine
  get:
    description: Get the next job in the queue
    responses:
      200:
        body:
          application/json:
            example: !include ../examples/job.json
/stats:
  description: Job stats
  get:
    description: Get stats about all current jobs
    responses:
      200:
        body:
          application/json:
            example: !include ../examples/job_stats.json
/reap:
  description: Reap stale jobs
  post:
    responses:
      200:
        body:
          application/json:
            example: |
              {
                "orphaned":3
              }
/{JobId}:
  description: Perform actions with a specific job
  uriParameters:
    JobId:
      type: string
  get:
    description: Get job details
    responses:
      200:
        body:
          application/json:
            example: !include ../examples/job.json
            schema: !include ../schemas/output/job.json
      404:
        description: JobId not found
  put:
    description: |
      Update a job. Updates timestamp.
      Enforces a valid state machine transition, if any.
      Rejects any change to a job that is not currently in 'pending' or 'running' state.
      Accepts the same body as /api/jobs/add , except all fields are optional.
    body:
      application/json:
        example: !include ../examples/input/job-update.json
    responses:
      200:
        description: Job was updated.  No value is returned
  /retry:
    description: Retry a job
    post:
      description: |
        Retry a job
        The job must have a state of 'failed', and must not have already been retried.
        The failed jobs config is copied to a new job.
        The ID of the new job is returned
      responses:
        200:
          body:
            application/json:
              example: |
                {"_id":"57a35c118120be0e8d1f3f5f"}
  /config.json:
    get:
      description: Get a job's config
      responses:
        200:
          body:
            application/json:
              example: !include ../examples/output/job-config.json

description: Run Gears on distributed computing
get:
  description: List all jobs
  responses:
    200:
      body:
        application/json:
          example: !include ../examples/job_list.json
          schema: !include ../schemas/output/job-list.json
/add:
  description: Add a job
  post:
    body:
      application/json:
        example: !include ../examples/job_new.json
    responses:
      200:
        body:
          application/json:
            example: |
              {
                "_id": "573cb66b135d87002660597c"
              }
            schema: !include ../schemas/output/job-new.json
/next:
  description: Used by the engine
  get:
    description: Get the next job in the queue
    responses:
      200:
        body:
          application/json:
            example: !include ../examples/job.json
/stats:
  description: Job stats
  get:
    description: Get stats about all current jobs
    responses:
      200:
        body:
          application/json:
            example: !include ../examples/job_stats.json
/reap:
  description: Reap stale jobs
  post:
    responses:
      200:
        body:
          application/json:
            example: |
              {
                "orphaned":3
              }
/{JobId}:
  description: Perform actions with a specific job
  uriParameters:
    JobId:
      type: string
  get:
    description: Get info about a specific job
    responses:
      200:
        body:
          application/json:
            example: !include ../examples/job.json
      404:
        description: JobId not found
  put:
    description: |
      Update a job. Updates timestamp.
      Enforces a valid state machine transition, if any.
      Rejects any change to a job that is not currently in 'pending' or 'running' state.
      Accepts the same body as /api/jobs/add , except all fields are optional.
    body:
      application/json:
        example: |
          {
            "tags":[
              "test-tag"
            ]
          }
    responses:
      200:
        description: |
          The job has been updated.  No response body is sent.
/{JobId}:
  uriParameters:
    JobId:
      type: string
  get:
    description: Get job details
    responses:
      200:
        body:
          application/json:
            example: !include ../examples/job.json
            schema: !include ../schemas/output/job.json
  put:
    description: Update a job
    body:
      application/json:
        example: !include ../examples/input/job-update.json
    responses:
      200:
        description: Job was updated.  No value is returned
  /retry:
    description: Retry a job
    post:
      description: |
        Retry a job
        The job must have a state of 'failed', and must not have already been retried.
        The failed jobs config is copied to a new job.
        The ID of the new job is returned
      responses:
        200:
          body:
            application/json:
              example: |
                {"_id":"57a35c118120be0e8d1f3f5f"}
  /config.json:
    get:
      description: Get a job's config
      responses:
        200:
          body:
            application/json:
              example: !include ../examples/output/job-config.json