'API endpoint to push transactions to the Federation.
Return:
A ``dict`` containing the data about the transaction.'

def post(self):

    pool = current_app.config['bigchain_pool']
    tx = request.get_json(force=True)
    try:
        tx_obj = Transaction.from_dict(tx)
    except SchemaValidationError as e:
        return make_error(400, message='Invalid    transaction    schema:    {}'.format(e.__cause__.message))
    except ValidationError as e:
        return make_error(400, 'Invalid    transaction    ({}):    {}'.format(type(e).__name__, e))
    with pool() as bigchain:
        bigchain.statsd.incr('web.tx.post')
        try:
            bigchain.validate_transaction(tx_obj)
        except ValidationError as e:
            return make_error(400, 'Invalid    transaction    ({}):    {}'.format(type(e).__name__, e))
        else:
            bigchain.write_transaction(tx_obj)
    response = jsonify(tx)
    response.status_code = 202
    response.autocorrect_location_header = False
    status_monitor = '../statuses?transaction_id={}'.format(tx_obj.id)
    response.headers['Location'] = status_monitor
    return response
