Despacho is one of those common words that can have several different meanings in legal contexts. It is perhaps most often used in the expression despacho de abogados, one of the Spanish terms for “law firm.”
In the context of customs law (Derecho aduanero), despacho aduanero denotes “customs clearance” and despachar mercancías en aduanas is “to clear the goods through customs.” In EU customs terminology, despacho is often expressed as “release:” despacho a libre práctica (“release for free circulation”); despacho a consumo (“release for consumption”).
And in a third sense, despacho can also be a synonym for título, being defined in the DLE as documento escrito, título o comisión que se da a alguien para algún empleo o cargo. As an example, after finishing their training at the Escuela Judicial in Barcelona, newly-graduated Spanish judges receive their diplomas and assignments (destinos) in a ceremony known as entrega de despachos.