Getting married in Chile as forigners

Hi,
My boyfriend and I are planning on getting married in Chile and neither of us is a Chilean citizen. Does anyone know what two foreigners need so they can be legally married in Chile? How long in advance should we apply, what documentation we need, etc.?
Thanks in advance!  :)

You need to go to the embassy of your country, or of his country.
Then when it registered in your and his embassy, you can legalize it and add the status to the civil registration data