I've seen a lot of cases where something inserted into the Magento databases manually, or via the API, will have a missing attribute that, for whatever reason, is set to a default value when saved in the Magento UI. The UI is setting the default values properly, whereas the API or database inserts don't set the attribute.
So, in your case, my first line of debugging would be
- "Upload" [sic] a product with the API (what API methods are you using? Or are you using a custom API?)
- Take a snapshot of the attribute values for that product
- Save the product via the Magento UI
- Take a snapshot of the attribute values for that product
- Diff #2 and #4
- Ensure that your "upload" [sic] method sets any attributes that are present in #4 but not #2
Magento uses an Entity Attribute Value modeling scheme, which optimizing for database flexibility rather than querying. Long story short, you can run the following queries to get your basic product attribute values.
You'll want to replace every instance of [3455] with the a product id from your database. You can get this ID by examining the URL of a proudct in the Magento Admin UI. You can run the query without the WHERE clauses, although the default indexing isn't optimized for this use case, and you'll get a slowish query depending on your database size.
SELECT eav_attribute.frontend_label, eav_attribute.attribute_code,
catalog_product_entity_varchar.value
FROM catalog_product_entity
LEFT JOIN catalog_product_entity_varchar ON catalog_product_entity.entity_id = catalog_product_entity_varchar.entity_id
LEFT JOIN eav_attribute on catalog_product_entity_varchar.attribute_id = eav_attribute.attribute_id
WHERE catalog_product_entity.entity_id = 3455
UNION
SELECT eav_attribute.frontend_label, eav_attribute.attribute_code,
catalog_product_entity_text.value
FROM catalog_product_entity
LEFT JOIN catalog_product_entity_text ON catalog_product_entity.entity_id = catalog_product_entity_text.entity_id
LEFT JOIN eav_attribute on catalog_product_entity_text.attribute_id = eav_attribute.attribute_id
WHERE catalog_product_entity.entity_id = 3455
UNION
SELECT eav_attribute.frontend_label, eav_attribute.attribute_code,
catalog_product_entity_datetime.value
FROM catalog_product_entity
LEFT JOIN catalog_product_entity_datetime ON catalog_product_entity.entity_id = catalog_product_entity_datetime.entity_id
LEFT JOIN eav_attribute on catalog_product_entity_datetime.attribute_id = eav_attribute.attribute_id
WHERE catalog_product_entity.entity_id = 3455
UNION
SELECT eav_attribute.frontend_label, eav_attribute.attribute_code,
catalog_product_entity_decimal.value
FROM catalog_product_entity
LEFT JOIN catalog_product_entity_decimal ON catalog_product_entity.entity_id = catalog_product_entity_decimal.entity_id
LEFT JOIN eav_attribute on catalog_product_entity_decimal.attribute_id = eav_attribute.attribute_id
WHERE catalog_product_entity.entity_id = 3455
UNION
SELECT eav_attribute.frontend_label, eav_attribute.attribute_code,
catalog_product_entity_gallery.value
FROM catalog_product_entity
LEFT JOIN catalog_product_entity_gallery ON catalog_product_entity.entity_id = catalog_product_entity_gallery.entity_id
LEFT JOIN eav_attribute on catalog_product_entity_gallery.attribute_id = eav_attribute.attribute_id
WHERE catalog_product_entity.entity_id = 3455
UNION
SELECT eav_attribute.frontend_label, eav_attribute.attribute_code,
catalog_product_entity_int.value
FROM catalog_product_entity
LEFT JOIN catalog_product_entity_int ON catalog_product_entity.entity_id = catalog_product_entity_int.entity_id
LEFT JOIN eav_attribute on catalog_product_entity_int.attribute_id = eav_attribute.attribute_id
WHERE catalog_product_entity.entity_id = 3455;