PhysicalProductStockService - getStockAvailability
Revision
Date | Description |
---|---|
to be announced | New version due to move to a new server. URL change and yaml version. |
Dec 20, 2021 | As of February 1, 2022, CB will no longer support TLS 1.0 and 1.1 |
Feb 19, 2018 | 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 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.
Operation: getStockAvailability
Request | |||
Parameter | Description | Cardinality | Approved values |
Product | Product composite | 1..1000 |
|
ProductId | Identification of the product for which the available stock is requested | 1..1 |
|
ProductIdType | The identification type of the product | 1..1 | EAN |
Response | |||
Parameter | Description | Optionality | Approved values |
StockAvailability | Stock availability composite | 1..n |
|
ProductId | Identification of the product for which the available stock is requested | 1..1 |
|
ProductIdType | The identification type of the product | 1..1 | EAN |
QuantityAvailable24hrs | The number of products available at the time of this request and ready for delivery within 24 hours | 1..1 |
|
QuantityAvailable48hrs | The 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 |
|
Authentication
OPenID Connect (OIDC) |
(Bearer) token. Token is requested via an API call with credentials known to the (web) shop. The credentials are specified as a parameter. |
Content-Type: application/x-www-form-urlencoded grant_type=client_credentials&client_id=<client-id>&client_secret=<client-secret> |
URL's voor opvragen token: |
Webservice information
Webservice approache | REST - Representational State Transfer |
OpenAPI specification | https://app.swaggerhub.com/apis/cb_org/PPStockAvailabilityAPI (PhysicalProductStockAvailabilityAPI-1.0.0.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/stock/v1/availability |
Supported SSL/TLS protocols | TLS 1.2 |
TLS 1.3 |
Response messages
HTTP code | Code | Message |
---|---|---|
200 |
|
|
200 | WMS-00015 | ### 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 |
---|---|---|
9789000300914 | Spreekwoorden verklaard | CB Test EAN's voor webservices |
9789000307456 | Capitool Leuke uitstapjes in Nederland en Vlaanderen | CB Test EAN's voor webservices |
9789047501596 | Basiskookboek bij voedselallergie en -intolerantie | CB Test EAN's voor webservices |
9789047512134 | over een filmauditie, dromen en bedrog & zo | CB Test EAN's voor webservices |
9789047515548 | Regen en sterren | CB Test EAN's voor webservices |
9789047515715 | On Track Picknicken in de natuur | CB Test EAN's voor webservices |
9789047520689 | Niets meer te verliezen | CB Test EAN's voor webservices |
9789049104788 | Prisma miniwoordenboek Noors | CB Test EAN's voor webservices |
9789049107024 | Prisma complete taalcursus Spaans | CB Test EAN's voor webservices |
9789077431047 | On Track Digitale fietsrouteplanner Overijssel, Gelderland, Flevoland | CB Test EAN's voor webservices |
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.
Exception: CB can start planned maintenance four times a year at 23:00 hours.
Planned downtime: 10 hours per year
Unplanned downtime: 10 hours per year