openapi: 3.0.3 info: title: Magaya API (Modeled) description: >- A modeled REST representation of the Magaya logistics object model exposed to integrators of the Magaya Digital Freight Platform. Magaya's own programmatic surfaces are (1) the Magaya API, historically a SOAP/XML Web Service reached at a per-tenant base of the form https://SYSTEMID.magayacloud.com/api and authenticated with a dedicated API user (username/password) configured inside the Magaya system; (2) the newer Magaya Open API, a collection of web services covering shipments, bookings, quotes, rates, invoices, bills, inventory balances, shipping events, document attachments, organization master data, and warehousing; and (3) the REST Digital Freight Portal API inherited from the Qwyk acquisition (developer.qwykportals.com), authenticated with Auth0 machine-to-machine OAuth clients. This OpenAPI document does NOT reproduce a confirmed open self-serve reference. Access to any Magaya API requires a licensed Magaya subscription and a configured API user, so the paths, parameters, and schemas here are honestly modeled from Magaya's published object model (Shipments, Warehouse Receipts, Invoices, Items, and Transactions) to give integrators a starting map. Verify exact operation names, fields, and authentication against the documentation for your Magaya edition and version before building. version: '0.1-modeled' contact: name: Magaya url: https://www.magaya.com/ x-access-model: >- Gated. Requires a Magaya subscription and an API user configured in the customer's own tenant. Public reference documentation exists, but there is no open self-serve API key signup. Base URL is per-tenant (https://SYSTEMID.magayacloud.com/api). x-endpoints-modeled: true servers: - url: https://SYSTEMID.magayacloud.com/api description: >- Per-tenant Magaya Cloud base URL. Replace SYSTEMID with your Magaya System ID. On-premises deployments expose an equivalent host on the customer's network. security: - apiUser: [] tags: - name: Shipments description: Air, ocean, and ground shipment records and their tracking events. - name: Warehouse Receipts description: Cargo received into a Magaya-managed warehouse and inventory balances. - name: Invoices description: Accounts-receivable invoices and their charge lines. - name: Items description: Item and commodity master data referenced across transactions. - name: Transactions description: Generic Magaya transaction documents - orders, bookings, quotes, releases. paths: /shipments: get: operationId: listShipments tags: - Shipments summary: List shipments description: >- Lists shipments in the Magaya system. Modeled endpoint - confirm the exact operation against your Magaya edition. parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' - name: updatedSince in: query required: false schema: type: string format: date-time description: Return shipments modified on or after this timestamp. responses: '200': description: A page of shipments. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Shipment' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createShipment tags: - Shipments summary: Create a shipment requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Shipment' responses: '201': description: The created shipment. content: application/json: schema: $ref: '#/components/schemas/Shipment' '401': $ref: '#/components/responses/Unauthorized' /shipments/{guid}: get: operationId: getShipment tags: - Shipments summary: Retrieve a shipment parameters: - $ref: '#/components/parameters/Guid' responses: '200': description: The requested shipment. content: application/json: schema: $ref: '#/components/schemas/Shipment' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /warehouse-receipts: get: operationId: listWarehouseReceipts tags: - Warehouse Receipts summary: List warehouse receipts parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' responses: '200': description: A page of warehouse receipts. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/WarehouseReceipt' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createWarehouseReceipt tags: - Warehouse Receipts summary: Create a warehouse receipt requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WarehouseReceipt' responses: '201': description: The created warehouse receipt. content: application/json: schema: $ref: '#/components/schemas/WarehouseReceipt' '401': $ref: '#/components/responses/Unauthorized' /warehouse-receipts/{guid}: get: operationId: getWarehouseReceipt tags: - Warehouse Receipts summary: Retrieve a warehouse receipt parameters: - $ref: '#/components/parameters/Guid' responses: '200': description: The requested warehouse receipt. content: application/json: schema: $ref: '#/components/schemas/WarehouseReceipt' '404': $ref: '#/components/responses/NotFound' /invoices: get: operationId: listInvoices tags: - Invoices summary: List invoices parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' responses: '200': description: A page of invoices. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Invoice' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createInvoice tags: - Invoices summary: Create an invoice requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Invoice' responses: '201': description: The created invoice. content: application/json: schema: $ref: '#/components/schemas/Invoice' '401': $ref: '#/components/responses/Unauthorized' /invoices/{guid}: get: operationId: getInvoice tags: - Invoices summary: Retrieve an invoice parameters: - $ref: '#/components/parameters/Guid' responses: '200': description: The requested invoice. content: application/json: schema: $ref: '#/components/schemas/Invoice' '404': $ref: '#/components/responses/NotFound' /items: get: operationId: listItems tags: - Items summary: List items parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' responses: '200': description: A page of items. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Item' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createItem tags: - Items summary: Create an item requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Item' responses: '201': description: The created item. content: application/json: schema: $ref: '#/components/schemas/Item' '401': $ref: '#/components/responses/Unauthorized' /items/{guid}: get: operationId: getItem tags: - Items summary: Retrieve an item parameters: - $ref: '#/components/parameters/Guid' responses: '200': description: The requested item. content: application/json: schema: $ref: '#/components/schemas/Item' '404': $ref: '#/components/responses/NotFound' /transactions: get: operationId: listTransactions tags: - Transactions summary: List transactions description: >- Lists Magaya transaction documents (pickup orders, bookings, quotations, sales orders, purchase orders, cargo releases, and other dated transactions). Filter by type. parameters: - name: type in: query required: false schema: type: string enum: - PickupOrder - Booking - Quotation - SalesOrder - PurchaseOrder - CargoRelease description: The Magaya transaction type to filter on. - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' responses: '200': description: A page of transactions. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Transaction' '401': $ref: '#/components/responses/Unauthorized' /transactions/{guid}: get: operationId: getTransaction tags: - Transactions summary: Retrieve a transaction parameters: - $ref: '#/components/parameters/Guid' responses: '200': description: The requested transaction. content: application/json: schema: $ref: '#/components/schemas/Transaction' '404': $ref: '#/components/responses/NotFound' components: securitySchemes: apiUser: type: http scheme: basic description: >- Magaya API user. A dedicated API user (username and password) is configured inside the Magaya system, distinct from a regular login user. The Digital Freight Portal REST API instead uses Auth0 machine-to-machine OAuth client credentials. parameters: Limit: name: limit in: query required: false schema: type: integer default: 50 maximum: 500 description: Maximum number of records to return. Offset: name: offset in: query required: false schema: type: integer default: 0 description: Number of records to skip for pagination. Guid: name: guid in: path required: true schema: type: string description: The Magaya object GUID identifying the record. responses: Unauthorized: description: Authentication failed or the API user is not authorized. content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: The requested record was not found. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: Shipment: type: object properties: guid: type: string number: type: string description: Shipment number. mode: type: string enum: - Air - Ocean - Ground shipper: $ref: '#/components/schemas/Party' consignee: $ref: '#/components/schemas/Party' origin: type: string destination: type: string status: type: string events: type: array items: $ref: '#/components/schemas/ShippingEvent' createdOn: type: string format: date-time ShippingEvent: type: object properties: code: type: string description: type: string location: type: string occurredOn: type: string format: date-time WarehouseReceipt: type: object properties: guid: type: string number: type: string warehouse: type: string supplier: $ref: '#/components/schemas/Party' pieces: type: integer weight: type: number volume: type: number items: type: array items: $ref: '#/components/schemas/Item' receivedOn: type: string format: date-time Invoice: type: object properties: guid: type: string number: type: string billTo: $ref: '#/components/schemas/Party' currency: type: string total: type: number relatedShipmentGuid: type: string charges: type: array items: $ref: '#/components/schemas/Charge' issuedOn: type: string format: date-time Charge: type: object properties: description: type: string quantity: type: number rate: type: number amount: type: number Item: type: object properties: guid: type: string partNumber: type: string description: type: string unit: type: string weight: type: number volume: type: number onHand: type: number description: Current inventory balance. Transaction: type: object properties: guid: type: string number: type: string type: type: string description: Transaction type (PickupOrder, Booking, Quotation, etc). party: $ref: '#/components/schemas/Party' status: type: string createdOn: type: string format: date-time Party: type: object properties: name: type: string address: type: string country: type: string Error: type: object properties: code: type: string message: type: string