Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

Revision

DateDescription

 

As of February 1, 2022, CB will no longer support TLS 1.0 and 1.1

Introduction

(Web) shops selling physical products to their customers place great value in fulfilling their client commitments. Important aspect is understanding the currently available stock. On this basis, the (web) shop is able to provide their customers with the correct delivery indication.

This operation allows the (web) shop to request the physically available stock of one or multiple products.  

Requirements:

  • This operation concerns physically available stock ready to be delivered within 24 or 48 hours, products that do not meet this criteria show a stock of 0 (zero). 
  • No account is taken of buyer restrictions such as delivery agreements, credit checks etc.
  • Product ownership is irrelevant in this operation. The only relevance is the physically available stock.
  • The QuantityAvailable24hrs availability is valid only during requests on workdays before the cut-off time.
  • Requests on workdays after the cut-off time and requests on non-workdays have to use the QuantityAvailable48hrs availability.

This operation only supports REST.

Authentication for this webservice

This operation does not need authentication. The UserName is only used for logging.

Operation getStockAvailability

Request

Parameter

Description

Cardinality

Approved values

ProductProduct composite1..1000
ProductId

Identification of the product for which the available stock is requested

1..1


ProductIdTypeThe identification type of the product 1..1 EAN
Example request
POST https://testservices.cb.nl/rest/api/v1/PhysicalProductStockService/getStockAvailability HTTP/1.1
UserName: _SNIP_
Content-Type: application/json
  
{
    "Product": [
    {"ProductId": "9780582275225","ProductIdType": "EAN"},
    {"ProductId": "9783259011928","ProductIdType": "EAN"}
    ]
}

Reply

Parameter

Description

Cardinality

Approved values

StockAvailabilityStock availability composite1..n
ProductIdIdentification of the product for which the available stock is requested1..1


ProductIdTypeThe identification type of the product1..1EAN
QuantityAvailable24hrsThe number of products available at the time of this request and ready for delivery within 24 hours.1..1
QuantityAvailable48hrsThe number of products available at the time of this request and ready for delivery within 48 hours. This includes delivery within 24 hours.1..1

Example reply - Without message

Example reply - without message
{
  "StockAvailability": [
    {
      "ProductId": "9780582275225",
      "ProductIdType": "EAN",
      "QuantityAvailable24hrs": "54",
      "QuantityAvailable48hrs": "1554"
    },
    {
      "ProductId": "9783259011928",
      "ProductIdType": "EAN",
      "QuantityAvailable24hrs": "11",
      "QuantityAvailable48hrs": "11"
    }
  ]
}

Example reply - With message

Example rely - with message
{
  "Message": {
    "MessageType": "E",
    "MessageCode": "WMS-00011",
    "MessageText": "Invalid value for productIdType."
  }
}

Specific messages (type/code/text) for this webservice

Type

Code

Text

EWMS-00010The field productId is mandatory.
EWMS-00011Invalid value for productIdType.
EWMS-00012The field productType is mandatory.
EWMS-00013At least one product required
EWMS-00014The number of products is bigger than maximum 1000
EWMS-00015Product(s) not found
EEBS-11001Something went wrong in processing the request.

General webservice information

Content-Type

The content/body in the request and the response has to be / will be in json format.

Content-Typeapplication/json

Supported SSL/TLS protocols 

TLS ProtocolsTLS1.2

TLS1.3

Authentication

CB uses message level authentication based on header parameters “UserName” and “Password”. These will be provided when you sign up for this service at CB.

Response messages

If a webservice is technical able to process, it will respond with a HTTP status 200. The response can contain a message with additional information. It can be an error (MessageType “E”) in case it wasn’t possible to supply a functional answer or additional explanation/information about the answer (MessageType “I”).

A message contains of:

A message contains of:
MessageTypeE or I
MessageCodeformat XXX-99999
MessageTextTextual information/reason

The following generic error (E) messages are defined:

WMS-00002Invalid username/password combination
WMS-00004Not authorized to use this service
WMS-00005No username and/or password provided by the caller
EBS-11000Something went wrong in processing the request
EBS-11001Something went wrong in processing the request

Optional parameter

For any optional attribute one of the following options applies:

  • be filled with the correct value
  • be left out
  • be filled with “” (read empty)

An optional parameter may therefore never be filled with the value null.

Unable to render {include} The included page could not be found.


  • No labels