{
  "openapi": "3.1.0",
  "info": {
    "title": "Kash.click Direct API",
    "version": "1.6.0",
    "description": "Kash.click webservices and Partner API v1. The /workers/ business endpoints accept historical keys where documented. Partner API v1 uses managed Bearer keys and the shop_id query parameter. Every new password/OTP or shop-creation credential is a managed kash_ key with all current permissions and no expiration. Administrators can restrict or revoke these keys in Configuration > Webservices > Clés API."
  },
  "servers": [
    {
      "url": "https://kash.click"
    }
  ],
  "components": {
    "schemas": {
      "Email": {
        "type": "string",
        "format": "email"
      },
      "ShopID": {
        "type": "string",
        "minLength": 1
      },
      "APIKEY": {
        "type": "string",
        "pattern": "^(?:[a-f0-9]{32}|[a-f0-9]{40}|kash_[a-f0-9]{64})$",
        "description": "Use a generated managed API key. Existing historical 32/40-character keys remain valid. Every successful password/OTP credential exchange creates a distinct managed key with all 13 current permissions and no expiration, visible and revocable in Configuration > Webservices > Clés API. Creation-session retries recover the same key and do not restore a revoked, deleted or expired key. Manually created keys use the administrator-selected permissions and expiration. Keys are shop-scoped; write permissions include read. Secrets must not be logged."
      },
      "StandardSuccessResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "result": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "result"
        ],
        "additionalProperties": true
      },
      "StandardFailureResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "result": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "result"
        ],
        "additionalProperties": true
      },
      "ShopAvailabilityFailure": {
        "type": "object",
        "required": ["ok", "code", "message"],
        "properties": {
          "ok": {
            "const": false
          },
          "code": {
            "enum": ["shop_closed", "service_unavailable"]
          },
          "message": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "CredentialsSuccessResponse": {
        "type": "object",
        "description": "API credentials only. Browser session cookies are never included in this response. Returns a newly generated managed key with all permissions and no expiration. Previously issued historical keys remain valid.",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "result": {
            "type": "string"
          },
          "APIKEY": {
            "type": "string",
            "pattern": "^kash_[a-f0-9]{64}$",
            "description": "New managed key, all current permissions, no expiration. Store and reuse it for business calls; authenticate again only to issue another key."
          },
          "SHOPID": {
            "$ref": "#/components/schemas/ShopID"
          }
        },
        "required": [
          "success",
          "result",
          "APIKEY",
          "SHOPID"
        ],
        "additionalProperties": true
      },
      "OtpRequestSuccessResponse": {
        "type": "object",
        "required": [
          "success",
          "result",
          "challengeId",
          "expiresIn"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "result": {
            "type": "string",
            "description": "Identical generic confirmation acknowledgement, without account names, identifiers or counts."
          },
          "challengeId": {
            "type": "string",
            "minLength": 32,
            "maxLength": 32,
            "pattern": "^[a-fA-F0-9]{32}$"
          },
          "expiresIn": {
            "type": "integer",
            "const": 600
          }
        },
        "additionalProperties": false
      },
      "IdSuccessResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "result": {
            "type": "string"
          },
          "ID": {
            "type": [
              "string",
              "integer"
            ]
          }
        },
        "required": [
          "success",
          "result",
          "ID"
        ],
        "additionalProperties": true
      },
      "OrderSuccessResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "result": {
            "type": "string"
          },
          "orderID": {
            "type": [
              "string",
              "integer"
            ]
          }
        },
        "required": [
          "success",
          "result",
          "orderID"
        ],
        "additionalProperties": true
      },
      "ClientEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "datecreation": {
            "type": "string"
          },
          "nom": {
            "type": "string"
          },
          "prenom": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "telephone": {
            "type": "string"
          },
          "telephone2": {
            "type": "string"
          },
          "adresseligne1": {
            "type": "string"
          },
          "adresseligne2": {
            "type": "string"
          },
          "commentaireadresse": {
            "type": "string"
          },
          "codepostal": {
            "type": "string"
          },
          "ville": {
            "type": "string"
          },
          "pays": {
            "type": "string"
          },
          "numtva": {
            "type": "string"
          },
          "rcs": {
            "type": "string"
          },
          "pieceID": {
            "type": "string"
          },
          "dateNaissance": {
            "type": "string"
          },
          "blacklist": {
            "type": "string"
          },
          "lat": {
            "type": "string"
          },
          "lng": {
            "type": "string"
          },
          "codeBarre": {
            "type": "string"
          },
          "smsaccord": {
            "type": "string"
          },
          "smsmarketingaccord": {
            "type": "string"
          },
          "emailaccord": {
            "type": "string"
          },
          "emailMarketingaccord": {
            "type": "string"
          },
          "idgroupeclient": {
            "type": "string"
          },
          "codeComptable": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "ItemEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "idinterne": {
            "type": "string"
          },
          "nomlong": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "prixachat": {
            "type": "string"
          },
          "prix": {
            "type": "string"
          },
          "calories": {
            "type": "string"
          },
          "poids": {
            "type": "string"
          },
          "idUnit": {
            "type": "string"
          },
          "idDeclinaison0": {
            "type": "string"
          },
          "idDeclinaison1": {
            "type": "string"
          },
          "idDeclinaison2": {
            "type": "string"
          },
          "idDeclinaison3": {
            "type": "string"
          },
          "idDeclinaison4": {
            "type": "string"
          },
          "idrayon": {
            "type": "string"
          },
          "idfournisseur": {
            "type": "string"
          },
          "idtauxtva": {
            "type": "string"
          },
          "idtauxtvaeatin": {
            "type": "string"
          },
          "idreduction": {
            "type": "string"
          },
          "codeBarre": {
            "type": "string"
          },
          "quantiteDispo": {
            "type": "string"
          },
          "alerteqte": {
            "type": "string"
          },
          "dateConsommation": {
            "type": "string"
          },
          "shopHide": {
            "type": "string"
          },
          "masquerClavier": {
            "type": "string"
          },
          "needPrepa": {
            "type": "string"
          },
          "dureePrepa": {
            "type": "string"
          },
          "codeactivite": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "DepartmentEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "nomlong": {
            "type": "string"
          },
          "idDeclinaison0": {
            "type": "string"
          },
          "idDeclinaison1": {
            "type": "string"
          },
          "idDeclinaison2": {
            "type": "string"
          },
          "idDeclinaison3": {
            "type": "string"
          },
          "idDeclinaison4": {
            "type": "string"
          },
          "idtauxtva": {
            "type": "string"
          },
          "idtauxtvaeatin": {
            "type": "string"
          },
          "idreduction": {
            "type": "string"
          },
          "idgrouperayon": {
            "type": "string"
          },
          "idfournisseur": {
            "type": "string"
          },
          "shopHide": {
            "type": "string"
          },
          "quantiteDispo": {
            "type": "string"
          },
          "preparationRayon": {
            "type": "string"
          },
          "codeactivite": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "nomlong"
        ],
        "additionalProperties": true
      },
      "VatEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "nomlong": {
            "type": "string"
          },
          "taux": {
            "type": "string"
          },
          "legal": {
            "type": "string"
          },
          "chapitrecomptable": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "nomlong",
          "taux"
        ],
        "additionalProperties": true
      },
      "PaymentModeEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "nomlong": {
            "type": "string"
          },
          "typeDeModesPaiement": {
            "type": "string"
          },
          "droits": {
            "type": "string"
          },
          "Position": {
            "type": "string"
          },
          "chapitrecomptable": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "nomlong"
        ],
        "additionalProperties": true
      },
      "ClientsResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ClientEntry"
        }
      },
      "ItemsResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ItemEntry"
        }
      },
      "DepartmentsResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/DepartmentEntry"
        }
      },
      "VatsResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/VatEntry"
        }
      },
      "PaymentModesResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/PaymentModeEntry"
        }
      },
      "MailboxError": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "result": {
            "type": "string",
            "description": "Human message translated with showTradRAW in the shop language when authenticated."
          },
          "error_code": {
            "type": "string",
            "enum": [
              "invalid_parameter",
              "invalid_json",
              "conflicting_parameters",
              "authentication_failed",
              "not_found",
              "method_not_allowed",
              "request_too_large",
              "unsupported_media_type",
              "migration_required",
              "sending_disabled",
              "mailbox_unavailable",
              "endpoint_not_found"
            ]
          }
        },
        "required": [
          "success",
          "result",
          "error_code"
        ]
      },
      "MailboxAttachment": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "content_type": {
            "type": "string"
          },
          "content_length": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "content_id": {
            "type": "string"
          },
          "available": {
            "type": "boolean"
          },
          "download_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Relative URL without credentials. Add shopID and key to download; unavailable legacy files have no URL."
          }
        },
        "required": [
          "id",
          "name",
          "available",
          "download_url"
        ]
      },
      "MailboxInboxMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "message_id": {
            "type": "string"
          },
          "from_email": {
            "type": "string"
          },
          "from_name": {
            "type": "string"
          },
          "to_email": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "box": {
            "type": "string",
            "const": "inbox"
          },
          "received_at": {
            "type": "string"
          },
          "read": {
            "type": "boolean"
          },
          "replied": {
            "type": "boolean"
          },
          "read_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "folder_id": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "folder_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "replied_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "reply_source": {
            "type": "string"
          },
          "reply_outbox_id": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          }
        },
        "required": [
          "id",
          "box",
          "subject",
          "read",
          "replied"
        ]
      },
      "MailboxSentMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "message_id": {
            "type": "string"
          },
          "from_email": {
            "type": "string"
          },
          "from_name": {
            "type": "string"
          },
          "to_email": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "box": {
            "type": "string",
            "const": "sent"
          },
          "created_at": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "sending",
              "sent",
              "delivered",
              "failed",
              "bounced",
              "spam_complaint"
            ]
          },
          "status_label": {
            "type": "string",
            "description": "Translated display label; status remains the stable machine code."
          },
          "error_code": {
            "type": "string"
          },
          "error_reason": {
            "type": "string"
          },
          "delivered_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "failed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "status_at": {
            "type": "string"
          },
          "reply_inbound_id": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "postmark_message_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "delivery_confirmed": {
            "type": "boolean",
            "description": "True only for status=delivered. SMTP acceptance is not delivery."
          },
          "tracking": {
            "$ref": "#/components/schemas/MailboxTracking"
          }
        },
        "required": [
          "id",
          "box",
          "status",
          "delivery_confirmed"
        ]
      },
      "MailboxTracking": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean",
            "description": "False until the additive tracking migration is installed."
          },
          "track_opens": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether open tracking was explicitly requested for this message; null for older messages."
          },
          "track_links": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "HtmlAndText",
              null
            ]
          },
          "open_count": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of distinct detected events received by webhook, not proof of human reading."
          },
          "click_count": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of distinct detected events received by webhook, not proof of human reading."
          },
          "event_count": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of distinct message-linked Postmark events."
          },
          "first_open_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "UTC timestamp."
          },
          "last_open_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "UTC timestamp."
          },
          "first_click_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "UTC timestamp."
          },
          "last_click_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "UTC timestamp."
          },
          "last_event_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "UTC timestamp."
          },
          "recipient_state": {
            "type": [
              "object",
              "null"
            ],
            "description": "Current recipient state in the same Postmark server and stream. Suppression does not reclassify message delivery.",
            "properties": {
              "suppressed": {
                "type": "boolean"
              },
              "reason": {
                "type": "string"
              },
              "origin": {
                "type": "string"
              },
              "changed_at": {
                "type": "string"
              }
            },
            "required": [
              "suppressed",
              "reason",
              "origin",
              "changed_at"
            ]
          }
        },
        "required": [
          "available",
          "track_opens",
          "track_links",
          "open_count",
          "click_count",
          "event_count",
          "first_open_at",
          "last_open_at",
          "first_click_at",
          "last_click_at",
          "last_event_at",
          "recipient_state"
        ]
      },
      "MailboxMessageSummary": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/MailboxInboxMessage"
          },
          {
            "$ref": "#/components/schemas/MailboxSentMessage"
          }
        ]
      },
      "MailboxMessageDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MailboxMessageSummary"
          },
          {
            "type": "object",
            "properties": {
              "text_body": {
                "type": "string"
              },
              "html_body": {
                "type": "string",
                "description": "Stored HTML. Render in a sandboxed iframe with CSP; do not insert into the host DOM."
              },
              "reply_to": {
                "type": "string"
              },
              "attachments": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MailboxAttachment"
                }
              }
            },
            "required": [
              "text_body",
              "html_body",
              "attachments"
            ]
          }
        ]
      },
      "MailboxMessageResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "result": {
            "type": "string",
            "const": "OK"
          },
          "message": {
            "$ref": "#/components/schemas/MailboxMessageDetail"
          }
        },
        "required": [
          "success",
          "result",
          "message"
        ]
      },
      "MailboxListResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "result": {
            "type": "string",
            "const": "OK"
          },
          "box": {
            "type": "string",
            "enum": [
              "inbox",
              "sent"
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MailboxMessageSummary"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "per_page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "pages": {
            "type": "integer",
            "minimum": 0
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "result",
          "box",
          "messages",
          "total",
          "page",
          "per_page",
          "pages",
          "has_more"
        ]
      },
      "MailboxResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "result": {
            "type": "string",
            "const": "OK"
          },
          "mailbox": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string"
              },
              "sender_address": {
                "type": "string"
              },
              "sending_enabled": {
                "type": "boolean"
              },
              "all": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "unread": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "total",
                  "unread"
                ]
              },
              "inbox": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "unread": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "total",
                  "unread"
                ]
              },
              "sent": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "statuses": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                },
                "required": [
                  "total",
                  "statuses"
                ]
              }
            },
            "required": [
              "address",
              "sender_address",
              "sending_enabled",
              "all",
              "inbox",
              "sent"
            ]
          }
        },
        "required": [
          "success",
          "result",
          "mailbox"
        ]
      },
      "MailboxFoldersResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "result": {
            "type": "string",
            "const": "OK"
          },
          "folders": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "minimum": 1
                },
                "name": {
                  "type": "string"
                },
                "total": {
                  "type": "integer"
                },
                "unread": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "name",
                "total",
                "unread"
              ]
            }
          },
          "all": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "unread": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "total",
              "unread"
            ]
          },
          "inbox": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "unread": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "total",
              "unread"
            ]
          }
        },
        "required": [
          "success",
          "result",
          "folders",
          "all",
          "inbox"
        ]
      },
      "MailboxSendResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "result": {
            "type": "string",
            "const": "OK"
          },
          "message": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MailboxMessageDetail"
              },
              {
                "type": "null"
              }
            ]
          },
          "accepted": {
            "type": "boolean",
            "description": "Transport acceptance only. An archived rejection returns false and the failed message with its reason."
          },
          "duplicate": {
            "type": "boolean",
            "description": "Same request_key returns the first attempt without sending again."
          },
          "simulated": {
            "type": "boolean",
            "description": "True for test shops intercepted before real dispatch."
          }
        },
        "required": [
          "success",
          "result",
          "message",
          "accepted",
          "duplicate",
          "simulated"
        ]
      },
      "MailboxFolderMutationResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "result": {
            "type": "string",
            "const": "OK"
          },
          "folder_id": {
            "type": "integer",
            "minimum": 1
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "result",
          "folder_id",
          "message"
        ]
      },
      "MailboxMoveResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "result": {
            "type": "string",
            "const": "OK"
          },
          "message_id": {
            "type": "integer",
            "minimum": 1
          },
          "folder_id": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "result",
          "message_id",
          "folder_id",
          "message"
        ]
      },
      "MailboxEditResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "result": {
            "type": "string",
            "const": "OK"
          },
          "message": {
            "$ref": "#/components/schemas/MailboxInboxMessage"
          }
        },
        "required": [
          "success",
          "result",
          "message"
        ]
      },
      "MailboxSearchResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "result": {
            "type": "string",
            "const": "OK"
          },
          "customers": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "minimum": 1
                },
                "label": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "label",
                "email"
              ]
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "minimum_length": {
            "type": "integer",
            "const": 2
          }
        },
        "required": [
          "success",
          "result",
          "customers",
          "has_more",
          "minimum_length"
        ]
      },
      "MailboxCustomerResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "result": {
            "type": "string",
            "const": "OK"
          },
          "email": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "matched",
              "ambiguous",
              "none"
            ]
          },
          "matches": {
            "type": "array",
            "maxItems": 6,
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "minimum": 1
                },
                "nom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "prenom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": []
            }
          },
          "customer": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "nom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "prenom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "telephone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "telephone2": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "adresseligne1": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "adresseligne2": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "codepostal": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "ville": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "pays": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "datecreation": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "notesperso": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "notespubliques": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "nombrecommandes": {
                    "type": [
                      "number",
                      "string",
                      "null"
                    ],
                    "description": "Legacy SQL numeric value; may be a decimal string."
                  },
                  "totalpaiement": {
                    "type": [
                      "number",
                      "string",
                      "null"
                    ],
                    "description": "Legacy SQL numeric value; may be a decimal string."
                  },
                  "pointsfidelite": {
                    "type": [
                      "number",
                      "string",
                      "null"
                    ],
                    "description": "Legacy SQL numeric value; may be a decimal string."
                  },
                  "avoir": {
                    "type": [
                      "number",
                      "string",
                      "null"
                    ],
                    "description": "Legacy SQL numeric value; may be a decimal string."
                  },
                  "preferred_days": {
                    "type": "array",
                    "minItems": 7,
                    "maxItems": 7,
                    "items": {
                      "type": "object",
                      "properties": {
                        "day": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 6
                        },
                        "orders": {
                          "type": "integer"
                        },
                        "share": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "day",
                        "orders",
                        "share"
                      ]
                    }
                  }
                },
                "required": []
              },
              {
                "type": "null"
              }
            ]
          },
          "latest_order": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "idinterne": {
                    "type": [
                      "integer",
                      "string"
                    ]
                  },
                  "datecreation": {
                    "type": "string"
                  },
                  "prixfinal": {
                    "type": [
                      "number",
                      "string"
                    ]
                  },
                  "archive": {
                    "type": "boolean"
                  }
                },
                "required": []
              },
              {
                "type": "null"
              }
            ]
          },
          "display_order": {
            "$ref": "#/components/schemas/MailboxCustomerResponse/properties/latest_order",
            "description": "Order or quote referenced in the selected email, otherwise the latest validated order. Facture/Invoice attachments refer to idinterne; Devis/Quote attachments refer to primary id. References are scoped to the recognised customer and shop."
          },
          "display_order_source": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "message",
              "latest",
              null
            ],
            "description": "message for a valid email order reference, latest for fallback, null when no order is available."
          },
          "currency": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "symbol": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "symbol"
            ]
          },
          "preferred": {
            "type": "object",
            "properties": {
              "days": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 6
                }
              },
              "share": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "sample": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "days",
              "share",
              "sample"
            ]
          }
        },
        "required": [
          "success",
          "result",
          "email",
          "status",
          "matches",
          "customer",
          "latest_order",
          "currency",
          "preferred"
        ]
      },
      "LegacyEmailAuthError": {
        "type": "object",
        "required": [
          "success",
          "code",
          "result"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "code": {
            "type": "string"
          },
          "result": {
            "type": "string",
            "description": "Fixed public message; request parameters and exception details are never echoed."
          }
        },
        "additionalProperties": false
      },
      "LegacyEmailGuardError": {
        "type": "object",
        "required": [
          "success",
          "error",
          "message"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "string",
            "enum": [
              "api_admin_required",
              "account_unavailable",
              "identity_interactive_required",
              "mfa_interactive_required",
              "service_unavailable"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "Authorization, identity or MFA guard response shared by legacy password/OTP exchanges. A profile must currently be an administrator of the selected shop. Email/password verification never grants administrator rights or replaces the identity or second factor. api_admin_required uses HTTP 403; contact an administrator to create a dedicated API key."
      },
      "LegacyEmailAccount": {
        "type": "object",
        "required": [
          "accountID",
          "accountTitle"
        ],
        "properties": {
          "accountID": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,18}$",
            "description": "Historical profile identifier, not a shop identifier."
          },
          "accountTitle": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "LegacyEmailAccountsResponse": {
        "type": "object",
        "required": [
          "success",
          "accounts",
          "emailProof",
          "expiresIn"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LegacyEmailAccount"
            },
            "maxItems": 100,
            "description": "Only profiles associated with the confirmed current email and the original optional account scope. Empty when none exist."
          },
          "emailProof": {
            "type": "string",
            "minLength": 64,
            "maxLength": 64,
            "pattern": "^[a-fA-F0-9]{64}$",
            "writeOnly": false,
            "description": "Short email-confirmation proof, valid for at most five minutes. Send only in a POST body. It is consumed once when credentials are issued."
          },
          "expiresIn": {
            "type": "integer",
            "minimum": 0,
            "maximum": 300,
            "description": "Remaining proof lifetime; listing does not extend it."
          }
        },
        "additionalProperties": false
      },
      "LegacyEmailSelectionResponse": {
        "type": "object",
        "required": [
          "success",
          "code",
          "result",
          "accounts",
          "emailProof",
          "expiresIn"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LegacyEmailAccount"
            },
            "maxItems": 100,
            "description": "Only profiles associated with the confirmed current email and the original optional account scope. Empty when none exist."
          },
          "emailProof": {
            "type": "string",
            "minLength": 64,
            "maxLength": 64,
            "pattern": "^[a-fA-F0-9]{64}$",
            "writeOnly": false,
            "description": "Short email-confirmation proof, valid for at most five minutes. Send only in a POST body. It is consumed once when credentials are issued."
          },
          "expiresIn": {
            "type": "integer",
            "minimum": 0,
            "maximum": 300,
            "description": "Remaining proof lifetime; listing does not extend it."
          },
          "code": {
            "type": "string",
            "const": "account_selection_required"
          },
          "result": {
            "type": "string",
            "const": "Select an account to continue."
          }
        },
        "additionalProperties": false
      },
      "LegacyEmailCredentialsResponse": {
        "type": "object",
        "required": [
          "success",
          "result",
          "APIKEY",
          "SHOPID"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "result": {
            "type": "string",
            "const": "Here are your credentials"
          },
          "APIKEY": {
            "type": "string",
            "pattern": "^kash_[a-f0-9]{64}$",
            "description": "New managed key, all current permissions, no expiration. Store and reuse it for business calls; authenticate again only to issue another key."
          },
          "SHOPID": {
            "$ref": "#/components/schemas/ShopID"
          }
        },
        "additionalProperties": false,
        "description": "API credentials only. No browser COOKIE, identity session or Google credential is returned. Returns a newly generated managed key with all permissions and no expiration. Previously issued historical keys remain valid."
      },
      "LegacyPasswordCredentialsResponse": {
        "type": "object",
        "required": [
          "result",
          "APIKEY",
          "SHOPID"
        ],
        "properties": {
          "result": {
            "type": "string",
            "const": "OK"
          },
          "APIKEY": {
            "type": "string",
            "pattern": "^kash_[a-f0-9]{64}$",
            "description": "New managed key, all current permissions, no expiration. Store and reuse it for business calls; authenticate again only to issue another key."
          },
          "SHOPID": {
            "$ref": "#/components/schemas/ShopID"
          }
        },
        "additionalProperties": false,
        "description": "Historical getAuthToken.php success for an authorized active administrator. This endpoint does not add a success field or return a browser cookie. Returns a newly generated managed key with all permissions and no expiration. Previously issued historical keys remain valid."
      },
      "CreateShopRequest": {
        "type": "object",
        "required": [
          "action"
        ],
        "additionalProperties": false,
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "bootstrap",
              "email_start",
              "email_poll",
              "mfa_verify",
              "company_lookup",
              "company_back",
              "create",
              "cancel"
            ],
            "description": "Use one server-side HTTP session cookie jar for a complete creation. Start with bootstrap, confirm email, finish MFA when requested, identify the establishment, then create. Never automatically fall back to the legacy API."
          },
          "csrf": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "Required for every action except bootstrap. Echo the latest returned csrf; also retain all session Set-Cookie updates."
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Required by email_start. The owner must explicitly confirm the emailed link (10 minutes); the application never receives that link or the identity token."
          },
          "code": {
            "type": "string",
            "maxLength": 600,
            "description": "Authenticator or recovery code supplied by the owner for mfa_verify when state=mfa."
          },
          "identifier": {
            "type": "string",
            "maxLength": 32,
            "description": "French SIRET or SIREN for company_lookup. If companyChoices is returned, repeat with the chosen SIRET."
          },
          "test": {
            "type": "string",
            "enum": [
              "0",
              "1"
            ],
            "description": "company_lookup: 1 to request a standalone test shop without a SIRET."
          },
          "foreign": {
            "type": "string",
            "enum": [
              "0",
              "1"
            ],
            "description": "company_lookup: 1 for an establishment outside France."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60,
            "description": "Required by create: establishment name confirmed by the owner."
          },
          "preset": {
            "type": "string",
            "maxLength": 100,
            "description": "Required by create. Use an id from the returned presets (default for the standard template)."
          },
          "referral": {
            "type": "string",
            "maxLength": 100,
            "description": "Optional referral code."
          },
          "country": {
            "type": "string",
            "pattern": "^[A-Z]{2}$",
            "description": "For a foreign establishment, choose a returned country code other than FR."
          },
          "registration": {
            "type": "string",
            "maxLength": 80,
            "description": "Optional foreign establishment registration."
          }
        }
      },
      "CreateShopResponse": {
        "type": "object",
        "required": [
          "ok",
          "success",
          "apiVersion",
          "state",
          "csrf"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "success": {
            "type": "boolean",
            "const": true
          },
          "apiVersion": {
            "type": "integer",
            "const": 2
          },
          "state": {
            "type": "string",
            "enum": [
              "email_required",
              "waiting",
              "mfa",
              "shop_identifier",
              "shop_details",
              "complete"
            ]
          },
          "csrf": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "waiting": {
            "type": "object",
            "properties": {
              "expires_at": {
                "type": "integer",
                "description": "Unix epoch milliseconds for link expiry."
              },
              "poll_after_ms": {
                "type": "integer",
                "const": 2500
              }
            }
          },
          "context": {
            "type": "object",
            "description": "Prepared establishment information, including company details after lookup.",
            "additionalProperties": true
          },
          "presets": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "label"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                }
              }
            }
          },
          "countries": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "label"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                }
              }
            }
          },
          "companyChoices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "address": {
                  "type": "string"
                }
              }
            }
          },
          "messageKey": {
            "type": "string"
          },
          "remaining": {
            "type": "integer"
          },
          "result": {
            "type": "string"
          },
          "SHOPID": {
            "$ref": "#/components/schemas/ShopID"
          },
          "APIKEY": {
            "type": "string",
            "pattern": "^kash_[a-f0-9]{64}$",
            "description": "New managed key, all current permissions, no expiration. Store and reuse it for business calls; authenticate again only to issue another key."
          },
          "test": {
            "type": "boolean"
          },
          "created": {
            "type": "boolean",
            "description": "True on the first credential response for a newly created shop; false on retries."
          }
        },
        "description": "SHOPID and APIKEY are returned only for state=complete, after verified email, required MFA, initialization and attachment to the identity. A separate session is required for each new creation. The creation session expires 30 minutes after email proof. Retry bootstrap/create within the same session to recover the same shop; creation_pending requires review. The managed key has all current permissions and no expiration. Retries reuse it; revocation, deletion or expiration is respected and never silently undone."
      },
      "CreateShopError": {
        "type": "object",
        "required": [
          "ok",
          "success",
          "apiVersion",
          "code",
          "message"
        ],
        "additionalProperties": false,
        "properties": {
          "ok": {
            "type": "boolean",
            "const": false
          },
          "success": {
            "type": "boolean",
            "const": false
          },
          "apiVersion": {
            "type": "integer",
            "const": 2
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "csrf": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        }
      },
      "CollaboratorMutation": {
        "type": "object",
        "properties": {
          "success": {
            "const": true
          },
          "result": {
            "const": "OK"
          },
          "ID": {
            "type": "integer"
          },
          "state": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "invitationID": {
            "type": "string"
          },
          "delivery": {
            "type": "string",
            "enum": [
              "sent",
              "pending",
              "failed"
            ]
          }
        },
        "additionalProperties": false
      },
      "WebhookEventSelection": {
        "description": "Event names from the live catalogue returned in the events map by GET /workers/getWebhooks.php. Use * (historical alias: all) for all emitted events. Existing filters can retain names outside the catalogue. invoice.created, invoice.paid, appointment.created and appointment.cancelled have no active emitter.",
        "oneOf": [
          {
            "type": "string",
            "description": "Comma-separated event names.",
            "examples": ["sale.created,sale.paid"]
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [["sale.created", "sale.paid"]]
          }
        ]
      },
      "WebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "description": "Stored subscription filters. The wildcard is returned as *. The live catalogue of enabled event types is returned separately by getWebhooks.",
            "items": {
              "type": "string"
            }
          },
          "active": {
            "type": "integer"
          },
          "hasSecret": {
            "type": "integer"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_success_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_failure_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "ManagedBearer": {
        "$ref": "./openapi-partner-async.json#/components/securitySchemes/ManagedBearer"
      },
      "BrowserSession": {
        "type": "apiKey",
        "in": "cookie",
        "name": "utilisateur_id_ck",
        "description": "Current guarded administrator browser session; never an integration API key. Identity/session and selected-profile context guards remain mandatory."
      }
    }
  },
  "paths": {
    "/api/partner/v1/exports": {
      "$ref": "./openapi-partner-async.json#/paths/~1api~1partner~1v1~1exports"
    },
    "/api/partner/v1/imports": {
      "$ref": "./openapi-partner-async.json#/paths/~1api~1partner~1v1~1imports"
    },
    "/api/partner/v1/operations/{id}": {
      "$ref": "./openapi-partner-async.json#/paths/~1api~1partner~1v1~1operations~1%7Bid%7D"
    },
    "/api/partner/v1/operations/{id}/confirm": {
      "$ref": "./openapi-partner-async.json#/paths/~1api~1partner~1v1~1operations~1%7Bid%7D~1confirm"
    },
    "/api/partner/v1/operations/{id}/result": {
      "$ref": "./openapi-partner-async.json#/paths/~1api~1partner~1v1~1operations~1%7Bid%7D~1result"
    },
    "/api/partner/v1/cart-quotes": {
      "$ref": "./openapi-partner-v1-cart-quotes.json#/paths/~1cart-quotes"
    },
    "/api/partner/v1/reports/sales-summary": {
      "$ref": "./openapi-partner-v1-reads.json#/paths/~1reports~1sales-summary"
    },
    "/api/partner/v1/invoices/{id}/documents": {
      "$ref": "./openapi-partner-v1-reads.json#/paths/~1invoices~1%7Bid%7D~1documents"
    },
    "/api/partner/v1/invoices/{id}/documents/{document_id}": {
      "$ref": "./openapi-partner-v1-reads.json#/paths/~1invoices~1%7Bid%7D~1documents~1%7Bdocument_id%7D"
    },
    "/api/partner/v1/cash-sessions": {
      "$ref": "./openapi-partner-finance.json#/paths/~1cash-sessions"
    },
    "/api/partner/v1/reconciliation": {
      "$ref": "./openapi-partner-finance.json#/paths/~1reconciliation"
    },
    "/api/partner/v1/orders/{order_id}": {
      "$ref": "./openapi-partner-order-lifecycle.json#/paths/~1orders~1%7Border_id%7D"
    },
    "/api/partner/v1/orders/by-external-reference": {
      "$ref": "./openapi-partner-order-lifecycle.json#/paths/~1orders~1by-external-reference"
    },
    "/api/partner/v1/orders/{order_id}/transitions/{action}": {
      "$ref": "./openapi-partner-order-lifecycle.json#/paths/~1orders~1%7Border_id%7D~1transitions~1%7Baction%7D"
    },
    "/api/partner/v1/orders/{order_id}/external-references": {
      "$ref": "./openapi-partner-order-lifecycle.json#/paths/~1orders~1%7Border_id%7D~1external-references"
    },
    "/api/partner/v1/orders": {
      "$ref": "./openapi-partner-v1.json#/paths/~1orders"
    },
    "/api/partner/v1/products": {
      "$ref": "./openapi-partner-v1.json#/paths/~1products"
    },
    "/api/partner/v1/changes": {
      "$ref": "./openapi-partner-v1.json#/paths/~1changes"
    },
    "/api/partner/v1/day-closings": {
      "$ref": "./openapi-partner-v1.json#/paths/~1day-closings"
    },
    "/api/partner/v1/day-closings/{id}": {
      "$ref": "./openapi-partner-v1.json#/paths/~1day-closings~1%7Bid%7D"
    },
    "/api/partner/v1/loyalty/program": {
      "$ref": "./openapi-partner-loyalty.json#/paths/~1loyalty~1program"
    },
    "/api/partner/v1/loyalty/customers/{customer_id}": {
      "$ref": "./openapi-partner-loyalty.json#/paths/~1loyalty~1customers~1%7Bcustomer_id%7D"
    },
    "/api/partner/v1/loyalty/customers/{customer_id}/movements": {
      "$ref": "./openapi-partner-loyalty.json#/paths/~1loyalty~1customers~1%7Bcustomer_id%7D~1movements"
    },
    "/api/partner/v1/loyalty/quotes": {
      "$ref": "./openapi-partner-loyalty.json#/paths/~1loyalty~1quotes"
    },
    "/api/partner/v1/gift-cards/check": {
      "$ref": "./openapi-partner-gift-cards.json#/paths/~1gift-cards~1check"
    },
    "/api/partner/v1/gift-cards/movements": {
      "$ref": "./openapi-partner-gift-cards.json#/paths/~1gift-cards~1movements"
    },
    "/api/partner/v1/coupons/check": {
      "$ref": "./openapi-partner-coupons.json#/paths/~1coupons~1check"
    },
    "/api/partner/v1/coupons": {
      "$ref": "./openapi-partner-coupons.json#/paths/~1coupons"
    },
    "/api/partner/v1/personal-vouchers/customers/{customer_id}": {
      "$ref": "./openapi-partner-personal-vouchers.json#/paths/~1personal-vouchers~1customers~1%7Bcustomer_id%7D"
    },
    "/api/partner/v1/personal-vouchers/quotes": {
      "$ref": "./openapi-partner-personal-vouchers.json#/paths/~1personal-vouchers~1quotes"
    },
    "/api/partner/v1/customers": {
      "$ref": "./openapi-partner-v1-reference-lists.json#/paths/~1customers"
    },
    "/api/partner/v1/departments": {
      "$ref": "./openapi-partner-v1-reference-lists.json#/paths/~1departments"
    },
    "/api/partner/v1/vat-rates": {
      "$ref": "./openapi-partner-v1-reference-lists.json#/paths/~1vat-rates"
    },
    "/api/partner/v1/payment-methods": {
      "$ref": "./openapi-partner-v1-reference-lists.json#/paths/~1payment-methods"
    },
    "/api/partner/v1/department-groups": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1department-groups"
    },
    "/api/partner/v1/product-variants": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1product-variants"
    },
    "/api/partner/v1/discounts": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1discounts"
    },
    "/api/partner/v1/users": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1users"
    },
    "/api/partner/v1/cash-registers": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1cash-registers"
    },
    "/api/partner/v1/tables": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1tables"
    },
    "/api/partner/v1/delivery-methods": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1delivery-methods"
    },
    "/api/partner/v1/delivery-zones": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1delivery-zones"
    },
    "/api/partner/v1/pickup-points": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1pickup-points"
    },
    "/api/partner/v1/shop-settings": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1shop-settings"
    },
    "/api/partner/v1/orders/pending": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1orders~1pending"
    },
    "/api/partner/v1/orders/contents": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1orders~1contents"
    },
    "/api/partner/v1/reports/sales": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1reports~1sales"
    },
    "/api/partner/v1/mailbox": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1mailbox"
    },
    "/api/partner/v1/mailbox/messages": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1mailbox~1messages"
    },
    "/api/partner/v1/mailbox/message": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1mailbox~1message"
    },
    "/api/partner/v1/mailbox/replies": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1mailbox~1replies"
    },
    "/api/partner/v1/mailbox/attachment": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1mailbox~1attachment"
    },
    "/api/partner/v1/mailbox/folders": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1mailbox~1folders"
    },
    "/api/partner/v1/mailbox/customers/search": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1mailbox~1customers~1search"
    },
    "/api/partner/v1/mailbox/customer": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1mailbox~1customer"
    },
    "/api/partner/v1/webhooks": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1webhooks"
    },
    "/api/partner/v1/webhook-deliveries": {
      "$ref": "./openapi-partner-v1-additional-reads.json#/paths/~1webhook-deliveries"
    },
    "/workers/createShop.php": {
      "post": {
        "operationId": "createShopAccount",
        "summary": "Create and initialize a shop with verified identity (API v2)",
        "description": "Recommended creation API for new integrations. Call from your server over HTTPS. Keep a private HTTP session cookie jar and echo csrf between actions. The owner confirms a dedicated email describing creation and API-key issuance, then completes MFA if required. Lookup SIRET/SIREN, standalone test or foreign establishment; confirm name/template and create. The shared identity flow initializes and attaches the shop before issuing its API credentials. Complete advanced settings with /workers/editShop.php. Human documentation: /logiciel-de-caisse-enregistreuse/api_create_account/. The footer links to the retained legacy documentation. Issues a managed key with all permissions and no expiration. Retry bootstrap/create in the same session to recover that key; a revoked/deleted/expired key produces api_key_unavailable (403).",
        "security": [],
        "parameters": [
          {
            "name": "X-Kash-Auth-Request",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "1"
            }
          },
          {
            "name": "PHPSESSID",
            "in": "cookie",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Session cookie issued by bootstrap; required for subsequent actions. Honor every Set-Cookie update."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreateShopRequest"
              },
              "examples": {
                "bootstrap": {
                  "value": {
                    "action": "bootstrap"
                  }
                },
                "email": {
                  "value": {
                    "action": "email_start",
                    "csrf": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "email": "owner@example.com"
                  }
                },
                "testLookup": {
                  "value": {
                    "action": "company_lookup",
                    "csrf": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "test": "1"
                  }
                },
                "create": {
                  "value": {
                    "action": "create",
                    "csrf": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "name": "My shop",
                    "preset": "default"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current creation state; credentials only at state=complete.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                },
                "description": "Preserve the PHP session cookie, including its rotation after proof. Use a private cookie jar per creation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateShopResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, shop details or template. Correct the input.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateShopError"
                }
              }
            }
          },
          "401": {
            "description": "Identity/session/link expired or invalid. Retain the attempt and inspect its state before starting another.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateShopError"
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF, email/MFA proof missing, access revoked or API access disabled.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateShopError"
                }
              }
            }
          },
          "405": {
            "description": "POST is required.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateShopError"
                }
              }
            }
          },
          "409": {
            "description": "Creation busy, interrupted, conflicting or already started. Keep the same session; creation_pending requires review.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateShopError"
                }
              }
            }
          },
          "415": {
            "description": "Use application/x-www-form-urlencoded.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateShopError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. Back off; do not start another creation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateShopError"
                }
              }
            }
          },
          "503": {
            "description": "Identity, mail or initialization unavailable, feature disabled or migration required. Do not fall back automatically.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateShopError"
                }
              }
            }
          }
        }
      }
    },
    "/workers/getOTPForAccount.php": {
      "post": {
        "operationId": "requestAccountOtp",
        "summary": "Request email confirmation before discovering API accounts",
        "description": "Sends one cryptographically generated six-digit code to a valid email address without first querying accounts. The acknowledgement and email are independent of whether a profile exists. Optional accountID limits subsequent access to that profile. Code lifetime: 600 seconds; at most five attempts. Sending limits: 60-second email cooldown, 5/hour and 20/day per email, 20/hour and 100/day per REMOTE_ADDR IP, and 200 sends per ten minutes globally. POST form bodies only; GET links are no longer accepted. Codes/proofs must not be put in URLs or logs, and incoming cookies do not authenticate this flow. Old APIlogin codes are ignored. The main browser sign-in and already-issued service keys are unchanged.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "$ref": "#/components/schemas/Email",
                    "maxLength": 254,
                    "description": "Valid email address, at most 254 bytes; normalized to lowercase for confirmation."
                  },
                  "accountID": {
                    "type": "string",
                    "pattern": "^[1-9][0-9]{0,18}$",
                    "description": "Historical profile identifier, not a shop identifier."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Generic confirmation acknowledgement; it does not expose whether accounts exist.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OtpRequestSuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid_email or invalid_request; form values must be bounded strings.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailAuthError"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed; use POST.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailAuthError"
                }
              }
            }
          },
          "409": {
            "description": "auth_busy; another short confirmation operation is running.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailAuthError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; respect email, IP, global sending limits and the resend cooldown.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailAuthError"
                }
              }
            }
          },
          "503": {
            "description": "migration_required or service_unavailable; no legacy fallback is performed.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailAuthError"
                }
              }
            }
          }
        }
      }
    },
    "/workers/getAuthToken.php": {
      "post": {
        "operationId": "authenticateWithLegacyLogin",
        "summary": "Exchange an active administrator legacy login and password for shop API credentials",
        "description": "Compatibility endpoint. Prefer a dedicated key created by an administrator in Configuration > Webservices > Clés API; share that integration key rather than a person password. POST a legacy profile login and password. The current SQL profile must have droits=admin and belong to this shop; this is required even when identity authentication is disabled or a historical profile has no access-registry entry. The role and access state are checked again after identity/MFA checks and before key delivery or PrestaShop settings changes. Non-administrators receive 403 api_admin_required. Identity/MFA protection, accepted invitation, active access, open establishment and enabled webservices remain mandatory. An MFA-protected administrator signs in interactively and creates a dedicated key. If moduleKey is supplied, the optional PrestaShop configuration update is allowed only after administrator authorization. Eligible administrators keep the APIKEY/SHOPID success contract; Each successful exchange creates a new managed key with all current permissions and no expiration. Existing browser sessions and already-issued service keys are not revoked. Legacy authentication failures and disabled webservices still use the historical HTTP 200 failure body; clients must inspect the JSON response. Never put passwords or keys in a URL or log. Both password endpoints share persistent SQL quotas: 10 attempts per equivalent login per fixed 15-minute UTC window, 30 per IP per 15 minutes, 200 per IP per UTC day, and 600 globally per minute. Successful attempts also consume quotas; success never resets counters. A quota refusal occurs before password verification, remote identity/MFA calls, key delivery or optional integration updates. HTTP 429 returns success:false, error:rate_limited, message and Retry-After seconds. Switching endpoint, PHP process, browser session or client-supplied forwarded headers cannot reset the shared quota. IPv4-mapped IPv6 addresses share the IPv4 bucket; IPv6 addresses in one /64 share their IP bucket. Apply the additive auth_legacy_password_limits SQL migration before the PHP update. Missing migration returns 503 migration_required; unavailable configuration, database or SQL comparison support returns 503 service_unavailable, with no unthrottled fallback. APIKEY is now kash_ plus 64 hexadecimal characters, not the deterministic historical credential. Each successful exchange creates a distinct managed key with all current permissions and no expiration. Keep the returned key and reuse it; each successful exchange creates another key. No existing key is revoked. The shop_api_keys migration and API-key encryption configuration are required; issuance failures return 503 without a historical fallback.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "login",
                  "password"
                ],
                "properties": {
                  "login": {
                    "type": "string",
                    "description": "Existing administrator legacy profile login; this is not the identity email sign-in flow. Maximum 254 UTF-8 bytes; equivalent logins share a quota according to the SQL column collation.",
                    "minLength": 1,
                    "maxLength": 254
                  },
                  "password": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Password for that administrator legacy profile. Maximum 1024 bytes; transmitted verbatim.",
                    "minLength": 1,
                    "maxLength": 1024
                  },
                  "moduleKey": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Optional existing PrestaShop API key. A nonempty value updates the integration settings only after all administrator checks.",
                    "maxLength": 1024
                  },
                  "prestaHome": {
                    "type": "string",
                    "description": "PrestaShop base URL used together with moduleKey.",
                    "maxLength": 2048
                  },
                  "mobile": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "Optional historical mobile display preference; maximum 32 bytes. Not an authentication or rate-limit identity."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Historical success for an eligible administrator, or a legacy success:false/result authentication or webservices failure. Inspect the response body.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/LegacyPasswordCredentialsResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "invalid_request; missing, malformed or oversized POST fields. Parameters from URLs or cookies are not used.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "error",
                    "message"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string",
                      "const": "invalid_request"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "api_admin_required for a non-administrator; account_unavailable, identity_interactive_required or mfa_interactive_required for other access/identity refusals. Ask an administrator for a dedicated integration key.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/LegacyEmailGuardError"
                    },
                    {
                      "type": "object",
                      "required": [
                        "ok",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "ok": {
                          "type": "boolean",
                          "const": false
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "shop_closed",
                            "service_unavailable"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed; use POST form data.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "error",
                    "message"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string",
                      "const": "method_not_allowed"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; common login, IP or global quota exceeded. No password verification or API key delivery occurs. Wait at least Retry-After seconds before retrying; another applicable quota may still be exhausted.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              },
              "Retry-After": {
                "description": "Whole seconds remaining in the first exhausted fixed window; not a delay relative to the last successful authentication.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "example": 300
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "error",
                    "message"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string",
                      "const": "rate_limited"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "success": false,
                  "error": "rate_limited",
                  "message": "Too many authentication attempts. Please try again later."
                }
              }
            }
          },
          "503": {
            "description": "migration_required when the shared password-quota table is absent or incompatible; service_unavailable when local quota storage, configuration, SQL comparison or authorization/identity verification cannot be completed. No unthrottled fallback and no key delivery.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/LegacyEmailGuardError"
                    },
                    {
                      "type": "object",
                      "required": [
                        "ok",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "ok": {
                          "type": "boolean",
                          "const": false
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "shop_closed",
                            "service_unavailable"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "success",
                        "error",
                        "message"
                      ],
                      "properties": {
                        "success": {
                          "type": "boolean",
                          "const": false
                        },
                        "error": {
                          "type": "string",
                          "const": "migration_required"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/workers/getAuthTokenWithPassword.php": {
      "post": {
        "operationId": "authenticateWithLegacyPassword",
        "summary": "Exchange an active administrator legacy login and password for shop API credentials",
        "description": "Compatibility endpoint. Prefer a dedicated key created by an administrator in Configuration > Webservices > Clés API; share that integration key rather than a person password. POST a legacy profile login and password. The current SQL profile must have droits=admin and belong to this shop; this is required even when identity authentication is disabled or a historical profile has no access-registry entry. The role and access state are checked again after identity/MFA checks and before key delivery or PrestaShop settings changes. Non-administrators receive 403 api_admin_required. Identity/MFA protection, accepted invitation, active access, open establishment and enabled webservices remain mandatory. An MFA-protected administrator signs in interactively and creates a dedicated key. If moduleKey is supplied, the optional PrestaShop configuration update is allowed only after administrator authorization. Eligible administrators keep the APIKEY/SHOPID success contract; Each successful exchange creates a new managed key with all current permissions and no expiration. Existing browser sessions and already-issued service keys are not revoked. Legacy authentication failures and disabled webservices still use the historical HTTP 200 failure body; clients must inspect the JSON response. Never put passwords or keys in a URL or log. Both password endpoints share persistent SQL quotas: 10 attempts per equivalent login per fixed 15-minute UTC window, 30 per IP per 15 minutes, 200 per IP per UTC day, and 600 globally per minute. Successful attempts also consume quotas; success never resets counters. A quota refusal occurs before password verification, remote identity/MFA calls, key delivery or optional integration updates. HTTP 429 returns success:false, error:rate_limited, message and Retry-After seconds. Switching endpoint, PHP process, browser session or client-supplied forwarded headers cannot reset the shared quota. IPv4-mapped IPv6 addresses share the IPv4 bucket; IPv6 addresses in one /64 share their IP bucket. Apply the additive auth_legacy_password_limits SQL migration before the PHP update. Missing migration returns 503 migration_required; unavailable configuration, database or SQL comparison support returns 503 service_unavailable, with no unthrottled fallback. APIKEY is now kash_ plus 64 hexadecimal characters, not the deterministic historical credential. Each successful exchange creates a distinct managed key with all current permissions and no expiration. Keep the returned key and reuse it; each successful exchange creates another key. No existing key is revoked. The shop_api_keys migration and API-key encryption configuration are required; issuance failures return 503 without a historical fallback.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "login",
                  "password"
                ],
                "properties": {
                  "login": {
                    "type": "string",
                    "description": "Existing administrator legacy profile login; this is not the identity email sign-in flow. Maximum 254 UTF-8 bytes; equivalent logins share a quota according to the SQL column collation.",
                    "minLength": 1,
                    "maxLength": 254
                  },
                  "password": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Password for that administrator legacy profile. Maximum 1024 bytes; transmitted verbatim.",
                    "minLength": 1,
                    "maxLength": 1024
                  },
                  "moduleKey": {
                    "type": "string",
                    "writeOnly": true,
                    "description": "Optional existing PrestaShop API key. A nonempty value updates the integration settings only after all administrator checks.",
                    "maxLength": 1024
                  },
                  "prestaHome": {
                    "type": "string",
                    "description": "PrestaShop base URL used together with moduleKey.",
                    "maxLength": 2048
                  },
                  "mobile": {
                    "type": "string",
                    "maxLength": 32,
                    "description": "Optional historical mobile display preference; maximum 32 bytes. Not an authentication or rate-limit identity."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Historical success for an eligible administrator, or a legacy success:false/result authentication or webservices failure. Inspect the response body.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/CredentialsSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "invalid_request; missing, malformed or oversized POST fields. Parameters from URLs or cookies are not used.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "error",
                    "message"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string",
                      "const": "invalid_request"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "api_admin_required for a non-administrator; account_unavailable, identity_interactive_required or mfa_interactive_required for other access/identity refusals. Ask an administrator for a dedicated integration key.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/LegacyEmailGuardError"
                    },
                    {
                      "type": "object",
                      "required": [
                        "ok",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "ok": {
                          "type": "boolean",
                          "const": false
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "shop_closed",
                            "service_unavailable"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed; use POST form data.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "error",
                    "message"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string",
                      "const": "method_not_allowed"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; common login, IP or global quota exceeded. No password verification or API key delivery occurs. Wait at least Retry-After seconds before retrying; another applicable quota may still be exhausted.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              },
              "Retry-After": {
                "description": "Whole seconds remaining in the first exhausted fixed window; not a delay relative to the last successful authentication.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "example": 300
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "error",
                    "message"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string",
                      "const": "rate_limited"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "success": false,
                  "error": "rate_limited",
                  "message": "Too many authentication attempts. Please try again later."
                }
              }
            }
          },
          "503": {
            "description": "migration_required when the shared password-quota table is absent or incompatible; service_unavailable when local quota storage, configuration, SQL comparison or authorization/identity verification cannot be completed. No unthrottled fallback and no key delivery.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/LegacyEmailGuardError"
                    },
                    {
                      "type": "object",
                      "required": [
                        "ok",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "ok": {
                          "type": "boolean",
                          "const": false
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "shop_closed",
                            "service_unavailable"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "required": [
                        "success",
                        "error",
                        "message"
                      ],
                      "properties": {
                        "success": {
                          "type": "boolean",
                          "const": false
                        },
                        "error": {
                          "type": "string",
                          "const": "migration_required"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/workers/getAuthTokenWithOTP.php": {
      "post": {
        "operationId": "authenticateWithOtp",
        "summary": "Confirm email and exchange a selected administrator profile for API credentials",
        "description": "Supply email and challengeId with otp/OTP for first confirmation or emailProof after a listing/selection response. If exactly one accessible profile matches, accountID is optional. If several profiles match and accountID is absent, a 409 account_selection_required response returns accounts and emailProof; POST again with that proof and an explicit accountID instead of reusing the code. A scope fixed by accountID at issuance cannot be expanded. Proof consumption is atomic and single-use for credential issuance. The current profile email, access state, invitation acceptance, open establishment and enabled webservices are checked again; identity/MFA guards remain mandatory. No browser credential is returned. Verification quotas: 10 per email and 50 per IP per fifteen minutes. POST form bodies only; GET links are no longer accepted. Codes/proofs must not be put in URLs or logs, and incoming cookies do not authenticate this flow. Old APIlogin codes are ignored. The main browser sign-in and already-issued service keys are unchanged. The selected profile must currently have administrator rights in its shop, even with identity disabled or no historical access-registry entry. A confirmed email may list collaborator profiles but does not authorize those profiles to obtain the full shop key. An initial non-administrator refusal uses 403 code: api_admin_required and retains an already-obtained emailProof from the listing so an administrator sibling profile may be selected before expiration; a role change detected after the identity/MFA checks can instead return error: api_admin_required. Role checks are repeated before issuance. Prefer a dedicated key created by an administrator in Configuration > Webservices > Clés API, with only the integration permissions needed. APIKEY is now kash_ plus 64 hexadecimal characters, not the deterministic historical credential. Each successful exchange creates a distinct managed key with all current permissions and no expiration. Keep the returned key and reuse it; each successful exchange creates another key. No existing key is revoked. The shop_api_keys migration and API-key encryption configuration are required; issuance failures return 503 without a historical fallback.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "challengeId"
                ],
                "properties": {
                  "email": {
                    "$ref": "#/components/schemas/Email",
                    "maxLength": 254,
                    "description": "Valid email address, at most 254 bytes; normalized to lowercase for confirmation."
                  },
                  "challengeId": {
                    "type": "string",
                    "minLength": 32,
                    "maxLength": 32,
                    "pattern": "^[a-fA-F0-9]{32}$"
                  },
                  "otp": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 6,
                    "pattern": "^[0-9]{6}$",
                    "writeOnly": true,
                    "description": "Six-digit confirmation code from the email, valid for ten minutes and at most five attempts. It is consumed on confirmation."
                  },
                  "OTP": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 6,
                    "pattern": "^[0-9]{6}$",
                    "writeOnly": true,
                    "description": "Historical alias for otp. If both names are provided their values must be identical."
                  },
                  "emailProof": {
                    "type": "string",
                    "minLength": 64,
                    "maxLength": 64,
                    "pattern": "^[a-fA-F0-9]{64}$",
                    "writeOnly": true,
                    "description": "Short email-confirmation proof, valid for at most five minutes. Send only in a POST body. It is consumed once when credentials are issued."
                  },
                  "accountID": {
                    "type": "string",
                    "pattern": "^[1-9][0-9]{0,18}$",
                    "description": "Historical profile identifier, not a shop identifier."
                  }
                },
                "anyOf": [
                  {
                    "required": [
                      "otp"
                    ]
                  },
                  {
                    "required": [
                      "OTP"
                    ]
                  },
                  {
                    "required": [
                      "emailProof"
                    ]
                  }
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Each successful exchange returns SHOPID and a new managed APIKEY for the selected active administrator profile. The key has all current permissions and no expiration. No browser session cookie is issued.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailCredentialsResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request or invalid_email.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailAuthError"
                }
              }
            }
          },
          "401": {
            "description": "email_confirmation_required or invalid_credential; unknown, expired, reused and incorrect proofs share a generic denial.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailAuthError"
                }
              }
            }
          },
          "403": {
            "description": "api_admin_required (code or error) for a non-administrator; no new key for an unavailable profile, disabled webservices, closed establishment, linked identity or MFA-protected access. A list entry or email proof is not authority to issue a key. Ask an administrator for a dedicated key; protected administrators sign in interactively.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/LegacyEmailAuthError"
                    },
                    {
                      "$ref": "#/components/schemas/LegacyEmailGuardError"
                    }
                  ]
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed; use POST.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailAuthError"
                }
              }
            }
          },
          "409": {
            "description": "account_selection_required: email confirmed but several profiles require an explicit accountID; use the returned emailProof for the next POST. auth_busy or too_many_accounts are other possible conflicts.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/LegacyEmailSelectionResponse"
                    },
                    {
                      "$ref": "#/components/schemas/LegacyEmailAuthError"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; do not retry in a loop.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailAuthError"
                }
              }
            }
          },
          "503": {
            "description": "migration_required or service_unavailable, including unavailable identity checks.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/LegacyEmailAuthError"
                    },
                    {
                      "$ref": "#/components/schemas/LegacyEmailGuardError"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/workers/getClients.php": {
      "get": {
        "operationId": "getClients",
        "summary": "List clients",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Case-sensitive export format. CSV is returned when omitted, empty, or unrecognized. Request format=json explicitly for JSON success responses.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "html"
              ],
              "default": "csv"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Clients list",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ClientsResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse",
                      "description": "Historical HTTP 200 error, even when CSV or HTML is requested. Examples include Shop not found and API key error."
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers.read"
        ],
        "tags": [
          "Customers"
        ],
        "description": " Managed key permissions: customers.read. Existing historical keys retain their access. Shop must be open and webservices enabled."
      }
    },
    "/workers/addClient.php": {
      "post": {
        "operationId": "addClient",
        "summary": "add Client",
        "parameters": [{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional unique key for this client creation; reuse the same request and key after a timeout or 5xx. A 409 idempotency_unresolved requires checking the client before using another key. Completed results are retained at least 30 days.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]+$"}}],
        "description": "Creates a client; it does not upsert by data[id]. Required customer fields depend on the shop configuration. Managed key permissions: customers.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "data[title]": {
                    "type": "string"
                  },
                  "data[surname]": {
                    "type": "string"
                  },
                  "data[name]": {
                    "type": "string"
                  },
                  "data[position]": {
                    "type": "string"
                  },
                  "data[email]": {
                    "type": "string"
                  },
                  "data[phone]": {
                    "type": "string"
                  },
                  "data[addressline1]": {
                    "type": "string"
                  },
                  "data[addressline2]": {
                    "type": "string"
                  },
                  "data[adressComment]": {
                    "type": "string"
                  },
                  "data[postcode]": {
                    "type": "string"
                  },
                  "data[city]": {
                    "type": "string"
                  },
                  "data[country]": {
                    "type": "string"
                  },
                  "data[identificationID]": {
                    "type": "string"
                  },
                  "data[lat]": {
                    "type": "string"
                  },
                  "data[lng]": {
                    "type": "string"
                  },
                  "data[commentPrivate]": {
                    "type": "string"
                  },
                  "data[commentPublic]": {
                    "type": "string"
                  },
                  "data[registrationNumber]": {
                    "type": "string"
                  },
                  "data[VATnum]": {
                    "type": "string"
                  },
                  "data[barcode]": {
                    "type": "string"
                  },
                  "data[blacklist]": {
                    "type": "string"
                  },
                  "data[clientGroupID]": {
                    "type": "string"
                  },
                  "data[phone2]": {
                    "type": "string"
                  },
                  "data[birthDate]": {
                    "type": "string"
                  },
                  "data[activityCode]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "400": {"description": "Invalid idempotency key or unsupported file upload."},
          "409": {"description": "idempotency_conflict: key reused with different request data; idempotency_unresolved: operation still running or requires review."},
          "200": {
            "description": "Created object identifier, or a historical business error.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/IdSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers.write"
        ],
        "tags": [
          "Customers"
        ]
      }
    },
    "/workers/getPlus.php": {
      "get": {
        "operationId": "getItems",
        "summary": "List items",
        "parameters": [
          {
            "name": "idrayon",
            "in": "query",
            "required": false,
            "description": "Department ID used to filter items to that department. Omit this parameter, or pass 0 or an empty value, to list items across all departments.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Case-sensitive export format. CSV is returned when omitted, empty, or unrecognized. Request format=json explicitly for JSON success responses.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "html"
              ],
              "default": "csv"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Items list",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ItemsResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse",
                      "description": "Historical HTTP 200 error, even when CSV or HTML is requested. Examples include Shop not found and API key error."
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.read"
        ],
        "tags": [
          "Catalogue"
        ],
        "description": " Managed key permissions: catalog.read. Existing historical keys retain their access. Shop must be open and webservices enabled."
      }
    },
    "/workers/addPlu.php": {
      "post": {
        "operationId": "addPlu",
        "summary": "add Plu",
        "parameters": [{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional unique key for this product creation; reuse the same request and key after a timeout or 5xx. A 409 idempotency_unresolved requires checking the product before using another key. Completed results are retained at least 30 days.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]+$"}}],
        "description": " Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "data[title]"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "data[title]": {
                    "type": "string"
                  },
                  "data[shortTitle]": {
                    "type": "string"
                  },
                  "data[description]": {
                    "type": "string"
                  },
                  "data[buyingPrice]": {
                    "type": "string"
                  },
                  "data[price]": {
                    "type": "string"
                  },
                  "data[calories]": {
                    "type": "string"
                  },
                  "data[weight]": {
                    "type": "string"
                  },
                  "data[unitID]": {
                    "type": "string"
                  },
                  "data[variationID0]": {
                    "type": "string"
                  },
                  "data[variationID1]": {
                    "type": "string"
                  },
                  "data[variationID2]": {
                    "type": "string"
                  },
                  "data[variationID3]": {
                    "type": "string"
                  },
                  "data[variationID4]": {
                    "type": "string"
                  },
                  "data[deptID]": {
                    "type": "string"
                  },
                  "data[supplierID]": {
                    "type": "string"
                  },
                  "data[vatID]": {
                    "type": "string"
                  },
                  "data[eatinvatID]": {
                    "type": "string"
                  },
                  "data[discountID]": {
                    "type": "string"
                  },
                  "data[barcode]": {
                    "type": "string"
                  },
                  "data[stock]": {
                    "type": "string"
                  },
                  "data[stockAlert]": {
                    "type": "string"
                  },
                  "data[consumptionDate]": {
                    "type": "string"
                  },
                  "data[shopHide]": {
                    "type": "string"
                  },
                  "data[keyboardHide]": {
                    "type": "string"
                  },
                  "data[needPrepa]": {
                    "type": "string"
                  },
                  "data[prepaLength]": {
                    "type": "string"
                  },
                  "data[position]": {
                    "type": "string"
                  },
                  "data[activityCode]": {
                    "type": "string"
                  },
                  "data[internalID]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "400": {"description": "Invalid idempotency key or unsupported file upload."},
          "409": {"description": "idempotency_conflict: key reused with different request data; idempotency_unresolved: operation still running or requires review."},
          "200": {
            "description": "Created object identifier, or a historical business error.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/IdSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/getDepartments.php": {
      "get": {
        "operationId": "getDepartments",
        "summary": "List departments",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Case-sensitive export format. CSV is returned when omitted, empty, or unrecognized. Request format=json explicitly for JSON success responses.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "html"
              ],
              "default": "csv"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Departments list",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/DepartmentsResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse",
                      "description": "Historical HTTP 200 error, even when CSV or HTML is requested. Examples include Shop not found and API key error."
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.read"
        ],
        "tags": [
          "Catalogue"
        ],
        "description": " Managed key permissions: catalog.read. Existing historical keys retain their access. Shop must be open and webservices enabled."
      }
    },
    "/workers/addDept.php": {
      "post": {
        "operationId": "addDept",
        "summary": "add Dept",
        "description": " Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "data[title]"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "data[title]": {
                    "type": "string"
                  },
                  "data[shortTitle]": {
                    "type": "string"
                  },
                  "data[stock]": {
                    "type": "string"
                  },
                  "data[vatID]": {
                    "type": "string"
                  },
                  "data[eatinvatID]": {
                    "type": "string"
                  },
                  "data[discountID]": {
                    "type": "string"
                  },
                  "data[price]": {
                    "type": "string"
                  },
                  "data[keyboardHide]": {
                    "type": "string"
                  },
                  "data[shopHide]": {
                    "type": "string"
                  },
                  "data[position]": {
                    "type": "string"
                  },
                  "data[deptGroupID]": {
                    "type": "string"
                  },
                  "data[unitID]": {
                    "type": "string"
                  },
                  "data[needPrepa]": {
                    "type": "string"
                  },
                  "data[variationID0]": {
                    "type": "string"
                  },
                  "data[variationID1]": {
                    "type": "string"
                  },
                  "data[variationID2]": {
                    "type": "string"
                  },
                  "data[variationID3]": {
                    "type": "string"
                  },
                  "data[variationID4]": {
                    "type": "string"
                  },
                  "data[activityCode]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created object identifier, or a historical business error.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/IdSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/getVATs.php": {
      "get": {
        "operationId": "getVatRates",
        "summary": "List VAT rates",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Case-sensitive export format. CSV is returned when omitted, empty, or unrecognized. Request format=json explicitly for JSON success responses.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "html"
              ],
              "default": "csv"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "VAT rates list",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/VatsResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse",
                      "description": "Historical HTTP 200 error, even when CSV or HTML is requested. Examples include Shop not found and API key error."
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.read"
        ],
        "tags": [
          "Catalogue"
        ],
        "description": " Managed key permissions: catalog.read. Existing historical keys retain their access. Shop must be open and webservices enabled."
      }
    },
    "/workers/addVat.php": {
      "post": {
        "operationId": "addVat",
        "summary": "add Vat",
        "description": " Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "data[title]",
                  "data[rate]"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "data[title]": {
                    "type": "string"
                  },
                  "data[accountingChapter]": {
                    "type": "string"
                  },
                  "data[rate]": {
                    "type": "string"
                  },
                  "data[legal]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created object identifier, or a historical business error.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/IdSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/getPaymentModes.php": {
      "get": {
        "operationId": "getPaymentModes",
        "summary": "List payment modes",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Case-sensitive export format. CSV is returned when omitted, empty, or unrecognized. Request format=json explicitly for JSON success responses.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "html"
              ],
              "default": "csv"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment modes list",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PaymentModesResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse",
                      "description": "Historical HTTP 200 error, even when CSV or HTML is requested. Examples include Shop not found and API key error."
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "settings.read"
        ],
        "tags": [
          "Settings"
        ],
        "description": " Managed key permissions: settings.read. Existing historical keys retain their access. Shop must be open and webservices enabled."
      }
    },
    "/workers/webapp.php": {
      "post": {
        "operationId": "createOrder",
        "summary": "Create a quote, invoice, or paid sale",
        "description": "Creates a quote (payment=-2), an unpaid invoice (payment=-1), or a paid sale (payment >= 0 is the payment mode ID). Managed keys require sales.write. They also require customers.write when client is non-empty and idClient is empty under PHP's empty() rules. For example, sending client[...] form fields with idClient omitted, blank, or 0 requires both permissions. The server can then create a customer or update a matching customer. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Unique key for this logical creation, 1–128 ASCII letters, digits, dot, underscore, tilde or hyphen. Persist and reuse it with the same parsed request after a timeout or 5xx response. Successful results are retained for at least 30 days. A 409 idempotency_unresolved means the original request may be running or partially applied: do not submit a new key until the sale has been checked. Authentication and permissions are checked again on retries.",
            "schema": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9._~-]+$" }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "payment",
                  "itemsList[]"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "payment": {
                    "type": "integer"
                  },
                  "deliveryMethod": {
                    "type": "integer",
                    "enum": [
                      0,
                      1,
                      2,
                      3,
                      4,
                      5,
                      6
                    ]
                  },
                  "idClient": {
                    "type": [
                      "string",
                      "integer"
                    ]
                  },
                  "client[nom]": {
                    "type": "string"
                  },
                  "client[prenom]": {
                    "type": "string"
                  },
                  "client[name]": {
                    "type": "string"
                  },
                  "client[firstname]": {
                    "type": "string"
                  },
                  "client[email]": {
                    "type": "string",
                    "format": "email"
                  },
                  "client[phone]": {
                    "type": "string"
                  },
                  "itemsList[]": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string"
                    }
                  },
                  "paymentAmount": {
                    "type": "number",
                    "description": "Optional amount paid. Ignored if payment = -2 or -1"
                  }
                },
                "additionalProperties": true
              },
              "encoding": {
                "itemsList[]": {
                  "style": "form",
                  "explode": true
                }
              },
              "examples": {
                "quote": {
                  "value": {
                    "shopID": "12345",
                    "key": "kash_0000000000000000000000000000000000000000000000000000000000000000",
                    "payment": -2,
                    "deliveryMethod": 0,
                    "itemsList[]": [
                      "-93_3.5_Cafe"
                    ]
                  }
                },
                "invoiceUnpaid": {
                  "value": {
                    "shopID": "12345",
                    "key": "kash_0000000000000000000000000000000000000000000000000000000000000000",
                    "payment": -1,
                    "deliveryMethod": 1,
                    "client[name]": "Dupont",
                    "client[firstname]": "Jean",
                    "client[email]": "jean.dupont@example.com",
                    "itemsList[]": [
                      "Free_10_Coffee",
                      "Free_5_Croissant"
                    ]
                  }
                },
                "paidSale": {
                  "description": "Uses an existing customer by idClient. Requires sales.write for a managed key.",
                  "value": {
                    "shopID": "12345",
                    "key": "kash_0000000000000000000000000000000000000000000000000000000000000000",
                    "payment": 71,
                    "deliveryMethod": 2,
                    "idClient": "9732224",
                    "itemsList[]": [
                      "34851408_2",
                      "34851409"
                    ]
                  }
                },
                "paidSaleWithNewCustomer": {
                  "description": "Supplies customer details without idClient. Requires sales.write and customers.write for a managed key.",
                  "value": {
                    "shopID": "12345",
                    "key": "kash_0000000000000000000000000000000000000000000000000000000000000000",
                    "payment": 71,
                    "deliveryMethod": 2,
                    "client[nom]": "Martin",
                    "client[prenom]": "Camille",
                    "client[email]": "camille.martin@example.test",
                    "itemsList[]": [
                      "34851408_2",
                      "34851409"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Order creation result",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/OrderSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key or unsupported file upload with a key."
          },
          "409": {
            "description": "idempotency_conflict: key reused with different request data; idempotency_unresolved: original request still running or requires review. Do not create a new key until its outcome is checked."
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "sales.write"
        ],
        "tags": [
          "Sales"
        ]
      }
    },
    "/workers/getSales.php": {
      "get": {
        "operationId": "getSalesReport",
        "summary": "Download sales report",
        "description": "Downloads a sales report. With no date, the report covers yesterday in the shop's business time. Use y alone for a full year, m without d for a full month, or d and m for a day. For a month or day, y defaults to the current business year. An empty value or 0 is treated as an omitted date part for historical callers. Managed keys require reports.read. Historical keys retain their access. Web Services must be enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "description": "Shop identifier. Takes precedence over the historical alias idboutique.",
            "example": "12345",
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "idboutique",
            "in": "query",
            "description": "Historical alias for shopID. Supply one of these two parameters.",
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "example": "kash_0000000000000000000000000000000000000000000000000000000000000000",
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "d",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 31
            },
            "description": "Day of the month. A nonzero day requires a month.",
            "example": 12
          },
          {
            "name": "m",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 12
            },
            "description": "Calendar month.",
            "example": 10
          },
          {
            "name": "y",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "anyOf": [
                { "const": 0 },
                { "minimum": 1000, "maximum": 9999 }
              ]
            },
            "description": "Four-digit year.",
            "example": 2026
          },
          {
            "name": "formatExport",
            "in": "query",
            "description": "Case-sensitive format. CSV is the default and the historical fallback for unrecognized values, including CSVComptable. CSVComptable therefore returns sales CSV. XLS returns an Excel BIFF workbook. Use the register's administrator export for SAF-T. An API key alone receives HTTP 403 for saft, except in test mode, which returns an HTML notice.",
            "example": "CSV",
            "schema": {
              "type": "string",
              "default": "CSV",
              "examples": ["Std", "html", "htmlSimple", "PDF", "PDFSimple", "CSV", "XLS", "frafec", "saft", "CSVComptable"]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Report content in the requested format. Unknown shops and rejected historical keys can return an HTTP 200 JSON error. A test-mode shop requesting a fiscal export can receive an HTML notice.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string",
                  "description": "Std (inline), html, htmlSimple, or the fiscal-export notice in test mode."
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "CSV and historical fallbacks, including CSVComptable."
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary",
                  "description": "PDF or PDFSimple."
                }
              },
              "application/vnd.ms-excel": {
                "schema": {
                  "type": "string",
                  "format": "binary",
                  "description": "XLS (BIFF workbook)."
                }
              },
              "text/xml": {
                "schema": {
                  "type": "string",
                  "description": "frafec (FEC XML, encoded in ISO-8859-15)."
                }
              },
              "application/xml": {
                "schema": {
                  "type": "string",
                  "description": "saft (SAF-T XML), conditional on an existing authenticated administrator context for the same shop. This endpoint does not initialize a browser session."
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                },
                "example": { "success": false, "result": "Shop not found" }
              }
            }
          },
          "400": {
            "description": "Invalid report date, including a day supplied without a month.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                },
                "example": { "success": false, "result": "Invalid report date" }
              }
            }
          },
          "403": {
            "description": "Rejected, revoked or expired managed key, insufficient permissions, closed shop, or missing administrator session for SAF-T.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    { "$ref": "#/components/schemas/StandardFailureResponse" },
                    { "$ref": "#/components/schemas/ShopAvailabilityFailure" }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                },
                "example": "Not allowed"
              }
            }
          },
          "503": {
            "description": "The managed-key service or shop-availability check is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    { "$ref": "#/components/schemas/StandardFailureResponse" },
                    { "$ref": "#/components/schemas/ShopAvailabilityFailure" }
                  ]
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "reports.read"
        ],
        "tags": [
          "Reports"
        ]
      }
    },
    "/workers/editOrder.php": {
      "post": {
        "operationId": "editOrder",
        "summary": "Edit an existing order",
        "description": "Modify an existing order using orderID. Same logic as createOrder. Managed key permissions: sales.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Unique key for this logical order modification, 1–128 ASCII letters, digits, dot, underscore, tilde or hyphen. Use a new key for each intended modification. Reuse the same key, orderID and parsed request after a timeout or 5xx response. The key namespace is separate from createOrder. Completed results are retained for at least 30 days. A 409 idempotency_unresolved means the modification may be running or partially applied; verify articles, stock and payments before using a new key.",
            "schema": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9._~-]+$" }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "orderID"
                ],
                "properties": {
                  "shopID": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string"
                  },
                  "orderID": {
                    "type": [
                      "string",
                      "integer"
                    ]
                  },
                  "payment": {
                    "type": "integer"
                  },
                  "deliveryMethod": {
                    "type": "integer",
                    "enum": [
                      0,
                      1,
                      2,
                      3,
                      4,
                      5,
                      6
                    ]
                  },
                  "idClient": {
                    "type": [
                      "string",
                      "integer"
                    ]
                  },
                  "itemsList[]": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "paymentAmount": {
                    "type": "number",
                    "description": "Optional amount paid. Ignored if payment = -2 or -1"
                  }
                },
                "additionalProperties": true
              },
              "encoding": {
                "itemsList[]": {
                  "style": "form",
                  "explode": true
                }
              },
              "examples": {
                "default": {
                  "value": {
                    "shopID": "12345",
                    "key": "kash_0000000000000000000000000000000000000000000000000000000000000000",
                    "orderID": 123456,
                    "payment": -1,
                    "itemsList[]": [
                      "Free_5_Coffee"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Order update result",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/OrderSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key or unsupported file upload with a key."
          },
          "409": {
            "description": "idempotency_conflict: key reused with different request data; idempotency_unresolved: original modification is still running or requires review."
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "sales.write"
        ],
        "tags": [
          "Sales"
        ]
      }
    },
    "/workers/getMailbox.php": {
      "get": {
        "operationId": "getMailbox",
        "tags": [
          "Mailbox"
        ],
        "summary": "Read mailbox, allocating a permanent unique address on first use",
        "description": "Authenticate with the shop API key (shopID + key) and enabled webservices. These operations are scoped to this shop; login cookies do not authenticate the API. JSON and form POSTs also accept credentials in the body instead of the URL. Conflicting query/body values are rejected. Human messages use showTradRAW. UTC dates use YYYY-MM-DD HH:MM:SS. Existing mailbox migrations are required; no new migration or separate allocation endpoint. Managed key permissions: mailbox.read. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful scoped result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or conflicting parameters/JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this shop",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "405": {
            "description": "Incorrect HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "413": {
            "description": "JSON body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "mailbox.read"
        ]
      }
    },
    "/workers/getMailboxMessages.php": {
      "get": {
        "operationId": "getMailboxMessages",
        "tags": [
          "Mailbox"
        ],
        "summary": "List received or sent email metadata",
        "description": "Authenticate with the shop API key (shopID + key) and enabled webservices. These operations are scoped to this shop; login cookies do not authenticate the API. JSON and form POSTs also accept credentials in the body instead of the URL. Conflicting query/body values are rejected. Human messages use showTradRAW. UTC dates use YYYY-MM-DD HH:MM:SS. Existing mailbox migrations are required; no new migration or separate allocation endpoint. Managed key permissions: mailbox.read. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "box",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inbox",
                "sent"
              ],
              "default": "inbox"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "Literal search in subject/sender for inbox, subject/recipient for sent. Limit 200 UTF-8 bytes."
            }
          },
          {
            "name": "folder_id",
            "in": "query",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "integer",
                  "minimum": 0
                },
                {
                  "type": "string",
                  "const": "all"
                }
              ],
              "description": "Inbox only: all/omitted means all; 0 means main inbox."
            }
          },
          {
            "name": "read",
            "in": "query",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "integer",
                  "enum": [
                    0,
                    1
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "0",
                    "1"
                  ]
                }
              ],
              "description": "Inbox only: explicit read state or filter."
            }
          },
          {
            "name": "replied",
            "in": "query",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "integer",
                  "enum": [
                    0,
                    1
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "0",
                    "1"
                  ]
                }
              ],
              "description": "Inbox only: explicit reply state or filter; clearing it retains replies."
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "sending",
                "sent",
                "delivered",
                "failed",
                "bounced",
                "spam_complaint"
              ],
              "description": "Sent only."
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}Z)?$",
              "description": "UTC inclusive start, received_at for inbox or created_at for sent."
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}Z)?$",
              "description": "UTC exclusive end for timestamps; entire day included for YYYY-MM-DD."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful scoped result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or conflicting parameters/JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this shop",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "405": {
            "description": "Incorrect HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "413": {
            "description": "JSON body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "mailbox.read"
        ]
      }
    },
    "/workers/getMailboxMessage.php": {
      "get": {
        "operationId": "getMailboxMessage",
        "tags": [
          "Mailbox"
        ],
        "summary": "Read email detail without marking it read",
        "description": "Authenticate with the shop API key (shopID + key) and enabled webservices. These operations are scoped to this shop; login cookies do not authenticate the API. JSON and form POSTs also accept credentials in the body instead of the URL. Conflicting query/body values are rejected. Human messages use showTradRAW. UTC dates use YYYY-MM-DD HH:MM:SS. Existing mailbox migrations are required; no new migration or separate allocation endpoint. Managed key permissions: mailbox.read. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "box",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inbox",
                "sent"
              ],
              "default": "inbox"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful scoped result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxMessageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or conflicting parameters/JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this shop",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "405": {
            "description": "Incorrect HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "413": {
            "description": "JSON body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "mailbox.read"
        ]
      }
    },
    "/workers/getMailboxReplies.php": {
      "get": {
        "operationId": "getMailboxReplies",
        "tags": [
          "Mailbox"
        ],
        "summary": "List outgoing reply attempts linked to a received email",
        "description": "Authenticate with the shop API key (shopID + key) and enabled webservices. These operations are scoped to this shop; login cookies do not authenticate the API. JSON and form POSTs also accept credentials in the body instead of the URL. Conflicting query/body values are rejected. Human messages use showTradRAW. UTC dates use YYYY-MM-DD HH:MM:SS. Existing mailbox migrations are required; no new migration or separate allocation endpoint. Managed key permissions: mailbox.read. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "message_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "Literal search in subject/sender for inbox, subject/recipient for sent. Limit 200 UTF-8 bytes."
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "sending",
                "sent",
                "delivered",
                "failed",
                "bounced",
                "spam_complaint"
              ],
              "description": "Sent only."
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}Z)?$",
              "description": "UTC inclusive start, received_at for inbox or created_at for sent."
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}Z)?$",
              "description": "UTC exclusive end for timestamps; entire day included for YYYY-MM-DD."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful scoped result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or conflicting parameters/JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this shop",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "405": {
            "description": "Incorrect HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "413": {
            "description": "JSON body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "mailbox.read"
        ]
      }
    },
    "/workers/downloadMailboxAttachment.php": {
      "get": {
        "operationId": "downloadMailboxAttachment",
        "tags": [
          "Mailbox"
        ],
        "summary": "Download a received or archived sent attachment",
        "description": "Authenticate with the shop API key (shopID + key) and enabled webservices. These operations are scoped to this shop; login cookies do not authenticate the API. JSON and form POSTs also accept credentials in the body instead of the URL. Conflicting query/body values are rejected. Human messages use showTradRAW. UTC dates use YYYY-MM-DD HH:MM:SS. Existing mailbox migrations are required; no new migration or separate allocation endpoint. Managed key permissions: mailbox.read. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "box",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inbox",
                "sent"
              ],
              "default": "inbox"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exact binary attachment; unavailable historical sent files return 404.",
            "headers": {
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                },
                "description": "attachment with UTF-8 filename"
              }
            },
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or conflicting parameters/JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this shop",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "405": {
            "description": "Incorrect HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "413": {
            "description": "JSON body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "mailbox.read"
        ]
      }
    },
    "/workers/sendMailboxMessage.php": {
      "post": {
        "operationId": "sendMailboxMessage",
        "tags": [
          "Mailbox"
        ],
        "summary": "Send email from the shop mailbox",
        "description": "Authenticate with the shop API key (shopID + key) and enabled webservices. These operations are scoped to this shop; login cookies do not authenticate the API. JSON and form POSTs also accept credentials in the body instead of the URL. Conflicting query/body values are rejected. Human messages use showTradRAW. UTC dates use YYYY-MM-DD HH:MM:SS. Existing mailbox migrations are required; no new migration or separate allocation endpoint. Managed key permissions: mailbox.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request processed. Check accepted/status/error_reason; success does not mean delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxSendResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or conflicting parameters/JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this shop",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "405": {
            "description": "Incorrect HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "413": {
            "description": "JSON body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Un objet JSON de 150 000 octets au maximum.",
                "properties": {
                  "to": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 320,
                    "description": "A single recipient; mutually exclusive with customer_id."
                  },
                  "customer_id": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647,
                    "description": "Customer of this shop; email re-read from the database."
                  },
                  "subject": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 998,
                    "description": "Single line, maximum 998 UTF-8 bytes."
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100000,
                    "description": "UTF-8 plain text, at most 100000 bytes; line breaks converted to HTML."
                  },
                  "request_key": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32,64}$",
                    "description": "Required idempotency key. Reuse the same key and payload after network failure. The first body owns the key even if sending failed."
                  }
                },
                "required": [
                  "subject",
                  "body",
                  "request_key"
                ],
                "oneOf": [
                  {
                    "required": [
                      "to"
                    ],
                    "not": {
                      "required": [
                        "customer_id"
                      ]
                    }
                  },
                  {
                    "required": [
                      "customer_id"
                    ],
                    "not": {
                      "required": [
                        "to"
                      ]
                    }
                  }
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 320,
                    "description": "A single recipient; mutually exclusive with customer_id."
                  },
                  "customer_id": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647,
                    "description": "Customer of this shop; email re-read from the database."
                  },
                  "subject": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 998,
                    "description": "Single line, maximum 998 UTF-8 bytes."
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100000,
                    "description": "UTF-8 plain text, at most 100000 bytes; line breaks converted to HTML."
                  },
                  "request_key": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32,64}$",
                    "description": "Required idempotency key. Reuse the same key and payload after network failure. The first body owns the key even if sending failed."
                  }
                },
                "required": [
                  "subject",
                  "body",
                  "request_key"
                ],
                "oneOf": [
                  {
                    "required": [
                      "to"
                    ],
                    "not": {
                      "required": [
                        "customer_id"
                      ]
                    }
                  },
                  {
                    "required": [
                      "customer_id"
                    ],
                    "not": {
                      "required": [
                        "to"
                      ]
                    }
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 320,
                    "description": "A single recipient; mutually exclusive with customer_id."
                  },
                  "customer_id": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647,
                    "description": "Customer of this shop; email re-read from the database."
                  },
                  "subject": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 998,
                    "description": "Single line, maximum 998 UTF-8 bytes."
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100000,
                    "description": "UTF-8 plain text, at most 100000 bytes; line breaks converted to HTML."
                  },
                  "request_key": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32,64}$",
                    "description": "Required idempotency key. Reuse the same key and payload after network failure. The first body owns the key even if sending failed."
                  }
                },
                "required": [
                  "subject",
                  "body",
                  "request_key"
                ],
                "oneOf": [
                  {
                    "required": [
                      "to"
                    ],
                    "not": {
                      "required": [
                        "customer_id"
                      ]
                    }
                  },
                  {
                    "required": [
                      "customer_id"
                    ],
                    "not": {
                      "required": [
                        "to"
                      ]
                    }
                  }
                ]
              }
            }
          }
        },
        "x-required-scopes": [
          "mailbox.write"
        ]
      }
    },
    "/workers/replyMailboxMessage.php": {
      "post": {
        "operationId": "replyMailboxMessage",
        "tags": [
          "Mailbox"
        ],
        "summary": "Reply to a received email using its recorded recipient",
        "description": "Authenticate with the shop API key (shopID + key) and enabled webservices. These operations are scoped to this shop; login cookies do not authenticate the API. JSON and form POSTs also accept credentials in the body instead of the URL. Conflicting query/body values are rejected. Human messages use showTradRAW. UTC dates use YYYY-MM-DD HH:MM:SS. Existing mailbox migrations are required; no new migration or separate allocation endpoint. Managed key permissions: mailbox.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request processed. Check accepted/status/error_reason; success does not mean delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxSendResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or conflicting parameters/JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this shop",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "405": {
            "description": "Incorrect HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "413": {
            "description": "JSON body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Un objet JSON de 150 000 octets au maximum.",
                "properties": {
                  "message_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100000,
                    "description": "UTF-8 plain text, at most 100000 bytes; line breaks converted to HTML."
                  },
                  "request_key": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32,64}$",
                    "description": "Required idempotency key. Reuse the same key and payload after network failure. The first body owns the key even if sending failed."
                  }
                },
                "required": [
                  "message_id",
                  "body",
                  "request_key"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "message_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100000,
                    "description": "UTF-8 plain text, at most 100000 bytes; line breaks converted to HTML."
                  },
                  "request_key": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32,64}$",
                    "description": "Required idempotency key. Reuse the same key and payload after network failure. The first body owns the key even if sending failed."
                  }
                },
                "required": [
                  "message_id",
                  "body",
                  "request_key"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "message_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100000,
                    "description": "UTF-8 plain text, at most 100000 bytes; line breaks converted to HTML."
                  },
                  "request_key": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32,64}$",
                    "description": "Required idempotency key. Reuse the same key and payload after network failure. The first body owns the key even if sending failed."
                  }
                },
                "required": [
                  "message_id",
                  "body",
                  "request_key"
                ]
              }
            }
          }
        },
        "x-required-scopes": [
          "mailbox.write"
        ]
      }
    },
    "/workers/editMailboxMessage.php": {
      "post": {
        "operationId": "editMailboxMessage",
        "tags": [
          "Mailbox"
        ],
        "summary": "Set received email read/reply states atomically",
        "description": "Authenticate with the shop API key (shopID + key) and enabled webservices. These operations are scoped to this shop; login cookies do not authenticate the API. JSON and form POSTs also accept credentials in the body instead of the URL. Conflicting query/body values are rejected. Human messages use showTradRAW. UTC dates use YYYY-MM-DD HH:MM:SS. Existing mailbox migrations are required; no new migration or separate allocation endpoint. Managed key permissions: mailbox.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request processed. Check accepted/status/error_reason; success does not mean delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxEditResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or conflicting parameters/JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this shop",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "405": {
            "description": "Incorrect HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "413": {
            "description": "JSON body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Un objet JSON de 150 000 octets au maximum.",
                "properties": {
                  "message_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "read": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "integer",
                        "enum": [
                          0,
                          1
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1"
                        ]
                      }
                    ],
                    "description": "Inbox only: explicit read state or filter."
                  },
                  "replied": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "integer",
                        "enum": [
                          0,
                          1
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1"
                        ]
                      }
                    ],
                    "description": "Inbox only: explicit reply state or filter; clearing it retains replies."
                  }
                },
                "required": [
                  "message_id"
                ],
                "anyOf": [
                  {
                    "required": [
                      "read"
                    ]
                  },
                  {
                    "required": [
                      "replied"
                    ]
                  }
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "message_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "read": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "integer",
                        "enum": [
                          0,
                          1
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1"
                        ]
                      }
                    ],
                    "description": "Inbox only: explicit read state or filter."
                  },
                  "replied": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "integer",
                        "enum": [
                          0,
                          1
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1"
                        ]
                      }
                    ],
                    "description": "Inbox only: explicit reply state or filter; clearing it retains replies."
                  }
                },
                "required": [
                  "message_id"
                ],
                "anyOf": [
                  {
                    "required": [
                      "read"
                    ]
                  },
                  {
                    "required": [
                      "replied"
                    ]
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "message_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "read": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "integer",
                        "enum": [
                          0,
                          1
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1"
                        ]
                      }
                    ],
                    "description": "Inbox only: explicit read state or filter."
                  },
                  "replied": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "integer",
                        "enum": [
                          0,
                          1
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1"
                        ]
                      }
                    ],
                    "description": "Inbox only: explicit reply state or filter; clearing it retains replies."
                  }
                },
                "required": [
                  "message_id"
                ],
                "anyOf": [
                  {
                    "required": [
                      "read"
                    ]
                  },
                  {
                    "required": [
                      "replied"
                    ]
                  }
                ]
              }
            }
          }
        },
        "x-required-scopes": [
          "mailbox.write"
        ]
      }
    },
    "/workers/moveMailboxMessage.php": {
      "post": {
        "operationId": "moveMailboxMessage",
        "tags": [
          "Mailbox"
        ],
        "summary": "Move received email into a shop folder or main inbox",
        "description": "Authenticate with the shop API key (shopID + key) and enabled webservices. These operations are scoped to this shop; login cookies do not authenticate the API. JSON and form POSTs also accept credentials in the body instead of the URL. Conflicting query/body values are rejected. Human messages use showTradRAW. UTC dates use YYYY-MM-DD HH:MM:SS. Existing mailbox migrations are required; no new migration or separate allocation endpoint. Managed key permissions: mailbox.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request processed. Check accepted/status/error_reason; success does not mean delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxMoveResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or conflicting parameters/JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this shop",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "405": {
            "description": "Incorrect HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "413": {
            "description": "JSON body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Un objet JSON de 150 000 octets au maximum.",
                "properties": {
                  "message_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "folder_id": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "message_id",
                  "folder_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "message_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "folder_id": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "message_id",
                  "folder_id"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "message_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "folder_id": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "message_id",
                  "folder_id"
                ]
              }
            }
          }
        },
        "x-required-scopes": [
          "mailbox.write"
        ]
      }
    },
    "/workers/getMailboxFolders.php": {
      "get": {
        "operationId": "getMailboxFolders",
        "tags": [
          "Mailbox"
        ],
        "summary": "List shop folders with total and unread counts",
        "description": "Authenticate with the shop API key (shopID + key) and enabled webservices. These operations are scoped to this shop; login cookies do not authenticate the API. JSON and form POSTs also accept credentials in the body instead of the URL. Conflicting query/body values are rejected. Human messages use showTradRAW. UTC dates use YYYY-MM-DD HH:MM:SS. Existing mailbox migrations are required; no new migration or separate allocation endpoint. Managed key permissions: mailbox.read. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful scoped result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxFoldersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or conflicting parameters/JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this shop",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "405": {
            "description": "Incorrect HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "413": {
            "description": "JSON body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "mailbox.read"
        ]
      }
    },
    "/workers/addMailboxFolder.php": {
      "post": {
        "operationId": "addMailboxFolder",
        "tags": [
          "Mailbox"
        ],
        "summary": "Create a folder or return the existing same-name folder",
        "description": "Authenticate with the shop API key (shopID + key) and enabled webservices. These operations are scoped to this shop; login cookies do not authenticate the API. JSON and form POSTs also accept credentials in the body instead of the URL. Conflicting query/body values are rejected. Human messages use showTradRAW. UTC dates use YYYY-MM-DD HH:MM:SS. Existing mailbox migrations are required; no new migration or separate allocation endpoint. Managed key permissions: mailbox.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful scoped result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxFolderMutationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or conflicting parameters/JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this shop",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "405": {
            "description": "Incorrect HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "413": {
            "description": "JSON body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Un objet JSON de 150 000 octets au maximum.",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "Whitespace normalized; shop-specific case/accent-insensitive uniqueness."
                  }
                },
                "required": [
                  "name"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "Whitespace normalized; shop-specific case/accent-insensitive uniqueness."
                  }
                },
                "required": [
                  "name"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "Whitespace normalized; shop-specific case/accent-insensitive uniqueness."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "x-required-scopes": [
          "mailbox.write"
        ]
      }
    },
    "/workers/editMailboxFolder.php": {
      "post": {
        "operationId": "editMailboxFolder",
        "tags": [
          "Mailbox"
        ],
        "summary": "Rename an existing shop folder",
        "description": "Authenticate with the shop API key (shopID + key) and enabled webservices. These operations are scoped to this shop; login cookies do not authenticate the API. JSON and form POSTs also accept credentials in the body instead of the URL. Conflicting query/body values are rejected. Human messages use showTradRAW. UTC dates use YYYY-MM-DD HH:MM:SS. Existing mailbox migrations are required; no new migration or separate allocation endpoint. Managed key permissions: mailbox.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful scoped result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxFolderMutationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or conflicting parameters/JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this shop",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "405": {
            "description": "Incorrect HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "413": {
            "description": "JSON body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Un objet JSON de 150 000 octets au maximum.",
                "properties": {
                  "folder_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "Whitespace normalized; shop-specific case/accent-insensitive uniqueness."
                  }
                },
                "required": [
                  "folder_id",
                  "name"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "folder_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "Whitespace normalized; shop-specific case/accent-insensitive uniqueness."
                  }
                },
                "required": [
                  "folder_id",
                  "name"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "folder_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "Whitespace normalized; shop-specific case/accent-insensitive uniqueness."
                  }
                },
                "required": [
                  "folder_id",
                  "name"
                ]
              }
            }
          }
        },
        "x-required-scopes": [
          "mailbox.write"
        ]
      }
    },
    "/workers/delMailboxFolder.php": {
      "post": {
        "operationId": "delMailboxFolder",
        "tags": [
          "Mailbox"
        ],
        "summary": "Delete a folder, preserving its emails in the main inbox",
        "description": "Authenticate with the shop API key (shopID + key) and enabled webservices. These operations are scoped to this shop; login cookies do not authenticate the API. JSON and form POSTs also accept credentials in the body instead of the URL. Conflicting query/body values are rejected. Human messages use showTradRAW. UTC dates use YYYY-MM-DD HH:MM:SS. Existing mailbox migrations are required; no new migration or separate allocation endpoint. Managed key permissions: mailbox.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful scoped result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxFolderMutationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or conflicting parameters/JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this shop",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "405": {
            "description": "Incorrect HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "413": {
            "description": "JSON body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Un objet JSON de 150 000 octets au maximum.",
                "properties": {
                  "folder_id": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "folder_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "folder_id": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "folder_id"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "folder_id": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "folder_id"
                ]
              }
            }
          }
        },
        "x-required-scopes": [
          "mailbox.write"
        ]
      }
    },
    "/workers/searchMailboxCustomers.php": {
      "get": {
        "operationId": "searchMailboxCustomers",
        "tags": [
          "Customers"
        ],
        "summary": "Search indexed recipient prefixes, at most 20 matches",
        "description": "Authenticate with the shop API key (shopID + key) and enabled webservices. These operations are scoped to this shop; login cookies do not authenticate the API. JSON and form POSTs also accept credentials in the body instead of the URL. Conflicting query/body values are rejected. Human messages use showTradRAW. UTC dates use YYYY-MM-DD HH:MM:SS. Existing mailbox migrations are required; no new migration or separate allocation endpoint. Managed key permissions: customers.read, mailbox.read. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "description": "Prefix of name, first name or email. Minimum 2 characters, max 100; under 2 returns an empty list. Refine search if has_more=true."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful scoped result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxSearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or conflicting parameters/JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this shop",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "405": {
            "description": "Incorrect HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "413": {
            "description": "JSON body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers.read",
          "mailbox.read"
        ]
      }
    },
    "/workers/getMailboxCustomer.php": {
      "get": {
        "operationId": "getMailboxCustomer",
        "tags": [
          "Customers"
        ],
        "summary": "Identify customer and return summary, last order and habits",
        "description": "Authenticate with the shop API key (shopID + key) and enabled webservices. These operations are scoped to this shop; login cookies do not authenticate the API. JSON and form POSTs also accept credentials in the body instead of the URL. Conflicting query/body values are rejected. Human messages use showTradRAW. UTC dates use YYYY-MM-DD HH:MM:SS. Existing mailbox migrations are required; no new migration or separate allocation endpoint. Managed key permissions: customers.read, mailbox.read. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "message_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "box",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inbox",
                "sent"
              ],
              "default": "inbox"
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email",
              "maxLength": 320
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful scoped result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxCustomerResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or conflicting parameters/JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this shop",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "405": {
            "description": "Incorrect HTTP method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "413": {
            "description": "JSON body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxError"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers.read",
          "mailbox.read"
        ]
      }
    },
    "/workers/listShops.php": {
      "post": {
        "operationId": "listConfirmedEmailAccounts",
        "summary": "List profiles only after confirming their email address",
        "description": "Requires email, challengeId and either otp/OTP for initial confirmation or emailProof for subsequent listings. An email-only request returns 401 email_confirmation_required and sends no email. Correct OTP confirmation atomically consumes the code and returns a random proof valid for at most 300 seconds, bounded by challenge expiry. Listings do not extend this proof. accountTitle is an optional LIKE filter applied only after confirmation. Verification quotas: 10 per email and 50 per REMOTE_ADDR IP per fifteen minutes. POST form bodies only; GET links are no longer accepted. Codes/proofs must not be put in URLs or logs, and incoming cookies do not authenticate this flow. Old APIlogin codes are ignored. The main browser sign-in and already-issued service keys are unchanged. Listing a confirmed profile does not authorize it to obtain the shop API key: getAuthTokenWithOTP.php separately requires current administrator rights. Prefer a dedicated key created by a shop administrator for the integration.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "challengeId"
                ],
                "properties": {
                  "email": {
                    "$ref": "#/components/schemas/Email",
                    "maxLength": 254,
                    "description": "Valid email address, at most 254 bytes; normalized to lowercase for confirmation."
                  },
                  "challengeId": {
                    "type": "string",
                    "minLength": 32,
                    "maxLength": 32,
                    "pattern": "^[a-fA-F0-9]{32}$"
                  },
                  "otp": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 6,
                    "pattern": "^[0-9]{6}$",
                    "writeOnly": true,
                    "description": "Six-digit confirmation code from the email, valid for ten minutes and at most five attempts. It is consumed on confirmation."
                  },
                  "OTP": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 6,
                    "pattern": "^[0-9]{6}$",
                    "writeOnly": true,
                    "description": "Historical alias for otp. If both names are provided their values must be identical."
                  },
                  "emailProof": {
                    "type": "string",
                    "minLength": 64,
                    "maxLength": 64,
                    "pattern": "^[a-fA-F0-9]{64}$",
                    "writeOnly": true,
                    "description": "Short email-confirmation proof, valid for at most five minutes. Send only in a POST body. It is consumed once when credentials are issued."
                  },
                  "accountTitle": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Optional account-name LIKE filter, at most 120 UTF-8 bytes, evaluated only after email confirmation."
                  }
                },
                "anyOf": [
                  {
                    "required": [
                      "otp"
                    ]
                  },
                  {
                    "required": [
                      "OTP"
                    ]
                  },
                  {
                    "required": [
                      "emailProof"
                    ]
                  }
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Confirmed profile list and short email proof; accounts may be empty.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailAccountsResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request or invalid_email.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailAuthError"
                }
              }
            }
          },
          "401": {
            "description": "email_confirmation_required when the challenge is absent; invalid_credential for an unknown, incorrect, expired or already-used code/proof.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailAuthError"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed; use POST.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailAuthError"
                }
              }
            }
          },
          "409": {
            "description": "auth_busy or too_many_accounts; no unconfirmed account information is returned.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailAuthError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited; verification quotas are shared across PHP processes.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailAuthError"
                }
              }
            }
          },
          "503": {
            "description": "migration_required or service_unavailable.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store, private"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyEmailAuthError"
                }
              }
            }
          }
        }
      }
    },
    "/workers/getDepartmentGroups.php": {
      "get": {
        "operationId": "getDepartmentGroups",
        "summary": "List DepartmentGroups",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "html"
              ],
              "default": "csv"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Export. JSON values are serialized as strings; request format=json explicitly.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "nomlong": {
                        "type": "string"
                      },
                      "image": {
                        "type": "string"
                      },
                      "position": {
                        "type": "string"
                      },
                      "chapitreComptable": {
                        "type": "string"
                      },
                      "chapitreComptableComp": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.read"
        ],
        "tags": [
          "Catalogue"
        ],
        "description": " Managed key permissions: catalog.read. Existing historical keys retain their access. Shop must be open and webservices enabled."
      }
    },
    "/workers/getDeclinaisons.php": {
      "get": {
        "operationId": "getDeclinaisons",
        "summary": "List Declinaisons",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "html"
              ],
              "default": "csv"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Export. JSON values are serialized as strings; request format=json explicitly.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "idDeclinaison": {
                        "type": "string"
                      },
                      "declName": {
                        "type": "string"
                      },
                      "nom": {
                        "type": "string"
                      },
                      "modifPrix": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.read"
        ],
        "tags": [
          "Catalogue"
        ],
        "description": " Managed key permissions: catalog.read. Existing historical keys retain their access. Shop must be open and webservices enabled."
      }
    },
    "/workers/getDiscounts.php": {
      "get": {
        "operationId": "getDiscounts",
        "summary": "List Discounts",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "html"
              ],
              "default": "csv"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Export. JSON values are serialized as strings; request format=json explicitly.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "nomlong": {
                        "type": "string"
                      },
                      "taux": {
                        "type": "string"
                      },
                      "montant": {
                        "type": "string"
                      },
                      "prixfixe": {
                        "type": "string"
                      },
                      "totalMin": {
                        "type": "string"
                      },
                      "Position": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.read"
        ],
        "tags": [
          "Catalogue"
        ],
        "description": " Managed key permissions: catalog.read. Existing historical keys retain their access. Shop must be open and webservices enabled."
      }
    },
    "/workers/getUsers.php": {
      "get": {
        "operationId": "getUsers",
        "summary": "List Users",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "html"
              ],
              "default": "csv"
            }
          },
          {
            "name": "includeAccess",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Export. JSON values are serialized as strings; request format=json explicitly.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "nom": {
                        "type": "string"
                      },
                      "droits": {
                        "type": "string"
                      },
                      "codeBarre": {
                        "type": "string",
                        "description": "Always empty; login badges are never exported."
                      },
                      "state": {
                        "type": "string",
                        "description": "Active access state, only with includeAccess=1."
                      },
                      "version": {
                        "type": "string",
                        "description": "Current access version, only with includeAccess=1."
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "description": "Only active accepted profiles are listed. codeBarre remains an empty string for all key types. No invitation or revoked-profile inventory is exposed. Managed key permissions: settings.read. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "x-required-scopes": [
          "settings.read"
        ],
        "tags": [
          "Settings"
        ]
      }
    },
    "/workers/getCashbox.php": {
      "get": {
        "operationId": "getCashbox",
        "summary": "List Cashbox",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "html"
              ],
              "default": "csv"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Export. JSON values are serialized as strings; request format=json explicitly.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "nom": {
                        "type": "string"
                      },
                      "etat": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "settings.read"
        ],
        "tags": [
          "Settings"
        ],
        "description": " Managed key permissions: settings.read. Existing historical keys retain their access. Shop must be open and webservices enabled."
      }
    },
    "/workers/getTables.php": {
      "get": {
        "operationId": "getTables",
        "summary": "List Tables",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "html"
              ],
              "default": "csv"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Export. JSON values are serialized as strings; request format=json explicitly.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "numSalle": {
                        "type": "string"
                      },
                      "nom": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "settings.read"
        ],
        "tags": [
          "Settings"
        ],
        "description": " Managed key permissions: settings.read. Existing historical keys retain their access. Shop must be open and webservices enabled."
      }
    },
    "/workers/getLivraisons.php": {
      "get": {
        "operationId": "getLivraisons",
        "summary": "List Livraisons",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "html"
              ],
              "default": "csv"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Export. JSON values are serialized as strings; request format=json explicitly.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "nom": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "settings.read"
        ],
        "tags": [
          "Settings"
        ],
        "description": " Managed key permissions: settings.read. Existing historical keys retain their access. Shop must be open and webservices enabled."
      }
    },
    "/workers/getDeliveryZones.php": {
      "get": {
        "operationId": "getDeliveryZones",
        "summary": "List DeliveryZones",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "html"
              ],
              "default": "csv"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Export. JSON values are serialized as strings; request format=json explicitly.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "nom": {
                        "type": "string"
                      },
                      "rayon": {
                        "type": "string"
                      },
                      "lat": {
                        "type": "string"
                      },
                      "lng": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "settings.read"
        ],
        "tags": [
          "Settings"
        ],
        "description": " Managed key permissions: settings.read. Existing historical keys retain their access. Shop must be open and webservices enabled."
      }
    },
    "/workers/getRelayDeposit.php": {
      "get": {
        "operationId": "getRelayDeposit",
        "summary": "List RelayDeposit",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "html"
              ],
              "default": "csv"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Export. JSON values are serialized as strings; request format=json explicitly.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "nom": {
                        "type": "string"
                      },
                      "adresse": {
                        "type": "string"
                      },
                      "codepostal": {
                        "type": "string"
                      },
                      "ville": {
                        "type": "string"
                      },
                      "lat": {
                        "type": "string"
                      },
                      "lng": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "settings.read"
        ],
        "tags": [
          "Settings"
        ],
        "description": " Managed key permissions: settings.read. Existing historical keys retain their access. Shop must be open and webservices enabled."
      }
    },
    "/workers/getPending.php": {
      "get": {
        "operationId": "getPending",
        "summary": "List Pending",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "html"
              ],
              "default": "csv"
            }
          },
          {
            "name": "filterModeLivraison",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Optional delivery method ID."
            }
          },
          {
            "name": "recentsOnly",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Truthy value restricts to the last 24 hours."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Export. JSON values are serialized as strings; request format=json explicitly.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "idcompteclient": {
                        "type": "string"
                      },
                      "prixfinal": {
                        "type": "string"
                      },
                      "montantpaye": {
                        "type": "string"
                      },
                      "idinterne": {
                        "type": "string"
                      },
                      "choixlivraison": {
                        "type": "string"
                      },
                      "preparation": {
                        "type": "string"
                      },
                      "prepared": {
                        "type": "string"
                      },
                      "terminee": {
                        "type": "string"
                      },
                      "datevaleur": {
                        "type": "string"
                      },
                      "datecreation": {
                        "type": "string"
                      },
                      "note": {
                        "type": "string"
                      },
                      "notePublique": {
                        "type": "string"
                      },
                      "contenuclair": {
                        "type": "string"
                      },
                      "idtable": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "description": "Up to 300 pending orders. Sales and customer details may be included. Managed key permissions: sales.read. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "x-required-scopes": [
          "sales.read"
        ],
        "tags": [
          "Sales"
        ]
      }
    },
    "/workers/getShopInfos.php": {
      "get": {
        "operationId": "getShopInfos",
        "summary": "Read shop configuration",
        "description": "Sensitive settings read. Nonempty prestaShopApiKey and yavinSecret values are returned as *******. Empty values remain empty. Cache-Control: no-store, private. Managed key permissions: settings.read. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Shop settings object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "email": {
                      "type": "string"
                    },
                    "shopName": {},
                    "companyRegistrationNum": {},
                    "taxRegistrationNum": {},
                    "adressline1": {},
                    "postCode": {},
                    "city": {},
                    "country": {},
                    "lat": {},
                    "lng": {},
                    "phone": {},
                    "urlwebsite": {},
                    "defaultAccountingChapter": {},
                    "pdffooter": {},
                    "receiptHeader": {},
                    "receiptFooter": {},
                    "defaultVatID": {},
                    "currency": {},
                    "language": {},
                    "pricesAreProvidedTaxIncluded": {},
                    "paypalAddress": {},
                    "deliv_tablePlan": {},
                    "deliv_takeAway": {},
                    "deliv_drivethru": {},
                    "deliv_deliver": {},
                    "deliv_bar": {},
                    "deliv_relayDeposit": {},
                    "deliv_default": {},
                    "receipt_showVat": {},
                    "receipt_showShopName": {},
                    "receipt_showCashbox": {},
                    "receipt_showSeller": {},
                    "receipt_showClient": {},
                    "receipt_showAddress": {},
                    "receipt_showCompanyRegistrationNum": {},
                    "receipt_showClientSurname": {},
                    "receipt_showClientAddress": {},
                    "receipt_showClientPhone": {},
                    "receipt_showGlobalVat": {},
                    "receipt_showComment": {},
                    "receipt_showPricesBeforeTaxes": {},
                    "orderRequires_deliveryChoice": {},
                    "orderRequires_name": {},
                    "orderRequires_surname": {},
                    "orderRequires_address": {},
                    "orderRequires_email": {},
                    "orderRequires_phone": {},
                    "orderRequires_date": {},
                    "orderRequires_CompanyRegistrationNum": {},
                    "orderRequires_comment": {},
                    "enable_stock": {},
                    "enable_barcodes": {},
                    "enable_departments": {},
                    "enable_departmentsGroups": {},
                    "enable_credits": {},
                    "enable_descriptionsForItems": {},
                    "enable_variations": {},
                    "enable_delivShop": {},
                    "enable_relayDeposit": {},
                    "enable_descriptionForVariations": {},
                    "enable_dateOfConsumption": {},
                    "enable_coupons": {},
                    "enable_weightForItems": {},
                    "enable_whiteLabel": {},
                    "whiteLabelAdminUserID": {},
                    "isWebShopEnabled": {},
                    "webShopURL": {},
                    "webShopLang": {},
                    "webShopCol1": {},
                    "webShopCol2": {},
                    "webShopCol3": {},
                    "webShopColT1": {},
                    "webShopColT2": {},
                    "webShopColT3": {},
                    "prestaShopApiKey": {},
                    "prestaShopURL": {},
                    "saleWebhookURL": {},
                    "openingWebhookURL": {},
                    "enableYavin": {},
                    "yavinSecret": {},
                    "yavinSerial": {},
                    "enableVivaWallet": {},
                    "vivaWalletMerchant": {},
                    "vivaAccoundID": {},
                    "paymentDueDays": {},
                    "recoveryFeeAmount": {},
                    "recoveryFeeCurrency": {},
                    "latePenaltyMode": {},
                    "latePenaltyRate": {},
                    "earlyPaymentDiscountRate": {},
                    "earlyPaymentDiscountDays": {}
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "settings.read"
        ],
        "tags": [
          "Settings"
        ]
      }
    },
    "/workers/getOrders.php": {
      "get": {
        "operationId": "getOrders",
        "summary": "List orders",
        "description": "Lists current orders from the active order table. Send shopID or its historical alias idboutique. Managed keys require sales.read. Historical keys retain their access. Web Services must be enabled.",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "description": "Shop identifier. Takes precedence over idboutique when both are supplied.",
            "example": "12345",
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "idboutique",
            "in": "query",
            "description": "Historical alias for shopID.",
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "example": "kash_0000000000000000000000000000000000000000000000000000000000000000",
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "validatedOrders",
            "in": "query",
            "required": false,
            "description": "true lists validated orders and filters by value date. false lists unvalidated orders or quotations and filters by creation date.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false"
            }
          },
          {
            "name": "from_date_ISO8601",
            "in": "query",
            "required": false,
            "example": "2026-10-12T00:00:00+02:00",
            "schema": {
              "type": "string",
              "description": "Inclusive beginning of interval. Defaults to 30 days before the end."
            }
          },
          {
            "name": "to_date_ISO8601",
            "in": "query",
            "required": false,
            "example": "2026-10-13T00:00:00+02:00",
            "schema": {
              "type": "string",
              "description": "Exclusive end of interval. Defaults to the request time or the time retained in the pagination cursor."
            }
          },
          {
            "name": "filterModeLivraison",
            "in": "query",
            "required": false,
            "description": "Filter by delivery method ID. Omit the parameter or use 0 to list all methods.",
            "example": "2",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recentsOnly",
            "in": "query",
            "required": false,
            "description": "Set to 1 to also require a creation date within the preceding 24 hours. Omit or use 0 to leave this filter off.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "allowEmptyValue": true,
            "description": "Send an empty value to start pagination. For the next page, send the value of X-Kash-Next-Cursor and keep the same filters. Omit this parameter to use the legacy listing.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Up to 300 orders, or null when none match. A historical business failure (for example, an unknown shop or rejected historical key) can also use HTTP 200.",
            "headers": {
              "X-Kash-Next-Cursor": {
                "description": "Present only when pagination is enabled and more orders match. Pass this value as cursor. Pages are ordered by creation date and then ID, both descending.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "maxItems": 300,
                      "items": {
                        "type": "object",
                        "required": ["id", "prepared", "devliveryMethod"],
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "prepared": {
                            "type": "boolean",
                            "description": "True when no article is awaiting preparation, including orders with no articles to prepare."
                          },
                          "devliveryMethod": {
                            "type": "object",
                            "description": "Delivery method. The field name retains its historical spelling.",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "name": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "additionalProperties": true
                      }
                    },
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                },
                "examples": {
                  "awaitingPreparation": {
                    "value": [
                      {
                        "id": 7901,
                        "totalPrice": 25.5,
                        "paidAmount": 0,
                        "invoiceNumber": 0,
                        "devliveryMethod": { "id": 2, "name": "Sur place" },
                        "preparation": 1,
                        "prepared": false,
                        "completed": 0,
                        "valueDate": "2026-10-12 11:23:45",
                        "creationDate": "2026-10-12 11:23:45",
                        "privateComment": "",
                        "publicComment": "",
                        "content": "2 menus",
                        "tableID": 3
                      }
                    ]
                  },
                  "noMatches": {
                    "value": null
                  },
                  "unknownShop": {
                    "value": { "success": false, "result": "Shop not found" }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid pagination cursor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "403": {
            "description": "Rejected, revoked or expired managed key, insufficient permissions, or closed shop.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    { "$ref": "#/components/schemas/StandardFailureResponse" },
                    { "$ref": "#/components/schemas/ShopAvailabilityFailure" }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "The managed-key service or shop-availability check is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    { "$ref": "#/components/schemas/StandardFailureResponse" },
                    { "$ref": "#/components/schemas/ShopAvailabilityFailure" }
                  ]
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "sales.read"
        ],
        "tags": [
          "Sales"
        ]
      }
    },
    "/workers/getOrder.php": {
      "get": {
        "operationId": "getOrder",
        "summary": "Read an order with items and customer details",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "order_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Order ID in this shop."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Order object including articles, optional client and PDF_invoice/PDF_devis URL.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "sales.read"
        ],
        "tags": [
          "Sales"
        ],
        "description": " Managed key permissions: sales.read. Existing historical keys retain their access. Shop must be open and webservices enabled."
      }
    },
    "/workers/getInvoicePDFApiKey.php": {
      "get": {
        "operationId": "getInvoicePDFApiKey",
        "summary": "Download the PDF invoice for an order",
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "orderID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Order ID in this shop."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invoice PDF; historical failures return JSON.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/download": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "sales.read"
        ],
        "tags": [
          "Sales"
        ],
        "description": " Managed key permissions: sales.read. Existing historical keys retain their access. Shop must be open and webservices enabled."
      }
    },
    "/workers/editPlu.php": {
      "post": {
        "operationId": "editPlu",
        "summary": "edit Plu",
        "parameters": [{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional unique key for this product modification; use a new key for another operation and reuse the same key and request after a timeout or 5xx. A 409 idempotency_unresolved requires review before using another key. Completed results are retained at least 30 days.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]+$"}}],
        "description": "Send at least one supported data[...] field. Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "ID of the existing object in this shop."
                  },
                  "data[title]": {
                    "type": "string"
                  },
                  "data[shortTitle]": {
                    "type": "string"
                  },
                  "data[description]": {
                    "type": "string"
                  },
                  "data[buyingPrice]": {
                    "type": "string"
                  },
                  "data[price]": {
                    "type": "string"
                  },
                  "data[calories]": {
                    "type": "string"
                  },
                  "data[weight]": {
                    "type": "string"
                  },
                  "data[unitID]": {
                    "type": "string"
                  },
                  "data[variationID0]": {
                    "type": "string"
                  },
                  "data[variationID1]": {
                    "type": "string"
                  },
                  "data[variationID2]": {
                    "type": "string"
                  },
                  "data[variationID3]": {
                    "type": "string"
                  },
                  "data[variationID4]": {
                    "type": "string"
                  },
                  "data[deptID]": {
                    "type": "string"
                  },
                  "data[supplierID]": {
                    "type": "string"
                  },
                  "data[vatID]": {
                    "type": "string"
                  },
                  "data[eatinvatID]": {
                    "type": "string"
                  },
                  "data[discountID]": {
                    "type": "string"
                  },
                  "data[barcode]": {
                    "type": "string"
                  },
                  "data[stock]": {
                    "type": "string"
                  },
                  "data[stockAlert]": {
                    "type": "string"
                  },
                  "data[consumptionDate]": {
                    "type": "string"
                  },
                  "data[shopHide]": {
                    "type": "string"
                  },
                  "data[keyboardHide]": {
                    "type": "string"
                  },
                  "data[needPrepa]": {
                    "type": "string"
                  },
                  "data[prepaLength]": {
                    "type": "string"
                  },
                  "data[position]": {
                    "type": "string"
                  },
                  "data[activityCode]": {
                    "type": "string"
                  },
                  "data[internalID]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "400": {"description": "Invalid idempotency key or unsupported file upload."},
          "409": {"description": "idempotency_conflict: key reused with different request data; idempotency_unresolved: operation still running or requires review."},
          "200": {
            "description": "Operation result. Historical business errors may use HTTP 200 with success:false; inspect the body.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/delPlu.php": {
      "post": {
        "operationId": "delPlu",
        "summary": "del Plu",
        "description": " Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "ID of the existing object in this shop."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation result. Historical business errors may use HTTP 200 with success:false; inspect the body.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/editDept.php": {
      "post": {
        "operationId": "editDept",
        "summary": "edit Dept",
        "description": "Send at least one supported data[...] field. Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "ID of the existing object in this shop."
                  },
                  "data[title]": {
                    "type": "string"
                  },
                  "data[shortTitle]": {
                    "type": "string"
                  },
                  "data[stock]": {
                    "type": "string"
                  },
                  "data[vatID]": {
                    "type": "string"
                  },
                  "data[eatinvatID]": {
                    "type": "string"
                  },
                  "data[discountID]": {
                    "type": "string"
                  },
                  "data[price]": {
                    "type": "string"
                  },
                  "data[keyboardHide]": {
                    "type": "string"
                  },
                  "data[shopHide]": {
                    "type": "string"
                  },
                  "data[position]": {
                    "type": "string"
                  },
                  "data[deptGroupID]": {
                    "type": "string"
                  },
                  "data[unitID]": {
                    "type": "string"
                  },
                  "data[needPrepa]": {
                    "type": "string"
                  },
                  "data[variationID0]": {
                    "type": "string"
                  },
                  "data[variationID1]": {
                    "type": "string"
                  },
                  "data[variationID2]": {
                    "type": "string"
                  },
                  "data[variationID3]": {
                    "type": "string"
                  },
                  "data[variationID4]": {
                    "type": "string"
                  },
                  "data[activityCode]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation result. Historical business errors may use HTTP 200 with success:false; inspect the body.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/delDept.php": {
      "post": {
        "operationId": "delDept",
        "summary": "del Dept",
        "description": " Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "ID of the existing object in this shop."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation result. Historical business errors may use HTTP 200 with success:false; inspect the body.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/addGrpDept.php": {
      "post": {
        "operationId": "addGrpDept",
        "summary": "add GrpDept",
        "description": " Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "data[title]"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "data[title]": {
                    "type": "string"
                  },
                  "data[position]": {
                    "type": "string"
                  },
                  "data[accountingChapter]": {
                    "type": "string"
                  },
                  "data[accountingChapterComplement]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created object identifier, or a historical business error.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/IdSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/editGrpDept.php": {
      "post": {
        "operationId": "editGrpDept",
        "summary": "edit GrpDept",
        "description": "Send at least one supported data[...] field. Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "ID of the existing object in this shop."
                  },
                  "data[title]": {
                    "type": "string"
                  },
                  "data[position]": {
                    "type": "string"
                  },
                  "data[accountingChapter]": {
                    "type": "string"
                  },
                  "data[accountingChapterComplement]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation result. Historical business errors may use HTTP 200 with success:false; inspect the body.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/delGrpDept.php": {
      "post": {
        "operationId": "delGrpDept",
        "summary": "del GrpDept",
        "description": " Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "ID of the existing object in this shop."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation result. Historical business errors may use HTTP 200 with success:false; inspect the body.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/addVariation.php": {
      "post": {
        "operationId": "addVariation",
        "summary": "add Variation",
        "description": " Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "data[title]"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "data[title]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created object identifier, or a historical business error.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/IdSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/editVariation.php": {
      "post": {
        "operationId": "editVariation",
        "summary": "edit Variation",
        "description": "Send at least one supported data[...] field. Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "ID of the existing object in this shop."
                  },
                  "data[title]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation result. Historical business errors may use HTTP 200 with success:false; inspect the body.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/delVariation.php": {
      "post": {
        "operationId": "delVariation",
        "summary": "del Variation",
        "description": " Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "ID of the existing object in this shop."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation result. Historical business errors may use HTTP 200 with success:false; inspect the body.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/addVariationItem.php": {
      "post": {
        "operationId": "addVariationItem",
        "summary": "add VariationItem",
        "description": " Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "data[title]",
                  "data[idVariation]"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "data[idVariation]": {
                    "type": "string"
                  },
                  "data[title]": {
                    "type": "string"
                  },
                  "data[position]": {
                    "type": "string"
                  },
                  "data[deltaPrice]": {
                    "type": "string"
                  },
                  "data[description]": {
                    "type": "string"
                  },
                  "data[ending]": {
                    "type": "string"
                  },
                  "data[unavailable]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created object identifier, or a historical business error.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/IdSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/editVariationItem.php": {
      "post": {
        "operationId": "editVariationItem",
        "summary": "edit VariationItem",
        "description": "Send at least one supported data[...] field. Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "ID of the existing object in this shop."
                  },
                  "data[idVariation]": {
                    "type": "string"
                  },
                  "data[title]": {
                    "type": "string"
                  },
                  "data[position]": {
                    "type": "string"
                  },
                  "data[deltaPrice]": {
                    "type": "string"
                  },
                  "data[description]": {
                    "type": "string"
                  },
                  "data[ending]": {
                    "type": "string"
                  },
                  "data[unavailable]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation result. Historical business errors may use HTTP 200 with success:false; inspect the body.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/delVariationItem.php": {
      "post": {
        "operationId": "delVariationItem",
        "summary": "del VariationItem",
        "description": " Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "ID of the existing object in this shop."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation result. Historical business errors may use HTTP 200 with success:false; inspect the body.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/editVat.php": {
      "post": {
        "operationId": "editVat",
        "summary": "edit Vat",
        "description": "Send at least one supported data[...] field. Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "ID of the existing object in this shop."
                  },
                  "data[title]": {
                    "type": "string"
                  },
                  "data[accountingChapter]": {
                    "type": "string"
                  },
                  "data[rate]": {
                    "type": "string"
                  },
                  "data[legal]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation result. Historical business errors may use HTTP 200 with success:false; inspect the body.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/delVat.php": {
      "post": {
        "operationId": "delVat",
        "summary": "del Vat",
        "description": " Managed key permissions: catalog.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "ID of the existing object in this shop."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation result. Historical business errors may use HTTP 200 with success:false; inspect the body.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.write"
        ],
        "tags": [
          "Catalogue"
        ]
      }
    },
    "/workers/editClient.php": {
      "post": {
        "operationId": "editClient",
        "summary": "edit Client",
        "parameters": [{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional unique key for this client modification; use a new key for another operation and reuse the same key and request after a timeout or 5xx. A 409 idempotency_unresolved requires review before using another key. Completed results are retained at least 30 days.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]+$"}}],
        "description": "Send at least one supported data[...] field. Managed key permissions: customers.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "ID of the existing object in this shop."
                  },
                  "data[title]": {
                    "type": "string"
                  },
                  "data[surname]": {
                    "type": "string"
                  },
                  "data[name]": {
                    "type": "string"
                  },
                  "data[position]": {
                    "type": "string"
                  },
                  "data[email]": {
                    "type": "string"
                  },
                  "data[phone]": {
                    "type": "string"
                  },
                  "data[addressline1]": {
                    "type": "string"
                  },
                  "data[addressline2]": {
                    "type": "string"
                  },
                  "data[adressComment]": {
                    "type": "string"
                  },
                  "data[postcode]": {
                    "type": "string"
                  },
                  "data[city]": {
                    "type": "string"
                  },
                  "data[country]": {
                    "type": "string"
                  },
                  "data[identificationID]": {
                    "type": "string"
                  },
                  "data[lat]": {
                    "type": "string"
                  },
                  "data[lng]": {
                    "type": "string"
                  },
                  "data[commentPrivate]": {
                    "type": "string"
                  },
                  "data[commentPublic]": {
                    "type": "string"
                  },
                  "data[registrationNumber]": {
                    "type": "string"
                  },
                  "data[VATnum]": {
                    "type": "string"
                  },
                  "data[barcode]": {
                    "type": "string"
                  },
                  "data[blacklist]": {
                    "type": "string"
                  },
                  "data[clientGroupID]": {
                    "type": "string"
                  },
                  "data[phone2]": {
                    "type": "string"
                  },
                  "data[birthDate]": {
                    "type": "string"
                  },
                  "data[activityCode]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "400": {"description": "Invalid idempotency key or unsupported file upload."},
          "409": {"description": "idempotency_conflict: key reused with different request data; idempotency_unresolved: operation still running or requires review."},
          "200": {
            "description": "Operation result. Historical business errors may use HTTP 200 with success:false; inspect the body.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers.write"
        ],
        "tags": [
          "Customers"
        ]
      }
    },
    "/workers/delClient.php": {
      "post": {
        "operationId": "delClient",
        "summary": "del Client",
        "description": " Managed key permissions: customers.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "ID of the existing object in this shop."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation result. Historical business errors may use HTTP 200 with success:false; inspect the body.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers.write"
        ],
        "tags": [
          "Customers"
        ]
      }
    },
    "/workers/addPaymentMethod.php": {
      "post": {
        "operationId": "addPaymentMethod",
        "summary": "add PaymentMethod",
        "description": " Managed key permissions: settings.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "data[title]",
                  "data[type]"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "data[title]": {
                    "type": "string"
                  },
                  "data[type]": {
                    "type": "string",
                    "enum": [
                      "Cash",
                      "Credit_Card",
                      "Check",
                      "Bank_Transfer",
                      "Meal_Voucher",
                      "Holiday_Voucher",
                      "Cash_Refund",
                      "Credit_Card_Refund",
                      "Check_Refund",
                      "Bank_Transfer_Refund",
                      "Meal_Voucher_Refund",
                      "Holiday_Voucher_Refund"
                    ]
                  },
                  "data[accountingChapter]": {
                    "type": "string"
                  },
                  "data[fixedAmount]": {
                    "type": "string"
                  },
                  "data[minimumAmount]": {
                    "type": "string"
                  },
                  "data[maximumAmount]": {
                    "type": "string"
                  },
                  "data[cashboxLock]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created object identifier, or a historical business error.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/IdSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "settings.write"
        ],
        "tags": [
          "Settings"
        ]
      }
    },
    "/workers/delPaymentMethod.php": {
      "post": {
        "operationId": "delPaymentMethod",
        "summary": "del PaymentMethod",
        "description": " Managed key permissions: settings.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "ID of the existing object in this shop."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation result. Historical business errors may use HTTP 200 with success:false; inspect the body.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "settings.write"
        ],
        "tags": [
          "Settings"
        ]
      }
    },
    "/workers/editShop.php": {
      "post": {
        "operationId": "editShop",
        "summary": "Update shop configuration",
        "description": "Send at least one supported data[...] setting. Echoing ******* for prestaShopApiKey or yavinSecret preserves the stored value; empty string clears it. Settings write includes sensitive integration, payment and white-label configuration. Managed key permissions: settings.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "data[shopName]": {
                    "type": "string"
                  },
                  "data[companyRegistrationNum]": {
                    "type": "string"
                  },
                  "data[taxRegistrationNum]": {
                    "type": "string"
                  },
                  "data[adressline1]": {
                    "type": "string"
                  },
                  "data[postCode]": {
                    "type": "string"
                  },
                  "data[city]": {
                    "type": "string"
                  },
                  "data[country]": {
                    "type": "string"
                  },
                  "data[lat]": {
                    "type": "string"
                  },
                  "data[lng]": {
                    "type": "string"
                  },
                  "data[phone]": {
                    "type": "string"
                  },
                  "data[urlwebsite]": {
                    "type": "string"
                  },
                  "data[defaultAccountingChapter]": {
                    "type": "string"
                  },
                  "data[pdffooter]": {
                    "type": "string"
                  },
                  "data[receiptHeader]": {
                    "type": "string"
                  },
                  "data[receiptFooter]": {
                    "type": "string"
                  },
                  "data[defaultVatID]": {
                    "type": "string"
                  },
                  "data[currency]": {
                    "type": "string"
                  },
                  "data[language]": {
                    "type": "string"
                  },
                  "data[pricesAreProvidedTaxIncluded]": {
                    "type": "string"
                  },
                  "data[paypalAddress]": {
                    "type": "string"
                  },
                  "data[deliv_tablePlan]": {
                    "type": "string"
                  },
                  "data[deliv_takeAway]": {
                    "type": "string"
                  },
                  "data[deliv_drivethru]": {
                    "type": "string"
                  },
                  "data[deliv_deliver]": {
                    "type": "string"
                  },
                  "data[deliv_bar]": {
                    "type": "string"
                  },
                  "data[deliv_relayDeposit]": {
                    "type": "string"
                  },
                  "data[deliv_default]": {
                    "type": "string"
                  },
                  "data[receipt_showVat]": {
                    "type": "string"
                  },
                  "data[receipt_showShopName]": {
                    "type": "string"
                  },
                  "data[receipt_showCashbox]": {
                    "type": "string"
                  },
                  "data[receipt_showSeller]": {
                    "type": "string"
                  },
                  "data[receipt_showClient]": {
                    "type": "string"
                  },
                  "data[receipt_showAddress]": {
                    "type": "string"
                  },
                  "data[receipt_showCompanyRegistrationNum]": {
                    "type": "string"
                  },
                  "data[receipt_showClientSurname]": {
                    "type": "string"
                  },
                  "data[receipt_showClientAddress]": {
                    "type": "string"
                  },
                  "data[receipt_showClientPhone]": {
                    "type": "string"
                  },
                  "data[receipt_showGlobalVat]": {
                    "type": "string"
                  },
                  "data[receipt_showComment]": {
                    "type": "string"
                  },
                  "data[receipt_showPricesBeforeTaxes]": {
                    "type": "string"
                  },
                  "data[orderRequires_deliveryChoice]": {
                    "type": "string"
                  },
                  "data[orderRequires_name]": {
                    "type": "string"
                  },
                  "data[orderRequires_surname]": {
                    "type": "string"
                  },
                  "data[orderRequires_address]": {
                    "type": "string"
                  },
                  "data[orderRequires_email]": {
                    "type": "string"
                  },
                  "data[orderRequires_phone]": {
                    "type": "string"
                  },
                  "data[orderRequires_date]": {
                    "type": "string"
                  },
                  "data[orderRequires_CompanyRegistrationNum]": {
                    "type": "string"
                  },
                  "data[orderRequires_comment]": {
                    "type": "string"
                  },
                  "data[enable_stock]": {
                    "type": "string"
                  },
                  "data[enable_barcodes]": {
                    "type": "string"
                  },
                  "data[enable_departments]": {
                    "type": "string"
                  },
                  "data[enable_departmentsGroups]": {
                    "type": "string"
                  },
                  "data[enable_credits]": {
                    "type": "string"
                  },
                  "data[enable_descriptionsForItems]": {
                    "type": "string"
                  },
                  "data[enable_variations]": {
                    "type": "string"
                  },
                  "data[enable_delivShop]": {
                    "type": "string"
                  },
                  "data[enable_relayDeposit]": {
                    "type": "string"
                  },
                  "data[enable_descriptionForVariations]": {
                    "type": "string"
                  },
                  "data[enable_dateOfConsumption]": {
                    "type": "string"
                  },
                  "data[enable_coupons]": {
                    "type": "string"
                  },
                  "data[enable_weightForItems]": {
                    "type": "string"
                  },
                  "data[enable_whiteLabel]": {
                    "type": "string"
                  },
                  "data[whiteLabelAdminUserID]": {
                    "type": "string"
                  },
                  "data[isWebShopEnabled]": {
                    "type": "string"
                  },
                  "data[webShopURL]": {
                    "type": "string"
                  },
                  "data[webShopLang]": {
                    "type": "string"
                  },
                  "data[webShopCol1]": {
                    "type": "string"
                  },
                  "data[webShopCol2]": {
                    "type": "string"
                  },
                  "data[webShopCol3]": {
                    "type": "string"
                  },
                  "data[webShopColT1]": {
                    "type": "string"
                  },
                  "data[webShopColT2]": {
                    "type": "string"
                  },
                  "data[webShopColT3]": {
                    "type": "string"
                  },
                  "data[prestaShopApiKey]": {
                    "type": "string"
                  },
                  "data[prestaShopURL]": {
                    "type": "string"
                  },
                  "data[saleWebhookURL]": {
                    "type": "string"
                  },
                  "data[openingWebhookURL]": {
                    "type": "string"
                  },
                  "data[enableYavin]": {
                    "type": "string"
                  },
                  "data[yavinSecret]": {
                    "type": "string"
                  },
                  "data[yavinSerial]": {
                    "type": "string"
                  },
                  "data[enableVivaWallet]": {
                    "type": "string"
                  },
                  "data[vivaWalletMerchant]": {
                    "type": "string"
                  },
                  "data[vivaAccoundID]": {
                    "type": "string"
                  },
                  "data[paymentDueDays]": {
                    "type": "string"
                  },
                  "data[recoveryFeeAmount]": {
                    "type": "string"
                  },
                  "data[recoveryFeeCurrency]": {
                    "type": "string"
                  },
                  "data[latePenaltyMode]": {
                    "type": "string"
                  },
                  "data[latePenaltyRate]": {
                    "type": "string"
                  },
                  "data[earlyPaymentDiscountRate]": {
                    "type": "string"
                  },
                  "data[earlyPaymentDiscountDays]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation result. Historical business errors may use HTTP 200 with success:false; inspect the body.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/StandardSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "settings.write"
        ],
        "tags": [
          "Settings"
        ]
      }
    },
    "/workers/addUser.php": {
      "post": {
        "operationId": "addUser",
        "summary": "add collaborator access",
        "description": "Reserves a numeric profile and sends an invitation. No usable password is created; legacy data[password] is ignored. delivery=failed/pending still means a reservation exists. The recipient must confirm identity and accept; the issuing key must remain active and fully authorized. Managed keys require every permission, including invoices.read and accounting_transmissions.read. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "data[name]",
                  "data[email]",
                  "data[rights]"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "requestId": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32}$",
                    "description": "Reuse to recover the same invitation without sending again. Use a new ID for an explicit resend."
                  },
                  "data[name]": {
                    "type": "string"
                  },
                  "data[email]": {
                    "type": "string"
                  },
                  "data[rights]": {
                    "type": "string"
                  },
                  "data[barcode]": {
                    "type": "string"
                  },
                  "data[image]": {
                    "type": "string"
                  },
                  "data[password]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Invitation or current access state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollaboratorMutation"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "405": {
            "description": "POST required."
          },
          "409": {
            "description": "Access/version conflict, protected profile, pending invitation or identity management required."
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.read",
          "catalog.write",
          "customers.read",
          "customers.write",
          "sales.read",
          "sales.write",
          "reports.read",
          "invoices.read",
          "accounting_transmissions.read",
          "payments.read",
          "settings.read",
          "settings.write",
          "webhooks.read",
          "webhooks.write",
          "mailbox.read",
          "mailbox.write"
        ],
        "tags": [
          "Collaborators"
        ]
      }
    },
    "/workers/editUser.php": {
      "post": {
        "operationId": "editUser",
        "summary": "edit collaborator access",
        "description": "Changes business name/role/badge/image only. A nonempty password or changed email returns 409 identity_management_required. An unchanged email is ignored. Managed keys require every permission, including invoices.read and accounting_transmissions.read. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "Profile ID."
                  },
                  "version": {
                    "type": "string",
                    "description": "Optional current access version from getUsers?includeAccess=1; stale versions return 409 team_changed."
                  },
                  "data[name]": {
                    "type": "string"
                  },
                  "data[rights]": {
                    "type": "string"
                  },
                  "data[barcode]": {
                    "type": "string"
                  },
                  "data[image]": {
                    "type": "string"
                  },
                  "data[email]": {
                    "type": "string"
                  },
                  "data[password]": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Invitation or current access state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollaboratorMutation"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "405": {
            "description": "POST required."
          },
          "409": {
            "description": "Access/version conflict, protected profile, pending invitation or identity management required."
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.read",
          "catalog.write",
          "customers.read",
          "customers.write",
          "sales.read",
          "sales.write",
          "reports.read",
          "invoices.read",
          "accounting_transmissions.read",
          "payments.read",
          "settings.read",
          "settings.write",
          "webhooks.read",
          "webhooks.write",
          "mailbox.read",
          "mailbox.write"
        ],
        "tags": [
          "Collaborators"
        ]
      }
    },
    "/workers/delUser.php": {
      "post": {
        "operationId": "delUser",
        "summary": "del collaborator access",
        "description": "Revokes access while preserving the profile and sales history. No physical deletion. Last-administrator and protected-profile guards apply. Managed keys require every permission, including invoices.read and accounting_transmissions.read. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "shopID",
                  "key",
                  "id"
                ],
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "id": {
                    "type": "string",
                    "description": "Profile ID."
                  },
                  "version": {
                    "type": "string",
                    "description": "Optional current access version from getUsers?includeAccess=1; stale versions return 409 team_changed."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Invitation or current access state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollaboratorMutation"
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "405": {
            "description": "POST required."
          },
          "409": {
            "description": "Access/version conflict, protected profile, pending invitation or identity management required."
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "catalog.read",
          "catalog.write",
          "customers.read",
          "customers.write",
          "sales.read",
          "sales.write",
          "reports.read",
          "invoices.read",
          "accounting_transmissions.read",
          "payments.read",
          "settings.read",
          "settings.write",
          "webhooks.read",
          "webhooks.write",
          "mailbox.read",
          "mailbox.write"
        ],
        "tags": [
          "Collaborators"
        ]
      }
    },
    "/workers/getWebhooks.php": {
      "get": {
        "operationId": "getWebhooks",
        "summary": "getWebhooks",
        "description": "Lists shop-wide webhook subscriptions and returns the live event catalogue in events. Use that map to build subscription selectors. Subscriptions persist after the creating API key is revoked. Legacy API business errors can use HTTP 200. Managed key permissions: webhooks.read. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "responses": {
          "200": {
            "description": "Webhook operation result or historical business error.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "success": {
                          "const": true
                        },
                        "result": {
                          "const": "OK"
                        },
                        "events": {
                          "type": "object",
                          "description": "Event names available for delivery and their labels. This is the same registry used by the Webhooks configuration panel.",
                          "examples": [{ "sale.paid": "Sale paid", "customer.created": "Customer created" }],
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "webhooks": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/WebhookEndpoint"
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          }
        ],
        "x-required-scopes": [
          "webhooks.read"
        ],
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/workers/getWebhookDeliveries.php": {
      "get": {
        "operationId": "getWebhookDeliveries",
        "summary": "getWebhookDeliveries",
        "description": "Webhooks are shop-wide. webhooks.write can export customer, sale and catalogue events independently of other read domains. Subscriptions persist after the creating API key is revoked; disable/delete the subscription explicitly. Legacy API business errors can use HTTP 200. Managed key permissions: webhooks.read. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "responses": {
          "200": {
            "description": "Webhook operation result or historical business error.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "success": {
                          "const": true
                        },
                        "result": {
                          "const": "OK"
                        },
                        "deliveries": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          },
          {
            "name": "webhookID",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "x-required-scopes": [
          "webhooks.read"
        ],
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/workers/addWebhook.php": {
      "post": {
        "operationId": "addWebhook",
        "summary": "addWebhook",
        "description": "Webhooks are shop-wide. webhooks.write can export customer, sale and catalogue events independently of other read domains. Subscriptions persist after the creating API key is revoked; disable/delete the subscription explicitly. Legacy API business errors can use HTTP 200. For JSON requests, shopID and key must be in the query string; JSON body credentials are not consumed by this historical bootstrap. For form requests, use shopID/key at top level and data[field] for the payload. Managed key permissions: webhooks.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "responses": {
          "200": {
            "description": "Webhook operation result or historical business error.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "success": {
                          "const": true
                        },
                        "result": {
                          "const": "OK"
                        },
                        "ID": {
                          "type": "integer"
                        },
                        "secret": {
                          "type": "string"
                        },
                        "webhook": {
                          "$ref": "#/components/schemas/WebhookEndpoint"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "HTTP or HTTPS delivery URL."
                  },
                  "description": {
                    "type": "string"
                  },
                  "events": {
                    "$ref": "#/components/schemas/WebhookEventSelection"
                  },
                  "active": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  },
                  "secret": {
                    "type": "string",
                    "description": "Optional HMAC signing secret; generated when absent on creation."
                  },
                  "rotateSecret": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  }
                },
                "required": [
                  "url",
                  "events"
                ],
                "additionalProperties": false
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "data[url]": {
                    "type": "string",
                    "description": "HTTP or HTTPS delivery URL."
                  },
                  "data[description]": {
                    "type": "string"
                  },
                  "data[events]": {
                    "$ref": "#/components/schemas/WebhookEventSelection"
                  },
                  "data[active]": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  },
                  "data[secret]": {
                    "type": "string",
                    "description": "Optional HMAC signing secret; generated when absent on creation."
                  },
                  "data[rotateSecret]": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  }
                },
                "required": [
                  "shopID",
                  "key",
                  "data[url]",
                  "data[events]"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-required-scopes": [
          "webhooks.write"
        ],
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/workers/editWebhook.php": {
      "post": {
        "operationId": "editWebhook",
        "summary": "editWebhook",
        "description": "Webhooks are shop-wide. webhooks.write can export customer, sale and catalogue events independently of other read domains. Subscriptions persist after the creating API key is revoked; disable/delete the subscription explicitly. Legacy API business errors can use HTTP 200. For JSON requests, shopID and key must be in the query string; JSON body credentials are not consumed by this historical bootstrap. For form requests, use shopID/key at top level and data[field] for the payload. Managed key permissions: webhooks.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "responses": {
          "200": {
            "description": "Webhook operation result or historical business error.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "success": {
                          "const": true
                        },
                        "result": {
                          "const": "OK"
                        },
                        "secret": {
                          "type": "string",
                          "description": "Only present after rotateSecret=1."
                        },
                        "webhook": {
                          "$ref": "#/components/schemas/WebhookEndpoint"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "HTTP or HTTPS delivery URL."
                  },
                  "description": {
                    "type": "string"
                  },
                  "events": {
                    "$ref": "#/components/schemas/WebhookEventSelection"
                  },
                  "active": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  },
                  "secret": {
                    "type": "string",
                    "description": "Optional HMAC signing secret; generated when absent on creation."
                  },
                  "rotateSecret": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  },
                  "id": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "data[url]": {
                    "type": "string",
                    "description": "HTTP or HTTPS delivery URL."
                  },
                  "data[description]": {
                    "type": "string"
                  },
                  "data[events]": {
                    "$ref": "#/components/schemas/WebhookEventSelection"
                  },
                  "data[active]": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  },
                  "data[secret]": {
                    "type": "string",
                    "description": "Optional HMAC signing secret; generated when absent on creation."
                  },
                  "data[rotateSecret]": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  },
                  "data[id]": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "shopID",
                  "key",
                  "data[id]"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-required-scopes": [
          "webhooks.write"
        ],
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/workers/delWebhook.php": {
      "post": {
        "operationId": "delWebhook",
        "summary": "delWebhook",
        "description": "Webhooks are shop-wide. webhooks.write can export customer, sale and catalogue events independently of other read domains. Subscriptions persist after the creating API key is revoked; disable/delete the subscription explicitly. Legacy API business errors can use HTTP 200. For JSON requests, shopID and key must be in the query string; JSON body credentials are not consumed by this historical bootstrap. For form requests, use shopID/key at top level and data[field] for the payload. Managed key permissions: webhooks.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "responses": {
          "200": {
            "description": "Webhook operation result or historical business error.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "success": {
                          "const": true
                        },
                        "result": {
                          "const": "OK"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "data[id]": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "shopID",
                  "key",
                  "data[id]"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-required-scopes": [
          "webhooks.write"
        ],
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/workers/retryWebhookDelivery.php": {
      "post": {
        "operationId": "retryWebhookDelivery",
        "summary": "retryWebhookDelivery",
        "description": "Webhooks are shop-wide. webhooks.write can export customer, sale and catalogue events independently of other read domains. Subscriptions persist after the creating API key is revoked; disable/delete the subscription explicitly. Legacy API business errors can use HTTP 200. For JSON requests, shopID and key must be in the query string; JSON body credentials are not consumed by this historical bootstrap. For form requests, use shopID/key at top level and data[field] for the payload. Managed key permissions: webhooks.write. Existing historical keys retain their access. Shop must be open and webservices enabled.",
        "responses": {
          "200": {
            "description": "Webhook operation result or historical business error.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "success": {
                          "const": true
                        },
                        "result": {
                          "const": "OK"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Invalid/revoked/expired key or insufficient permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardFailureResponse"
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "shopID",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ShopID"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/APIKEY"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "shopID": {
                    "$ref": "#/components/schemas/ShopID"
                  },
                  "key": {
                    "$ref": "#/components/schemas/APIKEY"
                  },
                  "data[id]": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "shopID",
                  "key",
                  "data[id]"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-required-scopes": [
          "webhooks.write"
        ],
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/workers/addShop.php": {
      "post": {
        "operationId": "createShopAccountLegacy",
        "summary": "Create a new shop account",
        "description": "Stable integration API: creates a Kash.click shop account and immediately returns SHOPID and APIKEY. Existing URL, parameters and responses are preserved independently of interactive identity onboarding. This API does not verify the contact email or automatically attach the shop to an identity. Interactive creation uses the email-confirmed identity flow. Newly issued APIKEY values are managed kash_ keys with all permissions and no expiration. Existing historical keys remain valid. Requires the shop_api_keys migration and encryption configuration. Prefer createShop.php for new integrations. A 503 after creation may leave the shop created: recover access before starting another creation.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "$ref": "#/components/schemas/Email"
                  },
                  "data[companyRegistrationNum]": {
                    "type": "string"
                  },
                  "data[taxRegistrationNum]": {
                    "type": "string"
                  },
                  "data[adressline1]": {
                    "type": "string"
                  },
                  "data[postCode]": {
                    "type": "string"
                  },
                  "data[city]": {
                    "type": "string"
                  },
                  "data[country]": {
                    "type": "string"
                  },
                  "data[phone]": {
                    "type": "string"
                  },
                  "data[urlwebsite]": {
                    "type": "string",
                    "format": "uri"
                  }
                },
                "additionalProperties": false
              },
              "examples": {
                "default": {
                  "value": {
                    "email": "owner@example.com",
                    "data[companyRegistrationNum]": "123456789",
                    "data[taxRegistrationNum]": "FR00123456789",
                    "data[adressline1]": "10 rue de Paris",
                    "data[postCode]": "75001",
                    "data[city]": "Paris",
                    "data[country]": "FR",
                    "data[phone]": "+33123456789",
                    "data[urlwebsite]": "https://example.com"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Account creation result",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/CredentialsSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/StandardFailureResponse"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/workers/apiKeys.php": {
      "post": {
        "operationId": "manageApiKeys",
        "tags": [
          "Administration"
        ],
        "summary": "Manage generated API keys in the connected shop",
        "description": "Administrator browser session only, with current profile context and shop-bound CSRF. Service API keys cannot authorize this operation. POST form body. Cache-Control: no-store, private.",
        "security": [
          {
            "BrowserSession": []
          }
        ],
        "parameters": [
          {
            "name": "X-Kash-Membership-Context",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Use the current selected-profile context from the connected shell when identity memberships are active."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "action",
                  "csrf"
                ],
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "list",
                      "create",
                      "update",
                      "reveal",
                      "revoke",
                      "delete"
                    ]
                  },
                  "csrf": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string",
                    "description": "Required except list/create."
                  },
                  "name": {
                    "type": "string",
                    "description": "Required for create/update."
                  },
                  "scopes[]": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "catalog.read",
                        "catalog.write",
                        "customers.read",
                        "customers.write",
                        "sales.read",
                        "sales.write",
                        "reports.read",
                        "invoices.read",
                        "accounting_transmissions.read",
                        "payments.read",
                        "settings.read",
                        "settings.write",
                        "webhooks.read",
                        "webhooks.write",
                        "mailbox.read",
                        "mailbox.write"
                      ]
                    },
                    "description": "Repeated form field. At least one permission for create/update; write includes read."
                  },
                  "expires_at": {
                    "type": "string",
                    "description": "Optional YYYY-MM-DD; blank means no expiration. Expiration is midnight UTC at the start of the chosen day."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Keys list, created/revealed secret, or mutation acknowledgement.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid action, key, permissions or expiration."
          },
          "403": {
            "description": "Administrator session/context/CSRF required."
          },
          "404": {
            "description": "Key not found in this shop."
          },
          "405": {
            "description": "POST required."
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/workers/webhooksAdmin.php": {
      "post": {
        "operationId": "manageWebhooksInBrowser",
        "tags": [
          "Administration"
        ],
        "summary": "Manage webhooks through the administrator session",
        "description": "Administrator browser session only, with current profile context and shop-bound CSRF. Service API keys cannot authorize this operation. POST form body. Cache-Control: no-store, private. No API key is embedded in the browser. Webservices must be enabled.",
        "security": [
          {
            "BrowserSession": []
          }
        ],
        "parameters": [
          {
            "name": "X-Kash-Membership-Context",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Use the current selected-profile context from the connected shell when identity memberships are active."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "endpoint",
                  "csrf"
                ],
                "properties": {
                  "endpoint": {
                    "type": "string",
                    "enum": [
                      "getWebhooks",
                      "getWebhookDeliveries",
                      "addWebhook",
                      "editWebhook",
                      "delWebhook",
                      "retryWebhookDelivery"
                    ]
                  },
                  "csrf": {
                    "type": "string"
                  },
                  "payload": {
                    "type": "string",
                    "description": "JSON object encoded as a form value, with the fields of the selected webhook operation; defaults to {}."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result of the selected webhook operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid endpoint or JSON payload."
          },
          "403": {
            "description": "Administrator session/context/CSRF required or webservices disabled."
          },
          "405": {
            "description": "POST required."
          },
          "503": {
            "description": "Managed-key storage or another required service is unavailable; no historical fallback.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Catalogue",
      "description": "catalog API domain."
    },
    {
      "name": "Customers",
      "description": "customers API domain."
    },
    {
      "name": "Sales",
      "description": "sales API domain."
    },
    {
      "name": "Reports",
      "description": "reports API domain."
    },
    {
      "name": "Settings",
      "description": "settings API domain."
    },
    {
      "name": "Webhooks",
      "description": "webhooks API domain."
    },
    {
      "name": "Mailbox",
      "description": "mailbox API domain."
    },
    {
      "name": "Collaborators",
      "description": "Invitation, business roles and access revocation; managed service keys require all permissions."
    },
    {
      "name": "Administration",
      "description": "Human administrator session and CSRF only; no service-key access."
    }
  ]
}
