Table of Contents |
---|
Inleiding
In dit document wordt de webservice MediaOrderB2C toegelicht. Deze webservice is ontwikkeld met REST/JSON. 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 |
---|---|---|---|---|---|
File | MediaFile | placeFile | Klant | CB | 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. |
Order | MediaOrderB2C | placeOrder | Klant | CB | 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. |
getOrderStatus | Klant | CB | 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. | ||
getShippingUnits | Klant | CB | 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. | ||
cancelOrderLine | Klant | CB | 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. | ||
MediaOrderNotify | notifyOrder | CB | Klant | Het melden dat de order of orderregel een vooraf gedefinieerde status heeft bereikt. | |
Shipment | MediaShipmentNotify | notifyShipment | CB | Klant | 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. |
MediaShipment | getShippingUnit | Klant | CB | Het opvragen van details van een shippingunit/levereenheid. In de details is per artikel een referentie naar de relevante orderregel opgenomen. | |
Postponed-order | OrderBeheer | getPostponedOrders | CB | CB | Het opvragen van orders die gedurende het maintenance window zijn geparkeerd en nog niet zijn verwerkt. |
placeSingleOrder | CB | CB | Het doorzetten van een order nadat deze tijdelijk geparkeerd is tijdens het maintenance window. | ||
getPostponedCancelOrderLines | CB | CB | Het opvragen van annuleringen voor orderregels die gedurende het maintenance window zijn geparkeerd en nog niet zijn verwerkt. | ||
cancelSingleOrderLine | CB | CB | Het doorzetten van een annulering voor een orderregel nadat deze tijdelijk geparkeerd is tijdens het maintenance window. |
Waardes voor lijsten
De webservice operaties gebruiken Engelse termen en human readable waardes voor lijsten.
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Downloadable yaml files
- MediaOrderB2C v0.9.8.yaml
- MediaFile v0.9.0.yaml
- MediaOrderNotify v0.9.4.yaml
- MediaShipmentB2C v0.9.1.yaml
- MediaShipmentNotify v0.9.3.yaml
- MediaShippingUnit v0.9.2.yaml
Collapsable codeblock met MediaOrder2C v0.9.8.yaml
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
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." |
Expand | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|