Documentacion API - Publicidad

Esta documentación cubre los puntos finales para administrar la publicidad dentro de smart lockers.

1. Cargar publicidad

Endpoint: POST /advertising/upload/{lockerId}

Descripción: Sube un archivo publicitario para un casillero específico.

Request Headers:

  • Authorization: Bearer token

Request Parameters:

  • lockerId: The ID of the locker where the file is uploaded.

Request Body: Multipart form-data containing the file with the key arc.

Response:

                    
                        {
                            "message": "Advertising file uploaded successfully",
                            "file": "uploaded-file-name.jpg",
                            "url": "http://uploads.example.com/uploaded-file-name.jpg",
                            "userId": "123"
                        }
                    
                

2. Eliminar publicidad.

Endpoint: DELETE /advertising/{lockerId}/delete/{filename}

Description: Elimina un archivo de publicidad específico por nombre de archivo.

Request Headers:

  • Authorization: Bearer token

Request Parameters:

  • lockerId: The ID of the locker where the file is stored.
  • filename: The name of the file to delete.

Response:

                    
                        {
                            "message": "File deleted successfully"
                        }