Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Url naar yaml files toegevoegd

Table of Contents

Inleiding

In dit document wordt de webservice MediaOrderB2C toegelicht. Deze webservice is ontwikkeld met REST/JSON.

Resources en operaties

In REST wordt gebruik gemaakt van Resources en Operaties. Een resource kan gezien worden als object, een operatie als activiteit op een object. De volgende resources zijn onderkent:

...

Resource

(object)

...

YAML

...

Operatie

(activiteit op een object)

...

Van

...

Naar

...

Beschrijving

...

Het versturen van een bestand (PDF) dat als bijlage aan een order gekoppeld is.

Het bestand wordt bij het gereed maken van de zending geprint en bijgevoegd in de doos. Het PDF bestand dient voorafgaand aan de order door CB ontvangen te zijn.

Opmerking: Deze operatie is nog niet beschikbaar.

...

Het versturen van een order naar CB. 

De bestelling. Bij ontvangst van de order wordt een basis validatie uitgevoerd, indien er geen uitzonderingen zijn aangetroffen zal de order als ontvangen opdracht wordt vastgelegd en wordt er als reply een bevestiging naar de klant gestuurd. 

...

Het opvragen van de status van de door de klant ingediende order.

Bij vooraf gedefinieerde statusveranderingen van een order (events) wordt een notify signaal naar de klant gestuurd, operatie notifyOrder. De klant kan vervolgens de gedetailleerde orderstatus bij CB opvragen. De orderstatus geeft informatie van de gehele oorspronkelijk ingediende opdracht.

...

Het opvragen van de levereenheden waarin de door de klant ingediende order is verstuurd.

Ten behoeve van een volledigheidscontrole kan de klant een overzicht van alle shippingunits/levereenheden opvragen waarin de artikelen van de order in verstuurd zijn.

Opmerking: Deze operatie is nog niet beschikbaar.

...

Het annuleren van een orderregel.

De klant kan een order of een orderregel annuleren, dit kan tot het moment dat de order gereed gemaakt wordt voor distributie.

...

Het melden dat er een shippingunit/levereenheid aan de vervoerder overgedragen is.

Voor elke levereenheid die klaar staat voor verzending wordt een notify signaal naar de klant gestuurd. De klant kan vervolgens de details van de levereenheid bij CB opvragen, operatie getShippingUnit

...

Het opvragen van details van een shippingunit/levereenheid. In de details is per artikel een referentie naar de relevante orderregel opgenomen.

...

Het opvragen van orders die gedurende het maintenance window zijn geparkeerd en nog niet zijn verwerkt.

...

Schematische weergave webservice Media orders B2C

Media webservice operatiesImage Removed

Waardes voor lijsten

De webservice operaties gebruiken Engelse termen en human readable waardes voor lijsten. 

...

titleKlik hier voor overzicht met gebruikte termen voor lijsten in de webservice

...

ShipmentDate = systeemdatum + 1

<geen datum opgegeven>

...

ShipmentDate > systeemdatum + 1

ShipmentPeriod

...

Downloadable yaml files

Collapsable codeblock met MediaOrder2C v0.9.8.yaml

Code Block
languageyml
titleMediaOrderB2c v0.9.7.yaml
collapsetrue
swagger: "2.0"
info:
  title: "Media order API"
  version: "0.9.8"
  description: "API for e-commerce orders of physical books at CB
                changelog version 0.9.6 to version 0.9.7
                - Update date pattern to [0-9]{4}-[0-1][0-9]-[0-3][0-9]
                - Add pattern for OrderId and OrderLineId
                - Add PartialCancellation indicator in cancelOrderLine operation
                - Remove OrderResponse from placeOrder operation
                - Update http response 200 to 204 for placeOrder operation
                - Refer to UTF-8 characterset
                - Exclude # from input for strings
                - Add exclusive Maximum for amounts
                - Sales amount max 10000
                changelog version 0.9.7 to version 0.9.8
                - Changed cancelOrderLine operation from delete to put
                - Changed http response 200 to 204 for cancelOrderLine operation
                - Removed cancelOrderLine request body with element PartialCancellation 
                - Update description for operation cancelOrderLine"
basePath: "/rest/api/v1/mediaorderb2c"
schemes:
- "https"
paths:
  /orders:
    post:
      tags:
      - "order"
      summary: "Add media order"
      description: "Place an order deliver books to a consumer address"
      operationId: "placeOrder"
      consumes:
      - application/json; charset=utf-8
      produces:
      - application/json; charset=utf-8
      parameters:
      - in: "body"
        name: "body"
        description: "Order placed for shipment of a physical book"
        required: true
        schema:
          $ref: "#/definitions/Order"
      - in: "header"
        name: "UserName"
        description: "The username"
        required: true
        type: string
      - in: "header"
        name: "Password"
        description: "The password"
        required: true
        type: string
      responses:
        204:
          description: "Request executed"
        400:
          description: "Request failed"
          schema:
            $ref: "#/definitions/Messages"
        401:
          description: "Not authorised"
          schema:
            $ref: "#/definitions/Messages"
  /orders/{OrderId}/status:
    get:
      tags:
      - "order"
      summary: "Retrieve details about a media order."
      description: "Retrieve status information, packaging and financial details of an order deliver books to a consumer address.
                    Status information is available for 1 month after the order processing is finished."
      operationId: "getOrderStatus"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      parameters:
      - name: "OrderId"
        in: "path"
        description: "The unique identification of the order for the ordering party."
        required: true
        type: string
        maxLength: 40
        pattern: "^([a-zA-Z0-9-_/ ]+)$"
      - in: "header"
        name: "UserName"
        description: "The username"
        required: true
        type: string
      - in: "header"
        name: "Password"
        description: "The password"
        required: true
        type: string
      responses:
        200:
          description: "Request executed"
          schema:
            $ref: "#/definitions/StatusOrder"
        400:
          description: "Request failed"
          schema:
            $ref: "#/definitions/Messages"
        401:
          description: "Not authorised"
          schema:
            $ref: "#/definitions/Messages"
        404:
          description: "Order not found."
  /orders/{OrderId}/shippingunits:
    get:
      tags:
      - "order"
      summary: "Retrieve shipment details about a media order."
      description: "Retrieve shipment information of an order deliver books to a consumer address."
      operationId: "getOrderShippingUnits"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      parameters:
      - name: "OrderId"
        in: "path"
        description: "The unique identification of the order for the ordering party."
        required: true
        type: string
        maxLength: 40
        pattern: "^([a-zA-Z0-9-_/ ]+)$"
      - in: "header"
        name: "UserName"
        description: "The username"
        required: true
        type: string
      - in: "header"
        name: "Password"
        description: "The password"
        required: true
        type: string
      responses:
        200:
          description: "Request executed"
          schema:
            $ref: "#/definitions/OrderShipments"
        400:
          description: "Request failed"
          schema:
            $ref: "#/definitions/Messages"
        401:
          description: "Not authorised"
          schema:
            $ref: "#/definitions/Messages"
        404:
          description: "Order not found."
  /orders/{OrderId}/orderlines/{OrderLineId}:
    put:
      tags:
      - "order"
      summary: "Cancel one orderline in a media order"
      description: "Cancel an orderline for shipment of physical books to a consumer address. 
        The operation cancels the quantity which can be cancelled, i.e. if ordered is 10, already delivered 3 and productionready 1, then 6 will be cancelled."
      operationId: "cancelOrderLine"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      parameters:
      - name: "OrderId"
        in: "path"
        description: "The unique identification of the order for the ordering party."
        required: true
        type: string
        maxLength: 40
        pattern: "^([a-zA-Z0-9-_/ ]+)$"
      - name: "OrderLineId"
        in: "path"
        description: "The unique identification of the orderline within the order."
        required: true
        type: string
        maxLength: 50
        pattern: "^([a-zA-Z0-9-_/ ]+)$"
      - in: "header"
        name: "UserName"
        description: "The username"
        required: true
        type: string
      - in: "header"
        name: "Password"
        description: "The password"
        required: true
        type: string
      responses:
        204:
          description: "Request executed, OrderLine is cancelled."
        400:
          description: "Request failed"
          schema:
            $ref: "#/definitions/Messages"
        401:
          description: "Not authorised"
          schema:
            $ref: "#/definitions/Messages"
        404:
          description: "OrderLine not found."
definitions:
  Order:
    type: object
    description: "An order to deliver physical books."
    required:
     - OrderingPartyRelationId
     - OrderId
     - Parties
     - OrderLines
    properties:
      OrderingPartyRelationId:
        $ref: "#/definitions/RelationId"
      OrderFlowNumber:
        $ref: "#/definitions/OrderFlow"
      OrderId:
        type: string
        description: "Unique order identification for the ordering party."
        maxLength: 40
        pattern: "^[^#]*$"
        example: "Abc1234567890"
      OrderType:
        type: string
        enum:
            - "ShipBuyer"
            - "ShipOwner"
            - "ShipSecundaryOwner"
        default: "ShipBuyer"
        description: "The order type specifies if the order is fulfilled from stock owned by the publisher or owned by the ordering party
            - ShipBuyer; the publisher is the owner of the stock, the ordering party buys the stock from the publisher.
            - ShipOwner; the ordering party is publisher and the primary owner of the stock.
            - ShipSecundaryOwner; the ordering party is secundary owner, use StockSelectionCode to select the stock to be used for the order."
        maxLength: 20
        example: "ShipBuyer"
      BuyerReference:
        type: string
        description: "Order reference for the buyer."
        maxLength: 10
        pattern: "^[^#]*$"
        example: "Buyer Ref."
      OwnerReference:
        type: string
        description: "Order reference for the stock owner."
        maxLength: 10
        pattern: "^[^#]*$"
        example: "Owner Ref."
      TemplateType:
        type: string
        description: "The template definition to be used for packling slip, (customer) invoice and greeting card printed by CB and included in the shipment."
        maxLength: 1
        pattern: "^[^#]*$"
        example: "B"
      Shipment:
        $ref: "#/definitions/Shipment"
      Parties:
        $ref: "#/definitions/Parties"
      PackingSlipInstructions:
        $ref: "#/definitions/PackingSlipInstructions"
      GreetingCardInstructions:
        $ref: "#/definitions/GreetingCardInstructions"        
      AddressLabelInstructions:
        $ref: "#/definitions/AddressLabelInstructions"
      VASInstructions:
        $ref: "#/definitions/VASInstructions"        
      OrderLines:
        $ref: "#/definitions/OrderLines"
      Attachments:
        $ref: "#/definitions/Attachments"
  Shipment:
    type: object
    description: 
        "The requested order execution moment or period
            Within Shipment either ShipmentDate or ShipmentPeriod can be supplied (if both are supplied, then the request is rejected).
            If neither ShipmentDate nor ShipmentPeriod is specified then the order is executed as next-day-shipment request."
    properties:
      SplitPackage:
        type: boolean
        default: false
        description: "Indication whether products must be shipped in one package/shipping unit or it is allowed to ship in multiple packages
                true; multiple packages allowed.
                false; one package."
        example: false
      ShipmentCode:
        type: string
        description: "The desired transport for the order. A customer can agree to a default means of transport. This means of transport will then be used if no means of transport has been specified. If a means of transport has indeed been specified, it overrules the default means of transport."
        maxLength: 5
        pattern: "^[^#]*$"
        example: "TNTS"
      PartialShipment:
        type: boolean
        default: true
        description: "Indication to ship the order in one or multiple shipments.
            ShipmentDate
            - true; Available EAN are shipped at the requested shipment date. The order may be delivered in multiple shipments and incomplete shipment is permitted (is also linked to BackorderIndication on line level).
            - false; The order must be delivered in one shipment, incomplete shipment is not permitted. Shipment waits until all EAN in the order are available.
            ShipmentPeriod
            - true; Within the requested period EANs are shipped immediate when stock is available.
            - false; Within the requested period the order is shipped when all EAN are available. If not shipped at the end date, then available EAN are shipped at the end date and remaining EAN are cancelled or put in backorder (based on ordering party configuration)."
        example: true
      ShipmentDate:
        $ref: "#/definitions/ShipmentDate"
      ShipmentPeriod:
        $ref: "#/definitions/ShipmentPeriod"
  ShipmentDate:
    type: object
    description: "Requested date for shipment. CB will schedule on or a.s.a.p. after this date, depending on title availability and carrier agreements."
    required:
      - Date
    properties:
      Date:
        type: string
        maxLength: 10
        description: "Specific date for requested shipment type. The order must be received before the agreed cut-off time (on a working day) so that it can be produced on time. Orders received after the cut-off time will be produced one working day later. The value is based on CEST, Central European Summer Time."
        pattern: "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]$"
        example: "2019-10-14"
  ShipmentPeriod:
    type: object
    description: "Requested period for shipment. CB will schedule the shipment in or a.s.a.p. after this period, depending on title availability and carrier agreements. Either From, Till or both must be provided."
    properties:
      From:
        type: string
        maxLength: 10
        pattern: "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]$"
        example: "2019-11-01"
        description: "Start of requested shipment period. The order will not be shipped before this date. If not specified, the order will be shipped as soon as possible. The value is based on CEST, Central European Summer Time."
      Till:
        type: string
        maxLength: 10
        pattern: "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]$"
        example: "2019-11-08"
        description: "End of requested shipment period. The order will be shipped before or a.s.a.p. after this date. Depending on the EndOfPeriodShipment either the available items are shipped on this date or the order is cancelled. The maximum ShipmentPeriod is 3 months. The value is based on CEST, Central European Summer Time."
  Parties:
    type: array
    description: "Address and contact information for order delivery."
    items:
      $ref: "#/definitions/Party"
    minItems: 1
    maxItems: 3
  Party:
    type: object
    description: "A party or specific address/contact for order delivery."
    required:
     - PartyType
     - Address
    properties:
      PartyType:
        type: string
        enum:
            - "ReceiverAddress"
            - "DropSiteAddress"
            - "InvoiceAddress"
        default: "ReceiverAddress"
        description: "Specification of the party
            - ReceiverAddress; mandatory address of the consumer and the regular address to deliver the books.
            - DropSiteAddress; an optional alternative address to deliver the books.
            - InvoiceAddress; an optional alternative address for the consumer invoice. Available only if CB generates the consumer invoice."
        maxLength: 20
        example: "ReceiverAddress"
      PartyId:
        type: string
        description: "Identification of the party."
        maxLength: 35
        pattern: "^[^#]*$"
        example: "123456"
      Address:
        $ref: "#/definitions/Address"
      Contact:
        $ref: "#/definitions/Contact"
  Address:  
    type: object
    description: "Postal address of a Party."
    required:
     - Name
     - Street
     - HouseNumber
     - PostalCode
     - City
     - CountryCode
    properties:
      Name:
        type: string
        description: "Name."
        maxLength: 45
        pattern: "^[^#]*$"
        example: "TestBookShop"
      SecondaryName:
        type: string
        description: "Attention name."
        maxLength: 42
        pattern: "^[^#]*$"
        example: "Tinus Test"
      Street:
        type: string
        description: "Name of the street."
        maxLength: 43
        pattern: "^[^#]*$"
        example: "Erasmusweg"
      StreetAddition:
        type: string
        description: "Addition to name of the street."
        maxLength: 24
        pattern: "^[^#]*$"
        example: "Erasmusweg"
      HouseNumber:
        type: integer
        format: int32
        description: "Housenumber."
        minimum: 0
        maximum: 999999
        example: 10
      HouseNumberAddition:
        type: string
        description: "Housenumber addition."
        maxLength: 10
        pattern: "^[^#]*$"
        example: "A"
      PostalCode:
        type: string
        maxLength: 10
        description: "Zipcode."
        pattern: "^[^#]*$"
        example: "4104 AK"
      City:
        type: string
        maxLength: 40
        description: "Name of the city."
        pattern: "^[^#]*$"
        example: "Culemborg"
      Region:
        type: string
        maxLength: 40
        description: "Name of the region."
        pattern: "^[^#]*$"
        example: "Gelderland"
      CountryCode:
        type: string
        format: iso-3166
        description: "2 Letter country code in iso 3166-1 format."
        example: "NL"
  Contact:  
    type: object
    description: "Party contact information."
    properties:
      EmailAddress:
        type: string
        description: "Email address."
        maxLength: 254
        pattern: "^[^#]*$"
        example: "Tinus@CB.nl"
      PhoneNumber:
        type: string
        description: "Phone number."
        maxLength: 40
        pattern: "^[^#]*$"
        example: "0123456789"
      MobileNumber:
        type: string
        description: "Mobile phone number."
        maxLength: 40
        pattern: "^[^#]*$"
        example: "0612345678"
      ConfirmDelivery:
        type: boolean
        default: false
        description: "Indication that the customer must be informed when the order is delivered at the drop site address."
        example: false
  PackingSlipInstructions:  
    type: object
    description: "Packing Slip instruction for the order."
    properties:
      PackingSlipAddress:
        $ref: "#/definitions/PackingSlipAddressLines"
      Marketing:
        $ref: "#/definitions/MarketingLines"
      PaymentCondition:
        $ref: "#/definitions/PaymentConditionLines"
      Header:
        type: string
        description: "The header line for the packing slip and invoice."
        maxLength: 92
        pattern: "^[^#]*$"
        example: "Uw order van 02-10-2019 Bestelnummer: 1234567890 Klantnummer: 1234567890"
      PaymentRemark:
        type: string
        description: "The payment remark for the packing slip and invoice."
        maxLength: 37
        pattern: "^[^#]*$"
        example: "Te voldoen binnen 14 dagen"
      PrintInvoice:
        type: boolean
        default: false
        description: "Indication to print an invoice document instead of a packaging slip."
        example: false
      DiscountDescription:
        type: string
        description: "A description for the discount given to the consumer."
        maxLength: 50
        pattern: "^[^#]*$"
        example: "Giftcard number 1234 5678 9012 3456."
      DiscountAmount:
        type: number
        format: decimal
        description: "The discount amount given to the consumer."
        minimum: 0
        maximum: 10000000
        exclusiveMaximum: true
        example: 10.00
      PostageAmount:
        type: number
        format: decimal
        description: "The discount amount."
        minimum: 0
        maximum: 10000
        exclusiveMaximum: true
        example: 10.00
  PackingSlipAddressLines:
    type: array
    description: "The address lines for the webshop on the packaging slip."
    items:
      $ref: "#/definitions/PackingSlipAddressLine"
    minItems: 1
    maxItems: 9
  PackingSlipAddressLine:
      type: object
      description: "Address line."
      required:
       - SequenceNumber
       - AddressDescription
      properties:
          SequenceNumber:
            type: integer
            format: int32
            description: "The printing sequence number of the address line."
            minimum: 1
            maximum: 9
            example: 1
          AddressDescription:
            type: string
            description: "Free address text."
            maxLength: 39
            pattern: "^[^#]*$"
            example: "The webshop name"
  MarketingLines:
    type: array
    description: "The marketing text lines."
    items:
      $ref: "#/definitions/MarketingLine"
    minItems: 1
    maxItems: 5
  MarketingLine:
      type: object
      description: "Marketing line."
      required:
       - SequenceNumber
       - MarketingDescription
      properties:
          SequenceNumber:
            type: integer
            format: int32
            description: "The printing sequence number of the marketinglines."
            minimum: 1
            maximum: 5
            example: 1
          MarketingDescription:
            type: string
            description: "A maximum of 5 marketing lines for the packing slip and invoice."
            maxLength: 92
            pattern: "^[^#]*$"
            example: "Reclame boodschap voor de consument."
  PaymentConditionLines:
    type: array
    description: "The payment condition text lines."
    items:
      $ref: "#/definitions/PaymentConditionLine"
    minItems: 1
    maxItems: 3
  PaymentConditionLine:
      type: object
      description: "Payment condition line."
      required:
       - SequenceNumber
       - PaymentConditionDescription
      properties:
          SequenceNumber:
            type: integer
            format: int32
            description: "The printing sequence number of the payment conditions."
            minimum: 1
            maximum: 3
            example: 1
          PaymentConditionDescription:
            type: string
            description: "A maximum of 3 payment condition lines for the packing slip and invoice."
            maxLength: 152
            pattern: "^[^#]*$"
            example: "Op alle aanbiedingen, bestellingen, overeenkomsten, etc. zijn de algemene voorwaarden van AANBIEDER van toepassing."      
  GreetingCardInstructions:  
    type: object
    description: "Greeting Card instruction for the order."
    properties:
      GreetingCard:
        $ref: "#/definitions/GreetingCardLines"
  GreetingCardLines:
    type: array
    description: "The text lines for the greeting card."
    items:
      $ref: "#/definitions/GreetingCardLine"
    minItems: 1
    maxItems: 5
  GreetingCardLine:
      type: object
      description: "Greeting card line."
      required:
       - SequenceNumber
       - GreetingCardDescription
      properties:
          SequenceNumber:
            type: integer
            format: int32
            description: "The printing sequence number of the greeting card lines."
            minimum: 1
            maximum: 5
            example: 1
          GreetingCardDescription:
            type: string
            description: "A maximum of 5 text lines for the greeting card."
            maxLength: 156
            pattern: "^[^#]*$"
            example: "Concratualations to you for receiving a beautiful present."
  AddressLabelInstructions:  
    type: object
    description: "Address Label instruction for the order."
    required:
     - AddressLabel
    properties:
      AddressLabel:
        type: string
        description: "A label remark to be printed on the shipment label."
        maxLength: 14
        pattern: "^[^#]*$"
        example: "Shop: 12345678"
  VASInstructions:  
    type: array
    description: "VAS instructions for the order."
    items:
      $ref: "#/definitions/ValueAddedServicesLines"
    minItems: 1
  ValueAddedServicesLines:
    type: object
    description: "VAS line"
    required:
     - SequenceNumber
    properties:
      SequenceNumber:
        type: integer
        format: int32
        description: "The execution sequence number of the instruction."
        minimum: 1
        maximum: 999
        example: 1
      InstructionCode:
        type: string
        description: "Specification of the instruction by means of a code."
        maxLength: 10
        pattern: "^[^#]*$"
        example: "1100"
      InstructionDescription:
        type: string
        description: "Specification of the instruction by means of a description."
        maxLength: 70
        pattern: "^[^#]*$"
        example: "RETICKET"
      InstructionInformation:
        type: string
        description: "Additional information about the instruction."
        maxLength: 70
        pattern: "^[^#]*$"
        example: "Ref: 1234567890"
  OrderLines:
    type: array
    items:
      $ref: "#/definitions/OrderLine"
    minItems: 1
    description: "The lines of the order."
  OrderLine:  
    type: object
    description: "A line of the order, specifies the EAN that must be delivered."
    required:
     - OrderLineId
     - EAN
     - QuantityOrdered
    properties:
      OrderLineId:
        $ref: "#/definitions/OrderLineId"
      EAN:
        $ref: "#/definitions/EAN"
      BuyerLineReference:
        $ref: "#/definitions/BuyerLineReference"
      OwnerLineReference:
        $ref: "#/definitions/OwnerLineReference"
      AlternativeDescription:
        type: string
        description: "An alternative description used for the packing slip and invoices as replacement for the titel given by the author."
        maxLength: 80
        example: "The real big thing after Internet"
      QuantityOrdered:
        $ref: "#/definitions/Quantity"
      TransactionCategory:
        type: string
        enum:
            - "DepotDistribution"
            - "OwnerDistribution"
            - "SpecialOffering"
        description: "Order condition to determine the handling and distribution fees
          - DepotDistribution; DUD - Distributie uit Depot. Order handling according to depot conditions. The bookstore pays the handling and distribution fees.
          - OwnerDistribution; DIO - Distributie In Opdracht. Order handling initiated by the owner. The owner/publisher pays the handling and distribution fees.
          - SpecialOffering; AANB - Aanbiedingscondities. Order handling accoring to regular conditions. The publisher pays the handling and distribution fees."
        maxLength: 20
        example: "DepotDistribution"
      BackOrderShipment:
        type: boolean
        default: true
        description: "Indication whether it is allowed to take an order in backorder. This is particularly relevant if insufficient stock can be reserved for the orderline
          - true; the orderline may be put in backorder (when available stock is not sufficient)
          - false; backorder is not allowed, the processing depends on the value for PartialLineShipment 
                If PartialLineShipment is allowed then the available quantity is shipped and the remaining quantity is cancelled.
                If PartialLineShipment is not allowed then the orderline is cancelled."
        example: true
      PartialLineShipment:
        type: boolean
        default: true
        description: "Indication whether the orderline may be delivered in multiple shipments
          - true; the orderline may be delivered in parts and incomplete shipment is permitted, for example 6 items ordered and shipment of 2 items on Monday and 4 items on Friday.
          - false; the quantity of the orderline may only be delivered in one shipment. The ordering party is responsible to manage the orderline when the available quantity is not sufficient."
        example: true
      Owner:
        $ref: "#/definitions/Owner"
      SalesAmount:
        type: number
        format: decimal
        description: "The amount indicating the price (regarding 1 single unit of the SKU) and printed on the invoice."
        minimum: 0
        maximum: 10000
        exclusiveMaximum: true
        example: 25.75
  Owner:  
    type: object
    description: "Orderline settings available for ordering parties with own stock at CB"
    properties:
      StockSelectionCode:
        type: string
        enum:
            - "SecundaryOwnerStock"
            - "SecundaryOrPrimary"
            - "PrimaryOwnerStock"
            - "PrimaryOrSecundary" 
        description: "Indication to determine the owner of the stock when secundary ownership applies
          - SecundaryOwnerStock; Shipment from secundary owner stock, ordertype changed to ShipOwner.
          - SecundaryOrPrimary; Shipment from secundary owner stock if available (ordertype changed to ShipOwner, otherwise shipment from primary owner stock (ordertype changed to ShipBuyer).
          - PrimaryOwnerStock; Shipment from primary owner stock, ordertype changed to ShipBuyer.
          - PrimaryOrSecundary; Shipment from primary owner stock if stock available (ordertype changed to ShipBuyer), otherwise shipment from secundary owner stock (ordertype changed to ShipOwner).
          Available for stock owners only."
        maxLength: 20
        example: "SecundaryOrPrimary"
      UseBlockedStock:
        type: boolean
        default: false
        description: "The owner can set a shipment block on part of his stock. This indication is to overrule this shipment block. Available for stock owners only."
        example: false
  Attachments:  
    type: array
    items:
      $ref: "#/definitions/Attachment"
    minItems: 1
    description: "Documents to be printed and added to the shipment. Currently only 1 document is supported."
  Attachment:  
    type: object
    description: "A reference to the document. The document itself must be uploaded to CB before it is referred to in an order. To upload a file use the MediaFile service."
    required:
     - DocumentName
    properties:
      DocumentName:
        type: string
        description: "The name of the document/file. For orders only Adobe pdf files are supported. The document is limited to one double sided A4 page, maximum size is 1,1 MB. Files can be send to CB via FTP and must be available before the order processing is started."
        maxLength: 100
        pattern: "^[^#]*$"
        example: "MyFile_odmt.pdf"
  StatusOrder:
    type: object
    description: "An overview of the order status. Available only for response code 200."
    required:
     - OrderId
     - OrderingPartyRelationId
     - OrderDate
     - ProcessStatus
    properties:
      OrderId:
        $ref: "#/definitions/OrderId"
      OrderingPartyRelationId:
        $ref: "#/definitions/RelationId"
      OrderFlowNumber:
        $ref: "#/definitions/OrderFlow"
      OrderDate:
        type: string
        maxLength: 10
        pattern: "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]$"
        example: "2019-09-20"
        description: "Order registration date at CB. The value is based on CEST, Central European Summer Time."
      ProcessStatus:
        type: string
        description: "The processing status of the order
          - InProgress; the order is received and accepted.
          - Cancelled; the order isn't executed.
          - Warning; the order is received and accepted, however with an issue; probably in an orderline.
          - Processed; the order is shipped."
        maxLength: 20
        example: "Cancelled"
      StatusOrderLines:
        $ref: "#/definitions/StatusOrderLines"
  StatusOrderLines:
    type: array
    items:
      $ref: "#/definitions/StatusOrderLine"
    minItems: 1
    description: "Orderline status information."
  StatusOrderLine:  
    type: object
    description: "Status of a specific orderline."
    required:
     - OrderLineId
     - EANOrdered
     - QuantityOrdered
    properties:
      OrderLineId:
        $ref: "#/definitions/OrderLineId"
      EANOrdered:
        $ref: "#/definitions/EAN"
      QuantityOrdered:
        $ref: "#/definitions/Quantity"
      StatusSpecifications:
        $ref: "#/definitions/StatusSpecifications"
  StatusSpecifications:
    type: array
    items:
      $ref: "#/definitions/StatusSpecification"
    minItems: 1
    description: "Processing specifications details."
  StatusSpecification:  
    type: object
    description: "Processing specifcation of one (part of an) orderline."
    required:
      - QuantityStatus
      - EANStatus
      - ProcessStatus
    properties:
      QuantityStatus:
        $ref: "#/definitions/Quantity"
      EANStatus:
        $ref: "#/definitions/EAN"
      ProcessStatus:
        type: string
        description: "The processing status of the order
          - New; The orderline received.
          - Backorder; The orderline is accepted but stock is not available.
          - InProgress; the orderline is received and accepted.
          - Cancelled; the orderline isn't executed.
          - Processed; the order is delivered / the orderline passed pick and pack.
          - ProductionReady; The orderline is forwarded to the warehouse."
        maxLength: 20
        example: "Cancelled"
      OwnerId:
        $ref: "#/definitions/RelationId"
      OwnerName:
        type: string
        description: "Owner of the shipped books. Usually the publisher of the book, sometimes the secundary owner."
        maxLength: 80
        example: "Noordhoff Uitgevers B.V."
      ExpectedShipmentDate:
        type: string
        description: "Expected date for shipment. The value is based on CEST, Central European Summer Time."
        maxLength: 10
        pattern: "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]$"
        example: "2019-11-01"
      StatusDateTime:
        type: string
        description: "The date and time that the status is assigned. Available only for status Cancelled. The value is based on CEST, Central European Summer Time."
        pattern: "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-9]{2}:[0-9]{2}:[0-9]{2}$"
        example: "2019-11-01T16:29:55"
      ReasonId:
        $ref: "#/definitions/ReasonId"
      ReasonDescription:
        $ref: "#/definitions/ReasonDescription"
      BackOrder:
        $ref: "#/definitions/BackOrder"
  BackOrder:
    type: object
    description: "Details when the orderline is in backorder."
    required:
      - BackOrderCode
      - BackOrderDescription
    properties:
      BackOrderCode:
        type: integer
        format: int32
        description: "Indication about the reason for backorder
          - 1 = Not avialable yet.
          - 2 = Temporary not avialable.
          - 3 = Temporary not avialable; in reprint.
          - 4 = Temporary not avialable; in reprint.
          - 7 = Not (yet) commercially available.
          - 8 = Ordering party is temporary blocked for shipment."
        minimum: 1
        maximum: 9
        example: 3
      BackOrderDescription:
        type: string
        description: "Description about the reason for backorder."
        maxLength: 80
        example: "Tijdelijk niet leverbaar; in herdruk."
      ExpectedReleaseDate:
        type: string
        description: "Expected date for release provided by the publisher. Available for reprint only (BackOrderCode value 3 and 4). The value is based on CEST, Central European Summer Time."
        maxLength: 10
        pattern: "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]$"
        example: "2019-09-25"
  OrderShipments:
    type: object
    description: "An overview of the shipping units for an order. Available only for response code 200."
    required:
     - OrderId
     - OrderingPartyRelationId
    properties:
      OrderId:
        $ref: "#/definitions/OrderId"
      OrderingPartyRelationId:
        $ref: "#/definitions/RelationId"
      OrderShippingUnits:
        $ref: "#/definitions/OrderShippingUnits"
  OrderShippingUnits:
    type: array
    items:
      $ref: "#/definitions/OrderShippingUnit"
    minItems: 1
    description: "Shipped packages for an order."
  OrderShippingUnit:  
    type: object
    description: "A shipped package."
    required:
     - ShippingUnitId
    properties:
      ShippingUnitId:
        type: string
        description: "The unique identification of a shipping unit, which is an envelope, box or pallet."
        maxLength: 35
        example: "Abc1234567890"
  OrderId:
    type: string
    description: "The unique identification of the order for the ordering party."
    maxLength: 40
    pattern: "^[^#]*$"
    example: "Abc1234567890"
  OrderLineId:
    type: string
    description: "Unique orderline identification within the order for the ordering party."
    maxLength: 50
    pattern: "^[^#]*$"
    example: "Line 1"
  OrderFlow:
    type: integer
    format: int32
    description: "Optional order flow for the ordering party (stroomnummer)."
    minimum: 0
    maximum: 99
    example: 2
  RelationId:
    type: integer
    format: int32
    description: "Identification of a CB business relation."
    minimum: 6000000
    maximum: 9999999
    example: 7654321
  EAN:
    type: string
    description: "Identification of the physical book, the ISBN."
    maxLength: 13
    pattern: "^[0-9]{13}$"
    example: "9789086872701"
  Quantity:
    type: integer
    format: int32
    description: "The quantity for this EAN. The maximum of 977 is to prevent typo's with ISBN numbers (which start with 978)."
    minimum: 1
    maximum: 977
    example: 1
  BuyerLineReference:
    type: string
    description: "The orderline reference for the buyer."
    maxLength: 10
    pattern: "^[^#]*$"
    example: "BuyerLnRef"
  OwnerLineReference:
    type: string
    description: "The orderline reference for the stock owner."
    maxLength: 10
    example: "OwnerLnRef"
  ReasonId:
    type: integer
    format: int32
    description: "Indication of the reason for status C or W."
    minimum: 1
    maximum: 999
    example: 201
  ReasonDescription:
    type: string
    description: "Description of the reason for status C or W."
    maxLength: 255
    example: "Artikel is niet leverbaar (titel zal niet verschijnen)"
  Messages:
    type: array
    items:
      $ref: "#/definitions/Message"
  Message:
    type: object
    description: "Explanation of the error situation that caused the request to fail."
    required: 
      - MessageType
      - MessageCode
      - MessageText
    properties:
      MessageType:
        type: string
        enum:
         - "E"
         - "I"
        description:
          "Functional message
            * E - Error. The web service did not lead to a possible functional reply. There is a fault in the request.
            * I - Information. The web service did lead to a functional reply. However, this functional reply may require further explanation."
        example: "E"
      MessageCode:
        type: string
        description: "The code of the error."
        example: "WMS-00001"
      MessageText:
         type: string
         description: "Explanation of the error."
         example: "Invalid length for password."


...

titleKlik hier voor Algemene informatie webservice Media en het servicelevel

...

Table of Contents

CB Media Interface Description

Revisions

DateDescription

 

Added extra information authorisation: “Basic ”||"Base64 encoding of username and password joined by a single colon : "

 

Media Order B2C: Yaml file version 1.3.0

Changelog version 1.2.0 to version 1.3.0:

  • Add Article with ArticleId as product identification for dedicated stock
  • Use either EAN or Article in placeOrder (EAN is now optional), if both are supplied the EAN is used and Article is ignored
  • Report either EAN or Article in getOrderStatus based on provided input in placeOrder

MediaShipment: Yaml file version 1.0.0 version 1.1.0

Changelog version 1.0.0 to version 1.1.0:

  • Add ArticleId as product identification for dedicated stock
  • Report either EAN or ArticleId in getShippingUnit based on provided input in placeOrder

 

Authentication notify services, CB supports:

  • Basic - username/password
  • Token 

 

Test and order simulation added

 

Add Tag matrix for Green and Standard option

 

Update yaml file MediaOrderNotify v.1.0.2.yaml

 

Update generic error messages

 

Align with updated order notifications

 

Update yaml file MediaOrderB2C v1.2.0.yaml

 

Update MediaOrderB2C version

Correct resource for notifyOrder and notityShipment

 

Update yaml versions

 

Add volume limits and error messages; Correct typo in process flow diagrams

 

Add flows and sequence diagrams

 

Add operations

 

Initial document

Introduction

This document contains a description of the standard interfaces for implementation of data exchange with CB via webservices.

The entire set for the standard data exchange with CB consists of the following documents and files:
The mapping from file based to webservice based messages
Tag matrix for Green and Standard option

CB has two options for submitting e-commerce orders:

  • Green option no document attached to shipment,
  • Standard option packing slip or invoice included with shipment
Expand
titleClick here for tag matrix

Include Page
Tags Green and Standard option
Tags Green and Standard option


yaml definition filesAn OpenAPI Specification file (yaml) for each resource

https://services.cb.nl/rest/api/v1/mediaorderb2c/swagger.yaml  Contains PUT (cancel), GET (status) and POST (place order)

Overview webservices

This chapter gives an overview of the available interaction patterns for data exchange with CB. The figure below gives an high level overview of the CB system landscape and the available webservice operations.

CB provides REST based webservices. In REST operations define the available activities.


Image  Overview operationsImage Added

The webservices provide online creation and cancelation of media orders at CB. Changes to an order (other than cancel) are not available. Resending an order is possible only when the order was not accepted by CB earlier. 

Webservices are available 24 hours a day, 7 days a week, however order handling is restricted to warehouse working hours. Our regular maintenance window is on Saturday from 08:00 hours until 14:00 hours. The webservice operations are available during this time, but received requests are stored only (i.e. not validated nor processed at that moment) when our ERP systems are not available. Processing will resume as soon as our ERP systems are available again..

File versus Webservice

Communication about orders is based on the receiving channel, i.e. file base communication is used for orders received via file based interfaces and webservice communication is used for orders received via the webservice.

Orders are processed independent from the receiving channel.

Mapping batch files versus webservice operations
OPDNAWplaceOrder
ANNOPDcancelOrder
UITOPDnotifyOrder / getOrderStatus + notifyShipment / getShippingUnit
NUITOPnotifyOrder / getOrderStatus

Timing

Webservice requests are processed realtime, i.e. an order is registered immediately when the webservice call is executed. Order processing at CB is based on scheduled processes and not primarily triggered by the webservice request.

Responses to the requester are send in Near-Realtime (NRT) with an average delay of 2 to 3 minutes. The regular maximum delay is 5 minutes, in exceptions running up to 10 minutes. During this timeframe the orderstatus has reached a status that is not yet reported to the requestor.

Volume

Webservice requests are limited to a maximum of 10 requests per service per second per requestor.

Performance

The media webservices comply with the generic CB webservice performance requirements:

  • Average response time within 2 seconds during prime-time (08:00-01:00 CET)
  • Response within 3 seconds for 99,95% of the requests during prime-time
  • Response within 6 seconds for 99% of the requests outside prime-time

MediaOrderB2C

Webservice name: MediaOrderB2C
Definition: MediaOrderB2C.yaml
Resource: Orders
Operations provided by CB:
placeOrderSend one (1) order to CB
cancelOrderLineCancel one (1) orderline
getOrderStatusRetrieve the status of one (1) order

MediaOrderNotify

Webservice name: MediaOrderNotify
Definition: MediaOrderNotify.yaml
Resource: 

Notifications

Operations provided by you:
notifyOrderCB calls your webservice to inform you about status updates of an order
Authentication modeCB supports:
  • Basic - username:password   “Basic ”||"Base64 encoding of username and password joined by a single colon : "
  • Token 

MediaShipment

Webservice name: MediaShipment
Definition: MediaShipment.yaml
Resource: 

ShippingUnits

Operations provided by CB:
getShippingUnit

Retrieve the shipment information for a shipping unit

MediaShipmentNotify

Webservice name: MediaShipmentNotify
Definition: MediaShipmentNotify.yaml
Resource: 

Notifications

Operations provided by you:
notifyShipment

CB calls your webservice to inform you about a shipment for your order

Authentication modeCB supports:
  • Basic - username:password  “Basic ”||"Base64 encoding of username and password joined by a single colon : "
  • Token 

Process flows

This chapter contains the identified flows when using webservices to order physical books at CB. The most common and regular scenario is describes in the happy flow. In addition 7 frequent scenarios are described in alternative flows.

Happy Flow

The customer orders one or more products, stock is available and the order is shipped in one shipment.

Image Added

Flow description:

  • The customer puts one or more products in the shopping basket
  • The shop forwards the order to CB with the operation placeOrder
  • CB verifies and accepts the order, the shop is notified with the operation notifyOrder and status event In Progress
  • CB assigns stock to the order
  • CB prepares for logistic processing of the order. Cancellation of the order is not possible anymore, the shop is notified with the operation notifyOrder and status event ProductionReady
  • The shop can retrieve the order process status to see which orderlines are ready for production and cannot be cancelled anymore
  • CB executes pick and pack for the order and creates a shipment. The shop is notified with the operation notifyShipment and status event Processed
  • The shop can retrieve the shipment details (including tracking number and a list of products) per shipping unit and can inform the customer.

Alternative Flow 1 – multiple shipments

The customer orders multiple products and stock is available for all products. At pick and pack multiple shipping units are created. The order is shipped in multiple shipments.

Image Added

Flow description:

  • The customer puts multiple products in the shopping basket
  • The shop forwards the order to CB with the operation placeOrder
  • CB verifies and accepts the order, the shop is notified with the operation notifyOrder and status event In Progress
  • CB prepares for logistic processing of the order. The shop is notified with the operation notifyOrder and status event ProductionReady
  • The shop can retrieve the order process status to see which orderline(s) are ready for production and cannot be cancelled anymore


  • CB executes pick and pack for orderline 1 and creates a shipment. The shop is notified with the operation notifyShipment and status event Processed
  • The shop can retrieve the shipment details (including tracking number and a list of products) per shipping unit and can inform the customer


  • CB executes pick and pack for orderline 2 and creates a shipment. The shop is notified with the operation notifyShipment and status event Processed
  • The shop can retrieve the shipment details (including tracking number and a list of products) per shipping unit and can inform the customer

Alternative Flow 2 – multiple shipments due to partial backorder

The customer orders multiple products and stock is available for at least one product. Also at least one product is in backorder. The order is shipped in multiple shipments.

Image Added

Flow description:

  • The customer puts multiple products in the shopping basket
  • The shop forwards the order to CB with the operation placeOrder
  • CB verifies and accepts the order, the shop is notified with the operation notifyOrder and status event In Progress


  • CB prepares for logistic processing of orderline 1. The shop is notified with the operation notifyOrder and status event ProductionReady
  • The shop can retrieve the order process status to see which orderline(s) are ready for production and cannot be cancelled anymore
  • CB executes pick and pack for orderline 1 and creates a shipment. The shop is notified with the operation notifyShipment and status event Processed
  • The shop can retrieve the shipment details (including tracking number and a list of products) per shipping unit and can inform the customer
  • CB received stock for orderline 2, assigns stock and prepares for logistic processing of orderline The shop is notified with the operation notifyOrder and status event ProductionReady
  • The shop can retrieve the order process status to see which orderline(s) are ready for production and cannot be cancelled anymore
  • CB executes pick and pack for orderline 2 and creates a shipment. The shop is notified with the operation notifyShipment and status event Processed
  • The shop can retrieve the shipment details (including tracking number and a list of products) per shipping unit and can inform the customer.

Alternative Flow 3 – customer cancellation

The customer orders one or more products, but decides to cancel the order shortly after ordering.

Image Added

Flow description:

  • The customer puts one or more products in the shopping basket
  • The shop forwards the order to CB with the operation placeOrder. The operation confirms acceptance of the order
  • CB verifies the order, the shop is notified with the operation notifyOrder and status event In Progress


  • The customer decides to cancel the order at the shop
  • The shop forwards the cancel request per orderline to CB with the operation cancelOrderLine. The operation confirms acceptance of the cancellation
  • CB informs the shop that the complete order is cancelled with the operation notifyOrder and status event Cancelled
  • The shop confirms the cancellation to the customer.

 

Alternative Flow 4 – partial customer cancellation

The customer orders multiple products, but decides to cancel at least one of the orderlines but not all shortly after ordering.

Image Added

Flow description:

  • The customer puts multiple products in the shopping basket
  • The shop forwards the order to CB with the operation placeOrder. The operation confirms acceptance of the order
  • CB verifies the order, the shop is notified with the operation notifyOrder and status event In Progress


  • The customer decides to cancel orderline 1 in the shop
  • The shop forwards the cancel request for orderline 1 to CB with the operation cancelOrderLine.The operation confirms acceptance of the cancellation
  • CB informs the shop that an orderline is cancelled with the operation notifyOrder and status event Cancelled
  • The shop confirms the cancellation to the customer


  • CB prepares for logistic processing of orderline 2. The shop is notified with the operation notifyOrder and status event ProductionReady
  • CB executes pick and pack for orderline 2 and creates a shipment. The shop is notified with the operation notifyShipment and status event Processed
  • The shop can retrieve the shipment details (including tracking number and a list of products) per shipping unit and can inform the customer.

Alternative Flow 5 – CB order reject

The customer orders one or more products, but the order is not accepted by CB due to unknown products.

Image Added

Flow description:

  • The customer puts multiple products in the shopping basket
  • The shop forwards the order to CB with the operation placeOrder. The operation confirms rejection of the order

Alternative Flow 6 – partial CB cancellation

The customer orders multiple products and stock is available for at least one product. Also stock is not available for at least one product and backlog is not allowed.

Image Added

Flow description:

  • The customer puts multiple products in the shopping basket
  • The shop forwards the order to CB with the operation placeOrder. The operation confirms acceptance of the order
  • CB verifies the order and identifies that orderline 1 is not available, the shop is notified with the operation notifyOrder and status event Cancelled
  • CB identifies that orderline 2 is available, the shop is notified with the operation notifyOrder and status event InProgress
  • The shop retrieves the order process status to see which orderline(s) are not available
  • CB prepares for logistic processing of orderline 2. The shop is notified with the operation notifyOrder and status event ProductionReady
  • CB executes pick and pack for orderline 2 and creates a shipment. The shop is notified with the operation notifyShipment and status event Processed
  • The shop can retrieve the shipment details (including tracking number and a list of products) per shipping unit and can inform the customer

Alternative Flow 7 – order during service window

The customer orders one or more products during the service window. Stock is available for all products.

Image Added

Flow description:

  • The customer puts one or more products in the shopping basket
  • The shop forwards the order to CB with the operation placeOrder. The operation confirms receipt of the order during the service window


  • CB verifies the order, the shop is notified with the operation notifyOrder and status event InProgress


  • CB prepares for logistic processing of the order. The shop is notified with the operation notifyOrder and status event ProductionReady
  • The shop can retrieve the order process status with operation getOrderStatus to see which orderline(s) are ready for production and cannot be cancelled anymore
  • CB executes pick and pack for the order and creates a shipment. The shop is notified with the operation notifyShipment and status event Processed
  • The shop can retrieve the shipment details (including tracking number and a list of products) per shipping unit and can inform the customer

Alternative Flow 8 – cancel during service window

The customer orders one or more products, but decides to cancel the order during the service window.

Image Added

Flow description:

  • The customer puts multiple products in the shopping basket
  • The shop forwards the order to CB with the operation placeOrder. The operation confirms acceptance of the order
  • CB verifies the order, the shop is notified with the operation notifyOrder and status event In Progress


  • The customer decides to cancel the order in the shop
  • The shop forwards the cancel request per orderline to CB with the operation cancelOrderLine. The operation confirms receipt of the cancellation request during the service window


  • CB confirms a successful cancellation of the order after the service window ended. The shop is notified with the operation notifyOrder and status event Cancelled
  • The shop confirms the cancellation to the customer

Webservice operations

This chapter describes the operations including some special remarks. Webservices are defined in the English language, available values in enumerations are also in human readable English (if possible).

Responses

The operations reply with a http response code as indication of the result. Regular http codes 200 and 204 indicate a successful request, codes like 400 and 404 indicate a failure.

Error messages

When the request is not successful the response includes an error message to identify the reason. Error codes are grouped into:

  • WXX The request does not comply with the yaml definition;
  • WMS Authorization failures;
  • WMO The request encountered a mapping error, mainly due to incorrect shipment date(s);
  • WSP No body supplied;
  • OMS A supplied value encountered a functional error, like unknown SKU.

The list of error codes within these groups may change in time without notice

Generic error messages

  • WXX-00001         Reported field does not comply with yaml definition
  • WXX-00002         Reported field is not recognized


  • WMS-00001         Invalid length for password
  • WMS-00002         Invalid username/password combination
  • WMS-00003         Invalid service
  • WMS-00004         Not authorized to use this service
  • WMS-00005         No username and/or password provided by the caller
  • WMS-00006         Unable to authenticate
  • WMS-00007         Unable to authorize


  • WSP-00013        Empty body

Order

placeOrder

The operation placeOrder supports sending one order for a customer. An order can contain multiple orderlines, each for a specific title. Confirmation of the operation is provided with a http-response-code.

Check order identification (Requestor Order Id)

The identification of an order is used to check if an order already exists in the CB systems. If this is the case the new order is rejected. Only open orders are taken into account, so closed/cancelled orders are ignored.

Order type

The operation is available for order types ShipBuyer (LNAFN), ShipOwner (LNEIG) and ShipSecundaryOwner (LMEONE).

Sender and Owner

In the common scenario for media orders the sender requests CB to ship titles owned by a publisher to a consumer. This scenario identifies the publisher as owner, the sender (shop) as buyer from the owner and the consumer as receiver (and buying from the shop). An alternative scenario is secondary ownership, in this alternative scenario the sender (shop) already purchased titles from the publisher and requests CB to ship from its own stock.

Party

Because parties where goods have to be delivered are not known by CB the PartyType “ReceiverAddress,” is mandatory and all name and address information must be provided.

Values added services (VAS)

VAS activities can be controlled by means of special handling instructions for the order.

Examples of instructions:

  • Wrap the books in gift paper
  • Add leaflet to the package

Available special handling instructions must be agreed upon in advance by requestor and CB.

Specific error messages

OMS-01097         Unknown SKU

OMS-01099         Duplicate OrderId

OMS-01100         Unknown ShipmentCode

OMS-01107         Unknown CountryCode

OMS-01202         Unknown RelationId

OMS-01315         Unknown SKU

OMS-01338         Unknown document

cancelOrderLine

The operation cancelOrderLine supports cancellation of one orderline. Cancellation is available until the orderline is released for production (“vrijgegeven”). Confirmation of the operation is provided with a http-response-code. The operation requires the OrderId and OrderLineId as input and is available for orders entered via webservices only.

Specific error messages

OMS-01201         Unable to map sending party

OMS-01216         Unable to map OrderId

OMS-01251         Unable to map OrderLineId

OMS-01269         Unable to cancel. Orderline already processed

getOrderStatus

When the status of an order or orderline is changed a notifyOrder message is sent. This is the preferred trigger to call the operation getOrderStatus.

The operation getOrderStatus provides the status summary of the requested order. An order can contain multiple orderlines, each for a specific title. The status of every orderline is reported separately. An orderline can also be reported in multiple statuses, for instance when part of the quantity is available and ready for production and the remaining quantity is in backorder.

If (a part of) the order is not delivered, the status includes an explanation why.

The operation requires the OrderId as input and available for orders entered via webservices only.

Available statuses for notifyOrder:

  • New Order is accepted after being received during the service window
  • InProgress Order(line) passed validation
  • ProductionReady Order(line) is ready for pick/pack in warehouse
  • Warning Order processing started with an issue for at least one orderline
  • Processed Order is finished with shipment
  • Cancelled Order is finished without shipment

Shipment

getShippingUnit

When a shipment is ready to be shipped a notifyShipment message is sent per available shipping unit. The operation getShippingUnit provides the contents of the shipping unit and the relation to order and orderlines. An order can be shipped in multiple shipping units.

The operation requires the ShippingUnitId as input.

Available statuses for notifyShipment:

  • Processed ShippingUnit is ready for shipping

Include Page
General information CB webservice
General information CB webservice

Test environment


Include Page
Order simulation for test purpose
Order simulation for test purpose

Addendum

Migration strategy from batch file to webservice

Suggested migration strategy from batch file to webservice:

  • Verify technical and functional process with a live connection to the CB test environment.
  • Arrange for shadow-run(s) in a combination of production and test environments,, i.e. send an OPDNAW message to the CB production environment, extract a few orders and send them via the webservice to the CB test environment. CB can verify the received data in the test environment against the production data from the OPDNAW.
  • Arrange for go-live date
  • Send a limited number of orders via the webservice to the CB production environment. CB can monitor the processing of these orders.
  • Verify the information in the order status and shipping unit operations.
  • Step-by-step increase the webservice load until the required level is reached.
  • If applicable then disable the file based flow.