openapi: 3.0.0 info: title: Orders description: 'This an API for managing orders that exist in the Union Fashion orders, allowing any desktop, web, mobile, or device application to integrate with orders made via our platform.' version: '1.0' servers: - url: '{{baseUrl}}' paths: /orders: post: summary: Add Order description: Creates a new order. operationId: addOrder tags: - Orders requestBody: description: 'A order schema.' content: application/json: schema: $ref: '#/components/schemas/Order' example: category: Jeans brand: Union color: black gender: m unitPrice: 49.99 unitSalePrice: 29.99 security: - api_key: [] responses: 201: description: 'Successful creation of order.' content: application/json: schema: $ref: '#/components/schemas/Order' example: status: success deprecated: false get: summary: Get Orders description: Pulls a list of all order operationId: getOrders tags: - Orders parameters: - name: query in: query description: 'A query to search for orders by.' required: true schema: type: string example: 'shirts' security: - api_key: [] responses: 200: description: 'List of orders.' content: application/json: schema: $ref: '#/components/schemas/Orders' example: status: success deprecated: false '/orders/{orderId}': get: summary: Get Order description: Retrieves a single order. operationId: getOrder tags: - Orders parameters: - name: orderId in: path description: The order ID to retrieve. required: true schema: type: string example: order-one responses: 200: description: 'Single order.' content: application/json: schema: $ref: '#/components/schemas/Order' example: status: success deprecated: false security: - api_key: [] put: summary: Update description: Supports either full or partial updates. operationId: updateOrder tags: - Orders parameters: - name: orderId in: path description: The order ID to retrieve. required: true schema: type: string example: order-one security: - api_key: [] requestBody: description: 'A order object.' content: application/json: schema: $ref: '#/components/schemas/Order' example: unitSalePrice: 29.99 required: true responses: 204: description: 'Successfully updated.' deprecated: false delete: tags: - Orders summary: Delete description: 'Delete an individual order.' operationId: deleteOrder parameters: - name: orderId in: path description: The order ID to retrieve. required: true schema: type: string example: order-one security: - api_key: [] responses: 204: description: 'Order deleted.' deprecated: false components: securitySchemes: api_key: type: "apiKey" name: "x-api-key" in: "header" schemas: Orders: type: array items: $ref: "#/components/schemas/Order" Order: title: Order required: - identifier - name type: object properties: identifier: type: string name: type: string description: type: string image: type: string url: type: string brand: type: string category: type: string color: type: string logo: type: string manufacturer: type: string material: type: string model: type: string releaseDate: type: string sku: type: string width: type: string weight: type: string depth: type: string height: type: string example: id: XYZ-JEAN-123 category: Jeans brand: Union color: black gender: m unitPrice: 49.99 unitSalePrice: 29.99 tags: - name: Orders description: 'A order object.'