openapi: 3.0.3 info: title: Lokalisa Public API version: 1.2.0 servers: - url: https://api.lokalisa.com - url: https://sandbox-api.lokalisa.com paths: /api/v1/auth/token: post: summary: Generar token parameters: - in: header name: X-API-Key required: true schema: { type: string } - in: header name: X-API-Secret required: true schema: { type: string } responses: '200': { description: OK } /api/v1/catalog/addresses: get: summary: Catalogo de direcciones pickup del negocio security: [{ BearerAuth: [] }] responses: '200': { description: OK } /api/v1/quotes: post: summary: Cotizar envio security: [{ BearerAuth: [] }] requestBody: required: true content: application/json: schema: type: object required: [dropoff_lat, dropoff_lng] properties: pickup_address_id: { type: integer } distance_km: { type: number } dropoff_lat: { type: number } dropoff_lng: { type: number } responses: '200': { description: OK } /api/v1/catalog/products: get: summary: Catalogo de productos con stock (FULL) security: [{ BearerAuth: [] }] responses: '200': { description: OK } /api/v1/orders: post: summary: Crear pedido security: [{ BearerAuth: [] }] parameters: - in: header name: Idempotency-Key required: true schema: { type: string } requestBody: required: true content: application/json: schema: type: object required: - external_id - pickup_address_id - items properties: external_id: { type: string } pickup_address_id: { type: integer } dropoff_name: { type: string } dropoff_phone: { type: string } dropoff_address: { type: string } dropoff_lat: { type: number } dropoff_lng: { type: number } delivery_date: { type: string, format: date } payment_mode: type: string enum: [ONLINE, COD, PAID] items: type: array minItems: 1 items: type: object required: [name, quantity] properties: product_id: { type: integer } name: { type: string } quantity: { type: integer } unit_price: { type: number } responses: '201': { description: Created } components: securitySchemes: BearerAuth: type: http scheme: bearer bearerFormat: token