Commit graph

5 commits

Author SHA1 Message Date
DJP
3f8351dff6 Fix: Correct preflight payload structure
The API expects:
- name, brand_name, market_name, channel at top level
- creatives array with only source_url

Changes:
- Moved name and channel to top level
- Changed asset_url to source_url in creatives
- Updated API client validation to match

This fixes the 'channel is missing, name is missing, source_url is missing' error.
2026-01-09 14:46:41 -05:00
DJP
7b506ba449 Fix: Update preflight payload to match API requirements
The CreativeX API expects specific field names and structure:
- brand_name (not brand)
- market_name (not market)
- creatives array containing asset details

Changes:
- Updated preflight metadata structure in upload.py
- Updated create_preflight validation in api_client.py
- Updated state_manager to use correct field names
- Payload now includes creatives array with name, asset_url, channel

This fixes the 'brand_name, market_name, creatives are missing' error.
2026-01-09 14:45:26 -05:00
DJP
dc0a6b741c Fix: Handle presigned URL returned as plain text
The API returns the presigned URL as plain text, not JSON.

Changes:
- Updated _make_request to return text directly if it's a URL
- Updated get_presigned_url to handle string URLs and dict responses
- Better logging with longer URL preview (80 chars)

This fixes the 'Unexpected response format' error.
2026-01-09 14:43:24 -05:00
DJP
ccb5203948 Fix: Pass filename parameter to presigned_url endpoint
The CreativeX API requires a 'filename' parameter when requesting presigned URLs.

Changes:
- Updated get_presigned_url() to accept filename parameter
- Pass filename to API as query parameter
- Updated upload script to pass filename when requesting URL
- Updated test_connection to use test filename

This fixes the 'filename is missing' error.
2026-01-09 14:42:23 -05:00
DJP
72e9b54ff6 Initial commit: CreativeX API integration for Ferrero assets
- Ferrero filename parser with NEW format support
- CreativeX API client with retry logic
- State persistence with resume capability
- Upload and status checking scripts
- Comprehensive documentation
- Virtual environment support
2026-01-09 14:33:00 -05:00