Environments, API's and URL's
The ORP ecosystem is running in 3 tiers. Development, Staging and production. The development environment is the environment where all development takes place. This is usually not used by clients. The staging environment is where all the stable code is deployed before going live. Acceptance testing will be done on the staging environment. The production environment is where all the services live that are in use for production workloads.
API’s
ORP has a core set of API’s that can be used to build applications. To be able to call a method on these API’s a token is needed to authenticate, see article https://wolfpack-dcs.atlassian.net/wiki/spaces/CS/pages/2222391683.
Identity Server token endpoint, this is the endpoint to obtain a token to be able to call our API’s.
Order read API, the order read API is used to request order information such as order lists and order details.
Order write API, the order write API is used to manipulate orders and add information such as shipments.
Stock read API, the stock read API is used to request stock levels for articles.
Stock write API, the stock write API is used to manipulate stock entries.
Product read API, the product read API contains a non hierarchical entry for all sku’s that can be sold. This database contain documents and is used to query for complete products.
Product write API, the product write API contains a relational model of the products in ORP and is used to manipulate products, The products are structured in a master/variant model.
Shipping labels API, the shipping labels API is used to request shipping labels for different shippers such as PostNL, DHL, Bpost, etc.
Serial numbers API, the serial numbers API can be used to request serial numbers. This serial numbers will be guaranteed to be unique and will be generated like a SQL auto generate id column. 1,2,3,4……….
URL’s
Production
Staging
Tenants, scopes and general request information
Tenant and Scope
When connecting to ORP the TenantId is always embedded in the bearer token. The TenantId is the general identifier for a customer. A TenantId can have one or more Scopes. A Scope is used to distinguish between sub companies, brands, etc.
See the example below. B32 groep is the mother company of Open32 and Silvercreek. The TenantId will be something like: B32, the Scopes will be something like O32 and SC. For every api call that returns one or multiple resources you have to explicitly define the scopeId parameter.
HTTP Methods
The following HTTP request types are used:GET
to retrieve information from the server.POST
to send data to the server to create a new object or to update an existing one.PUT
to update a singular resource. It replaces the current representation of the target resource with the uploaded content.DELETE
to remove all current representations of the target resource given by a URI.
HTTP Response codes
200
HTTP OK, can have result data400
Bad Request401
Unauthorized403
Forbidden404
Not Found
Query standards
Common query functionality includes paging and filtering. Both are standardized within the API.
Query a single resource, when requesting a single resource you will always get the entire object including it’s relations.
Query multiple resources, queries requesting multiple resources always return a paginated result. The paging is based on the limit and the offset parameters.
When querying lists of items there are some mandatory parameters.
offset is the number of elements skipped.
limit is the max number of elements retrieved.
withTotal is a boolean that decides if you get the total result count for this query or not.
filter is a search term to filter the query results on
copyright wolfpack DCS b.v. 2020