openapi: 3.0.3 info: title: HOMM Store API version: 1.0.0 description: Public storefront API and the integration API used by 1C. See docs/architecture.md for the exchange design. paths: /api/v1/auth/otp/request/: post: operationId: api_v1_auth_otp_request_create tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/OtpRequestRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/OtpRequestRequest' multipart/form-data: schema: $ref: '#/components/schemas/OtpRequestRequest' required: true security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/OtpRequest' description: '' /api/v1/auth/otp/verify/: post: operationId: api_v1_auth_otp_verify_create tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/OtpVerifyRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/OtpVerifyRequest' multipart/form-data: schema: $ref: '#/components/schemas/OtpVerifyRequest' required: true security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/OtpVerify' description: '' /api/v1/auth/token/: post: operationId: api_v1_auth_token_create description: |- Takes a set of user credentials and returns an access and refresh JSON web token pair to prove the authentication of those credentials. tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/TokenObtainPairRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/TokenObtainPairRequest' multipart/form-data: schema: $ref: '#/components/schemas/TokenObtainPairRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/TokenObtainPair' description: '' /api/v1/auth/token/refresh/: post: operationId: api_v1_auth_token_refresh_create description: |- Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid. tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/TokenRefreshRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/TokenRefreshRequest' multipart/form-data: schema: $ref: '#/components/schemas/TokenRefreshRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/TokenRefresh' description: '' /api/v1/auth/me/: get: operationId: api_v1_auth_me_retrieve tags: - api security: - jwtAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/User' description: '' patch: operationId: api_v1_auth_me_partial_update tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedUserRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedUserRequest' multipart/form-data: schema: $ref: '#/components/schemas/PatchedUserRequest' security: - jwtAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/User' description: '' /api/v1/auth/password/: post: operationId: api_v1_auth_password_create tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/PasswordSetRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PasswordSetRequest' multipart/form-data: schema: $ref: '#/components/schemas/PasswordSetRequest' required: true security: - jwtAuth: [] responses: '200': description: No response body /api/v1/auth/addresses/: get: operationId: api_v1_auth_addresses_list parameters: - name: ordering required: false in: query description: Which field to use when ordering the results. schema: type: string - name: page required: false in: query description: A page number within the paginated result set. schema: type: integer - name: page_size required: false in: query description: Number of results to return per page. schema: type: integer - name: search required: false in: query description: A search term. schema: type: string tags: - api security: - jwtAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedAddressList' description: '' post: operationId: api_v1_auth_addresses_create tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/AddressRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/AddressRequest' multipart/form-data: schema: $ref: '#/components/schemas/AddressRequest' required: true security: - jwtAuth: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/Address' description: '' /api/v1/auth/addresses/{id}/: put: operationId: api_v1_auth_addresses_update parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this адрес доставки. required: true tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/AddressRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/AddressRequest' multipart/form-data: schema: $ref: '#/components/schemas/AddressRequest' required: true security: - jwtAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Address' description: '' get: operationId: api_v1_auth_addresses_retrieve parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this адрес доставки. required: true tags: - api security: - jwtAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Address' description: '' patch: operationId: api_v1_auth_addresses_partial_update parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this адрес доставки. required: true tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedAddressRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedAddressRequest' multipart/form-data: schema: $ref: '#/components/schemas/PatchedAddressRequest' security: - jwtAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Address' description: '' delete: operationId: api_v1_auth_addresses_destroy parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this адрес доставки. required: true tags: - api security: - jwtAuth: [] responses: '204': description: No response body /api/v1/catalog/categories/: get: operationId: api_v1_catalog_categories_list parameters: - name: ordering required: false in: query description: Which field to use when ordering the results. schema: type: string - name: search required: false in: query description: A search term. schema: type: string tags: - api security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/Category' description: '' /api/v1/catalog/categories/{slug}/: get: operationId: api_v1_catalog_categories_retrieve parameters: - in: path name: slug schema: type: string required: true tags: - api security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/Category' description: '' /api/v1/catalog/products/: get: operationId: api_v1_catalog_products_list parameters: - in: query name: brand schema: type: string - in: query name: category schema: type: string - in: query name: category_id schema: type: number - in: query name: in_stock schema: type: boolean - in: query name: is_hit schema: type: boolean - in: query name: is_new schema: type: boolean - name: ordering required: false in: query description: Which field to use when ordering the results. schema: type: string - name: page required: false in: query description: A page number within the paginated result set. schema: type: integer - name: page_size required: false in: query description: Number of results to return per page. schema: type: integer - in: query name: price_max schema: type: number - in: query name: price_min schema: type: number - name: search required: false in: query description: A search term. schema: type: string tags: - api security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedProductListList' description: '' /api/v1/catalog/products/hits/: get: operationId: api_v1_catalog_products_hits_retrieve tags: - api security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/ProductList' description: '' /api/v1/catalog/products/new/: get: operationId: api_v1_catalog_products_new_retrieve tags: - api security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/ProductList' description: '' /api/v1/catalog/products/{slug}/: get: operationId: api_v1_catalog_products_retrieve parameters: - in: path name: slug schema: type: string required: true tags: - api security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/ProductDetail' description: '' /api/v1/catalog/products/{slug}/related/: get: operationId: api_v1_catalog_products_related_retrieve parameters: - in: path name: slug schema: type: string required: true tags: - api security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/ProductList' description: '' /api/v1/orders/: get: operationId: api_v1_orders_list parameters: - name: ordering required: false in: query description: Which field to use when ordering the results. schema: type: string - name: page required: false in: query description: A page number within the paginated result set. schema: type: integer - name: page_size required: false in: query description: Number of results to return per page. schema: type: integer - name: search required: false in: query description: A search term. schema: type: string tags: - api security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedOrderListList' description: '' post: operationId: api_v1_orders_create tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/OrderCreateRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/OrderCreateRequest' multipart/form-data: schema: $ref: '#/components/schemas/OrderCreateRequest' required: true security: - jwtAuth: [] - {} responses: '201': content: application/json: schema: $ref: '#/components/schemas/OrderCreate' description: '' /api/v1/orders/{id}/: get: operationId: api_v1_orders_retrieve parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this заказ. required: true tags: - api security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/OrderDetail' description: '' /api/v1/orders/{id}/cancel/: post: operationId: api_v1_orders_cancel_create parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this заказ. required: true tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/OrderListRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/OrderListRequest' multipart/form-data: schema: $ref: '#/components/schemas/OrderListRequest' security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/OrderList' description: '' /api/v1/loyalty/bonus/: get: operationId: api_v1_loyalty_bonus_retrieve tags: - api security: - jwtAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/BonusAccount' description: '' /api/v1/loyalty/promo/validate/: post: operationId: api_v1_loyalty_promo_validate_create tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/PromoValidateRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PromoValidateRequest' multipart/form-data: schema: $ref: '#/components/schemas/PromoValidateRequest' required: true security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/PromoValidate' description: '' /api/v1/loyalty/certificate/validate/: post: operationId: api_v1_loyalty_certificate_validate_create tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/CertificateValidateRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/CertificateValidateRequest' multipart/form-data: schema: $ref: '#/components/schemas/CertificateValidateRequest' required: true security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/CertificateValidate' description: '' /api/v1/loyalty/certificates/: get: operationId: api_v1_loyalty_certificates_retrieve tags: - api security: - jwtAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/GiftCertificate' description: '' /api/v1/content/settings/: get: operationId: api_v1_content_settings_retrieve description: Public store settings used by the storefront. tags: - api security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/SiteSettings' description: '' /api/v1/content/pages/: get: operationId: api_v1_content_pages_list parameters: - name: ordering required: false in: query description: Which field to use when ordering the results. schema: type: string - name: search required: false in: query description: A search term. schema: type: string tags: - api security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/StaticPage' description: '' /api/v1/content/pages/{slug}/: get: operationId: api_v1_content_pages_retrieve parameters: - in: path name: slug schema: type: string title: Адрес required: true tags: - api security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/StaticPage' description: '' /api/v1/content/banners/: get: operationId: api_v1_content_banners_list parameters: - name: ordering required: false in: query description: Which field to use when ordering the results. schema: type: string - name: search required: false in: query description: A search term. schema: type: string tags: - api security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/Banner' description: '' /api/v1/content/banners/{id}/: get: operationId: api_v1_content_banners_retrieve parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this баннер. required: true tags: - api security: - jwtAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/Banner' description: '' /api/v1/payments/webhook/yookassa/: post: operationId: api_v1_payments_webhook_yookassa_create description: |- Receives ЮKassa notifications. TODO: verify the source IP / signature before applying the event. tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/PaymentWebhookRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PaymentWebhookRequest' multipart/form-data: schema: $ref: '#/components/schemas/PaymentWebhookRequest' required: true security: - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaymentWebhook' description: '' /api/v1/integration/1c/health/: get: operationId: api_v1_integration_1c_health_retrieve tags: - api security: - IntegrationToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Health' description: '' /api/v1/integration/1c/catalog/sync/: post: operationId: api_v1_integration_1c_catalog_sync_create tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/CatalogSyncRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/CatalogSyncRequest' multipart/form-data: schema: $ref: '#/components/schemas/CatalogSyncRequest' security: - IntegrationToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/CatalogSync' description: '' /api/v1/integration/1c/orders/pending/: get: operationId: api_v1_integration_1c_orders_pending_retrieve tags: - api security: - IntegrationToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PendingOrder' description: '' /api/v1/integration/1c/orders/{number}/status/: post: operationId: api_v1_integration_1c_orders_status_create parameters: - in: path name: number schema: type: string required: true tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/OrderStatusPayloadRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/OrderStatusPayloadRequest' multipart/form-data: schema: $ref: '#/components/schemas/OrderStatusPayloadRequest' required: true security: - IntegrationToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/OrderStatusPayload' description: '' /api/v1/integration/1c/orders/{number}/ack/: post: operationId: api_v1_integration_1c_orders_ack_create parameters: - in: path name: number schema: type: string required: true tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/OrderAckRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/OrderAckRequest' multipart/form-data: schema: $ref: '#/components/schemas/OrderAckRequest' required: true security: - IntegrationToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/OrderAck' description: '' /api/v1/integration/1c/customers/bonus/: post: operationId: api_v1_integration_1c_customers_bonus_create tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/BonusPayloadRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/BonusPayloadRequest' multipart/form-data: schema: $ref: '#/components/schemas/BonusPayloadRequest' required: true security: - IntegrationToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/BonusPayload' description: '' /api/v1/integration/1c/sync/run/: post: operationId: api_v1_integration_1c_sync_run_create description: Admin-triggered catalog sync (JWT + staff). tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/ManualSyncResponseRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ManualSyncResponseRequest' multipart/form-data: schema: $ref: '#/components/schemas/ManualSyncResponseRequest' required: true security: - jwtAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ManualSyncResponse' description: '' components: schemas: Address: type: object properties: id: type: integer readOnly: true title: type: string title: Название maxLength: 64 city: type: string title: Город maxLength: 128 street: type: string title: Улица maxLength: 255 house: type: string title: Дом maxLength: 32 apartment: type: string title: Квартира/офис maxLength: 32 postal_code: type: string title: Индекс maxLength: 16 entrance: type: string title: Подъезд maxLength: 16 floor: type: string title: Этаж maxLength: 16 intercom: type: string title: Домофон maxLength: 32 is_default: type: boolean title: По умолчанию created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true required: - city - created_at - house - id - street - updated_at AddressRequest: type: object properties: title: type: string minLength: 1 title: Название maxLength: 64 city: type: string minLength: 1 title: Город maxLength: 128 street: type: string minLength: 1 title: Улица maxLength: 255 house: type: string minLength: 1 title: Дом maxLength: 32 apartment: type: string title: Квартира/офис maxLength: 32 postal_code: type: string title: Индекс maxLength: 16 entrance: type: string title: Подъезд maxLength: 16 floor: type: string title: Этаж maxLength: 16 intercom: type: string title: Домофон maxLength: 32 is_default: type: boolean title: По умолчанию required: - city - house - street Banner: type: object properties: id: type: integer readOnly: true title: type: string title: Название maxLength: 255 image_url: type: string format: uri title: Изображение maxLength: 1000 link_url: type: string format: uri title: Ссылка maxLength: 1000 position: allOf: - $ref: '#/components/schemas/PositionEnum' title: Позиция position_display: type: string readOnly: true sort_order: type: integer title: Порядок starts_at: type: string format: date-time nullable: true title: Начало показа ends_at: type: string format: date-time nullable: true title: Конец показа required: - id - image_url - position_display - title BonusAccount: type: object properties: balance: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ transactions: type: array items: $ref: '#/components/schemas/BonusTransaction' required: - balance - transactions BonusPayload: type: object properties: phone: type: string maxLength: 20 external_customer_id: type: string maxLength: 64 amount: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ reason: allOf: - $ref: '#/components/schemas/BonusPayloadReasonEnum' default: accrual comment: type: string order_number: type: string maxLength: 32 required: - amount BonusPayloadReasonEnum: enum: - accrual - spend - refund - adjustment type: string description: |- * `accrual` - accrual * `spend` - spend * `refund` - refund * `adjustment` - adjustment BonusPayloadRequest: type: object properties: phone: type: string maxLength: 20 external_customer_id: type: string maxLength: 64 amount: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ reason: allOf: - $ref: '#/components/schemas/BonusPayloadReasonEnum' default: accrual comment: type: string order_number: type: string maxLength: 32 required: - amount BonusReasonEnum: enum: - accrual - spend - refund - adjustment type: string description: |- * `accrual` - Начисление * `spend` - Списание * `refund` - Возврат * `adjustment` - Корректировка BonusTransaction: type: object properties: id: type: integer readOnly: true amount: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ reason: $ref: '#/components/schemas/BonusReasonEnum' reason_display: type: string readOnly: true comment: type: string maxLength: 255 created_at: type: string format: date-time readOnly: true required: - amount - created_at - id - reason - reason_display CatalogSync: type: object properties: sync_id: type: string maxLength: 64 categories: type: array items: $ref: '#/components/schemas/CategoryPayload' products: type: array items: $ref: '#/components/schemas/ProductPayload' deleted_product_external_ids: type: array items: type: string maxLength: 64 deleted_category_external_ids: type: array items: type: string maxLength: 64 CatalogSyncRequest: type: object properties: sync_id: type: string maxLength: 64 categories: type: array items: $ref: '#/components/schemas/CategoryPayloadRequest' products: type: array items: $ref: '#/components/schemas/ProductPayloadRequest' deleted_product_external_ids: type: array items: type: string minLength: 1 maxLength: 64 deleted_category_external_ids: type: array items: type: string minLength: 1 maxLength: 64 Category: type: object properties: id: type: integer readOnly: true name: type: string maxLength: 255 slug: type: string maxLength: 255 pattern: ^[-a-zA-Z0-9_]+$ parent: type: integer nullable: true image_url: type: string format: uri maxLength: 1000 sort_order: type: integer required: - id - name - slug CategoryPayload: type: object properties: external_id: type: string maxLength: 64 parent_external_id: type: string nullable: true maxLength: 64 name: type: string maxLength: 255 slug: type: string maxLength: 255 description: type: string image_url: type: string format: uri is_active: type: boolean default: true sort_order: type: integer default: 0 required: - external_id - name CategoryPayloadRequest: type: object properties: external_id: type: string minLength: 1 maxLength: 64 parent_external_id: type: string nullable: true maxLength: 64 name: type: string minLength: 1 maxLength: 255 slug: type: string maxLength: 255 description: type: string image_url: type: string format: uri is_active: type: boolean default: true sort_order: type: integer default: 0 required: - external_id - name CertificateStatusEnum: enum: - issued - active - used - expired type: string description: |- * `issued` - Выпущен * `active` - Активен * `used` - Использован * `expired` - Истёк CertificateValidate: type: object properties: code: type: string maxLength: 64 amount: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ required: - amount - code CertificateValidateRequest: type: object properties: code: type: string minLength: 1 maxLength: 64 amount: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ required: - amount - code GiftCertificate: type: object properties: id: type: integer readOnly: true code: type: string maxLength: 64 nominal: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ balance: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ status: $ref: '#/components/schemas/CertificateStatusEnum' status_display: type: string readOnly: true expires_at: type: string format: date-time nullable: true created_at: type: string format: date-time readOnly: true required: - balance - code - created_at - id - nominal - status_display Health: type: object properties: status: type: string time: type: string format: date-time required: - status - time ManualSyncResponse: type: object properties: status: type: string task_id: type: string required: - status - task_id ManualSyncResponseRequest: type: object properties: status: type: string minLength: 1 task_id: type: string minLength: 1 required: - status - task_id OrderAck: type: object properties: external_id: type: string maxLength: 64 required: - external_id OrderAckRequest: type: object properties: external_id: type: string minLength: 1 maxLength: 64 required: - external_id OrderCreate: type: object properties: items: type: array items: $ref: '#/components/schemas/OrderItemInput' customer_name: type: string maxLength: 255 phone: type: string maxLength: 20 email: type: string format: email delivery_method: type: string maxLength: 64 delivery_address: type: string delivery_cost: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ default: '0.00' comment: type: string promo_code: type: string certificate_code: type: string bonus_amount: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ default: '0.00' payment_method: $ref: '#/components/schemas/PaymentMethodEnum' required: - customer_name - items - phone OrderCreateRequest: type: object properties: items: type: array items: $ref: '#/components/schemas/OrderItemInputRequest' customer_name: type: string minLength: 1 maxLength: 255 phone: type: string minLength: 1 maxLength: 20 email: type: string format: email delivery_method: type: string maxLength: 64 delivery_address: type: string delivery_cost: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ default: '0.00' comment: type: string promo_code: type: string certificate_code: type: string bonus_amount: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ default: '0.00' payment_method: $ref: '#/components/schemas/PaymentMethodEnum' required: - customer_name - items - phone OrderDetail: type: object properties: id: type: integer readOnly: true number: type: string readOnly: true status: $ref: '#/components/schemas/OrderStatusEnum' status_display: type: string readOnly: true payment_status: $ref: '#/components/schemas/OrderPaymentStatusEnum' total: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ created_at: type: string format: date-time readOnly: true items: type: array items: $ref: '#/components/schemas/OrderItem' readOnly: true customer_name: type: string maxLength: 255 phone: type: string maxLength: 20 email: type: string format: email maxLength: 254 delivery_method: type: string maxLength: 64 delivery_address: type: string delivery_cost: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ comment: type: string subtotal: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ discount_total: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ bonus_applied: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ certificate_applied: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ promo_code: type: string maxLength: 64 certificate_code: type: string maxLength: 64 status_history: type: array items: $ref: '#/components/schemas/OrderStatusHistory' readOnly: true payments: type: array items: $ref: '#/components/schemas/Payment' readOnly: true required: - created_at - customer_name - id - items - number - payments - phone - status_display - status_history OrderItem: type: object properties: id: type: integer readOnly: true name: type: string maxLength: 500 sku: type: string maxLength: 64 price: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ quantity: type: integer total: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ required: - id - name - price - quantity - sku - total OrderItemInput: type: object properties: product_id: type: integer quantity: type: integer maximum: 999 minimum: 1 required: - product_id - quantity OrderItemInputRequest: type: object properties: product_id: type: integer quantity: type: integer maximum: 999 minimum: 1 required: - product_id - quantity OrderItemRequest: type: object properties: name: type: string minLength: 1 maxLength: 500 sku: type: string minLength: 1 maxLength: 64 price: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ quantity: type: integer total: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ required: - name - price - quantity - sku - total OrderList: type: object properties: id: type: integer readOnly: true number: type: string readOnly: true status: $ref: '#/components/schemas/OrderStatusEnum' status_display: type: string readOnly: true payment_status: $ref: '#/components/schemas/OrderPaymentStatusEnum' total: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ created_at: type: string format: date-time readOnly: true items: type: array items: $ref: '#/components/schemas/OrderItem' readOnly: true required: - created_at - id - items - number - status_display OrderListRequest: type: object properties: status: $ref: '#/components/schemas/OrderStatusEnum' payment_status: $ref: '#/components/schemas/OrderPaymentStatusEnum' total: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ OrderPaymentStatusEnum: enum: - pending - partially_paid - paid - refunded type: string description: |- * `pending` - Ожидает оплаты * `partially_paid` - Частично оплачен * `paid` - Оплачен * `refunded` - Возвращён OrderStatusEnum: enum: - new - processing - delivering - completed - cancelled type: string description: |- * `new` - Новый * `processing` - В обработке * `delivering` - Доставляется * `completed` - Выполнен * `cancelled` - Отменён OrderStatusHistory: type: object properties: status: $ref: '#/components/schemas/OrderStatusEnum' status_display: type: string readOnly: true comment: type: string source: $ref: '#/components/schemas/SourceEnum' created_at: type: string format: date-time readOnly: true required: - created_at - status - status_display OrderStatusPayload: type: object properties: status: type: string maxLength: 64 comment: type: string changed_at: type: string format: date-time external_id: type: string maxLength: 64 required: - status OrderStatusPayloadRequest: type: object properties: status: type: string minLength: 1 maxLength: 64 comment: type: string changed_at: type: string format: date-time external_id: type: string maxLength: 64 required: - status OtpRequest: type: object properties: phone: type: string maxLength: 20 required: - phone OtpRequestRequest: type: object properties: phone: type: string minLength: 1 maxLength: 20 required: - phone OtpVerify: type: object properties: phone: type: string maxLength: 20 code: type: string maxLength: 8 required: - code - phone OtpVerifyRequest: type: object properties: phone: type: string minLength: 1 maxLength: 20 code: type: string minLength: 1 maxLength: 8 required: - code - phone PaginatedAddressList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?page=4 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?page=2 results: type: array items: $ref: '#/components/schemas/Address' PaginatedOrderListList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?page=4 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?page=2 results: type: array items: $ref: '#/components/schemas/OrderList' PaginatedProductListList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?page=4 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?page=2 results: type: array items: $ref: '#/components/schemas/ProductList' PasswordSetRequest: type: object properties: current_password: type: string writeOnly: true new_password: type: string writeOnly: true minLength: 8 required: - new_password PatchedAddressRequest: type: object properties: title: type: string minLength: 1 title: Название maxLength: 64 city: type: string minLength: 1 title: Город maxLength: 128 street: type: string minLength: 1 title: Улица maxLength: 255 house: type: string minLength: 1 title: Дом maxLength: 32 apartment: type: string title: Квартира/офис maxLength: 32 postal_code: type: string title: Индекс maxLength: 16 entrance: type: string title: Подъезд maxLength: 16 floor: type: string title: Этаж maxLength: 16 intercom: type: string title: Домофон maxLength: 32 is_default: type: boolean title: По умолчанию PatchedUserRequest: type: object properties: email: type: string format: email nullable: true maxLength: 254 first_name: type: string title: Имя maxLength: 150 last_name: type: string title: Фамилия maxLength: 150 middle_name: type: string title: Отчество maxLength: 150 Payment: type: object properties: id: type: integer readOnly: true method: $ref: '#/components/schemas/PaymentMethodEnum' method_display: type: string readOnly: true status: $ref: '#/components/schemas/PaymentStatusEnum' status_display: type: string readOnly: true amount: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ provider: type: string maxLength: 32 paid_at: type: string format: date-time nullable: true created_at: type: string format: date-time readOnly: true required: - created_at - id - method - method_display - status_display PaymentMethodEnum: enum: - card - sbp - mir_pay - cash - installment - split type: string description: |- * `card` - card * `sbp` - sbp * `mir_pay` - mir_pay * `cash` - cash * `installment` - installment * `split` - split PaymentStatusEnum: enum: - pending - succeeded - failed - refunded - cancelled type: string description: |- * `pending` - Ожидает * `succeeded` - Успешно * `failed` - Ошибка * `refunded` - Возвращён * `cancelled` - Отменён PaymentWebhook: type: object properties: event: type: string object: type: object additionalProperties: {} required: - event - object PaymentWebhookRequest: type: object properties: event: type: string minLength: 1 object: type: object additionalProperties: {} required: - event - object PendingOrder: type: object properties: number: type: string readOnly: true external_id: type: string maxLength: 64 status: $ref: '#/components/schemas/OrderStatusEnum' payment_status: $ref: '#/components/schemas/OrderPaymentStatusEnum' customer_name: type: string maxLength: 255 phone: type: string maxLength: 20 email: type: string format: email maxLength: 254 delivery_method: type: string maxLength: 64 delivery_address: type: string delivery_cost: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ comment: type: string subtotal: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ discount_total: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ bonus_applied: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ certificate_applied: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ total: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ promo_code: type: string maxLength: 64 certificate_code: type: string maxLength: 64 created_at: type: string format: date-time readOnly: true items: type: array items: $ref: '#/components/schemas/PendingOrderItem' readOnly: true required: - created_at - customer_name - items - number - phone PendingOrderItem: type: object properties: sku: type: string maxLength: 64 product_external_id: type: string maxLength: 64 name: type: string maxLength: 500 price: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ quantity: type: integer total: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ required: - name - price - quantity - sku - total PositionEnum: enum: - home_top - home_middle - category type: string description: |- * `home_top` - Главная — верх * `home_middle` - Главная — середина * `category` - Категория ProductDetail: type: object properties: id: type: integer readOnly: true slug: type: string maxLength: 500 pattern: ^[-a-zA-Z0-9_]+$ name: type: string maxLength: 500 sku: type: string title: Артикул maxLength: 64 brand: type: string maxLength: 255 price: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ old_price: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ nullable: true stock_status: $ref: '#/components/schemas/ProductStockStatusEnum' is_hit: type: boolean title: Хит продаж is_new: type: boolean title: Новинка main_image: type: string readOnly: true category: allOf: - $ref: '#/components/schemas/Category' readOnly: true short_description: type: string description: type: string stock: type: integer attributes: {} images: type: array items: $ref: '#/components/schemas/ProductImage' readOnly: true required: - category - id - images - main_image - name - price - sku - slug ProductImage: type: object properties: id: type: integer readOnly: true url: type: string format: uri maxLength: 1000 alt: type: string maxLength: 255 sort_order: type: integer is_main: type: boolean required: - id - url ProductImagePayload: type: object properties: url: type: string format: uri maxLength: 1000 alt: type: string maxLength: 255 sort_order: type: integer default: 0 is_main: type: boolean default: false required: - url ProductImagePayloadRequest: type: object properties: url: type: string format: uri minLength: 1 maxLength: 1000 alt: type: string maxLength: 255 sort_order: type: integer default: 0 is_main: type: boolean default: false required: - url ProductList: type: object properties: id: type: integer readOnly: true slug: type: string maxLength: 500 pattern: ^[-a-zA-Z0-9_]+$ name: type: string maxLength: 500 sku: type: string title: Артикул maxLength: 64 brand: type: string maxLength: 255 price: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ old_price: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ nullable: true stock_status: $ref: '#/components/schemas/ProductStockStatusEnum' is_hit: type: boolean title: Хит продаж is_new: type: boolean title: Новинка main_image: type: string readOnly: true category: allOf: - $ref: '#/components/schemas/Category' readOnly: true required: - category - id - main_image - name - price - sku - slug ProductPayload: type: object properties: external_id: type: string maxLength: 64 sku: type: string maxLength: 64 name: type: string maxLength: 500 slug: type: string maxLength: 500 category_external_id: type: string nullable: true maxLength: 64 brand: type: string maxLength: 255 short_description: type: string description: type: string price: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ old_price: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ nullable: true stock: type: integer default: 0 stock_status: $ref: '#/components/schemas/ProductStockStatusEnum' is_hit: type: boolean default: false is_new: type: boolean default: false is_active: type: boolean default: true attributes: type: object additionalProperties: {} images: type: array items: $ref: '#/components/schemas/ProductImagePayload' external_updated_at: type: string format: date-time nullable: true required: - external_id - name - price - sku ProductPayloadRequest: type: object properties: external_id: type: string minLength: 1 maxLength: 64 sku: type: string minLength: 1 maxLength: 64 name: type: string minLength: 1 maxLength: 500 slug: type: string maxLength: 500 category_external_id: type: string nullable: true maxLength: 64 brand: type: string maxLength: 255 short_description: type: string description: type: string price: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ old_price: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ nullable: true stock: type: integer default: 0 stock_status: $ref: '#/components/schemas/ProductStockStatusEnum' is_hit: type: boolean default: false is_new: type: boolean default: false is_active: type: boolean default: true attributes: type: object additionalProperties: {} images: type: array items: $ref: '#/components/schemas/ProductImagePayloadRequest' external_updated_at: type: string format: date-time nullable: true required: - external_id - name - price - sku ProductStockStatusEnum: enum: - in_stock - preorder - out_of_stock type: string description: |- * `in_stock` - В наличии * `preorder` - Под заказ * `out_of_stock` - Нет в наличии PromoValidate: type: object properties: code: type: string maxLength: 64 subtotal: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ required: - code - subtotal PromoValidateRequest: type: object properties: code: type: string minLength: 1 maxLength: 64 subtotal: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ required: - code - subtotal SiteSettings: type: object properties: site_name: type: string title: Название сайта maxLength: 255 phone: type: string title: Телефон maxLength: 32 email: type: string format: email maxLength: 254 address: type: string title: Адрес maxLength: 500 working_hours: type: string title: Часы работы maxLength: 255 telegram_url: type: string format: uri title: Telegram maxLength: 200 vk_url: type: string format: uri title: ВКонтакте maxLength: 200 whatsapp_url: type: string format: uri title: WhatsApp maxLength: 200 free_delivery_threshold: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ title: Бесплатная доставка от default_delivery_cost: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ title: Стоимость доставки bonus_accrual_percent: type: string format: decimal pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ title: Процент начисления бонусов bonus_max_payment_percent: type: string format: decimal pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ title: Максимум оплаты бонусами, % bonus_ttl_days: type: integer title: Срок жизни бонусов, дней privacy_policy_url: type: string format: uri title: Политика конфиденциальности maxLength: 200 offer_url: type: string format: uri title: Публичная оферта maxLength: 200 updated_at: type: string format: date-time readOnly: true required: - updated_at SourceEnum: enum: - site - 1c - admin type: string description: |- * `site` - Сайт * `1c` - 1С * `admin` - Админка StaticPage: type: object properties: slug: type: string title: Адрес maxLength: 255 pattern: ^[-a-zA-Z0-9_]+$ title: type: string title: Заголовок maxLength: 255 content: type: string title: Содержимое seo_title: type: string maxLength: 255 seo_description: type: string maxLength: 500 updated_at: type: string format: date-time readOnly: true required: - slug - title - updated_at TokenObtainPair: type: object properties: access: type: string readOnly: true refresh: type: string readOnly: true required: - access - refresh TokenObtainPairRequest: type: object properties: phone: type: string writeOnly: true minLength: 1 password: type: string writeOnly: true minLength: 1 required: - password - phone TokenRefresh: type: object properties: access: type: string readOnly: true refresh: type: string required: - access - refresh TokenRefreshRequest: type: object properties: refresh: type: string minLength: 1 required: - refresh User: type: object properties: id: type: string format: uuid readOnly: true phone: type: string readOnly: true title: Телефон email: type: string format: email nullable: true maxLength: 254 first_name: type: string title: Имя maxLength: 150 last_name: type: string title: Фамилия maxLength: 150 middle_name: type: string title: Отчество maxLength: 150 full_name: type: string readOnly: true date_joined: type: string format: date-time readOnly: true title: Дата регистрации required: - date_joined - full_name - id - phone securitySchemes: IntegrationToken: type: apiKey in: header name: X-Integration-Token jwtAuth: type: http scheme: bearer bearerFormat: JWT