{
    "schemes": [
        "https"
    ],
    "swagger": "2.0",
    "info": {
        "title": "Madden Analytics API",
        "contact": {},
        "version": "1.0"
    },
    "host": "api.maddenanalytics.com",
    "basePath": "/",
    "paths": {
        "/v2/api/auth": {
            "post": {
                "description": "This endpoint is used to generated the Bearer token needed for authentication to all other endpoints. Requires accountID + apiKey.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Authentication"
                ],
                "summary": "Get Bearer token",
                "parameters": [
                    {
                        "description": "Your AccountID and apiKey provided to you by Madden",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/AuthKey"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/AuthResource"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with describing codes/messages",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/brands": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "List all brands that are associated with your account.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Brands"
                ],
                "summary": "List Brands",
                "parameters": [
                    {
                        "minimum": 1,
                        "type": "integer",
                        "default": 1,
                        "description": "Page Number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "default": 10,
                        "description": "Page Size",
                        "name": "pageSize",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter brand on name",
                        "name": "name",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter brand on id",
                        "name": "id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Brand"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/brands/{ID}": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get one brand that is associated with your account.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Brands"
                ],
                "summary": "Get Brand",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Brand"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/categories": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "List all Categories for an account.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Categories"
                ],
                "summary": "List Categories",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Category"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/categories/{ID}": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get Category for an account.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Categories"
                ],
                "summary": "Get Category",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/Category"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/distributionorders": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "List all Distribution Orders for an account.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Distribution Orders"
                ],
                "summary": "List Distribution Orders",
                "parameters": [
                    {
                        "minimum": 1,
                        "type": "integer",
                        "default": 1,
                        "description": "Page Number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "maximum": 1000,
                        "type": "integer",
                        "default": 10,
                        "description": "Page Size",
                        "name": "pageSize",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "CANCELLED",
                            "PROCESSING",
                            "ALLOCATED",
                            "IN TRANSIT",
                            "COMPLETED"
                        ],
                        "type": "string",
                        "description": "Status",
                        "name": "status",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/DistributionOrder"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Update existing Distribution Orders",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Distribution Orders"
                ],
                "summary": "Update Distribution Orders",
                "parameters": [
                    {
                        "description": "id is required when updating a orders, status is a derived field thus ignored ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/DistributionOrder"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/DistributionOrder"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Create new Distribution Orders in batch.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Distribution Orders"
                ],
                "summary": "Create Distribution Orders",
                "parameters": [
                    {
                        "description": "id should be omitted on creation of new orders, status is a derived field thus ignored",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/DistributionOrder"
                            }
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/DistributionOrder"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/distributionorders/batch": {
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Create or Update Distribution Orders using externalDOID and externalRowID",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Distribution Orders"
                ],
                "summary": "Create or Update Distribution Orders using externalDOID and externalRowID",
                "parameters": [
                    {
                        "description": "composite key is required per item",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/DistributionOrder"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Returns an array of responses for each item in the batch, 400 if any item fails",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BatchResponse"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/distributionorders/example": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Distribution Orders"
                ],
                "summary": "Get example of Distribution Order",
                "parameters": [
                    {
                        "enum": [
                            "CANCELLED",
                            "PROCESSING",
                            "ALLOCATED",
                            "IN TRANSIT",
                            "COMPLETED"
                        ],
                        "type": "string",
                        "description": "Status",
                        "name": "status",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/DistributionOrder"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/distributionorders/processing": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "List all Open Distribution OrderIDs for an account.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Distribution Orders"
                ],
                "summary": "List Open Distribution OrderIDs",
                "parameters": [
                    {
                        "minimum": 1,
                        "type": "integer",
                        "default": 1,
                        "description": "Page Number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "maximum": 1000,
                        "type": "integer",
                        "default": 10,
                        "description": "Page Size",
                        "name": "pageSize",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/distributionorders/{id}": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Retrieve all items belonging to a common distribution order using External Distribution Order Id",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Distribution Orders"
                ],
                "summary": "Get an entire Distribution Order",
                "parameters": [
                    {
                        "type": "string",
                        "description": "External Distribution Order Id",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/DistributionOrder"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/events": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Lists external events with optional filters for event_type and status",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Events"
                ],
                "summary": "List Events",
                "parameters": [
                    {
                        "minimum": 1,
                        "type": "integer",
                        "default": 1,
                        "description": "Page Number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "default": 10,
                        "description": "Page Size",
                        "name": "pageSize",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by event type",
                        "name": "event_type",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by status: pending, completed, failed",
                        "name": "status",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Event"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Set event status to completed or failed. Only pending events (with both completed_at and failed_at NULL) can be updated. When setting status to 'completed', completed_at is set and failed_at is cleared. When setting status to 'failed', failed_at is set and completed_at is cleared. This is a once-only operation - events cannot be re-processed once marked as completed or failed. Returns 409 Conflict if event is already processed, 404 Not Found if event doesn't exist.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Events"
                ],
                "summary": "Update Event Status",
                "parameters": [
                    {
                        "description": "Status update with id and status. Status must be 'completed' or 'failed'",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/BatchUpdateStatusItem"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Returns id and updated:true when event was successfully updated",
                        "schema": {
                            "$ref": "#/definitions/EventStatusResult"
                        }
                    },
                    "404": {
                        "description": "Event not found",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "409": {
                        "description": "Event already processed",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/events/batch": {
            "patch": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Set status per event. Only pending events (with both completed_at and failed_at NULL) are updated. Already-processed events return updated:false. When setting status to 'completed', completed_at is set and failed_at is cleared. When setting status to 'failed', failed_at is set and completed_at is cleared. This is a once-only operation - events cannot be re-processed once marked as completed or failed.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Events"
                ],
                "summary": "Batch Update Event Status",
                "parameters": [
                    {
                        "description": "List of id + status pairs. Status must be 'completed' or 'failed'",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BatchUpdateStatusItem"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Returns array with id and updated flag for each event. updated:true means event was updated, updated:false means event was already processed or not found",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/EventStatusResult"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/events/{id}": {
            "put": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Replaces the payload of an existing event. The event must belong to the authenticated account.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Events"
                ],
                "summary": "Update Event Payload",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Event ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "New payload",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/UpdatePayloadRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Returns the updated event",
                        "schema": {
                            "$ref": "#/definitions/Event"
                        }
                    },
                    "400": {
                        "description": "Invalid request body or payload",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "404": {
                        "description": "Event not found",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/fxrates": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "List all custom FX rates for your account. Optionally filter by external reference and/or currency pair.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "FX Rates"
                ],
                "summary": "List FX rates",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Filter by external reference",
                        "name": "externalReference",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by source currency (e.g. USD)",
                        "name": "fromCurrency",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by target currency (e.g. EUR)",
                        "name": "toCurrency",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/FxRate"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Create one or more custom FX rates for your account.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "FX Rates"
                ],
                "summary": "Create FX rates",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/FxRate"
                            }
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/FxRate"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/fxrates/{id}": {
            "put": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Replace an existing custom FX rate by ID. The rate is deleted and recreated to ensure time-range integrity.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "FX Rates"
                ],
                "summary": "Update FX rate",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "FX rate ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/FxRate"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/FxRate"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Delete a specific custom FX rate by ID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "FX Rates"
                ],
                "summary": "Delete FX rate",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "FX rate ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/mappingtables": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "MappingTables"
                ],
                "summary": "List mapping tables",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Filter by mapping type (products, transactions, purchaseOrders, distributionOrders, stocks, suppliers, costCalculationValues)",
                        "name": "mappingType",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/MappingTableResponse"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid mapping type",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/mappingtables/{mappingField}": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "MappingTables"
                ],
                "summary": "Get mapping table",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Mapping field name",
                        "name": "mappingField",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Mapping type (products, transactions, purchaseOrders, distributionOrders, stocks, suppliers, costCalculationValues)",
                        "name": "mappingType",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/MappingTableResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid or missing mapping type",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Adds or updates individual keys in an existing mapping table without removing keys not present in the request.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "MappingTables"
                ],
                "summary": "Merge mapping values",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Mapping field name",
                        "name": "mappingField",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Mapping type (products, transactions, purchaseOrders, distributionOrders, stocks, suppliers, costCalculationValues)",
                        "name": "mappingType",
                        "in": "query",
                        "required": true
                    },
                    {
                        "description": "Keys to add or update",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/MappingTableMergeRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/MappingTableResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid or missing mapping type, or bad request body",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Creates or fully replaces the mapping values for the given field.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "MappingTables"
                ],
                "summary": "Upsert mapping table",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Mapping field name",
                        "name": "mappingField",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Full set of mapping values (key -\u003e value)",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/MappingTableUpsertRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/MappingTableResponse"
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "tags": [
                    "MappingTables"
                ],
                "summary": "Delete mapping table",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Mapping field name",
                        "name": "mappingField",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Mapping type (products, transactions, purchaseOrders, distributionOrders, stocks, suppliers, costCalculationValues)",
                        "name": "mappingType",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid or missing mapping type",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/planning/planned-volumes": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Returns stock, confirmed-PO and draft-PO volumes for active-planning SKUs, grouped by a product dimension. The whole fromDate–toDate window is returned; period grouping is not supported. The standard product-filter query params (departments, genders, collections, colors, subcategories, productTypes, merchandiseTypes, pimCustom1-10) are also accepted in addition to those listed below.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Planning"
                ],
                "summary": "Planned Volumes",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Dimension to group by: seasons (default), products, variants, skus",
                        "name": "groupBy",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Season filter, e.g. SS26",
                        "name": "seasons",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Variant group ID filter",
                        "name": "variants",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Product group ID filter",
                        "name": "products",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "SKU filter, repeatable (e.g. ?skus=abc\u0026skus=def)",
                        "name": "skus",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "SKU ID filter, repeatable",
                        "name": "skuIds",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Brand ID filter, repeatable",
                        "name": "brands",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Category ID filter, repeatable",
                        "name": "categories",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Size filter, repeatable",
                        "name": "sizes",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "SKU status filter, repeatable. Defaults to all non-inactive statuses.",
                        "name": "skuStatus",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "Restrict to active-planning SKUs. Defaults to true.",
                        "name": "activePlanning",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Start of PO/draft-PO delivery date window (YYYY-MM-DD)",
                        "name": "fromDate",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "End of PO/draft-PO delivery date window (YYYY-MM-DD)",
                        "name": "toDate",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Only return groups whose PO or draft-PO data was modified after this timestamp (RFC3339, or YYYY-MM-DD interpreted as account-local midnight). Stock-only changes are not tracked.",
                        "name": "updatedSince",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/PlannedVolumeRow"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/planning/planned-volumes/by-warehouse": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Returns stock, confirmed-PO and draft-PO volumes for active-planning SKUs, grouped by a product dimension and warehouse. Draft-PO volume without an assigned warehouse is returned with an empty warehouseId. The whole fromDate–toDate window is returned; period grouping is not supported. The standard product-filter query params (departments, genders, collections, colors, subcategories, productTypes, merchandiseTypes, pimCustom1-10) are also accepted in addition to those listed below.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Planning"
                ],
                "summary": "Planned Volumes By Warehouse",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Dimension to group by: seasons (default), products, variants, skus",
                        "name": "groupBy",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Season filter, e.g. SS26",
                        "name": "seasons",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Variant group ID filter",
                        "name": "variants",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Product group ID filter",
                        "name": "products",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "SKU filter, repeatable (e.g. ?skus=abc\u0026skus=def)",
                        "name": "skus",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "SKU ID filter, repeatable",
                        "name": "skuIds",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Brand ID filter, repeatable",
                        "name": "brands",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Category ID filter, repeatable",
                        "name": "categories",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Size filter, repeatable",
                        "name": "sizes",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "SKU status filter, repeatable. Defaults to all non-inactive statuses.",
                        "name": "skuStatus",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "Restrict to active-planning SKUs. Defaults to true.",
                        "name": "activePlanning",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Start of PO/draft-PO delivery date window (YYYY-MM-DD)",
                        "name": "fromDate",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "End of PO/draft-PO delivery date window (YYYY-MM-DD)",
                        "name": "toDate",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Only return rows whose PO or draft-PO data was modified after this timestamp (RFC3339, or YYYY-MM-DD interpreted as account-local midnight). Stock-only changes are not tracked.",
                        "name": "updatedSince",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/PlannedVolumeWarehouseRow"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/pricats": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Pricats"
                ],
                "summary": "Get all pricats",
                "parameters": [
                    {
                        "minimum": 1,
                        "type": "integer",
                        "default": 1,
                        "description": "Page Number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "maximum": 1000,
                        "type": "integer",
                        "default": 10,
                        "description": "Page Size",
                        "name": "pageSize",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by pricat external id, repeatable (e.g. ?externalids=x\u0026externalids=y)",
                        "name": "externalids",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by supplier GLN, repeatable (e.g. ?supplierGln=x\u0026supplierGln=y)",
                        "name": "supplierGln",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by supplier name, repeatable (e.g. ?supplier=x\u0026supplier=y)",
                        "name": "supplier",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/api.Pricat"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/pricats/products": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Pricats"
                ],
                "summary": "Get pricat skus",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Filter by pricat external id, repeatable (e.g. ?pricatExternalId=x\u0026pricatExternalId=y)",
                        "name": "pricatExternalId",
                        "in": "query"
                    },
                    {
                        "minimum": 1,
                        "type": "integer",
                        "default": 1,
                        "description": "Page Number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "maximum": 1000,
                        "type": "integer",
                        "default": 10,
                        "description": "Page Size",
                        "name": "pageSize",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by sku, repeatable (e.g. ?sku=abc\u0026sku=def)",
                        "name": "sku",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by season, repeatable (e.g. ?season=AW25\u0026season=SS25)",
                        "name": "season",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by supplier GLN, repeatable (e.g. ?supplierGln=x\u0026supplierGln=y)",
                        "name": "supplierGln",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by supplier name, repeatable (e.g. ?supplier=x\u0026supplier=y)",
                        "name": "supplier",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/PricatSku"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/pricats/products/batch": {
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Upserts pricat sku rows for a given pricat.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Pricats"
                ],
                "summary": "Batch upsert pricat skus",
                "parameters": [
                    {
                        "description": "Pricat info and array of pricat sku upsert requests",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api.PricatBatchRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BatchResponse"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request - invalid input",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BatchResponse"
                            }
                        }
                    }
                }
            }
        },
        "/v2/api/price-lists": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Prices"
                ],
                "summary": "Get all price lists",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/api.PriceList"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Prices"
                ],
                "summary": "Create price list",
                "parameters": [
                    {
                        "description": "Price List to create",
                        "name": "priceList",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api.PriceListUpsert"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/api.PriceList"
                        }
                    },
                    "400": {
                        "description": "Bad request - invalid input",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/price-lists/{externalPriceListId}": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Prices"
                ],
                "summary": "Get price list by external ID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "External Price List ID",
                        "name": "externalPriceListId",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api.PriceList"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Prices"
                ],
                "summary": "Update price list",
                "parameters": [
                    {
                        "type": "string",
                        "description": "External Price List ID",
                        "name": "externalPriceListId",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Price List data to update",
                        "name": "priceList",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api.PriceListUpsert"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api.PriceList"
                        }
                    },
                    "400": {
                        "description": "Bad request - invalid input",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/price-lists/{externalPriceListId}/prices": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Prices"
                ],
                "summary": "Get prices for a specific price list",
                "parameters": [
                    {
                        "type": "string",
                        "description": "External Price List ID",
                        "name": "externalPriceListId",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/api.PriceResponse"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/prices": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Prices"
                ],
                "summary": "Get all prices for account",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/api.PriceResponse"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/prices/batch": {
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Upserts prices for multiple SKUs. Custom prices can be set via customPrices JSON mapped to account configuration. Existing custom prices are preserved if not updated (COALESCE). SKUs must exist before creating prices. Returns a BatchResponse for each price update request with success/failure details.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Prices"
                ],
                "summary": "Batch update prices",
                "parameters": [
                    {
                        "description": "Array of price updates. Use customPrices for custom prices mapped to your account's field configuration.",
                        "name": "prices",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/api.PriceUpdateRequest"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BatchResponse"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request - invalid input",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BatchResponse"
                            }
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Deletes prices for multiple SKUs in the specified price list.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Prices"
                ],
                "summary": "Batch delete prices",
                "parameters": [
                    {
                        "description": "Price list external ID and keys to delete",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api.PriceDeleteRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BatchResponse"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request - invalid input",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BatchResponse"
                            }
                        }
                    }
                }
            }
        },
        "/v2/api/products": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Lists all Products with prices from all price lists",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Products"
                ],
                "summary": "List Products",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Product"
                        }
                    },
                    {
                        "minimum": 1,
                        "type": "integer",
                        "default": 1,
                        "description": "Page Number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "default": 10,
                        "description": "Page Size",
                        "name": "pageSize",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter on a specific key",
                        "name": "key",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by sku ID, repeatable (e.g. ?sku_id=1\u0026sku_id=2)",
                        "name": "sku_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by sku, repeatable (e.g. ?skus=abc\u0026skus=def)",
                        "name": "skus",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by season, repeatable (e.g. ?seasons=AW25\u0026seasons=SS25)",
                        "name": "seasons",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by productGroupId, repeatable (e.g. ?productgroupids=1\u0026productgroupids=2)",
                        "name": "productgroupids",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by variantGroupId, repeatable (e.g. ?variantgroupids=1\u0026variantgroupids=2)",
                        "name": "variantgroupids",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Product"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Use to update certain fields of product that already exists.\\",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Products"
                ],
                "summary": "Partial Update of existing product",
                "parameters": [
                    {
                        "description": "Array of products to update",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Product"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success responses with update status",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BatchResponse"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request - at least one validation error",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BatchResponse"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/BatchResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Creates/updates product, variant, brand \u0026 categories where needed.\\",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Products"
                ],
                "summary": "Product Full Create",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Product"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Product"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/products/batch": {
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Batch Creates/updates product, variant, brand \u0026 categories where needed.\\",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Products"
                ],
                "summary": "Batch Product Full Create",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Product"
                            }
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "array",
                                "items": {
                                    "$ref": "#/definitions/GeneralResponse"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BatchResponse"
                            }
                        }
                    }
                }
            }
        },
        "/v2/api/products/example": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get an Example Body",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Products"
                ],
                "summary": "Get Example",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Product"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/Product"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/products/imageupload": {
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Upload image for a single product using base64 encoded image data",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Products"
                ],
                "summary": "Upload Product Image",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/ImageUploadRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/ImageUploadResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/products/imageupload/batch": {
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Upload images for multiple products using base64 encoded image data",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Products"
                ],
                "summary": "Batch Upload Product Images",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/ImageUploadRequest"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BatchResponse"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/products/keyswitch": {
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "This endpoint is used to switch the key of an existing product and place the old one as a sku synonym",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Products"
                ],
                "summary": "Switch the key of an existing product",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/api.KeySwitchRequest"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BatchResponse"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/purchaseorders": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "List all Purchase Orders for an account.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase Orders"
                ],
                "summary": "List Purchase Orders",
                "parameters": [
                    {
                        "minimum": 1,
                        "type": "integer",
                        "default": 1,
                        "description": "Page Number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "default": 10,
                        "description": "Page Size",
                        "name": "pageSize",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Return purchase orders from all api key origins. Default = false",
                        "name": "global",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "all",
                            "processing"
                        ],
                        "type": "string",
                        "default": "all",
                        "description": "Filter by delivery status",
                        "name": "status",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by orderDate in layout 2006-01-02T15:04:05Z07:00 or 2006-01-02T15:04:05-0700, inclusive",
                        "name": "from",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by orderDate in layout 2006-01-02T15:04:05Z07:00 or 2006-01-02T15:04:05-0700, exclusive",
                        "name": "to",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by createdAt in layout 2006-01-02T15:04:05Z07:00 or 2006-01-02T15:04:05-0700, inclusive",
                        "name": "createdFrom",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by createdAt in layout 2006-01-02T15:04:05Z07:00 or 2006-01-02T15:04:05-0700, exclusive",
                        "name": "createdTo",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by updatedAt in layout 2006-01-02T15:04:05Z07:00 or 2006-01-02T15:04:05-0700, inclusive",
                        "name": "updatedFrom",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by updatedAt in layout 2006-01-02T15:04:05Z07:00 or 2006-01-02T15:04:05-0700, exclusive",
                        "name": "updatedTo",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/PurchaseOrder"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Create new Purchase Orders in batch.\nMax Batch Size = 500 Purchase Orders",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase Orders"
                ],
                "summary": "Create Purchase Orders",
                "parameters": [
                    {
                        "description": "id should be omitted on creation of new orders",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/PurchaseOrder"
                            }
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/PurchaseOrder"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/purchaseorders/": {
            "put": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Replace existing Purchase Orders with updates.\nCan be done in batch. Max size 500.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase Orders"
                ],
                "summary": "Replace Purchase Orders",
                "parameters": [
                    {
                        "description": "id is required when updating/replacing a Purchase Order",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/PurchaseOrder"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/PurchaseOrder"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/purchaseorders/batch": {
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Create or replace existing Purchase Orders with updates.\nCan be done in batch. Max size 500.\nAll dates must be in range 1970-01-01 00:00:00 and 2105-12-31 23:59:59 or null (where applicable)",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase Orders"
                ],
                "summary": "Create/Update Purchase Orders in batch",
                "parameters": [
                    {
                        "description": "externalPONo is required when updating/replacing a PurchaseOrder",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/PurchaseOrder"
                            }
                        }
                    },
                    {
                        "type": "string",
                        "description": "Allow for updating of purchase orders across api keys. Default = false",
                        "name": "global",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BatchResponse"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BatchResponse"
                            }
                        }
                    }
                }
            }
        },
        "/v2/api/purchaseorders/example": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get an Example Body",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase Orders"
                ],
                "summary": "Get Example",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/PurchaseOrder"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/purchaseorders/latest": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Retrieves the latest purchase order in Madden.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase Orders"
                ],
                "summary": "Get Latest Purchase Order",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/PurchaseOrder"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/purchaseorders/{externalPurchaseNo}": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Retrieve a specific purchase order using externalPurchaseNo",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase Orders"
                ],
                "summary": "Get Purchase Order",
                "parameters": [
                    {
                        "type": "string",
                        "description": "External Purchase Number",
                        "name": "externalPurchaseNo",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/PurchaseOrder"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/stocktriggers": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "List sku_warehouse_settings for an account. Optionally filter by warehouseId or sku_id.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "StockTriggers"
                ],
                "summary": "List Stock Triggers",
                "parameters": [
                    {
                        "minimum": 1,
                        "type": "integer",
                        "default": 1,
                        "description": "Page Number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "default": 10,
                        "description": "Page Size",
                        "name": "pageSize",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by warehouse UUID, repeatable (e.g. ?warehouseId=x\u0026warehouseId=y)",
                        "name": "warehouseId",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by sku ID, repeatable (e.g. ?sku_id=1\u0026sku_id=2)",
                        "name": "sku_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by SKU key, repeatable (e.g. ?key=abc\u0026key=def)",
                        "name": "key",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/StockTriggerResource"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/stocktriggers/{ID}": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get a single sku_warehouse_setting by ID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "StockTriggers"
                ],
                "summary": "Get Stock Trigger",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "SkuWarehouseSetting ID",
                        "name": "ID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/StockTriggerResource"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/stores": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "List all Stores for an account.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Stores"
                ],
                "summary": "List Stores",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Store"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Create Stores for an account. Can be done in batch.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Stores"
                ],
                "summary": "Create Stores",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Store"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Store"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/storetrafficevents": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "List all Store Traffic Events for an account.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Store Traffic Events"
                ],
                "summary": "List Store Traffic Events",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/StoreTrafficEvent"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Create Stores Traffic Events for an account. Can be done in batch.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Store Traffic Events"
                ],
                "summary": "Create Stores Traffic Events",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/StoreTrafficEvent"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "array",
                                "items": {
                                    "$ref": "#/definitions/GeneralResponse"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/storetrafficevents/{storeTrafficCounterID}": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get Store Traffic Events for a specific Traffic ID",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Store Traffic Events"
                ],
                "summary": "Get Store Traffic Events",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Store Traffic Counter ID",
                        "name": "storeTrafficCounterID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/StoreTrafficEvent"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/transactions": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "List all transactions from a specific api key.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Transactions"
                ],
                "summary": "List Transactions",
                "parameters": [
                    {
                        "minimum": 1,
                        "type": "integer",
                        "default": 1,
                        "description": "Page Number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "default": 10,
                        "description": "Page Size",
                        "name": "pageSize",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "all",
                            "processing",
                            "completed",
                            "cancelled"
                        ],
                        "type": "string",
                        "default": "all",
                        "description": "Filter by order status",
                        "name": "status",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Return transactions from all api key origins. Default = false",
                        "name": "global",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "purchase",
                            "return"
                        ],
                        "type": "string",
                        "default": "all",
                        "description": "Filter by order type",
                        "name": "type",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "d2c",
                            "b2b"
                        ],
                        "type": "string",
                        "default": "all",
                        "description": "Filter by channel",
                        "name": "channel",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by externalID",
                        "name": "externalid",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by externalRowID",
                        "name": "externalrowid",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by date in layout 2006-01-02T15:04:05Z07:00 or 2006-01-02T15:04:05-0700, inclusive",
                        "name": "from",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by date in layout 2006-01-02T15:04:05Z07:00 or 2006-01-02T15:04:05-0700, exclusive",
                        "name": "to",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Transaction"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Create new Transactions in batch.\nMax Batch Size = 500 transactions\nAll dates must be in range 1970-01-01 00:00:00 and 2105-12-31 23:59:59 or null (where applicable)",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Transactions"
                ],
                "summary": "Create Transactions",
                "parameters": [
                    {
                        "description": "id should be omitted on creation of new orders",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Transaction"
                            }
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Transaction"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/transactions/": {
            "put": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Replace existing Transaction with updates.\nCan be done in batch. Max size 500.\nAll dates must be in range 1970-01-01 00:00:00 and 2105-12-31 23:59:59 or null (where applicable)",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Transactions"
                ],
                "summary": "Update Transactions",
                "parameters": [
                    {
                        "description": "id is required when updating/replacing a Transaction",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Transaction"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Transaction"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/transactions/batch": {
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Create or replace existing Transaction with updates.\nCan be done in batch. Max size 500.\nAll dates must be in range 1970-01-01 00:00:00 and 2105-12-31 23:59:59 or null (where applicable)",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Transactions"
                ],
                "summary": "Create/Update transactions in batch",
                "parameters": [
                    {
                        "description": "id is required when updating/replacing a Transaction",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BatchResponse"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Transaction"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/transactions/example": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get an Example Body",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Transactions"
                ],
                "summary": "Get Example",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Product"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/Product"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/transactions/latest": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Retrieves the latest transaction in Madden.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Transactions"
                ],
                "summary": "Get Latest Transaction",
                "parameters": [
                    {
                        "enum": [
                            "date",
                            "externalid"
                        ],
                        "type": "string",
                        "description": "Parameter to sort by to get latest transaction",
                        "name": "sort",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "purchase",
                            "return"
                        ],
                        "type": "string",
                        "description": "Filter on specific purchase type",
                        "name": "type",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "date",
                            "externalid"
                        ],
                        "type": "string",
                        "description": "Parameter to sort by to get latest transaction",
                        "name": "sort",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "d2c",
                            "b2b"
                        ],
                        "type": "string",
                        "default": "all",
                        "description": "Filter by channel",
                        "name": "channel",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/Transaction"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/transactions/{externalTransactionID}": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get a specific transaction using externalTransactionID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Transactions"
                ],
                "summary": "Get Transaction",
                "parameters": [
                    {
                        "type": "string",
                        "description": "External Transaction ID",
                        "name": "externalTransactionID",
                        "in": "path",
                        "required": true
                    },
                    {
                        "enum": [
                            "purchase",
                            "return"
                        ],
                        "type": "string",
                        "default": "all",
                        "description": "Filter by order type",
                        "name": "type",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "d2c",
                            "b2b"
                        ],
                        "type": "string",
                        "default": "all",
                        "description": "Filter by channel",
                        "name": "channel",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/Transaction"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/transactions/{externalTransactionID}/items/{externalItemID}/shipments": {
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Create Transaction Item Shipments",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Transactions"
                ],
                "summary": "Create Transaction Item Shipments",
                "parameters": [
                    {
                        "description": "externalWarehouseID is required",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/TransactionItemShipment"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/warehouses": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "List all Warehouses for an account.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Warehouses"
                ],
                "summary": "List Warehouses",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Filter by warehouse UUID, repeatable (e.g. ?warehouse_id=x\u0026warehouse_id=y)",
                        "name": "warehouse_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Warehouse"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Create Warehoses for an account. Can be done in batch.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Warehouses"
                ],
                "summary": "Create Warehouses",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Warehouse"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Warehouse"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/warehouses/stock": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get an Example Body",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Stock Levels"
                ],
                "summary": "Get Example",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/WarehouseItem"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/BatchResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Set stock levels to mixed externalWarehouseIDs in bulk.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Stock Levels"
                ],
                "summary": "Set Stock Levels in Bulk",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/WarehouseItem"
                            }
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/GeneralResponse"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/warehouses/{externalWarehouseID}": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get specific warehouse using externalWarehouseID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Warehouses"
                ],
                "summary": "Get Warehouse",
                "parameters": [
                    {
                        "type": "string",
                        "description": "External Warehouse ID",
                        "name": "externalWarehouseID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/Warehouse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Update a specific warehouse using externalWarehouseID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Warehouses"
                ],
                "summary": "Update Warehouse",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Warehouse"
                        }
                    },
                    {
                        "type": "string",
                        "description": "External Warehouse ID",
                        "name": "externalWarehouseID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Delete a specific Warehouse using externalWarehouseID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Warehouses"
                ],
                "summary": "Delete Warehouse",
                "parameters": [
                    {
                        "type": "string",
                        "description": "External Warehouse ID",
                        "name": "externalWarehouseID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/warehouses/{externalWarehouseID}/stock": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get current stock levels from a specific warehouse using externalWarehouseID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Stock Levels"
                ],
                "summary": "Get Stock Levels",
                "parameters": [
                    {
                        "type": "string",
                        "description": "External Warehouse ID",
                        "name": "externalWarehouseID",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Filter on a list of keys (repeat parameter for multiple values)",
                        "name": "keys",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter on a list of SKUs (repeat parameter for multiple values)",
                        "name": "skus",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter on a list of EANs (repeat parameter for multiple values)",
                        "name": "eans",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/WarehouseItem"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Set stock levels to a specific warehouse using externalWarehouseID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Stock Levels"
                ],
                "summary": "Set Stock Levels",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/WarehouseItem"
                            }
                        }
                    },
                    {
                        "type": "string",
                        "description": "External Warehouse ID",
                        "name": "externalWarehouseID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/GeneralResponse"
                            }
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        },
        "/v2/api/{externalStoreID}": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get a specific store using externalStoreID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Stores"
                ],
                "summary": "Get Store",
                "parameters": [
                    {
                        "type": "string",
                        "description": "External Store ID",
                        "name": "externalStoreID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/Store"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Update a specific store using externalStoreID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Stores"
                ],
                "summary": "Update Store",
                "parameters": [
                    {
                        "description": " ",
                        "name": "type",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Store"
                        }
                    },
                    {
                        "type": "string",
                        "description": "External Store ID",
                        "name": "externalStoreID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Delete a specific store using externalStoreID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Stores"
                ],
                "summary": "Delete Store",
                "parameters": [
                    {
                        "type": "string",
                        "description": "External Store ID",
                        "name": "externalStoreID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    },
                    "default": {
                        "description": "All errors will return the same object with a describing code \u0026 message",
                        "schema": {
                            "$ref": "#/definitions/GeneralResponse"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "AuthKey": {
            "type": "object",
            "properties": {
                "accountID": {
                    "type": "string"
                },
                "apiKey": {
                    "type": "string"
                }
            }
        },
        "AuthResource": {
            "type": "object",
            "properties": {
                "accessToken": {
                    "description": "The actual token to be used as bearer on all following requests",
                    "type": "string"
                },
                "tokenType": {
                    "description": "Type of token",
                    "type": "string"
                }
            }
        },
        "BatchResponse": {
            "type": "object",
            "properties": {
                "message": {
                    "type": "string",
                    "example": "Missing BrandName"
                },
                "reference": {
                    "type": "string",
                    "example": "123456-001-43"
                },
                "referenceField": {
                    "type": "string",
                    "example": "key"
                },
                "statusCode": {
                    "type": "integer",
                    "example": 400
                }
            }
        },
        "BatchUpdateStatusItem": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "status": {
                    "type": "string",
                    "enum": [
                        "completed",
                        "failed"
                    ]
                }
            }
        },
        "Brand": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer",
                    "example": 1
                },
                "name": {
                    "type": "string",
                    "example": "Acme"
                },
                "synonyms": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "Category": {
            "type": "object",
            "properties": {
                "id": {
                    "description": "ID of category",
                    "type": "integer"
                },
                "name": {
                    "description": "Name of the category",
                    "type": "string"
                }
            }
        },
        "DeliveryEvent": {
            "type": "object",
            "properties": {
                "deliveryDate": {
                    "description": "The date of the event",
                    "type": "string",
                    "example": "2021-10-13T09:05:14.113Z"
                },
                "deliveryID": {
                    "description": "Extenal ID of the delivery",
                    "type": "string",
                    "example": "RP-14534"
                },
                "quantity": {
                    "description": "Quantity delivered for the event",
                    "type": "integer",
                    "example": 4
                }
            }
        },
        "DistributionOrder": {
            "type": "object",
            "required": [
                "externalDistributionOrderId",
                "fromWarehouseExternalId",
                "key",
                "orderDate",
                "toWarehouseExternalId"
            ],
            "properties": {
                "cancelledDate": {
                    "description": "Date that the order was cancelled",
                    "type": "string",
                    "example": "2021-07-19T14:05:257Z"
                },
                "completedDate": {
                    "description": "Date that the order was received and completed:",
                    "type": "string",
                    "example": "2021-07-19T14:05:257Z"
                },
                "deliveredQuantity": {
                    "description": "Quantity that has been relocated",
                    "type": "integer",
                    "example": 2
                },
                "deliveryDate": {
                    "description": "Date that the order will be delivered",
                    "type": "string",
                    "example": "2021-07-19T14:05:22.257Z"
                },
                "deliveryWindow": {
                    "description": "Delivery Window of DO (if any)",
                    "type": "string",
                    "example": "SS24"
                },
                "externalComment": {
                    "description": "External Comment",
                    "type": "string",
                    "example": "Express delivery needed"
                },
                "externalDistributionOrderId": {
                    "description": "The external distribution order id used as a header",
                    "type": "string",
                    "example": "DO-14534"
                },
                "externalRowId": {
                    "description": "The external row id",
                    "type": "string",
                    "example": "21020"
                },
                "fromWarehouseExternalId": {
                    "description": "The external id of the warehouse where quantity is moved from",
                    "type": "string",
                    "example": "central"
                },
                "id": {
                    "type": "integer"
                },
                "key": {
                    "description": "Key, used as a reference to source system",
                    "type": "string",
                    "example": "7340192703345"
                },
                "label": {
                    "description": "Label of the DO (if any)",
                    "type": "string",
                    "example": "DO-14534"
                },
                "orderDate": {
                    "description": "Date that the purchase order was created",
                    "type": "string",
                    "example": "2021-07-19T14:05:22.257Z"
                },
                "orderType": {
                    "description": "Order type of DO (if any)",
                    "type": "string",
                    "example": "Transfer"
                },
                "quantity": {
                    "description": "Quantity to be relocated",
                    "type": "integer",
                    "example": 4
                },
                "season": {
                    "description": "Season that the key belong to. Only used for product versioning.",
                    "type": "string",
                    "example": "Spring/Summer"
                },
                "shippedAt": {
                    "description": "Date that the order was shipped",
                    "type": "string",
                    "example": "2021-07-19T14:05:22.257Z"
                },
                "sku": {
                    "description": "SKU of variant. Should be unique per size/variant",
                    "type": "string",
                    "example": "123456-001-43"
                },
                "status": {
                    "description": "Default values that are set based on other fields: CANCELLED if CancelledAt is set, COMPLETED if DeliveredQuantity \u003e= Quantity else PROCESSING. Additional possible statuses: ALLOCATED, IN TRANSIT. (handled manually)",
                    "allOf": [
                        {
                            "$ref": "#/definitions/DistributionOrderStatus"
                        }
                    ],
                    "example": "CANCELLED"
                },
                "toWarehouseExternalId": {
                    "description": "The external id of the warehouse where quantity is moved to",
                    "type": "string",
                    "example": "store1"
                }
            }
        },
        "DistributionOrderStatus": {
            "type": "string",
            "enum": [
                "CANCELLED",
                "PROCESSING",
                "ALLOCATED",
                "IN TRANSIT",
                "COMPLETED"
            ],
            "x-enum-varnames": [
                "DistributionOrderStatus_Cancelled",
                "DistributionOrderStatus_Processing",
                "DistributionOrderStatus_Allocated",
                "DistributionOrderStatus_InTransit",
                "DistributionOrderStatus_Completed"
            ]
        },
        "Event": {
            "type": "object",
            "properties": {
                "accountId": {
                    "type": "string"
                },
                "completedAt": {
                    "type": "string"
                },
                "createdAt": {
                    "type": "string"
                },
                "eventType": {
                    "type": "string"
                },
                "failedAt": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "payload": {
                    "type": "object"
                }
            }
        },
        "EventStatusResult": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "updated": {
                    "type": "boolean"
                }
            }
        },
        "FxRate": {
            "type": "object",
            "properties": {
                "exchangeDate": {
                    "type": "string"
                },
                "externalReference": {
                    "type": "string",
                    "example": "my-ref"
                },
                "fromCurrency": {
                    "type": "string",
                    "example": "USD"
                },
                "fromDate": {
                    "type": "string"
                },
                "id": {
                    "type": "integer",
                    "example": 1
                },
                "rate": {
                    "type": "number",
                    "example": 0.92
                },
                "toCurrency": {
                    "type": "string",
                    "example": "EUR"
                },
                "toDate": {
                    "type": "string"
                }
            }
        },
        "GeneralResponse": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "Error Type (if any)"
                },
                "message": {
                    "type": "string",
                    "example": "Message describing the error"
                },
                "statusCode": {
                    "type": "integer",
                    "example": 400
                }
            }
        },
        "ImageUploadRequest": {
            "type": "object",
            "properties": {
                "filename": {
                    "type": "string"
                },
                "imageData": {
                    "type": "string"
                },
                "key": {
                    "type": "string"
                },
                "season": {
                    "type": "string"
                },
                "variantGroupId": {
                    "type": "string"
                }
            }
        },
        "ImageUploadResponse": {
            "type": "object",
            "properties": {
                "imageUrl": {
                    "type": "string"
                }
            }
        },
        "MappingTableMergeRequest": {
            "type": "object",
            "required": [
                "mappingValues"
            ],
            "properties": {
                "mappingValues": {
                    "type": "object"
                }
            }
        },
        "MappingTableResponse": {
            "type": "object",
            "properties": {
                "mappingField": {
                    "type": "string",
                    "example": "color"
                },
                "mappingType": {
                    "type": "string",
                    "example": "products"
                },
                "mappingValues": {
                    "type": "object"
                }
            }
        },
        "MappingTableUpsertRequest": {
            "type": "object",
            "required": [
                "mappingType",
                "mappingValues"
            ],
            "properties": {
                "mappingType": {
                    "type": "string"
                },
                "mappingValues": {
                    "type": "object"
                }
            }
        },
        "PlannedVolumeRow": {
            "type": "object",
            "properties": {
                "draftPOVolume": {
                    "description": "Draft PO volume with delivery date in the requested date window",
                    "type": "number"
                },
                "groupKey": {
                    "description": "Value of the groupBy dimension (e.g. \"SS26\")",
                    "type": "string"
                },
                "poVolume": {
                    "description": "Confirmed PO volume arriving in the requested date window",
                    "type": "number"
                },
                "stockVolume": {
                    "description": "Current sellable warehouse stock (physical or available, per account setting)",
                    "type": "number"
                }
            }
        },
        "PlannedVolumeWarehouseRow": {
            "type": "object",
            "properties": {
                "draftPOVolume": {
                    "description": "Draft PO volume with delivery date in the requested date window",
                    "type": "number"
                },
                "groupKey": {
                    "description": "Value of the groupBy dimension (e.g. \"SS26\")",
                    "type": "string"
                },
                "poVolume": {
                    "description": "Confirmed PO volume arriving in the requested date window",
                    "type": "number"
                },
                "stockVolume": {
                    "description": "Current sellable warehouse stock (physical or available, per account setting)",
                    "type": "number"
                },
                "warehouseId": {
                    "description": "Warehouse the volumes belong to. Empty for draft-PO volume not yet assigned to a warehouse.",
                    "type": "string"
                },
                "warehouseName": {
                    "type": "string"
                }
            }
        },
        "PricatSku": {
            "type": "object",
            "properties": {
                "brand": {
                    "description": "Product brand.",
                    "type": "string",
                    "example": "Sample Brand"
                },
                "category": {
                    "description": "Product category.",
                    "type": "string",
                    "example": "Tops"
                },
                "color": {
                    "description": "Product color.",
                    "type": "string",
                    "example": "Black"
                },
                "costPrice": {
                    "description": "Cost price of the row.",
                    "type": "number",
                    "example": 199
                },
                "costPriceCurrency": {
                    "description": "Currency code for cost price.",
                    "type": "string",
                    "example": "SEK"
                },
                "customFields": {
                    "description": "Custom fields — arbitrary key/value pairs. Same shape as customFields on /api/products.",
                    "type": "object"
                },
                "ean": {
                    "description": "EAN of the product row.",
                    "type": "string",
                    "example": "7350000000001"
                },
                "externalAttributes": {
                    "description": "External attributes — arbitrary key/value pairs. Same shape as externalAttributes on /api/products.",
                    "type": "object"
                },
                "gender": {
                    "description": "Product gender.",
                    "type": "string",
                    "example": "Unisex"
                },
                "imageUrl": {
                    "description": "Product image URL.",
                    "type": "string",
                    "example": "https://cdn.example.com/img.jpg"
                },
                "info": {
                    "description": "Any additional JSON payload.",
                    "type": "object"
                },
                "pricatExternalId": {
                    "description": "External ID of the pricat.",
                    "type": "string",
                    "example": "SPRING_2026"
                },
                "price": {
                    "description": "Sales price of the row.",
                    "type": "number",
                    "example": 499
                },
                "priceCurrency": {
                    "description": "Currency code for sales price.",
                    "type": "string",
                    "example": "SEK"
                },
                "prices": {
                    "description": "Additional price-list entries beyond the default D2C price.\nEach element follows the same shape as entries in prices on /api/products:\n[{\"listExternalID\":\"RETAIL_EUR\",\"price\":99.0,\"vat\":0.25,\"customPrice1\":109.0}]",
                    "type": "object"
                },
                "productGroupId": {
                    "description": "Group ID of the product.",
                    "type": "string",
                    "example": "PG-100"
                },
                "productName": {
                    "description": "Name of the product.",
                    "type": "string",
                    "example": "Classic Tee"
                },
                "season": {
                    "description": "Season used when building the key for versioned SKUs.",
                    "type": "string",
                    "example": "SS26"
                },
                "size": {
                    "description": "Product size.",
                    "type": "string",
                    "example": "M"
                },
                "sku": {
                    "description": "SKU of the product row.",
                    "type": "string",
                    "example": "SKU-1234"
                },
                "supplier": {
                    "description": "Product supplier.",
                    "type": "string",
                    "example": "Main Supplier"
                },
                "supplierGln": {
                    "description": "Supplier GLN.",
                    "type": "string",
                    "example": "1234567890123"
                },
                "variantGroupId": {
                    "description": "Group ID of the variant.",
                    "type": "string",
                    "example": "VG-100"
                },
                "variantName": {
                    "description": "Name of the variant.",
                    "type": "string",
                    "example": "Classic Tee Black"
                },
                "vat": {
                    "description": "VAT percentage.",
                    "type": "number",
                    "example": 25
                }
            }
        },
        "Product": {
            "type": "object",
            "required": [
                "brandName",
                "color",
                "key",
                "productGroupID",
                "productName",
                "size",
                "subCategory",
                "variantName"
            ],
            "properties": {
                "activePlanning": {
                    "description": "Active Planning indicates if the variant is included in planning",
                    "type": "boolean",
                    "default": false,
                    "example": true
                },
                "additionalSuppliers": {
                    "description": "Suppliers",
                    "type": "object"
                },
                "ageGroup": {
                    "description": "AgeGroup assosciated with the product",
                    "type": "string",
                    "example": "Senior"
                },
                "brandName": {
                    "description": "Name of the products brand",
                    "type": "string",
                    "example": "Acme"
                },
                "categoryName": {
                    "description": "Category of product.",
                    "type": "string",
                    "example": "Sneakers"
                },
                "collection": {
                    "description": "Collection that the product belongs to",
                    "type": "string",
                    "example": "SS21"
                },
                "color": {
                    "description": "Color assosciated with the variant",
                    "type": "string",
                    "example": "Black"
                },
                "costCalculationPrice": {
                    "description": "CostCalculationPrice is the base cost price to be used with CostCalculationValues.",
                    "type": "number"
                },
                "costCalculationValues": {
                    "description": "CostCalculationValues used to calculate the cost price",
                    "type": "object"
                },
                "costPrice": {
                    "description": "CostPrice of the Variant",
                    "type": "number",
                    "example": 42
                },
                "costPriceCurrency": {
                    "description": "CostPriceCurrency of the Variant",
                    "type": "string",
                    "example": "USD"
                },
                "customFields": {
                    "description": "Any JSON object holding additional filter attributes",
                    "type": "string",
                    "example": "{}"
                },
                "department": {
                    "description": "Department assosciated with the product",
                    "type": "string",
                    "example": "Sports"
                },
                "ean": {
                    "description": "EAN of Variant",
                    "type": "string",
                    "example": "7340192703345"
                },
                "externalAttributes": {
                    "description": "External Attributes is a JSON field that can be used to store any additional information about the product.",
                    "type": "object"
                },
                "gender": {
                    "description": "Gender assosciated with the product",
                    "type": "string",
                    "example": "Unisex"
                },
                "id": {
                    "type": "integer"
                },
                "imageUrl": {
                    "type": "string",
                    "example": "https://example.com/image.jpg"
                },
                "info": {
                    "description": "Any info / data needed by the integration (json)",
                    "type": "object"
                },
                "key": {
                    "description": "Key used between products, transaction \u0026 stock tables. Usually SKU or EAN but needs to be same on all occurrences",
                    "type": "string",
                    "example": "7340192703345"
                },
                "leadTime": {
                    "description": "DEPRECATED: derived = ProductionLeadTimeDays + ShippingLeadTimeDays. Use the split fields below.\nThe physical skus.lead_time column has been retired, so this field must never be written.\ngorm:\"-\u003e\" (read-only) blocks struct-based writes (Save / Updates(struct)) while keeping the\nlist endpoint's `as lead_time` read alias working. It does NOT cover the Assign(item).\nFirstOrCreate upsert path, whose SET map is built via BuildCondition (keyed on Readable) —\nthat path omits \"lead_time\" explicitly in Create(). See MAD-8917.",
                    "type": "integer",
                    "example": 3
                },
                "moq": {
                    "description": "Minimum Order Quantity of variant",
                    "type": "integer",
                    "example": 300
                },
                "packsize": {
                    "description": "Packsize",
                    "type": "integer",
                    "example": 1
                },
                "price": {
                    "description": "Sales Price of the Variant (Excl VAT)",
                    "type": "number",
                    "example": 42
                },
                "priceCurrency": {
                    "description": "Sales Price Currency of the Variant",
                    "type": "string",
                    "example": "USD"
                },
                "priceIncludingVat": {
                    "description": "If Price is including VAT or not",
                    "type": "boolean"
                },
                "prices": {
                    "description": "Prices of the Variant across multiple price lists",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/api.ProductPrices"
                    }
                },
                "productGroupID": {
                    "description": "ProductGroupID is used to group products together within Madden",
                    "type": "string",
                    "example": "123456"
                },
                "productMoq": {
                    "description": "Minimum Order Quantity of product",
                    "type": "integer",
                    "example": 300
                },
                "productName": {
                    "description": "Name of product",
                    "type": "string",
                    "example": "Petter"
                },
                "productType": {
                    "description": "Type of product (1: Normal/standard, 2: Commission, 3: Local)",
                    "type": "number",
                    "default": 1,
                    "enum": [
                        1,
                        2,
                        3
                    ],
                    "example": 1
                },
                "productionLeadTimeDays": {
                    "description": "Production lead time of the SKU in days.",
                    "type": "integer",
                    "example": 30
                },
                "season": {
                    "description": "Season that the product belongs to",
                    "type": "string",
                    "example": "Spring/Summer"
                },
                "shippingLeadTimeDays": {
                    "description": "Shipping lead time of the SKU in days.",
                    "type": "integer",
                    "example": 14
                },
                "size": {
                    "description": "Size assosciated with the variant",
                    "type": "string",
                    "example": "43"
                },
                "sku": {
                    "description": "SKU of product. Should be unique per size/variant",
                    "type": "string",
                    "example": "123456-001-43"
                },
                "skuSynonyms": {
                    "description": "List of sku synonyms that should point to this variant",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "status": {
                    "description": "Status of the variant (1: Inactive, 2: Active, 3: Outgoing)",
                    "type": "number",
                    "default": 2,
                    "enum": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                    ],
                    "example": 2
                },
                "subCategory": {
                    "description": "Subcategory of product. Should be a relevant for segmentation",
                    "type": "string",
                    "example": "Low Sneakers"
                },
                "supplier": {
                    "description": "Supplier of the Product",
                    "type": "string"
                },
                "supplierPrice": {
                    "description": "Price to produce",
                    "type": "number",
                    "example": 42
                },
                "supplierPriceCurrency": {
                    "description": "Currency to produce",
                    "type": "string"
                },
                "unitVolume": {
                    "description": "Unit volume of the product in meters (l*w*h) (CBM)",
                    "type": "number"
                },
                "variantExternalID": {
                    "description": "ID of variant in external platform",
                    "type": "string",
                    "example": "shopify_432345"
                },
                "variantGroupID": {
                    "description": "VariantGroupID is used to group variants",
                    "type": "string",
                    "example": "123456-001"
                },
                "variantName": {
                    "description": "Name of specific variant",
                    "type": "string",
                    "example": "Petter Black"
                },
                "vatValue": {
                    "description": "Vat Value is the percentage of VAT",
                    "type": "number",
                    "example": 25
                },
                "vendorSKU": {
                    "description": "Vendors SKU if using own sku structure",
                    "type": "string",
                    "example": "9876543-001-43"
                },
                "weight": {
                    "description": "Weight of the product in kilograms (kg)",
                    "type": "number"
                },
                "wholesalePrice": {
                    "description": "Wholesale price of the Variant (Excl VAT)",
                    "type": "number",
                    "example": 42
                },
                "wholesalePriceCurrency": {
                    "description": "Currency Code of the Wholeale Price",
                    "type": "string",
                    "example": "USD"
                },
                "year": {
                    "description": "Start of the porducts life-cycle",
                    "type": "string",
                    "example": "2021"
                }
            }
        },
        "PurchaseOrder": {
            "type": "object",
            "required": [
                "orderDate"
            ],
            "properties": {
                "cancelledDate": {
                    "type": "string",
                    "example": "2021-07-19T14:05:22.257Z"
                },
                "completedDate": {
                    "type": "string",
                    "example": "2021-07-19T14:05:22.257Z"
                },
                "createdAt": {
                    "description": "Date the Purchase Order was created in Madden",
                    "type": "string",
                    "example": "2021-03-19T14:05:22.257Z"
                },
                "deliveryStatus": {
                    "description": "Status of the Delivery (0: Not Delivered, 1: PartiallyDelivered, 2: FullyDelivered, 3: Cancelled)",
                    "type": "number",
                    "default": 0,
                    "example": 10
                },
                "deliveryWindow": {
                    "description": "Delivery Window of the Purchase Order",
                    "type": "string",
                    "example": "SS24"
                },
                "externalComment": {
                    "description": "Any relevant comment",
                    "type": "string",
                    "example": "AW21 - Footwear"
                },
                "externalPurchaseNo": {
                    "description": "External Purchase No",
                    "type": "string",
                    "example": "PO-14534"
                },
                "factory": {
                    "description": "Factory of the Purchase Order",
                    "type": "string",
                    "example": "Factory B"
                },
                "id": {
                    "description": "Maddens Purcher Order id",
                    "type": "integer"
                },
                "items": {
                    "description": "The items on the Purchase Order",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/PurchaseOrderItem"
                    }
                },
                "label": {
                    "description": "External Description/Label of PO",
                    "type": "string"
                },
                "orderDate": {
                    "description": "Date that the Purchase Order was created",
                    "type": "string",
                    "example": "2021-03-19T14:05:22.257Z"
                },
                "orderType": {
                    "description": "Order Type of the Purchase Order",
                    "type": "string",
                    "example": "Standard"
                },
                "transportMethod": {
                    "description": "Transport Method of the Purchase Order",
                    "type": "string",
                    "example": "Air"
                },
                "updatedAt": {
                    "description": "Date the Purchase Order was last updated in Madden",
                    "type": "string",
                    "example": "2021-03-19T14:05:22.257Z"
                }
            }
        },
        "PurchaseOrderItem": {
            "type": "object",
            "required": [
                "externalWarehouseID",
                "key"
            ],
            "properties": {
                "brandName": {
                    "description": "Name of the products brand",
                    "type": "string",
                    "example": "Acme"
                },
                "deliveries": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/DeliveryEvent"
                    }
                },
                "deliveryDate": {
                    "description": "(Original) DeliveryDate is the initial date that the purchase order item is expected to be delivered. (arrive)",
                    "type": "string",
                    "example": "2021-07-19T14:05:22.257Z"
                },
                "departureDate": {
                    "description": "(Original) DepartureDate is the initial date that the purchase order item is expected to leave warehouse.",
                    "type": "string",
                    "example": "2021-07-19T14:05:22.257Z"
                },
                "ean": {
                    "description": "EAN of variant",
                    "type": "string",
                    "example": "7340192703345"
                },
                "externalRowID": {
                    "description": "External id for row",
                    "type": "string",
                    "example": "21020"
                },
                "externalWarehouseID": {
                    "description": "External ID of the warehouse (leave the warehouse)",
                    "type": "string",
                    "example": "ecom"
                },
                "fromExternalWarehouseID": {
                    "description": "From Warehouse External ID (accepted but not exposed)",
                    "type": "string",
                    "example": "central"
                },
                "id": {
                    "type": "integer"
                },
                "key": {
                    "description": "Key, used as a reference to source system.",
                    "type": "string",
                    "example": "7340192703345"
                },
                "productName": {
                    "description": "Name of product",
                    "type": "string",
                    "example": "Petter"
                },
                "quantity": {
                    "description": "Quantity ordered",
                    "type": "integer",
                    "example": 4
                },
                "revisedDeliveryDate": {
                    "description": "RevisedDeliveryDate is the \"actual\" date  that the purchase order item is expected to be delivered (arrive).  Same as ETA",
                    "type": "string",
                    "example": "2021-07-19T14:05:22.257Z"
                },
                "revisedDepartureDate": {
                    "description": "RevisedDepartureDate is the \"actual\" date that the purchase order item is expected to leave warehouse. Same as ETD",
                    "type": "string",
                    "example": "2021-07-19T14:05:22.257Z"
                },
                "season": {
                    "description": "Season that the key belong to. Only used for product versioning.",
                    "type": "string",
                    "example": "Spring/Summer"
                },
                "sku": {
                    "description": "SKU of variant. Should be unique per size/variant",
                    "type": "string",
                    "example": "123456-001-43"
                },
                "supplier": {
                    "description": "Name of the products supplier",
                    "type": "string",
                    "example": "Factory B"
                },
                "totalPriceCurrency": {
                    "description": "Currency of order totals",
                    "type": "string",
                    "example": "EUR"
                },
                "totalPriceNet": {
                    "description": "Net total of row",
                    "type": "number",
                    "example": 180
                },
                "totalPriceVat": {
                    "description": "Total VAT of row",
                    "type": "number",
                    "example": 0
                }
            }
        },
        "StockTriggerResource": {
            "type": "object",
            "properties": {
                "allowMaxAuto": {
                    "type": "boolean"
                },
                "allowMinAuto": {
                    "type": "boolean"
                },
                "id": {
                    "type": "integer"
                },
                "key": {
                    "type": "string"
                },
                "lastRestockDate": {
                    "type": "string"
                },
                "lowerLimit": {
                    "type": "integer"
                },
                "max": {
                    "type": "integer"
                },
                "min": {
                    "type": "integer"
                },
                "minMaxSource": {
                    "type": "string"
                },
                "minMaxUpdatedAt": {
                    "type": "string"
                },
                "preventRestock": {
                    "type": "boolean"
                },
                "season": {
                    "type": "string"
                },
                "sku": {
                    "type": "string"
                },
                "skuID": {
                    "type": "integer"
                },
                "startDate": {
                    "type": "string"
                },
                "upperLimit": {
                    "type": "integer"
                },
                "warehouseExternalId": {
                    "type": "string"
                },
                "warehouseID": {
                    "type": "string"
                }
            }
        },
        "Store": {
            "type": "object",
            "properties": {
                "externalStoreId": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "trafficCounterID": {
                    "type": "string"
                }
            }
        },
        "StoreTrafficEvent": {
            "type": "object",
            "properties": {
                "eventTime": {
                    "description": "Time the event occurred",
                    "type": "string"
                },
                "externalStoreID": {
                    "type": "string"
                },
                "incomingTraffic": {
                    "description": "Number of incoming traffic",
                    "type": "integer"
                },
                "outgoingTraffic": {
                    "description": "Number of outgoing traffic",
                    "type": "integer"
                },
                "storeTrafficCounterID": {
                    "description": "ExternalID of the counter",
                    "type": "string"
                }
            }
        },
        "Transaction": {
            "type": "object",
            "required": [
                "channel",
                "createdDate",
                "currencyCode",
                "externalStoreID",
                "externalTransactionID",
                "market",
                "type"
            ],
            "properties": {
                "cancelledDate": {
                    "description": "Date that the transaction was cancelled",
                    "type": "string",
                    "format": "date-time",
                    "example": "null"
                },
                "channel": {
                    "description": "Channel of the transaction (1: D2C, 2: B2B)",
                    "type": "number",
                    "example": 1
                },
                "completedDate": {
                    "description": "Date that the transaction was completed",
                    "type": "string",
                    "format": "date-time",
                    "example": "2022-08-17T17:00:00+02:00"
                },
                "createdDate": {
                    "description": "Date that the transaction was created",
                    "type": "string",
                    "format": "date-time",
                    "example": "2022-08-17T10:53:53+02:00"
                },
                "currencyCode": {
                    "description": "Currency Code of transaction (ISO 4217)",
                    "type": "string",
                    "example": "SEK"
                },
                "customerName": {
                    "description": "Name of the Customer (Only used on B2B transactions)",
                    "type": "string",
                    "example": "B2B Company Inc"
                },
                "deliveryDate": {
                    "description": "The estimated Delivery Date of the transaction",
                    "type": "string",
                    "example": "2021-11-15T10:15:30Z"
                },
                "externalCostCenterID": {
                    "description": "External ID of an assosciated cost center. Will be added as a suffix to externalStoreID",
                    "type": "string",
                    "example": "OL"
                },
                "externalCustomerID": {
                    "description": "External Customer ID of the B2B customer",
                    "type": "string",
                    "example": "1234-567"
                },
                "externalInfo": {
                    "description": "JSON body that can be used for integration purposes",
                    "type": "string",
                    "example": "{}"
                },
                "externalParentID": {
                    "description": "Reference externalTransactionID of initial transaction when adding returns",
                    "type": "string"
                },
                "externalRowID": {
                    "description": "Additional ExternalID of transaction",
                    "type": "string"
                },
                "externalStoreID": {
                    "description": "External ID of the store (Store must exist in Madden)",
                    "type": "string",
                    "example": "store101"
                },
                "externalTransactionID": {
                    "description": "The ID of the transaction in the source platform (used to query single transacitons)",
                    "type": "string",
                    "example": "779644"
                },
                "id": {
                    "description": "Maddens ID of the transaction (Used as reference on replace)",
                    "type": "integer"
                },
                "invoicedDate": {
                    "description": "Invoiced at",
                    "type": "string",
                    "format": "date-time",
                    "example": "2022-08-17T10:53:53+02:00"
                },
                "items": {
                    "description": "The items/product rows of the transaction",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/TransactionItem"
                    }
                },
                "market": {
                    "description": "Market that the transaction was destined for. (Ex. Delivery Country)",
                    "type": "string",
                    "example": "Sweden"
                },
                "orderType": {
                    "description": "OrderType of the transaction",
                    "type": "string",
                    "example": "Standard"
                },
                "statements": {
                    "description": "Any fees/discounts applied to the whole transaction that are not directly tied to a transaction item",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/TransactionStatement"
                    }
                },
                "type": {
                    "description": "Type of the transaction (1: Sale, 2: Return), Note that Return should also change item Quantity/Price/CostPrice to negative",
                    "type": "number",
                    "example": 1
                }
            }
        },
        "TransactionItem": {
            "type": "object",
            "required": [
                "brandName",
                "category",
                "externalItemID",
                "key",
                "moneyItemTotalNet",
                "moneyItemTotalVat",
                "productName",
                "quantity",
                "variantName",
                "vatValue"
            ],
            "properties": {
                "ageGroup": {
                    "description": "AgeGroup assosciated with the variant",
                    "type": "string",
                    "example": "Senior"
                },
                "brandName": {
                    "description": "Brand Name of the variant",
                    "type": "string",
                    "example": "ACME"
                },
                "category": {
                    "description": "Category of the variant",
                    "type": "string",
                    "example": "Sneakers"
                },
                "collection": {
                    "description": "Collection that the variant belongs to",
                    "type": "string",
                    "example": "SS21"
                },
                "color": {
                    "description": "Color of the variant",
                    "type": "string",
                    "example": "Black"
                },
                "costPrice": {
                    "description": "Cost Price per unit on transaction row",
                    "type": "number",
                    "format": "float",
                    "example": 45.5
                },
                "costPriceCurrency": {
                    "description": "Currency Code of Cost Price (ISO 4217)",
                    "type": "string",
                    "example": "USD"
                },
                "customFields": {
                    "description": "Any JSON object holding additional filter attributes",
                    "type": "string",
                    "example": "{}"
                },
                "deliveryWindow": {
                    "description": "Name of Delivery Window assosciated with the variant",
                    "type": "string",
                    "example": "IMMEDIATE"
                },
                "department": {
                    "description": "Department assosciated with the variant",
                    "type": "string",
                    "example": "Sports"
                },
                "ean": {
                    "description": "Ean of the variant",
                    "type": "string",
                    "example": "7340192703345"
                },
                "externalID": {
                    "description": "Id of variant in external platform",
                    "type": "string",
                    "example": "99887766"
                },
                "externalItemID": {
                    "description": "ExternalItemID the external id of the transaction item",
                    "type": "string",
                    "example": "779644-1000"
                },
                "fulfillmentType": {
                    "description": "Method of fulfillment for transaction item (0: Warehouse, 1: DropShip)",
                    "type": "number",
                    "default": 0,
                    "example": 0
                },
                "invoicedDate": {
                    "description": "Date that the transaction was invoiced (fallbacks to completedAT if not set)",
                    "type": "string",
                    "format": "date-time",
                    "example": "2022-08-17T17:00:00+02:00"
                },
                "key": {
                    "description": "Key used between products, transaction \u0026 stock tables. Usually SKU or EAN but needs to be same on all occurrences of the variant",
                    "type": "string",
                    "example": "7340192703345"
                },
                "moneyDiscount": {
                    "description": "Any discounts given on transaction row (ex. VAT)",
                    "type": "number",
                    "format": "float",
                    "example": 380
                },
                "moneyDiscountIncVat": {
                    "description": "Any discounts given on transaction row (inc. VAT). This field is optional but if provided will override MoneyDiscount (required vatValue)",
                    "type": "number",
                    "format": "float",
                    "example": 475
                },
                "moneyItemTotalNet": {
                    "description": "Total of the items on transaction row ex. VAT",
                    "type": "number",
                    "format": "float",
                    "example": 3040
                },
                "moneyItemTotalVat": {
                    "description": "Total VAT of the items on the transaction row",
                    "type": "number",
                    "format": "float",
                    "example": 760
                },
                "primaryWarehouseExternalID": {
                    "description": "External ID of the warehouse where items WILL be allocated",
                    "type": "string",
                    "example": "central-ws"
                },
                "productGroupID": {
                    "description": "ProductGroupID of the variant (used to group variants together)",
                    "type": "string",
                    "example": "123456"
                },
                "productName": {
                    "description": "Name of the Product",
                    "type": "string",
                    "example": "Petter"
                },
                "productType": {
                    "description": "Type of Product (1: Normal/standard, 2: Commission, 3: Local",
                    "type": "number",
                    "default": 1,
                    "example": 1
                },
                "quantity": {
                    "description": "Quantity of the variant purchased",
                    "type": "integer",
                    "example": 1
                },
                "season": {
                    "description": "Season that the variant belong to",
                    "type": "string",
                    "example": "Spring/Summer"
                },
                "shipments": {
                    "description": "Shipments assosciated with the transaction row",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/TransactionItemShipment"
                    }
                },
                "size": {
                    "description": "Size of the variant",
                    "type": "string",
                    "example": "43"
                },
                "sku": {
                    "description": "SKU of the variant",
                    "type": "string",
                    "example": "123456-001-43"
                },
                "supplier": {
                    "description": "Name of the supplier of the variant",
                    "type": "string",
                    "example": "Acme Enterprises AB"
                },
                "type": {
                    "description": "Overrides the Type of the transaction (1: Sale, 2: Return), Note that Return should also change item Quantity/Price/CostPrice to negative",
                    "type": "number",
                    "example": 1
                },
                "variantGroupID": {
                    "description": "VariantGroupID of the variant (used to group skus/sizes together)",
                    "type": "string",
                    "example": "123456-001"
                },
                "variantName": {
                    "description": "Name of the Variant",
                    "type": "string",
                    "example": "Petter Black"
                },
                "vatValue": {
                    "description": "VAT Percentage on the item",
                    "type": "number",
                    "example": 25
                },
                "vendorSKU": {
                    "description": "Vendors SKU if using own sku structure",
                    "type": "string",
                    "example": "9876543-001-43"
                },
                "year": {
                    "description": "Start of the variants life-cycle",
                    "type": "string",
                    "example": "2021"
                }
            }
        },
        "TransactionItemShipment": {
            "type": "object",
            "properties": {
                "externalWarehouseID": {
                    "description": "External ID of the warehouse where items were allocated",
                    "type": "string",
                    "example": "central-ws"
                },
                "quantity": {
                    "description": "Quantity shipped",
                    "type": "integer",
                    "example": 1
                },
                "shipmentDate": {
                    "description": "Date the shipment was created",
                    "type": "string",
                    "format": "date-time",
                    "example": "2022-08-17T16:50:50+02:00"
                },
                "shipmentID": {
                    "description": "External ID of the shipment",
                    "type": "string",
                    "example": "779644-1"
                }
            }
        },
        "TransactionStatement": {
            "type": "object",
            "properties": {
                "customFields": {
                    "description": "Custom Fields",
                    "type": "string",
                    "example": "{}"
                },
                "name": {
                    "description": "Name of the Statement",
                    "type": "string",
                    "example": "Cart Discount"
                },
                "priceNet": {
                    "description": "Statement Price (ex VAT)",
                    "type": "number",
                    "example": 159.2
                },
                "priceVat": {
                    "description": "VAT of statement",
                    "type": "number",
                    "example": 39.8
                },
                "type": {
                    "description": "Type of the statement (1: Fee, 2: Voucher, 3: Shipping, 4: Service, 5: Giftcard, 6: CartDiscount)",
                    "type": "number",
                    "example": 6
                }
            }
        },
        "UpdatePayloadRequest": {
            "type": "object"
        },
        "Warehouse": {
            "type": "object",
            "required": [
                "externalId",
                "name"
            ],
            "properties": {
                "ID": {
                    "description": "ID of the warehouse",
                    "type": "string"
                },
                "centralWarehouse": {
                    "description": "If the warehouse is a central warehouse",
                    "type": "boolean",
                    "default": false
                },
                "externalId": {
                    "description": "External ID of the warehouse",
                    "type": "string",
                    "example": "flagship"
                },
                "name": {
                    "description": "Name of the warehouse",
                    "type": "string",
                    "example": "Flagship"
                }
            }
        },
        "WarehouseItem": {
            "type": "object",
            "required": [
                "availableQuantity",
                "key"
            ],
            "properties": {
                "availableQuantity": {
                    "description": "Available Quantity in stock",
                    "type": "integer",
                    "example": 21
                },
                "date": {
                    "description": "Date is the event time for the given entry. If unset, the event time will be assumed to be now",
                    "type": "string",
                    "example": "2021-07-19T14:05:22.257Z"
                },
                "ean": {
                    "description": "EAN of variant",
                    "type": "string",
                    "example": "7340192703345"
                },
                "externalWarehouseID": {
                    "description": "The externalID of the warehouse",
                    "type": "string",
                    "example": "warehouse1"
                },
                "key": {
                    "description": "Key is reference between Products, Transactions \u0026 Stock levels",
                    "type": "string",
                    "example": "7340192703345"
                },
                "physicalQuantity": {
                    "description": "Physical Quantity in stock",
                    "type": "integer",
                    "example": 30
                },
                "sku": {
                    "description": "SKU of variant. Should be unique per size/variant",
                    "type": "string",
                    "example": "123456-001-43"
                },
                "supplier": {
                    "description": "Name of the supplier",
                    "type": "string",
                    "example": "Acme Enterprises AB"
                }
            }
        },
        "api.KeySwitchRequest": {
            "type": "object",
            "required": [
                "key",
                "oldKey",
                "sku"
            ],
            "properties": {
                "ean": {
                    "description": "EAN of Variant",
                    "type": "string",
                    "example": "7340192703345"
                },
                "info": {
                    "description": "Any info / data needed by the integration (json)",
                    "type": "object"
                },
                "key": {
                    "description": "Updated Key. Usually SKU or EAN but needs to be same on all occurrences",
                    "type": "string",
                    "example": "7340192703345"
                },
                "oldKey": {
                    "description": "Key to update, transaction \u0026 stock tables. Usually SKU or EAN but needs to be same on all occurrences",
                    "type": "string",
                    "example": "7340192703345_old"
                },
                "productGroupID": {
                    "description": "Optional ProductGroupID is used to group products together within Madden",
                    "type": "string",
                    "example": "123456"
                },
                "season": {
                    "description": "Season that the product belongs to",
                    "type": "string",
                    "example": "Spring/Summer"
                },
                "sku": {
                    "description": "Updated SKU",
                    "type": "string",
                    "example": "123456-001-43"
                },
                "variantGroupID": {
                    "description": "Optional VariantGroupID is used to group variants",
                    "type": "string",
                    "example": "123456-001"
                }
            }
        },
        "api.Pricat": {
            "type": "object",
            "properties": {
                "externalId": {
                    "type": "string",
                    "example": "SPRING_2026"
                },
                "name": {
                    "type": "string",
                    "example": "Spring 2026"
                },
                "supplierGln": {
                    "type": "string",
                    "example": "1234567890123"
                },
                "supplierName": {
                    "type": "string",
                    "example": "Acme Supplier"
                }
            }
        },
        "api.PricatBatchRequest": {
            "type": "object",
            "required": [
                "items",
                "pricat"
            ],
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/PricatSku"
                    }
                },
                "pricat": {
                    "$ref": "#/definitions/api.Pricat"
                }
            }
        },
        "api.PriceDeleteRequest": {
            "type": "object",
            "required": [
                "keys",
                "listExternalID"
            ],
            "properties": {
                "keys": {
                    "description": "Keys to delete prices for",
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "example": [
                        "['key1'",
                        "'key2']"
                    ]
                },
                "listExternalID": {
                    "description": "ID of Price list in external platform",
                    "type": "string",
                    "example": "retail_SEK"
                },
                "season": {
                    "description": "Season that the key belong to. Only used for product versioning.",
                    "type": "string",
                    "example": "Spring/Summer"
                }
            }
        },
        "api.PriceList": {
            "type": "object",
            "properties": {
                "currency": {
                    "type": "string",
                    "example": "USD"
                },
                "defaultPriceList": {
                    "type": "boolean",
                    "example": false
                },
                "defaultVat": {
                    "type": "number",
                    "example": 25
                },
                "externalId": {
                    "type": "string",
                    "example": "RETAIL_USD"
                },
                "name": {
                    "type": "string",
                    "example": "Retail USD"
                }
            }
        },
        "api.PriceListUpsert": {
            "type": "object",
            "properties": {
                "currency": {
                    "type": "string",
                    "example": "USD"
                },
                "defaultVat": {
                    "description": "DefaultVat is tri-state: omit it to leave the existing fallback VAT\nunchanged, send null to clear it, or send a number to set it.",
                    "type": "number",
                    "x-nullable": "true",
                    "example": 25
                },
                "externalId": {
                    "type": "string",
                    "example": "RETAIL_USD"
                },
                "name": {
                    "type": "string",
                    "example": "Retail USD"
                }
            }
        },
        "api.PriceResponse": {
            "type": "object",
            "properties": {
                "currency": {
                    "type": "string",
                    "example": "USD"
                },
                "customPrice1": {
                    "type": "number"
                },
                "customPrice2": {
                    "type": "number"
                },
                "customPrice3": {
                    "type": "number"
                },
                "customPrice4": {
                    "type": "number"
                },
                "externalId": {
                    "type": "string",
                    "example": "RETAIL_USD"
                },
                "name": {
                    "type": "string",
                    "example": "Retail USD"
                },
                "price": {
                    "type": "number"
                },
                "vat": {
                    "type": "number"
                }
            }
        },
        "api.PriceUpdateRequest": {
            "type": "object",
            "required": [
                "key",
                "listExternalID"
            ],
            "properties": {
                "customPrice1": {
                    "type": "number"
                },
                "customPrice2": {
                    "type": "number"
                },
                "customPrice3": {
                    "type": "number"
                },
                "customPrice4": {
                    "type": "number"
                },
                "key": {
                    "description": "Key used between products, transaction \u0026 stock tables. Usually SKU or EAN but needs to be same on all occurrences",
                    "type": "string",
                    "example": "7340192703345"
                },
                "listExternalID": {
                    "description": "ID of Price list in external platform",
                    "type": "string",
                    "example": "retail_SEK"
                },
                "price": {
                    "type": "number"
                },
                "season": {
                    "description": "Season that the key belong to. Only used for product versioning.",
                    "type": "string",
                    "example": "Spring/Summer"
                },
                "vat": {
                    "type": "number"
                }
            }
        },
        "api.ProductPrices": {
            "type": "object",
            "properties": {
                "customPrice1": {
                    "type": "number"
                },
                "customPrice2": {
                    "type": "number"
                },
                "customPrice3": {
                    "type": "number"
                },
                "customPrice4": {
                    "type": "number"
                },
                "listExternalID": {
                    "description": "ID of Price list in external platform",
                    "type": "string",
                    "example": "retail_SEK"
                },
                "price": {
                    "type": "number"
                },
                "vat": {
                    "type": "number"
                }
            }
        }
    },
    "securityDefinitions": {
        "Bearer": {
            "type": "apiKey",
            "name": "Authorization",
            "in": "header"
        }
    },
    "security": [
        {
            "Bearer": []
        }
    ]
}