Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Revision

to be announced

Date

Description

New version due to move to a new server. Authentication, URL change and new yaml version.

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

Initial document

Information

(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 concerns available stock of the owner 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.

  • No account is taken of agreed logistical constraints like cut-off times

Operation: getStockAvailability

Request

Parameter

Description

Cardinality

Approved values

Product

Product composite

1..1000

ProductId

Identification of the product ät CB for which the available stock is requested

1..1

Maximum length 250 characters.Supported characterset Windows-1252

ProductIdType

The identification type of the product 

1..1

OWN

OwnerId

Identification of the owner of the product for which the available stock is requested

1..1

Response

Parameter

Description

Optionality

Approved values

StockAvailabilityByOwner

Stock availability by owner composite

1..n

ProductId

Identification of the product at CB for which the available stock is requested

1..1

ProductIdType

The identification type of the product

1..1

OWN

OwnerId

Identification of the owner of the product for which the available stock is requested

1..1

QuantityAvailable

The number of products available at the time of this request and ready for delivery

1..1

Authentication

Authentication

OPenID Connect (OIDC)

Authentication by means of a (Bearer) token.

Token

The token is requested

via

by means of an API call with credentials known to the

(web) shop

client. The credentials are specified as

a parameter.

parameters

Content type

Content-Type: application/x-www-form-urlencoded

Code Block
languagejson
grant_type=client_credentials&client_id=<client-id>&client_secret=<client-secret>

Token

URL's

voor opvragen

for requesting token:
test                  : https://token.tst.cb-api.nl/oauth2/token

acceptatie       

production      : https://token.

acc.

cb-api.nl/oauth2/token


productie        :

Code Block
languagejson
curl --request POST \
  --url 'https://token.tst.cb-api.nl/oauth2/token' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data grant_type=client_credentials \
  --data client_id=YOUR_CLIENT_ID \
  --data client_secret=YOUR_CLIENT_SECRET

Webservice information

specificationhttps://app.swaggerhub.com/apis/URL Production

Webservice approache

REST - Representational State Transfer

OpenAPI

Specification

View file
namecb_org
/
-PPStockAvailabilityByOwnerAPI
(PhysicalProductStockAvailabilityByOwnerAPI
-1.0.0-resolved.yaml
)

Content type

The content/body in the request and response has to be, will be in json format Is dit wel oké. Bij Authentication

URL Test

URL Production

https://media.cb-api.nl/physicalproduct/stockbyowner/v1/availabilitybyowner

URL Test

https://media.tst.cb-api.nl/physicalproduct/stockbyowner/v1/availabilitybyowner

Supported SSL/TLS protocols

TLS 1.2

TLS 1.3

Response messages

HTTP code

Code

Message

200

200

WMS-00025

### product(s) not found or no stock

400

CEP-002

<detail "invalid (based on OpenAPI-specification) input" message>

401

CEP-003

You are not authenticated

404

CEP-004

Resource not available

500

"Internal server error"

500

WMS-00000

Something went wrong in processing the request. (<error-reference-code>)

Physical products for test purposes

EAN

Title

Publisher

Volume limits and performance requirements

Performance

The average service response time is no less than 2 seconds in prime time (08:00 -01:00). Inside this window, 99.95% of the requests will be dealt with. Outside prime time, 99% of the requests will be dealt with within 6 seconds.

Availability

The general availability of the service equals an average of 99.95% in prime time (08:00 - 01:00) in the standard time zone: UTC GMT +1. 
Outside this window, the web service availability may be lower, but never less than 95%. Planned maintenance by CB will be executed outside prime time and will be announced at least five working days in advance.

...