openapi: 3.1.0 info: title: Oracle Retail Merchandising Foundation Cloud Service Fulfillment PurchaseOrders API description: Oracle Retail Merchandising Foundation Cloud Service (RMFCS) provides REST APIs for managing merchandise hierarchies, item setup, purchase orders, cost management, supplier management, and inventory transactions across omnichannel retail operations. version: 26.1.0 contact: name: Oracle Retail Support url: https://support.oracle.com license: name: Oracle Technology Network License url: https://www.oracle.com/legal/terms/ servers: - url: https://{host}/MerchServices/MerchRes/v1 description: Oracle Retail Merchandising REST API variables: host: default: retail.example.com description: RMFCS hostname security: - oauth2: [] tags: - name: PurchaseOrders description: Purchase order management paths: /purchaseorders: get: operationId: listPurchaseOrders summary: List purchase orders description: Returns purchase orders with status and shipment information. tags: - PurchaseOrders parameters: - name: status in: query description: Filter by order status schema: type: string enum: - W - A - C - T - D - name: supplier in: query description: Filter by supplier number schema: type: integer - name: fromDate in: query description: Filter orders not before this date (YYYY-MM-DD) schema: type: string format: date - name: toDate in: query description: Filter orders not after this date (YYYY-MM-DD) schema: type: string format: date - name: offset in: query schema: type: integer default: 0 - name: limit in: query schema: type: integer default: 100 responses: '200': description: Purchase order list content: application/json: schema: type: object properties: purchaseOrders: type: array items: $ref: '#/components/schemas/PurchaseOrder' totalCount: type: integer '401': $ref: '#/components/responses/Unauthorized' post: operationId: createPurchaseOrder summary: Create a purchase order description: Creates a new purchase order for a supplier. tags: - PurchaseOrders requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PurchaseOrderCreate' responses: '201': description: Purchase order created content: application/json: schema: $ref: '#/components/schemas/PurchaseOrder' '400': $ref: '#/components/responses/BadRequest' /purchaseorders/{orderId}: get: operationId: getPurchaseOrder summary: Get a purchase order description: Returns purchase order header and detail lines. tags: - PurchaseOrders parameters: - name: orderId in: path required: true schema: type: integer responses: '200': description: Purchase order details content: application/json: schema: $ref: '#/components/schemas/PurchaseOrderDetail' '404': $ref: '#/components/responses/NotFound' components: responses: Unauthorized: description: Authentication required content: application/json: schema: $ref: '#/components/schemas/Error' BadRequest: description: Invalid request content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Error' schemas: PurchaseOrderDetail: allOf: - $ref: '#/components/schemas/PurchaseOrder' - type: object properties: lines: type: array items: $ref: '#/components/schemas/PurchaseOrderLine' PurchaseOrder: type: object description: A purchase order header properties: orderId: type: integer description: Order number supplier: type: integer description: Supplier number status: type: string enum: - W - A - C - T - D description: W=Worksheet, A=Approved, C=Closed, T=Terminated, D=Deleted orderDate: type: string format: date notBeforeDate: type: string format: date notAfterDate: type: string format: date freightTerms: type: string paymentTerms: type: string currencyCode: type: string maxLength: 3 totalCost: type: number format: double totalRetail: type: number format: double createDatetime: type: string format: date-time lastUpdateDatetime: type: string format: date-time PurchaseOrderCreate: type: object required: - supplier - orderDate - currencyCode properties: supplier: type: integer orderDate: type: string format: date notBeforeDate: type: string format: date notAfterDate: type: string format: date currencyCode: type: string maxLength: 3 freightTerms: type: string paymentTerms: type: string PurchaseOrderLine: type: object properties: seqNo: type: integer item: type: string location: type: integer locationType: type: string enum: - S - W unitCost: type: number format: double unitRetail: type: number format: double qtyOrdered: type: number format: double qtyReceived: type: number format: double shipDate: type: string format: date cancelAfterDate: type: string format: date Error: type: object properties: code: type: string message: type: string details: type: array items: type: string securitySchemes: oauth2: type: oauth2 flows: clientCredentials: tokenUrl: https://identity.oraclecloud.com/oauth2/v1/token scopes: retail.read: Read retail data retail.write: Write retail data