Вы находитесь на странице: 1из 3

#%RAML 1.

0
title: Omni Channel Experience API
version: 1.0.0
baseUri: https://anypoint.mulesoft.com/mocking/api/v1/links/ea8c5dad-de9d-4017-
aeb3-1468691f9682/api # baseUri: http://localhost:8081/api
mediaType: [ application/json ]

traits:
headers: !include /exchange_modules/bbe10d3e-7ec0-4db4-bca6-193e7a410347/ezp-
omnichannel-traits/1.0.0/rest-headers-trait/rest-headers-trait.raml
client-id-secured: !include /exchange_modules/bbe10d3e-7ec0-4db4-bca6-
193e7a410347/ezp-omnichannel-traits/1.0.0/client-id-secured-trait/client-id-
secured.raml
pageable: !include /exchange_modules/bbe10d3e-7ec0-4db4-bca6-193e7a410347/ezp-
omnichannel-traits/1.0.0/rest-headers-trait/rest-headers-trait.raml

uses:
Error: /exchange_modules/bbe10d3e-7ec0-4db4-bca6-193e7a410347/ezp-omni-channel-
datatypes/1.0.0/error-datatype/error-datatype.raml
OmniChannelTypes: /exchange_modules/bbe10d3e-7ec0-4db4-bca6-193e7a410347/ezp-
omni-channel-datatypes/1.0.0/omnichannel-datatype/omni-channel-datatype.raml

types:
error: Error.error
product: OmniChannelTypes.product
order: OmniChannelTypes.order
shoppingCart: OmniChannelTypes.shoppingCart
orderConfirmationRequest: OmniChannelTypes.orderConfirmationRequest
orderConfirmation: OmniChannelTypes.orderConfirmation

/products:
/search:
description: Search resource supporting extend product list searches
get:
displayName: Product Search
is: [headers, pageable, client-id-secured]
queryParameters:
name:
description: use to query products by name
type: string
example: T-Shirt
required: false
responses:
200:
body:
application/json:
type: product[]
examples: !include examples/product-collection.raml
/product/{product_id}:
description: Get product instance details
get:
is: [client-id-secured]
responses:
200:
body:
type: product
examples: !include examples/product-single.raml

/orders:
/search:
get:
displayName: Order Search
is: [client-id-secured]
queryParameters:
user_id:
description: use to query all orders of a user
required: true
example: 1964401a-a8b3-40c1-b86e-d8b9f75b5842
responses:
200:
body:
application/json:
type: order[]
examples: !include examples/order-collection.raml
/order/{order_id}:
description: Order instance resource allowing to update orders
get:
is: [client-id-secured]
description: Retrieve order details
queryParameters:
user_id:
description: use to query all orders of a user
required: true
example: 1964401a-a8b3-40c1-b86e-d8b9f75b5842
responses:
200:
body:
application/json:
type: order
examples: !include examples/order-single.raml
/users:
/user/{user_id}:
/shopping_cart:
get:
is: [client-id-secured]
responses:
200:
body:
application/json:
type: shoppingCart
examples: !include examples/shoppingcart-single.raml
put:
is: [client-id-secured]
body:
application/json:
type: shoppingCart
examples: !include examples/shoppingcart-single-update.raml
responses:
204:
/confirmation:
description: confirm the current shopping cart - that will create an order
in the backend and provide the link to the order resource
post:
is: [client-id-secured]
body:
application/json:
type: orderConfirmationRequest
examples: !include examples/order-confirmation-request-single.raml
responses:
201:
body:
application/json:
type: orderConfirmation
examples: !include examples/order-confirmation-single.raml

Вам также может понравиться