HTTP Interfaces and External Systems for Livestock and Poultry Farming Marketing Content

Livestock and poultry farming enterprise operational data is a core basis for financial institutions to carry out customer acquisition marketing. The

What the data for this category looks like

Livestock and poultry farming enterprise operational data is a core basis for financial institutions to carry out customer acquisition marketing. The data mainly comes from three types of sources: IoT feeding/environmental control equipment in large-scale farms, breeding management SaaS systems, and public statistical data from local livestock technology promotion stations. Equipment-reported data is a real-time incremental stream, breeding system data is synchronized in batches daily or weekly, and livestock station data is updated in batches monthly. Each standard data document includes unique farm identifier, livestock and poultry category (pig, chicken, cattle, etc.), inventory quantity, daily feed consumption, indoor temperature and humidity, and data collection timestamp. Fixed units apply: inventory quantity uses "head" or "feather" as the unit, feed consumption uses "kilogram" as the unit, and temperature and humidity use "degree Celsius" and "percentage" as units respectively.

What constraints these characteristics impose on HTTP interfaces and external systems

Format differences across multiple data sources require HTTP interfaces to support three data formats: JSON, CSV, and binary device reports. Without this support, access requirements of equipment and systems cannot be met. The update cycles of different data sources vary widely, from minute-level to monthly-level. Differentiated polling and synchronization strategies need to be configured for different data sources to avoid resource waste or data delay. Fields contain clear category and unit information. Interfaces must strictly match field names and unit definitions, otherwise unit confusion or category matching errors will occur during marketing content generation. The timeliness requirement for breeding marketing content is high. Some real-time push scenarios require data delay of no more than 30 minutes. Interface timeout and retry strategies need to adapt to this requirement.

How to Set Configurations

Configuration ItemRecommended ValueRationale
external_data_source_typeHybrid mode (device reporting + system synchronization)Covers real-time data from IoT devices and batch-synchronized data from breeding SaaS
polling_interval15–60 minutesMatches the difference in update rhythms, where inventory data updates daily and feeding data is reported frequently
field_mapping_rulesConfigured in the format farm_id: farm ID, animal_type: livestock and poultry category, head_count: inventory quantity, unit: unitMatches the exclusive fields and unit definitions of livestock and poultry breeding data to avoid mapping errors
api_timeout30 secondsMeets the real-time push timeliness requirement for breeding marketing content
failed_retry_count3 timesAddresses retry requirements for temporary disconnections of IoT devices or fluctuations in system interfaces
share_link_user_idInjected according to the ID of the accessed breeding enterpriseMatches the user identifier requirement for login-free share links

The parameter values provided on this page are common recommended starting points for configuration setup. Actual values are influenced by material form, data volume, and business rules. Specific issues require case-by-case analysis, and testing on internal samples is recommended prior to finalizing settings.

Three Common Mistakes

  • Calling the HTTP interface returns 400 Bad Request with the prompt missing tmbId field. The cause is using an older historical application version that has not synced the tmbId field completion logic from the MongoAppVersion table.
  • Local deployment works normally but OneApi calls fail, returning 502 Bad Gateway. The cause is that the cross-domain whitelist for external systems is not configured, or the port mapping is incorrect.
  • Generated marketing content does not match the corresponding livestock and poultry category. The cause is that exclusive field weights are not configured according to livestock and poultry categories, and the general matching logic cannot distinguish marketing needs for different categories such as pigs and chickens.

How to Confirm the Configuration Is Complete

  • Call the configured HTTP interface and check that the returned JSON data includes all configured fields and correct unit information.
  • Trigger a marketing content generation task and check whether the external system receives the expected push request.
  • View the application running logs to confirm that there are no errors such as missing tmbId or interface timeout.
  • Generate a login-free share link and check that the link carries the correct user database identification ID.

Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-09-14.