This paper formulates a theoretical framework in which the analysis starts with supplier-customer links of micro type. From this we derive aggregate trade links between nodes in a spatial network. It is shown how affinities and barriers shape and influence the establishment of customer links, and how this forms aggregate patterns of flows. The framework is applied to three types of models for determining trade patterns — random discrete choice, information theory and gravity models. Essentially equivalent solutions are derived.