{
    "openapi": "3.0.0",
    "info": {
        "title": "Embedded Checkout API",
        "description": "API documentation for integrating embedded checkout into your project.",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "routes/api"
        }
    ],
    "paths": {
        "/api/cod/get-new-price-by-quantity": {
            "post": {
                "tags": [
                    "COD"
                ],
                "summary": "Get new product price by quantity (COD)",
                "description": "Returns recalculated pricing info for a specific product line in an existing COD order",
                "operationId": "e2a6f8f76677204b7cb57e170e69f508",
                "requestBody": {
                    "description": "Payload describing the order and the specific product line to re-price.",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "fulfilment_package_id",
                                    "product"
                                ],
                                "properties": {
                                    "fulfilment_package_id": {
                                        "description": "Fulfilment package ID for the order (the identifier used when submitting to the fulfilment center).",
                                        "type": "string",
                                        "example": "12345"
                                    },
                                    "product": {
                                        "required": [
                                            "sku",
                                            "type",
                                            "old_quantity",
                                            "new_quantity"
                                        ],
                                        "properties": {
                                            "sku": {
                                                "description": "Product SKU to adjust.",
                                                "type": "string",
                                                "example": "123123123"
                                            },
                                            "type": {
                                                "description": "Product line type within the order.",
                                                "type": "string",
                                                "enum": [
                                                    "main",
                                                    "upsell"
                                                ],
                                                "example": "main"
                                            },
                                            "old_quantity": {
                                                "description": "Existing quantity on the order line. Must be between 1 and 4 (inclusive).",
                                                "type": "integer",
                                                "maximum": 4,
                                                "minimum": 1,
                                                "example": 1
                                            },
                                            "new_quantity": {
                                                "description": "Requested new quantity. Must be between 1 and 4 (inclusive) and different from old_quantity.",
                                                "type": "integer",
                                                "maximum": 4,
                                                "minimum": 1,
                                                "example": 2
                                            }
                                        },
                                        "type": "object"
                                    }
                                },
                                "type": "object"
                            },
                            "example": {
                                "fulfilment_package_id": "12345",
                                "product": {
                                    "sku": "123123123",
                                    "type": "main",
                                    "old_quantity": 1,
                                    "new_quantity": 2
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "New pricing calculated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "fulfilment_package_id": {
                                            "type": "string",
                                            "example": "12345"
                                        },
                                        "product": {
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "example": "main"
                                                },
                                                "sku": {
                                                    "type": "string",
                                                    "example": "123123123"
                                                },
                                                "quantity": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "unit_price": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 19.99,
                                                    "nullable": true
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "new_total_price": {
                                            "type": "number",
                                            "format": "float",
                                            "example": 59.97
                                        }
                                    },
                                    "type": "object"
                                },
                                "example": {
                                    "fulfilment_package_id": "12345",
                                    "product": {
                                        "type": "main",
                                        "sku": "123123123",
                                        "quantity": 2,
                                        "unit_price": 19.99
                                    },
                                    "new_total_price": 59.97
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (insufficient token ability)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Insufficient token ability for this operation."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Order not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Order not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation or domain errors",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "oneOf": [
                                        {
                                            "description": "Standard validation error payload",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "example": "The given data was invalid."
                                                },
                                                "errors": {
                                                    "type": "object",
                                                    "example": {
                                                        "product.type": [
                                                            "Product type must be one of: main, upsell"
                                                        ],
                                                        "product.new_quantity": [
                                                            "The product.new_quantity and product.old_quantity must be different."
                                                        ]
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        },
                                        {
                                            "description": "Domain/business rule error payloads",
                                            "properties": {
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                },
                                "examples": {
                                    "duplicate_type_sku": {
                                        "summary": "Multiple matching lines",
                                        "value": {
                                            "message": "Multiple products with same type and sku found."
                                        }
                                    },
                                    "type_sku_old_quantity_not_found": {
                                        "summary": "No line for the requested type + SKU + old quantity",
                                        "value": {
                                            "message": "Product with specified type, SKU and old quantity not found."
                                        }
                                    },
                                    "main_vs_upsell_same_sku": {
                                        "summary": "MAIN cannot be changed when UPSELL with same SKU exists",
                                        "value": {
                                            "message": "Only the upsell product quantity can be changed."
                                        }
                                    },
                                    "quantity_price_missing": {
                                        "summary": "No pricing for requested quantity",
                                        "value": {
                                            "message": "New quantity pricing does not exist for current product."
                                        }
                                    },
                                    "invalid_price": {
                                        "summary": "Invalid price returned",
                                        "value": {
                                            "message": "Invalid price."
                                        }
                                    },
                                    "bad_status": {
                                        "summary": "Order package status not eligible",
                                        "value": {
                                            "message": "You can only get new pricing if order status is: submitted. Current status: cancelled"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/api/cod/update-new-price-by-quantity": {
            "post": {
                "tags": [
                    "COD"
                ],
                "summary": "Update product price by quantity (COD)",
                "description": "Updates the quantity of a specific product line within a COD order package, reassigns stock, recalculates unit price and order totals, and returns the new pricing summary.",
                "operationId": "adc5977bbf3933d1af8f3fe8aed55e5a",
                "requestBody": {
                    "description": "Payload describing the package and the product line to update.",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "fulfilment_package_id",
                                    "product"
                                ],
                                "properties": {
                                    "fulfilment_package_id": {
                                        "description": "Fulfilment package ID for the order (identifier used at the fulfilment center).",
                                        "type": "string",
                                        "example": "12345"
                                    },
                                    "product": {
                                        "required": [
                                            "sku",
                                            "type",
                                            "old_quantity",
                                            "new_quantity"
                                        ],
                                        "properties": {
                                            "sku": {
                                                "description": "Product SKU to adjust.",
                                                "type": "string",
                                                "example": "123123123"
                                            },
                                            "type": {
                                                "description": "Product line type within the order.",
                                                "type": "string",
                                                "enum": [
                                                    "main",
                                                    "upsell"
                                                ],
                                                "example": "main"
                                            },
                                            "old_quantity": {
                                                "description": "Existing quantity on the order line. Must be between 1 and 4 (inclusive).",
                                                "type": "integer",
                                                "maximum": 4,
                                                "minimum": 1,
                                                "example": 1
                                            },
                                            "new_quantity": {
                                                "description": "Requested new quantity. Must be between 1 and 4 (inclusive) and different from old_quantity.",
                                                "type": "integer",
                                                "maximum": 4,
                                                "minimum": 1,
                                                "example": 2
                                            }
                                        },
                                        "type": "object"
                                    }
                                },
                                "type": "object"
                            },
                            "example": {
                                "fulfilment_package_id": "12345",
                                "product": {
                                    "sku": "123123123",
                                    "type": "main",
                                    "old_quantity": 1,
                                    "new_quantity": 2
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Quantity updated and pricing recalculated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "fulfilment_package_id": {
                                            "type": "string",
                                            "example": "12345"
                                        },
                                        "product": {
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "example": "main"
                                                },
                                                "sku": {
                                                    "type": "string",
                                                    "example": "123123123"
                                                },
                                                "quantity": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "unit_price": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 19.99,
                                                    "nullable": true
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "new_total_price": {
                                            "type": "number",
                                            "format": "float",
                                            "example": 59.97
                                        }
                                    },
                                    "type": "object"
                                },
                                "example": {
                                    "fulfilment_package_id": "12345",
                                    "product": {
                                        "type": "main",
                                        "sku": "123123123",
                                        "quantity": 2,
                                        "unit_price": 19.99
                                    },
                                    "new_total_price": 59.97
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (insufficient token ability)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Insufficient token ability for this operation."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Order/package not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Order not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation or domain errors",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "oneOf": [
                                        {
                                            "description": "Standard validation error payload",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "example": "The given data was invalid."
                                                },
                                                "errors": {
                                                    "type": "object",
                                                    "example": {
                                                        "product.type": [
                                                            "Product type must be one of: main, upsell"
                                                        ],
                                                        "product.new_quantity": [
                                                            "The product.new_quantity and product.old_quantity must be different."
                                                        ]
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        },
                                        {
                                            "description": "Domain/business rule error payloads",
                                            "properties": {
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                },
                                "examples": {
                                    "duplicate_type_sku": {
                                        "summary": "Multiple matching lines",
                                        "value": {
                                            "message": "Multiple products with same type and sku found."
                                        }
                                    },
                                    "type_sku_old_quantity_not_found": {
                                        "summary": "No line for the requested type + SKU + old quantity",
                                        "value": {
                                            "message": "Product with specified type, SKU and old quantity not found."
                                        }
                                    },
                                    "main_vs_upsell_same_sku": {
                                        "summary": "MAIN cannot be changed when UPSELL with same SKU exists",
                                        "value": {
                                            "message": "Only the upsell product quantity can be changed."
                                        }
                                    },
                                    "quantity_price_missing": {
                                        "summary": "No pricing for requested quantity",
                                        "value": {
                                            "message": "New quantity pricing does not exist for current product."
                                        }
                                    },
                                    "invalid_price": {
                                        "summary": "Invalid price returned",
                                        "value": {
                                            "message": "Invalid price."
                                        }
                                    },
                                    "bad_status": {
                                        "summary": "Order package status not eligible",
                                        "value": {
                                            "message": "You can only update pricing if order status is: submitted. Current status: cancelled"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/api/domains": {
            "get": {
                "tags": [
                    "Domains"
                ],
                "summary": "List domains",
                "description": "Returns a paginated list of domains with brand information. Supports cursor-based pagination (100 per page) and filtering by brand slug and active status.",
                "operationId": "c624873dac56f65b07ade349dd775226",
                "parameters": [
                    {
                        "name": "brand_slug",
                        "in": "query",
                        "description": "Filter by brand slug (exact match, must exist in brands table)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "is_active",
                        "in": "query",
                        "description": "Filter by active status (1 = active, 0 = inactive)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "enum": [
                                0,
                                1
                            ]
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "description": "Cursor for pagination (from previous response meta.next_cursor)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "host": {
                                                        "type": "string",
                                                        "example": "shop.example.com"
                                                    },
                                                    "brand_slug": {
                                                        "type": "string",
                                                        "example": "enence",
                                                        "nullable": true
                                                    },
                                                    "brand_name": {
                                                        "type": "string",
                                                        "example": "Enence Translator",
                                                        "nullable": true
                                                    },
                                                    "is_active": {
                                                        "type": "boolean",
                                                        "example": true
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2024-01-15T10:30:00.000000Z"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "links": {
                                            "properties": {
                                                "first": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "last": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "prev": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "next": {
                                                    "type": "string",
                                                    "example": "https://ecom.localhost/api/domains?cursor={secret}",
                                                    "nullable": true
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "meta": {
                                            "properties": {
                                                "path": {
                                                    "type": "string",
                                                    "example": "https://ecom.localhost/api/domains"
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 100
                                                },
                                                "next_cursor": {
                                                    "type": "string",
                                                    "example": "{secret}",
                                                    "nullable": true
                                                },
                                                "prev_cursor": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden - missing domain-list ability"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/api/octocom/order/refund-by-percentage": {
            "post": {
                "tags": [
                    "Octocom"
                ],
                "summary": "Refund entire order by percentage (Octocom)",
                "description": "Creates refund transactions for all approved purchase payments on the order, based on the provided percentage.",
                "operationId": "e046176d52cc8b49db5dfb5d550da476",
                "requestBody": {
                    "description": "Refund request payload",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "order_id",
                                    "refund_reason_type",
                                    "percentage_to_refund"
                                ],
                                "properties": {
                                    "order_id": {
                                        "description": "Numeric ID of the order to refund.",
                                        "type": "integer",
                                        "format": "int64",
                                        "example": 1273
                                    },
                                    "refund_reason_type": {
                                        "description": "Reason type for the refund.",
                                        "type": "string",
                                        "enum": [
                                            "other"
                                        ],
                                        "example": "other"
                                    },
                                    "percentage_to_refund": {
                                        "description": "Percentage to refund (currently only 1 = 100% is supported).",
                                        "type": "number",
                                        "format": "float",
                                        "maximum": 1,
                                        "minimum": 1,
                                        "example": 1
                                    }
                                },
                                "type": "object"
                            },
                            "example": {
                                "order_id": 1273,
                                "refund_reason_type": "other",
                                "percentage_to_refund": 1
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Refund processing result",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "successful_refunds": {
                                            "type": "object",
                                            "additionalProperties": {
                                                "schema": "OctocomOrderRefundControllerDocs",
                                                "properties": {
                                                    "parent_payment_ulid": {
                                                        "type": "string",
                                                        "example": "op_01kjw5f211c4apy0p5mg6nmfkx"
                                                    },
                                                    "refunded_payment": {
                                                        "properties": {
                                                            "status": {
                                                                "type": "string",
                                                                "example": "approved"
                                                            },
                                                            "ulid": {
                                                                "type": "string",
                                                                "example": "op_01kjywxmt5xmvdf5tn2rda1pqj"
                                                            },
                                                            "approved_at": {
                                                                "type": "string",
                                                                "format": "date-time",
                                                                "example": "2026-03-05T11:42:55.000000Z"
                                                            },
                                                            "currency": {
                                                                "type": "string",
                                                                "example": "USD"
                                                            },
                                                            "amount": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": -115.05
                                                            },
                                                            "products": {
                                                                "type": "array",
                                                                "items": {
                                                                    "properties": {
                                                                        "name": {
                                                                            "type": "string",
                                                                            "example": null,
                                                                            "nullable": true
                                                                        },
                                                                        "public_name": {
                                                                            "type": "string",
                                                                            "example": "Translator V2"
                                                                        },
                                                                        "slug": {
                                                                            "type": "string",
                                                                            "example": "translatorV2"
                                                                        },
                                                                        "price": {
                                                                            "type": "string",
                                                                            "example": "-108.59"
                                                                        },
                                                                        "currency": {
                                                                            "type": "string",
                                                                            "example": "USD"
                                                                        },
                                                                        "amount": {
                                                                            "type": "integer",
                                                                            "example": -4
                                                                        },
                                                                        "options": {
                                                                            "type": "object",
                                                                            "example": null,
                                                                            "nullable": true
                                                                        }
                                                                    },
                                                                    "type": "object"
                                                                }
                                                            },
                                                            "tax_amount": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": null,
                                                                "nullable": true
                                                            },
                                                            "amount_in_usd": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": -115.05
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "failed_refunds": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "parent_payment_ulid": {
                                                        "type": "string"
                                                    },
                                                    "errors": {
                                                        "oneOf": [
                                                            {
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string"
                                                                }
                                                            }
                                                        ]
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "successful_refunds": {
                                        "op_01kjw5f211c4apy0p5mg6nmfkx": {
                                            "parent_payment_ulid": "op_01kjw5f211c4apy0p5mg6nmfkx",
                                            "refunded_payment": {
                                                "status": "approved",
                                                "ulid": "op_01kjywxmt5xmvdf5tn2rda1pqj",
                                                "approved_at": "2026-03-05T11:42:55.000000Z",
                                                "currency": "USD",
                                                "amount": -115.05,
                                                "products": [
                                                    {
                                                        "name": null,
                                                        "public_name": "Translator V2",
                                                        "slug": "translatorV2",
                                                        "price": "-108.59",
                                                        "currency": "USD",
                                                        "amount": -4,
                                                        "options": null
                                                    },
                                                    {
                                                        "name": null,
                                                        "public_name": "Standard Delivery",
                                                        "slug": "standard-delivery",
                                                        "price": "-6.46",
                                                        "currency": "USD",
                                                        "amount": -1,
                                                        "options": null
                                                    }
                                                ],
                                                "tax_amount": null,
                                                "amount_in_usd": -115.05
                                            }
                                        },
                                        "op_01kjw5f9npn0e1j888zp4syvf0": {
                                            "parent_payment_ulid": "op_01kjw5f9npn0e1j888zp4syvf0",
                                            "refunded_payment": {
                                                "status": "approved",
                                                "ulid": "op_01kjywxnx20g9br80y0ww878ew",
                                                "approved_at": "2026-03-05T11:42:56.000000Z",
                                                "currency": "USD",
                                                "amount": -30.11,
                                                "products": [
                                                    {
                                                        "name": null,
                                                        "public_name": "Warranty",
                                                        "slug": "upsell-warranty-enence",
                                                        "price": "-30.11",
                                                        "currency": "USD",
                                                        "amount": -4,
                                                        "options": null
                                                    }
                                                ],
                                                "tax_amount": null,
                                                "amount_in_usd": -30.11
                                            }
                                        }
                                    },
                                    "failed_refunds": {
                                        "op_01kjw5f9npn0e1j888zp4sydgf": {
                                            "parent_payment_ulid": "op_09xyzexampleulid",
                                            "error": "An unexpected error occurred"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (insufficient token ability)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Insufficient token ability for this operation."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request – order not eligible (already refunded, wrong brand, etc.)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                },
                                "examples": {
                                    "already_refunded": {
                                        "summary": "Order already has refunded transactions",
                                        "value": {
                                            "message": "Order cannot be refunded, it seems it already have transactions that were refunded",
                                            "errors": {
                                                "order": [
                                                    "Order cannot be refunded, it seems it already have transactions that were refunded"
                                                ]
                                            }
                                        }
                                    },
                                    "wrong_brand": {
                                        "summary": "Order belongs to a different brand",
                                        "value": {
                                            "message": "Order cannot be refunded, it seems it doesn't belong to the brand: purisaki-berberine",
                                            "errors": {
                                                "order": [
                                                    "Order cannot be refunded, it seems it doesn't belong to the brand: purisaki-berberine"
                                                ]
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found – order has no approved payments",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Order cannot be refunded, it seems it doesn't have any approved payments"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "example": {
                                                "order": [
                                                    "Order cannot be refunded, it seems it doesn't have any approved payments"
                                                ]
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation errors",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                },
                                "examples": {
                                    "invalid_payload": {
                                        "summary": "Example validation payload",
                                        "value": {
                                            "message": "The given data was invalid.",
                                            "errors": {
                                                "order_id": [
                                                    "The selected order id is invalid."
                                                ],
                                                "refund_reason_type": [
                                                    "The selected refund reason type is invalid."
                                                ],
                                                "percentage_to_refund": [
                                                    "The percentage to refund must be 1."
                                                ]
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/api/octocom/order-package/reship": {
            "post": {
                "tags": [
                    "Octocom"
                ],
                "summary": "Reship an order package (Octocom)",
                "description": "Creates a new reshipment package for the given order package. The source package must have a shipped status and must not already be a reshipment itself.",
                "operationId": "85a9a3d20567b32680580fd7de2a2ca2",
                "requestBody": {
                    "description": "Reshipment request payload",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "order_package_uuid",
                                    "reship_reason_name",
                                    "products"
                                ],
                                "properties": {
                                    "order_package_uuid": {
                                        "description": "UUID of the order package to reship.",
                                        "type": "string",
                                        "format": "uuid",
                                        "example": "d1c5fac1-6ceb-40dc-a921-c9011ba98071"
                                    },
                                    "reship_reason_name": {
                                        "description": "Name of the return reason for the reshipment.",
                                        "type": "string",
                                        "enum": [
                                            "delivered_but_customer_claims_they_did_not_receive",
                                            "returned_to_sender",
                                            "missing_items",
                                            "damaged_or_defective_products",
                                            "lost_in_transit_or_stuck_parcel",
                                            "logistics_setup_error",
                                            "order_error",
                                            "fulfilment_center_change"
                                        ],
                                        "example": "returned_to_sender"
                                    },
                                    "products": {
                                        "description": "List of products to reship with their quantities.",
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "package_product_id",
                                                "quantity"
                                            ],
                                            "properties": {
                                                "package_product_id": {
                                                    "description": "ID of the order package product to reship.",
                                                    "type": "integer",
                                                    "example": 8
                                                },
                                                "quantity": {
                                                    "description": "Quantity to reship. Cannot exceed the original package product quantity.",
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "example": 2
                                                }
                                            },
                                            "type": "object"
                                        }
                                    }
                                },
                                "type": "object"
                            },
                            "example": {
                                "order_package_uuid": "d1c5fac1-6ceb-40dc-a921-c9011ba98071",
                                "reship_reason_name": "returned_to_sender",
                                "products": [
                                    {
                                        "package_product_id": 8,
                                        "quantity": 2
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Reshipment created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "old_package_uuid": {
                                            "description": "UUID of the original package.",
                                            "type": "string",
                                            "format": "uuid"
                                        },
                                        "reshipment_packages": {
                                            "description": "One or more newly created reshipment packages.",
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "uuid": {
                                                        "type": "string",
                                                        "format": "uuid"
                                                    },
                                                    "fulfilment_status": {
                                                        "type": "string",
                                                        "example": "assigned"
                                                    },
                                                    "fulfilment": {
                                                        "properties": {
                                                            "fulfilment_center": {
                                                                "type": "string",
                                                                "example": "cd"
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "China Division"
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "products": {
                                                        "type": "array",
                                                        "items": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "integer",
                                                                    "example": 13
                                                                },
                                                                "name": {
                                                                    "type": "string",
                                                                    "example": "3 Translators ($59.00/each)"
                                                                },
                                                                "quantity": {
                                                                    "type": "integer",
                                                                    "example": 2
                                                                },
                                                                "price": {
                                                                    "type": "number",
                                                                    "format": "float",
                                                                    "example": 0
                                                                },
                                                                "currency": {
                                                                    "type": "string",
                                                                    "example": "USD"
                                                                },
                                                                "order_product_id": {
                                                                    "type": "integer",
                                                                    "example": 1
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "old_package_uuid": "d1c5fac1-6ceb-40dc-a921-c9011ba98071",
                                    "reshipment_packages": [
                                        {
                                            "uuid": "b9ff610d-512c-4c29-a286-afe1369a67d6",
                                            "fulfilment_status": "assigned",
                                            "fulfilment": {
                                                "fulfilment_center": "cd",
                                                "name": "China Division"
                                            },
                                            "products": [
                                                {
                                                    "id": 13,
                                                    "name": "3 Translators ($59.00/each)",
                                                    "quantity": 2,
                                                    "price": 0,
                                                    "currency": "USD",
                                                    "order_product_id": 1
                                                }
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (insufficient token ability)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Insufficient token ability for this operation."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation errors",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                },
                                "examples": {
                                    "package_not_found": {
                                        "summary": "Order package UUID does not exist",
                                        "value": {
                                            "message": "The given data was invalid.",
                                            "errors": {
                                                "order_package_uuid": [
                                                    "The selected order package uuid is invalid."
                                                ]
                                            }
                                        }
                                    },
                                    "order_already_reshipped": {
                                        "summary": "Order has already been reshipped once",
                                        "value": {
                                            "message": "The given data was invalid.",
                                            "errors": {
                                                "order_package_uuid": [
                                                    "Order has already been reshipped once and cannot be reshipped again."
                                                ]
                                            }
                                        }
                                    },
                                    "already_reshipment": {
                                        "summary": "Package is already a reshipment",
                                        "value": {
                                            "message": "The given data was invalid.",
                                            "errors": {
                                                "order_package_uuid": [
                                                    "Package is already a reshipment and cannot be reshipped again."
                                                ]
                                            }
                                        }
                                    },
                                    "not_shipped": {
                                        "summary": "Package status is not shipped",
                                        "value": {
                                            "message": "The given data was invalid.",
                                            "errors": {
                                                "order_package_uuid": [
                                                    "Package must have status shipped in order to do reshipment."
                                                ]
                                            }
                                        }
                                    },
                                    "invalid_reason": {
                                        "summary": "Reship reason name does not exist",
                                        "value": {
                                            "message": "The given data was invalid.",
                                            "errors": {
                                                "reship_reason_name": [
                                                    "The selected reship reason name is invalid."
                                                ]
                                            }
                                        }
                                    },
                                    "product_not_in_package": {
                                        "summary": "Package product ID does not belong to the given order package",
                                        "value": {
                                            "message": "The given data was invalid.",
                                            "errors": {
                                                "products.0.package_product_id": [
                                                    "Product with id 8 does not belong to the given package."
                                                ]
                                            }
                                        }
                                    },
                                    "quantity_exceeded": {
                                        "summary": "Requested quantity exceeds available package product quantity",
                                        "value": {
                                            "message": "The given data was invalid.",
                                            "errors": {
                                                "products.0.quantity": [
                                                    "Quantity cannot exceed available package product quantity of 2."
                                                ]
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Reshipment processing failed (no fulfilment centre available)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Reshipment failed. Check fulfilment center stock status and settings."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected error during reshipment processing",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "An unexpected error occurred while processing the reshipment."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/api/orders": {
            "get": {
                "tags": [
                    "Orders"
                ],
                "summary": "List orders",
                "description": "List orders by various criteria. At least one filter parameter is required.",
                "operationId": "e877fbd28fb0282b9bbad9fa06c946c0",
                "parameters": [
                    {
                        "name": "order_id",
                        "in": "query",
                        "description": "Internal Order ID",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "hash_id",
                        "in": "query",
                        "description": "Public Order Hash ID",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "invoice_code",
                        "in": "query",
                        "description": "Invoice Code",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "email",
                        "in": "query",
                        "description": "Customer Email",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "email"
                        }
                    },
                    {
                        "name": "phone_number",
                        "in": "query",
                        "description": "Customer Phone Number",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "tracking_number",
                        "in": "query",
                        "description": "Shipping Tracking Number",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "first_name",
                        "in": "query",
                        "description": "Customer First Name (Prefix match)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "last_name",
                        "in": "query",
                        "description": "Customer Last Name (Prefix match)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "date_from",
                        "in": "query",
                        "description": "Creation Date From (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "date_to",
                        "in": "query",
                        "description": "Creation Date To (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "order_id": {
                                                        "type": "string",
                                                        "example": "12345"
                                                    },
                                                    "invoice_code": {
                                                        "type": "string",
                                                        "example": "INV-2024-001"
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2024-03-15T10:00:00.000000Z"
                                                    },
                                                    "admin_url": {
                                                        "type": "string",
                                                        "format": "uri",
                                                        "example": "https://brand.com/admin/orders/12345/view"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden - missing order-list or support:order-list ability"
                    },
                    "422": {
                        "description": "Validation Error (No parameters provided)"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/api/checkout/sessions": {
            "post": {
                "tags": [
                    "Checkout"
                ],
                "summary": "Create a new checkout session",
                "description": "Creates a new checkout session with validation rules applied.",
                "operationId": "867b6f96f301672f92bfbf5f92e8e535",
                "requestBody": {
                    "$ref": "#/components/requestBodies/CheckoutSessionRequestBody"
                },
                "responses": {
                    "201": {
                        "$ref": "#/components/responses/CheckoutSessionResponse"
                    },
                    "422": {
                        "$ref": "#/components/responses/InvalidMerchantResponse"
                    },
                    "500": {
                        "$ref": "#/components/responses/UnexpectedErrorResponse"
                    }
                }
            }
        },
        "/api/checkout/reference-order": {
            "post": {
                "tags": [
                    "Checkout"
                ],
                "summary": "Make a reference order",
                "description": "Creates a completely new order using billing information and payment method from an existing\nreference order, then immediately charges it.\n\n**Order:**\n- Creates a brand new Order record with a new order ID (different from reference order)\n\n**OrderPayment:**\n- Always creates a new OrderPayment record with type TYPE_INITIAL associated with the new order\n\n**Payment Method:**\n- Clones and uses the payment method stored on the reference order to charge the new order immediately",
                "operationId": "377089636875c2841aa93815e1d9f749",
                "requestBody": {
                    "$ref": "#/components/requestBodies/ReferenceTransactionRequestBody"
                },
                "responses": {
                    "201": {
                        "$ref": "#/components/responses/ReferenceOrderResponse"
                    },
                    "401": {
                        "$ref": "#/components/responses/UnauthenticatedResponse"
                    },
                    "403": {
                        "$ref": "#/components/responses/ForbiddenResponse"
                    },
                    "404": {
                        "$ref": "#/components/responses/OrderNotFoundResponse"
                    },
                    "422": {
                        "$ref": "#/components/responses/ReferenceOrderValidationErrors"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/api/checkout/reference-transaction": {
            "post": {
                "tags": [
                    "Checkout"
                ],
                "summary": "Make a reference transaction",
                "description": "Adds products to an existing order by charging the stored payment method from the initial\ntransaction.\n\n**Order:**\n- Uses the existing order (same order ID returned)\n- Order must not be confirmed or locked\n\n**OrderPayment:**\n- Conditionally creates a new OrderPayment record with type TYPE_UPSELL if the gateway doesn't support cart size\n  increase\n- Otherwise, reuses the existing initial payment\n\n**Payment Method:**\n- References and charges the payment method stored on the original order",
                "operationId": "5a67c79adfa1ff569aed84a7c5a3c38d",
                "requestBody": {
                    "$ref": "#/components/requestBodies/ReferenceTransactionRequestBody"
                },
                "responses": {
                    "200": {
                        "$ref": "#/components/responses/ReferenceTransactionResponse"
                    },
                    "401": {
                        "$ref": "#/components/responses/UnauthenticatedResponse"
                    },
                    "403": {
                        "$ref": "#/components/responses/ForbiddenResponse"
                    },
                    "404": {
                        "$ref": "#/components/responses/OrderNotFoundResponse"
                    },
                    "422": {
                        "$ref": "#/components/responses/ReferenceTransactionValidationErrors"
                    },
                    "500": {
                        "$ref": "#/components/responses/UnexpectedErrorResponse"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/api/checkout/session/debit/{uuid}": {
            "post": {
                "tags": [
                    "Checkout"
                ],
                "summary": "Submit checkout session using Debit payment type",
                "description": "Submits a checkout session using Debit type.",
                "operationId": "ac94edbb06851f145694948ddfd75a93",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/uuid"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SessionSubmitDebitRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "404": {
                        "$ref": "#/components/responses/MissingSessionResponse"
                    },
                    "400": {
                        "$ref": "#/components/responses/OrderResponseErrors"
                    },
                    "422": {
                        "$ref": "#/components/responses/UnsupportedPaymentTypeResponse"
                    },
                    "500": {
                        "$ref": "#/components/responses/UnexpectedErrorResponse"
                    },
                    "200": {
                        "description": "Order created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "redirect": {
                                            "description": "If 3DS is needed, redirect url will be returned",
                                            "type": "string",
                                            "example": "https://ixopay.3ds.com/redirect"
                                        },
                                        "order_ulid": {
                                            "description": "Unique identifier for the created order",
                                            "type": "string",
                                            "example": "o_01j9p1ktf70mjfx004xmds4mag"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/checkout/session/register/{uuid}": {
            "post": {
                "tags": [
                    "Checkout"
                ],
                "summary": "Submit checkout session using register payment type",
                "description": "Submits a checkout session using Register type.",
                "operationId": "333b9688f82095ae1469135f14616557",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/uuid"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SessionSubmitRegisterRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "404": {
                        "$ref": "#/components/responses/MissingSessionResponse"
                    },
                    "400": {
                        "$ref": "#/components/responses/OrderResponseErrors"
                    },
                    "422": {
                        "$ref": "#/components/responses/UnsupportedPaymentTypeResponse"
                    },
                    "500": {
                        "$ref": "#/components/responses/UnexpectedErrorResponse"
                    },
                    "200": {
                        "description": "Order created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "redirect": {
                                            "description": "If 3DS is needed, redirect url will be returned",
                                            "type": "string",
                                            "example": "https://ixopay.3ds.com/redirect"
                                        },
                                        "order_ulid": {
                                            "description": "Unique identifier for the created order",
                                            "type": "string",
                                            "example": "o_01j9p1ktf70mjfx004xmds4mag"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/checkout/session/{uuid}": {
            "put": {
                "tags": [
                    "Checkout"
                ],
                "summary": "Update checkout session",
                "description": "Updates a checkout session with validation rules applied.",
                "operationId": "1499bb7af9fb516dfd93bb893bffe0b7",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/uuid"
                    }
                ],
                "requestBody": {
                    "$ref": "#/components/requestBodies/CheckoutSessionRequestBody"
                },
                "responses": {
                    "201": {
                        "$ref": "#/components/responses/CheckoutSessionResponse"
                    },
                    "422": {
                        "$ref": "#/components/responses/InvalidMerchantResponse"
                    },
                    "404": {
                        "$ref": "#/components/responses/MissingSessionResponse"
                    },
                    "500": {
                        "$ref": "#/components/responses/UnexpectedErrorResponse"
                    }
                }
            }
        },
        "/api/v1/shipments/{shipment}/cancel": {
            "post": {
                "tags": [
                    "Shipments"
                ],
                "summary": "Cancel Shipment",
                "description": "Cancel an existing shipment. Optionally limit cancellation to specific package IDs.",
                "operationId": "57b74fabddfc331c695bf30c3a2bb71a",
                "parameters": [
                    {
                        "name": "shipment",
                        "in": "path",
                        "description": "Shipment ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Cancellation payload",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [],
                                "properties": {
                                    "shippingPackageIds": {
                                        "description": "List of package IDs to cancel within the shipment. If omitted or null, whole shipment is cancelled where supported.",
                                        "type": "array",
                                        "items": {
                                            "type": "integer",
                                            "example": 123456
                                        },
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            },
                            "example": {
                                "shippingPackageIds": [
                                    101,
                                    102
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Shipment canceled",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "type": "integer",
                                            "example": 4321
                                        },
                                        "status": {
                                            "type": "string",
                                            "example": "canceled"
                                        },
                                        "canceled_at": {
                                            "type": "string",
                                            "format": "date-time",
                                            "example": "2025-11-04T13:45:00Z",
                                            "nullable": true
                                        },
                                        "order_reference": {
                                            "type": "string",
                                            "example": "ORD-2025-00001"
                                        },
                                        "packages": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 101
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "example": "canceled"
                                                    },
                                                    "package_reference": {
                                                        "type": "string",
                                                        "example": "PKG-000101"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Shipment not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation errors",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "type": "object",
                                            "example": {
                                                "shippingPackageIds": [
                                                    "The shippingPackageIds must be an array."
                                                ]
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/api/v1/shipments": {
            "post": {
                "tags": [
                    "Shipments"
                ],
                "summary": "Create Shipment",
                "description": "Create a new shipment",
                "operationId": "d7d9cd2706524fd464fea52aa4156671",
                "requestBody": {
                    "description": "Shipment payload based on ShipmentData DTO",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "first_name",
                                    "last_name",
                                    "street_address",
                                    "city",
                                    "country_code",
                                    "brand_name",
                                    "total_price",
                                    "currency",
                                    "order_reference",
                                    "order_hash",
                                    "created_at",
                                    "shipping_price",
                                    "legal_entity_name",
                                    "is_test",
                                    "is_cod",
                                    "products"
                                ],
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "example": "John"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "example": "Doe"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "example": "+15551234567",
                                        "nullable": true
                                    },
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "maxLength": 191,
                                        "example": "john@example.com",
                                        "nullable": true
                                    },
                                    "street_address": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "example": "123 Main St"
                                    },
                                    "city": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "example": "Springfield"
                                    },
                                    "state": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "example": "IL",
                                        "nullable": true
                                    },
                                    "zip": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "example": "62704",
                                        "nullable": true
                                    },
                                    "country_code": {
                                        "type": "string",
                                        "maxLength": 2,
                                        "example": "US"
                                    },
                                    "landmark": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "example": "Near Park",
                                        "nullable": true
                                    },
                                    "area": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "example": "Downtown",
                                        "nullable": true
                                    },
                                    "billing_company": {
                                        "type": "string",
                                        "example": "Acme Inc.",
                                        "nullable": true
                                    },
                                    "brand_name": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "example": "MyBrand"
                                    },
                                    "custom_details": {
                                        "type": "object",
                                        "example": {
                                            "note": "leave at door"
                                        },
                                        "nullable": true,
                                        "additionalProperties": true
                                    },
                                    "total_price": {
                                        "type": "number",
                                        "format": "float",
                                        "minimum": 0,
                                        "example": 129.99
                                    },
                                    "currency": {
                                        "type": "string",
                                        "maxLength": 3,
                                        "example": "USD"
                                    },
                                    "order_reference": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "example": "ORDER-123"
                                    },
                                    "order_hash": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "example": "abc123"
                                    },
                                    "created_at": {
                                        "type": "string",
                                        "example": "2025-01-31 13:45:00"
                                    },
                                    "shipping_price": {
                                        "type": "number",
                                        "format": "float",
                                        "minimum": 0,
                                        "example": 9.99
                                    },
                                    "legal_entity_name": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "example": "ACME LLC"
                                    },
                                    "delivery_method": {
                                        "type": "string",
                                        "example": "standard",
                                        "nullable": true
                                    },
                                    "is_test": {
                                        "type": "boolean",
                                        "example": false
                                    },
                                    "is_cod": {
                                        "type": "boolean",
                                        "example": false
                                    },
                                    "conditions": {
                                        "properties": {
                                            "forced_fulfilment_slugs": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "example": "fc-lt"
                                                }
                                            }
                                        },
                                        "type": "object",
                                        "nullable": true
                                    },
                                    "products": {
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "quantity",
                                                "sku",
                                                "price",
                                                "currency"
                                            ],
                                            "properties": {
                                                "quantity": {
                                                    "type": "integer",
                                                    "maximum": 100,
                                                    "minimum": 1,
                                                    "example": 2
                                                },
                                                "sku": {
                                                    "type": "string",
                                                    "example": "SKU-123"
                                                },
                                                "price": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "minimum": 0,
                                                    "example": 59.99
                                                },
                                                "currency": {
                                                    "type": "string",
                                                    "maxLength": 3,
                                                    "minLength": 3,
                                                    "example": "USD"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Shipment created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "required": [
                                        "id",
                                        "shipment_status",
                                        "order_reference",
                                        "packages"
                                    ],
                                    "properties": {
                                        "id": {
                                            "type": "integer",
                                            "example": 123
                                        },
                                        "shipment_status": {
                                            "type": "string",
                                            "example": "Created"
                                        },
                                        "order_reference": {
                                            "type": "string",
                                            "example": "ORDER-123"
                                        },
                                        "packages": {
                                            "type": "array",
                                            "items": {
                                                "required": [
                                                    "id",
                                                    "package_reference",
                                                    "fulfilment",
                                                    "carrier",
                                                    "status",
                                                    "weight_grams",
                                                    "products",
                                                    "is_reshipment"
                                                ],
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "package_reference": {
                                                        "type": "string",
                                                        "example": "PKG-001"
                                                    },
                                                    "fulfilment": {
                                                        "type": "string",
                                                        "example": "Vilnius FC"
                                                    },
                                                    "carrier": {
                                                        "type": "string",
                                                        "example": "N/A"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "example": "Pending"
                                                    },
                                                    "weight_grams": {
                                                        "type": "integer",
                                                        "example": 1200
                                                    },
                                                    "is_reshipment": {
                                                        "type": "boolean",
                                                        "example": false
                                                    },
                                                    "products": {
                                                        "type": "array",
                                                        "items": {
                                                            "required": [
                                                                "sku",
                                                                "name",
                                                                "quantity",
                                                                "price",
                                                                "currency",
                                                                "is_replacement"
                                                            ],
                                                            "properties": {
                                                                "sku": {
                                                                    "type": "string",
                                                                    "example": "SKU-123"
                                                                },
                                                                "name": {
                                                                    "type": "string",
                                                                    "example": "Example Product"
                                                                },
                                                                "quantity": {
                                                                    "type": "integer",
                                                                    "example": 2
                                                                },
                                                                "price": {
                                                                    "type": "number",
                                                                    "format": "float",
                                                                    "example": 59.99
                                                                },
                                                                "currency": {
                                                                    "type": "string",
                                                                    "example": "USD"
                                                                },
                                                                "is_replacement": {
                                                                    "type": "boolean",
                                                                    "example": false
                                                                },
                                                                "replacement_sku": {
                                                                    "type": "string",
                                                                    "example": null,
                                                                    "nullable": true
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation errors",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/api/v1/shipments/{shipment}/packages": {
            "post": {
                "tags": [
                    "Shipments"
                ],
                "summary": "Create Shipment Package",
                "description": "Create a new package for a shipment",
                "operationId": "8bcfb5c32bd0c61db7919431aedd61a4",
                "parameters": [
                    {
                        "name": "shipment",
                        "in": "path",
                        "description": "Shipment ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Package payload based on CreateShipmentPackageData DTO",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "products"
                                ],
                                "properties": {
                                    "products": {
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "quantity",
                                                "sku",
                                                "price",
                                                "currency"
                                            ],
                                            "properties": {
                                                "quantity": {
                                                    "type": "integer",
                                                    "maximum": 100,
                                                    "minimum": 1,
                                                    "example": 1
                                                },
                                                "sku": {
                                                    "type": "string",
                                                    "example": "SKU-123"
                                                },
                                                "price": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "minimum": 0,
                                                    "example": 19.99
                                                },
                                                "currency": {
                                                    "type": "string",
                                                    "maxLength": 3,
                                                    "minLength": 3,
                                                    "example": "USD"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Package created; returns updated shipment",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "required": [
                                        "id",
                                        "shipment_status",
                                        "order_reference",
                                        "packages"
                                    ],
                                    "properties": {
                                        "id": {
                                            "type": "integer",
                                            "example": 123
                                        },
                                        "shipment_status": {
                                            "type": "string",
                                            "example": "Created"
                                        },
                                        "order_reference": {
                                            "type": "string",
                                            "example": "ORDER-123"
                                        },
                                        "packages": {
                                            "type": "array",
                                            "items": {
                                                "required": [
                                                    "id",
                                                    "package_reference",
                                                    "fulfilment",
                                                    "carrier",
                                                    "status",
                                                    "weight_grams",
                                                    "products",
                                                    "is_reshipment"
                                                ],
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "package_reference": {
                                                        "type": "string",
                                                        "example": "PKG-001"
                                                    },
                                                    "fulfilment": {
                                                        "type": "string",
                                                        "example": "Vilnius FC"
                                                    },
                                                    "carrier": {
                                                        "type": "string",
                                                        "example": "N/A"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "example": "Pending"
                                                    },
                                                    "weight_grams": {
                                                        "type": "integer",
                                                        "example": 1200
                                                    },
                                                    "is_reshipment": {
                                                        "type": "boolean",
                                                        "example": false
                                                    },
                                                    "products": {
                                                        "type": "array",
                                                        "items": {
                                                            "required": [
                                                                "sku",
                                                                "name",
                                                                "quantity",
                                                                "price",
                                                                "currency",
                                                                "is_replacement"
                                                            ],
                                                            "properties": {
                                                                "sku": {
                                                                    "type": "string",
                                                                    "example": "SKU-123"
                                                                },
                                                                "name": {
                                                                    "type": "string",
                                                                    "example": "Example Product"
                                                                },
                                                                "quantity": {
                                                                    "type": "integer",
                                                                    "example": 2
                                                                },
                                                                "price": {
                                                                    "type": "number",
                                                                    "format": "float",
                                                                    "example": 59.99
                                                                },
                                                                "currency": {
                                                                    "type": "string",
                                                                    "example": "USD"
                                                                },
                                                                "is_replacement": {
                                                                    "type": "boolean",
                                                                    "example": false
                                                                },
                                                                "replacement_sku": {
                                                                    "type": "string",
                                                                    "example": null,
                                                                    "nullable": true
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation errors",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/api/v1/shipments/{shipment}": {
            "get": {
                "tags": [
                    "Shipments"
                ],
                "summary": "Show Shipment",
                "description": "Retrieve a shipment by ID",
                "operationId": "180329d3e603626be622e88d93e5069b",
                "parameters": [
                    {
                        "name": "shipment",
                        "in": "path",
                        "description": "Shipment ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "required": [
                                        "id",
                                        "shipment_status",
                                        "order_reference",
                                        "packages"
                                    ],
                                    "properties": {
                                        "id": {
                                            "type": "integer",
                                            "example": 123
                                        },
                                        "shipment_status": {
                                            "type": "string",
                                            "example": "Created"
                                        },
                                        "order_reference": {
                                            "type": "string",
                                            "example": "ORDER-123"
                                        },
                                        "packages": {
                                            "type": "array",
                                            "items": {
                                                "required": [
                                                    "id",
                                                    "package_reference",
                                                    "fulfilment",
                                                    "carrier",
                                                    "status",
                                                    "weight_grams",
                                                    "products",
                                                    "is_reshipment"
                                                ],
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "package_reference": {
                                                        "type": "string",
                                                        "example": "PKG-001"
                                                    },
                                                    "fulfilment": {
                                                        "type": "string",
                                                        "example": "Vilnius FC"
                                                    },
                                                    "carrier": {
                                                        "type": "string",
                                                        "example": "N/A"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "example": "Pending"
                                                    },
                                                    "weight_grams": {
                                                        "type": "integer",
                                                        "example": 1200
                                                    },
                                                    "is_reshipment": {
                                                        "type": "boolean",
                                                        "example": false
                                                    },
                                                    "products": {
                                                        "type": "array",
                                                        "items": {
                                                            "required": [
                                                                "sku",
                                                                "name",
                                                                "quantity",
                                                                "price",
                                                                "currency",
                                                                "is_replacement"
                                                            ],
                                                            "properties": {
                                                                "sku": {
                                                                    "type": "string",
                                                                    "example": "SKU-123"
                                                                },
                                                                "name": {
                                                                    "type": "string",
                                                                    "example": "Example Product"
                                                                },
                                                                "quantity": {
                                                                    "type": "integer",
                                                                    "example": 2
                                                                },
                                                                "price": {
                                                                    "type": "number",
                                                                    "format": "float",
                                                                    "example": 59.99
                                                                },
                                                                "currency": {
                                                                    "type": "string",
                                                                    "example": "USD"
                                                                },
                                                                "is_replacement": {
                                                                    "type": "boolean",
                                                                    "example": false
                                                                },
                                                                "replacement_sku": {
                                                                    "type": "string",
                                                                    "example": null,
                                                                    "nullable": true
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Shipments"
                ],
                "summary": "Delete Shipment",
                "description": "Delete a shipment",
                "operationId": "d091c72d35fbcf8f51cac00f69081c72",
                "parameters": [
                    {
                        "name": "shipment",
                        "in": "path",
                        "description": "Shipment ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Shipment deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Shipment deleted successfully"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/api/v1/shipments/{shipment}/replace": {
            "post": {
                "tags": [
                    "Shipments"
                ],
                "summary": "Replace Shipment",
                "description": "Replace an existing shipment with new data",
                "operationId": "188584e284b9d90b5c3320ca9e7b3cdf",
                "parameters": [
                    {
                        "name": "shipment",
                        "in": "path",
                        "description": "Shipment ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Shipment replacement payload based on ShipmentData DTO",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/paths/~1api~1v1~1shipments/post/requestBody/content/application~1json/schema"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Shipment replaced",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/paths/~1api~1v1~1shipments/post/responses/201/content/application~1json/schema"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation errors",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/api/v1/shipments/{shipment}/update": {
            "post": {
                "tags": [
                    "Shipments"
                ],
                "summary": "Update Shipment",
                "description": "Update an existing shipment",
                "operationId": "c4a5c338bf75d9e9a5f2b7663f711a47",
                "parameters": [
                    {
                        "name": "shipment",
                        "in": "path",
                        "description": "Shipment ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Shipment update payload based on UpdateShipmentData DTO",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "nullable": true
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "nullable": true
                                    },
                                    "phone": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "nullable": true
                                    },
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "maxLength": 191,
                                        "nullable": true
                                    },
                                    "street_address": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "nullable": true
                                    },
                                    "city": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "nullable": true
                                    },
                                    "state": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "nullable": true
                                    },
                                    "zip": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "nullable": true
                                    },
                                    "landmark": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "nullable": true
                                    },
                                    "area": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "nullable": true
                                    },
                                    "billing_company": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "order_reference": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "order_hash": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "shipping_price": {
                                        "type": "number",
                                        "format": "float",
                                        "minimum": 0,
                                        "nullable": true
                                    },
                                    "legal_entity_name": {
                                        "type": "string",
                                        "maxLength": 191,
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Shipment updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "required": [
                                        "id",
                                        "shipment_status",
                                        "order_reference",
                                        "packages"
                                    ],
                                    "properties": {
                                        "id": {
                                            "type": "integer",
                                            "example": 123
                                        },
                                        "shipment_status": {
                                            "type": "string",
                                            "example": "Updated"
                                        },
                                        "order_reference": {
                                            "type": "string",
                                            "example": "ORDER-123"
                                        },
                                        "packages": {
                                            "type": "array",
                                            "items": {
                                                "required": [
                                                    "id",
                                                    "package_reference",
                                                    "fulfilment",
                                                    "carrier",
                                                    "status",
                                                    "weight_grams",
                                                    "products",
                                                    "is_reshipment"
                                                ],
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "package_reference": {
                                                        "type": "string",
                                                        "example": "PKG-001"
                                                    },
                                                    "fulfilment": {
                                                        "type": "string",
                                                        "example": "Vilnius FC"
                                                    },
                                                    "carrier": {
                                                        "type": "string",
                                                        "example": "N/A"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "example": "Pending"
                                                    },
                                                    "weight_grams": {
                                                        "type": "integer",
                                                        "example": 1200
                                                    },
                                                    "is_reshipment": {
                                                        "type": "boolean",
                                                        "example": false
                                                    },
                                                    "products": {
                                                        "type": "array",
                                                        "items": {
                                                            "required": [
                                                                "sku",
                                                                "name",
                                                                "quantity",
                                                                "price",
                                                                "currency",
                                                                "is_replacement"
                                                            ],
                                                            "properties": {
                                                                "sku": {
                                                                    "type": "string",
                                                                    "example": "SKU-123"
                                                                },
                                                                "name": {
                                                                    "type": "string",
                                                                    "example": "Example Product"
                                                                },
                                                                "quantity": {
                                                                    "type": "integer",
                                                                    "example": 2
                                                                },
                                                                "price": {
                                                                    "type": "number",
                                                                    "format": "float",
                                                                    "example": 59.99
                                                                },
                                                                "currency": {
                                                                    "type": "string",
                                                                    "example": "USD"
                                                                },
                                                                "is_replacement": {
                                                                    "type": "boolean",
                                                                    "example": false
                                                                },
                                                                "replacement_sku": {
                                                                    "type": "string",
                                                                    "example": null,
                                                                    "nullable": true
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation errors",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/api/v1/stock/{sku}": {
            "get": {
                "tags": [
                    "Stock"
                ],
                "summary": "Show Stock by SKU",
                "description": "Get available stock batches by SKU",
                "operationId": "63aafd3474401c390179c9e4ad8285ff",
                "parameters": [
                    {
                        "name": "sku",
                        "in": "path",
                        "description": "Product SKU",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "required": [
                                            "fulfilment",
                                            "quantity"
                                        ],
                                        "properties": {
                                            "fulfilment": {
                                                "type": "string",
                                                "example": "Vilnius FC"
                                            },
                                            "quantity": {
                                                "type": "integer",
                                                "example": 25
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        }
    },
    "components": {
        "schemas": {
            "OctocomOrderRefundControllerDocs": {
                "properties": {
                    "parent_payment_ulid": {
                        "type": "string",
                        "example": "op_01kjw5f211c4apy0p5mg6nmfkx"
                    },
                    "refunded_payment": {
                        "properties": {
                            "status": {
                                "type": "string",
                                "example": "approved"
                            },
                            "ulid": {
                                "type": "string",
                                "example": "op_01kjywxmt5xmvdf5tn2rda1pqj"
                            },
                            "approved_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2026-03-05T11:42:55.000000Z"
                            },
                            "currency": {
                                "type": "string",
                                "example": "USD"
                            },
                            "amount": {
                                "type": "number",
                                "format": "float",
                                "example": -115.05
                            },
                            "products": {
                                "type": "array",
                                "items": {
                                    "properties": {
                                        "name": {
                                            "type": "string",
                                            "example": null,
                                            "nullable": true
                                        },
                                        "public_name": {
                                            "type": "string",
                                            "example": "Translator V2"
                                        },
                                        "slug": {
                                            "type": "string",
                                            "example": "translatorV2"
                                        },
                                        "price": {
                                            "type": "string",
                                            "example": "-108.59"
                                        },
                                        "currency": {
                                            "type": "string",
                                            "example": "USD"
                                        },
                                        "amount": {
                                            "type": "integer",
                                            "example": -4
                                        },
                                        "options": {
                                            "type": "object",
                                            "example": null,
                                            "nullable": true
                                        }
                                    },
                                    "type": "object"
                                }
                            },
                            "tax_amount": {
                                "type": "number",
                                "format": "float",
                                "example": null,
                                "nullable": true
                            },
                            "amount_in_usd": {
                                "type": "number",
                                "format": "float",
                                "example": -115.05
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "DeliveryDetailsData": {
                "description": "Delivery details data",
                "required": [
                    "state",
                    "city",
                    "zip",
                    "country",
                    "street_address"
                ],
                "properties": {
                    "state": {
                        "description": "State of the delivery address",
                        "type": "string",
                        "example": "asd asd sad asd"
                    },
                    "city": {
                        "description": "City of the delivery address",
                        "type": "string",
                        "example": "test"
                    },
                    "zip": {
                        "description": "ZIP code of the delivery address",
                        "type": "string",
                        "example": "test"
                    },
                    "country": {
                        "description": "Country of the delivery address",
                        "type": "string",
                        "example": "DE"
                    },
                    "street_address": {
                        "description": "Street address of the delivery address",
                        "type": "string",
                        "example": "test 34"
                    },
                    "house_number": {
                        "description": "House number of the delivery address",
                        "type": "string",
                        "example": "123",
                        "nullable": true
                    },
                    "street": {
                        "description": "Street name of the delivery address",
                        "type": "string",
                        "example": "Main Street",
                        "nullable": true
                    },
                    "street_district": {
                        "description": "Street district of the delivery address",
                        "type": "string",
                        "example": "District 9",
                        "nullable": true
                    },
                    "area": {
                        "description": "Area of the delivery address",
                        "type": "string",
                        "example": "Area 51",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "User": {
                "description": "User",
                "properties": {
                    "first_name": {
                        "description": "First name of the user",
                        "type": "string",
                        "example": "max"
                    },
                    "last_name": {
                        "description": "Last name of the user",
                        "type": "string",
                        "example": "test"
                    },
                    "email": {
                        "description": "Email address of the user",
                        "type": "string",
                        "format": "email",
                        "example": "test@123.com"
                    },
                    "phone_number": {
                        "description": "Phone number of the user",
                        "type": "string",
                        "example": "+37064729044"
                    }
                },
                "type": "object",
                "nullable": [
                    "first_name",
                    "last_name",
                    "email",
                    "phone_number",
                    "city"
                ]
            },
            "GatewayData": {
                "description": "Gateway data",
                "type": "object",
                "oneOf": [
                    {
                        "description": "IXO Pay Gateway Data",
                        "properties": {
                            "token": {
                                "description": "IXO Pay Gateway token",
                                "type": "string",
                                "example": "ix::debeed5821f4d05338b59f9ec0cc"
                            },
                            "public_integration_key": {
                                "description": "Public integration key for IXO Pay",
                                "type": "string",
                                "example": "pi_KJP8oeV2IE"
                            }
                        },
                        "type": "object"
                    },
                    {
                        "description": "Paypal Vault Express Gateway Data",
                        "properties": {
                            "payment_source": {
                                "description": "Wallet type (paypal/venmo)",
                                "type": "string",
                                "example": "paypal"
                            }
                        },
                        "type": "object"
                    },
                    {
                        "description": "Test Gateway (empty schema)",
                        "type": "object",
                        "additionalProperties": false
                    }
                ]
            },
            "SessionSubmitRegisterRequest": {
                "required": [
                    "selected_gateway",
                    "order_ulid",
                    "gateway_data"
                ],
                "properties": {
                    "selected_gateway": {
                        "description": "The selected payment gateway",
                        "type": "string",
                        "enum": [
                            "ixo_pay",
                            "paypal_vault_express_v3",
                            "test"
                        ],
                        "example": "ixo_pay"
                    },
                    "order_ulid": {
                        "description": "Unique identifier for the order",
                        "type": "string",
                        "example": "01jv6v7r11fa6s59p7dfd7rk73"
                    },
                    "gateway_data": {
                        "$ref": "#/components/schemas/GatewayData"
                    }
                },
                "type": "object"
            },
            "CustomDetailData": {
                "description": "Custom details for order processing (all fields are optional)",
                "properties": {
                    "cpf": {
                        "description": "Brazilian CPF (Cadastro de Pessoas Físicas)",
                        "type": "string",
                        "example": "123.456.789-00",
                        "nullable": true
                    },
                    "street": {
                        "description": "Street name",
                        "type": "string",
                        "example": "Main Street",
                        "nullable": true
                    },
                    "house_number": {
                        "description": "House or building number",
                        "type": "string",
                        "example": "123",
                        "nullable": true
                    },
                    "parcel_delivery_point": {
                        "description": "Parcel delivery point identifier",
                        "type": "string",
                        "example": "PDP-12345",
                        "nullable": true
                    },
                    "fingerprint": {
                        "description": "Device or browser fingerprint for fraud detection",
                        "type": "string",
                        "example": "abc123def456",
                        "nullable": true
                    },
                    "nit": {
                        "description": "Colombian NIT (Número de Identificación Tributaria)",
                        "type": "string",
                        "example": "900123456-7",
                        "nullable": true
                    },
                    "cuit_no": {
                        "description": "Argentine CUIT (Código Único de Identificación Tributaria)",
                        "type": "string",
                        "example": "20-12345678-9",
                        "nullable": true
                    },
                    "pccc": {
                        "description": "Korean PCCC (Personal Customs Clearance Code)",
                        "type": "string",
                        "example": "P123456789012",
                        "nullable": true
                    },
                    "turkish_id": {
                        "description": "Turkish national identification number",
                        "type": "string",
                        "example": "12345678901",
                        "nullable": true
                    },
                    "roc": {
                        "description": "Taiwanese ROC (Republic of China) ID",
                        "type": "string",
                        "example": "A123456789",
                        "nullable": true
                    },
                    "rfc": {
                        "description": "Mexican RFC (Registro Federal de Contribuyentes)",
                        "type": "string",
                        "example": "XAXX010101000",
                        "nullable": true
                    },
                    "rut": {
                        "description": "Chilean RUT (Rol Único Tributario)",
                        "type": "string",
                        "example": "12.345.678-9",
                        "nullable": true
                    },
                    "south_african_id": {
                        "description": "South African ID number",
                        "type": "string",
                        "example": "8001015009087",
                        "nullable": true
                    },
                    "state": {
                        "description": "State or province",
                        "type": "string",
                        "example": "California",
                        "nullable": true
                    },
                    "delivery_instructions": {
                        "description": "Special delivery instructions",
                        "type": "string",
                        "example": "Leave at the door",
                        "nullable": true
                    },
                    "neighborhood": {
                        "description": "Neighborhood or district",
                        "type": "string",
                        "example": "Downtown",
                        "nullable": true
                    },
                    "street_address": {
                        "description": "Full street address",
                        "type": "string",
                        "example": "123 Main Street",
                        "nullable": true
                    },
                    "city": {
                        "description": "City name",
                        "type": "string",
                        "example": "San Francisco",
                        "nullable": true
                    },
                    "first_name": {
                        "description": "First name",
                        "type": "string",
                        "example": "John",
                        "nullable": true
                    },
                    "last_name": {
                        "description": "Last name",
                        "type": "string",
                        "example": "Doe",
                        "nullable": true
                    },
                    "zip": {
                        "description": "ZIP or postal code",
                        "type": "string",
                        "example": "94102",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "SessionSubmitDebitRequest": {
                "required": [
                    "selected_gateway",
                    "gateway_data",
                    "user_data"
                ],
                "properties": {
                    "selected_gateway": {
                        "description": "The selected payment gateway",
                        "type": "string",
                        "enum": [
                            "ixo_pay",
                            "paypal_vault_express_v3",
                            "test"
                        ],
                        "example": "ixo_pay"
                    },
                    "delivery_details": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/DeliveryDetailsData"
                            }
                        ],
                        "nullable": true,
                        "type": "object"
                    },
                    "user": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/User"
                            }
                        ],
                        "nullable": true,
                        "type": "object"
                    },
                    "custom_details": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/CustomDetailData"
                            }
                        ],
                        "nullable": true,
                        "type": "object"
                    },
                    "gateway_data": {
                        "$ref": "#/components/schemas/GatewayData"
                    }
                },
                "type": "object"
            },
            "SessionSubmitResponseIxoPay": {
                "description": "Response structure when 'ixo_pay' gateway is used.",
                "required": [
                    "order_ulid"
                ],
                "properties": {
                    "redirect": {
                        "description": "The URL to redirect the user to for further action (e.g., 3DS). Conditionally present.",
                        "type": "string",
                        "format": "url",
                        "example": "https://ixopay.3ds.com/redirect",
                        "nullable": true
                    },
                    "order_ulid": {
                        "description": "The unique identifier for the created order.",
                        "type": "string",
                        "example": "o_01j9p1ktf70mjfx004xmds4mag"
                    }
                },
                "type": "object"
            },
            "SessionSubmitResponsePaypalVaultExpress": {
                "description": "Response structure when 'paypal_vault_express_v3' gateway is used.",
                "required": [
                    "returnUrl",
                    "id",
                    "order_ulid"
                ],
                "properties": {
                    "returnUrl": {
                        "description": "The URL to return to after PayPal interaction.",
                        "type": "string",
                        "format": "url",
                        "example": "https://ecom.localhost/api/checkout/return/op_01jsxv3ersd489np0tb123g9dv"
                    },
                    "id": {
                        "description": "The PayPal transaction identifier.",
                        "type": "string",
                        "example": "39621985EJ596453K"
                    },
                    "order_ulid": {
                        "description": "The unique identifier for the created order.",
                        "type": "string",
                        "example": "o_01jsxv3ergwwj1v790jtme1qd7"
                    }
                },
                "type": "object"
            }
        },
        "responses": {
            "CheckoutSessionResponse": {
                "description": "Checkout session created",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "uuid": {
                                    "description": "Session UUID",
                                    "type": "string",
                                    "example": "520d2e47-fee0-4118-abb6-2cfb511bc112"
                                },
                                "data": {
                                    "properties": {
                                        "locale": {
                                            "description": "Locale of the session",
                                            "type": "string",
                                            "example": "US"
                                        },
                                        "vendor": {
                                            "description": "Optional vendor name, must exist in the 'vendors' table",
                                            "type": "string",
                                            "example": "evf"
                                        },
                                        "country": {
                                            "description": "Country code",
                                            "type": "string",
                                            "example": "US"
                                        },
                                        "currency": {
                                            "description": "Currency code",
                                            "type": "string",
                                            "example": "EUR"
                                        },
                                        "items": {
                                            "properties": {
                                                "line_items": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "quantity": {
                                                                "description": "Quantity of the item",
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "price": {
                                                                "description": "Price of the item",
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 29.99
                                                            },
                                                            "slug": {
                                                                "description": "Item slug",
                                                                "type": "string",
                                                                "example": "hypnozio-monthly-plan"
                                                            },
                                                            "currency": {
                                                                "description": "Currency code",
                                                                "type": "string",
                                                                "example": "EUR"
                                                            },
                                                            "attributes": {
                                                                "description": "Additional attributes",
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string"
                                                                },
                                                                "example": []
                                                            },
                                                            "subscription_plan_id": {
                                                                "description": "Subscription plan ID",
                                                                "type": "integer",
                                                                "example": 112
                                                            },
                                                            "pricing_id": {
                                                                "description": "Pricing ID",
                                                                "type": "integer",
                                                                "example": 737
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "total_price": {
                                                    "description": "Total price of the items",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 29.99
                                                },
                                                "requires_shipping_details": {
                                                    "description": "Whether shipping details are required",
                                                    "type": "boolean",
                                                    "example": false
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "merchant_payment": {
                                            "properties": {
                                                "merchant_id": {
                                                    "description": "Merchant ID",
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "reference": {
                                                    "description": "Merchant reference",
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "return_url": {
                                                    "description": "Return URL",
                                                    "type": "string",
                                                    "format": "url",
                                                    "example": "https://spatie.be/docs/laravel-data/v4/validation/introduction"
                                                },
                                                "cancel_url": {
                                                    "description": "Cancel URL",
                                                    "type": "string",
                                                    "format": "url",
                                                    "example": "https://spatie.be/docs/laravel-data/v4/validation/introduction"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "payment_gateways": {
                                            "description": "Available payment gateways keyed by their identifier.",
                                            "type": "object",
                                            "example": {
                                                "ixo_pay": {
                                                    "payment_gateway": "ixo_pay",
                                                    "countries": [
                                                        "AU",
                                                        "AT",
                                                        "BE",
                                                        "..."
                                                    ],
                                                    "logos": [
                                                        {
                                                            "size": "small",
                                                            "color": "white",
                                                            "url": "..."
                                                        }
                                                    ],
                                                    "data": {
                                                        "public_integration_key": "pi_...",
                                                        "sandbox": true,
                                                        "merchant_guid": "ME-..."
                                                    }
                                                },
                                                "paypal_vault_express_v3": {
                                                    "payment_gateway": "paypal_vault_express_v3",
                                                    "countries": [
                                                        "AU",
                                                        "AT",
                                                        "BE",
                                                        "..."
                                                    ],
                                                    "logos": [],
                                                    "data": {
                                                        "sandbox": true,
                                                        "api_client_id": "AWf...",
                                                        "fraudnet_id": null
                                                    }
                                                }
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "InvalidMerchantResponse": {
                "description": "Validation Error / Merchant Missing",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "Merchant is missing. Please make sure that the selected brand has a configured merchant."
                                },
                                "errors": {
                                    "description": "Validation error details",
                                    "type": "object"
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "UnexpectedErrorResponse": {
                "description": "Unexpected Error Occurred",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "An unexpected error occurred."
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "UnsupportedPaymentTypeResponse": {
                "description": "Unsupported payment type error",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "errors": {
                                    "properties": {
                                        "payment_gateway": {
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "This gateway does not support payment type registration"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "MissingSessionResponse": {
                "description": "Missing session error",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "errors": {
                                    "type": "array",
                                    "items": {
                                        "type": "string",
                                        "example": "Checkout Session is missing"
                                    }
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "OrderResponseErrors": {
                "description": "Payments Errors",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "errors": {
                                    "description": "Payment errors",
                                    "type": "array",
                                    "items": {
                                        "type": "string",
                                        "example": "Transaction Decliend"
                                    }
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "ReferenceTransactionResponse": {
                "description": "Reference transaction created successfully",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "order_id": {
                                    "description": "Order hash ID",
                                    "type": "string",
                                    "example": "abc123xyz"
                                },
                                "redirect": {
                                    "description": "Redirect URL if additional action is required",
                                    "type": "string",
                                    "format": "url",
                                    "example": "https://gateway.com/3ds",
                                    "nullable": true
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "ReferenceOrderResponse": {
                "description": "Reference order created and charged successfully",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "order_id": {
                                    "description": "New order hash ID",
                                    "type": "string",
                                    "example": "xyz789abc"
                                },
                                "redirect": {
                                    "description": "Redirect URL if additional action is required",
                                    "type": "string",
                                    "format": "url",
                                    "example": "https://gateway.com/3ds",
                                    "nullable": true
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "UnauthenticatedResponse": {
                "description": "User is not authenticated",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "Unauthenticated."
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "ForbiddenResponse": {
                "description": "User does not have required token abilities",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "This action is unauthorized."
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "OrderNotFoundResponse": {
                "description": "Order not found",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "No query results for model [App\\\\Order]."
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "ValidationErrorResponse": {
                "description": "Validation error",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "The given data was invalid."
                                },
                                "errors": {
                                    "description": "Field-specific validation errors",
                                    "type": "object",
                                    "example": {
                                        "order": [
                                            "The order field is required."
                                        ],
                                        "merchant": [
                                            "The selected merchant is invalid.",
                                            "The merchant must be a valid UUID."
                                        ],
                                        "products": [
                                            "The products field is required.",
                                            "The products must be an array."
                                        ],
                                        "products.0.slug": [
                                            "The products.0.slug is invalid."
                                        ],
                                        "products.0.quantity": [
                                            "The products.0.quantity must be at least 1."
                                        ],
                                        "return_url": [
                                            "The return url must be a valid URL.",
                                            "The return url must not be greater than 2048 characters."
                                        ],
                                        "vendor": [
                                            "The selected vendor is invalid."
                                        ]
                                    }
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "OrderAlreadyProcessedResponse": {
                "description": "Order has already been processed",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "The given data was invalid."
                                },
                                "errors": {
                                    "properties": {
                                        "order": {
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "Order has already finished processing"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "InvalidMerchantValidationResponse": {
                "description": "Merchant UUID is invalid for this order",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "The given data was invalid."
                                },
                                "errors": {
                                    "properties": {
                                        "merchant": {
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "Merchant is invalid"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "InvalidArgumentResponse": {
                "description": "Invalid argument provided",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "example": "Product not found or invalid for this currency/country"
                            }
                        }
                    }
                }
            },
            "ReferenceTransactionValidationErrors": {
                "description": "Validation error occurred. Can include any combination of the errors shown below.",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "The given data was invalid."
                                },
                                "errors": {
                                    "description": "All possible validation error fields that may be returned",
                                    "properties": {
                                        "order": {
                                            "description": "Order validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The order field is required."
                                            },
                                            "example": [
                                                "The order field is required.",
                                                "Order has already finished processing"
                                            ]
                                        },
                                        "merchant": {
                                            "description": "Merchant validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The selected merchant is invalid."
                                            },
                                            "example": [
                                                "The selected merchant is invalid.",
                                                "The merchant must be a valid UUID.",
                                                "Merchant is invalid"
                                            ]
                                        },
                                        "products": {
                                            "description": "Products field validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The products field is required."
                                            },
                                            "example": [
                                                "The products field is required.",
                                                "The products must be an array."
                                            ]
                                        },
                                        "products.0.slug": {
                                            "description": "Product slug validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The products.0.slug is invalid."
                                            }
                                        },
                                        "products.0.quantity": {
                                            "description": "Product quantity validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The products.0.quantity must be at least 1."
                                            }
                                        },
                                        "reference": {
                                            "description": "Reference field validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The reference must be a string."
                                            }
                                        },
                                        "return_url": {
                                            "description": "Return URL validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The return url must be a valid URL."
                                            },
                                            "example": [
                                                "The return url must be a valid URL.",
                                                "The return url must not be greater than 2048 characters."
                                            ]
                                        },
                                        "cancel_url": {
                                            "description": "Cancel URL validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The cancel url must be a valid URL."
                                            },
                                            "example": [
                                                "The cancel url must be a valid URL.",
                                                "The cancel url must not be greater than 2048 characters."
                                            ]
                                        },
                                        "vendor": {
                                            "description": "Vendor validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The selected vendor is invalid."
                                            }
                                        },
                                        "params.itercid": {
                                            "description": "Iterable campaign ID validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The params.itercid must be an integer."
                                            }
                                        },
                                        "apply_taxes": {
                                            "description": "Apply taxes field validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The apply taxes field must be true or false."
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "ReferenceOrderValidationErrors": {
                "description": "Validation error occurred. Can include any combination of the errors shown below.",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "The given data was invalid."
                                },
                                "errors": {
                                    "description": "All possible validation error fields that may be returned",
                                    "properties": {
                                        "order": {
                                            "description": "Order validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The order field is required."
                                            }
                                        },
                                        "merchant": {
                                            "description": "Merchant validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The selected merchant is invalid."
                                            },
                                            "example": [
                                                "The selected merchant is invalid.",
                                                "The merchant must be a valid UUID.",
                                                "Merchant is invalid"
                                            ]
                                        },
                                        "products": {
                                            "description": "Products field validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The products field is required."
                                            },
                                            "example": [
                                                "The products field is required.",
                                                "The products must be an array."
                                            ]
                                        },
                                        "products.0.slug": {
                                            "description": "Product slug validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The products.0.slug is invalid."
                                            }
                                        },
                                        "products.0.quantity": {
                                            "description": "Product quantity validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The products.0.quantity must be at least 1."
                                            }
                                        },
                                        "reference": {
                                            "description": "Reference field validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The reference must be a string."
                                            }
                                        },
                                        "return_url": {
                                            "description": "Return URL validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The return url must be a valid URL."
                                            },
                                            "example": [
                                                "The return url must be a valid URL.",
                                                "The return url must not be greater than 2048 characters."
                                            ]
                                        },
                                        "cancel_url": {
                                            "description": "Cancel URL validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The cancel url must be a valid URL."
                                            },
                                            "example": [
                                                "The cancel url must be a valid URL.",
                                                "The cancel url must not be greater than 2048 characters."
                                            ]
                                        },
                                        "vendor": {
                                            "description": "Vendor validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The selected vendor is invalid."
                                            }
                                        },
                                        "params.itercid": {
                                            "description": "Iterable campaign ID validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The params.itercid must be an integer."
                                            }
                                        },
                                        "apply_taxes": {
                                            "description": "Apply taxes field validation errors",
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The apply taxes field must be true or false."
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            }
        },
        "parameters": {
            "uuid": {
                "name": "uuid",
                "in": "path",
                "description": "UUID of the checkout session to be updated",
                "required": true,
                "schema": {
                    "type": "string",
                    "format": "uuid",
                    "example": "520d2e47-fee0-4118-abb6-2cfb511bc112"
                }
            }
        },
        "requestBodies": {
            "CheckoutSessionRequestBody": {
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {
                            "required": [
                                "ip",
                                "brand",
                                "return_url",
                                "cancel_url",
                                "items"
                            ],
                            "properties": {
                                "ip": {
                                    "description": "User's IP address, must be a valid IP",
                                    "type": "string",
                                    "example": "88.119.248.98"
                                },
                                "brand": {
                                    "description": "Brand name, required and must exist in the 'brands' table",
                                    "type": "string",
                                    "example": "hypnozio"
                                },
                                "vendor": {
                                    "description": "Optional vendor name, must exist in the 'vendors' table",
                                    "type": "string",
                                    "example": "evf",
                                    "nullable": true
                                },
                                "country": {
                                    "description": "Country code, must be a valid country code",
                                    "type": "string",
                                    "example": "US",
                                    "nullable": true
                                },
                                "return_url": {
                                    "description": "Return URL, must be a valid URL with a maximum length of 2024 characters",
                                    "type": "string",
                                    "format": "url",
                                    "example": "https://spatie.be/docs/laravel-data/v4/validation/introduction"
                                },
                                "cancel_url": {
                                    "description": "Cancel URL, must be a valid URL with a maximum length of 2024 characters",
                                    "type": "string",
                                    "format": "url",
                                    "example": "https://spatie.be/docs/laravel-data/v4/validation/introduction"
                                },
                                "items": {
                                    "description": "List of items, must contain at least one item",
                                    "type": "array",
                                    "items": {
                                        "required": [
                                            "slug",
                                            "quantity"
                                        ],
                                        "properties": {
                                            "slug": {
                                                "description": "Item slug",
                                                "type": "string",
                                                "example": "hypnozio-monthly-plan"
                                            },
                                            "quantity": {
                                                "description": "Quantity, minimum value is 1",
                                                "type": "integer",
                                                "example": 1
                                            },
                                            "price": {
                                                "description": "Optional price, must be a valid positive number, will override the product pricing",
                                                "type": "number",
                                                "format": "float",
                                                "minimum": 0,
                                                "exclusiveMinimum": true,
                                                "example": 9.99,
                                                "nullable": true
                                            },
                                            "attributes": {
                                                "description": "Product attributes",
                                                "type": "object",
                                                "example": {
                                                    "inum": "12312343"
                                                }
                                            }
                                        },
                                        "type": "object"
                                    }
                                },
                                "reference": {
                                    "description": "Optional reference string with a maximum length of 192 characters",
                                    "type": "string",
                                    "example": "some-reference",
                                    "nullable": true
                                },
                                "metadata": {
                                    "description": "Optional metadata, must be an array with a maximum length of 2024 characters",
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    },
                                    "nullable": true
                                },
                                "currency": {
                                    "description": "Optional currency code, must be a valid currency from the currency list",
                                    "type": "string",
                                    "example": "EUR",
                                    "nullable": true
                                },
                                "locale": {
                                    "description": "Optional locale, must be one of the supported locales",
                                    "type": "string",
                                    "example": "en",
                                    "nullable": true
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "ReferenceTransactionRequestBody": {
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {
                            "required": [
                                "order",
                                "merchant",
                                "products"
                            ],
                            "properties": {
                                "order": {
                                    "description": "Order hash ID or ULID",
                                    "type": "string",
                                    "example": "abc123xyz"
                                },
                                "merchant": {
                                    "description": "Merchant UUID",
                                    "type": "string",
                                    "format": "uuid",
                                    "example": "550e8400-e29b-41d4-a716-446655440000"
                                },
                                "reference": {
                                    "description": "Optional reference string",
                                    "type": "string",
                                    "example": "ref-12345",
                                    "nullable": true
                                },
                                "return_url": {
                                    "description": "Return URL, maximum length of 2048 characters",
                                    "type": "string",
                                    "format": "url",
                                    "example": "https://example.com/return",
                                    "nullable": true
                                },
                                "cancel_url": {
                                    "description": "Cancel URL, maximum length of 2048 characters",
                                    "type": "string",
                                    "format": "url",
                                    "example": "https://example.com/cancel",
                                    "nullable": true
                                },
                                "products": {
                                    "description": "List of products to charge",
                                    "type": "array",
                                    "items": {
                                        "required": [
                                            "slug",
                                            "quantity"
                                        ],
                                        "properties": {
                                            "slug": {
                                                "description": "Product slug",
                                                "type": "string",
                                                "example": "product-monthly-plan"
                                            },
                                            "name": {
                                                "description": "Optional product name",
                                                "type": "string",
                                                "example": "Monthly Plan",
                                                "nullable": true
                                            },
                                            "quantity": {
                                                "description": "Quantity, minimum value is 1",
                                                "type": "integer",
                                                "example": 1
                                            },
                                            "attributes": {
                                                "description": "Product attributes",
                                                "properties": {
                                                    "first_renewal_at": {
                                                        "description": "First renewal date (must be after now)",
                                                        "type": "string",
                                                        "format": "date",
                                                        "example": "2025-12-31",
                                                        "nullable": true
                                                    }
                                                },
                                                "type": "object",
                                                "nullable": true
                                            }
                                        },
                                        "type": "object"
                                    }
                                },
                                "vendor": {
                                    "description": "Vendor name",
                                    "type": "string",
                                    "example": "vendor-name",
                                    "nullable": true
                                },
                                "params": {
                                    "description": "Additional parameters",
                                    "properties": {
                                        "itercid": {
                                            "description": "Iterable campaign ID",
                                            "type": "integer",
                                            "example": 12345,
                                            "nullable": true
                                        }
                                    },
                                    "type": "object",
                                    "nullable": true
                                },
                                "apply_taxes": {
                                    "description": "Whether to apply taxes to the transaction",
                                    "type": "boolean",
                                    "example": false
                                },
                                "settings": {
                                    "description": "Optional gateway settings",
                                    "type": "object",
                                    "example": [],
                                    "nullable": true
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            }
        }
    },
    "tags": [
        {
            "name": "COD",
            "description": "COD"
        },
        {
            "name": "Domains",
            "description": "Domains"
        },
        {
            "name": "Octocom",
            "description": "Octocom"
        },
        {
            "name": "Orders",
            "description": "Orders"
        },
        {
            "name": "Checkout",
            "description": "Checkout"
        },
        {
            "name": "Shipments",
            "description": "Shipments"
        },
        {
            "name": "Stock",
            "description": "Stock"
        }
    ]
}